Orthogonal M-FSK SNR vs BER plot
6 views (last 30 days)
Show older comments
I am trying to plot the SNR vs BER plot for orthogonal M-FSK mod and demod but the BER remains approximately Zero for all M (2,4,8,16).
Can anyone help me understand where the problem is?
This is the code that I am using:
Rs = 100e6; %Symbol rate 100 MHz
Ts= 1/Rs;
len = 10000;
EbNo = [0:2:30];
SymER = zeros(1,length(EbNo));
M=[2 4 8 16];
%%Orthogonal FSK
for j=1:4
msg = randint(1,len,M(j)); % Random signal
freqsep=Rs; % Tone separation = 1/T for non-coherent orthogonal MFSK
Fs = (M(j)-1)*freqsep; % (M-1)*freq_sep <= Fs.
nsamp = 2*Fs;
txsig = fskmod(msg,M(j),freqsep,nsamp,Fs); % Modulate.
k = log2(M(j));
for i=1:length(EbNo)
msg_rx = awgn(txsig,EbNo(i)+10*log10(k)); % AWGN channel
msg_rrx = fskdemod(msg_rx,M(j),freqsep,nsamp,Fs); % Demodulate
[num,BER(j,i)] = biterr(msg,msg_rrx); % Bit error rate
end
figure(2);semilogy(EbNo,BER(j,:),'bx-');
hold on;
suptitle('Bit Error Rate vs E_b/N_o for Orthogonal MFSK');
xlabel('E_b/N_o (dB)'),ylabel('Bit Error Probability, P_E(M)');
grid on
BER_theory = berawgn(EbNo,'fsk',M(j),'noncoherent'); % Theoretical BER
semilogy(EbNo,BER_theory,'ro:');
end
0 Comments
Answers (0)
See Also
Categories
Find more on FSK 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!