khaza_davoodi asked . 2021-10-25

What are the general guidelines for choosing ODE

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.

solvers , ode , 45 , 1 , 2 , 4 , 5 , 3 , 15s , solver , select , choose

Expert Answer

Neeta Dsouza answered . 2024-04-23 10:17:30

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:
 
The same idea of selecting/configure variable step solver applies to fixed step solver. Start with a fixed step size and a solver, simulate, then reduce the step size by a factor of 10 to see if the results are close.
 
3. Ode14x is an implicit fixed step solver. If the variable step solver used is ODE15s or other implicit solver, when switching to fixed step solver, ode14x may be a start.
 
4. Fixed step solvers don’t support zero crossing yet. If the system has a lot of zero crossing, consider reducing the step size.
 
5. For system with switching, it is highly possible that these switching may introduce discontinuities and chattering in the system. To remove the chattering, consider adding a hysteresis after the original switching signal. For example, if the original switching condition is a==0, then change it to: if abs(a)<0.001. The hystersis band size is selected by trial and error.
 
6. When checking the simulation results, don’t check the final answer. Please also check the value of internal states and make sure they are in the correct range. For example, don’t just check the output from an integrator; also check its derivative input since integrator works like a low pass filter, it may filter out some of the unexpected high frequency components in the input signal.
 
7. Remove algebraic loops by using state port or some memory blocks.
 
8. If possible, try not using numerical derivative (du/dt ) in the model.


Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.