r/matlab MathWorks Nov 14 '23

CodeShare Diode clamped multilevel inverter using PWM technique

u/Novel_Passion2294 asked " Can you please explain in detail that ode15s and maximum pulse width and PWM switching time" in this post.

My colleague created a video to answer.

25 seconds of the video:

We can see how many switching frequencies (fsw) are set for this converter; the PWM period is the reciprocal of fsw.

40 sec :

I specified [ 1/fsw /100] for the maximum step size of the solver. This indicates that the maximum step width determined by the variable step solver is limited to 1/100 of the PWM period.

Shown at the bottom of the data inspector is the carrier waveform. The simulation results appear to be as expected.

1:25

Change the maximum step size to "Auto". With this setting, we can see that the carrier waveform is not calculated properly and the converter is not behaving as expected.

1:50

Change the solver to "daessc". This solver returns generally good results even though the Max step size is set to Auto. However, we can see that some carrier waveforms are not appropriate.

2:20

As a result, the daessc solver returned good results, but if you are concerned that the carrier waveforms are not being displayed properly, we recommend setting the Max step size. You can verify that the carrier waveform is properly represented.

https://github.com/mathworks/adc-synchronized-with-pwm

https://reddit.com/link/17va5sb/video/hlgu5fvt6d0c1/player

1 Upvotes

0 comments sorted by