This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR6843: Sensor Rotation Computation

Part Number: AWR6843


Tool/software:

Hello,

In Radar_toolbox_2_30_00_12, we observed sensor rotation computation using example present in radar_toolbox_2_30_00_12\source\ti\examples\Automotive_InCabin_Security_and_Safety\AWR6843_CPD_with_Classification. Here we found a formula as below,

        y1 = [ cosd(yzRot), sind(yzRot)] * [y; z];

        z1 = [ -sind(yzRot), cosd(yzRot)] * [y; z];

        % rotation in xy plane

        x1 = [ cosd(xyRot), sind(xyRot)] * [x; y1];

        y2 = [ -sind(xyRot), cosd(xyRot)] * [x; y1];

        % rotation in xz plane

        x2 = [ cosd(xzRot), sind(xzRot)] * [x1; z1];

        z2 = [ -sind(xzRot), cosd(xzRot)] * [x1; z1];

After rotation, from above equations New X(x2) and New Z(z2) values will be as,

x2 = x[cosB cosC] + y [ cosA sinB cosC - sinA sinC]  + z [sinA sinB cosC + cosA sinC ]

z2 = x[cosB (-sinC)] + y[ cosA sinB (-sinC) - sinA cosC] + z [ sinA sinB (-sinC) + cosA cosC ]

Here A refers yzRot, B refers xyRot, C refers xzRot.

When the X,Y,Z values are calculated from the Tait–Bryan angles (Matrix Multiplication of [Y (α) Z (β) X (γ)] with passive rotations)

x2 = x[cosB cosC] + y [ cosA sinB cosC + sinA sinC]  + z [sinA sinB cosC - cosA sinC ]

z2 = x[cosB sinC) + y[ cosA sinB sinC - sinA cosC] + z [ sinA sinB sinC + cosA cosC ]

After rotation, New Y value is same for both calculations. Could u please explain Why these X and Z are varying?


  • Hi Sakthi Priya,

    Thanks for posting your question on E2E. Please allow us one working day or so to respond.

  • HI, there:

    I believe it is due to the rotation order are the same or not.  Tait–Bryan angles seems to rotate in the order of XY first, then YZ and then ZX.   

    These are all really depend on the definition of rotation order and rotation direction (positive angle as clockwise or counter-clockwise).

    Best,

    Zigang

     

  • Hello,
    In the case of rotating in the order of XY first, then YZ and then ZX, we were trying to get the formula which is used in radar toolbox using Tait–Bryan angles of order (ZXY). As we have to use the passive rotation, while transposing each matrix, we didn't get the formula. But when Z matrix is not transposed, and X and Y matrices are transposed, we are getting the exact formula which is used in toolbox as below,

    x2 = x[cosB cosC] + y [ cosA sinB cosC - sinA sinC]  + z [sinA sinB cosC + cosA sinC ]

    z2 = x[cosB (-sinC)] + y[ cosA sinB (-sinC) - sinA cosC] + z [ sinA sinB (-sinC) + cosA cosC ] (After rotation X and Z value which are from radar toolbox equations)

    Could u please tell me why Z matrix is not transposed?

  • The formula in our visualizer won't work if you rotate in the order of XY first, then YZ and then ZX.  

    You have to rotate in the order of YZ, XY and XZ.    If you want to rotate in the order of XY first, then YZ and then ZX, you need to change the visualizer code to match that order. 

    Best,

    Zigang