Simscape Electrical Solver configuration
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Bruno Rodriguez Esteban
2021-3-8
移动:Sabin
2023-1-9
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Choose and Parameterize Blocks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!