# How to find out a suitable Lyapunov function?

In control theory, people are good at putting forward new control laws, many of which are derived from the use of a Lyapunov function. I am new to control theory, so could anyone give me an illustrative example about how to derive a control law or other similar applications by finding out a suitable Lyapunov function?

EDIT:
Since there are no general rules for deriving a Lypunov function, why not change this post to a big collection of "finding out a Lyapunov function to specific problems" so that anyone could learn from the experience? Anyone is welcome to write down their examples here so that others can obtain inspirations from them.

• Lyapunov functions are, in general, rather difficult to obtain and as far as I'm aware (I could be wrong) there is no general approach to finding them. Commented May 14, 2017 at 4:35
• @Mattos But in control one usually has some form of influence on the dynamics of the system due to inputs which sometimes allows you to shape the dynamics such that it fits a desired Lyapunov function. For example a system satisfying the required form for backstepping. Commented May 14, 2017 at 8:17
• I am fond of SOS techniques: A Tutorial on Sum of Squares Techniques for Systems Analysis. Commented May 14, 2017 at 18:20

So actually a lot has been happening with Lyapunov functions, and a good source of this are the Underactuated Robotics notes.

In a nutshell, for linear systems, it is known that if a Lyapunov function exists, it is quadratic, like what @dantopa suggested. This means it can also be set up as an optimization problem which can directly deliver a valid Lyapunov function.
For arbitrary nonlinear functions, it's still an art form, but for polynomials which are sums of squares, you can also set it up as an optimization problem. This means for a lot of systems (generally smooth systems) you can take a Taylor expansion of your system to get a polynomial approximation, and find a Lyapunov for the approximate system.

• Do you mean there is an easy way to set up a Lyapunov function if the system can be described by a polynomial? Then could you tell the general method? Commented May 14, 2017 at 8:56
• Yes. The basic idea is the same as with linear systems, except you search over a sum of squares polynomial. The steps are a bit lengthy but very well described in the link, so I recommend that as reference. Commented May 15, 2017 at 9:54

Lyapunov functions are an art form. Hopefully you'll start with the canonical energy dissipation function $$V(x,y) = \frac{1}{2} \left(x^{2} + y^{2} \right)$$

There are many examples on MSE such as this one:

Finding Lyapunov Function

A du jour pick from the web:

Lecture 4 — Lyapunov Stability

The way I have been taught, you can obtain appropriate Lyapunov functions by examining the physical dynamics of a system (obviously this is not a trivial problem depending on the system). This is covered well in texts such as: "Systems and Control" by Stanislaw H. Zak, and "Applied Nonlinear Control" by Slotine and Li.

Also, looking at the specific application to robotics there are many good papers demonstrating this. I took a graduate course in intelligent control recently, my course project was based around this paper (it's older, but still good): C.Kwan, F.L.Lewis, and D.M.Dawson, "Robust-Neural Network Control of Rigid-Link Electrically Driven Robots",IEEE Transactions on Neural Networks,vol.9,no.4,pp.581-588,1998.

In the paper I mention above, the authors choose to use the Inertia Matrix and Inductance Matrix (from the robot's mechanical and electrical dynamics) to define the Lyapunov function candidate. Both the matrices are positive definite, so it is a good starting point.