Ideal switch is not ideal?
Show older comments
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
on 29 Sep 2023
0 votes
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
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!