Pass an FSK signal through an AWGN channel and estimate the resulting bit error rate (BER). Compare the estimated BER to the theoretical value.
Set the simulation parameters.
M = 2; % Modulation order
k = log2(M); % Bits per symbol
EbNo = 5; % Eb/No (dB)
Fs = 16; % Sample rate (Hz)
nsamp = 8; % Number of samples per symbol
freqsep = 10; % Frequency separation (Hz)
Complex baseband representation of a FSK-modulated signal, specfied as vector or
matrix of complex values. If y is a matrix with multiple rows and
columns, fskdemod processes the columns independently.
Data Types: double | single Complex Number Support: Yes
M — Modulation order integer power of two
Modulation order, specified as an integer power of two.
Example: 2 | 4 |
16
Data Types: double
symorder — Symbol order 'bin' (default) | 'gray'
Symbol order, specified as 'bin' or 'gray'.
This argument specifies how the function assigns binary vectors to corresponding integers.
If symorder is 'bin', the function
uses a natural binary-coded ordering.
If symorder is 'gray', the function
uses a Gray-coded ordering.
Data Types: char
freq_sep — Desired separation between frequencies positive scalar
Desired separation between frequencies, specified in Hz. By the Nyquist sampling
theorem, freq_sep and M must satisfy
(M-1)*freq_sep <= 1.
Data Types: double
nsamp — Number of samples per output symbol positive scalar greater than 1
Number of samples per output symbol, specified as a positive scalar greater than
1.