Trip-zone using Embedded Coder Support Package for Texas Instruments

18 visualizaciones (últimos 30 días)
Mohammed Alharbi
Mohammed Alharbi el 12 de Nov. de 2020
Comentada: tcagdas el 24 de Mzo. de 2023
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

Respuestas (3)

Venkatesh Chilapur
Venkatesh Chilapur el 17 de Nov. de 2020
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 comentario
Mohammed Alharbi
Mohammed Alharbi el 18 de Nov. de 2020
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!

Iniciar sesión para comentar.


Krishan Kant
Krishan Kant el 15 de Oct. de 2021
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:
  1. 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

Venkatesh Chilapur
Venkatesh Chilapur el 25 de Oct. de 2021
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 comentario
tcagdas
tcagdas el 24 de Mzo. de 2023
hi, without any adc modul, how can I disable my epwm block after a ceartain time

Iniciar sesión para comentar.

Comunidades de usuarios

Más respuestas en  Power Electronics Control

Community Treasure Hunt

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

Start Hunting!

Translated by