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.

CCS/TIDM-BLPFC: PFC_InvRmsSqr_Vmin in BLPFCv 1.0

Part Number: TIDM-BLPFC
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Hello!  In  Project BLPFCv1.0   there is module PFC_InvRmsSqr  where VrectRMS  is compared with  PFC_InvRmsSqr_Vmin. But VrectRMS   is real value of RMS and PFC_InvRmsSqr_Vmin is ratio. How it is possible to compare different measure object. Is it correct?

For example, I have VrectRMS = Q24(0.143),  but ration in PFC_InvRmsSqr_Vmin  is Q24(0.196)  , and this is out of range though in real volts  it is inside range.

  • Please point us to the exact location of this code you are talking about. Send us the file name and the part of the code where you see this.

    Shamim
  • PFC_InvRmsSqr.asm
    MOVW DP, #_PFC_InvRmsSqr_In:n:
    MOVL XAR0,@_PFC_InvRmsSqr_In:n: ; Net pointer to In (XAR0)
    MOVL XAR1,@_PFC_InvRmsSqr_Out:n: ; Net pointer to Out (XAR1)
    MOVL XAR2,@_PFC_InvRmsSqr_Vmin:n: ; XAR2 = Vmin

    ; Clamp the minimum Average AC Line to allow the normalization to work
    MOVL ACC,*XAR0 ; ACC = "In"
    SUBL @XAR2,ACC ; XAR2= Vmin - In
    B LINE_INRANGE:n:,LT ; if Vmin < In branch to LINE_INRANGE
    MOVL ACC,@_PFC_InvRmsSqr_Vmin:n: ; otherwise put Vmin in ACC

    The _PFC_InvRmsSqr_In = VrectRMS
    Project BLPFCv 1.0 in folder DevelopmentKits in ControlSuite

    Why ration is compared whith real value.
    And why
    PFC_InvRmsSqr_VminOverVmax1= _IQ30(0.1956); // 80V/409V
    PFC_InvRmsSqr_Vmin1= _IQ24(0.1956); // 80V/409V

    have to be equal with , only IQ is differ .
  • The variable VrectRMS does not contain the absolute value in VOLTS. It contains the per unit value normalized with respect to the max Vrect voltage. For example if the max Vrect is 283 volts and the measured rms Vrect is 80V then the variable VrectRMS will have a value of 80/283 = 0.283. This is called the per unit value. Therefore this is also a ratio like the other variable.

    Your second question about different IQ:

    These two variables have the same value but they are represented by different IQ value. This is completely ok as it does not change the per unit value.

    Please read the associated doc with this module PFC_InvRmsSqr.asm. You will find this in the doc folder inside the file DPLib.pdf

    Shamim