Trip-zone using Embedded Coder Support Package for Texas Instruments
조회 수: 16 (최근 30일)
이전 댓글 표시
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
답변 (3개)
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
Krishan Kant
2021년 10월 15일
Hi All
I am trying a similar thing to use one shot trip in EPWM when there is an overcurrent or overvoltage.
I am trying the way you described above. I used a System update block with code to force tripping the EPWM.
I checked both cases with Enable trip zone OST in PWM module enable and disabled. But nothing is working.
I have 2 question:
- After processing the ADC signal and converting it to Current. I used that value to trip the EPWM under overcurrent. I am looking at the generated code to find what that current variable will be. which is usually not a variable, it is some mathematical operations on few variables. Is there a better way to do this? Or define a variable somehow.
if ( (c2807x_2837xx_adcpwmasynctest_B.ADC1 -c2807x_2837xx_adcpwmasynctest_P.Constant3_Value) *c2807x_2837xx_adcpwmasynctest_P.ADCandSensorgain1_Gain>3) {
EALLOW;
EPwm1Regs.TZFRC.bit.OST = 1;
EDIS;
}
2. With this code in execution section, it is not working. Is there some setting to do. I want to use force trip register so that it gets latched. For that setting I didnt enable any trip zone as shown below.
Any idea what should I do to make it work?
Thanks
댓글 수: 0
Venkatesh Chilapur
2021년 10월 25일
Hi Krishnan,
You may also want to do the following settings:
Upon the trip condition the above setting will esure the output are driven to the desired state. In your case, I see them set to
"No action". Hence, even if the Trip condition is enabled, it is unlikely that it will result in any change in the ePWM outputs.
For additional questions on TI C2000 Emdedded Coder Support Package please contact our support channel:
댓글 수: 1
tcagdas
2023년 3월 24일
hi, without any adc modul, how can I disable my epwm block after a ceartain time
커뮤니티
더 많은 답변 보기: Power Electronics Community
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!