need help on trouble shooting my Simulink controller model
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have created a simulink model for an inverted airfoil mounted on a moving cart (very similar to the inverted cart-pendulum). I created a subsystem from my plant model and then added a PID control loop around it. However, I'm getting this error:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/762871/image.png)
I tried reducing the strep size in Solver under Configuration Parameters, but it did not work. Attached here is my model, could someone please give me some suggestions?
I also attached a PDF file that includes my derivation of equations of motion and the numerical values for each parameter I've used
2 commentaires
Salman Ahmed
le 14 Oct 2021
Hi,
Could you share the related parameter values loaded in your MATLAB workspace like m, l, g?
Réponses (1)
Aniket
le 30 Jan 2025 à 9:04
Modifié(e) : Aniket
le 30 Jan 2025 à 9:08
I am assuming the derivations mentioned in attached PDF are correct and have verified that the model is in line with the derivations. When I tried reproducing the issue, I received the same error message. As stated in Diagnostic viewer, the value of "theta_dot" seems to grow exponentially to cross infinity, and hence MATLAB outputs NaN after 18 time steps. I also logged other signals, and found similar issues with "x_dot". Because of this, the "Force_x" also explodes after certain time steps (See below attached screenshots for reference).
At time step: 8
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1824642/image.png)
At time step: 9
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1824643/image.png)
I suggest debugging your model step-by-step using "Step Forward" simulation and verifying the cause of this exponential increase in signal values. Also check the derivations for any errors.
Additionally, kindly ensure that initial conditions for Unit Delay and Integrator blocks (default: 0) are set appropriately.
I hope this helps resolve the issue!
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!