Modified Sinusoidal Pulse Width Modulation SPWM

ali al-khayyat on 24 Aug 2019
Latest activity Reply by ali al-khayyat on 30 Dec 2020

 Please, I would like to generate triangle signal for pwm. It must start from 0 to 60 degree and then from 120 to 180 degree and then repeat itself. Could you help me if you can by coding or simulink ?
I will attach picture for clarification
Greg Wolff
Greg Wolff on 26 Aug 2019

Are you looking to simulate this behavior in Simulink, or are you trying to configure a hardware peripheral to produce this behavior?

Assuming you are looking to do this in simulation, I recommend using a lookup table block

https://www.mathworks.com/help/simulink/slref/1dlookuptable.html

You can create a table of positions versus amplitude extrema values, and configure the lookup table to interpolate values in between.

In this case, the independent variable would be "position" (the input to the lookup table), and the dependent variable would be "amplitude" (the output of the lookup table).

The lookup table block requires monotonically increasing values for the independent variable (thus repeated values like 60, 120, 240 and 300 must have small deltas).

ali al-khayyat
ali al-khayyat on 30 Dec 2020

Thank you very much