Hi,
I was looking to the Matlab code examples for the Tx beamforming in order to get how to determine the phase shifts for steering to a particular angle. In general, I should know how to generate a vector of phase shifts if we have the calibration vectors?
A part of the Matlab code in "cascade_TxBF_dataCapture" is:
%loads phase shifter calibrations. Measured zero angle data in DEGREES,
load(phaseShiftCalibfile);
PS_actual = (squeeze((Ph(:,1,:))))';
PS_actual(PS_actual > 0) = PS_actual(PS_actual>0) - 360;
if (LOAD_CALIBRRATION == 1)
load(phaseMismatchCalibfile);
Rxcal = calibResult.RxMismatch;
CorrectPhase = calibResult.TxMismatch;
else
CorrectPhase=zeros(3,4);
end
So, it seems that there are two different calibration vectors: 1) phase shifter calibration 2) phase mismatch calibration -according to the mmwave studio user guide in 8.3.3 Tx beamforming. I assume that the phase mismatch pertains to the channel gain/phase mismatches due to RF path and gain differences. However, I do not know what is the phase shifter calibration for? Also, there is no explanation about it in "tiduen5.pdf". Furthermore, the phase shifter calibration goes in "BeamSteerPhaseCalc" function which is compared with the actual phase shifts differently for the even and odd Tx indexes:
for t=1:length(b_ang)
slope(t,:)= wrapTo360(sin(b_ang(t)*2*pi*d/180)*D_TX*180);
for u=1:2:numTX %finds nearest higher phase shift
temp=actualPS10(u,:);
diff=find((temp-slope(t,u))>=0);
if(isempty(diff))
diff=1;
end
PS_forAoA(u,t)=temp(diff(1));
PS_Tx(u,t)=PS_allowed(diff(1));
end
for u=2:2:numTX %finds nearest lower phase shift
temp=actualPS10(u,:);
diff=find((temp-slope(t,u))<=0);
PS_forAoA(u,t)=temp(diff(end));
PS_Tx(u,t)=PS_allowed(diff(end));
end
end
None of them makes sense to me.
I think the best help will be an example to configure and set the phase shifter values for steering to a particular angle, let's say \theta (azimuth angle). I will appreciate much if you give me a pseudo code.
Best,
Mostafa