| Communications Toolbox | ![]() |
Frequency shift keying demodulation
z = fskdemod(y,M,freq_sep,nsamp)
z = fskdemod(y,M,freq_sep,nsamp,Fs)
z = fskdemod(y,M,freq_sep,nsamp,Fs,symbol_order)
z = fskdemod(y,M,freq_sep,nsamp) noncoherently demodulates the complex envelope y of a signal using the frequency shift key method. M is the alphabet size and must be an integer power of 2. freq_sep is the frequency separation between successive frequencies in Hz. nsamp is the required number of samples per symbol and must be a positive integer greater than 1. The sampling frequency is 1 Hz. If y is a matrix with multiple rows and columns, then the function processes the columns independently.
z = fskdemod(y,M,freq_sep,nsamp,Fs) specifies the sampling frequency in Hz.
z = fskdemod(y,M,freq_sep,nsamp,Fs,symbol_order) specifies how the function assigns binary words to corresponding integers. If symbol_order is set to 'bin' (default), the function will use a natural binary-coded ordering. If symbol_order is set to 'gray', it will use a Gray-coded ordering.
The example below illustrates FSK modulation and demodulation over an AWGN channel.
M = 2; k = log2(M); EbNo = 5; Fs = 16; N = Fs; nsamp = 17; freqsep = 8; msg = randint(5000,1,M); % Random signal txsig = fskmod(msg,M,freqsep,nsamp,Fs); % Modulate. msg_rx = awgn(txsig,EbNo+10*log10(k)-10*log10(N),... 'measured',[],'dB'); % AWGN channel msg_rrx = fskdemod(msg_rx,M,freqsep,nsamp,Fs); % Demodulate [num,SER] = symerr(msg,msg_rrx); % Symbol error rate BER = SER*(M/2)/(M-1) % Bit error rate BER_theory = berawgn(EbNo,'fsk',M,'noncoherent') % Theoretical BER
The output is below. Your BER value might vary because the example uses random numbers.
BER =
0.1006
BER_theory =
0.1029
fskmod, pskmod, pskdemod, Modulation
| fmmod | fskmod | ![]() |
© 1994-2005 The MathWorks, Inc.