Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Td_amp=0 % disturbio
Td_amp = 0
syms t x y
A=[0 0 1 0;0 0 0 1;0 0 -9.2602 0;0 0 0 -3.4872]; % matriz A
B=[0 0;0 0 ;2.3613 0.0787;0.2402 0.7895]; % matriz B
C=[1 0 0 0;0 1 0 0]; % matriz C
D=[0 0;0 0]; % matriz D
[num1,den1]=ss2tf(A,B,C,D,1); % tf1
[num2,den2]=ss2tf(A,B,C,D,2); % tf2
helicoptero=ss(A,B,C,D);
Análisis de estabilidad
Análisis de controlabilidad
a) Polos dominantes
Nbar1=-inv(C*inv(A-B*K1)*B); % ganancia
step(A-B*K1, B*Nbar1,C,D); % grafica con filtro
pd=p((p<0))
Warning: A complex gain matrix is required when the pole locations are not specified as
complex conjugate pairs.
% Td_amp=0.05
Warning: A complex gain matrix is required when the pole locations are not specified as
complex conjugate pairs.
Nbar3=-inv(C*inv(A-B*K3)*B); % ganancia
step(A-B*K1, B*Nbar3,C,D); % grafico con filtro
a) sistema aumentado
Ahat = [A , zeros(nx,ny)
-C, zeros(ny,ny)]; % matriz aumentada de A
Bhat = [ B
zeros(ny,nu)]; Chat = [C % matriz aumentada de B
zeros(ny,ny)]; % matriz aumentada de C
pd=[p ; -1 ; -0.9]; % nuevos polos
Khat=place(Ahat,Bhat,pd); % matriz de ganancia de retroalimentacion
Ki = Khat(:,5:6);
Kx= Khat(:,1:4);
Kr=-inv(C*inv(A-B*Kx)*B); % ganancia
b) polos debido al PI
p1=eig(Ahat-Bhat*Khat);
p2=eig(A);
step(Ahat-Bhat*Khat, Bhat*Kr,Chat,D); % grafico con filtro
DISEÑO DEL OBSERVADOR:
pl =
-2.0000
-2.0000
-1.0000
-0.9000
L=place(A',C',pl)'
L =
- 0
6.360
2
0 -
0.4872
60.69 0
67
0 3.6990
●
Observador Completo:
stepinfo(planta_lc)
Observador reducido:
COMPENSADOR:
B1=[0;0;2.3613;0.2402]
B1 =
0
0
2.3613
0.2402
C1=[1 0 0 0]
C1 =
1 0 0 0
D1=[0]
D1 = 0
K11=K1(1,1:4)
K11 =
1.2249 -0.4357 -3.1054 -0.2720
L1=[-6.3602;0;60.6967;0]
L1 =
-6.3602
0
60.6967
0
planta1=ss(A,B1,C1,D1)
planta1 =
A
=
x1 x2 x3 x4
x 0 0 1 0
1
x 0 0 0 1
2
x 0 0 - 0
3 9.26
x 0 0 0 -
4 3.487
B =
u1
x1 0
x2 0
x3 2.361
x4 0.2402
C =
x1 x2 x3 x4
y1 1 0 0 0
D =
u1
y1 0
Comp=reg(planta1,K11,L1);
NU=zpk(Comp*planta1);
Gc_G=minreal(zpk(Comp*planta1));
GOL=-Comp*planta1
GOL =
A =
x1_e x2_e x3_e x4_e ? ? ? ?
x1_e 6.36 0 1 0 -6.36 0 0 0
x2_e 0 0 0 1 0 0 0 0
x3_e -63.59 1.029 -1.927 0.6422 60.7 0 0 0
x4_e -0.2942 0.1046 0.7459 -3.422 0 0 0 0
? 0 0 0 0 0 0 1 0
? 0 0 0 0 0 0 0 1
? 0 0 0 0 0 0 -9.26 0
? 0 0 0 0 0 0 0 -
3.487
B =
u1
x1_e 0
x2_e 0
x3_e 0
x4_e 0
? 0
? 0
? 2.36
1
? 0.240
2
C =
x1_e x2_e x3_e x4_e ? ? ? ?
u1 1.225 -0.4357 -3.105 -0.272 0 0 0 0
D =
u1
u1 0
Outpu groups:
t
Name Channels
Controls 1
Gc_G=minreal(zpk(Comp*planta1))
Gc_G =
From input to output "u1":
463.48 (s-0.01123) (s+3.487)
Output groups:
Name Channels
Controls 1
T=minreal(zpk(feedback(-Gc_G,1)))
T =
Output groups:
Name Channels
Controls 1
sist_comp=ss(feedback(-Gc_G,1));
step(sist_comp)
stepinfo(sist_comp)
t=linspace(0,3.5)';
u=ones(length(t),1);
[y,t,x]=lsim(sist_comp,u,t);
plot(t,x,'--')
plot(t,y)
Respuesta a la frecuencia del compensador:
bode(GOL)
margin(A,B1,C1,D1)
2.- Analisis de la segunda salida
B2=[0;0;0.0787;0.7895]
B2 =
0
0
0.0787
0.7895
C2=[0 1 0 0]
C2 =
0 1 0 0
D2=[0]
D2 = 0
K12=K1(2,1:4)
K12 =
-0.4539 12.2561 0.8579 7.2885
L2=[0;-0.4872;0;3.6990]
L2 =
0
-0.4872
0
3.6990
planta2=ss(A,B2,C2,D2)
plant =
a2
A =
x1 x2 x3 x4
x1 0 0 1 0
x2 0 0 0 1
x3 0 0 - 0
9.26
x4 0 0 0 -
3.487
B =
u1
x1 0
x2 0
x3 0.078
7
x4 0.789
5
C =
x1 x3
x2 x4
y1 0 0 0
1
D =
u1
y1 0
Continuous-time state-space model.
Comp2=reg(planta2,K12,L2);
NU2=zpk(Comp*planta2);
Gc_G2=minreal(zpk(Comp2*planta2));
GOL2=-Comp2*planta2
GOL2 =
A =
x1_e x2_e x3_e x4_e ? ? ? ?
x1_e 0 0 1 0 0 0 0 0
x2_e 0 0.4872 0 1 0 - 0 0
0.4872
x3_e 0.03572 -0.9646 -9.328 -0.5736 0 0 0 0
x4_e 0.3584 -13.38 - -9.241 0 3.699 0 0
0.6773
? 0 0 0 0 0 0 1 0
? 0 0 0 0 0 0 0 1
? 0 0 0 0 0 0 - 0
9.26
? 0 0 0 0 0 0 0 -
3.487
B =
u
1
x1_e
0
x2_e
0
x3_e
0
x4_e
0
?
0
?
0
?
0.0787
?
0.7895
C =
x1_e x2_e x3_e x4_e ? ? ? ?
u1 -0.4539 12.26 0.8579 7.289 0 0 0 0
D =
u1
u1 0
Output
groups: Channel
Name s
Controls 1
Gc_G2=minreal(zpk(Comp2*planta2))
Gc_G2 =
Output groups:
Name Channels
Controls 1
T2=minreal(zpk(feedback(-Gc_G2,1)))
T2 =
From input to output "u1":
16.571 (s+9.26) (s+1.168)
Output groups:
Name Channels
Controls 1
sist_comp2=ss(feedback(-Gc_G2,1));
step(sist_comp2)
stepinfo(sist_comp2)
t=linspace(0,3.5)';
u=ones(length(t),1);
[y,t,x]=lsim(sist_comp2,u,t);
plot(t,x,'--')
plot(t,y)
margin(A,B2,C2,D2)
ESTABILIDAD DE LYAPUNOV:
Q
=
1 1 0 1
1 1 1 0
0 1 1 0
1 0 0 1
E
=
1 2 3 1
2 1 0 1
3 0 2 0
1 1 0 1
xl =
1.0e+2 *
92
0.9762 - 0.0000 -
6.016 0.0000
1
- 1.155 - -
6.0161 2 0.0000 0.0000
0.0000 - 0.0000 0.0000
0.000
0
- - 0.0000 0.0000
0.0000 0.000
0
px=eig(xl) % polos de xl se puede observar que dos de sus polos son negativo por lo tanto es s
px =
1.0e+292
-4.9510
-0.0000
0.0000
7.0824