필터 지우기
필터 지우기

Orthogonal M-FSK SNR vs BER plot

조회 수: 7 (최근 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