Re: [WheelWatcher] Help with tuning



Rob,

Sorry you are having trouble. I do need to update that example to fix some problems in it -- it's not your fault that it is unstable at low speeds. I've been buried with putting finishing touches on the new WheelCommander WC-132, which includes many of the same ideas as the example you refer to, but has a lot more in it, and is a "canned" solution.

One big difference internally is that I gave up on having nested velocity and position loops, and made the position loop such that it produces motor commands (PWM values and directions) directly, bypassing the velocity loop. I also found that I had to add an offset to the calculated PWM value to overcome friction and deadbands (in servos at least) at the low speed end. Finally, it helps to have a low loop bandwidth (6 Hz) when slow motions are required.

Making low speeds stable was not trivial, but is doable. I'm really busy tomorrow, so it might be a day or two before I get back to you.

Thanks.

Sincerely,
Pete Skeggs
WheelWatcher Tech Support

rob.stehlik@xxxxxxxxxxxx wrote:
Hello,

I have just installed a couple WW02's on my robot which has custom wheels and motors. I am currently trying to get the advanced velocity and position control code working (I am using a PIC 16F877A with CCS), but am quite confused about the way the feedback controller is tuned. I am used to adjusting gains for P, I and D terms, but this code seems different. Currently I have it so the code functions properly, but the robot's movements are not well controlled. IE when driving in a square, the robot always overshoots, especially in the turns, and sometimes does not recover. Many times the robot will get stuck oscillating around the target really slowly. The positioning accuracy is terrible. I have tried adjusting the divisor in the integral calculation, as well as the acceleration value. And I played with the deceleration term (was originally 150). After running tests for several hours, the robot performs a little better, but it really leaves a lot to be desired. So, I guess my question is what approach should I take when tuning the controller? Which parameters should I vary? And considering my robot is quite heavy and fast, is there anything I should keep in mind when adjusting the parameters? Is there a way to set a minimum PWM duty cycle? Because of my robots weight, it does not move well at slow speeds.

I appreciate your help,

Rob






This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.