Nonlinear Iteration is not converging?

70 views (last 30 days)
Yusuf Taha Okutan
Yusuf Taha Okutan on 27 Jan 2024
Commented: Sam Chak on 29 Jan 2024
Hello, I give an error about:
An error occurred while running the simulation and the simulation was terminated
Caused by:
Solver encountered an error while simulating model 'PID' at time 729.49130150480926 and cannot continue. Please check the model for errors.
Nonlinear iteration is not converging with step size reduced to hmin (2.59167E-12) at time 729.491. Try reducing the minimum step size and/or relax the relative error tolerance.
When I check the scopes of my system parameters, everything is good until the time which the simulation is stopped. ı checked all my equations. But I cannot find the solution. I guess this problem is about infinite or finite parameters. Why this problem does occur? and How I solve this problem
Thanks for your answers.
Dyuman Joshi
Dyuman Joshi on 27 Jan 2024
@Yusuf Taha Okutan, As Torsten said, Please send it to TMW Technical support via this link - Contact Support
Yusuf Taha Okutan
Yusuf Taha Okutan on 29 Jan 2024
Thank you my fault I did not see. I send

Sign in to comment.

Answers (1)

Sam Chak
Sam Chak on 27 Jan 2024
Based on your Simulink model titled "PID.slx," it seems that you are attempting to simulate the motion of an unmanned aerial vehicle (UAV). In the field of aerospace engineering, it is well-known that the equations of motion for UAVs are highly nonlinear, coupled, and unstable. Additionally, it appears that you are utilizing Euler angles as the attitude reference frame, which can lead to kinematic singularities at certain angles, such as 90 degrees (or 270 degrees).
Without an active flight control system in place, it is not surprising that certain state values may continue to grow significantly, resulting in numerical issues for the Simulink solver.
Yusuf Taha Okutan
Yusuf Taha Okutan on 29 Jan 2024
I understand. Allow me to provide additional details about the project. While it involves a UAV model, my current objective is to develop the model before implementing a PID controller. Despite attempting various solutions, I have encountered challenges. I hypothesized that the issue might stem from using Euler angles in degrees instead of radians. I am keen on resolving this problem and would appreciate any insights or suggestions.
Sam Chak
Sam Chak on 29 Jan 2024
Since this is not a bug-related issue, I suggest to derive the control system equations and write code that models the system according to the rules in MATLAB programming. This way, it becomes easier to check for mistakes in typos, signs, or incorrect usage of mathematical functions. Once the code is successfully implemented, constructing a Simulink model based on the MATLAB code becomes a straightforward task.

Sign in to comment.





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!