Embedded Systems and Control Systems': An Open-Loop Controller
Embedded Systems and Control Systems': An Open-Loop 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 analogue 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.
sensors: radar altimeter; GPS; shaft encoder, strain gauge; accelerometer; tachometer; microphone;
pressure and temperature transducers; chemical sensors; micro-switch
actuators: hydraulic, pneumatic, electric motors; pumps; heaters; aircraft control surfaces; voice
coil; solenoid; piezo-electric transducer
disturbances: wind gusts; earthquakes; external shaking and vibration; road surface variations;
variation in feed material
control processors: human operator; mechanical; electro-mechanical; analog electrical; general
purpose digital processor; special purpose digital processor
Example
a plate is to be heated to a desired temperature T des by an electrical heater the plant is the plate the
actuator is the electrical heater the controller sets the heater power, given T des the input u is the
heater power P the output y is the plate temperature T. In steady-state, T = T amb + (P + D)
D is a thermal disturbance to the plate, D ~W (represents other heat flow, in or out of plate)
Example:
A car has a throttle whose position u can vary from 0 to 45 degrees.
Measurements: with the car travelling at 50mph and the throttle set to 30 degrees, we quickly
change the throttle to 40 degrees. And measure the car’s speed every second until the car reaches
the steady speed. Repeat with different initial speeds and initial throttle angle. Suppose we found
that the speed is given as:
vt 1 0.7vt 0.5u t
Controller: suppose that the only input to the controller is the desired speed r. The controller’s
behaviour is a function of the commanded speed r, so that the throttle position u = F(r). Let us
assume that F is a simple function of the form:
u= P*r
In steady state, v ss vt 1 vt
The controller merely multiplies the desired speed r by 0.6 to determine the desired throttle angle.
Closed-loop control systems typically operate at a fixed frequency. The frequency of changes to the
drive signal is usually the same as the sampling rate, and certainly not any faster. After reading each
new sample from the sensor, the software reacts to the plant's changed state by recalculating and
adjusting the drive signal. The plant responds to this 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 set-point, 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.
A feedback control system often uses a function of a prescribed relationship between the output and
reference input to control the process. Often the difference between the output of the process
under control and the reference input is amplified and used to control the process so that the
difference is continually reduced. The feedback concept has been the foundation for control system
analysis and design.
A closed-loop control system uses a measurement of the output and feedback of this signal to
compare it with the desired output (reference or command). Due to the increasing complexity of the
system under control and the interest in achieving optimum performance, the importance of control
system engineering has grown in the past decade. Furthermore, as the systems become more
complex, the interrelationship of many controlled variables must be considered in the control
scheme.
A common example of an open-loop control system is an electric toaster in the kitchen. An example
of a closed-loop control system is a person steering an automobile (assuming his or her eyes are
open) by looking at the auto’s location on the road and making the appropriate adjustments.
The introduction of feedback enables us to control a desired output and can improve accuracy, but it
requires attention to the issue of stability of response.
Example:
Using the open loop control example: the error is computed as: e=r-v
Let the controller be linear and proportional to the error, u= P(r-v), then
v t 1 0.7vt 0.5u t w
Where w is a parameter added to represent the effect of the slope of the surface.
v t 1 0.7vt 0.5 P( rt vt ) wt
0.7 0.5 P 1
0.5P w0
v ss ro
0.3 0.5P 0.3 0.5 P
u t 3.3(rt u t )
The controllers come in many different forms. There are standalone systems in boxes for one or a
few loops, which are manufactured by the hundred thousands yearly. PID control is an important
ingredient of a distributed control system. The controllers are also embedded in many special
purpose control systems. PID control is often combined with logic, sequential functions, selectors,
and simple function blocks to build the complicated automation systems used for energy production,
transportation, and manufacturing. Many sophisticated control strategies, such as model predictive
control, are also organized hierarchically. PID control is used at the lowest level; the multivariable
controller gives the set points to the controllers at the lower level. The PID controller can thus be
said to be the “bread and butter’ of control engineering. It is an important component in every
control engineer’s tool box.
We will start by summarizing the key features of the PID controller. The PID algorithm is described
by:
where y is the measured process variable, r the reference variable, u is the control signal and e is the
control error e=ysp-y. The reference variable is often called the setpoint. The control signal is thus a
sum of three terms: the P term (which is proportional to the error), the I term (which is proportional
to the integral of the error), and the D term (which is proportional to the derivative of the error). The
controller parameters are proportional gain K, integral time T i, and derivative time Td. The integral,
proportional and derivative part can be interpreted as control actions based on the past, the present
and the future.
PID controllers have survived many changes in technology, from mechanics and pneumatics to
microprocessors via electronic tubes, transistors, integrated circuits. The microprocessor has had a
dramatic influence on the PID controller. Practically all PID controllers made today are based on
microprocessors. This has given opportunities to provide additional features like automatic tuning,
gain scheduling, and continuous adaptation.