Ideal switch is not ideal?

Hi all!
I'm new to Matlab/Simulink and just made a simple chopper simulation, and I noticed the "ideal switch" doesn't look so ideal...
Shouldn't the on-off and vice versa times be complete 0? In my simulation they're clearly not 0, as would be expected for an ideal switch.
Below is a screenshot of the simulation that shows a square wave with clear on and off delay time

Answers (1)

Sabin
Sabin on 29 Sep 2023
It not a fully ideal switch as the block includes ON resistance and OFF conductance. However, the results you are seeing are also related to the solver configurations being used. If you are using default solver configuration, variable step with all on Auto, it is likely that Max step size will be 1 in this model and the results will look as you show in the plot. If you explicitly set the Max step size to 1e-3 or something similar it will be possible to capture the behavior better. Similarly, if using fixed step simulation, it is important to choose a fixed step that is small enough to capture fast dynamics associated with the switch. I hope this helps.

Categories

Find more on Simulink in Help Center and File Exchange

Asked:

on 19 Mar 2022

Answered:

on 29 Sep 2023

Community Treasure Hunt

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

Start Hunting!