Analog input control

Hello friends. I want to control the rotation of the motor using an analog signal. I wrote a small code using the nonlinear scaling function. It works, but the motor has noises during parking and operation, and also fluctuates in different directions. I checked through the port monitor the analog input that I use and it has no large deviations. What can help me? Thanks