You are on page 1of 12

2020

SEÑALES Y SISTEMAS

TRABAJO PRACTICO N°2


ROSALEZ VICTORIA

 | LU:49213
%Ejercicio N°1

clear
T=0.008;
A=1;
t=0:0.0001:0.02;
for i=1:20

g(i,:)=((8*A/(pi)^2)*(((-1)^i)-((-1)^(2*i-1))-2)/
(2*i^2))*cos((2*pi*i*t)/T);

end
h=sum(g);
plot(t,h)
title('Señal triangular')
xlabel('Periodo')
ylabel('G(t)')
%Ejercicio numero 2

syms T t;
z=4;
for n=1:10
x=cos(2*n*pi*t/T)/T;
y=sin(2*n*pi*t/T)/T;
a=2*4*int(x,0,T/4);
b=2*4*int(y,0,T/4);
a0=1/T*int(z,0,T/4);
an(1,n)=a;
bn(1,n)=b;
end
%generacion de los coeficientes
T=4;
i=1;
for t=0:0.01:4
for n=1:10
M=an(1,n)*cos(n*pi*t/2);
N=bn(1,n)*sin(n*pi*t/2);
H(1,n)=M+N;
end
F(1,i)=sum(H)+a0;
i=i+1;
end
%sintetizacion de la funcion
F=F+1;
t=0:0.01:4;
plot(t,F)
xlabel('tiempo')
ylabel('G(t)')
title('onda cuadrada')

Desarrollo de forma analítica


%Ejercicio 3
m=20;
T=0.01;
V=17;%amplitud
t=linspace(0,0.01,100);
y=V*sin(2*pi*100*t);
x=0.5*(1+square(2*pi*t/T,50));
f=y.*x;
for i=-20:20
Cn(i+m+1)=(1/T)*trapz(t,f.*exp(-j*i*2*pi*(t/T)));
g(i+m+1,:)=Cn(i+m+1)*exp(j*i*2*pi*(t/T));
end
c=sum(g);
% graficos
%funcion sintetizada
subplot(2,2,[1 1])
plot(t,f)
xlabel('tiempo');
ylabel('g(t)');
%funcion calculada con la serie
subplot(2,2,[2 2])
plot(t,c)
xlabel('tiempo');
ylabel('funcion sintetizada');
%analisis de la señal
subplot(2,1,2)
h=-20:1:20;
stem(h,abs(Cn));
xlabel('tiempo')
ylabel('espectro de amplitudes')
%Ejercicio cuatro
%Coeficientes de la forma de onda triangular
t=[0:0.001:2];
y=sawtooth(2*pi*0.5*t,0.5)+1;
u=50;%armonicos
plot(t,y)
for n=-u:u
C(n+u+1)=(1/2)*trapz(t,y.*exp(-1*i*(pi)*n*t));
f(n+u+1,:)=(C(n+u+1)*exp(-1*i*(pi)*n*t));
end
e=sum(f);
plot(t,e)
xlabel('tiempo')
ylabel('V(t)')
SEÑAL TRIANGULAR SINTETIZADA

%la corriente que circula por el siguiente circuito sabiendo que la


forma de
%onda de la tensión aplicada es la triangular.

%Grafico de la señal de la corriente sintetizada


t=0:0.0001:2;
y=((sawtooth(2*pi*0.5*t,0.5)+1));
plot(t,y);
m=50;
for n=-m:m
Cn(1,n+m+1)=0.5*trapz(t,y.*exp(-1i*n*2*pi*0.5*t));
X(n+m+1,:)=Cn(1,n+m+1)*exp(-1i*n*2*pi*0.5*t)./(3+1i*2*n*pi*0.5*4);
end
x=sum(X);
plot(t,x)
%ejercicio cinco

syms s R2 L V R1
Is=((V/R1)/((R2/L)+s));
It=ilaplace(Is);
disp('Corriente en el Dominio de La place')
pretty(Is)
disp('Corriente en el Dominio del tiempo')
pretty(It)

clear
%Ejercicio seis
%Ejercicio 7

%Ejercicio siete
R1=200e3;
R2=40e3;
R3=50e3;
C1=25e-9;
C2=10e-9;
A= R1*R3*C1*C2;
B=(1/(C1*R3))*(1+R3/R1 + R3/R2);
C= 1/(C1*C2*R2*R3);
num= -1;
den = [A , A*B, A*C];
%Funcion transferencia
G=tf(num,den)
figure
bode(G)

You might also like