Buscar

R3 - Transmissão de Dados

Prévia do material em texto

Table of Contents
 ........................................................................................................................................ 1
Item A .............................................................................................................................. 1
Item B ............................................................................................................................... 2
Item C ............................................................................................................................... 4
Item D .............................................................................................................................. 4
%Transmissão de Dados
%Prática 3
%Aluno: Gabriel Lourenço
%RA: 2142856
Item A
clear all;
close all;
clc;
load audio_lab03;
ka = 1;
Ac = 2;
fc = 6000;
Fs = 44100;
Ts=1/Fs;
t = linspace(0,0.9072,40000);
ct = Ac.*cos(2*pi*fc*t);
st = (1+(ka.*m)).*ct';
figure(1);
subplot(3,1,1)
plot(t,m)
xlim([0 0.9072]);
xlabel('Tempo');
ylabel('Amplitude');
title('Sinal modulante');
subplot(3,1,2)
plot(t,ct)
xlim([0.3 0.310]);
xlabel('Tempo');
ylabel('Amplitude');
title('Portadora');
subplot(3,1,3)
plot(t,st)
xlim([0.3 0.325]);
xlabel('Tempo');
ylabel('Amplitude');
title('Sinal modulado');
1
Item B
figure(2)
N = length(t);
fm = fft(m)/N;
M = abs(fftshift(fm));
F = linspace(-fs/2,fs/2,40000);
fst = fft(st)/N;
ST = abs(fftshift(fst));
subplot(2,1,1)
plot(F/1000,M)
xlim([0 fs/2000]);
xlabel('Frequencia [kHz]');
ylabel('Amplitude');
title('Sinal modulante');
subplot(2,1,2)
plot(F/1000,ST)
xlim([0 fs/2000]);
xlabel('Frequencia [kHz]');
ylabel('Amplitude');
title('Sinal modulado');
2
3
Item C
figure(3)
subplot(3,1,1)
pwelch(m,[],[],[],fs);
subplot(3,1,2)
pwelch(ct,[],[],[],fs);
subplot(3,1,3)
pwelch(st,[],[],[],fs);
Item D
mdmod = amdemod(m,fc,fs);
md = mdmod -mean(mdmod);
mdq = md.^2;
NMSE = (sum((m-md).^2)/(sum(mdq)))
figure(4)
plot(t,md)
xlim([0 0.9072]);
title('Sinal Demodulado');
4
NMSE =
 2.6387
5
Published with MATLAB® R2021a
6
	Table of Contents
	
	Item A
	Item B
	Item C
	Item D

Continue navegando