⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 berawgndoppler.m

📁 这是一个关于完成QAM调制的Matlab示例程序
💻 M
字号:
function [ber] = BerAwgnDoppler(gammaB,fdTmin,fdTmax)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This is just a utility function to compute the expected BER
% of a signal in AWGN with doppler error in the receiver
%
% fD = Doppler shift.  Convention is that fD is amount that demodulation frequency
% is ABOVE actual carrier frequency.  However, by symmetry in the error equation,
% it doesn't matter.
% gammaB = Eb/N0
% tMin = lower limit of integral wrt time
% tMax = upper limit of integral wrt time
% ber = expected bit error rate
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

GRANULARITY = 1000;
MIN_FDT_DELTA = 1/10000;  % Not sure if this is a reasonable value.  Using for now.

if (abs(fdTmax - fdTmin) < MIN_FDT_DELTA)
    % No phase range.  Just use standard AWGN eq'n with phase offset
    ber = 0.25*(erfc(sqrt(2*gammaB)*sin((pi/4)-(fdTmin*2*pi)))+ ...
        erfc(sqrt(2*gammaB)*sin((pi/4)+(fdTmin*2*pi))));
else
    deltaFdT = (fdTmax - fdTmin)/GRANULARITY;
    integrand = 0;
	for ii = 0:(GRANULARITY-1)
        fdTime = fdTmin + ii*deltaFdT;
        integrand = integrand + erfc(sqrt(2*gammaB)*sin((pi/4)-2*pi*fdTime)) + ...
            erfc(sqrt(2*gammaB)*sin((pi/4)+2*pi*fdTime));
	end
	ber = (0.25/(GRANULARITY))*integrand;
end

return

⌨️ 快捷键说明

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