📄 estimationerrorwithmatchedfilt.m
字号:
function [rxMsg] = EstimationErrorWithMatchedFilt(idealRxMsg,phaseError,dopplerError,timingError,delay,sampsPerSymb,numXmitSymb)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function [rxMsg] = Channel(modMsg,gammaBar)
% This function models the receiver channel estimation errors. As such, it will
% take idealRxMsg, and apply the various error effects.
%
% idealRxMsg = baseband received message before error simulation
% phaseError = amount of phase error to be applied, in radians. Can
% be any real value.
% dopplerError = doppler error per sample, in cycles per sample
% rxMsg = received message with estimation error effects applied
% timingError = desired timing error in sampling the matched filter output, in number of samples
% delay = delay of the pulse shaping and matched filter. Assumed to be the same for both.
% numXmitSymb = number of transmitted symbols
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if ((phaseError == 0) & (dopplerError == 0))
rxMsg = idealRxMsg;
else
if (phaseError ~=0)
rxMsg = idealRxMsg * exp(j*phaseError);
end
if (dopplerError ~=0)
rxMsg = idealRxMsg.*exp(j*2*pi*dopplerError*((1:length(idealRxMsg))-1));
end
end
%APPLY MATCHED FILTERING HERE?? SAMPLE FOR DETECTION STATISTIC, AND PASS THAT TO DDEMODCE???? IDEALLY, WANT
%SAMPLE MIS-MATCH IN ESTIMATIONERROR
% sampling, want this in EstimationError. Leave here for now.
% Transmitter matched filter delays by 2*fs/fd
% Want to grab one out of every fs/fd samples, since this is timing interval for detection statistic
% Add one, since Matlab starts indexing at 1, not zero.
rxMsg = rxMsg((2*delay*sampsPerSymb) + ((0:(numXmitSymb-1))*sampsPerSymb) +1 + timingError);
return
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -