- Are you working with a specific microcontroller or DSP (e.g., TI C2000 series) using MATLAB/Simulink Embedded Coder, or are you simulating the PWM generation entirely within MATLAB/Simulink?
- Are you aiming to generate two complementary PWM signals (180-degree phase-shifted) from a single ePWM module for a particular modulation technique (e.g., SPWM, SVM)?
- Have you already configured the ePWM module in your model or code? If so, could you share a brief description or screenshot of your current configuration?
how to use two carriers for epwm1a module.
49 views (last 30 days)
Show older comments
How to use two carriers for a single epwm module. Two 180 degree phase opposition carriers for a single epwms module in a grid fundamental 50 Hz cycle.
0 Comments
Answers (2)
Spoorthy Kannur
on 14 Oct 2025 at 9:33
Hi Mandvi,
Could you please clarify the following details:
Additionally, please refer: https://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
4 Comments
Spoorthy Kannur
on 15 Oct 2025 at 6:32
Hi Mandvi,
Thanks for the update. You can try the following:
- Use ePWM1 as the first carrier.
- Use ePWM2 as the second carrier, configured with a phase shift = TBPRD/2 (i.e., 180° shift).
- Both can have identical compare logic.
Simulink configuration:
- Set ePWM2’s Phase Enable = ON
- Set Phase Offset = half of TBPRD.
- Keep same carrier frequency.
Hope this helps.
Spoorthy Kannur
25 minutes ago
Edited: Spoorthy Kannur
23 minutes ago
A single ePWM peripheral supports one carrier/compare behaviour per timer period, so you cannot directly have carrier A for 0–90° and carrier B for 90–360° inside the same TBPRD using one ePWM instance.
You may try the following options:
- Use the MathWorks Three-phase, Three-level PWM generator block from the “Simscape / Electrical / Control / Pulse Width Modulation” library (recommended for 3-level operation). It’s designed for dual carriers and will generate the correct gating (https://www.mathworks.com/help/sps/ref/pwmgeneratorthreephasethreelevel.html).
- Use two ePWM modules (ePWM1 = carrier A, ePWM2 = carrier B) running synchronised TBPRD and multiplex their outputs (either hardware mux or software switch using ePWM output routing) at the 90° boundary. This is reliable and keeps carriers stable.
- If you must use only one ePWM, change CMPA/CMPB (or TBPRD) mid-period using a timed interrupt to swap in the second carrier. This is possible but timing-critical and riskier (must use immediate loads, protect against glitches).
For F2806x:
- If using two ePWMs: keep TBPRD identical and sync the timers (use master/slave sync). Route/steer outputs at the precise phase boundary.
- If using mid-period updates: use ePWM interrupts and immediate load writes to CMPA/CMPB; carefully test for output glitches and dead-time safety.
If this does not resolve the issue, kindly reach out to MathWorks Technical Support for more help (https://www.mathworks.com/support/contact_us.html?s_tid=hp_ff_s_support).
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!