- •Distributed Control Systems (DCS)
- •Fieldbus control
- •Practical PID controller features
- •Manual and automatic modes
- •Output and setpoint tracking
- •Alarm capabilities
- •Output and setpoint limiting
- •Security
- •Digital PID algorithms
- •Introduction to pseudocode
- •Position versus velocity algorithms
- •Note to students
- •Proportional plus integral control action
- •Proportional plus derivative control action
- •Full PID control action
- •Review of fundamental principles
- •Process dynamics and PID controller tuning
- •Process characteristics
- •Integrating processes
- •Runaway processes
- •Lag time
- •Multiple lags (orders)
- •Dead time
- •Hysteresis
- •Before you tune . . .
- •Identifying operational needs
- •Identifying process and system hazards
- •Identifying the problem(s)
- •Final precautions
- •Quantitative PID tuning procedures
- •Heuristic PID tuning procedures
- •Features of P, I, and D actions
- •Tuning recommendations based on process dynamics
- •Tuning techniques compared
- •Tuning a liquid level process
- •Tuning a temperature process
- •Note to students
- •Electrically simulating a process
- •Simulating a process by computer
- •Review of fundamental principles
- •Basic process control strategies
- •Supervisory control
- •Cascade control
- •Ratio control
- •Relation control
- •Feedforward control
- •Load Compensation
- •Proportioning feedforward action
- •Feedforward with dynamic compensation
- •Dead time compensation
- •Lag time compensation
- •Lead/Lag and dead time function blocks
- •Limit, Selector, and Override controls
- •Limit controls
30.6. NOTE TO STUDENTS |
2493 |
After some experimenting, the values I arrived at were 3 (gain), 5 minutes (integral), and 0.5 minutes (derivative). These tuning values represent a proportional action only one-third as aggressive as the Ziegler-Nichols recommendation, and an integral action about half as aggressive as the ZieglerNichols recommendation. The results of these tuning values in automatic mode are shown here:
As you can see, the system’s response has almost no overshoot (with either a 10% setpoint change or a 15% setpoint change) and very little “noise” on the output trend. Response to setpoint changes is relatively crisp considering the naturally slow nature of the process: each new setpoint is achieved within about 7.5 minutes of the step-change.
30.6Note to students
Learning how to tune PID controllers is a skill born of much practice. Regardless of how thoroughly you may study the subject of PID control on paper, you really do not understand it until you have spent a fair amount of time actually tuning real controllers.
In order to gain this experience, though, you need access to working processes and the freedom to disturb those processes over and over again. If your school’s lab has several “toy” processes built to facilitate this type of learning experience, that is great. However, your learning will grow even more if you have a way to practice PID tuning at your own convenience.
2494 |
CHAPTER 30. PROCESS DYNAMICS AND PID CONTROLLER TUNING |
30.6.1Electrically simulating a process
Thankfully, there is a relatively simple way to build your own “process” for PID tuning practice. First, you need to obtain an electronic single-loop PID controller40 and connect it to a resistorcapacitor network such as this:
Single-loop
PID controller
|
PV |
|
|
|
SP |
|
|
|
Out |
|
|
A/M |
|
|
|
|
|
10 kΩ |
10 kΩ |
Input |
Output |
250 Ω |
|
|
|
1000 μF |
1000 μF |
The 250 Ω resistor converts the controller’s 4-20 mA signal into a 1-5 VDC signal, which then drives the passive integrator (lag) RC networks. The two stages of RC “lag” simulate a self-regulating process with a second-order lag and a steady-state gain of 1. The potentiometers establish the lag times for each stage, providing a convenient way to alter the process characteristics for more tuning practice. Feel free to extend the circuit with additional RC lag networks for even more delay (and an even harder-to-tune process!).
Since this simulated “process” is direct-acting (i.e. increasing manipulated variable signal results in an increasing process variable signal), the controller must be configured for reverse action (i.e. increasing process variable signal results in a decreasing manipulated variable signal) in order to achieve negative feedback. You are welcome to configure the controller for direct action just to see what the e ects will be, but I assure you control will be impossible: the PV will saturate beyond 100% or below 0% no matter how the PID values are set.
40Many instrument manufacturers sell simple, single-loop controllers for reasonable prices, comparable to the price of a college textbook. You need to get one that accepts 1-5 VDC input signals and generates 4-20 mA output signals, and has a “manual” mode of operation in addition to automatic – these features are very important! Avoid controllers that can only accept thermocouple inputs, and/or only have time-proportioning (PWM) outputs. Additionally, I strongly recommend you take the time to experimentally learn the actions of proportional, integral, and derivative as outlined in section 29.16 beginning on page 2403 before you embark on any PID tuning exercises.
30.6. NOTE TO STUDENTS |
2495 |
30.6.2Building a “Desktop Process” unit
A more sophisticated approach to gaining hands-on experience tuning PID controllers is to actually build a working “process” that the controller can regulate. A relatively simple way to do this for students is to build what I like to call Desktop Processes, where a loop controller is used to control the speed of a motor/generator set made from small DC “hobby” electric motors. An illustration of a “Desktop Process” is shown here:
Controller |
|
PV |
|
SP |
|
Out |
|
A/M |
Motor command |
|
|
|
signal |
4-20 mA output |
Two-wire cable |
1-5 V input |
|
To source of power
Variable-speed
drive (VSD)
Power
Load
Motor
Sig In
Tach In
Tach
Tach Out
Two-wire cable
Motor speed signal
2496 |
CHAPTER 30. PROCESS DYNAMICS AND PID CONTROLLER TUNING |
You must build your own variable-speed drive (VSD) circuit to convert the controller’s 4-20 mA output signal into a DC voltage powerful enough to drive the motor. This same circuit should also contain components for “scaling” and filtering the tachogenerator’s DC voltage signal so it may be read by the controller’s input. Fortunately, the following circuit is a proven and simple design for doing just that:
|
|
|
|
Gnd |
+24 V supply |
|
|
|
|
PWM motor drive circuit |
|
|
|
Load on |
|
||
|
(2010) Tony R. Kuphaldt |
|
|
|
|
|
||
|
|
|
|
TP4 |
In |
Gnd |
|
|
|
|
|
|
LM7812 |
|
|||
|
|
|
TP3 |
|
|
Out |
|
|
|
|
|
|
|
|
+12 V |
|
|
|
10 kΩ |
TP5 |
10 kΩ |
1 kΩ |
1 kΩ |
Vcc |
RST |
10 μF |
|
Ref adj |
|
(each) |
|
|
555 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Disch |
Out |
|
|
|
|
+ |
|
|
Thresh |
|
|
|
+5 V ref |
|
1/4 LM339 |
|
|
|
Ctrl |
|
TP1 |
|
− |
|
|
Trig |
|
||
|
|
|
|
|
|
|||
10 μF |
1 kΩ |
|
|
|
0.33 μF |
|
Gnd |
|
(each) |
|
+ |
|
|
|
|
||
|
|
|
|
|
|
Load |
||
|
|
|
1/4 LM339 |
|
|
|
|
|
|
+1 V ref |
|
− |
|
|
|
|
terminals |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 kΩ |
|
|
|
|
|
This circuit inputs either a 4-20 mADC or |
|
|
|
|
|
|
|
|
||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ |
|
|
|
|
|
a 1-5 VDC analog signal and generates a |
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1/4 LM339 |
|
|
|
|
|
0-100% duty cycle PWM pulse to trigger a |
|
|
|
|
|
|
|
|
||||||||||||
Sig in |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
− |
|
|
|
|
|
power MOSFET to drive a DC load. |
|
|
|
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dir/Rev |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Gnd |
|
|
|
|
|
Cur/Vol |
|
|
|
|
|
|
|
− |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IRF530 |
|
|
|
|
|
|
|
|
||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TP2 |
|
|
|
|
|
|
|
|
||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1/4 LM339 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ |
TP0 = Ground |
|
|
|
|
|
|
|
|
|||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 kΩ |
|
|
|
|
|
|
|
|
||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TP1 = +5.0 volt reference (adjust "Ref adj") |
|
|
|
|
|
|
|
|
||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(each) |
|
|
|
|
|
|
|
|
||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TP2 = PWM output signal to MOSFET gate (high = power on to load) |
|
|
|
|
|
|
|
|
|||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TP3 = +12.0 volt power supply rail (for IC chips) |
|
|
|
|
|
|
|
|
|||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TP4 = Unregulated +V power supply rail |
|
|
|
|
|
|
|
|
|||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TP5 = Sawtooth oscillator waveform (peaks at +1.0 V and +5.0 V) |
|
|
|
|
|
|
|
|
|||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tach in |
Tach out |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 kΩ |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tachogenerator |
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tach adj |
|||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 μF |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
terminals |
|||
Gnd |
|
|
|
|
|
|
TP0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Gnd |
|||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Diodes included in this design protect against reverse-polarity power supply connections and inductive “kickback” resulting from de-energizing inductive loads.
30.6. NOTE TO STUDENTS |
2497 |
Photographs showing a complete “Desktop Process” unit in operation, including close-ups of the motor/generator set and the variable speed drive circuit board, appear here:
As you can see from the photograph, the motor and generator are held in a short length of split
2498 |
CHAPTER 30. PROCESS DYNAMICS AND PID CONTROLLER TUNING |
PVC pipe. This is a simple way to clamp and align both machines so their shafts turn on the same centerline. The coupling between the two shafts is nothing more than a piece of rubber tube (or wire insulation, or heat-shrink tubing, or even electrical tape!).
An optional accessory to add to a Desktop Process is a data acquisition unit capable of measuring the DC voltage motor speed and controller output signals, plotting them on a computer display for further analysis. This becomes very useful when fine-tuning PID response, allowing students to visually recognize oscillation, overshoot, windup, and other phenomena of closed-loop control.
The controller model shown in these photographs happens to be a Siemens 353, but any loop controller capable of receiving a 1-5 volt DC input signal and generating 4-20 mA DC output signal will work just fine. In fact, I’ve connected this very same VSD and motor/generator set to di erent controllers41 to compare operation.
Interesting experiments to perform with a Desktop Process – other than PID tuning practice – include the following:
•Introducing process loads by touching the spinning motor shaft (slowing it down using your finger) and compare the responses between the controller’s “manual” and “automatic” modes. This proves to be a very e ective way for students to comprehend the di erence between these two modes of operation. I have yet to encounter a student who does not immediately grasp the concept after doing this experiment for themselves, feeling the motor’s shaft speed respond to their finger load in both modes, also watching the controller’s output response.
•Switching the controller mode from reverse action to direct action to see how a process “runs away” when the loop feedback is positive rather than negative.
•Switching the VSD action from direct to reverse, then reconfiguring the controller’s action to complement it, maintaining negative feedback in the system.
•Try switching between auto and manual modes in the controller, comparing the response with and without the feature of setpoint tracking. Again, this is a concept many students struggle to grasp in theory, but immediately comprehend when they see it in action.
41Among these di erent controllers were a Distech ESP-410 building (HVAC) controller and a small PLC programmed with a custom PID control algorithm. In fact, a Desktop Process is ideal for courses where students create their own control algorithms in PLC or data acquisition hardware. The significance of controller scan rate becomes very easy to comprehend when controlling a process like this with such a short time constant. The contrast between a DDC controller with a 500 millisecond scan rate and a PLC with a 50 millisecond scan rate, for example, is marked.