berrayleighmatchedtimingerror.m

来自「这是一个关于完成QAM调制的Matlab示例程序」· M 代码 · 共 33 行

M
33
字号
function [ber] = BerRayleighMatchedTimingError(gammaB,pulseFilt,timingError,tSymbol)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% function [ber] = BerRayleighMatchedTimingError(gammaB,pulseFilt,timingError,tSymbol,delay)
%
% This is just a utility function to compute the expected BER
% of a signal in Rayleigh with matched filter timing error in the receiver.
%
% pulseFilt = pulse shaping filter and matched filter coefficients.  Assumed symmetrical
% gammaB = Eb/N0
% timingError = matched filter sampling error, given in the number of samples
% tSymbol = number of samples per symbol
% delay = group delay of the pulse filter/matched filter.  Assumed identical for both filters.
%         Given in the number of symbols of delay, not number of samples.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



% Compute alpha, the signal power attenuation due to timing mismatch
alpha = (pulseFilt((1+timingError):length(pulseFilt))*pulseFilt(1:(length(pulseFilt)-timingError))')^2;

% Compute ISI

% Compute ISI
isi1 = ((pulseFilt(1:(length(pulseFilt) + timingError - tSymbol))*...
        pulseFilt((1 + tSymbol - timingError):length(pulseFilt))'));

% Compute new ber, based on numeric evaluation of integrating Q-function over Rayleigh
ber = 0.25*(2-sqrt(((alpha+isi1)^2)*gammaB/(1+((alpha+isi1)^2)*gammaB)) ...   -sqrt(((alpha-isi1)^2)*gammaB/(1+((alpha-isi1)^2)*gammaB)));
return

⌨️ 快捷键说明

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