World number one Ash Barty won her first singles match of 2020 after a tough three set victory over Anastasia Pavlyuchenkova at the Adelaide International.