How do I increase simscape simulation accuracy?

20 ビュー (過去 30 日間)
Steven
Steven 2015 年 10 月 20 日
回答済み: Sebastian Castro 2015 年 10 月 20 日
I'm simulating a semi-simple circuit with switches, resistors and caps and a voltage source. I need accuracy on the order of 10e-9 volts, when my voltage source drops below 10e-6, in another section that is slightly attenuated from the voltage source I should see something on the order of 100e-9 and all I see is zero. I have played with the solver settings in simulink and the solver configuration block settings but I haven't been able to get better accuracy. In fact, when I started changing the solver parameters to fixed step or changing the tolerance in the simulink solver configuation, the simulation would not run and stayed on a time step of ~10e-4. So my question is How can I get better accuracy. In spice simulators you can force the tolerances on voltage or solver tolerances.

採用された回答

Sebastian Castro
Sebastian Castro 2015 年 10 月 20 日
The first thing I would do is make sure the local solver is turned off in your Solver Configuration block. If you want the most accuracy, you want to make sure the Simscape network is treated as a continuous system rather than a discretized one.
Secondly, I'd go to the Solver Pane of the model's configuration parameters and reduce the absolute and relative tolerance parameters until your results are as you expect. You could also try other solver options, including the type of solver used. For example, ode15s is the stiff solver that can generally give the most accurate results, according to the documentation.
- Sebastian

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVariable Initialization についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by