cp0901_muiber_2pam.m

来自「这是关于mb-ofdm的相关程序,也是本人强力推荐的」· M 代码 · 共 52 行

M
52
字号
%
% Function 9.4 : "cp0901_MUIBER_2PAM"
%
% Evaluates the theoretical probability of error
% for a 2PAM system in AWGN channels under the
% Standard Gaussian Approximation
%
% 'ebn0'     is a vector containing the values in dB of the
% ratio Eb/No
% 'erx0'     is the energy of the useful signal
% 'erxMUI'   is a vector containing the received energies
% of the 
%            interfering users.
% 'pulse'    is the waveform of the basic pulse
% 'Rb'       is the user bit rate [b/s]
% 'fc'       is the sampling time [Hz]
% 'gamma_r'  represents the ratio (Ts/(Tb/Ns))
%


function [BER] = ...
   cp0901_MUIBER_2PAM(ebno,erx0,erxMUI,pulse,Rb,fc,gamma_r)

% ----------------------------------------------------
% Step One - Evaluation of the required constant terms
% ----------------------------------------------------

% (Sigma_m)^2 [sm2]

  sm2 = cp0901_sm2_PAM(pulse,fc);
  
% MUI energy summation [EMUI]

  EMUI = sum(erxMUI./erx0);
  
% -------------------------------------
% Step Two - Evaluation of SIR and SNRn
% -------------------------------------

SIR = (gamma_r)/(sm2*Rb*EMUI);

EBN0 = 10.^(ebno/10);
SNRn = EBN0.*2;

% -----------------------------------
% Step Three - Performance evaluation
% -----------------------------------

SNRref = 1./((1./SNRn)+(1/SIR));

BER = 0.5.*erfc(sqrt(SNRref./2));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?