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.

TIDA-010062: question about current loop algorthim

Part Number: TIDA-010062
Other Parts Discussed in Thread: TIDM-02008

Hi Team,

There're some issues from the customer need your help:

Are there any file to explain Current Loop, and Voltage Loop Algorithms?

1.The code to calculate the current loop code is as follows, how to understand it?

TTPLPFC_gi_out = GI_RUN(&TTPLPFC_gi,TTPLPFC_ac_cur_sensed_pu,TTPLPFC_ac_cur_ref_inst_pu);

2. The output feed-forward code is as follows, how to understand it?

TTPLPFC_dutyPU = ( TTPLPFC_gi_out + (TTPLPFC_ac_vol_sensed_pu *
(float32_t)TTPLPFC_VAC_MAX_SENSE_VOLT /
(float32_t)TTPLPFC_VDCBUS_MAX_SENSE_VOLT)
- TTPLPFC_inductor_voltage_drop_feedforward )
/ (TTPLPFC_vBus_sensed_pu);

3. The feed-forward code for calculating the inductor voltage drop is as follows, how to understand it?

TTPLPFC_inductor_voltage_drop_feedforward = -(float32_t)1.0 *
(TTPLPFC_ac_cur_ref_inst_pu -
TTPLPFC_ac_cur_ref_inst_prev_pu) *
((float32_t)TTPLPFC_PFC_INDUCTOR_VALUE *
TTPLPFC_CONTROL_ISR_FREQUENCY *
TTPLPFC_IL_MAX_SENSE_AMPS /
TTPLPFC_VDCBUS_MAX_SENSE_VOLT);

TTPLPFC_ac_cur_ref_inst_prev_pu = TTPLPFC_ac_cur_ref_inst_pu;

4. The meaning of this part of the code

if(fabsf(TTPLPFC_vBusRef_pu - TTPLPFC_vBusRefSlewed_pu) > 0.0001f)
{
if(TTPLPFC_vBusRef_pu > TTPLPFC_vBusRefSlewed_pu)
{
TTPLPFC_vBusRefSlewed_pu = TTPLPFC_vBusRefSlewed_pu + 0.0001f;
}
else
{
TTPLPFC_vBusRefSlewed_pu = TTPLPFC_vBusRefSlewed_pu - 0.0001f;
}
}
else
{
TTPLPFC_vBusRefSlewed_pu = TTPLPFC_vBusRef_pu;
}

Could you help check this case?

Thanks & Regards,

Ben

  • Hi Team,

    Is there any updates?

    Best Regards,

    Ben

  • Are there any file to explain Current Loop, and Voltage Loop Algorithms?

    For TTPL PFC, you can refer to the TIDM-02008 user guide for more details.

    1.The code to calculate the current loop code is as follows, how to understand it?

    TTPLPFC_gi_out = GI_RUN(&TTPLPFC_gi,TTPLPFC_ac_cur_sensed_pu,TTPLPFC_ac_cur_ref_inst_pu);

    The GI_Run is a control loop function. The input are the current reference and current feedback signals. gi contains the coefficients of the control functions. 

    2. The output feed-forward code is as follows, how to understand it?

    TTPLPFC_dutyPU = ( TTPLPFC_gi_out + (TTPLPFC_ac_vol_sensed_pu *
    (float32_t)TTPLPFC_VAC_MAX_SENSE_VOLT /
    (float32_t)TTPLPFC_VDCBUS_MAX_SENSE_VOLT)
    - TTPLPFC_inductor_voltage_drop_feedforward )
    / (TTPLPFC_vBus_sensed_pu);

    you can refer to the TIDM-02008 user guide for more details.

    4. The meaning of this part of the code

    if(fabsf(TTPLPFC_vBusRef_pu - TTPLPFC_vBusRefSlewed_pu) > 0.0001f)
    {
    if(TTPLPFC_vBusRef_pu > TTPLPFC_vBusRefSlewed_pu)
    {
    TTPLPFC_vBusRefSlewed_pu = TTPLPFC_vBusRefSlewed_pu + 0.0001f;
    }
    else
    {
    TTPLPFC_vBusRefSlewed_pu = TTPLPFC_vBusRefSlewed_pu - 0.0001f;
    }
    }
    else
    {
    TTPLPFC_vBusRefSlewed_pu = TTPLPFC_vBusRef_pu;
    }

    This is just to control the output voltage reference to slew up linearly when you change the reference. 

     

    Regards,

    Chen

  • Hi Chen,

    TTPLPFC_dutyPU = ( TTPLPFC_gi_out + (TTPLPFC_ac_vol_sensed_pu *
    (float32_t)TTPLPFC_VAC_MAX_SENSE_VOLT /
    (float32_t)TTPLPFC_VDCBUS_MAX_SENSE_VOLT)
    - TTPLPFC_inductor_voltage_drop_feedforward )
    / (TTPLPFC_vBus_sensed_pu)

    Didn't find an actual description of these parameters for the algorithm? The first TTPLPFC_gi_out is the output of the PI controller, and the feeling behind it is feed-forward calculation, but the latter calculation is derived from that formula. How to deduce it, I don’t understand this? (float32_t) TTPLPFC_VAC_MAX_SENSE_VOLT / (float32_t) TTPLPFC_VDCBUS_MAX_SENSE_VOLT These two parameters have the same value, what is the specific meaning?

    The feedforward code for calculating the inductor voltage drop is as follows, how to understand it?

    TTPLPFC_inductor_voltage_drop_feedforward = -(float32_t)1.0 *
    (TTPLPFC_ac_cur_ref_inst_pu -
    TTPLPFC_ac_cur_ref_inst_prev_pu) *
    ((float32_t)TTPLPFC_PFC_INDUCTOR_VALUE *
    TTPLPFC_CONTROL_ISR_FREQUENCY *
    T TPLPFC_IL_MAX_SENSE_AMPS /
    TTPLPFC_VDCBUS_MAX_SENSE_VOLT);

    TTPLPFC_ac_cur_ref_inst_prev_pu = TTPLPFC_ac_cur_ref_inst_pu;

    Best Regards,

    Ben

  • Hello Ben

    1.The code to calculate the current loop code is as follows, how to understand it?

    TTPLPFC_gi_out = GI_RUN(&TTPLPFC_gi,TTPLPFC_ac_cur_sensed_pu,TTPLPFC_ac_cur_ref_inst_pu);

    GI_RUN=DCL_runPI_C1

    DCL_runPI_C1 is PI controller, TTPLPFC_ac_cur_ref_inst_pu is ref current and TTPLPFC_ac_cur_sensed_pu is the feedback current. 

    The value of kp and ki for this PI controller is defined as  

    TTPLPFC_gi.Kp = TTPLPFC_GI_PI_KP;
    TTPLPFC_gi.Ki = TTPLPFC_GI_PI_KI;

    in  ttplpfc.c files

    The code this PI controller is written directly in the in assembly language. You can find this code in the files DCL_PI_C1.asm. 

    2. The output feed-forward code is as follows, how to understand it?

    3.  The feed-forward code for calculating the inductor voltage drop is as follows, how to understand it?

    4. The meaning of this part of the code

    This part of code prevents sudden change in the reference output voltage and also increase linearly. 

    Thanks

    Amir