# 1 Question 1

Document Sample

Control Theory 1
Homework Assignment Number 5 Solutions

1    Question 1
(a) We use the matlab m ﬁle:

wv=[.1 .2 .3 .4 .5 .6];
T=[0:100]’/2;
YV=[];
xi=.707;
for i=1:6;
w=wv(i);
num=3.125*w^2*[-1 .32];
den=[1 2*xi*w w^2];
sys=tf(num,den);
[Y,X]=step(sys,T);
YV=[YV Y];
end
plot(T,YV(:,1),T,YV(:,2),T,YV(:,3),T,YV(:,4),T,YV(:,5),T,YV(:,6))
grid
legend(’.1’,’.2’,’.3’,’.4’,’.5’,’.6’);
xlabel(’Time (seconds)’)
ylabel(’y(t)’)

This gave the plot

1
1.2

1

0.8

0.6

0.4
y(t)

0.2
.1
0                                                                  .2
.3
−0.2                                                                 .4
.5
−0.4
.6

−0.6
0    5        10       15           20     25     30   35   40   45   50
Time (seconds)

(b) In this case, we used the matlab m ﬁle:
xiv=[.4 .5 .6 .7 .8 .9];
T=[0:100]’/2;
YV=[];
w=.3;
for i=1:6;
xi=xiv(i);
num=3.125*w^2*[-1 .32];
den=[1 2*xi*w w^2];
sys=tf(num,den);
[Y,X]=step(sys,T);
YV=[YV Y];
end
plot(T,YV(:,1),T,YV(:,2),T,YV(:,3),T,YV(:,4),T,YV(:,5),T,YV(:,6))
grid

2
legend(’.4’,’.5’,’.6’,’.7’,’.8’,’.9’);
xlabel(’Time (seconds)’)
ylabel(’y(t)’)
This gave the plot:

1.4

1.2

1

0.8

0.6
y(t)

0.4
.4
0.2                                                                             .5
.6
0                                                                              .7
.8
−0.2
.9

−0.4
0      5     10       15         20     25     30            35     40        45       50
Time (seconds)

The presence of the non-minimum phase zero s = 0.32 (zero in the right half of the complex plane) gives
rise to the undershoot behaviour in the above step responses whereby the step response initially goes in the
wrong direction.

2          Question 2
Since the plant is of 4th order, we choose a 3rd order compensator of the form:

c3 s3 + c2 s2 + c1 s + c0
H(s) =
s3 + d2 s2 + d1 s + d0

3
where the parameters c3 , c2 , c1 s, c0 , d2 , d1 , d0 are to be determined. The closed loop transfer function is
given by
G(s)
Gcl (s) =              .
1 + G(s)H(s)
With our given plant transfer function and this compensator, we obtain the determinator of the closed loop
transfer function (The characteristic polynomial) as:
Dcl (s) = 0.164(s + 0.2)(−s + 0.32)(c3 s3 + c2 s2 + c1 s + c0 ) + s2 (s + 0.25)(s − 0.009)(s3 + d2 s2 + d1 s + d0 )
= s7 + ( .241 + d2 ) s6 + ( −.164 c3 − .00225 + .241 d2 + d1 ) s5
+ ( .01968 c3 − .164 c2 − .00225 d2 + .241 d1 + d0 ) s4 +
( .010496 c3 + .01968 c2 − .164 c1 − .00225 d1 + .241 d0 ) s3
+ ( .010496 c2 + .01968 c1 − .164 c0 − .00225 d0 ) s2
+ ( .010496 c1 + .01968 c0 ) s + .010496 c0
However, the desired closed loop characteristic equation is
Dd (s) = (s2 + 2 × 0.3 × 0.707s + 0.32 )(s + 0.2)(s + 1)4
= s7 + 4.6242 s6 + 8.67164 s5 + 8.46256 s4 + 4.61784 s3
+ 1.43156 s2 + .24684 s + .018
Equating coeﬃcients in Dcl (s) and Dd (s), we obtain the following simultaneous equations:
.241 + d2 = 4.6242
−.164 c3 − .00225 + .241 d2 + d1 = 8.67164
.01968 c3 − .164 c2 − .00225 d2 + .241 d1 + d0 = 8.46256
.010496 c3 + .01968 c2 − .164 c1 − .00225 d1 + .241 d0 = 4.61784
.010496 c2 + .01968 c1 − .164 c0 − .00225 d0 = 1.43156
.010496 c1 + .01968 c0 = .24684
.010496 c0 = .018
That is,
                                                                                                 
0       0       0       0       1       0       0     c3                           4.3832
−.164       0       0       0    .241       1       0   c2                          8.67389
                                                                                                 
                                                                                                   
.01968   −.164       0       0 −.00225    .241       1   c1
                                                           
8.46256
                
                                                                                                   
                                                                                                 

   .010496 .01968    −.164       0       0 −.00225    .241   c0

=
      4.61784   


         0 .010496 .01968    −.164       0       0 −.00225   d2

 
      1.43156   

0       0 .010496 .01968        0       0       0   d1                           .24684
                                                                                                 
                                                                                                   
0       0       0 .010496       0       0       0     d0                             .018
This system of equations was solved with the following matlab m ﬁle:
A=[0 0 0 0 1 0 0
-.164 0 0 0 .241 1 0
.01968 -.164 0 0 -.00225 .241        1
.010496   .01968 -.164 0 0 -.00225 .241
0 .010496 .01968     -.164 0 0 -.00225
0 0 .010496 .01968 0 0 0
0 0 0 .010496 0 0        0 ];
b=[4.3832 ; 8.67389 ; 8.46256 ;4.61784 ;1.43156 ; .24684 ;                     .018];
x=A\b

4
This gives

x =

284.5089
127.4118
20.3020
1.7149
4.3832
54.2770
10.6881

That is, the required controller transfer function is

284.5089s3 + 127.4118s2 + 20.3020s + 1.7149
H(s) =
s3 + 4.3832s2 + 54.2770s + 10.6881

3     Question 3
The following matlab m ﬁle was used to answer this question;

numg=.164*conv([1 .2],[-1 .32]);
deng=[conv([1 .25],[1 -.009]) 0 0];
sysg=tf(numg,deng);
numh=x(1:4)’;
denh=[1 x(5:7)’];
sysh=tf(numh,denh);
syscl=feedback(sysg,sysh);
[numcl,dencl]=tfdata(syscl,’v’);
clzeros=roots(numcl)
clpoles=roots(dencl)
syscl1=minreal(syscl);
[numcl1,dencl1]=tfdata(syscl1,’v’);
clzeros=roots(numcl1)
clpoles=roots(dencl1)
step(syscl1)
pause
nnum=length(numcl1);
nden=length(dencl1);
DCgain=numcl1(nnum)/dencl1(nden)
K=1/DCgain
figure
step(K*syscl1)

This gave the following results:

clzeros =

-2.0916 + 7.0047i
-2.0916 - 7.0047i
0.3200

5
-0.2000 + 0.0000i
-0.2000 - 0.0000i

clpoles =

-1.0002    +   0.0002i
-1.0002    -   0.0002i
-0.9998    +   0.0002i
-0.9998    -   0.0002i
-0.2121    +   0.2122i
-0.2121    -   0.2122i
-0.2000

1 pole-zeros cancelled

clzeros =

-2.0916 + 7.0047i
-2.0916 - 7.0047i
0.3200
-0.2000

clpoles =

-1.0001    +   0.0001i
-1.0001    -   0.0001i
-0.9999    +   0.0001i
-0.9999    -   0.0001i
-0.2121    +   0.2122i
-0.2121    -   0.2122i

DCgain =

6.2323

K =

0.1605

6
8

7

6

5

4
Amplitude

3

2

1

0

−1

−2
0   5      10            15              20   25   30
Time (secs)

Figure 1: Closed Loop Step response

7
1.4

1.2

1

0.8
Amplitude

0.6

0.4

0.2

0

−0.2

−0.4
0        5             10            15               20             25            30
Time (secs)

Figure 2: Unity gain Closed Loop Step response

The unity gain closed loop step response shows good agreement with the results of question 1.

4               Question 4
We redraw the control system block diagram as follows:

8
R(s)
Gain    +
δ(s)
K
-

Controller         Ship Transfer
Function
H(s)                 G(s)

From this, we calculate the closed loop transfer function from R(s) to δ(s) to be

K
Gδ (s) =
1 + G(s)H(s)

This was calculated and the corresponding step response obtained using the following matlab m ﬁle:

sysl=sysh*sysg;
syscld=feedback(1,sysl);
step(K*syscld)

This gave the following step response

9
Step Response
From: U(1)
1

0.8

0.6

0.4
Amplitude

0.2
To: Y(1)

0

−0.2

−0.4

−0.6

−0.8
0               5              10               15          20             25     30

Time (sec.)

Figure 3: Response of plant input for a unit step change in reference input

This response then tells us how big the actuator signal will be for a given step change in the reference
input signal. From this, we can determine if the actuator is likely to saturate.

10

DOCUMENT INFO
Shared By:
Categories:
Tags: Question
Stats:
 views: 34 posted: 3/27/2010 language: English pages: 10
Description: 1 Question 1
How are you planning on using Docstoc?