📄 berawgnmatchedtimingerror.m
字号:
function [ber] = BerAwgnMatchedTimingError(gammaB,pulseFilt,timingError,tSymbol)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% function [ber] = BerAwgnMatchedTimingError(gammaB,pulseFilt,timingError,tSymbol,delay)
%
% This is just a utility function to compute the expected BER
% of a signal in AWGN 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
isi1 = ((pulseFilt(1:(length(pulseFilt) + timingError - tSymbol))*...
pulseFilt((1 + tSymbol - timingError):length(pulseFilt))'));
% Compute new ber, based on Q-function
%ber = 0.5*erfc(sqrt(alpha/((gammaB^-1) + 2*isi)));
ber = 0.25*(erfc((alpha+isi1)*sqrt(gammaB)) + erfc((alpha-isi1)*sqrt(gammaB)));
return
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -