MATLAB Answers

Trip-zone using Embedded Coder Support Package for Texas Instruments

4 ビュー (過去 30 日間)
Mohammed Alharbi
Mohammed Alharbi 2020 年 11 月 12 日
コメント済み: Mohammed Alharbi 2020 年 11 月 18 日
Hi,
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)
{
EALLOW;
EPwm3Regs.TZFRC.bit.CBC=1;
EDIS;
}
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!
Regards,
Mohammed

  0 件のコメント

サインインしてコメントする。

回答 (1 件)

Venkatesh Chilapur
Venkatesh Chilapur 2020 年 11 月 17 日
Hi Mohammed,
On the ePWM block Mask you will find the Tab for Trip Zone configuration. Here you can enable CBC and OST trips here.
Regarding your question "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" Please connect with TI Engineers on TI E2E Forum as it is device specific.
For additional questions on TI C2000 Emdedded Coder Support Package please contact our support channel:
Regards,
Venkatesh C

  1 件のコメント

Mohammed Alharbi
Mohammed Alharbi 2020 年 11 月 18 日
Hi Venkatesh,
Thanks for your reply. Indeed I have already enabled the CBC and OST trips in the ePWM block as you can see in the attached screenshot above (Capture123.JPG). I have also included a System Update block from the Simulink Library to enable the TZFRC register of the EPWM3 as I don't beileve there is another way to do that using the Emdedded Coder Support Package. So what do you think is the problem?
Please find attached a copy of the module.
Thanks!

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by