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.

UCD3138: Questions about void init_loop_mux(void){} in hard-switched full-bridge firmware for UCD3138

Part Number: UCD3138

Hello, I'm learning about the UCD3138's hard-switched full-bridge firmware.
I have some problems with void init_loop_mux(void){}.
Void init_loop_mux(void)
{

LoopMuxRegs.FILTERKCOMPA.bit.KCOMP0 = (3 * pmbus_dcdc_config[0].period) >> 6; 
LoopMuxRegs.FILTERKCOMPA.bit.KCOMP1 = 6000; //(1<<13); //In 4ns //
LoopMuxRegs.FILTERKCOMPB.bit.KCOMP2 = pmbus_dcdc_config[0].period >> 4;/

}
I know the above program is multiplied by the coefficient KCompx in filter YN,

but I do not know why Kcomp0 is equal to (3*pmbus_dcdc_config[0].period) >> 6, Kcomp1 is equal to 6000, KCOMP2 is equal to  pmbus_dcdc_config[0].period >> 4, 

How is the specific value obtained?

  • Hi,
    KCOMP0 is 75% of period, to coordinate with Filter 2 output, the filter0 output can suddenly vary from 50% to 100%. This is used for feedforward control.
    KCOMP1 is used for current loop, just used like the gain term.
    KCOMP2 is used for filter2, just like gain term.

    Regards,
    Sean
  • Pmbus_dcdc_config[0].period shifts right by 4 bits because of the adjustment of precision, from 250ps to 4ns, right?
    75% of the period or 100% of the period and 6000, this value is equal to the gain, it is a trial and error, not a calculation, right?