Orthogonal M-FSK SNR vs BER plot

4 次查看(过去 30 天)
M
M 2012-4-6
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 个)

类别

Help CenterFile Exchange 中查找有关 Propagation and Channel Models 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by