You can use the following ways to speed up parameter estimation, response optimization, and sensitivity analysis tasks:
Fast restart mode
You can use a combination of these, but depending on the limitations associated with each, you may or may not see an increase in speed. For example, you can use parallel computing and fast restart together to speed up optimization. However, you do not see an increase in speed compared to using only parallel computing if the compilation phase of your model is short.
You can use Parallel Computing Toolbox™ software to speed up parameter estimation, response optimization, and sensitivity analysis. When you use parallel computing, the software distributes the independent simulations on multiple MATLAB® sessions. Thus, the simulations run in parallel, which reduces the optimization time.
Using parallel computing may reduce the optimization time in the following cases:
The model contains many parameters to optimize, and you use the
Gradient descent or
Pattern search method is selected as the
The model contains many uncertain parameters and uncertain parameter values.
The model is complex and takes a long time to simulate.
You can use parallel computing in the Parameter Estimation, Response optimization, and Sensitivity Analysis tools, or at the command line. For more information, see Use Parallel Computing for Parameter Estimation, Use Parallel Computing for Response Optimization, and Use Parallel Computing for Sensitivity Analysis.
You can use the fast restart feature of Simulink® to speed up design optimization of tunable parameters (Simulink) of a model.
Fast restart enables you to perform iterative simulations without compiling a model or terminating the simulation each time. Using fast restart, you compile a model only once. You can then tune parameters and simulate the model again without spending time on compiling. Fast restart associates multiple simulation phases with a single compile phase to make iterative simulations more efficient. You see a speedup of design optimization tasks using fast restart in models that have a long compilation phase. See How Fast Restart Improves Iterative Simulations (Simulink).
When you enable fast restart, you can only change tunable properties of the model during simulation. For more information about the limitations, see Limitations (Simulink).
You can configure fast restart in the Parameter Estimation, Response optimization, and Sensitivity Analysis tools, or at the command line. For more information see, Improving Optimization Performance Using Fast Restart (GUI), Improving Optimization Performance Using Fast Restart (Code), Use Fast Restart Mode During Response Optimization, or Use Fast Restart Mode During Sensitivity Analysis.
Design Optimization™ software supports
simulation modes. You can accelerate the design optimization computations by changing the
simulation mode of your Simulink model to
Accelerator. For information about these modes,
see How Acceleration Modes Work (Simulink).
The default simulation mode is
this mode, Simulink uses interpreted code, rather than compiled
C code during simulations.
Accelerator mode, Simulink
Design Optimization software
runs simulations during optimization with compiled C code. Using compiled
C code speeds up the simulations and reduces the time to optimize
the model response signals.
For information about the limitations, and how to use the
Accelerator mode, see Use Accelerator Mode During Simulations.