Modified Sinusoidal Pulse Width Modulation SPWM
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
2 Comments
Time DescendingAre 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).