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.

SFRA library IQ scale factors

Other Parts Discussed in Thread: SFRA

Hi,

I'm starting using the SFRA libraries.

I've followed the steps described in the SPRUHZ5A doc, and the SFRA seems working.

The problem is that I would not to use the GUI provided by TI, because I'm working on a preexisting device, with its preexistent protocol and a preexisting GUI.

I can download the collected data with my own GUI, but it seems they are PU_scaled.

Is it that right? If Yes, is it possible to know the scale factors?

It seems to me the degrees are scaled 1.0pu -> 180°, but it's just a guess.

Thank you in advance,

Marco

  • I think I've figured out.

    It seems that the IQ24 results in both the magnitude and phase vectors have to be multiplied by 256 to obtain the  [dB] and [degrees] values.

  • Marco,

    The number stored in the array are in Q24 format which means the first 8 bits starting from the MSB are integer value and the next 24 are fractional,  these are not in PU format. 

    Maybe this is why you are observing the multiplication by 256 to correspond to the correct absolute value. 

  • Manish,

    I find result values in the SFRA_IQ result vectors that are something like

    H_MagVect[n] = -0.074521[Q24]   (or -1250254 decimal, or 0xFFECEC32, if you prefer)

    H_PhaseVect[n] = -0.37767[Q24]   (or -6336251 decimal, or 0xFF9F5105, if you prefer)

    As you see, the integer part is zero (negative), where I expect something around  20dB with 90° phase. So I guess that the IQ data are scaled someway.

    Maybe I'm doing something totally wrong, but if I plot the datas, they are consistent in shape with what I would expect, and it seems they just have to be scaled.

    Could you explain me how? This thing is done in the TI GUI, but I don't have the source code to find myself.

    Thanks for your cooperation.

  • I remembered now that the IQ format for the Mag and Phase vector is Q16 and not Q24. 

    I see our document do not document this fact well in the user guide, apologies for the trouble. 

    I will file this as a bug in the documentation. 

    We will edit the MOdule Inteface Definition as

    H_MagVect,GH_MagVect

    Input

    Pointer to the array that stores the magnitude of plant and open loop SFRA data of a closed loop plant. Array data stored in Q16 format.

    Pointer to 32 bit location