# What are the general guidelines for choosing ODE solvers for simulating a model using Simulink?

I want to know the basic procedure to be followed in choosing solvers from Configuration Parameters while simulating a **Simulink model.**

# ANSWER

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Sometimes different solver configuration cause **simulation** results to change a lot. It means the model should be tuned a little bit to get good simulation results. The following are some heuristic rules to help user select the solver and verify the simulation results and tune the model.

1 Variable-step solver:

When simulating a model, if possible, always start with a variable step solver (a good start is ODE45) with zero crossing (if applicable) turned on. If the simulation result is as expected, change to other variable step solver. If the model is well designed, the simulation results given by different solver should be pretty close. In this case, the system probably is a non-stiff system. If the simulation is very slow or the results are not consistent with different implicit solver, try changing to implicit solver such as ODE15s. If the implicit solver works better than the explicit solver, the system may be a stiff system.

In this stage, the tolerance and min/max step size should be changed to see if the simulation result is stable. For example, change the relative tolerance from 1e-3 to 1e-6. The two simulation results should be pretty close. If not, change the tolerance from 1e-6 to 1e-9 and so on. Once a set of parameters gives a stable simulation result, use this simulation result as a base line.

2. Fixed step solver:

**SEE COMPLETE ANSWER CLICK THE LINK**