Please, how can I prevent the quad rotor from rotating after about 1 percent into simulation and make the quadrotor stable?

1 view (last 30 days)
The quadcopter simulink simulation works but the quadrotor rotatates at about 1% into the simulation when checking through the visualization but everything looks okay whecking through the scope.
Also, I keep getting this warning even though the simulation runs to completion. Please how do I take care of this warning or is the model fine?
Solver is encountering difficulty in simulating model 'Quadrotorsim2705' at time 10.000000000000036. Simulink will continue to simulate with warnings. Please check the model for errors.
Caused by: Solver was unable to reduce the step size without violating minimum step size of 3.55271E-14 for 1 consecutive times at time 10. Solver will continue simulation with the step size restricted to 3.55271E-14 and using an effective relative error tolerance of 0.00362762, which is greater than the specified relative error tolerance of 0.001. This usually may be caused by the high stiffness of the system. Please check the system or increase the solver Number of consecutive min steps violation parameter.

Answers (1)

vidyesh
vidyesh on 27 Oct 2023
Hi UASLAB,
It is my understanding that you want to remove the warning your model is generating when run.
When the solver is unable to solve the equation within the specified step-size, it may issue a warning or error. To address this issue, one suggested solution is to increase the minimal number of consecutive steps taken by the model.
To implement this solution, please follow these steps:
  1. Open the Configuration Parameters dialog (Ctrl + E).
  2. Navigate to the Solver tab and locate the Solver Details section.
  3. Increase the value of 'Number of consecutive min steps'.
Additionally, you can try relaxing all the tolerances in your model by adjusting the Model Configuration Parameters.
For further information and detailed guidance, I recommend referring to the following documentation:
  1. Min step size – https://www.mathworks.com/help/simulink/gui/minstepsize.html
  2. Number of consecutive min steps - https://www.mathworks.com/help/simulink/gui/numberofconsecutiveminsteps.html
  3. Tolerances and Stopping Criteria - https://www.mathworks.com/help/optim/ug/tolerances-and-stopping-criteria.html
I hope this answer helps.

Categories

Find more on Simulink in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!