Control Proje 1.2

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Question 1

b)
num=[1];
den=[1,4,7,0];
y=tf(num,den);
rlocus(y)
Gm=margin(y)
Question 2
b)

d)
den= [1 5 6]
num=1
num2=20*[1 0.06]
den2=[1 0.01]
sys1=tf(num,den)
sys2=tf(num2,den2)
sys=sys1*sys2
bode(sys)
sys =
20 s + 1.2
------------------------------
s^3 + 5.01 s^2 + 6.05 s + 0.06

Question 3
b)

d)
num1 = 10
den1= [1 6 5]
num2=20*[1 0.022]
den2=[1 0.01]
sys1=tf(num1,den1)
sys2=tf(num2,den2)
sys=sys1*sys2
bode(sys)

Question 4
c)
A=[0 1 0;0 0 1;0 0 0];
B=[0;0;1];
P=[-12.6+12.85j;-12.6-12.85j; -63]
P=[-12.6+12.85i;-12.6-12.85i; -63]
K=acker(A,B,P)
K=
1.0e+04 *
2.0405 0.1911 0.0088

d)

plot(out.t,out.y)
xlabel('time')
ylabel('y')
grid on
plot(out.t,out.x1)
hold on
plot(out.t,out.x2)
plot(out.t,out.x3)
xlabel('time')
ylabel('x1, x2, x3')
grid on

f)
F=[0 1 0; 0 0 1; 0 0 0]
H=[1 0 0]
P=[-50;-55;-132]
L=acker(F',H',P')
P=
-50
-55
-132
L=
237 16610 363000

i)
subplot(2,2,1)
hold on
plot(out.t,out.y)
ylabel('y')
subplot(2,2,2)
plot(out.t,out.x1)
hold on
plot(out.t,out.x1hat)
ylabel('x1, x1hat')
subplot(2,2,3)
plot(out.t,out.x2)
hold on
plot(out.t,out.x2hat)
ylabel('x2, x2hat')
subplot(2,2,4)
plot(out.t,out.x3)
hold on
plot(out.t,out.x3hat)
ylabel('x3, x3hat')
k)
Question 5
b=0.01
k=100
m=1
F=[-b/m -k/m; 1 0]
G=[1/m ; 0]
H=[0 1]
J=0
P=[-2;-5]
acker(F,G,P)
ans =
6.9900 -90.0000

P1=[-10;-15]
acker(F',H',P1)
ans =
49.7501 24.9900

e)

h)
l)

m)
Question 6
num=1;
den=[1 4 7 0];
h=tf(num,den);
nyquistplot(h);

You might also like