DPRG List  


Subject: [DPRG] PID
From: Sluggy slugmusk at home.com
Date: Sat Jun 24 00:46:20 CDT 2000

"Robert L. Jordan" wrote:

> Way to GO Sluggy. You done good.

blush blush

> Is a simple implementation of P, of the PID, on a robot just the HBridge driving the motor and the amount of "power" you tell the HBridge to deliver using PWM?
> Or do I need to have Feedback, like encoder pulses, on the wheels turning to implement the P?

I dug up my research on the subject and must issue a correction. Luckily, it is about the very thing you have just asked!

My understanding was that with proportional control, you have have no feedback into the control. This is not correct.

Proportional control means that if your feedback indicates a small error in the the output speed, a small correction is applied to the drive. A larger error gets a larger correction. To continue the
cruise control analogy, if you are set to 60 MPH and encounter a small hill, the speed drops to say, 58 MPH. The controller will nudge the throttle open until the speed begins returns to normal. It
will then close the throttle a little to return to cruising.

The limitation of proportional control is that real life invades and the whole system's resonance enters into play. While the throttle is being nudged open the speed continues to drop. The
controller keeps opening the throttle until the car begins to speed up again. As the speed approaches 60, the throttle is closed (subject to its own compounding delays) but the car acclerates past
60, maybe only to 61. The controller now backs off the throttle until the car begins to slow again. It will probably slow down too much and start the whole thing over, especially once you crest the

The Integral and Derivative elements of the PID control algorithm are meant to compensate for these resonances and it is this math that I don't have a firm grip on...

Incidentally, you can find MANY examples of PID-type of controls in just about everything. Gas meter, welding and other presure regulators are simple proportional controllers. When the gas pressure
on one side of a diaphram decreases below the combined pressure represented by the compression of a spring and the gas on the other side, the diaphram moves, opening a valve. The high pressure side
of the gas flows through the valve, equalizing the pressure and closing the valve. The resonance is revealed whenever a high rate of flow occurs. The valve and diaphram will sing from opening and
closing the vavle rapidly. Really nice regulators have viscous dampening of the diaphram, essentially adding the other elements mechanically.

Well, I have waxed poetic long enough... :)


More information about the DPRG mailing list