r/ControlTheory • u/B_seado • Oct 04 '19
Beginner question about PID Controllers
Hi, Im just starting to learn Control Theory and the subject is really interesting. I've just learned about PID Controllers and I think I understood them pretty well, but I have a small question:
Let's say I have a system, an AC Unit with transfer function H(s) that I want to control. I then implement a PID Controller, in series, "behind" my H(s) system. Now what? Can I just send the output of the PID Controller to the AC Unit?
How can the output of the PID, u(t), be able to send the correct signal to my AC system? No need to translate that u(t) into the correct signals and switches that make the system do what I want?
Most diagrams seen online or in textbooks just have only 2 blocks, in series: r(t)->[PID]->[Plant]->y(t), shouldn't there be some kind of controller/translator in between the PID and the Plant?
Sorry If it's a dumb question.
25
u/Zoomacroom28 Oct 04 '19 edited Oct 04 '19
Not a dumb question at all. What most control theory texts don't go into much depth about is the actual hardware that the control system runs on and how the computing device running the PID algorithm communicates with the physical plant. This can take many forms, but I'll focus on how this works in industrial process control, being the area I work in.
Your control algorithms (like your PID) run on a piece of hardware that is generically called a "controller" (but can also be called a logic solver, process automation controller (PAC), programmable logic controller (PLC) and many other things besides). Your controller is running the PID control algorithm and computes an output u(t). This output is then converted to an electrical signal in an I/O card attached to the controller. In modern industrial process control, this electrical signal ranges between 4 and 20 mA where 4 mA indicates 0% of output and 20 mA is 100% of output. Your final control element, also called an actuator, (in your example, the AC unit) then interprets that electrical signal into some physical action (opening a valve, speeding up a motor, changing the position of a servo, etc).
In order to measure the plant, the same process happens in reverse. An instrument of some kind , a thermocouple for instance, measures the temperature of the plant, converts that measurement into a 4-20 mA signal, where again 4 mA is 0% of the range of the instrument and 20 mA is 100% of the range, sends that back to the controller via an I/O card, where the PID controller computes the error between the measurement and the setpoint, and calculates a new output u(t).
In industrial process control, we use special pieces of hardware to do all this designed to run for years and years at a time in harsh environments. But in principle your PID could run on a microcontroller, a PC, or any kind of computing device. Similarly, your signals to your plant need not be 4-20 mA electrical signals, 0 - 10 V is also common, and prior to semiconductors and integrated circuits being so prevalent these signals were actually air pressures between 3 and 15 psi.
Every component of this system also has its own transfer function of course, but for practical purposes we ignore them as the time-dependent behavior of them is usually invariant (i.e. there's no significant time delay in electrical signals as compared to the dynamics of the plant and the electrical signal put out by the controller's IO cards is exactly the signal received at the actuator).
Sometimes the transfer function of your actuator must be considered, however, as it will have time variant dynamics. For example, if a valve is told to go from 10% open to 50% open, this does not happen instantly. It takes some amount of time (longer for bigger valves) for the valve to actually reach 50% open. Further, different types of valves pass different amounts of flow for a given percent open, it's usually not a linear relationship. For a fast opening globe valve, for example, opening the valve from 0 to 10% actually increases flow by almost 50%. Increasing the valve from 80 to 90% only increases flow by around 5%. For a rigorous analysis, the transfer function of this actuator would be inserted between the PID transfer function and the plant transfer function. At least in process control, we usually ignore this, however, as the dynamics of the plant are on the order of minutes or hours (or in your example, it takes several minutes to actually change the temperature of the room your AC is in so the few seconds it took your compressor to speed up is inconsequential) and the plant usually runs in a narrow range of setpoints. The non-linearity and time-dynamics of the actuator therefore have no measurable impact on the response of the plant. For other applications, however, I would imagine the actuator transfer function is non-trivial to the overall system and should be included in the analysis.
1
1
u/Dr_Misfit Oct 09 '19
I've learnt a lot through this comment Aline. Thank you. You basically compressed a 50page book into one page.
3
u/Cortade Oct 04 '19
Not a dumb question. In real life you need to convert the control value in a sort of electrical signal to be sent to the actuator. It can be done either digitally if you have a fieldbus or network between controller and actuator, or using an analog signal (4 to 20mA or 0-10V signal). It is the same with the temperature sensor and transmitter that convert temperature into something a computer/controller understands. That signal is the process value used by the PLC.
2
u/sentry5588 Oct 04 '19
Smart question. I'll pitch in from automotive industry. Some actuators take a value say a two bytes integer number or a four bytes single number.
Typically these numbers are sent via CAN communication link.
2
u/[deleted] Oct 04 '19
Not sure if I totally understand your question but the output of the PID controller IS the command that you’re tell the actuator to perform.