How to pick a Lyapunov function and estimate PID gains?

303 Views Asked by At

I am currently trying to estimate the range of PID gains by developing a Lyapunov function for a nonlinear 6-Dof quadrotor system. The system is of the following form:

$$M(q)\ddot{q}+C(q,\dot q)\dot q+g(q)=\tau$$ $$\tau=K_p\tilde{q}+K_v\dot{\tilde{q}}+K_i\int_0^t\tilde{q}(s)ds,$$

where M is the Inertia Matrix, C is the Coriolis term, g is the Gravity term, tau is the PID control input and q is the state vector.

The problem is, I can't find any generalized approach for developing said functions and estimating the gains. Can someone provide insight or a link to any reference material?

2

There are 2 best solutions below

3
On

I think that your question lacks the control objective, e.g., regulation to an equilibrium point. I'll assume that your control objective is to regulate the state of the given system to the origin (which is an equilibrium point) by a feedback controller.

Before that, it is convenient to consider the following form, $$ \dot{x} = f(x, u), $$ where $x = [x_1, x_2]^{\intercal} = [q, \dot{q}]^{\intercal}$ and $u = \tau$. More specifically, assuming that $M$ is invertible for any $x$, $$ \dot{x}_1 = x_2, $$ $$ \dot{x}_2 = M(x_1)^{-1}(-C(x_1, x_2)x_2 - g(x_1) + u). $$

A standard way to design a control law would be nonlinear dynamic inversion (NDI): setting $u = C(x_1, x_2)x_2 + g(x_1) + M(x_1) \nu$ implies $$ \dot{x}_2 = \nu, $$ where $\nu$ is the virtual control input. Now, you can design some asymptotically stable feedback controllers for the obtained linear system.

IMO, the stability analysis of PID controllers is mostly based on linear system control theory. So you can apply the PID control method to the obtained linear systems, but for the general mechanical system control, it is more practical. It should be pointed out that in practice, PID control works quite well even for nonlinear system control (but mostly at the neighbourhood of the origin).

P.S. there are too many categories of control problems; regulation to the origin, finite-time convergence, optimal control, tracking control, model-based or model-free control design... There would be some desired design patterns or specific control methods for each control objective, that's why you have to clarify your interest.

1
On

From the symbols $\tilde{q}$ and $\dot{\tilde{q}}$, it seems that they are errors, and therefore, this looks like some kind of a tracking control problem to track a reference trajectory $q_{\text{ref}}$, i.e., $\tilde{q} = q_{\text{ref}} - q$. After all, the model describes the motion of a quadrotor aerial vehicle in 6 degrees of freedom.

However, I'm unsure if there is the Lyapunov stability approach to estimate or to compute the PID control gains. If the control input structure is already fixed at $$ \tau_{\text{pid}} = K_{p} \tilde{q} + K_{i} \int \tilde{q}(s)\;ds + K_{d} \dot{\tilde{q}} $$ where the control gains $K_{p}$, $K_{i}$, $K_{d}$ are some constant values to be designed, then I suggest to use the Gain-scheduling control design approach that allows to control the quadrotor system with dynamics changing from one operating condition to another, throughout the flying trajectory.

Miscellaneous works on designing the gain-scheduled controller are available in the literature or online. You can also find examples in these links and learn how to adopt the design process into your quadrotor:

https://www.mathworks.com/videos/gain-scheduling-of-pid-controllers-68883.html https://www.mathworks.com/videos/automatic-tuning-of-gain-scheduled-controllers-86776.html https://www.mathworks.com/help/control/ug/tuning-of-gain-scheduled-three-loop-autopilot.html https://www.mathworks.com/help/control/ug/gain-scheduled-control-of-a-chemical-reactor.html