Stuck in demodulation of AM

조회 수: 3 (최근 30일)
Abdul Basit Jaweed
Abdul Basit Jaweed 2016년 4월 23일
편집: Walter Roberson 2021년 1월 29일
I am working on a Amplitude modulation and Demodulation But i have facing trouble in only demodulation using RC low pass Filter I have upload my code and also required results picture
clear all;
close all;
t1 = [0:0.001:10];
Ac=1; fc =10; fm=1; C = 1.5;
carrier = Ac*sin(2*pi*fc*t1); % Carrier signal, Ac and fc are amplitude and frequency
message = sin(2*pi*fm*t1); % Modulating signal, fm is message frequency
am = Ac*(C + message).*carrier; % am is Modulated signal first method
%am = ammod(message,fc,2*fc); % am is Modulated signal second method
r = abs(am); % Rectified Signal
% [num,den] = butter(1,fc*2/fm); % Lowpass filter
% s1 = amdemod(am,fc,fm,0,0,num,den); % Demodulate
figure(1);
subplot(3,1,1) plot(t1, message); title('Original Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;
subplot(3,1,2) plot(t1, carrier); title('Carrier Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;
subplot(3,1,3) plot(t1, am); title('AM Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;
figure(2);
subplot(3,1,1) plot(t1, r); title('Rectified Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;
subplot(3,1,2) plot(t1, s1); title('Demodulated Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;
picture of required waveform
  댓글 수: 2
Star Strider
Star Strider 2016년 4월 23일
I don’t have the Communications System Toolbox so I won’t list this as an Answer, since I can’t run your code.
It seems that your demodulated signal simply has high-frequency noise. I would re-design your low-pass filter, either to have a lower cutoff frequency or a sharper cutoff (higher order). I would also use the filtfilt function if you have the Signal Processing Toolbox (or if the Communications System Toolbox has it or a version of it, since it is phase-neutral).
Palempalle Pavan Kumar Reddy
Palempalle Pavan Kumar Reddy 2021년 1월 29일
yes, It's doesn't working fine showing error like ..
Error using butter (line 58)
The cutoff frequencies must be within the interval of (0,1).
Error in goona (line 13)
[num,den] = butter(2,fc*2/fm)

댓글을 달려면 로그인하십시오.

답변 (1개)

Mathieu NOE
Mathieu NOE 2021년 1월 29일
hello
you should use a bandpass filter to remove the DC value of the rectified signal
clear all;
close all;
Fs = 1000;
dt = 1/Fs;
t1 = [0:dt:10];
Ac=1;
fc =10;
fm=1;
C = 1.5;
carrier = Ac*sin(2*pi*fc*t1); % Carrier signal, Ac and fc are amplitude and frequency
message = sin(2*pi*fm*t1); % Modulating signal, fm is message frequency
am = Ac*(C + message).*carrier; % am is Modulated signal first method
%am = ammod(message,fc,2*fc); % am is Modulated signal second method
r = abs(am); % Rectified Signal
% filter
f_high = 2*fm;
f_low = 0.5*fm;
[num,den] = butter(2,[f_low f_high]*2/Fs); % Lowpass filter
% s1 = amdemod(am,fc,fm,0,0,num,den); % Demodulate
s1 = filter(num,den,r);
figure(1);
subplot(3,1,1),plot(t1, message); title('Original Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;
subplot(3,1,2),plot(t1, carrier); title('Carrier Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;
subplot(3,1,3),plot(t1, am); title('AM Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;
figure(2);
subplot(2,1,1),plot(t1, r); title('Rectified Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;
subplot(2,1,2),plot(t1, s1); title('Demodulated Signal'); xlabel('Time'); ylabel('Amplitude'); grid on;

카테고리

Help CenterFile Exchange에서 Modulation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by