配置仿真条件
选择求解器、设置初始条件、选取输入数据集、设置步长
在 Simulink® 中构建模型后,您可以对仿真进行配置,使之可以快速、准确地运行,而无需对模型进行结构性更改。
配置仿真的第一步是选择求解器。默认情况下,Simulink 会自动选择变步长求解器。您可以微调求解器选项,或者在“配置参数”对话框的求解器窗格“求解器”窗格中选择不同求解器。
有时,仿真可能会减慢或停滞。使用求解器探查工具可确定仿真中的瓶颈,并获得改进求解器性能的建议。
函数
工具
模型设置
主题
Simulink 中的求解器
- 选择求解器
基于模型的动态特性选择求解器。
- 比较求解器
求解器通过使用模型提供的信息,计算动态系统在指定时间范围内连续时间步的状态,从而对动态系统进行仿真。根据系统模型计算系统连续状态的过程称为解算模型。没有任何一种模型解算方法可满足所有系统需要。因此,Simulink 提供一组称为求解器的程序,每个程序都利用一种特定方法来解算模型。“配置参数”对话框允许您选择最适合您的模型的求解器。 - 过零检测
了解过零事件对仿真的影响。 - Choose a Jacobian Method for an Implicit Solver
For implicit solvers, Simulink must compute the solver Jacobian, which is a submatrix of the Jacobian matrix associated with the continuous representation of a Simulink model. - Use Local Solvers in Referenced Models
Learn how local solvers work and how to configure a local solver. - Zero-Crossing Detection with Fixed-Step Simulation
Learn how zero-crossing detection affects fixed-step simulation.
状态信息
- Save Block States and Simulation Operating Points
Learn how you can use state information logged from simulation and decide how to log states and operating points. - Use Model Operating Point for Faster Simulation Workflow
Reduce the time required to run a set of simulations by simulating from an initial operating point.
求解器探查工具
- Examine Model Dynamics Using Solver Profiler
Identify factors affecting model simulation using the Solver Profiler. - Solver Resets
The Solver Profiler logs events that cause the solver to reset its parameters because solver resets do incur computational cost. - Zero-Crossing Events
Detect zero-crossing events using Solver Profiler. - Solver Exception Events
This example simulates two identical nonlinear spring-damping systems. - Jacobian Logging and Analysis
The Solver Profiler supports Jacobian logging and analysis for implicit solvers.
代数环
- 代数环概念
了解在仿真过程中代数环是如何产生的。 - Identify Algebraic Loops in Your Model
If Simulink reports an algebraic loop in your model, the algebraic loop solver may be able to solve the loop. - Remove Algebraic Loops
Learn how to break undesired algebraic loops in a model. - Modeling Considerations with Algebraic Loops
Learn modeling techniques to avoid unnecessary algebraic loops.