Вы находитесь на странице: 1из 10

CP5.

1
Given that

Y (s)
15
= 2
R (s) s +8 s+15
Factorizing the denominator and rearranging the equation we got

Y (s)=

15
R(s)
( s+3 ) ( s+5 )

For impulse input we have R(s) = 1


Using Laplace inverse equation
at

e =

1
s+a

We got

Y ( s )=

15 3 t 15 5t
e e
2
2

M.File (Code)
%CP5.1
s=tf('s');
G=15/(s^2+8*s+15);
t=0:0.1:10;
% analytical solution
y_a=7.5*exp(-3*t)-7.5*exp(-5*t);
% using impulse command
y_c=impulse(G,t);
plot(t,y_c,'b*')
hold all
plot(t,y_a)
xlabel('time'),ylabel('Amplitude'), title('Computer vs
Analytical')
legend('Computer','Analytical',-1)

Output:

Figure 1: Graph for CP5.1

CP5.2 (M.file)
%CP5.2
s=tf('s');
G_ol=(s+10)/(s^2*(s+15));
G_cl=feedback(G_ol,1);
t=0:0.1:50;
u=t;
lsim(G_cl,u,t)

Output:

Figure 2: Graph for CP5.2


As it is a type 2 system so steady state error = 1/Kv

K v =lim sG (s)=lim
s 0

s0

Steady state error

e ( ) =

1 1
= =0
Kv

(s+10)
=
s(s+15)

CP5.3 (M.File)
omega1=2; zeta1=0;
omega2=2; zeta2=0.1;
omega3=1; zeta3=0;
omega4=1; zeta4=0.2;
t=0:0.1:20;
s=tf('s');
%Part (a)
G1=omega1^2/(s^2+2*zeta1*omega1+omega1^2);
[y1,x1]=impulse(G1,t);
%Part (b)
G2=omega2^2/(s^2+2*zeta2*omega2+omega2^2);
[y2,x2]=impulse(G2,t);
%Part (c)
G3=omega3^2/(s^2+2*zeta3*omega3+omega1^3);
[y3,x3]=impulse(G3,t);
%Part(d)
G4=omega1^4/(s^2+2*zeta4*omega4+omega4^2);
[y4,x4]=impulse(G4,t);
%Plots
subplot(2,2,1),plot(t,y1),title('wn=2, zeta=0')
subplot(2,2,2),plot(t,y2),title('wn=2, zeta=0.1')
subplot(2,2,3),plot(t,y3),title('wn=1, zeta=0')
subplot(2,2,4),plot(t,y4),title('wn=1, zeta=0.2')
Output:

Figure 3 : Plot for CP5.3


CP5.4
The closed loop transfer function comes out to be

G ( s )=

21
s +2 s+21
2

Comparing the characteristic equation with

s +2 n s+n
We got

n= 21=4.58 rad /s
And

2 n=2

1
=0.218
4.58

Using %over shoot equation

P .O=100 e 1 2
P .O=100 e0.218 10.2182

P .O=1000.504140.98=49.550

Matlab Code
s=tf('s');
G=21/(s^2+2*s+21);
step(G)
Output:

Figure 4 : Plot for CP5.4


Actual overshoot, from the step response, is 49.5%.

CP5.5

For a step input from table 5.6 [dorf and bishop] the characteristic equation is
3

s +1.75 s +2.15 s+

Since the order n=3 and the settling time is estimated to be 8 seconds by analyzing figure 5.30(c)
so that

T s=8=1rad/s
Finding the open loop transfer function by solving controller and process in series we get
2

Gol=

k n (s+z)
3

s + ( 2 n + p ) s + ( n +2 n p ) s+ n p

Solving the feedback we get the closed loop transfer function

2
2
s + ( 2 n + p ) s + ( K + +2 n p ) s+( n p +K n z)
2
k n (s+ z)
Gol =

2
n

Given that =0.59 and

2
n

=0.45rad/s

Comparing the s2 co-efficient we got

2 n + p=1.75
p=1.752 n =1.752 ( 0.590.45 )=1.219
Comparing the s co-efficient we got

K 2n + 2n +2 n p=2.152
K=(2.15 22n2 n p)/ 2n
K=

2.150.20250.6472
=6.42
0.2025

Comparing the constants we got


2

n p+K n z=


( 32n p)/K 2n
z=

z=

10.2568
=0.5716
1.3

So using these values the pre-filter and controller transfer functions are

Gc ( s )=

6.42(s+0.58)
1
Gp ( s ) =
(s+1.22)
(1.3 s+0.75)

Matlab code
s=tf('s');
wn=0.45; zeta=0.59
G_plant=wn^2/(s^2+2*zeta*wn+wn^2);
G_cont=(6.42*(s+0.58))/(s+1.22);
G=series(G_plant,G_cont);
G_cl=feedback(G,1);
G_pre=1/(1.3*s+0.75);
step(G_cl*G_pre)
Output:

Figure 5 : Plot for CP5.5

Вам также может понравиться