Close Loop Control Sys Intro
Close Loop Control Sys Intro
Most control systems utilize feedback in some manner. Here's a look at several
fundamental feedback mechanisms, culminating in a description of a basic PID
controller.
Many real-time embedded systems make control decisions. These decisions are usually
made by software and based on feedback from the hardware under its control (termed the
plant). Such feedback commonly takes the form of an analog sensor that can be read via
an A/D converter. A sample from the sensor may represent position, voltage,
temperature, or any other appropriate parameter. Each sample provides the software with
additional information upon which to base its control decisions.
Systems that utilize feedback are called closed-loop control systems. The feedback is
used to make decisions about changes to the control signal that drives the plant. An open-
loop control system doesn't have or doesn't use feedback.
A basic closed-loop control system is shown in Figure 1. This figure can describe a
variety of control systems, including those driving elevators, thermostats, and cruise
control.
-1-
ABB Close Loop Control Concept
change, another sample is taken, and the cycle repeats. Eventually, the plant should reach
the desired state and the software will cease making changes.
If feedback indicates that the temperature in your home is below your desired setpoint,
the thermostat will turn the heater on until the room is at least that temperature. Similarly,
if your car is going too quickly, the cruise control system can temporarily reduce the
amount of fuel fed to the engine.
Bang bang
How much should the software increase or decrease the drive signal? One option is to
just set the drive signal to its minimum value when you want the plant to decrease its
activity and to its maximum value when you want the plant to increase its activity. This
strategy is called on-off control, and it is how many thermostats work.
On-off control doesn't work well in all systems. If the thermostat waits until the desired
temperature is achieved to turn off the heater, the temperature may overshoot. See Figure
2. The same amount of overshoot and ripple probably isn't acceptable in an elevator.
P * (desired - current)
For example, if the drive signal uses PWM, it can take any value between 0% and 100%
duty cycle. If the signal on the drive is 20% duty cycle and the error remaining at the
output is small, we may just need to tweak it to 18% or 19% to achieve the desired output
at the plant.
-2-
ABB Close Loop Control Concept
If the proportional gain is well chosen, the time the plant takes to reach a new setpoint
will be as short as possible, with overshoot (or undershoot) and oscillation minimized.
Unfortunately, proportional control alone is not sufficient in all control applications. One
or more of the requirements for response time, overshoot, and oscillation may be
impossible to fulfill at any proportional gain setting.
A derivative alternative
The biggest problem with proportional control alone is that you want to reach new
desired outputs quickly and avoid overshoot and minimize ripple once you get there.
Responding quickly suggests a high proportional gain; minimizing overshoot and
oscillation suggests a small proportional gain. Achieving both at the same time may not
be possible in all systems.
Fortunately, we do generally have (or can derive) information about the rate of change of
the plant's output. If the output is changing rapidly, overshoot or undershoot may lie
ahead. In that case, we can reduce the size of the change suggested by the proportional
controller.
The rate of change of a signal is also known as its derivative. The derivative at the current
time is simply the change in value from the previous sample to the current one. This
implies that we should subtract a change of:
D * (current - previous)
where D is a constant derivative gain. The only other thing we need to do is to save the
previous sample in memory.
In practice, proportional-derivative (PD) controllers work well. The net effect is a slower
response time with far less overshoot and ripple than a proportional controller alone.
Integration
A remaining problem is that PD control alone will not always settle exactly to the desired
output. In fact, depending on the proportional gain, it's altogether possible that a PD
controller will ultimately settle to an output value that is far from that desired.
The problem occurs if each individual error remains below the threshold for action by the
proportional term. (Say the error is 3, P = 1/8, and integer math is used.) The derivative
term won't help anything unless the output is changing. Something else needs to drive the
plant toward the setpoint. That something is an integral term.
An integral is a sum over time, in this case the sum of all past errors in the plant output:
-3-
ABB Close Loop Control Concept
Even though the integral gain factor, I, is typically small, a persistent error will
eventually cause the sum to grow large and the integral term to force a change in the
drive signal. In practice, the accumulated error is usually capped at some maximum and
minimum values.
In summary, on-off and proportional control are the two basic techniques of closed-loop
control. However, derivative and/or integral terms are sometimes added to porportional
controllers to improve qualitative properties of a particular plant's response. When all
three terms are used together, the acronym used to describe the controller is PID
temperature will be measured by a temperature sensor and fed into a control device. In
the case of changes in the outdoor temperature ( disturbance ) the control device
adjusts the heating flow according to the characteristic of Figure 1.2 using
the motor M and the valve V. The slope of this characteristic can be tuned at the control
device. If the room temperature is changed by opening a window ( disturbance )
this will not influence the position of the valve, because only the outdoor temperature
will influence the heating flow. This control principle will not compensate the effects of
all disturbances.
-4-
ABB Close Loop Control Concept
Figure 1.2: Characteristic of a heating control device for three different tuning sets (1, 2,
3)
In the case of closed-loop control of the room temperature as shown in Figure 1.3 the
room temperature is measured and compared with the set-point value , (e.g.
). If the room temperature deviates from the given set-point value, a controller
(C) alters the heat flow . All changes of the room temperature , e.g. caused by
opening the window or by solar radiation, are detected by the controller and removed.
The block diagrams of the open-loop and the closed-loop temperature control systems are
shown in Figures 1.4 and 1.5, and from these the difference between open- and closed-
loop control is readily apparent.
Figure 1.4: Block diagram of the open-loop control of the heating system
-5-
ABB Close Loop Control Concept
Figure 1.5: Block diagram of the closed-loop control of the heating system
Comparing open-loop control with closed-loop control the following differences are seen:
Closed-loop control
Open-loop control
Systems in which the output quantity has no effect upon the process input quantity are
called open-loop control systems.
Systems in which the output has an effect upon the process input quantity in such a
manner as to maintain the desired output value are called closed-loop control systems
-6-
ABB Close Loop Control Concept
-7-