PRÁCTICA 2.
Modelación de Sistemas Lineales
Nombre: Pablo Alejandro Chávez Pérez
Grupo: GR4
Pregunta 1.
R=100;
L=160e-3;
C1=1e-6;
C2=2e-6;
sim('Desarrollo2');
figure
plot(out.Vo(:,1),out.Vo(:,2))
title('Voltaje en el inductor')
xlabel('Tiempo [s]')
ylabel('Voltaje [V]')
grid on
Pregunta 2
1
num=[(2*L*R*C2) (L) 0];
den=[(2*L*R^2*C1*C2) (L*R*C1+2*R*L*C2) (2*C2*R^2+2*R^2*C1+L) (3*R)]
den = 1×4
0.0000 0.0001 0.2200 300.0000
H=tf(num,den)
H =
6.4e-05 s^2 + 0.16 s
--------------------------------------
6.4e-09 s^3 + 8e-05 s^2 + 0.22 s + 300
Continuous-time transfer function.
H=zpk(H)
H =
10000 s (s+2500)
---------------------------------
(s+9363) (s^2 + 3137s + 5.006e06)
Continuous-time zero/pole/gain model.
figure
step(H)
2
Pregunta 3
A=[0 1/L -1/L;-1/C1 -1/(R*C1) 0;1/C2 0 -1/(2*R*C2)];
B=[0;1/(R*C1);0]
B = 3×1
0
10000
0
C=[0 1 -1];
D=0;
F_trans=ss(A,B,C,D)
F_trans =
A =
x1 x2 x3
x1 0 6.25 -6.25
x2 -1e+06 -1e+04 0
x3 5e+05 0 -2500
B =
u1
x1 0
x2 1e+04
x3 0
C =
x1 x2 x3
y1 0 1 -1
D =
u1
y1 0
Continuous-time state-space model.
H3=tf(F_trans)
H3 =
10000 s^2 + 2.5e07 s
-----------------------------------------
s^3 + 1.25e04 s^2 + 3.437e07 s + 4.687e10
Continuous-time transfer function.
figure
step(F_trans)
3
Pregunta 4
Como se puede observar, tanto por el diagrama de bloques, función de transferencia y por variables de estado,
se puede llegar a la misma respuesta, y se comprobó realizando las gráficas de los 3 métodos.
4
sim('Desarrollo2');
figure
plot(out.Salidas(:,1),out.Salidas(:,2))
hold on
plot(out.Salidas(:,1),out.Salidas(:,3))
plot(out.Salidas(:,1),out.Salidas(:,4))
legend('Diagrama de bloques','Funcion de transferencia','Variables de Estado')
title('Voltaje en el Inductor')
xlabel('Tiempo [s]')
ylabel('Voltaje [V]')
5
Pregunta 5
[num1,den1]=tfdata(F_trans,'v')
num1 = 1×4
0 10000 25000000 0
den1 = 1×4
1010 ×
0.0000 0.0000 0.0034 4.6875
H5=zpk(H3)
H5 =
10000 s (s+2500)
---------------------------------
(s+9363) (s^2 + 3137s + 5.006e06)
Continuous-time zero/pole/gain model.
[z,p,k]=zpkdata(H5,'v')
z = 2×1
0
-2500
p = 3×1 complex
103 ×
-9.3635 + 0.0000i
-1.5683 + 1.5958i
-1.5683 - 1.5958i
6
k = 10000
p1=pole(H5)
p1 = 3×1 complex
103 ×
-9.3635 + 0.0000i
-1.5683 + 1.5958i
-1.5683 - 1.5958i
z1=zero(H5)
z1 = 2×1
0
-2500
pzmap(H5)