I want to do a comparison of power spectral density of BFSK, 4FSK and 8FSK by using matlab baseband module "fskmod".Following is the code:

M = 2;
freqsep = 32;
nsamp = 4;
Fs = 64;
x = randint(1000,1,M); % Random signal
y = fskmod(x,M,freqsep,nsamp,Fs); % Modulate.
ly = length(y);
% Create an FFT plot.
freq = [-Fs/2 : Fs/ly : Fs/2 - Fs/ly];
Syy = 10*log10(fftshift(abs(fft(y))));

With this configuration, I get a very good spectrum but when I change nsamp to 8 or any other value,multiple lobes start to appear between two frequencies. The confusion is in the understanding of the relation of nsamp and frequency separation. Could any one solve this confusion???

  • $\begingroup$ i meet the confusion too ,have you got any idear about it? $\endgroup$ – user13326 Jan 10 '15 at 8:06
  • $\begingroup$ Have a look at a typical FSK spectrum here. Don't expect only two peaks at the two pulse frequencies, because the signal is not a sum of two perfect sinusoids. If your spectrum looks like the one in the link then it's OK, if not, then we have to look for the problem. BTW, I don't know the function randint (replaced by randi), but check if the maximum value of x is M-1 (and not M!). $\endgroup$ – Matt L. Jan 10 '15 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.