Simscape Electrical Solver configuration
6 views (last 30 days)
Show older comments
Hi
I am using Simulink simscape electrical. Initially I verified my simulink electrical simulation circuit against my LT spice model of the switching regulator (buckboost) for a variety of use cases. Recently I have been getting some unexpected results in Simulink, e.g. the output voltage doesnt reach the desired setpoint regardless of dutycycle. So I went back to LT Spice to check and it seems there is a discrepancy.
I have the following solver setup windows to play with:
- Model Settings > Solver
- Block Parameters > Solver Configuration
I have played around with most of the parameters to see what changes occur but it's mostly at random, including:
- Alternating between fixed and variable step
- Using Backward Euler and Trapezoidal Rule solvers
- Turning zero crossing detection on & off
- Reducing sampling time to the minimum possible without introducing aliasing from my switching converter
None of this makes my output resemble my LT Spice model. How can I set up my solver to make it produce results consistent with LT Spice?
In Solver Configuration we have the option of using a local solver or unchecking this box? Does this mean we can feed in some external solver, .e.g. LT SPice or other spice software somehow?
0 Comments
Answers (1)
Bruno Rodriguez Esteban
on 8 Mar 2021
Moved: Sabin
on 9 Jan 2023
Hi Sea,
It is a bit difficult to guess without any reproduction model. It could be something different to the solver what is causing the discrepancy. In case you haven't used them, there are various SPICE-compatible semiconductors:https://www.mathworks.com/help/releases/R2020b/physmod/sps/spice-semiconductors.html
Regarding the solver, if you uncheck the box, you would be using Simulink's solver: https://www.mathworks.com/help/releases/R2020b/simulink/ug/choose-a-solver.html
If you check it, you will be using a specific fixed-time solver for Simscape: https://www.mathworks.com/help/releases/R2020b/physmod/simscape/ref/solverconfiguration.html
Hope it helps,
Bruno
0 Comments
See Also
Categories
Find more on Choose and Parameterize Blocks 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!