You are on page 1of 57

Otomasi Industri

set point
controller

plant

measurement

2.2 Kontrol dari proses kontinyu

controlled
variables

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

Otomasi Industri

Kontrol Kontinyu 2.2 - 2

Materi:
- modeling of plants
- two-point controller
- PID controller
- Nested controllers

Otomasi Industri

Kontrol Kontinyu 2.2 - 3

Open Loop control vs. Closed Loop control


open loop:

Temperatur adalah kurang tepat,


Tergantung dari temperatur sekitar dan
Jumlah yang dimasak tetapi tingkat pemanasan
dan lamanya dapat dimodulasikan
(misal: biarkan sampai mendidih dan kemudian
didiamkan selama 30 )

3
2

sequential control

closed loop:
140

180
200

120

220

+
-

higher
/lower

temperatur dikontrol secara ketat,


diperlukan pengukuran variabel
output (temperatur)

continuous control

Sensor temperatur

Otomasi Industri

Kontrol Kontinyu 2.2 - 4

Open loop vs. closed loop

open-loop control / command

closed-loop control / regulation

Kata kunci: sequential / combinatorial,


binary variables, discrete processes,
"batch control", "manufacturing"

set-point (solicited)

commands
sequencer

clock
display
on/off

Kata kunci: feedback, analog variables,


continuous processes, "process control"

output

controller

plant

plant state

error
(deviation)

display
measurement

control variable
plant

output

plant
state
measurement

%
process value

Otomasi Industri

Kontrol Kontinyu 2.2 - 5

Definisi-definisi dari IEC


351-47-01 closed-loop control (feedback control)
process whereby one variable quantity, namely the controlled variable is
continuously or sequentially measured, compared with another variable quantity,
namely the reference variable, and influenced in such a manner as to adjust to the
reference variable
Closed action path in which the controlled variable continuously or sequentially influences itself

351-47-02 open-loop control


process in a system whereby one or more variable quantities as input variables
influence other variable quantities as output variables in accordance with the
proper laws of the system
Open action path or a closed action path the fact that the output variables being influenced by
the input variables are not continuously or sequentially influencing themselves and not by
the same input variables.

Otomasi Industri

Kontrol Kontinyu 2.2 - 6

Contoh: Cruise Control

Control Objective:
maintain car velocity
Measured Process Variable (PV):
car velocity (click rate from
transmission rotation)
Manipulated Variable:
pedal angle, flow of gas to engine
Controller Output (CO):
signal to actuator that adjusts gas flow
Set point (SP):
desired car velocity
Disturbances (D):
hills, wind, curves, passing trucks....

Source: OCAL, clker.com

Source: http://apmonitor.com/che436/uploads/Main/Lecture3_notes.pdf

Otomasi Industri

Kontrol Kontinyu 2.2 - 7

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

Otomasi Industri

Kontrol Kontinyu 2.2 - 8

Pemodelan
1) analisis sistem kontrol
2) Mendefiniskan suatu kontroller yang memenuhi kebutuhan fisik dan ekonomi
economical requirements
Langkah pertama adalah mengetahui plant, yakni, menyatakan sifat-sifat plant dengan
cara mathematis, umumnya dengan persamaan differensial,
) White box approach: menganalisa prinsip fisis
(perlu mengetahui semua elemen-elemen)
) Black box approach: mengidentifikasi parameter-parameter plant dengan
menganalisa kelakuaannya (output) dalam merespon perubahan input.
+/-

what is the effect of increasing thrust ?

Otomasi Industri

Kontrol Kontinyu 2.2 - 9

Pemodelan untuk regulasi: proses kontinyu


Contoh untuk proses ini: drives, ovens, vehicles, chemical reactors
x

Otomasi Industri

y = F (x, t)

Kontrol Kontinyu 2.2 - 10

Contoh plant linier: Motor listrik dengan magnet tetap


motor

J [Nms]
(inertia)

i
Ue
(command
tension)

[rad/s]
(speed)

R
T [Nm]
(torque)

ui [V]
(induced tension)

Ue = R i + L

di
dt

+ ui

di

ui = K

dt

T = Ki

d
dt

dt

L
K

(Ue K R i)

Ue

K
s2 (LJ) + s (RJ) + K2

Laplace - transfer, since the plant is linear


Otomasi Industri

Kontrol Kontinyu 2.2 - 11

Contoh untuk plant non-linier : pemodelan suatu kereta api


obtain the relation between applied motor force (current) and the position of a train.

Ffrict Ftract

x
mg

dx
v
dt

motor force

Kc
dv
1

( Ftract mg sin( ) m
C x v 2 C f v)
dt m
radius
slope
mass of the train
plus contribution
of rotating parts
(wheels and rotors)
Otomasi Industri

air friction
curve
friction

mechanical
friction

Kontrol Kontinyu 2.2 - 12

Model kereta api dalam Matlab

traction force
train
inertia

Fz

i
motor
current

acceleration

Km

speed

position

1
m

motor
gravity

v2

air
resistance

mgsin()

mg

sin()

Cz

friction
curve friction
sin()

()2

Cx

Cc

|v|
r(x)
(x)

abs
radius
slope

taken from
topography database

Otomasi Industri

Kontrol Kontinyu 2.2 - 13

Help in modeling for electricians: use an electrical equivalent


water
temperature

ambient-water isolation R1

ambient
temperature
a

Electrical equivalent
R1

C
heater-water
isolation
Heat
resistance R2

water

Uq

R2
C
Ua

x~
ua ~ a

Ua
(ambient temperature)
solicited
temperature 2

controller

heating

energy Uq

1
1
)
dx
1
1
R R2
x 1

Uq
Ua
dt
C
R1C
R2C
(

dx
Ax Bu C
dt
Otomasi Industri

cooling

dx
x 1 1 Ux
R2C R2C
dt
dx
Dx E
dt
Kontrol Kontinyu 2.2 - 14

Thermal (solid) vs. electrical model: conductivity


q = heat flow [J/s = W]
T = temperature [K]
T2

R = thermal resistance [K/W]

T1
q=

k = thermal conductivity [J/m/K]

(T2 T1)

= (T2 T1)

kA
d

A = surface [m2]
d = distance [m]

I = current [A]
U = voltage [V]
R = resistance []
= resistivity [Vm]
Otomasi Industri

d
kA

R=
d

U2

U1

i=
A

(U2 U1)

= (U2 U1)

R
R=

A
d

d
A

Kontrol Kontinyu 2.2 - 15

Thermal (solid) vs. electrical model: capacity


q = heat flow [J/s = W]
T = temperature [K]
T

C = thermal capacity [J/K]

q=C

Cm = thermal specific [J/K/kg]

dT

Cm

C=

dt

Cm
Ad

A = surface [m2]
d = distance [m]

= density [kg/m ]
3

I = current [A]
U = voltage [V]

U
i=C

dt

C = capacity [F]
= dielectric constant [F/m]
Otomasi Industri

dU

C=

A
d

d
Kontrol Kontinyu 2.2 - 16

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. Signal correlation then yields the parameters.

test signal

command

unknown plant

input

output
Otomasi Industri

Kontrol Kontinyu 2.2 - 17

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

Otomasi Industri

Kontrol Kontinyu 2.2 - 18

Kontroller

Bila plant diketahui, suatu kontroller bisa dirancang.


Dalam praktis, parameter-parameter plant berubah-ubah
(misal jumlah penumpang dalam kereta api), dan plant juga
bisa terkena ganguan (disturbance) (angin, kemiringan)
Kontroller
Butuh mengukur melalui sensor keadaan dari plant dan bila
mungkin juga ganguan.
Dengan mengikuti suatu aturan tertentu mengstabilkan
output dalam waktu yang sesuai, tidak ada overshoot,
meminimalkan konsumsi energi, dan sebagainya ..

Otomasi Industri

Kontrol Kontinyu 2.2 - 19

Lup Kontroller

disturbance
set-point

controlled variable

controller
regulator
Regler
rgulateur

e
u

state

error

controlled system
Regelstrecke
systmecommand

command

y
measurement
process value

feedback loop

controller can be implemented by mechanical elements, electrical elements, computers,...


controlled variable can not always be measured directly.
Otomasi Industri

Kontrol Kontinyu 2.2 - 20

Tubuh manusia sebagai contoh regulator


Consider a person taking a shower as a control system

disturbances
feed-forward
controller

set point

feed-back
controller

command
m

x
plant

y
other
constraints:
energy, cost,
cleanness
Otomasi Industri

measurement
process value

Kontrol Kontinyu 2.2 - 21

Dimana letak kontroller ?


high-end: in a set of possibly redundant
controllers (here: turbine control)
directly in the sensor
or in the actuator
(analog PIDs)

as a separate device (analog PIDs)


(some times combined with a recorder)
set-points
as an algorithm in a computer
(that can handle numerous "loops").
sensors
Otomasi Industri

actors
Kontrol Kontinyu 2.2 - 22

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

Otomasi Industri

Kontrol Kontinyu 2.2 - 23

Two-point controller: principle


The two-point controller (or bang-bang controller, regulator, Zweipunktregler,
Rgulateurtoutourien) has a binary output: on or off (example: air conditioning)

set-point

control
variable
measured value

energy

of on

room

heater

temperature

thermometer

commercial controller with integrated


thermometer
Otomasi Industri

Kontrol Kontinyu 2.2 - 24

Thermostat

Thermostat menjaga (maintain) temperatur yang dinginkan (reference)


terhadap ganguan (seperti pintu tutup/buka, variasi tempetratur diluar,
jumlah orang dalam rumah, dsb)
Otomasi Industri

Kontrol Kontinyu 2.2 - 25

Two-point controller: Input variable as ramp

%
1.20
1.00

value

0.80

Setpoint
Upper bound

0.60

Lower bound

0.40

Output

0.20
0.00
0.00

1.00

2.00

3.00

4.00

5.00

6.00

7.00

8.00

9.00

time (s)

Otomasi Industri

Kontrol Kontinyu 2.2 - 26

Hysteresis and Deadband of a Valve

Hysteresis: difference between the


valve position on the upstroke and its
position on the down stroke at any
given input signal (static friction)

Deadband: no movement,
generally occurs when the valve
changes direction.

Source: http://www.processindustryforum.com/solutions/valve-terminology-basic-understanding-of-key-concepts

Otomasi Industri

Kontrol Kontinyu 2.2 - 27

Two-point controller: Hysteresis / Deadband

temperature
1.00
0.80
0.60
0.40

hysteresis

upper switch point


lower switch point
Note the different time
constants for heating and
cooling: non-linear system

0.20
0.00

time

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)

Otomasi Industri

Kontrol Kontinyu 2.2 - 28

2.2.2.2 PID Controller

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

Otomasi Industri

Kontrol Kontinyu 2.2 - 29

Step response

Gain:

PV steady state change


CO steady state change

Source: http://www.stanford.edu/class/archive/ee/ee392m/ee392m.1034/Lecture6_Analysis.pdf

Otomasi Industri

Kontrol Kontinyu 2.2 - 30

Contoh model plant


The following examples use a plant modeled by a 2nd order diferential equation:

y y ' T1 y"T2 m
diferential equation

y
1

m 1 sT1 s 2T2

plant

Laplace transfer function


(since system is linear)

Temporal response

Typical transfer function of a plant with slow response, but without dead time
(However, such a plant can also be approximated by a first-order low-pass and a dead time).
delay

1.4
1.2
1

step response
In the examples:
T1 = 1 s
T2 = 0.25 s2
Otomasi Industri

time constant

0.8
0.6
0.4
0.2
0

time

10

d ~ 0.2, T= 1.5s

Kontrol Kontinyu 2.2 - 31

P-controller: simplest continuous regulator


proportional factor,
control gain

set-point

controlled
variable

command
variable

P-controller

e
y

Kp

x
plant

error
measurement
process value

the P-controller simply amplifies the error to obtain the command variable
m(t) = Kp e(t) = Kp (u(t) y(t))

works, but if plant has a proportional behavior, an error always remains


Otomasi Industri

Kontrol Kontinyu 2.2 - 32

P-Controller: Step response

command

m(t), y0(t)

2
1.5

large error

smaller asymptotic error

x large

0.5
x small

0
0

-0.5

10

Numerical:
Kp = 5.0

set-point

The larger the set-point, the greater the error.


Otomasi Industri

Kontrol Kontinyu 2.2 - 33

P-Controller: Effect of Load change


u1 =
disturbance

proportional factor

controlled
variable

P-regulator

u0 = set-point

Kp

e = error

plant
m = command
variable

command

measurement
y0 = process value

value

1.5
u0 (Solicited)

1
0.5

u1 (load change)

0
0

10

-0.5
Not only a set-point change, but a load change causes the error to increase or decrease.
(A load change, modeled by disturbance u1, is equivalent to a set-point change)
Otomasi Industri

Kontrol Kontinyu 2.2 - 34

u0(t), y0(t)

P-Controller: Increasing the proportional factor

2
1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
-0.2 0

10

time [s]

increasing the proportional factor reduces the error, but the system tends to oscillate

Otomasi Industri

Kontrol Kontinyu 2.2 - 35

PI-Controller (Proportional Integral): introducing the integrator


equation

symbol

y x( )d
t0

1
s

older symbol

input
inflow [m3/s]

y = level [m]
output
t2

level (t) =

(inflow()) d

t1

Time response of an integrator


Otomasi Industri

Example of an integration process


Kontrol Kontinyu 2.2 - 36

PI Regulator : Equations

Time domain

1
m K p (e(t ) e( )d )
Ti t 0

Laplace domain

1 ~
~
m K P (1
)e
sTi

Ti = reset time, tiempo de integracin, temps dintgration, Nachstellzeit


Otomasi Industri

Kontrol Kontinyu 2.2 - 37

PI-Controller: response to set-point change

value

Kp = 2,0, Ti=1,0 s
2.2
2
1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
-0.2

Solicited
Output
Command
Integrator

10

time

The integral factor reduced the asymptotical error to zero, but slows down the response
(if Kp is increased to make it faster, the system becomes unstable)
Otomasi Industri

Kontrol Kontinyu 2.2 - 38

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.

Otomasi Industri

Kontrol Kontinyu 2.2 - 39

PD-Controller: Introducing the differentiator


equation:

symbol: x

dx
dt
s

A perfect differentiator does not exist.


Differentiators increase noise.
Differentiators are approximated by
feed-back integrators (filtered differentiator):

temporal response:
input

x
1
Td

output

Otomasi Industri

Nf
1
s

Instead of differentiating, one can use an


already available variable:
e.g. the speed for a position control

Kontrol Kontinyu 2.2 - 40

PD - controller
command
variable

proportional factor

set-point

PD - controller

error
u

Kp
Td

derivative
factor

process value y

plant

measurement

Adding the D-part allows to react vigorously to changes in set-point or perturbations.

Otomasi Industri

Kontrol Kontinyu 2.2 - 41

PD Controller: Equations

Time domain

de(t )
m(t ) K p e(t ) Td

dt

Laplace domain

~ ( s ) K 1 T s ~
m
p
d e (s)

Td = derivative time, temps de dosage de drive, Vorhaltezeit Tv

Otomasi Industri

Kontrol Kontinyu 2.2 - 42

PID-Controller (Proportional-Integral-Differential)
integral factor

integrator

proportional factor

1
Ti

error
set-point
process value
derivative
factor

1
s

Kp
Td

command
variable

plant

PID controller
measurement

The proportional factor Kp generates an output proportional to the error, it requires a nonzero error to produce the command variable.
Increasing the amplification Kp decreases the error, but may lead to instability
The integral time constant Ti produces a non-zero control variable even when the error is
zero, but makes the system instable (or slower).
The derivative time Td speeds up response by reacting to an error change with a control
variable proportional to the steepness of change.
Otomasi Industri

Kontrol Kontinyu 2.2 - 43

PID controller: Equations

time domain

Laplace domain

1
de(t )

m(t ) K p e(t ) e( )d ) Td

T
dt
i t0

~
Td s
m( s )
1

K
1

p
~
Nf
e ( s)
sTi
(1
s)

Td

Real differentiators include this filtering


Kp = proportional factor, gain, Reglerverstrkung,
Ti = reset time, temps de dosage dintgration (Nachhaltezeit, TN)
Td = derivative time, temps de dosage de drive, Vorhaltezeit Tv

Note: some manufacturers define the terms differently, e.g.


Otomasi Industri

se
u
t
no
do
~ (s)
m
1
1

T
s

p
d
e~ ( s)
sTi
1 s
Kontrol Kontinyu 2.2 - 44

PID response summary

Plarge (Kp = 15)


less error, but unstable

PI: no remaining error,


but sluggish response
(or instable, if Kp increased)

Psmall (K=5) asymptotic error


proportional only

differential factor
increases responsiveness

load change (load decreases)

0
0

Solicited

3
Psmall

5
Plarge

6
PI

8
PID

10
U1

Play with Matlab: http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=ControlPID


or control.xls
Otomasi Industri

Kontrol Kontinyu 2.2 - 45

PID-Controller: empirical settings


Rise time

Overshoot

Settling time

Steady-State Error

Kp

Decrease

Increase

Small Change

Decrease

Ti

Decrease

Increase

Increase

Eliminate

Td

Small Change Decrease

Decrease

Small Change

increasing

See examples on http://en.wikipedia.org/wiki/PID_controller

Empirical formula of Nichols (1942 !)


step response (open loop)
delay

1.4
1.2
1

time constant

Kp =

0.8
0.6
0.4

gain

0.2
0
0

10

1.2 T
KV

Ti = 2.0 d

Td = 0.5 d

(Nf = 10)

Caution: Nichols assumes that the plant


is first order with time delay

d ~ 0.2, T= 1.5s

Otomasi Industri

Kontrol Kontinyu 2.2 - 46

Extract from a controllers manual: its empirical !

Optimization according to Ziegler-Nichols


Assuming that the process is stable at the operating temperature:
1. Set the Parameters ti und td OFF.
2. The actual value difers now from the solicited value by proportional factor.
3. As soon as temperature stabilizes, reduce the value of the proportional band
Pb, until the temperature starts to swing => swinging period T.
4. Slowly increase proportional band until temperature just stops swinging
=> value of the proportional band B.
5. Set the values of Pb, Ti and Td
according to table

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.
Otomasi Industri

Kontrol Kontinyu 2.2 - 47

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

Otomasi Industri

Kontrol Kontinyu 2.2 - 48

Several controllers act together: Electricity Generator


P
Active power
frequency (Pf)
controller

Reactive power
voltage (QV)
controller

Steam
Controllable
excitation
source

Main
steam
valve

Valve
control
mechanism

Turbine

Generator

Voltage
sensors

Frequency sensor

Mechanical
Mechanicalpower
power

Otomasi Industri

3-phase
3-phaseElectrical
ElectricalPower
Power P+ jQ

Kontrol Kontinyu 2.2 - 49

Generator Regulator structure

voltage

PID

excitation
current

exitation

Ie

U = k Ie

load
speed

frequency

PID

turbine

generator

voltage

measure
measure

Otomasi Industri

Kontrol Kontinyu 2.2 - 50

Nested control of a continuous plant - example


Example: position control of a rotating shaft

Position

PD
Speed
sol
cmd
is

PID
Torque
sol
cmd
is

PID
sol
cmd
is

torque regulation
(protection)

encoder
M

tacho

amplifier
Current
Velocity
Position

Nesting regulators allow to maintain the output variable at a determined value


while not exceeding the current or speed limitations
Otomasi Industri

Kontrol Kontinyu 2.2 - 51

Nested loops and time response

position control
speed control
torque control

robot arm trajectory

A control system consists often of nested loops,


with the fastest loop at the inner level

Otomasi Industri

Kontrol Kontinyu 2.2 - 52

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

disturbances

feed-forward
controller

command

set point

feed-back
controller

plant

y
measurement
process value
Istwert
valeurmesure

Otomasi Industri

Kontrol Kontinyu 2.2 - 53

Advanced Control
controller

disturbances

plant
model

economical
objectives,

control
algorithms

Cost functions

plant

command
(setpoints for further
regulators)

y
measurement
process value
Istwert
valeurmesure
This is a high-level control in which the set-points are computed based on economical objectives
Otomasi Industri

Kontrol Kontinyu 2.2 - 54

Exercises
A Control System
a) is dependent not only on current environment but on past environment as well
b) describes the direction PV moves and how far it travels in response to a change in
CO (steady state)
c) set of devices to manage, command, direct or regulate the behavior of other
device(s) or system(s)
What is the set point?
d) Variable you want to control
e) Desired value of control variable
f) Signal that is continuously updated
What has only one tuning parameter so its easy to find best tuning, but permits offset?
g) P only
h) PI
i) PD
What is proportional to both the magnitude of the error and the duration of the error?
j) P only
k) PI
l) PD
https://docs.google.com/forms/d/1CSfJ7yoGdRxNphQ75quNioe5Z0i94XAqqM7zz9g8Ms/viewform

Otomasi Industri

Kontrol Kontinyu 2.2 - 55

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 diferent 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 ?

Otomasi Industri

Kontrol Kontinyu 2.2 - 56

To probe further

"Computer Systems for Automation and Control", Gustaf Olsson, Gianguido Piani,
Lund Institute of Technology
Modern Control Systems, R. Dorf, Addison Wesley
Feedback Systems, Karl Johan Astrm, Richard M. Murray
http://www.cds.caltech.edu/~murray/books/AM08/pdf/am08-complete_28Sep12.pdf

Otomasi Industri

Kontrol Kontinyu 2.2 - 57

You might also like