Ron Beaufort
Lifetime Supporting Member
Just for beginners who aren’t even sure how to spell PID ...
This post is written in response to several questions that I’ve received by emails and by phone calls from people who are obviously too sensitive to publicly post the basic question: “Just what the heck is PID anyway?” The common complaint is that as soon as the subject of PID comes up, the discussion immediately turns to “tuning” and “update times”, etc. It seems that some beginners don’t have ANY idea of what this subject is all about. In other words: “Tune it? I don’t even know what it is!”
Disclaimer: This material is NOT intended to cover PID in any serious detail. There are many things (yes, even important things) which I have been forced to leave out in order to keep this from being completely overwhelming. And so this is intended just as a starting point. I’m sure that many people will read this and say: “Forget it - I’m sorry I asked”. Still, for those poor souls who have no idea what the PID mystery is all about - and yet who really want to know - here is a brief overview. I offer it for what it’s worth.
Let’s start with an analogy. Suppose that my precious little wife has a nice new Buick automobile. This big Buick has plenty of power. I, on the other hand, drive a little red truck which doesn’t have much power at all. Each of these vehicles has a cruise control system. The cruise control in my wife’s car works fine - but the cruise control in my truck is broken.
[attachment]
Figure A starts out with my wife driving along on a level road. The cruise control is keeping the Buick’s speed at a steady 50 mph. Then at point “H” on the graph, the car starts to go up over a little hill. The car’s speed (the red line) starts to decrease a little bit - but then the cruise control system quickly adjusts the amount of gas to the engine - and within just a few seconds the speed is back at 50 mph. Wanda Faye is happy.
Next suppose that I decide to fix the cruise control in my truck by robbing parts from my wife’s car. I find a small plastic box under the dashboard of each vehicle. The boxes are identical - but mine has a definite “burnt up” smell to it. I unplug the box from my wife’s car - and then plug it into my truck. As I’m doing this, I notice three little adjustment screws on each box. One screw is marked “P” - the next screw is marked “I” - and the last screw is marked “D”. I’m not sure what these screws are for - so I just leave them at their factory settings. Now I’m ready to try out “my” cruise control and see if it works.
Figure B starts out with my truck moving along on a level road. The cruise control is keeping the truck’s speed at a steady 50 mph. Then at point “H” on the graph, the truck starts to go up over a little hill. The truck’s speed (the red line) starts to decrease a little bit - and then the cruise control system starts to increase the amount of gas to the engine. The problem is that the cruise control is still adjusted (or “tuned” we might say) for the performance of my wife’s big powerful Buick. Remember, my truck has very little power - and so it needs a LOT more gas in order to maintain a constant speed of 50 mph while going up that hill. Figure B shows the “sluggish” response as the cruise control finally - eventually - tediously - gets the speed back on target. I find this slow response to be genuinely annoying.
Next suppose that I decide to adjust the P, I, and D screws on the little box. I turn one screw clockwise a few notches - and another screw counterclockwise a few notches - and keep experimenting by driving up that same little hill again - and again - and again. After several days of adjusting, I decide that the response shown in Figure C is as good as it’s going to get. Sure it’s not quite as good as the response shown in Figure A - but then my little truck has a lot less power than the Buick - and so I really can’t expect to get the same crisp response.
Now suppose that my wife finally decides that she wants her Buick’s cruise control system to work again. So I take the little box out of my truck and reinstall it back into her car. But - big mistake - I forget to readjust the P, I, and D screws. I simply leave them “tuned” for the characteristics of my little truck.
Figure D starts out with my wife driving along on a level road. The cruise control is keeping the Buick’s speed at a steady 50 mph. Then at point “H” on the graph, the car starts to go up over a little hill. The car’s speed (the red line) starts to decrease a little bit - and then the cruise control system increases the amount of gas to the engine. The problem is that the gas isn’t being increased “just enough” for the Buick’s response. Instead, the cruise control pumps in the large amount of gas required to get MY LITTLE TRUCK up the hill at a constant 50 mph. Of course, this is WAY TOO MUCH gas for the big powerful Buick. As the car’s speed suddenly increases it “overshoots” the target and goes much too fast. Next, the cruise control tries to compensate by letting up on the gas - but now the speed drops way too low. Again, the poor cruise control tries to compensate by increasing the gas - and look at the runaway oscillations which result. Believe me, Wanda Faye is NOT happy with the performance of her cruise control.
Luckily I was smart enough to mark the Buick’s original factory settings for the P, I, and D screws before I messed around with them. So I retune the system to match the Buick’s response and we’re back to the conditions shown in Figure A.
What we’ve seen so far: Different systems (vehicles in our analogy) have different operating characteristics. To get adequate control, the controller has to be “tuned” so that its response matches the characteristics of the specific system being controlled.
[continued in next post]
This post is written in response to several questions that I’ve received by emails and by phone calls from people who are obviously too sensitive to publicly post the basic question: “Just what the heck is PID anyway?” The common complaint is that as soon as the subject of PID comes up, the discussion immediately turns to “tuning” and “update times”, etc. It seems that some beginners don’t have ANY idea of what this subject is all about. In other words: “Tune it? I don’t even know what it is!”
Disclaimer: This material is NOT intended to cover PID in any serious detail. There are many things (yes, even important things) which I have been forced to leave out in order to keep this from being completely overwhelming. And so this is intended just as a starting point. I’m sure that many people will read this and say: “Forget it - I’m sorry I asked”. Still, for those poor souls who have no idea what the PID mystery is all about - and yet who really want to know - here is a brief overview. I offer it for what it’s worth.
Let’s start with an analogy. Suppose that my precious little wife has a nice new Buick automobile. This big Buick has plenty of power. I, on the other hand, drive a little red truck which doesn’t have much power at all. Each of these vehicles has a cruise control system. The cruise control in my wife’s car works fine - but the cruise control in my truck is broken.
[attachment]
Figure A starts out with my wife driving along on a level road. The cruise control is keeping the Buick’s speed at a steady 50 mph. Then at point “H” on the graph, the car starts to go up over a little hill. The car’s speed (the red line) starts to decrease a little bit - but then the cruise control system quickly adjusts the amount of gas to the engine - and within just a few seconds the speed is back at 50 mph. Wanda Faye is happy.
Next suppose that I decide to fix the cruise control in my truck by robbing parts from my wife’s car. I find a small plastic box under the dashboard of each vehicle. The boxes are identical - but mine has a definite “burnt up” smell to it. I unplug the box from my wife’s car - and then plug it into my truck. As I’m doing this, I notice three little adjustment screws on each box. One screw is marked “P” - the next screw is marked “I” - and the last screw is marked “D”. I’m not sure what these screws are for - so I just leave them at their factory settings. Now I’m ready to try out “my” cruise control and see if it works.
Figure B starts out with my truck moving along on a level road. The cruise control is keeping the truck’s speed at a steady 50 mph. Then at point “H” on the graph, the truck starts to go up over a little hill. The truck’s speed (the red line) starts to decrease a little bit - and then the cruise control system starts to increase the amount of gas to the engine. The problem is that the cruise control is still adjusted (or “tuned” we might say) for the performance of my wife’s big powerful Buick. Remember, my truck has very little power - and so it needs a LOT more gas in order to maintain a constant speed of 50 mph while going up that hill. Figure B shows the “sluggish” response as the cruise control finally - eventually - tediously - gets the speed back on target. I find this slow response to be genuinely annoying.
Next suppose that I decide to adjust the P, I, and D screws on the little box. I turn one screw clockwise a few notches - and another screw counterclockwise a few notches - and keep experimenting by driving up that same little hill again - and again - and again. After several days of adjusting, I decide that the response shown in Figure C is as good as it’s going to get. Sure it’s not quite as good as the response shown in Figure A - but then my little truck has a lot less power than the Buick - and so I really can’t expect to get the same crisp response.
Now suppose that my wife finally decides that she wants her Buick’s cruise control system to work again. So I take the little box out of my truck and reinstall it back into her car. But - big mistake - I forget to readjust the P, I, and D screws. I simply leave them “tuned” for the characteristics of my little truck.
Figure D starts out with my wife driving along on a level road. The cruise control is keeping the Buick’s speed at a steady 50 mph. Then at point “H” on the graph, the car starts to go up over a little hill. The car’s speed (the red line) starts to decrease a little bit - and then the cruise control system increases the amount of gas to the engine. The problem is that the gas isn’t being increased “just enough” for the Buick’s response. Instead, the cruise control pumps in the large amount of gas required to get MY LITTLE TRUCK up the hill at a constant 50 mph. Of course, this is WAY TOO MUCH gas for the big powerful Buick. As the car’s speed suddenly increases it “overshoots” the target and goes much too fast. Next, the cruise control tries to compensate by letting up on the gas - but now the speed drops way too low. Again, the poor cruise control tries to compensate by increasing the gas - and look at the runaway oscillations which result. Believe me, Wanda Faye is NOT happy with the performance of her cruise control.
Luckily I was smart enough to mark the Buick’s original factory settings for the P, I, and D screws before I messed around with them. So I retune the system to match the Buick’s response and we’re back to the conditions shown in Figure A.
What we’ve seen so far: Different systems (vehicles in our analogy) have different operating characteristics. To get adequate control, the controller has to be “tuned” so that its response matches the characteristics of the specific system being controlled.
[continued in next post]