固定成本仿真
您为模型指定的定步长求解器类型、步长和迭代次数会影响实时仿真的速度和准确度。实时仿真工作流可帮助您选择固定成本求解器设置,使您的模型能够在目标机上运行而不会超限。
函数
simscape.getLocalSolverFixedCostInfo | Determine iteration requirement when transitioning to fixed cost (自 R2021b 起) |
主题
- Real-Time Simulation Workflow
Configure the solvers in your Simscape™ model for real-time simulation.
- Fixed-Cost Simulation for Real-Time Viability
Avoid real-time simulation overruns by choosing a step size and number of iterations that limit the computational cost of simulating your Simscape model.
- Solvers for Real-Time Simulation
The fixed-step solver, step size, and number of iterations that you specify affect how your Simscape model simulates in real time.
- Determine System Stiffness
Choose the right solver for fixed-cost simulation based on the numerical stiffness of your model.
- Choose Step Size and Number of Iterations
Optimize your Simscape model for real-time simulation and avoid overruns by specifying a combination of step size and number of iterations that provides acceptable accuracy and speed.
- Estimate Computation Costs
Determine if your Simscape model is likely to cause an overrun when you simulate it on your real-time target machine by estimating computational costs.
- Troubleshooting Real-Time Simulation Issues
Solve issues that cause your Simscape model to overrun during real-time simulation by using real-time workflows and Performance Advisor checks.