Вы находитесь на странице: 1из 57

+

-
plant
measurement
controller
set point
controlled
variables
2010 March, HK
Prof. Dr. H. Kirrmann
EPFL / ABB Research Center, Baden, Switzerland
Industrial Automation
Automation Industrielle
Industrielle Automation
Control of continuous processes
2.2 Rgulation de systmes continus
Regelung stetiger Strecken
Control 2.2 - 2 Industrial Automation
2.2 Continuous control
2.1 Instrumentation
2.2 Continuous control
2.2.1 Plant modeling
2.2.2 Controllers
2.2.2.1 On/Off (two-point) controller
2.2.2.2 PID controller
2.2.2.3 Nested Controllers
2.3 Programmable Logic Controllers
Control 2.2 - 3 Industrial Automation
Motivation for this chapter
This is an intuitive introduction to automatic control intended for
students who did not enjoy automatic control courses as a preparation for the
PLC programming.

For a correct engineering approach, the courses of Prof. Longchamp and Prof. Bonvin
are highly recommended.

First, modeling of plants is introduced.

Then, the two most popular controllers in industry are presented:

- the two-point controller

- the PID controller

Finally, nested controllers are introduced.
Control 2.2 - 4 Industrial Automation
Open Loop control vs. Closed Loop control
1
2
3
4
5
temperature is imprecise,
depends on ambient temperature and
cooking quantity but heating level and
duration can be modulated
(e.g. let boil and then simmer during 30)
temperature closely controlled,
requires measurement of the output
variable (temperature)
+
-
higher
/lower
temperature sensor
120
140
180
200
220
open loop:
closed loop:
continuous control
sequential control
Control 2.2 - 5 Industrial Automation
Open loop vs. closed loop
output
controller
+
-
plant
state
display
control variable
variable de commande
Stellgrsse
set-point (solicited)
valeur de consigne
Sollwert

plant
measurement
plant state
sequencer
on/off
plant
display
closed-loop control / regulation

(rgulation, Regelung)
keywords: feedback, analog variables,
continuous processes, "process control"
open-loop control / command

(commande / pilotage, Steuern)



keywords: sequential / combinatorial,
binary variables, discrete processes,
"batch control", "manufacturing"
output
error
(deviation)
binary
commands
%
process value
valeur mesure,
Istwert
measurement
clock
Control 2.2 - 6 Industrial Automation
2.2.1 Plant Modeling
2.1 Instrumentation
2.2 Control
2.2.1 Plant modeling
2.2.2 Controllers
2.2.2.1 On/Off (two-point) controller
2.2.2.2 PID controller
2.2.2.3 Nested Controllers
2.3 Programmable Logic Controllers
Control 2.2 - 7 Industrial Automation
Modeling
The first step in analysis of control systems is to know the plant to be controlled.
The second step is define a controller that meets physical and economical requirements

Knowing means express the plants behavior in a mathematical way,
generally as a system of differential equations,

- by analyzing the first physical principles (requires that all elements are precisely known)

- by identifying the plants parameters by analyzing its behavior (output) in response
to an input change.
?
+ / -
what is the effect of increasing thrust ?
Control 2.2 - 8 Industrial Automation
Modeling for regulation: continuous processes
Examples of such processes: drives, ovens, vehicles, chemical reactors
y = F (x, t)
y x
Continuous plants have states which can be described by continuous (analog)
variables (temperature, voltage, speed,...)

The relation between plant input and plant output is called the transfer function.
The transfer function may be described by differential equations

Continuous plants are mostly reversible and monotone: these are the conditions to control them

Reversible means that the output can be brought back to a previous value by acting on the input.

Monotone means that the relation between input and output is such that an input action in one direction
causes always a response in the same direction at the output.

When the system is linear, the differential equations of the transfer function may by transformed by
Laplace to difference equations, simplifying greatly notation and computations

Control 2.2 - 9 Industrial Automation
Example: Electrical motor with permanent magnet
Ue = R i + L + u
i

R L
u
i
[V]
(induced tension)
di
dt
Ue
(command
tension)
u
i
= K
T = K i
d
dt
=
T
J
J [Nms]
(inertia)
T [Nm]
(torque)
[rad/s]
(speed)
d
dt
=
K
J
i
di
dt
=
1
L
(Ue K R i)
motor
i

Ue
=
K
s
2
(LJ) + s (RJ) + K
2

Laplace- transfer, since the plant is linear
Control 2.2 - 10 Industrial Automation
Example: modeling a train
v
dt
dx
=
) ) sin( (
1
2
v C v C
radius
K
m mg F
m dt
dv
f x
c
tract
= o

o
F
tract
mg
mass of the train
plus contribution
of rotating parts
(wheels and rotors)
slope
F
frict
air friction
mechanical
friction
curve
friction
motor force
obtain the relation between applied motor force (current) and the position of a train.
x
Control 2.2 - 11 Industrial Automation
Resulting train model in Matlab
train
inertia
v
position
K
m
C
x
traction force
Fz
C
z
x

friction
air
resistance
v
2
1
m
mgsin(o)
i
C
c
curve friction
slope
radius
taken from
topography database
motor
current
motor

speed
|v|
r(x)
o(x)
a
acceleration
slope

Control 2.2 - 12 Industrial Automation
Help in modeling: use an electrical equivalent
water
ambient-water isolation R
1
water
temperature u
energy U
q
solicited
temperature u
2
ambient
temperature
u
a
R
1
R2
C
C
heater-water
isolation
Heat
resistance R
2
U
a
(ambient temperature)
x ~ u
U
q
U
a
Ux
C R C R
x
dt
dx
2 2
1 1
+ =
heating

cooling

Ua
C R
U
C R C
R R
x
dt
dx
q
2 1
2 1
1 1
)
1 1
(
+ +
+
=
Electrical equivalent

u
a
~ u
a
C Bu Ax
dt
dx
+ + =
E Dx
dt
dx
+ =
controller
Control 2.2 - 13 Industrial Automation
Thermal (solid) vs. electrical model: conductivity
T
2
T
1
q =
(T
2
T
1
)
R
d
A
= (T
2
T
1
)
kA
d
(U
2
U
1
)
R
= (U
2
U
1
)
A
d
U
2
U
1
d
A
i =

= resistivity [Vm]
q = heat flow [J/s = W]

T = temperature [K]

R = thermal resistance [K/W]

k = thermal conductivity [J/m/K]

A = surface [m
2
]

d = distance [m]

i

I = current [A]

U = voltage [V]

R = resistance []

R =
A
d

R =
kA
d
Control 2.2 - 14 Industrial Automation
Thermal (solid) vs. electrical model: capacity
i = C
dt
dU
d
A
C =
d
A
i
U

q = C
dt
dT
C = =
= dielectric constant [F/m]
I = current [A]

U = voltage [V]

C = capacity [F]

V
Cm
Ad
Cm
q = heat flow [J/s = W]

T = temperature [K]

C = thermal capacity [J/K]

Cm = thermal specific [J/K/kg]

A = surface [m
2
]

d = distance [m]

= density [kg/m
3
]


T

d
A
Control 2.2 - 15 Industrial Automation
Plant Identification
Once the model is approximately known, the parameters must be determined by measurements.

Classical methods are the response to a pulse at the input or to a calibrated noise at the input, in
case the command signal varies little. A signal correlation yields the parameters.
unknown plant
test signal
command
input
output
Control 2.2 - 16 Industrial Automation
2.2.2 Controllers
2.1 Instrumentation
2.2 Control
2.2.1 Plant modeling
2.2.2 Controllers
2.2.2.1 On/Off (two-point) controller
2.2.2.2 PID controller
2.2.2.3 Nested Controllers
2.3 Programmable Logic Controllers
Control 2.2 - 17 Industrial Automation
Controllers
Once the plant is known, a controller can be designed to control its output.

If the plant would be perfectly known, no regulation would be needed.

In practice, the plants parameters vary ( e.g. number of passengers in a train),
the plant is subject to disturbances (wind, slope)

The controller needs measuring through sensors the plants state and possibly the
disturbances.

In a general model, the desired behaviour of the plant is just a disturbance.

The controller follows certain quality laws, primarily to stabilize the output within useful
time, not overshoot, minimize energy consumption, etc..
Control 2.2 - 18 Industrial Automation
Human body as a regulator
Example identify a person taking a shower as a control system
plant
command
process value
Istwert
valeur mesure
measurement
y
feed-forward
controller
x
m
disturbances
feed-back
controller
set point
valeur de
consigne
Sollwert
other
constraints:
energy, cost,
cleanness
Control 2.2 - 19 Industrial Automation
Controller loop (boucle de rgulation, Regelschleife)
set-point (solicited
value)
Sollwert
valeur de consigne
(sollicite)
controlled system
Regelstrecke
systme command
command
Stellgre
valeur de commande
error
Regelabweichung
dviation
process value
Istwert
valeur mesure
regulator
Regler
rgulateur
measurement
Messglied
mesure
u
y
the regulator (controller) can be implemented by mechanical elements, electrical elements,
computers,...
not always can the controlled variable be directly measured.
controller
x
m
disturbance
Strgrsse
perturbation
state
Zustand
tat
controlled variable
Regelgrsse
valeur contrle
(possibly invisible)
e
feedback loop
boucle de rtroalimentation
Rckfhrschleife
Control 2.2 - 20 Industrial Automation
Where is that controller located ?
directly in the sensor
or in the actuator
(analog PIDs)
as a separate device (analog PIDs)
(some times combined with a recorder)
as an algorithm in a computer
(that can handle numerous "loops").
actors sensors
set-points
high-end: in a set of possibly redundant
controllers (here: turbine control)
Control 2.2 - 21 Industrial Automation
2.2.2.1 On/Off (two-point) controller
2.1 Instrumentation
2.2 Control
2.2.1 Plant modeling
2.2.2 Controllers
2.2.2.1 On/Off (two-point) controller
2.2.2.2 PID controller
2.2.2.3 Nested Controllers
2.3 Programmable Logic Controllers
Control 2.2 - 22 Industrial Automation
Two-point controller: principle
room set-point
temperature
measured value
thermometer
heater
The two-point controller (or regulator, Zweipunktregler, Rgulateur tout ou rien)
has a binary output: on or off (example: air conditioning)
control
variable
energy
off on
commercial controller with integrated
thermometer
Control 2.2 - 23 Industrial Automation
Two-point controller: time response
0.00
0.20
0.40
0.60
0.80
1.00
1

9

1
7

2
5

3
3

4
1

4
9

5
7

6
5

7
3

8
1

8
9

9
7

Note the different time
constants for heating and
cooling:
this is a non-linear system
If the process is not slow enough, hysteresis or switching period limit are included
to limit switching frequency and avoid wearing off the contactor.

(thermal processes are normally so inertial that no hysteresis is needed)
time
temperature
lower switch point
upper switch point
hysteresis
heating command
(no hysteresis)
heating command
(with hysteresis)
period
Control 2.2 - 24 Industrial Automation
Two-point controller: Input variable as ramp
0.00
0.20
0.40
0.60
0.80
1.00
1.20
0.00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00
time (s)
v
a
l
u
e

Setpoint
Upper bound
Lower bound
Output
%
Control 2.2 - 25 Industrial Automation
2.2.2.2 PID Controller
2.1 Instrumentation
2.2 Control
2.2.1 Plant modeling
2.2.2 Controllers
2.2.2.1 On/Off (two-point) controller
2.2.2.2 PID controller
2.2.2.3 Nested Controllers
2.3 Programmable Logic Controllers
Control 2.2 - 26 Industrial Automation
A glance back in time...
ruins of a tin* mine in Cornwall (England), with the machine house for pumping,
where the first steam engines were installed (1790)
*Tin = Sn
tain, Zinn,
stannum

Zk, Zink, zinc
Control 2.2 - 27 Industrial Automation
Birth of the steam machine (1780 - Thomas Newcomen)
used for:

pump water
winches
ore crashing
Problem: keep the wheel speed constant.
Control 2.2 - 28 Industrial Automation
The Watts "governor" (1791) - the first industrial regulator
Control 2.2 - 29 Industrial Automation
Flywheel governor: the ancestor of automatic control
steam pipe
e
o = f(e
2
)
valve
cylinder
Goal: keep the speed constant (for the pump of for the elevator of the crew)
Control 2.2 - 30 Industrial Automation
Plant model for the following example
The following examples use a plant modeled by a 2
nd
order differential equation:
2
2
1
1
1
TT s sT m
y
+ +
=
Laplace transfer function
(since system is linear)
differential equation
This transfer function is typical of a plant with slow response, but without dead time
0
0.2
0.4
0.6
0.8
1
1.2
1.4
0 1 2 3 4 5 6 7 8 9 10
time
delay time constant
gain
In the examples:
T
1
= 1 s
TT
2
= 0.25 s
2
step response
d ~ 0.2, T= 1.5s
plant m y
m TT y T y y = + +
2 1
" '
Temporal response
Control 2.2 - 31 Industrial Automation
P-controller: simplest continuous regulator
set-point
plant
command
variable
e
process value
proportional factor
measurement
P-controller
m(t) = K
p
e(t) = K
p
(u(t) y(t))
controlled
variable
the P-controller simply amplifies the error to obtain the command variable
K
p
x

u
y
error
m
it works, but if the plant has a proportional behavior, an error always remains
Control 2.2 - 32 Industrial Automation
-0.5
0
0.5
1
1.5
2
0 1 2 3 4 5 6 7 8 9 10
P-Controller: Step response
m
(
t
)
,

y
0
(
t
)

x large
large error
smaller asymptotic error
x small
Numerical:
K
p
= 5.0
set-point
The larger the set-point, the greater the error.
(The operator used to "reset" the control by increasing or decreasing the set-point)
command
Control 2.2 - 33 Industrial Automation
P-Controller: Effect of Load change
-0.5
0
0.5
1
1.5
2
0 1 2 3 4 5 6 7 8 9 10
v
a
l
u
e

u
0
(Solicited)
Not only a set-point change, but a load change causes the error to increase or decrease.
(A load change, modeled by disturbance u
1
, is equivalent to a set-point change)
u
0
= set-point plant
m = command
variable
e = error
y
0
= process value
proportional factor
measurement
P-regulator
controlled
variable
K
p
u1 =
disturbance
u
1
(load change)
command
Control 2.2 - 34 Industrial Automation
P-Controller: Increasing the proportional factor
increasing the proportional factor reduces the error, but the system tends to oscillate
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
0 1 2 3 4 5 6 7 8 9 10
time [s]
u
0
(
t
)
,

y
0
(
t
)

Control 2.2 - 35 Industrial Automation
PI-Controller (Proportional Integral): introducing the integrator
dt x y
y = level [m]
inflow [m
3
/s]
level (t) = (inflow(t)) dt
t
1
t
2
Example of an integration process
Time response of an integrator
input
output
older symbol
1
s
y x
}
=
t
t
d x y
0
) ( t t
equation symbol
Control 2.2 - 36 Industrial Automation
PI (Proportional-Integral) Controller
set-point u
0 plant
command
variable
dt
PI-controller
error e
process value y
0
integration
time constant
controller gain Kp
measurement
K
p
1

T
i
m
1
s
The integral factor produces a non-zero control variable even when the error is zero.
Control 2.2 - 37 Industrial Automation
PI Regulator : Equations
) ) (
1
) ( (
0
}
+ =
t
t
i
p
d e
T
t e K m t t
T
i
= reset time, temps dintgration, Nachstellzeit
e
sT
K m
i
P
~
)
1
1 (
~
+ =
Laplace domain
Time domain
Control 2.2 - 38 Industrial Automation
PI-Controller: response to set-point change
The integral factor reduced the asymptotical error to zero, but slows down the response
(if K
p
is increased to make it faster, the system becomes unstable)
Kp = 2,0, T
i
=1,0 s
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
0 1 2 3 4 5 6 7 8 9 10
time
v
a
l
u
e

Solicited
Output
Command
Integrator
Control 2.2 - 39 Industrial Automation
PD controller
Basic idea of the PD regulator: take into account not only the value of the error, but
the rate at which the error changes.


Example: when parking a car in front of a wall, the driver not only looks at the
distance to the wall, but also at the speed at which the car approaches the wall.
Control 2.2 - 40 Industrial Automation
PD-Controller: Introducing the differentiator
Time response of a differentiator
input
output
s y x
dt
dx
y =
A perfect differentiator does not exist.
Differentiators increase noise.
Differentiators are approximated by
integrators (filtered differentiator):

1
s
T
d
Nf

1

Instead of differentiating, one can use an
already available variable:
e.g. the speed for a position control
x y
symbol:
equation:
Control 2.2 - 41 Industrial Automation
PD - controller
K
p
u plant
command
variable
s
error
process value y
derivative
factor
proportional factor
measurement
T
d
PD - controller
Adding the D-part allows to react vigorously to changes in set-point or perturbations.
m x
set-point
Control 2.2 - 42 Industrial Automation
PD Controller: Equations
|
.
|

\
|
+ =
dt
t de
T t e K t m
d p
) (
) ( ) (
Laplace domain
( ) ) (
~
1 ) (
~
s e s T K s m
d p
+ =
Time domain
Td = derivative time, temps de dosage de drive, Vorhaltezeit Tv
Control 2.2 - 43 Industrial Automation
PID controller
K
p
1

T
i
1
s
PID-Controller (Proportional-Integral-Differential)
set-point plant
command
variable
s
The proportional factor K
p
generates an output proportional to the error, it requires a non-
zero error to produce the command variable.
Increasing the amplification K
p
decreases the error, but may lead to instability
The integral time constant T
i
produces a non-zero control variable even when the error is
zero, but makes the system instable (or slower).
The derivative time T
d
speeds up response by reacting to an error change with a control
variable proportional to the steepness of change.
error
process value
integral factor
derivative
factor
proportional factor
measurement
T
d
integrator
Control 2.2 - 44 Industrial Automation
PID controller: Equations
|
|
.
|

\
|
+ + =
}
dt
t de
T d e
T
t e K t m
d
t
t
i
p
) (
) ) (
1
) ( ) (
0
t t
|
|
|
|
.
|

\
|
+
+ + =
) 1 (
1
1
) (
~
) (
~
s
T
N
s T
sT
K
s e
s m
d
f
d
i
p
Real differentiators include this filtering
time domain
Laplace domain
K
p
= proportional factor, gain, Reglerverstrkung,
T
i
= reset time, temps de dosage dintgration (Nachhaltezeit, T
N
)
Td = derivative time, temps de dosage de drive, Vorhaltezeit Tv
Note: some manufacturers define the terms differently, e.g.
|
.
|

\
|
+
+ + =
t s
s T
sT
K
s e
s m
d
i
p
1
1 1
) (
~
) (
~
Control 2.2 - 45 Industrial Automation
PID response summary
0
1
0 1 2 3 4 5 6 7 8 9 10
Solicited P
small
P
large
PI PID U
1
P
small
(K=5) asymptotic error
proportional only
P
large
(K
p
= 15) less error,
but unstable
PI: no remaining error,
but sluggish response
(or instable, if K
p
increased)
differential factor
increases responsiveness
load change (load decreases)
Control 2.2 - 46 Industrial Automation
PID-Controller: empirical settings
Rise time Overshoot Settling time Steady-State Error
increasing
Kp Decrease Increase Small Change Decrease
Ti Decrease Increase Increase Eliminate
Td Small Change Decrease Decrease Small Change

Empirical formula of Nichols (1942 !)
0
0.2
0.4
0.6
0.8
1
1.2
1.4
0 1 2 3 4 5 6 7 8 9 10
delay time constant
gain K
step response (open loop)
d ~ 0.2, T= 1.5s
1.2 T
K
V
K
p
= T
i
= 2.0 d T
d
= 0.5 d (N
f
= 10)
Caution: Nichols assumes that the plant
is first order with time delay
Control 2.2 - 47 Industrial Automation
Extract from a controllers manual: its empirical !
You can optimize the regulator yourself. This describes the optimization according to Ziegler-Nichols
Assuming that the process is stable at the operating temperature:
1. Set the Parameters ti und td OFF.
2. Set the Parameters Hcb und Lcb on Auto.
3. The actual value differs now from the solicited value by the Proportional factor.
4. As soon as the temperature stabilize, reduce the value of the proportional band Pb, until the temperature
starts to swing. Note the swinging period T. Increase the proportional band until the temperature just stops
swinging, do not haste. Note the value of the proportional band B.
5. Set the values of Pb, Ti and Td according to the following table in the controller.
But what do you do if this method does not work ?
How do you know that this plant can be controlled by a PID controller (many cannot)
How do you prevent overshoot ? (this method does not)
Trial-and-error cant replaces a serious analysis -> see for further reading.
Control 2.2 - 48 Industrial Automation
2.2.2.3 Nested controllers
2.1 Instrumentation
2.2 Control
2.2.1 Plant modeling
2.2.2 Controllers
2.2.2.1 On/Off (two-point) controller
2.2.2.2 PID controller
2.2.2.3 Nested Controllers
2.3 Programmable Logic Controllers
Control 2.2 - 49 Industrial Automation
Several controllers act together: Electricity Generator
Generator
Active power
frequency (Pf)
controller
Turbine
3-phase Electrical Power Mechanical power
Steam
Valve
control
mechanism
Main
steam
valve
Controllable
excitation
source
Voltage
sensors
Frequency sensor
AQ
AV
AP
AP + j AQ
Af
Reactive power
voltage (QV)
controller
Control 2.2 - 50 Industrial Automation
Generator Regulator structure
turbine
speed

frequency
measure
PID
exitation
generator voltage
measure
PID
load
voltage
U = k I
e

excitation
current
I
e
Control 2.2 - 51 Industrial Automation
Position regulator: not a second order plant
motor
vehicle
position
measurement
amplifier
speed
measurement
torque measurement
Set-point
regulator
v
I
Control 2.2 - 52 Industrial Automation
Nested control of a continuous plant - example
Example: position control of a rotating shaft
Position
Speed
Torque
torque regulation
(protection)
PD
sol
is
cmd
PID
sol
is
cmd
PID
sol
is
cmd
M
Nesting regulators allow to maintain the output variable at a determined value
while not exceeding the current or speed limitations
Current
Position
Velocity
tacho
encoder
amplifier
Control 2.2 - 53 Industrial Automation
Nested loops and time response
A control system consists often of nested loops, with the fastest loop at the inner level
robot arm trajectory
speed control
torque control
position control
Control 2.2 - 54 Industrial Automation
Feedforward
basic idea: bring the output on an approximate track from the start, let the regulator only correct
the small deviations. The feedforward controller knows the plant, it can also consider known disturbances
plant
command
process value
Istwert
valeur mesure
measurement
y
feed-forward
controller
x
m
disturbances
feed-back
controller
set point
valeur de
consigne
Sollwert
Control 2.2 - 55 Industrial Automation
Advanced Control
economical
objectives,
Cost functions
plant
command
(setpoints for further
regulators)
process value
Istwert
valeur mesure
control
algorithms
measurement
y
controller
x
m
disturbances
plant
model
This is a high-level control in which the set-points are computed based on economical objectives
Control 2.2 - 56 Industrial Automation
Assessment
How does a two-point regulator works ?

How is the a wear-out of the contacts prevented ?

How does a PID regulator works ?

What is the influence of the different parameters of a PID ?

Is a PID controller required for a position control system (motor moves a vehicle)

Explain the relation between nesting control loops and their real-time response

What is feed-forward control ?
Control 2.2 - 57 Industrial Automation
To probe further
Courses of Prof. Longchamp and Prof. Bonvin

"Computer Systems for Automation and Control", Gustaf Olsson, Gianguido Piani,
Lund Institute of Technology

Modern Control Systems, R. Dorf, Addison Wesley

Вам также может понравиться