www.pudn.com > RAKE.rar > ljq_3PPMcorrmask_R.m


%/*---------------------Ïà¹ØÑÚÄ£ÐźÅ----------------------*/ 
%-------------------by LinJiaqing---------------------------- 
% Evaluates the correlation mask ('mask') for a RAKE 
% receiver in the case of binary PPM UWB signals. 
% 'ref' is the reference signal (with no modulation) 
%       which is produced by the 2PPM+TH transmitter 
% 'fc' is the sampling frequency in Hertz 
% 'numpulses' is the number of transmitted pulses 
% 'dPPM' is the value of the PPM shift in seconds 
% 'rake' represents the estimated discrete-type impulse response 
function [mask]=ljq_3PPMcorrmask_R(ref,fc,numpulses,dPPM,rake) 
% --------------------------------------------- 
% Step One - Evaluation of the correlation mask 
% --------------------------------------------- 
dt = 1 / fc; 
LR = length(ref); 
% Energy normalization 
Epulse = (sum((ref.^2).*dt))/numpulses; 
nref = ref./sqrt(Epulse); 
% Rake convolution 
mref = conv(nref,rake); 
mref = mref(1:LR); 
% Mask construction 
PPMsamples = floor (dPPM ./ dt); 
sref(1:PPMsamples)=mref(LR-PPMsamples+1:LR); 
sref(PPMsamples+1:LR)=mref(1:LR-PPMsamples); 
mask = mref-sref;