Electronic – how to map a pid controller to a process

controlcontrol systempid controller

How do you "map" the output of a PID controller to a process?

Say you have a resistor, a thermometer, and a PID controller. The thermometer provides feedback, and the PID controller can control the electric current of the resistor. You want the resistor to run at X degrees, so you use the PID to regulate the current going through the resistor.

Do you connect the PID such that the controller sets the current to a certain level, or do you connect the PID such that the controller adds/subtracts current to the instantaneous current to reach the desired level?

That is, does a PID's output directly control the process output or does the controller's output keep changing a processes output to reach a desired level?


EDIT: Whooo man, did I write this? I asked this question 2 years ago when I was first fiddling around with a PID. Now, I can barely understand what I was asking. At any rate, @spehro pefhany's answer provided what I think I was looking for back then: a comparison of position- vs velocity-based control.control.

Best Answer

Do you connect the PID such that the controller sets the current to a certain level, or do you connect the PID such that the controller adds/subtracts current to the instantaneous current to reach the desired level?

There are different PID algorithms that do either of those two things. The latter type is called a velocity algorithm (because it controls the velocity of a hypothetical mechanical valve motion rather than the position of the valve). Since the valve performs the integration there were once some advantages to this method- for one thing it automatically stops integrating when the actuator hits the limit, which helps with overshoot due to integrator windup. However, if you are using derivative control it must be double differentiated- which tends to make that contribution very noisy.

By the way, controlling the current through the resistor is usually not a good idea. What you want to do (typically) is to control the power. The resulting nonlinearity from voltage control will usually make the controller hard to tune well over a range of setpoints (it will either be too sluggish or not stable enough).