|
Any expert PID tuners w/resolution advice?
In 2005 Kevin wrote the scripted automous mode along with some PID system for his motors in the kickoff. Ever since then, our team has been trying to close a PID around our drive system full time with encoders. But every year we struggle. We struggle because their mentor doesn't understand the resolution issues that we might be having. That would be me...I buy off the shelf servo systems that have been proven and work no problems, and I know how to tune a PID, but when it comes to designing my own motor control system with the correct resolution required to close a PID loop around a custom motor application I struggle in a sense. So any help would be appreciated.
We want a fly by wire control system with the joysticks giving only input to the drive system and let the motor control software a closed loop PID and respond.
So most of you know the situation, but let's start out with the basics.
Let's suppose we have a DC motor controlled by a PWM controller. And we have a quadrature encoder with an A and B phase. The encoder however only has a resolution of 128 pulses per one revolution of the encoder shaft in relation to feedback available. Which isn't that great compared to the thousands of pulses encoder off the shelf that I buy currently.
Almost one encoder pulse is three (2.8) degrees on the motor if coupled 1 to 1 with the motor shaft. If you introduce a gearbox, your really making a wide-open feedback issue. "sloppy". That is if you mount your encoder somewhere else in your gear box other than the motor shaft.
Question one: Where's the BEST place to put your encoders for a closed loop PID drive system? At the end of the motor shaft I would say. But maybe I am thinking wrong. The GrayHill encoders can't take the RPM of the direct motor shaft, seems to me would be the best and highest resolution feedback to the motor which leads me to believe look for another encoder... Also turning that fast would cause some SERIOUS over time interrupts. Based on last year, we got somewhere around 755 interrupts per second, at full RPM of the motor shaft we would be killing the PIC cpu with interrupts, so that's no good either....
Because the resolution is so low, and let's say we want to control this motor for position, would it be very difficult to tune the PID? Or no matter what the parameters are in any control system, a PID should be able to be tuned? In other words, is there a point where your feedback system isn't what it's cracked up to be when trying to tune your PID? Or does it amount to response time? If your feedback hardware has a low resolution, then you have to trade off response time or what I call a sluggish PID loop? It will tune or settle, but it takes it longer to get there and can't be as responsive?
Limited by the resolution, the worst part is that the derivative gain will be useless. The derivative gain is necessary if we want to move from over damp to critically damped tuning. This is important if we are doing position control. Actually, our PID for our drive system would most likely be velocity control not position based.
Any thoughts for those of you that have designed PID systems? Are their any of you that have a successfully fly-by-wire closed loop PID system around your transmissions that you use FULL TIME during telly mode and auto mode?
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here: Repository
Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
|