Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Taller Segundo Corte

Deiby Jesús Rincón López

U00119033

Punto 1.

1
syms m3 m2 m1 fv3 fv2 fv1 k1 k2 k3 s

Matrix_coeff = [-k3,m2*s^2+fv3*s+k3,-fv3*s;...
-fv1*s,-fv3*s,m3*s^2+fv3*s+fv1*s+k1;...
m1*s^2+fv1*s+k3+k2+fv2*s,-k3,-fv1*s]

Matrix_coeff =

Matrix_res = [1;0;0];
Matrix_var = inv(Matrix_coeff)*Matrix_res;

G = collect(Matrix_var(3))

G =

k1 = 5;
k2 = 4;
k3 = 4;
fv1 = 2;
fv2 = 2;
fv3 = 3;
m1 = 4;
m2 = 5;
m3 = 5;

2
G_s =((fv3*m1)*s^3 + (fv1*fv3 + fv2*fv3)*s^2 + (fv1*k3 + fv3*k2 + fv3*k3)*s)/((m1*m2*m3)*s^6 +

G_s =

s = tf('s');
Gs = ((fv3*m1)*s^3 + (fv1*fv3 + fv2*fv3)*s^2 + (fv1*k3 + fv3*k2 + fv3*k3)*s)/((m1*m2*m3)*s^6 +
figure(1)
pzmap(Gs)

figure(2)
impulse(Gs)
title('Respuesta ante el impulso f = \delta(t)')

3
figure(3)
step(Gs)
stepinfo(Gs)

ans = struct with fields:


RiseTime: 0
SettlingTime: 37.1447
SettlingMin: -0.0664
SettlingMax: 0.1464
Overshoot: Inf
Undershoot: Inf
Peak: 0.1464
PeakTime: 3.8480

title('Respuesta ante el Escalón unitario f = u(t)')


print('Ingrese acá la frecuencia de oscilacion de la sinusoidal en Hertz')

4
f = 60

f = 60

w = 2*pi*f;
Fin = w/(s^2+w^2);
X1 = Gs*Fin;
figure(4)
impulse(X1)
title("Respuesta ante una fuerza sinusoidal f(t) = Sen(2\pi("+f+")t)")

5
figure(5)
bode(Gs)
title('Respuesta en frecuencia por Diagrama de Bode de G(s)')

6
Punto 2
Considere el sistema eléctrico planteado en la figura, halle su función de transferencia G(s) = V3(s)/Vin(s)

7
syms R1 R2 R3 R5 R6 R7 s C1 C2 C3
Z1 = R5/(1+s*C1*R5);
Z2 = R6/(1+s*C2*R6);
Z3 = R7/(1+s*C3*R7);

M_coeff = [(R1 + Z1),-Z1,0,0;-Z1,(R2+Z1+Z2),-Z2,0;...


0,-Z2,(R3+Z2),1;0,0,Z3,-1]

M_coeff =

8
M_res = [1;0;0;0];
M_var = inv(M_coeff)*M_res;

G = collect(M_var(4));

R1 = 100;
R2 = 220;
R3 = 470;
R5 = 10000;
R6 = 10000;
R7 = 10000;

C1 = 100e-6;
C2 = 100e-6;
C3 = 470e-6;

G_s =(R5*R6*R7)/(C1*C2*C3*R1*R2*R3*R5*R6*R7*s^3 +...


(C1*C2*R1*R2*R3*R5*R6 + C1*C3*R1*R2*R3*R5*R7 +...
C1*C2*R1*R2*R5*R6*R7 + C2*C3*R1*R2*R3*R6*R7 +...
C1*C3*R1*R2*R5*R6*R7 + C1*C3*R1*R3*R5*R6*R7 +...
C2*C3*R1*R3*R5*R6*R7 + C2*C3*R2*R3*R5*R6*R7)*s^2 +...
(C1*R1*R2*R3*R5 + C2*R1*R2*R3*R6 + C1*R1*R2*R5*R6 +...
C1*R1*R2*R5*R7 + C1*R1*R3*R5*R6 + C3*R1*R2*R3*R7 +...
C2*R1*R3*R5*R6 + C2*R1*R2*R6*R7 + C2*R2*R3*R5*R6 +...
C3*R1*R2*R6*R7 + C3*R1*R3*R5*R7 + C1*R1*R5*R6*R7 +...
C3*R1*R3*R6*R7 + C3*R2*R3*R5*R7 + C2*R1*R5*R6*R7 +...
C2*R2*R5*R6*R7 + C3*R1*R5*R6*R7 + C3*R2*R5*R6*R7 +...
C3*R3*R5*R6*R7)*s + R1*R2*R3 + R1*R2*R6 + R1*R3*R5 +...
R1*R2*R7 + R1*R3*R6 + R2*R3*R5 + R1*R5*R6 + R1*R5*R7 +...
R2*R5*R6 + R1*R6*R7 + R2*R5*R7 + R3*R5*R6 + R5*R6*R7)

G_s =

9
s = tf('s');
Gs = (R5*R6*R7)/(C1*C2*C3*R1*R2*R3*R5*R6*R7*s^3 +...
(C1*C2*R1*R2*R3*R5*R6 + C1*C3*R1*R2*R3*R5*R7 +...
C1*C2*R1*R2*R5*R6*R7 + C2*C3*R1*R2*R3*R6*R7 +...
C1*C3*R1*R2*R5*R6*R7 + C1*C3*R1*R3*R5*R6*R7 +...
C2*C3*R1*R3*R5*R6*R7 + C2*C3*R2*R3*R5*R6*R7)*s^2 +...
(C1*R1*R2*R3*R5 + C2*R1*R2*R3*R6 + C1*R1*R2*R5*R6 +...
C1*R1*R2*R5*R7 + C1*R1*R3*R5*R6 + C3*R1*R2*R3*R7 +...
C2*R1*R3*R5*R6 + C2*R1*R2*R6*R7 + C2*R2*R3*R5*R6 +...
C3*R1*R2*R6*R7 + C3*R1*R3*R5*R7 + C1*R1*R5*R6*R7 +...
C3*R1*R3*R6*R7 + C3*R2*R3*R5*R7 + C2*R1*R5*R6*R7 +...
C2*R2*R5*R6*R7 + C3*R1*R5*R6*R7 + C3*R2*R5*R6*R7 +...
C3*R3*R5*R6*R7)*s + R1*R2*R3 + R1*R2*R6 + R1*R3*R5 +...
R1*R2*R7 + R1*R3*R6 + R2*R3*R5 + R1*R5*R6 + R1*R5*R7 +...
R2*R5*R6 + R1*R6*R7 + R2*R5*R7 + R3*R5*R6 + R5*R6*R7);
figure(1)
pzmap(Gs)

figure(2)
impulse(Gs)
title('Respuesta ante el impulso V_in = \delta(t)')

10
figure(3)
step(Gs)
stepinfo(Gs)

ans = struct with fields:


RiseTime: 0.7773
SettlingTime: 1.4082
SettlingMin: 0.8025
SettlingMax: 0.8895
Overshoot: 0
Undershoot: 0
Peak: 0.8895
PeakTime: 2.5847

title('Respuesta ante el Escalón unitario V_in = u(t)')


print('Ingrese acá la frecuencia de oscilacion de la tension sinusoidal en Hertz')

11
f = 60

f = 60

w = 2*pi*f;
Fin = w/(s^2+w^2);
X1 = Gs*Fin;
figure(4)
impulse(X1)
title("Respuesta ante una fuerza sinusoidal V_in(t) = Sen(2\pi("+f+")t)")

12
figure(5)
bode(Gs)
title('Respuesta en frecuencia por Diagrama de Bode de G(s)')

13
14

You might also like