Hello, I am trying to develop a control system for my motor ( Pololu - 4.4:1 Metal Gearmotor 25Dx63L mm HP 6V with 48 CPR Encoder ). My interface to driving the motor is the Dual TB9051FTG Motor Driver Shield for Arduino. In that library there is a function setSpeed for both motors, that controls a pulse width modulated output and a logical direction I/O.
(correct me if I am wrong).
My hope was to use a PID controller that used the encoder interrupts to track the rotor angle to the nearest (2PI/48) radians and some assumed theta naught then use that library function to control the power applied to the rotor (which should manifest itself as some omega given a particular load.)
I am running into two main problems.
-
Fluctuating Motion Deadzone:
a. So, ideally, a setSpeed of 0 would result in no motion, 1 would result in super slow motion and 400 would result in very fast forward motion. This is not the case. There is a deadzone from (based on some experiments in my system) about -155 to 155 where setting motor speed to anything in that range results in no motion. This makes it so my controller needs to be adjusted to some range to account for the deadzone. If my controller gives a value of 0.1, then it is not to set the motor speed to 40, but rather somewhere in between the no-motion zero value and 400.
b. This value of no-motion zero is not constant. Based on what is going on with the other motor and the load, this value has the potential to change during runtime and needs to be accounted for in the algorithm. The fluctuating nature of this fundamental value is difficult to manage and adjust for as the system runs. -
Motion is Jumpy/Not Easily Mapped to Analog Space (especially at theoretically low speeds)
Problem two is essentially that if you go JUST above the zero mentioned in part 1, you move way too fast. My control system works to a certain extent, but it suffers from the fact that any motion that it introduces overshoots the desired theta, then it needs to readjust and during that readjustment, overshoots the desired theta in the opposite direction, leading to an oscillating steady state. I see this as a fundamental problem with the equipment rather than the algorithm. The speed setting does not perform as a spectral function just above the zero power. IE, you are either rotating at 0 rad/s at setSpeed=155 (current theoretical 0) or you are rotating at like 8*(2PI) rad/s (8 rev/s) if you set 156. You cannot set something between 155 and 156, so you run into trouble.
With all this in mind, do you have any advice. I am a motor and robotics novice to say the most, so perhaps I am missing huge chunks of knowledge of motor theory that abstract my control system to an inappropriate extent that doesn’t account for the physics of the true system. Any suggestions on how I could sure up my model/control system?