2
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ What do you mean by 'map'? The PID input is the error, which is the difference between required and actual temperatures - both of which are normally represented by direct voltage levels. The PID output drives some form of amplifier that adjusts the voltage across the resistor (or current through, depending on amplifier type). There is a nonlinear relationship between resistor voltage and temperature, but the closed loop will deal with it. \$\endgroup\$ – Chu Jul 21 '15 at 6:46
  • \$\begingroup\$ @Chu I didn't phrase my question very well. I'm confused on how to connect the output of a PID to a process. Will the PID output always be amplified? Or will there be some function that converts PID output to process output? Or does it all depend on the system? \$\endgroup\$ – techSultan Jul 21 '15 at 14:04
  • \$\begingroup\$ The PID output will usually be a low power signal from a DAC that will need some form of amplification. For the system you describe it may be convenient to use a current source. \$\endgroup\$ – Chu Jul 21 '15 at 15:44
3
\$\begingroup\$

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).

|improve this answer|||||
\$\endgroup\$
0
\$\begingroup\$

If you consider current as your output then it "keeps changing" as you say. However if temperature of the resistor is your output then it keeps it at desired level. That is what PID is for. Your feedback should be your temperature and your input is "feedback - desired level" (which is called 'error'). PID deals with current, you don't.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ Yes, but how should I connect the PID to my system? Will the output of the PID = current, or is there some function that converts PID output to the necessary current? I'm confused on how to connect the PID output to my process (which isn't this thermometer/current example). \$\endgroup\$ – techSultan Jul 21 '15 at 14:06
  • \$\begingroup\$ Do you know the transfer function of your system? You need to obtain the transfer function of the system and that function will give you the idea of how the current is related to the temperature. And yes, output of the PID is current. \$\endgroup\$ – zgrkpnr89 Jul 22 '15 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.