Escolar Documentos
Profissional Documentos
Cultura Documentos
CENTRO DE ENGENHARIAS
CURSO DE ENGENHARIA ELÉTRICA
DISCIPLINA: ANÁLISE DE SINAIS E SISTEMAS
DOCENTE: ISAAC BARROS TAVARES DA SILVA
ALUNO: CARLOS HENRIQUE ROCHA DOS SANTOS
TRABALHO UNIDADE 3
%Definindo as variáveis
f=60;
Fs=180;
Ts=1/Fs;
%Dados da função
t = 0:0.001:1; %Intervalo de tempo e passo utilizado
x = sin(2*pi*f*t); %Definindo função sen(377t)
N1 = round(1/Ts);
n1 = 0:N1;
x1 = sin(2*pi*f*n1*Ts');
subplot(3,1,1);
plot(t,x)
xlabel ('tempo (s)')
ylabel ('Amplitude')
title('Sinal original de sen(377t)')
grid on
axis([0,1,-1.5,1.5]);
%Sinal discretizado
subplot(3,1,2);
stem(n1*Ts,x1,'.')
xlabel ('n')
ylabel ('x(n)')
title('Sinal discretizado')
grid on
axis([0,1,-1.5,1.5]);
Gráficos gerados:
%Definindo as variáveis
f = 60;
Fs = 180;
Ts = 1/Fs;
%Dados da função
t = 0:0.001:1; %Intervalo de tempo e passo utilizado
x = sin(2*pi*f*t); %Definindo função sen(377t)
N1 = round(1/Ts);
n1 = 0:N1;
x1 = sin(2*pi*f*n1*Ts');
subplot(3,1,1);
plot(t,x)
xlabel ('tempo (s)')
ylabel ('Amplitude')
title('Sinal original de sen(377t)')
grid on
axis([0,1,-1.5,1.5]);
%Sinal discretizado
subplot(3,1,2);
stem(n1*Ts,x1,'.')
xlabel ('n')
ylabel ('x(n)')
title('Sinal discretizado')
grid on
axis([0,1,-1.5,1.5]);
%Definindo as variáveis
f = 1;
T = 1/f;
Fs = 1000;
Ts = 1/Fs;
%Dados da função
t = -1:0.001:1; %Intervalo de tempo e passo utilizado
x = rectangularPulse(t/T); %Aplicando o degrau na função
N1 = round(1/Ts);
n1 = -N1:N1;
x1 = rectangularPulse(n1*Ts');
subplot(3,1,1);
plot(t,x)
xlabel ('tempo (s)')
ylabel ('Amplitude')
title('Sinal original de ret(t)')
grid on
axis([-1,1,-2,2]);
%Sinal discretizado
subplot(3,1,2);
stem(n1*Ts,x1,'.')
xlabel ('n')
ylabel ('x(n)')
title('Sinal discretizado')
grid on
axis([-1,1,-2,2]);
Agora o processo de amostragem é feito em uma função ret(t) onde será utilizado
o filtro passa baixa para a recuperação do sinal.
Gráficos gerados:
%Definindo as variáveis
f = 1;
Fs = 1000;
Ts = 1/Fs;
T = 1/f;
%Dados da função
t = -1:0.001:1; %Intervalo de tempo e passo utilizado
x = rectangularPulse(t/T); %Aplicando o degrau na função
subplot(3,1,1);
plot(t,x)
xlabel ('tempo (s)')
ylabel ('Amplitude')
title('Sinal original de ret(t)')
grid on
axis([-1,1,-1.5,1.5]);
%Sinal discretizado
subplot(3,1,2);
N1 = round(1/Ts);
n1 = -N1:N1;
x1 = rectangularPulse(n1*Ts');
stem(n1*Ts,x1,'.')
xlabel ('n')
ylabel ('x(n)')
title('Sinal discretizado')
grid on
axis([-1,1,-1.5,1.5]);
Agora o processo de amostragem é feito em uma função ret(t) onde será utilizado
o filtro butterworth para a recuperação do sinal.
Gráficos gerados:
%Definindo as variáveis
wm=380; %Frequência da função x(t) em Hertz
t=0:0.001:1; %Intervalo de tempo e passo utilizado
x=sawtooth(wm*t); %função dente de serra x(t)
subplot(3,1,1);
plot(t,x)
axis([0,0.1,-1.5,1.5]);
xlabel ('tempo (s)')
ylabel ('Amplitude')
title ('Sinal original da função dente de serra x(t)')
grid on
%Sinal discretizado
ws=10*wm; %Frequência de amostragem
Ts=(2*pi/ws); %Periodo de amostragem
fs=1/Ts;
n1=-ws:ws;
x1=sawtooth(wm*n1*Ts); %função discretizada
subplot(3,1,2);
stem(n1*Ts,x1,'.')
axis([0,0.1,-1.5,1.5]);
xlabel ('n')
ylabel ('x(n)')
title('Sinal discretizado')
grid on
%Definindo as variáveis
wm=380; %Frequência da função x(t) em Hertz
t=0:0.001:1; %Intervalo de tempo e passo utilizado
x=sawtooth(wm*t); %função dente de serra x(t)
subplot(3,1,1);
plot(t,x)
axis([0,0.1,-1.5,1.5]);
xlabel ('tempo (s)')
ylabel ('Amplitude')
title ('Sinal original da função dente de serra x(t)')
grid on
%Sinal discretizado
ws=10*wm; %Frequência de amostragem
Ts=(2*pi/ws); %Periodo de amostragem
fs=1/Ts;
n1=-ws:ws;
x1=sawtooth(wm*n1*Ts); %função discretizada
subplot(3,1,2);
stem(n1*Ts,x1,'.')
axis([0,0.1,-1.5,1.5]);
xlabel ('n')
ylabel ('x(n)')
title('Sinal discretizado')
grid on