Você está na página 1de 48

Control Theory

Mechatronic and Sensor Systems Technology


VGU
Prof. Dr. Frieder Keller
Karlsruhe University of Applied Sciences
frieder.keller@hs-karlsruhe.de

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 1

Contents
1 Recommended Literature
2 Examples of Control Systems
3 General Structure of a Control Loop
4 Block Diagrams
5 Mathematical Description of Dynamic Systems
6 Differential Equations
7 Laplace-Transform
8 Frequency-Response Analysis
9 Basic Functional Elements
10 Analysis of Control Systems
11 Stability Analysis of Control Systems
12 Tuning-Rules for Control-Parameters
13 Modifications of the Standard Control Loop

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 2

Recommended Literature
[1] Nise, Norman S.
Control systems engineering, John Wiley, 2000.

[2] Ogata, Katsuhiko


Modern Control Engineering, Prentice Hall
[3] Ogata, Katsuhiko
System Dynamics, Pearson, Prentice Hall

It is also recommended to visit the Internet-page:


[4] http://www.engin.umich.edu/group/ctm/
which provides a Control Systems Tutorial
You can also access this tutorial offline by clicking on index.html on the subdirectory
tutorial in the public directory. This tutorial covers much more aspects than the lecture.

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 3

Examples of Control Systems


controller

control knob

nr

nc

heater

nc
u

speed
sensor

motor

temperature
sensor

inertia

Speed Control

Temperature Control
controller
xc

xr

position
sensor

motor
xc
spindle

Position Control

coil
controller
hr

iron ball

pump

hc

solar
cell
lamp

level
sensor

qin
hc

Liquid Level Control


Position Control (suspended ball)

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 4

Structure of a Control Loop


nr

nc

u(nr)

x Ks

controller

motor

x Ks

Speed Control System

nc

nr

controller

x Ks

motor

Equivalent System

controller

process

General structure of a Control Loop

r:

request signal, input signal, reference input

e:

error signal

y:

controller output

c:

controlled variable, plant output

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 5

Controlled variable:
The controlled variable is the output of the process. It is measured by a sensor
element and controlled.
Reference input:
The reference input is the desired value for the controlled variable. It may be a
constant value or may be a time-dependent signal.

Manipulated variable:
The manipulated variable is the output of the controller and the input of the
process. The goal is to affect the value of the controlled variable to minimize
the deviation of the controlled variable from the desired value.
Process:
Any operation to be controlled is called a process.
Disturbance:
A disturbance influences the process and tends to affect the value of the controlled variable.
Feedback control or closed loop control:
A system where the controlled variable is measured and compared with the
desired value. Any deviation leads to a controller output which reduces the difference between the desired value and the controlled variable.
Open loop control:
In an open-loop control system the output is not measured and thus not compared with the input signal. The effect of disturbances cannot be compensated.

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 6

Goals in Control Engineering:


Stability, Dynamics, Accuracy, Overshoot
1.5

overshoot

accuracy

r,c

0.5

dynamics

10

15
t

20

25

30

Dynamics, Overshoot, Accuracy

4
3.5
3
2.5

r,c

2
1.5
1
0.5
0
-0.5
-1

10

15
t

20

Step Response of an unstable System

25

30

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 7

Signals and Block Diagrams


(t)

r(t)

UNIT STEP

UNIT RAMP

(t)

approximation
for (t)

DIRAC PULSE

1/

Basic functions

input signal

system

output signal

Functional Block

summing point
x

branch point

G1(s)
-

Block Diagram

G2(s)

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 8

Mathematical Description of Dynamic Systems


- Differential Equations,
- Laplace-Transformation
input signal
x(t)

LTIsystem

output signal
y(t)

Linear, time-invariant system

an

d n y( t )
d n1 y ( t )
dy ( t )
d m x( t )
d m1x ( t )
+
a
+
...
+
a
+
a
y
(
t
)
=
b
+
b
+...+ b0 x ( t )
1
0
m1
m
n 1
dt n
dt n1
dt
dt m
dt m1
for technical systems: n m
Differential Equation

1) Given: x(t), inital conditions


Obtain: y(t)
solution of the differentail equation
2) Given: x(t)=(t), inital conditions = 0 Obtain: y(t) = h(t)
step response
3) Given: x(t ) = x0 sin(t )
frequency response

Obtain: y(t) for steady state

4) Given: x(t) and y(t)


system identification

Obtain: coefficients ai and bi

5) Check the stability of the system


stability test
Standard Problems

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 9

Definition of the Laplace-Transform:

L { f ( t )} = F ( s) = f (t )e st dt

Some rules:

L { f (t ) + g (t )} = L { f (t )} + L { g(t )}
L {a f (t )} = a L { f (t )}

df (t )
L
= s L { f (t )} f (t = 0)
dt
1
t
L f ( )d = L { f (t )}
s
0
Small Laplace Transform Table:

1
s

(t )
e a t

1
s+a

1
s2
1
s ( s + a)

1
1 e at
a

sin( at )

a
s + a2
s
2
s + a2
2

cos( at )

1 d 2

1+
sin

t
d

2
1 d

fr d<1:

d
t
T

1
(T s + 2 d T s + 1) s

1 d 2

und 90< < 180


mit = arctan

fr d=1:

1 1 + e T
T
t

T2
T1
T2
e T1 +
e mit T1, 2 = T d d 2 1
fr d>1: 1
T1 T2
T1 T2

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 10

Some other rules:


L { f (t TD )} = e TD s L { f (t )}

L e at f (t ) = F ( s + a )
f (t ) = lim sF ( s )

(if f(t ) exists)

f (0+ ) = lim sF ( s )

(if there are no impulses or their derivatives at t = 0)

s 0

In practice Laplace-transform is performed using a table and the Laplace-theorems


or a computer program like MAPLE or MATLAB with the symbolic toolbox.
Inverse Laplace-transform also uses tables and computer programs. Sometimes the
partial-fraction expansion method can be used to split a complicated expression in a
sum of simpler expressions.

Consider a LTI-system which is characterized by the following differential equation:

an

d n y( t )
d n1 y ( t )
dy ( t )
d m x( t )
d m1x ( t )
+
a
+
+
a
+
a
y
t
=
b
+
b
+...+ b0 x ( t )
...
(
)
n 1
1
0
m
m1
dt n
dt n1
dt
dt m
dt m1

Laplace-Transformation gives:

a n s nY ( s) + a n1s n1Y ( s) +...+ a 0Y ( s) = bm s m X ( s) + bm1s m1 X ( s) +...b0 X ( s)


(a n s n + a n1 s n1 +...+ a 0 )Y ( s) = (bm s m + bm1 s m1 +...+b0 ) X ( s)
Y ( s) bm s m + bm1s m1 +...+b0

=
= G( s)
X ( s) a n s n + a n1s n1 +...+ a 0
G(s) is the transfer-function.

To obtain the output y(t) with given input x(t) and initial conditions (here considered to
be 0) the following recipe can be used:
1. Obtain G(s)
2. Find the Laplace-transform of x(t)
3. Obtain Y(s)=G(s)X(s)
4. Find the inverse Laplace-transform of Y(s)

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 11

Example: Obtain the step response of a 1st order lowpass with initial condition =0.

Solution:
differential equation:

y + T y& = x

input signal:
initial condition:

x(t ) = (t )
y (t = 0) = 0

to obtain output signal:

y (t )

Laplace-Transformation gives:

Y ( s) + T s Y ( s) = X ( s)
This equation may be solved for Y(s)!

Y ( s) =

1
1
1 1
1
1
X ( s) =
=

1+ T s
1+ T s s T s + 1 s
T

We have got the solution (but it is in Laplace-domain).


With the help of our Laplace-table we obtain the inverse Laplace-transform:

y (t ) = 1 e

t
T

This is the well-known formula for the step response of a first order lowpass.

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 12

Example: Solution of a differential equation of 2nd order with nonzero initial conditions.
differential equation:
input signal:
initial conditions:

y + T 2 &y& = x
x (t ) = 0
y (t = 0 ) = y 0

to obtain signal:

y (t )

y& (t = 0) = v0

Solution:
Preliminary considerations:
The Laplace-Transform of a second derivative is:
L {&y&(t} = s L {y& (t )} y& (t = 0) = s (s L {y (t )} y (t = 0) ) y& (t = 0) =

s 2 Y ( s ) s y (t = 0) y& (t = 0)
This way the initial conditions are included in the solution process.

Now Laplace-Transformation of the differential equation gives:


Y ( s ) + T 2 s 2 Y ( s ) T 2 s y0 T 2 v0 = 0

and we can solve for Y(s):


Y ( s) =

Y ( s) =

1
T 2 s y0 + T 2 v0
2
2
1+ T s

)
1
T

T s
T
s
v
y +T
y +
v =
2
2 0
2
2 0
1 0
1 0
1+ T s
1+ T s
s2 + 2
s2 + 2
T
T
2

With the help of our Laplace-table we obtain:

t
t
y (t ) = y0 cos + Tv0 sin
T
T
This describes for example the undamped oscillation of a spring-mass-system.

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 13

Example: Obtain the response of a 1st order lowpass with initial condition =0 for an
input signal x(t ) = x0 sin (t ) .

Solution:
differential equation:

y + T y& = x

input signal:
initial condition:

x(t ) = x0 sin (t )
y (t = 0) = 0

with Laplace-transformation:
Y ( s ) = x0

2
s + 1 + Ts
2

written with partial fractions


Y ( s ) = x0

1
As + B
C

= 2
2
2
1 + Ts
s + 1 + Ts s +
2

The coefficients A,B,C are determined as follows:


x0

x0

s +
2

As + B

(1 + Ts ) + C x0
=C
2
2
2
s +
1
2
+
T

1
1
1
C
= As + B +
s 2 + 2 x0
= Aj + B; x0
= Aj + B
1 + Ts
1 + Ts
1 + Tj
1 Tj

x0

1
1
= Aj + B; x0
= Aj + B
1 + Tj
1 Tj

1
1
1 Tj + 1 + Tj
2
= x0
+ x0
= 2 B = x0
(1 + Tj )(1 Tj )
(1 + Tj )(1 Tj )
1 + Tj
1 Tj
x0
B=
1 + T 2 2
x0

x0

1
1
= Aj + B; x0
= Aj + B
1 + Tj
1 Tj

1
1
1 Tj 1 Tj
2Tj
x0
= 2 Aj = x0
= x0
(1 + Tj )(1 Tj )
(1 + Tj )(1 Tj )
1 + Tj
1 Tj
T
A=
1 + T 2 2

x0

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 14

With the coefficients A,B,C from the above calculations we can write Y(s) as:

T
s
1
1
T
2
+
2
+

Y ( s ) = x0

2 2
2
2 2
2
2 2
1+ T s +
1 + T 1/ T + s
1+ T s +

Inverse Laplace-transform gives:


t
T

1
T
T
sin(
)
e
cos(

t
t

y (t ) = x0
1 + T 2 2
1 + T 2 2
1 + T 2 2

T
T

e
y (t ) = x0 V sin[t arctan(T )] +

1 + T 2 2

with
V=

1 + T 2 2

(1 + T )
2

2 2

1
1 + T 2 2

y(t) has two parts: the steady state solution ysteady(t) and the transient solution
ytransient(t)
y steady (t ) = x0 V sin [t arctan(T )]
t

y transient (t ) = x0

T
T

e
1 + T 2 2

The following figure shows x(t) and y(t) for =

1
:
T

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 15

1
0.8
0.6
0.4
0.2
0

/4

-0.2
-0.4
-0.6
-0.8
-1

2
0

0.5

1.5
t/T

2.5

2.5

ysteady and ytransient are depicted in the next figure:


1

0.8
0.6

ysteady

0.4

ytransient

0.2
0
-0.2
-0.4
-0.6
-0.8
-1

0.5

1.5
t/T

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 16

For this example it can be seen that the amplification factor V is given by:
V = G ( j )

and the phase shift is:


= arctan

Im{G ( j )}
= G ( j )
Re{G ( j )}

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 17

Frequency-Response Analysis

The two above relations are valid for all stable LTI-systems. This is shown in the
following.
We consider a system with input signal x(t ) = x0 sin (t ) and transfer function G(s). The
output signal y(t) has the Laplace-transform:
Y ( s ) = x0

s +2
2

G ( s)

With partial fraction expansion we have:

As + B ... ...
+ + + ...
Y ( s ) = x0 2
G(s) = 2
2
s + 2 ... ...
s +
In this expression all the terms with ... belong to the transient response which tend
towards 0 for large values of t. This is only the case if the system under consideration
is stable. For the steady state response it is only necessary to determine the values
A and B.
Multiplying both sides by s 2 + 2 we have:

... ...

x0 G ( s ) = As + B + + + ... s 2 + 2
... ...

With s=j and s=-j we have:


... ...

x0 G ( j ) = Aj + B + + + ...0 = Aj + B
...
...

... ...

x0 G ( j ) = Aj + B + + + ...0 = Aj + B
...
...

These are two equations for the two unknowns A and B. It can be easily seen that:
B = x0 Re{G ( j )}
A = x0 Im{G ( j )}

So we have:
Y ( s ) = x0

Im{G ( j )} s
Re{G ( j )}
+ .....
+ x0
2
2
s2 + 2
s +

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 18

With the inverse Laplace-transform we obtain:

y (t ) = x0 [Im{G ( j )} cos(t ) + Re{G ( j )} sin (t )] + .... =

Im{G ( j )}
+ ....
y (t ) = x0 G ( j ) sin t + arctan
Re{G ( j )}

This shows that for a stable LTI-system gain V and phase shift are given by:

V = G ( j )
and:

= arctan

Im{G ( j )}
= G ( j )
Re{G ( j )}

For a sinusoidal input x(t) a stable LTI-system in steady state is characterized by a


magnitude response and a phase response. Both, magnitude and phase depend on
the frequency.
Frequency response is obtained as follows:
1. Replace s by j. in G(s) to obtain G(j)
2. The magnitude is given by G(j)
3. The phase is given by G(j)
Note that s may only be substituted by j if the system is stable, otherwise a steady
state response does not exist.

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 19

Bode diagram and Nyquist plot


Bode diagrams and Nyquist plots are a graphical representation of G ( j ) .
The Bode plot consists of two graphs: the magnitude and the phase
G ( j ) and G ( j )

The horizontal axis in the Bode plots show the frequency in logarithmic scale.
The magnitude is expressed in decibels (dB):
a dB = 20 lg G ( j )
Some special values are given in the following table:

Gain
adB

1
100
-40

1
10
-20

1
2
-6

2
2
-3

10

100

20

40

The phase is shown in linear scale.


The following figure shows the Bode diagram for a first order system with
G(s) =

1
1
with T = 1s
1 + Ts

Bode Diagrams
From: U(1)
0

-10
-15
-20
0
-20
To: Y(1)

Phase (deg); Magnitude (dB)

-5

-40
-60
-80
-100
10-1

100

Frequency (rad/sec)

The plot is generated with MATLAB using the command bode(tf([1],[1 1]),'k')

101

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 20

The Nyquist plot shows the real and imaginary parts of G ( j ) when is varied.
Usually is varied between 0 and . The following figure is generated with MATLAB
using the Nyquist-command2. MATLAB varies in the range -<<.The graph for
positive is shown in red color, negative values produce the black graph.
Nyquist Diagrams
From: U(1)
0.8

0.6

Imaginary Axis

0.4

0.2

-0.2

-0.4

-0.6

-0.8
-1

-0.8

-0.6

-0.4

-0.2

0.2

0.4

0.6

0.8

Real Axis

The following blank may be used to make additional copies for exercises with Bodediagrams and Nyquist plots.

Exercises:
1) Draw the Bode-diagram and the Nyquist plot of: G ( s ) =

1
Ts

1
Ts
10
2) Draw the Bode-diagram and the Nyquist plot of: G ( s ) =
1
1 + Ts + T 2 s 2
10

The plot is generated with MATLAB using the command nyquist(tf([1],[1 1]))

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 21

80
60

40

a/dB

20

-20

-40

-60

-80
-3
10

-2

-1

10

10

10
f/f0

10

10

10

200
150

100

-50

-100

-150

-200
-3
10

-2

-1

10

10

10
f/f0

10

10

imaginary part

50

-1

-2

-3

-4
-4

-3

-2

-1

0
real part

10

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 22

Basic functional elements


The proportional element:
Equation: y = K x .
K is called the gain.
Transfer function: G ( s ) = K
Step response of the proportional element: h(t ) = K (t )
Bode-diagram:
150

40

100

20

50

200

60

a/dB

80

-20

-50

-40

-100

-60

-150

-80
-3
10

-2

10

-1

10

10
f/f0

10

-200
-3
10

10

10

-2

-1

10

10

10
f/f0

10

10

10

Nyquist-plot:
4

-1

-2

-3

-4
-4

-3

-2

-1

Examples:

Mechanical beam
Input signal is the position of the left end, output signal is the position of the
beams right end

Voltage divider using a potentiometer as position sensor.


input: position of the wiper, output: output voltage

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 23

The integrator:
Equation: y = K I xdt .
Transfer function: G ( s) =

KI
s

Step response: h(t ) = K I r (t ) (the ramp function)

80

200

60

150

40

100

20

50

a/dB

Bode-diagram:

-20

-50

-40

-100

-150

-60

-80
-3
10

-2

10

-1

10

10
f/f0

10

-200
-3
10

10

10

-2

-1

10

10

Nyquist-plot:
4

-1

-2

-3

-4
-4

-3

-2

-1

Examples:
-

Water tank
Input: flow rate, output: liquid level
qin

valve
q out

Relation between velocity and distance


Input: velocity, output: distance

10
f/f0

10

10

10

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 24

The differentiator:
Equation: y = K D x& ..
Transfer function: G ( s ) = K D s
Step response: h(t ) = K D (t ) (the Dirac pulse)
Bode-diagram:

150

40

100

20

50

200

60

a/dB

80

-20

-50

-40

-100

-60

-150

-80
-3
10

-2

10

-1

10

10
f/f0

10

-200
-3
10

10

10

-2

-1

10

10

Nyquist-plot:
4

-1

-2

-3

-4
-4

-3

-2

-1

Examples:

Relation between velocity and acceleration


input: velocity, output: acceleration

Electronic differentiator (Opamp-circuit)

10
f/f0

10

10

10

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 25

The first order lowpass:


Equation: T y& + y = K P x
Transfer function: G ( s) =

KP
1 + Ts

Step response: h(t ) = K P 1 e T

1
0.9
0.8
0.7

0.6
0.5
0.4
0.3
0.2
0.1
0
0

0.5

1.5

2.5
t/T

3.5

4.5

At t=T the step-response reaches 63% of the final value.


The tangent at t=0 intersects the line of the final value at t=T.

80

200

60

150

40

100

20

50

a/dB

Bode-diagram (for KP=1):

-20

-50

-40

-100

-60

-80
-3
10

-150

-2

10

-1

10

10
f/f0

10

-200
-3
10

10

10

-2

-1

10

10

Nyquist-plot (for KP=1):


1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1

-0.5

0.5

10
f/f0

10

10

10

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 26

Examples:

RC-lowpass filter
input: input voltage, output: output voltage
R

U1

U2

Electrical motor
input: voltage u, output: speed

i
u

Motor
inertia

Inductance with resistance


input: voltage, output: current

Exercise:
Draw the block diagram of an electrical motor.
input: voltage, output: angular position

i
u

Motor
inertia

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 27

The first order highpass:


Equation: T y& + y = K D x&
Transfer function: G ( s ) =

KDs
1 + Ts
t

Step response: h(t ) =

KD T
e
T

Drawing for KD=T:


1
0.9
0.8
0.7

0.6
0.5
0.4
0.3
0.2
0.1
0

0.5

1.5

2.5
t/T

3.5

4.5

Bode-diagram (for KD=T):


80
200

60
150

40
100

20

a/dB

50

0
0

-20
-50

-40

-100

-60

-80
-3
10

-150

-2

10

-1

10

10
f/f0

10

10

-200
-3
10

10

-2

10

Nyquist-plot (for KD=T):


1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1

-0.5

0.5

-1

10

10
f/f0

10

10

10

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 28

Examples:

RC-highpass filter
input: input voltage, output: output voltage
U1

C
R

U2

Modified differentiator (exercise: draw the circuit)

RC-lowpassfilter (exercise: find the appropriate input and output signal)

Exercise:
Represent the highpass by a series connection of a lowpass and a differentiator.

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 29

The second order lowpass:


Equation: T 2 &y& + 2 d T y& + y = K P x
d is called the damping ratio.
Transfer function: G ( s ) =

KP
1 + 2dTs + T 2 s 2

Step response:
d>1

t
t

T2
T1
T1
T2
e
e +
h(t ) = K P 1
T1 T2
T1 T2

d=1

t

t
h(t ) = K P 1 1 + e T
T

d<1

d
t

T
1 d 2

e

h(t ) = K P 1
sin
t + arccos d
2

T
1 d

mit T1, 2 = T d d 2 1

Drawing for KP=1:


1.8

d=0.1
d=0.3

1.6

d=0.5

1.4

d=0.7

1.2

d=0.9

1
0.8
0.6
0.4

d=1.1
d=1.3
d=1.5

0.2
0

10
t/T

For d<1 the step response has an overshoot.

15

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 30

Bode-diagram (for KP=1):


20
d=0.2
10
d=0.6
0
-10

Asymptote fr 0

d=1.0
d=1.4

|G| in dB

-20
d=1.8
-30
-40
-50
-60
Asymptote fr
-70
-80
-2
10

-1

10

10

10

10

/0

0
d=0.2 Asymptote fr 0
-20

d=0.6

d=1.0
-40
d=1.4
-60
d=1.8

-80
-100
-120
-140
-160
Asymptote fr
-180
-200
-2
10

-1

10

10

10

10

/0

Nyquist-plot (for KP=1):


1

d=1.8
d=1.4

0.5
0

Imaginrteil

-0.5

d=1.0

-1

d=0.6
-1.5
-2

d=0.2
-2.5
-3
-2

-1.5

-1

-0.5

0
0.5
Realteil

1.5

2.5

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 31

Examples:

RLC-filter
input: input voltage u1, output: output voltage u2
R

U1

U2

Spring-mass-system
input: force, output: position of the mass

y
d
c

F
m

Exercise: Describe the above RLC-filter with a block diagram containing two integrators

Exercise: Replace the series connection of two identical lowpasses of first order by a
lowpass of 2nd order.

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 32

The delay element:


Equation: y (t ) = K P x(t TD )
TD is called the delay-time.
Transfer function: G ( s ) = K P e TD s
Step response: h(t ) = K P (t TD )

Example:
Conveyor belt:

h2

h1
v
l
80

200

60

150

40

100

20

50

a/dB

Bode-diagram (for KP=1):

-20

-50

-40

-100

-60

-150

-80
-3
10

-2

10

-1

10

10
f/f0

10

-200
-3
10

10

10

-2

-1

10

10

Nyquist-plot (for KP=1):

1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1

-0.5

0.5

10
f/f0

10

10

10

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 33

Analysis of Control Systems


Closed loop transferfunction:
r

G1(s)

G2(s)

controller

process

The transfer function of a closed loop is easily obtained.

C ( s ) = G1 ( s ) G2 ( s ) [R( s ) C ( s )]
Gclosed _ loop =

G1 ( s ) G2 ( s )
C ( s)
=
R( s ) 1 + G1 ( s ) G2 ( s )

The PID-controller:
The equation of a controller with proportional-plus-integral-plus-derivative control action is:

1
y = K P e + edt + Td e&
Ti

An electronic circuit or PID-control-action is shown in the next figure:


R1
R1

R1

Ci
Ri

Rp
R1

uin

uout

Rd
Cd

R1

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 34

The transfer function is:

1
G ( s ) = K P 1 +
+ Td s =
Ti s

2
1 + Ti s + TiTd s
G ( s) = K P
Ti s
With the help of variable resistors RP, Ri and Rd the parameters KP, Ti and Td can be
adjusted. Variation of a resistor does only affect one of the control parameters.A PIDcontroller may also be realized in a circuit with fewer components:
R3

Cd

R2

Ci

R1
uin

uout

However, varying one element affects not only one control parameter. So we prefer
the first circuit for experimental tuning of control parameters and the second for realization with reduced number of components.
Exercise:
Establish the transfer function of the above circuits and find the relation between the
control and component parameters. Hint: The resistor R3 realizes modified differentiation.

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 35

Control of an integrating process

r
-

1
Ts

KP

1
KP
1
C (s)
T s =
=
T
R( s) 1 + K 1
1+
s
P
T s
KP
From this transfer function we conclude that
- the control loop is stable (first order lowpass is stable)
- the control loop has no overshoot (because a first order system cannot have an
overshoot)
- the control loop is accurate (because for s=0 we obtain a gain of 1)
- the dynamics can be adjusted by the variation of KP (because the time constant
is T/KP)
Exercise: Obtain the transfer function

U ( s)
. Sketch u(t) for r=(t).
R( s)

Exercise: Analyze the following control loop, where z is a disturbance z=z0(t). Is the
control loop still accurate?
z

r
-

KP

1
Ts

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 36

P-Control of a first order lowpass system

r
-

KP

K
1 + Ts

KP K
K
C ( s)
KP K
KP K +1
1+ T s =
=
=
T
R( s ) 1 + K K
1+ KP K + T s 1+
s
1+ T s
KP K +1
KP

From this transfer function we conclude that


- the control loop is stable (first order lowpass is stable)
- the control loop has no overshoot (because a first order system cannot have an
overshoot)
- the control loop is not accurate (because for s=0 we obtain a gain of
KP K
<1 )
KP K +1
- the dynamics and the steady state error cannot be adjusted independently (KP
influences both, time constant and steady state error)
I-Control of a first order lowpass system

r
-

1
Ti s

K
1 + Ts

1
K

1
C ( s)
K
T s 1+ T s
= i
=
=
R( s) 1 + 1 K
K + Ti s (1 + T s ) 1 + Ti s + Ti T s 2
K
Ti s 1 + T s
K
From this transfer function we conclude that
- the control loop is stable (2nd order lowpass is stable)
- the control loop may have an overshoot. See the exercise below.
- the control loop is accurate (because for s=0 we obtain a gain of 1 )
Exercise: For which values of Ti does the step response of the closed loop have an
overshoot?

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 37

Solution:
We compare the transfer function with the standard form of a 2nd order lowpass.

1
1+

T T
Ti
s + i s2
K
K

1
1 + 2dT ' s + T '2 s 2

Now we find:
T '=

Ti
T
T K
T
Ti T
and 2dT ' = i d = i = i
=
2 KT ' 2 K Ti T 2 K T
K
K

An overshoot exists if d<1 that is if:

Ti
2 K T

< 1 Ti < 4 KT

PI-Control of a first order lowpass system


r

e
-

KP
1
Ti s

K
1 + Ts

PI-control combines the advantages of P-control (fast response) and I-control (accuracy).
In the following we assume that Ti is chosen to be equal to T. This is called the compensation of the process pole.

K
1
KP K
K
1 + Ti s

K P 1 +

KP
C (s)
1
Ti s
Ti s 1 + T s
Ti s 1 + T s =
=
=
=
K
K K
T
1 + Ti s
R( s)

K
1

s
1+ P
1+
1+ KP

1 + K P 1 +
Ti s 1 + T s
Ti s
KP K
Ti s 1 + T s

From this transfer function we conclude that


- the control loop is stable (first order lowpass is stable)
- the control loop has no overshoot (because a first order system cannot have an
overshoot)
- the control loop is accurate (because for s=0 we obtain a gain of 1)
- the dynamics can be adjusted by the variation of KP (because the time constant
is T/KP)

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 38

Control of a 2nd order lowpass system


From the above we may conclude that the strategy of pole compensation is also suitable for a second order process. However, in this case a PID-controller is needed.

1
Ti s

KP

K
1 + 2dTs + T 2 s 2

Td s

1
K
+ Td s
K P 1 +
1 + 2dTs + T 2 s 2
Ti s
C ( s)

=
=
R( s)

1
K
1 + K P 1 +
+ Td s
2 2
Ti s
1 + 2dTs + T s
1 + Ti s + Td Ti s 2
KP K
K

2 2
1
1 + 2dTs + T s
Ti s
Ti s
=
=
2
K

K
T
1 + Ti s + Td Ti s
K
i
1+ P
1+
s
1+ KP

2 2
Ti s
KP K
1 + 2dTs + T s
Ti s
KP

We have chosen: Ti = 2dT and Td =

T2
T
=
Ti
2d

This leads to the same transfer function as in the previous example.


However, in practice we have to take care for the output of the controllers differentiator not to go in saturation. This can be achieved by rate limiting of the input signal
and/or modified differentiation.
The realization of a rate limiter with an Opamp-circuit is shown in the following figure:
R1
C
R1

uin
R2

uout

R3

Note that we usually choose a high gain of the non-inverting amplifier, so it may also
go in saturation. Let umax and umin denote the maximum and minimum output voltage

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 39

duout
u
= max/ min . With the negative feedback it is ensured
dt max/ min
RC
that the output voltage always follows the input voltage. Note that the output is inverted, so one needs an additional inverter to have the correct sign.

of the amplifier. Then

Control of a 3rd order lowpass


(academic example)
Consider the following control loop:
r

e
-

KP

1
1 + Ts

1
1 + Ts

1
1 + Ts

Exercise: Find the transfer function of the closed loop. What is the steady state error
for KP=1, KP=3 and KP=9?

Here we find that the control loop is unstable if the controller gain KP exceeds a certain threshold (Kcritical=8). For KP<Kcritical however the control loop is stable.

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 40

Stability Analysis
We will introduce two stability criterions.
The first is based on the closed loops transfer function and its pole locations in the
complex plane.
The second is the Nyquist criterion. It analyzes the open loops Nyquist curve.
The pole location criterion states:
A system is stable if all poles of its transfer function are located in the left half
of the complex plane if all poles have a negative real part.
Note that this stability criterion can only be applied if the system does not contain any
delay elements.
For the above example we may evaluate the pole locations depending on the parameter K. Often the pole locations are visualized in the so-called root-locus-diagram.
The corresponding MATLAB-command is rlocus. The following graph is obtained with
this procedure:
Root Locus
2

1.5

Imaginary Axis

0.5

-0.5

-1

-1.5

-2
-3.5

-3

-2.5

-2

-1.5

-1

-0.5

0.5

Real Axis

There are three poles. As K is increasing one pole (blue line) is moving to the left, the
other poles however are approaching the imaginary axis and for K>8 they are entering the right half plane and the closed loop gets unstable.
As another example consider P-control of a 2nd order lowpass. The corresponding
root locus plot looks like this:
Root Locus
2

1.5

Imaginary Axis

0.5

-0.5

-1

-1.5

-2
-0.7

-0.6

-0.5

-0.4

-0.3

-0.2

-0.1

Real Axis

From this we conclude that the control loop cannot get unstable.

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 41

A powerful and complex theory has been developed on the basis of root locus plots
including also the design of controllers. However these details are not treated in this
lecture.
The Rouths criterion allows us to determine whether the system is stable without
explicitly evaluating the poles. Rouths stability criterion is outlined in the following:

Write the polynomial (denominator of the closed loop) in the following form (it is assumed that an 0 ):

a0 s n + a1s n1 + a2 s n2 + a3 s n3 + ... + an
Check if all the coefficients are nonzero and have the same sign. If not, the system is
not stable or there are roots which are imaginary. However this is only a necessary
but not a sufficient condition.
Arrange the coefficients in rows and columns according to the following scheme:
sn
sn-1
sn-2
sn-3
.
.
.
s0

a0
a1
b1
c1

a2
a3
b2
c2

a4
a5
b3
c3

a6
a7
b4
c4

.
.
.
.
.

.
.
.
.
.

g1

The coefficients ai have to be filled in from the polynomial.


The coefficients bi, ci, are evaluated according to the following rule:

b1 =

a1a2 a0 a3
a1

b2 =

a1a4 a0 a5
a1

b1a3 a1b2
ba ab
c2 = 1 5 1 3
b1
b1
The table is filled until we have completed the line with label s0.
c1 =

The system is stable if all coefficients in the first column have the same sign.

.
.
.
.
.

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 42

Exercise: Find the necessary and sufficient conditions for a system with transfer1
function G ( s) =
to be stable.
3
2
a0 s + a1s + a2 s + a3

Exercise: Apply the Routh criterion to the academic example

The Nyquist criterion is based on the open loop:


r

e
-

controller

process

If we use a sinusoidal input (e.g. from a function generator) for the controller the
steady state output c(t) will also be a phase-shifted sine-function (provided the open
loop is stable). In the case of our academic example it is found that the phase shift
3
may be -1800 (for a frequency =
) and the gain may be 1 (for a controller gain
T
K P = 8 ). This may be shown by analytical calculation and verified by simulation (see
the following SIMULINK-model).

Sine Wave
8

Ground
Subtract

Manual Switch

Slider
Gain2

1
tau*tau*tau.s3+3*tau*taus2+3*taus+1

Scope

Transfer Fcn

If we now toggle the switch and close the control loop the oscillation continues without changing the amplitude. This means the control loop is at the verge to instability.
For higher values of the gain however the amplitude will increase: the control loop is
unstable. For gains less than 8 the oscillation is damped and goes towards 0: the
control loop is stable.

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 43

This example illustrates the simplified Nyquist criterion:


A closed loop system is stable if the point (-1+0.j) of the complex plane is always on the left side of the open loops Nyquist curve when is varied from 0
to .
The application of this simplified form requires that the open-loop system is stable.
However 2 poles are allowed at s=0.
For a more detailed explanation of the general Nyquist criterion please refer to [2].
There are two standard measures for the distance of the Nyqusit plot from the critical
point: gain margin and phase margin. They are illustrated in the following figure:

Im

unit circle

representing the
gain margin

Re

1
phase margin

The gain and phase margin is easily obtained with the MATLAB-command margin.
The next figure shows the result of margin when applied to the academic example.
Bode Diagram
Gm = 18.1 dB (at 1.73 rad/sec) , Pm = -180 deg (at 0 rad/sec)
0

Magnitude (dB)

-20
-40
-60
-80
-100
-120
0

Phase (deg)

-45
-90
-135
-180
-225
-270
-2
10

-1

10

10

Frequency (rad/sec)

10

10

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 44

The gain margin is stated to be 18.1 dB. This corresponds to the well-known maximum gain of 8, for which the control loop is still stable. As the Nyquist plot touches
the unit circle at s=1, the phase margin is 180o.

Tuning Rules for Control Parameters


In the literature one finds a lot of different methods and recipes for tuning the parameters of a controller. Some of them are based on the theory of differential equations and use mathematical methods. Other methods propose a procedure for the
experimental tuning of the parameters.
In the following some methods are listed.
Compensation of Poles
This method was already mentioned. With a PID-controller it is possible to compensate up to 2 poles of the process transfer function. As it was shown earlier the preferred transfer function of the open loop is an integrator resulting in a first order lowpass behaviour of the closed loop. If the process has more than two poles we may
choose to compensate the dominating poles, these are the poles which are closest to
the imaginary axis.

Adjustment of the Phase Margin


This method is based on the frequency response of the open loop. From the Nyquist
criterion it is obvious that a control loops step response has increasing oscillations
the closer it gets to the critical point -1. The recommended distance is a phase margin of approx. 600. Note that the compensation of poles will prefers a phase margin of
90o, a phase margin which is less will usually result in an overshoot.

Tuning Rule according to Ziegler-Nichols


This rule was developed for processes with a transport delay in series with a first order element. But often the rule is also applied to other types of processes.
Recipe:
Start with P-control. Increase the amplification to Kcritical , where the control loop is
marginally stable. Measure the period Tcritical of the oscillation. Adjust the parameters
according to the following table:

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

Controller
P-Controller
PI-Controller
PID-Controller

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 45

0.5 Kcritical
0.45. Kcritical
0.6. Kcritical

TI
0.83.Tcritical
0.50.Tcritical

TD
0.125.Tcritical

These parameter values may not give satisfactory results. But they may be good initial values for further improving the dynamic behaviour of the control loop experimentally. Note that increasing the integral control action usually produces more oscillations and increasing the differential control action has a damping effect. The reason
for this is best seen in the Nyquist plot.

Tuning Rule according to Tietze, Schenk


This tuning rule may be used to find the control parameters for higher order processes.
-

Start with P-control and increase the controller gain until the step response
shows a damped oscillation. On a scope one should see 4-5 periods of oscillation.
Continue with PD-control. Increase the differential control action to get rid of the
oscillations.
Activate the integral control action and increase its weight until settling time is
found to be good.

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU-Course: Control Theory

VGU_Control_Theory_new.DOC

page 46

Modifications of the Standard Control Loop


Cascaded Control Loops
In many applications not only one signal may be monitored by a sensor element.
Cascading control loops then may be a powerful method for improving the performance. The general structure is shown in the following figure:

r
-

controller
2

controller
1

process
part 1

process
part 2

The tuning of the controller is of course done starting with the parameters of controller 1, and then adjusting the parameters of the outer control loop.
Example: Position control with an inner control loop for speed control.

Linearization of nonlinear processes


If one has to deal with nonlinear processes linearization may be realized (in some but
not all cases as for example saturation effects) as shown in the following figure.

controller

f-1(u)

f(u)

process

f-1(u) is the inverse of f(u) and must be realized as part of the controller. In analog
technique this is often very difficult, in digital controllers it may be easily done with the
help of lookup-tables.

Compensation of disturbances
Sometimes an information about the disturbance z is available and it may be compensated as shown in the next figure. With this method we may efficiently suppress
the effect of the disturbance before it affects the error signal and has to be compen-

VGU-Course: Control Theory

Prof. Dr.-Ing. F. Keller


Karlsruhe University of Applied Sciences

VGU_Control_Theory_new.DOC

page 47

sated by the controller. In the ideal case Gz(s) is the inverse of the transfer function of
process part 1, however an approximate realization of Gz(s) also may show significant effect.

z
Gz(s)

r
-

controller

process
part 1

process
part 2

Rate limiting the reference input to avoid the windup phenomenon


If the controller includes an integral control action overshoot of the controlled variable
may occur due to the saturation of the controller output. In those cases rate limiting
the reference input is a good countermeasure.
r

rate
limiter

e
-

controller

process

Você também pode gostar