Vous êtes sur la page 1sur 4

Uppsala University

Information Te hnology
Dept. of Systems and Control
BPGH November 5, 2012

Control Design (F, IT)


Computer Controlled Systems (STS,
W), 2007
Computer exer ise 1
Introdu tion to multi-variable ontrol: Hints

1 Solution to the preparation exer ises


Ex 2.1

The system is des ribed by


(1)
(2)

( ) = Ax(t) + B u(t);

x t

( ) = C x(t) + w(t):

y t

The system is ontrolled by the ontroller


()=

Observer:

(3)

( ) + mr (t):

u t

Lx t

(t) + B u(t) + K fy (t)


( ) = Ax

( )g:

x t

(4)

Cx t

Under stati ondition (nothing is hanging) x (t) = 0 and x (t) = 0. We are


interested in the stati gain from r(t) to y(t). Hen e set the other input w(t) = 0.
Using these observations and subtra ting (1) from (4) we get
(A

Sin e A

KC

KC

)fx
(t)

( )g = 0:

(5)

x t

is not a singular matrix in general,


(6)

( ) = x(t):

x t

Note that the above equality may not hold if A K C is a singular matrix, whi h
would mean that the estimation error may not be zero at steady state (stati
ondition). Using (1),(3) and (6) we get
()=

x t

(A

BL

()

B mr t

()=

y t

C A

BL

()

B mr t :

(7)

Hen e to get unit stati gain we must have


m

C A

BL

(8)

Ex 2.2

>From (1) and (3) we get


( ) = Ax(t)

x t

( ) + B mr (t):

B Lx t

(9)

>From (2), (3) and (4) we get


( ) = K C x(t) + (A

x t

BL

)( ) + B mr (t) + K w(t):

KC x t

(10)

Hen e the required state spa e form is given by




( )
x
(t)
x t

() =

y t

A
KC



BL
A

BL

()
(t)
x

x t

KC

()
(t)
x
x t

Bm

Bm

( )+

r t

0
K

()

w t

(11)

+ w(t):

Ex 2.3

K = (a ker(A',C',p_obs))'

Ex 2.4

F = [A, -B*L; K*C, A-B*L-K*C, G =[B; B*m,


H = [C zeros(size(C)), S = ss(F,G,H,0)

Ex 2.5

Sn = ss(F, [zeros(size(K)); K, H, 1)

Let C = 1 : : : n and B =
in dimensions of B and C ). Then
Ex 2.6

()=

b1

n
X

g t

k=1

k bk

:::

bn

>

(Note the dieren e

epk t :

(12)

If p1 is the dominating pole, for t >> 0


( )  1 b1 ep1 t

g t

log [g (t)] = p1 t + log( 1 b1 );

(13)

whi h means that the slope of the semilog urve for large t gives the dominating
pole.

% ********* Closed loop system *********************


g1 = tf([2 1,[1 2 1 0)
% Open loop system G1
f1 = tf(1,1)
% Unity feedba k
h1 = feedba k(g1,f1)
% losed loop system
step(h1)
% step response
% ********* Stability margins *********************
bode(g1)
% bode plot
[M ph w = bode(g1)
% frequen y response data
[Gm Pm G P = margin(M,ph,w) % Gain and phase margin:
% Pm = phase margin
P = phase ross over
% **********************************************

Table 1:

Sample ode for system 1.

% ********* Pole pla ement *********************


K = (pla e(A',C',p_o))'
% Need to transpose matri es.
L = a ker(A,B,p_s)
% No need to transpose matri es.
% ********* Closed loop system *********************
F = [A -B*L; K*C A-B*L-K*C %
m = inv(C*inv(B*L-A)*B)
% Set the stati gain = 1
G = [B;B*m
% State spa e des ription
H = [C zeros(size(C))
% of the losed loop system
Gr = ss(F,G,H,0)
% You have done it before.
step(Gr)
% Step response of Gr
% **********************************************

Table 2:

State feedba k and pole pla ement.

2 Di ulties in ontrol


A brief outline of the Matlab ode for forming the losed loop system for system 1 is given in Table 1. You an modify the same set of odes to study the
other systems also. Next ompensators are required to be designed. Follow the
instru tions given in the instru tion sheet. Create the LTI obje t for the ompensated system. Study the ompensated losed loop system properties using
bode and Nyquist plots. You may need to as ade two systems. Use
h = series(g1, 1); or h = g1* 1;

for that. Next we study state spa e feedba k ontrol of the systems. To reate
the state spa e des ription of open loop system use
s1 = ss(g1), [A, B, C, D = ssdata(s1);

Next hoose your pole! Let p_s be the ve tor of ontroller poles and p_o be the
ve tor of observer poles. Observer poles has to be faster than the system poles.
The set of odes given in Table 2 may be helpful.
4

Vous aimerez peut-être aussi