Help with filtering of DSB modulation.
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to implement use of a 6th order butterworth bandpass filter for my modulated DSB signal to suppress the lower sideband, and then plot the USSB in both time and frequency domain. My code works for the DSB Modulation, but when I enter the filtering command, it suppresses the upper sideband as opposed to the lower one. Also I have to do this for a 3rd order butterworth as well. In reading the documentation, the bandpass Butterworth command in Matlab account for n as'2n'. I tried to enter 1.5 for n and it failed to work? Is there anyway to do this?
fc=1000; %1000 Hz carrier
T=1/fc;
Ac=10;
fm=100;
Am=1;
t=-0.025:T/10:0.025;
wc1=(fc-2*fm)/10000;
wc2=(fc+2*fm)/10000;
y=(((Ac*Am)/2)*cos((2*pi*fc-2*pi*fm)*t))+(((Ac*Am)/2)*cos((2*pi*fc+2*pi*fm)*t)); %DSB Modulated wave
subplot(3,1,1)
plot(t,y)
title('DSB Modulation')
xlabel('time (s)')
[b,a] = butter(3,[wc1 wc2],'bandpass');
output = filter(b,a,y);
subplot(3,1,2)
plot(t,output)
z = fft(output); %To get the frequency spectrum of the filtered signal
N = length(output);
f = [-N/2:N/2-1]/N;
subplot(3,1,3)
plot(f,abs(z))
댓글 수: 0
채택된 답변
Star Strider
2017년 12월 18일
You need to make two changes to your filter passband design:
t=-0.025:T/10:0.025;
L = length(t);
Fs = 1/mean(diff(t)); % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
wc1=(fc-4*fm)/Fn;
wc2=(fc-2*fm)/Fn;
I will let you figure out the reason my change here works. It should be close to what you want. Experiment with my code to get the exact result you want.
댓글 수: 2
Star Strider
2017년 12월 18일
The lower sideband has been suppressed, and the upper sideband remains. If you look only at the positive frequencies, you will see that the lower sideband is suppressed and a slightly distorted version of the upper sideband remains.
It is difficult to tell from your time-domain plot which sideband is being suppressed. Obviously one is, because if you plot them together, the ‘output’ amplitude is significantly reduced with respect to the ‘y’ amplitude.
I believe you are confusing the symmetry of the two-sided Fourier transform with the sidebands. If you plot the Fourier transform subplot as:
subplot(3,1,3)
plot(f,abs(z))
axis([0 max(xlim) ylim])
so that you see only the positive frequencies, you see that my filter design is working as you want it to.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Analog Filters에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!