how to get a customised ouput PWM signal from this epwm block using Matlab simulink and get same result on DSO.

조회 수: 14 (최근 30일)
how to get a customised ouput PWM signal from this epwm block where, How to generate this type of PWM signal from epwm block using Matlab simulink and get same result on DSO with F28379D. I want to get this type of wave form on DSO and further to my switches in hardware. Upper PWM signal is for Switch 1 and lower PWM is for switch 2.Here i have duty cycle as 60.6 % of period, here time period is 0.02 second for one complete cycle and the frequecy is same 30 Khz for all. I want generate a signal where, from 0 to t/2 i.e from 0 to 0.01 seconds the switch will pulsate on/off and from T/2 to T i.e from 0.01 to 0.02 the switch will only on and no pulsating means no on/off of the switch. And for 2nd PWM output the duty cycle is 35 % of period & the time period is 0.02 same 30 Khz frequency.

답변 (1개)

Aditya Pahariya
Aditya Pahariya 2025년 7월 10일
Hi,
To generate the requested waveform on the ePWM pin, you can XOR the chopped signal with '1' using the CLB. Please follow these steps:
1. Enable the chopper in the ePWM block.
2. Open the CLB project in CCS:
  • Launch Code Composer Studio (CCS) and open the SysConfig tool for an empty CLB project from the TI examples.You can use the project located at:C:\ti\c2000\C2000Ware_5_02_00_00\driverlib\f2837xd\examples\cpu1\clb\CCS\clb_empty.projectspec
  • In SysConfig, set up the XOR operation in the Look-Up Table output.
  • Input 0: Boundary input (output of the ePWM pin)
  • Input 1: Constant '1' (to be XORed in the output logic equation)
  • Build this CCS project within CCS.
3.Configure MATLAB and hardware
  • In MATLAB, go to Configuration Parameters Hardware Implementation Target Hardware Resources CLB.
  • Enable the CLB tile and route the OUT0 signal to ePWM1A.
  • In the CLB configuration header file (clb_config.h) and CLB configuration source file (clb_config.c), select the files generated in step 2.
4. Build, deploy, and run the project.
After deployment, you should observe the output signal on the ePWM pin.
You will now get the desired waveform. You can further adjust the values as required to achieve the specific waveform pattern through ePWM.
Regards,
Aditya

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by