Академический Документы
Профессиональный Документы
Культура Документы
3.
F =
1 1 2 3 5 8 13 21 34 55 89 1
44
solve((w*4*i)-(i/(w*1e-6)),w)
ans =
500
-500
De esto se obtiene:
I1 =
9.3834e+000 -1.1553e+002i
I2 =
-86.0994 +61.9916i
I3 =
-15.5530 + 4.1354i
IbB =
9.5483e+001 -1.7752e+002i
13. Para encontrar los polos y ceros del sistema es necesario encontrar las
raíces de los polinomios presentes, de esta manera, los inversos de las raíces
del numerador serán los ceros y los del denominador serán los polos.
14. Para hallar las raíces de los polinomios utilizamos la función roots
clear all
x=(-10:0.5:10);
for i=1:length(x)
f(i)=(x(i))^2+4*x(i)+3;
end
plot(x,f)
xlabel('x')
ylabel('f(x)')
TITLE('Polinomio grado 2')
Para el polinomio de
tercer grado:
clear all
x=(-4:1e-2:4);
for i=1:length(x)
f(i)= (x(i))^3+5*(x(i))^2+9*x(i)+5;
end
plot(x,f)
xlabel('x')
ylabel('f(x)')
TITLE('Polinomio
grado 3')
x=(-3:1e-4:4);
for i=1:length(x)
f(i)=2*(x(i))^5-4*(x(i))^4-12*(x(i))^3+27*(x(i))^2+8*x(i)-16;
end
plot(x,f)
xlabel('x')
ylabel('f(x)')
TITLE('Polinomio grado 5')
15. Se tiene una función
de transferencia de un
circuito, que relaciona los
voltajes de salida y de entrada, para encontrar el voltaje de salida utilizamos la
Transfromada de Laplace por medio del siguiente código:
syms s t;
Vi=2.3*exp(-2*t)*cos(5*t+(pi/6));
FVi=laplace(Vi)
Vo=(20*s*FVi)/(15*s^2+23*s+16)
ilaplace(Vo)
Vo =
23*s*(3^(1/2)*s+2*3^(1/2)-5)/(s^2+4*s+29)/(15*s^2+23*s+16)
ans =
23/13210150*(-sin(1/30*431^(1/2)*t)*431^(1/2)*(3289*3^(1/2)-
8453)+431*cos(1/30*431^(1/2)*t)*(-419+47*3^(1/2)))*exp(-
23/30*t)+23/30650*exp(-2*t)*(sin(5*t)*(47+419*3^(1/2))-cos(5*t)*(-
419+47*3^(1/2)))
D1=1-10^(-Amax/20)
D2=10^(-Amin/20)
l2=log(Wp/Ws);
N=ceil((l/l2)/2)
W1=Wp/((10^(0.1*Amax)-1)^(1/(2*N)));
W2=Ws/((10^(0.1*Amin)-1)^(1/(2*N)));
Wc=ceil((W1+W2)/2)
t=1:1:2*N;
H1=0*t;
H1(1)=1;
H1(2*N+1)=1;
Raices=roots(H1);
for i=1:2*N
if real(Raices(i))<0
Pol(i)=Raices(i);
end
end
[x,y]=zp2tf([],Pol,[1])
y=y/Wc;
[z,p,k]=tf2zpk(x,y);
H=zpk([z],[p],[k])
bode(H)
En Consola:
>> ejercicio16(3000,3300,1,40)
D1 =
0.1087
D2 =
0.0100
N =
56
Wc =
3038
x =
Columns 1 through 20
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
Columns 21 through 40
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
Columns 41 through 57
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1
y =
1.0e+013 *
Columns 1 through 12
Columns 13 through 24
0.0008 0.0021 0.0051 0.0115 0.0241 0.0473 0.0869
0.1497 0.2423 0.3693 0.5307 0.7197
Columns 25 through 36
Columns 37 through 48
Columns 49 through 57
Zero/pole/gain:
3038
----------------------------------------------------------------------
-----------------------------------------------
Y el diagrama de Bode:
D1=1-10^(-Amax/20)
D2=10^(-Amin/20)
l2=log(Wp/Ws);
N=ceil((l/l2)/2)
W1=Wp/((10^(0.1*Amax)-1)^(1/(2*N)));
W2=Ws/((10^(0.1*Amin)-1)^(1/(2*N)));
Wc=ceil((W1+W2)/2)
t=1:1:2*N;
H1=0*t;
H1(1)=1;
H1(2*N+1)=1;
Raices=roots(H1);
for i=1:2*N
if real(Raices(i))<0
Pol(i)=Raices(i);
end
end
[x,y]=zp2tf([],Pol,[1])
y=y/Wc;
[z,p,k]=tf2zpk(x,y);
H=zpk([z],[p],[k])
syms s t;
e= sin(377*t)+sin(3500*t);
es=laplace(e);
F1=tf(377, [1 0 142129]);
FT=F1+F2
FcE=H*FT;
figure
hold on
bode (H)
bode (FcE)
Transfer function:
-------------------------------
y el diagrama de Bode:
Transfer function:
y el diagrama de Bode:
17. Cuando se hace variar el orden del filtro el programa queda de la siguiente
forma:
function filtro=ejercicio16(Wp,Ws,Amax,Amin,N)
W1=Wp/((10^(0.1*Amax)-1)^(1/(2*N)));
W2=Ws/((10^(0.1*Amin)-1)^(1/(2*N)));
Wc=ceil((W1+W2)/2)
t=1:1:2*N;
H1=0*t;
H1(1)=1;
H1(2*N+1)=1;
Raices=roots(H1);
for i=1:2*N
if real(Raices(i))<0
Pol(i)=Raices(i);
end
end
[x,y]=zp2tf([],Pol,[1])
y=y/Wc;
[z,p,k]=tf2zpk(x,y);
H=zpk([z],[p],[k])
bode(H)
Ejemplo:
>> ejercicio17(3000,3300,1,40,100)
Wc =
3086
x =
Columns 1 through 20
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
Columns 21 through 40
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
Columns 41 through 60
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
Columns 61 through 80
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
Column 101
y =
1.0e+024 *
Columns 1 through 12
Columns 13 through 24
Columns 25 through 36
0.0000 0.0001 0.0001 0.0003 0.0006 0.0013 0.0025
0.0047 0.0086 0.0153 0.0261 0.0430
Columns 37 through 48
Columns 49 through 60
Columns 61 through 72
Columns 73 through 84
Columns 85 through 96
Zero/pole/gain:
3086
----------------------------------------------------------------------
------------------------------------------------------