CPFSK demodulator performance in MATLAB example with enabling modulation index
Show older comments
I've been checking CPFSK performance against various modulation indices and SNR.
MATLAB has nice examples in comm.CPFSKModulator. Here is the example code with enabling "modulation index" property and few changes to creates the plot (Default "modulation index" is 0.5). From the result, I noticed that there are always high error rate with the "modulation index" other than 0.5 which doesn't seem CPFSK to be usable. Since I'm just copying the example code with modifying "modulation index" parameter, I'm wondering if this is real CPFSK performance or not.. Since different "modulation index" could be used, I have feeling that I made mistake in the code below but could not locate it. Or did I use the function incorrectly?
The attached plot shows error rates for different modulation indices and SNR and the code which generated the plot.

rng(1000);
M = 2; % In power of 2
h = [0.25 0.5 0.75 1.0];
snr = (-10:1:20);
Len_h = length(h);
Len_snr = length(snr);
ser = zeros(Len_h, Len_snr);
for ind_h = 1:Len_h
cpfskMod = comm.CPFSKModulator(...
M, ...
BitInput=true, ...
SymbolMapping="Binary", ...
ModulationIndex=h(ind_h));
for ind_snr = 1:Len_snr
awgnChan = comm.AWGNChannel( ...
NoiseMethod="Signal to noise ratio (SNR)", ...
SNR = snr(ind_snr));
cpfskDemod = comm.CPFSKDemodulator(...
M, ...
BitOutput=true, ...
SymbolMapping="Binary");
numFrames = 1000;
k = log2(M);
spf = 100;
delay = log2(M)*cpfskDemod.TracebackDepth;
errorRate = comm.ErrorRate(...
ReceiveDelay=delay);
for counter = 1:numFrames
data = randi([0 1], k*spf, 1);
modSignal = cpfskMod(data);
noisySignal = awgnChan(modSignal);
receivedData = cpfskDemod(noisySignal);
errorStats = errorRate(data, receivedData);
end
ser(ind_h, ind_snr) = errorStats(1);
end
end
for i=1:Len_h
semilogy(snr, ser(i, :), 'LineWidth',2);
hold on;
end
legend('h=0.25', 'h=0.5', 'h=0.75', 'h=1.0');
xlabel('SNR');
ylabel('Symbol Error Rate');
hold off;
grid on;
Accepted Answer
More Answers (0)
Categories
Find more on Modulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!