PID Tuning problem. The values are too high.

13 views (last 30 days)
Hello,
I created a Simscape Multibody simple model of a quadcopter and I wanted to control its hovering height through a PID controller.
The quadcopter is actuated through the thrust generated by the Aerodynamic Propellers block that receive as input the rotational velocity of the blades.
When I click on the "Tune" button in the PID i get extremely high values for the P, I and D gains and the simulation still gets unstable.
Can someone help me?
Thanks in advance.

Answers (1)

Piyush Dubey
Piyush Dubey on 15 Sep 2023
Edited: Piyush Dubey on 15 Sep 2023
Hi Francesco,
I understand that you are trying to create a Simscape Multibody model of a quadcopter and want to control its hovering height through a PID controller. However, when you click on the "Tune" button, you are getting extremely high values for the P, I, and D gains, leading to simulation instability.
Please note that PID tuning can be an iterative process, requiring multiple adjustments to achieve the desired control performance. Patience and careful observation of the system's behaviour during simulation can help you identify the appropriate PID gains for your quadcopter model.
Here are a few suggestions to address these issues:
  1. Start with small gains: Begin by setting small initial values for the P, I, and D gains. This can help prevent instability in the simulation. Gradually increase the gains as you fine-tune the controller.
  2. Time constants: The time constants in the PID controller can affect its response. Experiment with tuning the time constants to find a balance between responsiveness and stability. Increase the derivative time constant (D) to dampen oscillations and adjust the integral time constant (I) to address steady-state errors.
  3. Analyze the system dynamics: Check for any inherent instabilities or limitations in the quadcopter model. Ensure that the model accurately represents the physical dynamics of the quadcopter, including factors such as inertia, aerodynamics, and motor characteristics.
  4. Implement techniques like anti-windup and MPC (model predictive control): To prevent integral windup, which can lead to instability, consider implementing anti-windup techniques in your PID controller. These techniques can help limit the effect of integrator windup during large control errors.
Please refer to the following MathWorks documentation links for more information on PID controllers, “anti-windup”, and “MPC”:
Hope this helps!
  1 Comment
Sam Chak
Sam Chak on 15 Sep 2023
Thank you for your suggestion regarding starting with small gains. Could you please demonstrate how to set small initial values for the P, I, and D gains on the PID Tuner? Screenshots are welcome, as they will help both OP and me learn your method and provide the PID autotuner with the appropriate small values.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!