www.pudn.com > WCDMA.rar > EstPhaseOffset.m


function z = EstPhaseOffset(SoftCntlSig,DPCCH_code,N_pilot) 
%**************************************************************************** 
%function z = EstPhaseOffset(BeamformedCntlSig,DPCCH_code,N_pilot) 
% 
% Copyright 2002 The Mobile and Portable Radio Research Group 
% 
%Uses the received symbols in the control channel to estimate the phase offset 
%Only the pilot symbols are used in the estimate 
%This routine provides a phase offset estimate for each of the 15 slots in a  
%WCDMA frame 
% 
%Parameters 
%   Input 
%      BeamformedCntlSig   vector   Estimated control signal 
%      DPCCH_code          vector   True control signal 
%      N_pilot             scalar   Number of pilot symbols in time slot 
%                                   between 3 and 8. 
%   Output 
%      z                   scalar   phase offset 
%**************************************************************************** 
index=[]; 
for k=0:14 
   index=[index 10*k+(1:N_pilot)]; 
end 
 
%Extract Pilot symbols and correstponding soft detected symbols 
CorrectBits=DPCCH_code(index); 
DetectedBits=SoftCntlSig(index); 
 
%Normalized soft detected symbols 
NormalizedDetectedBits=DetectedBits./abs(DetectedBits); 
 
for k=1:15 
   index=(k-1)*N_pilot+(1:N_pilot); 
   %Compute Phase differences 
   PhaseOffset=CorrectBits(index)./NormalizedDetectedBits(index); 
   %Average the phase offsets 
   z(k)=mean(PhaseOffset); 
end