why fft of modulated signal shows peak at carrier frequency?

3 ビュー (過去 30 日間)
Mubasher
Mubasher 2012 年 5 月 25 日
the fft of fsk modulated signal should show only two peaks , one for "1" and other for "0" but my result shows one peak at carrier frequency. Why it is so?
clear
clc
M=2;
fd=500; %symbol frequency
fc=2000; %carrier frequency
Fs = 8000;%sample frequency 8 KHz
t = [0:1/Fs:0.01];%time axis/vector for 10 msec
%Generating Sine Wave
s = sin(2*pi*1000*t);
% Quantization
predictor=[0 1];
partition=[-1:0.1:0.9];
codebook=[-1:0.1:1];
encodedx = dpcmenco(s,codebook,partition,predictor);
%decimal to binary conveersion
data_bin=de2bi(encodedx);
% FSK modulation
modulation=dmod(data_bin,fc,fd,Fs,'fsk',M);
% Demodulation
demod=ddemod(modulation,fc,fd,Fs,'fsk',M);
%binary to decimal conversion
data1=bi2de(demod);
% dequantization
decodedx = dpcmdeco(data1,codebook,predictor);
% BER calculation
[num,BER]=biterr(data_bin,demod)
% Taking FFT
%Message Signal
figure
S = fft(s);
S = abs(S(1:round(length(s)/2)+1));
frqS = [0:length(S)-1]*Fs/length(s);
subplot(3,2,2);
plot(frqS,S)
title('Spectrum of Message Signal')
xlabel('Frequency (Hz)')
ylabel('Amplitude')
%Modulated Signal
S = fft(modulation);
S = abs(S(1:round(length(modulation)/2)+1));
frqS = [0:length(S)-1]*Fs/length(modulation);
subplot(3,2,4);
%plot(f,abs(Y(1:NFFT/2+1)))
plot(frqS,S)
title('Spectrum of Modulating Signal')
xlabel('Frequency (Hz)')
ylabel('Amplitude')
%Demodulated Signal
S = fft(decodedx);
S = abs(S(1:round(length(decodedx)/2)+1));
frqS = [0:length(S)-1]*Fs/length(decodedx);
subplot(3,2,6);
plot(frqS,S)
title('Spectrum of Demodulated Signal')
xlabel('Frequency (Hz)')
ylabel('Amplitude')
subplot(3,2,1); plot(t,s);title('message signal');
subplot(3,2,3); plot(modulation(1:400));title('Modulated signal');
subplot(3,2,5); plot(t,decodedx);title('DEModulated signal')

回答 (0 件)

カテゴリ

Help Center および File ExchangeFSK についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by