Lyapunov equation

From HandWiki
Revision as of 17:43, 6 February 2024 by NBrush (talk | contribs) (update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Lyapunov equation, named after the Russian mathematician Aleksandr Lyapunov, is a matrix equation used in the stability analysis of linear dynamical systems.[1][2] In particular, the discrete-time Lyapunov equation (also known as Stein equation) for [math]\displaystyle{ X }[/math] is

[math]\displaystyle{ A X A^{H} - X + Q = 0 }[/math]

where [math]\displaystyle{ Q }[/math] is a Hermitian matrix and [math]\displaystyle{ A^H }[/math] is the conjugate transpose of [math]\displaystyle{ A }[/math], while the continuous-time Lyapunov equation is

[math]\displaystyle{ AX + XA^H + Q = 0 }[/math].

Application to stability

In the following theorems [math]\displaystyle{ A, P, Q \in \mathbb{R}^{n \times n} }[/math], and [math]\displaystyle{ P }[/math] and [math]\displaystyle{ Q }[/math] are symmetric. The notation [math]\displaystyle{ P\gt 0 }[/math] means that the matrix [math]\displaystyle{ P }[/math] is positive definite.

Theorem (continuous time version). Given any [math]\displaystyle{ Q\gt 0 }[/math], there exists a unique [math]\displaystyle{ P\gt 0 }[/math] satisfying [math]\displaystyle{ A^T P + P A + Q = 0 }[/math] if and only if the linear system [math]\displaystyle{ \dot{x}=A x }[/math] is globally asymptotically stable. The quadratic function [math]\displaystyle{ V(x)=x^T P x }[/math] is a Lyapunov function that can be used to verify stability.

Theorem (discrete time version). Given any [math]\displaystyle{ Q\gt 0 }[/math], there exists a unique [math]\displaystyle{ P\gt 0 }[/math] satisfying [math]\displaystyle{ A^T P A -P + Q = 0 }[/math] if and only if the linear system [math]\displaystyle{ x_{t+1}=A x_{t} }[/math] is globally asymptotically stable. As before, [math]\displaystyle{ x^T P x }[/math] is a Lyapunov function.

Computational aspects of solution

The Lyapunov equation is linear, and so if [math]\displaystyle{ X }[/math] contains [math]\displaystyle{ n }[/math] entries can be solved in [math]\displaystyle{ \mathcal O(n^3) }[/math] time using standard matrix factorization methods.

However, specialized algorithms are available which can yield solutions much quicker owing to the specific structure of the Lyapunov equation. For the discrete case, the Schur method of Kitagawa is often used.[3] For the continuous Lyapunov equation the Bartels–Stewart algorithm can be used.[4]

Analytic solution

Defining the vectorization operator [math]\displaystyle{ \operatorname{vec} (A) }[/math] as stacking the columns of a matrix [math]\displaystyle{ A }[/math] and [math]\displaystyle{ A \otimes B }[/math] as the Kronecker product of [math]\displaystyle{ A }[/math] and [math]\displaystyle{ B }[/math], the continuous time and discrete time Lyapunov equations can be expressed as solutions of a matrix equation. Furthermore, if the matrix [math]\displaystyle{ A }[/math] is "stable", the solution can also be expressed as an integral (continuous time case) or as an infinite sum (discrete time case).

Discrete time

Using the result that [math]\displaystyle{ \operatorname{vec}(ABC)=(C^{T} \otimes A)\operatorname{vec}(B) }[/math], one has

[math]\displaystyle{ (I_{n^2}-\bar{A} \otimes A)\operatorname{vec}(X) = \operatorname{vec}(Q) }[/math]

where [math]\displaystyle{ I_{n^2} }[/math] is a conformable identity matrix and [math]\displaystyle{ \bar{A} }[/math] is the element-wise complex conjugate of [math]\displaystyle{ A }[/math].[5] One may then solve for [math]\displaystyle{ \operatorname{vec}(X) }[/math] by inverting or solving the linear equations. To get [math]\displaystyle{ X }[/math], one must just reshape [math]\displaystyle{ \operatorname{vec} (X) }[/math] appropriately.

Moreover, if [math]\displaystyle{ A }[/math] is stable (in the sense of Schur stability, i.e., having eigenvalues with magnitude less than 1), the solution [math]\displaystyle{ X }[/math] can also be written as

[math]\displaystyle{ X = \sum_{k=0}^{\infty} A^{k} Q (A^{H})^k }[/math].

For comparison, consider the one-dimensional case, where this just says that the solution of [math]\displaystyle{ (1 - a^2) x = q }[/math] is

[math]\displaystyle{ x = \frac{q}{1-a^2} = \sum_{k=0}^{\infty} qa^{2k} }[/math].

Continuous time

Using again the Kronecker product notation and the vectorization operator, one has the matrix equation

[math]\displaystyle{ (I_n \otimes A + \bar{A} \otimes I_n) \operatorname{vec}X = -\operatorname{vec}Q, }[/math]

where [math]\displaystyle{ \bar{A} }[/math] denotes the matrix obtained by complex conjugating the entries of [math]\displaystyle{ A }[/math].

Similar to the discrete-time case, if [math]\displaystyle{ A }[/math] is stable (in the sense of Hurwitz stability, i.e., having eigenvalues with negative real parts), the solution [math]\displaystyle{ X }[/math] can also be written as

[math]\displaystyle{ X = \int_0^\infty {e}^{A \tau} Q \mathrm{e}^{A^H \tau} d\tau }[/math],

which holds because

[math]\displaystyle{ \begin{align}AX+XA^H =& \int_0^\infty A{e}^{A \tau} Q \mathrm{e}^{A^H \tau}+{e}^{A \tau} Q \mathrm{e}^{A^H \tau}A^H d\tau \\ =&\int_0^\infty \frac{d}{d\tau} {e}^{A \tau} Q \mathrm{e}^{A^H \tau} d\tau \\ =& {e}^{A \tau} Q \mathrm{e}^{A^H \tau} \bigg|_0^\infty\\ =& -Q. \end{align} }[/math]

For comparison, consider the one-dimensional case, where this just says that the solution of [math]\displaystyle{ 2ax = - q }[/math] is

[math]\displaystyle{ x = \frac{-q}{2a} = \int_0^{\infty} q{e}^{2 a \tau} d\tau }[/math].

Relationship Between Discrete and Continuous Lyapunov Equations

We start with the continuous-time linear dynamics:

[math]\displaystyle{ \dot{\mathbf{x}} = \mathbf{A}\mathbf{x} }[/math].

And then discretize it as follows:

[math]\displaystyle{ \dot{\mathbf{x}} \approx \frac{\mathbf{x}_{t+1}-\mathbf{x}_{t}}{\delta} }[/math]

Where [math]\displaystyle{ \delta \gt 0 }[/math] indicates a small forward displacement in time. Substituting the bottom equation into the top and shuffling terms around, we get a discrete-time equation for [math]\displaystyle{ \mathbf{x}_{t+1} }[/math].

[math]\displaystyle{ \mathbf{x}_{t+1} = \mathbf{x}_t + \delta \mathbf{A} \mathbf{x}_t = (\mathbf{I} + \delta\mathbf{A})\mathbf{x}_t = \mathbf{B}\mathbf{x}_t }[/math]

Where we've defined [math]\displaystyle{ \mathbf{B} \equiv \mathbf{I} + \delta\mathbf{A} }[/math]. Now we can use the discrete time Lyapunov equation for [math]\displaystyle{ \mathbf{B} }[/math]:

[math]\displaystyle{ \mathbf{B}^T\mathbf{M}\mathbf{B} - \mathbf{M} = -\delta\mathbf{Q} }[/math]

Plugging in our definition for [math]\displaystyle{ \mathbf{B} }[/math], we get:

[math]\displaystyle{ (\mathbf{I} + \delta \mathbf{A})^T\mathbf{M}(\mathbf{I} + \delta \mathbf{A}) - \mathbf{M} = -\delta \mathbf{Q} }[/math]

Expanding this expression out yields:

[math]\displaystyle{ (\mathbf{M} + \delta \mathbf{A}^T\mathbf{M}) (\mathbf{I} + \delta \mathbf{A}) - \mathbf{M} = \delta(\mathbf{A}^T\mathbf{M} + \mathbf{M}\mathbf{A}) + \delta^2 \mathbf{A}^T\mathbf{M}\mathbf{A} = -\delta \mathbf{Q} }[/math]

Recall that [math]\displaystyle{ \delta }[/math] is a small displacement in time. Letting [math]\displaystyle{ \delta }[/math] go to zero brings us closer and closer to having continuous dynamics—and in the limit we achieve them. It stands to reason that we should also recover the continuous-time Lyapunov equations in the limit as well. Dividing through by [math]\displaystyle{ \delta }[/math] on both sides, and then letting [math]\displaystyle{ \delta \to 0 }[/math] we find that:

[math]\displaystyle{ \mathbf{A}^T\mathbf{M} + \mathbf{M}\mathbf{A} = -\mathbf{Q} }[/math]

which is the continuous-time Lyapunov equation, as desired.

See also

References

  1. Parks, P. C. (1992-01-01). "A. M. Lyapunov's stability theory—100 years on *". IMA Journal of Mathematical Control and Information 9 (4): 275–303. doi:10.1093/imamci/9.4.275. ISSN 0265-0754. https://doi.org/10.1093/imamci/9.4.275. 
  2. Simoncini, V. (2016-01-01). "Computational Methods for Linear Matrix Equations". SIAM Review 58 (3): 377–441. doi:10.1137/130912839. ISSN 0036-1445. https://epubs.siam.org/doi/10.1137/130912839. 
  3. Kitagawa, G. (1977). "An Algorithm for Solving the Matrix Equation X = F X F' + S". International Journal of Control 25 (5): 745–753. doi:10.1080/00207177708922266. 
  4. Bartels, R. H.; Stewart, G. W. (1972). "Algorithm 432: Solution of the matrix equation AX + XB = C". Comm. ACM 15 (9): 820–826. doi:10.1145/361573.361582. 
  5. Hamilton, J. (1994). Time Series Analysis. Princeton University Press. Equations 10.2.13 and 10.2.18. ISBN 0-691-04289-6.