I am using the Embedded Coder Support Package for Texas Instruments to control a DC-DC three-phase interleaved buck converter. Each phase is shifted by 360/3 degree.
I am using the F28377D controller with a special development board.
I am trying to implement a phase-shedding control where in which I want to switch OFF the third phase (i.e. EPWM3) when the output current goes below a specific value. Once the third phase is switched OFF, the phase shift between the remaining two phases will be 360/2 degree. For the phase-shift control I was able to control it using a MATLAB script file which you could see in the attached Simulink file.
My issue is how to to control the switching ON and OFF of the third phase (EPWM3). Ideally, this should be achieved through the trip zone block of the ePWM module. I believe the correct way to do this would be to use the TZFRC register, but I don't know how to access it using the EPWM block. Hence, I used a System Update block from the Simulink Library and I included the below conditions to enable the TZFRC register of the EPWM3:
if (rtb_gainfrom2e121to3volt24 <= 40.0)
The code is forcing the ePWM3 to switch off if the output current is below 40A.
If the current is above 40A, all the three phases should be switch ON and the phase shift is 360/3 degree. For this case, I don't have any issue and it works fine. However, when I want two phases to switch ON, I get the attached waveform where you can see that that a small current is still conducted in the third phase instead of switching it OFF completely (Purple waveform). So can you please let me know what could be the problem?
Note that the same logic works fine in an open loop system, but I am having this issue in the closed loop system where I have the interruption block included. It also works only if I choose the Cycle-by-Cycle (CBC) trip event and doesn't work properly when I select the one-shot trip event.
Thanks in advanced!