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.

TIDM-02008: Clarify current loop and its compensator

Part Number: TIDM-02008
Other Parts Discussed in Thread: SFRA,

Dear Champs,

I am asking this for our customer.

In "ttplpfc.h", there is a function below,

#pragma FUNC_ALWAYS_INLINE(TTPLPFC_runCurrentLoop)
static inline void TTPLPFC_runCurrentLoop()
{
if(TTPLPFC_closeGiLoop == 1)
{

//
//Discrete PI regulator.
//
#if TTPLPFC_SFRA_TYPE == TTPLPFC_SFRA_CURRENT
TTPLPFC_gi_out = GI_RUN(&TTPLPFC_gi, TTPLPFC_ac_cur_sensed_pu,
SFRA_F32_inject(TTPLPFC_ac_cur_ref_inst_pu));
#else
TTPLPFC_gi_out = GI_RUN(&TTPLPFC_gi,
TTPLPFC_ac_cur_sensed_pu,
TTPLPFC_ac_cur_ref_inst_pu);
#endif

//
//Current loop PI regulator output plus feed forward output.
//
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);

//
//Saturation.
//
TTPLPFC_dutyPU = (TTPLPFC_dutyPU >
(float32_t)(1.0f))?(float32_t)(1.0f):TTPLPFC_dutyPU;
TTPLPFC_dutyPU = (TTPLPFC_dutyPU <
(float32_t)(-1.0f))?(float32_t)(-1.0f):TTPLPFC_dutyPU;
}
else
{
TTPLPFC_dutyPU = 0.01f;
}
}

Questions:

1) GI_RUN, which is "DCL_runPI_C1" in the DCL. It's definition is as follows:

float32_t DCL_runPI_C1(DCL_PI *p, float32_t rk, float32_t yk)

It appears the reference is in the second parameter but the feedback is in the third parameter.

But in the code above, calling GI_RUN put the reference in the third parameter and feedback in the second parameter.

This confuses me, which seems the opposite and causes negative result.

Would you please help clarify?

Is this intended?

What is the logic?

2) About "Current loop PI regulator output plus feed forward output.", the user founds TTPLPFC_dutyPU is usually >1 and saturated from the equation "TTPLPFC_dutyPU = ( TTPLPFC_gi_out + (TTPLPFC_ac_vol_sensed_pu *...."

Is this expected? 

The user is confused and would you please explain why it's usually saturated?

Wayne Huang