- Interpreted MATLAB Function blocks call the MATLAB execution engine at each time step, which can drastically slow down the simulation, so replace with MATLAB Function blocks.
- Convert MATLAB file S-functions to subsystems or C-MEX file S-functions.
- For physical models, implicit solvers like ode23t or ode15s can be more efficient. Ensure the maximum step size is set to auto unless specific requirements dictate otherwise.
- Identify which blocks and components are contributing to the highest solver resets and zero crossings.
- Speed Up Simulation
- Modeling Techniques That Improve Performance
- Improving Simulation Performance in Simulink - MATLAB & Simulink