📄 errorfloor.m
字号:
% Error Floor
clear;
% parameters
times = 100000; % times OFDM symbols are simulated
d = 1; % time spread Tao_rms/T
M = 12; % number of multipaths
SNR = 0;
fm_sim = []; % maxima Doppler Spread
BER_OFDM = []; % BER of 1Tx + 1Rx
BER_ZF = []; % BER of SFBC Zero Force dectection
BER_DF = []; % BER of SFBC Decision Feedback dectection
BER_SML = []; % BER of SFBC Simple Maxima Likelihood dectection
BER_JML = []; % BER of SFBC Joint Maxima Likelihood dectection
BER_ZF_new = []; % BER of SFBC New Zero Force dectection
BER_DF_new = []; % BER of SFBC New Decision Feedback dectection
BER_SML_new = []; % BER of SFBC New Simple Maxima Likelihood dectection
BER_JML_new = []; % BER of SFBC New Joint Maxima Likelihood dectection
for fm = 0:100:1000
fm
BPSK = 0; % Initialing
Others = [0 0 0 0 0 0 0 0]; % [ZF DF SML JML ZF_new DF_new SML_new JML_new]
for i = 1:times % run
temp = OFDMs(SNR, fm, d, M);
[temp1 temp2 temp3 temp4 temp5 temp6 temp7 temp8] = SFBCs(SNR, fm, d, M);
BPSK = BPSK + temp; % sum
Others = Others + [temp1 temp2 temp3 temp4 temp5 temp6 temp7 temp8];
end
% link
fm_sim = [fm_sim fm ];
BER_OFDM = [BER_OFDM BPSK/times ];
BER_ZF = [BER_ZF Others(1)/times];
BER_DF = [BER_DF Others(2)/times];
BER_SML = [BER_SML Others(3)/times];
BER_JML = [BER_JML Others(4)/times];
BER_ZF_new = [BER_ZF_new Others(5)/times];
BER_DF_new = [BER_DF_new Others(6)/times];
BER_SML_new = [BER_SML_new Others(7)/times];
BER_JML_new = [BER_JML_new Others(8)/times];
end
% save data
save BER_DATA BER_ZF BER_DF BER_SML BER_JML ...
fm BER_ZF_new BER_DF_new BER_SML_new BER_JML_new;
% plot BER
figure: semilogy(fm_sim,BER_OFDM ,'c>', ...
fm_sim,BER_JML ,'r>', fm_sim,BER_SML ,'m>' , fm_sim,BER_ZF ,'b>', fm_sim,BER_DF ,'k>',...
fm_sim,BER_JML_new,'rd', fm_sim,BER_SML_new,'md', fm_sim,BER_ZF_new,'bd', fm_sim,BER_DF_new,'kd');
legend('1Tx + 1Rx', 'Con. ZF', 'Con. SML', 'Con. JML', 'Con. DF', 'NEW ZF', 'NEW SML', 'NEW JML', 'Con. DF');
xlabel('Fm');ylabel('Bit Error Rate');
title('Error floor in BPSK - OFDM - SFBC(G2) system');
grid on;
saveas(gcf,'EF_BPSK_SFBC.fig');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -