Confusion in the spectrum of fsk by using fskmod module in matlab

Discussion in 'Wireless & RF Design' started by hogioshavez, Nov 29, 2014.

  1. hogioshavez

    Thread Starter New Member

    Nov 29, 2014
    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???