I have a motor with an encoder. When I set the speed of the motor it should change its speed so that encoder readings per second should fit an equation $y = ax^2 + bx + c$ where x
is speed
value that is given to the motor and y
is the encoder readings per second that should get with motor.
Encoder reading is counted in every 1ms
and if it is not equal to the value of the encoder output should get from motor (it is calculated using the equation), the PWM input to the motor should vary in-order to get desired encoder output.
I want to control this value using a PID
controller but I'm confused in writing equations. Any help would be appreciated..