Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lecture 4 - Simple Design Problems: K. J. Åström

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Lecture 4 - Simple Design Problems

1. Introduction
The role of abstractions

K. J. strm

Solve an abstract problem and you have the solution to


many concrete problems
But you must be able to translate!
Technology transfer

1. Introduction
2. Control of First Order Systems
3. Control of Second Order Systems
4. Matlab
5. Summary
Theme: Solve simple design problems in a unified way.
Dynamics of simple closed loop systems. Matlab.

Standard process models in the form of transfer functions


b
b1 s + b2
P ( s) =
,
P ( s) = 2
s+a
s + a1 s + a2
Essential that storage of mass, momentum and energy
can be captured by a few parameter. Description of
storage more complicated if variations are rapid.
Moderate requirements of control performance

A Simple Feedback Loop

2. Control of First Order Systems


Many systems are approximately of first order

d
r

C ( s)

P ( s)

1
Design controllers for the processes
P ( s) =

b
,
s+a

P ( s) =

s2

b1 s + b2
+ a1 s + a2

The key is that the storage of mass, momentum and


energy can be captured by one parameter
Examples
Velocity of car on the road
Control of velocity of rotating system
Electric systems where energy storage is essentially in
one capacitor or on inductor
Incompressible fluid flow in a pipe
Level control of a tank
Pressure control in gas tank
Temperature in a body with essentially uniform temperature distribution (e.g. steam filled vessel)

c K. J. strm August, 2001


&

A Simple Recipe

PI Control of First Order Systems

Transform the physical problem to a standard model e.g.


P ( s) =

Process transfer function

b
s+a

P ( s) =

Pick a controller e.g. PI


C ( s) = k +

b
s+a

Controller transfer function


ki
s

C ( s) = k +

Closed loop system is of second order

ki
s

Closed loop transfer function from reference r to output y

Design a controller where the closed loop characteristic


equation has specified poles (pole placement)
Translate results back to the physical system

PC
b( ks + ki)
Y ( s)
=
= 2
R( s )
1 + PC
s + (a + bk)s + bki

Closed loop system of second order, PI controller has two


parameters.

Interpretation

The Mass-Spring-Damper System

Consider the equation


Y ( s)
PC
b( ks + ki)
=
= 2
R( s )
1 + PC
s + (a + bk)s + bki

Rewrite it as
(s2 + (a + bk)s + bki) Y (s) = b( ks + ki) R(s)
Interpret in time-domain
d2 y
dy
dr
+ (a + bk)
+ bki y = bk + bkir
2
dt
dt
dt

The closed loop poles can be given arbitrary values. PI control


sufficient.

The differential equation for a mass-spring-damper system is


given by
d2 y
dy
m 2 +d
+ ky = 0
dt
dt
It is useful to make an analogy with this system in order to
understand second order systems

c K. J. strm August, 2001


&

The Mass-Spring-Damper Analogy

Behavior of Second Order System


The system

Closed loop control system


d2 y
dy
dr
+ (a + bk)
+ bki y = bk + blir
2
dt
dt
dt

G ( s) =

02
s2 + 2 0 s + 02

d2 y
dy
m 2 +d
+ ky = 0
dt
dt

has the step response = 0 (dashed), 0.1,


0.2, 0.5, 0.707, 1 (dashed-dotted)

Mass-spring-damper equation

p
0 1 2

Integral gain ki gives spring action

1.5

Proportional gain k gives damping action

0.5

Behavior of Second Order System with a Zero




The system with = 0.7

0
s + 0
s2 + 2 0 s + 02

G ( s) =

12

10

15

Behavior of Second Order System with a Zero


0
s + 0
2
s + 2 0 s + 02
= 0.2, 0.5 1 (dashed), 2, 5 and .
G ( s) =

3
2.5


has the step response = 0.2, 0.5, 1 (dashed), 2, 5 and .
3

2
1.5
1
0.5

2.5

2
1.5

0t
5

10

Why do all curves intersect at the same point?

The Audience is Thinking ...

0.5
0

0t

0t
5

10

c K. J. strm August, 2001


&

3. Control of Second Order Systems

PI Control of Second Order Systems

Storage of mass, momentum and energy can be captured


by two parameter
Examples

Process
P ( s) =

b1 s + b2
+ a1 s + a2

Controller

Position of car on the road


Control of angle of rotating system
Stabilization of satellites
Electric systems where energy is stored in two elements (inductors or capacitors)
Levels in two connected tanks
Pressure in two connected vessels

ki
s
Closed loop transfer function from reference r to output y
C ( s) = k +

( ks + ki)(b1 s + b2)
PC
Y ( s)
=
= 3
R( s )
1 + PC
s + (a1 + b1 k)s2 + (a2 + b1 ki + b2 k)s + b1 ki
Closed loop system of third order, controller has only two
parameters. Not enough degrees of freedom. A more complex
controller is required to choose closed loop characteristic
polynomial.

Behavior of Third Order System

PD Control of Second Order System

The system with = 0.7

Process

b
+ a1 s + a2
Notice that polynomial B is of zero degree. Controller
P ( s) =

03
G ( s) = 2
(s + 2 0 s + 02 )(s + 0 )
has the step response = 0.2, 0.5, 1 (dashed), 2, 5 and .
1.2

s2

C ( s) = k + k d s

Closed loop transfer function from reference to output

Y ( s)
PC
b( kd s + k)
=
= 2
R( s )
1 + PC
s + a1 s + a2 + b( kd s + k)
b( kd s + k)
= 2
s + ( a1 + bkd ) s + a2 + bk

0.8
0.6
0.4
0.2
0

s2

0t
5

10

Closed loop system of second order, controller has two parameters. All closed loop poles can be chosen.

c K. J. strm August, 2001


&

PD Control of Second Order System ...


The closed loop transfer function

Solution
The controller with error feedback

Y ( s)
PC
b( kds + k)
=
= 2
R( s )
1 + PC
s + a1 s + a2 + b( kds + k)

U (s) = kE(s) kd sE(s)

gives

The zero s = k/ kd may cause a considerable overshoot if it is


closer to the origin than the dominant poles.
This zero is caused by the controller. Can the controller be
modified so that the zero is changed or removed?

Y ( s)
PC
b( kds + k)
=
= 2
R( s )
1 + PC
s + a1 s + a2 + b( kds + k)

But the controller to


U (s) = kE(s) kdsY (s) = kR(s) ( k + kds) Y (s)

The Audience is Thinking ...


r

gives

k + kd s

Y ( s)
k
= 2
R( s )
s + ( a1 + k d ) s + a2 + k

Controller with Two Degrees of Freedom


The controller
U (s) = kE(s) kdsY (s) = kR(s) ( k + kd s) Y (s)

Block Diagram Representations


System with error feedback
r
e
u
k + kd s

is said to have two degrees of freedom because the signal path


from reference R to control U is different from signal path from
output Y to control U . Derivative acts only on the output.
We will talk a lot about this later.

y
P

1
Controller with two degrees of freedom
r
e
u
k

kds

1
c K. J. strm August, 2001
&

PID Control of Second Order System


Process: P(s) =

s2

b
+ a1 s + a2

Analysis and design of control system has been drastically


influenced by good computational tools. A sensible approach:

ki
+ kd s
s
Closed loop transfer function from reference r to output y

Controller: C(s) = k +

Y ( s)
PC
b( kd s2 + ks + ki )
=
=
2
R( s )
1 + PC
s( s + a1 s + a2 ) + b( kd s2 + ks + ki )

s3

4. Computational Tools

b( kd s2 + ks + ki )
+ ( a1 + bkd ) s2 + ( a2 + bk) s + bki

Construct a block diagram


Derive the transfer functions for the blocks
Calculate transfer functions between interesting signals
Explore transfer functions qualitatively
Use Matlab to simulate the responses of the system
Can be done in many ways

Closed loop system of third order, controller has three parameters. All closed loop poles can be chosen arbitrarily. Since the
zeros comes from the controller they can also be chosen arbitrarily by choosing a structure with two degrees of freedom!

Matlab

Polynomials

Matlab was designed as an interactive calculator for matrices.


The matrix


1 2 3
M=
4

is represented as

Polynomials are represented in the same way as matrices. The


polynomial
A(s) = s3 + 2s2 + 3s + 4
is represented as
A=[1 2 3 4]

M=[1 2 3;4 5 6]
There are many operations for matrices. Use the command
help matrices to find out more about them.

The matrix operations also apply to polynomials (overloading,


polymorphism). There are also special operations for polynomials, for example roots(A) give the roots of the polynomial.

c K. J. strm August, 2001


&

Transfer Functions

Generating Step Responses

When polynomials are available it is also possible to represent


transfer functions that are rational functions. The transfer
function
s+2
P ( s) = 2
s + 5s + 6
is represented as
P=tf([1 2],[1 5 6])
The regular operations of addition, multiplication and division
also apply to transfer functions (overloading, polymorphism).

t=0:0.1:6.5*pi;
z=0;
sys=tf(1,[1 2*z 1]);
y0=step(sys,t);
z=0.1;
sys=tf(1,[1 2*z 1]);
y1=step(sys,t);
...
plot(t,y0,r--,t,y1,b-)
axis([0 15 0 2])
xlabel(x)
ylabel(y)

A Slick Way to Work with Systems

%Generate plotting times


%Set damping parameter
%Generate system sys
%Calculate step response
%Change damping parameter
%Generate system
%Generate step response
%Plot results
%Give lengths of axes
%Add labels
%Add labels

Summary

Transfer functions is a natural interface to Matlab. Here is one


way to compute responses.

Draw block diagram

s=tf([1 0],1)
P=1/(s*(s+2))
C=2+1/s
T=P*C/(1+P*C)

Select a controller of sufficient flexibility (complexity)

step(T)
tzero
pole(T)

%Define the transfer function s


%Define process transfer function
%Define the controller transfer function
%Compute transfer function from
%reference to output
%Compute and plot the step response
%Compute zeros of the transfer function
%Compute poles of the transfer function
%Notice that there are cancellations

This is perhaps the most natural way to work with transfer


functions, but may be dangerous because Matlab is not smart
enough to recognize cancellations of poles and zeros.

Obtain simple process model


Derive the closed loop characteristic equation
Pick controller parameters to give desired characteristic
polynomial (pole placement). Typical prototypes:
s2 + 2 0 s + 02
(s2 + 2 0 s + 02)(s + 0 )

Behavior of second and third order systems


The effect of poles and zeros
Some zeros are due to the controller, they can be modified
or eliminated if the controller has two degrees of freedom.

c K. J. strm August, 2001


&

You might also like