Currently I am building a omnidirectional robot with 4 DC Motors with embedded incremental encoder.
However, with a constant pwm input, i am not able to control the motor to rotate in a "relatively stable" state, refer to the figure, it can be observed that the linear speed of the motors can varied in 10cm/s range. I believe one possible reason is the PWM signal generated from my Arduino Mega Controller is not good enough.
And my problem is how can I implement a stable PID controller in this case? As the speed of the motor varies even with the same input, I believe extra work like adding a filter is needed?
Any advice is appreciated >.< Thank you