Part Number: LAUNCHXL-F28379D
Hello,
I'm designing a digitally controlled buck converter. I've read DCL user guide and application note SPRAAB3.
First of all, I've planned to use "DCL_runPI_C1" function for compansator. "float32_t DCL_runPI_C1(DCL_PI *p, float32_t rk, float32_t yk" returns me the compansated error signal...
However, after reading SPRAAB3, I noticed that I didn't take "sample and hold circuit effects","computational delay" and "zero order hold effect" . As I read SPRAAB3, they reduce phase margin of system. Therefore, I tried to implement methods described at application note of SPRAAB3.
Let's consider that I've designed a series PI compansator at z domain by using sisotool and I want to us it at my ISR loop.
It has a form of below ZPK format.
I should call a function at ISR in order to use above compansator function. At DCL user guide, I couldn't understand how to use it because there is no "run" function for ZPK formated PI controller, which takes referrence and feedback value likeDCL_runPI_C1.
There are some load functions like "Load the Series Form PI Controller from ZPK" as "DCL_loadSeriesPIasZPK" . However, I couldn't understand how to use it in my code.
My ISR is at below;
interrupt void CNTL_ISR(void)
{
yk = Vout_real; // Just information to me
uk = DCL_runPI_C1(&pi_cur, rk, yk); // Takes 52 cycle
EPwm1Regs.CMPA.bit.CMPA = period * uk; // Load New Duty Cycle
// Return from interrupt
EPwm3Regs.ETCLR.bit.INT=1; //Enable INT Flag to Enable Further Interrupts
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3; // Acknowledge PIE group 3 to enable further interrupts
}