1

Let $\mathbf{A}$ $\in \mathbb{R}^{N \times N}$ be a real, invertible, symmetric matrix.

Let $\mathbf{Q}$ $\in \mathbb{R}^{N \times N}$ be a real, invertible matrix.

Let $\mathbf{X}$ $\in \mathbb{R}^{N \times N}$ be the solution to the Lyapunov equation in continuous time:

\begin{align*} \mathbf{X} \ = \ \int_{0}^\infty \mathrm{e}^{\mathbf{A}t} \ \mathbf{Q} \ \mathrm{e}^{\mathbf{A}t}\, dt \end{align*}

I am trying to take the derivative of a function of $\mathbf{X}$ with respect to some parameters $\mathbf{H}$, where values in $\mathbf{A}$ and $\mathbf{Q}$ are functions of $\mathbf{H}$. It is not clear to me how to proceed. I know I can write the derivative of the function via the product of Jacobians, but I don't know how to get past this part involving the Lyapunov solution.

I assume that I would need the Jacobians of $\mathbf{X}$ with respect to both $\mathbf{A}$ and $\mathbf{Q}$, i.e. in the forms

$\frac{\partial \text{vec}(\mathbf{X})}{\partial \text{vec}(\mathbf{A})}$ $\in \mathbb{R}^{N^2 \times N^2}$ and $\frac{\partial \text{vec}(\mathbf{X})}{\partial \text{vec}(\mathbf{Q})}$ $\in \mathbb{R}^{N^2 \times N^2}$.

Even if I had these quantities, I'm not sure how I would proceed. Would the differential of $\mathbf{X}$ be given by:

\begin{align*} d \mathbf{X} \ = \ \int_{0}^\infty \mathrm{e}^{d \mathbf{A}t} \ \mathbf{Q} \ \mathrm{e}^{d \mathbf{A}t}\, dt + \int_{0}^\infty \mathrm{e}^{\mathbf{A}t} \ d \mathbf{Q} \ \mathrm{e}^{\mathbf{A}t}\, dt \end{align*}

and I could proceed from there?

Tychus
  • 105
  • I'm wondering if I should not directly invoke the solution to the Lyapunov equation, but instead invoke the equation itself: $\mathbf{A}$ $\mathbf{X}$ $+$ $\mathbf{X}$ $\mathbf{A}$ $=$ $-\mathbf{Q}$ , and take the differentials with respect to this equation. E.g., something like $-d \mathbf{Q}$ $=$ ($d \mathbf{A} \mathbf{X}$ $+$ $\mathbf{A} d \mathbf{X}$) + ($d \mathbf{X} \mathbf{A}$ $+$ $\mathbf{X} d \mathbf{A}$), if that is correct. – Tychus Aug 02 '24 at 23:11

2 Answers2

2

Using the chain rule: \begin{align*} f(x,y)= x(t)+y(t) \end{align*} \begin{align*} \frac{df(x,y)}{dt}= \frac{\partial f}{\partial x} \frac{dx}{dt}+\frac{\partial f}{\partial y} \frac{dy}{dt} \end{align*}

Using this to help us realign ourselves, we get:

\begin{align*} d \mathbf{X} \ = \ \frac{\partial}{\partial \mathbf{A}} \ \left ( \int_{0}^\infty \mathrm{e}^{\mathbf{A}t} \ \mathbf{Q} \ \mathrm{e}^{\mathbf{A}t}\, dt \right ) \ d \mathbf{A} +\ \frac{\partial}{\partial \mathbf{Q}} \ \left ( \int_{0}^\infty \mathrm{e}^{\mathbf{A}t} \ \mathbf{Q} \ \mathrm{e}^{\mathbf{A}t}\, dt \right ) \ d \mathbf{Q} \end{align*}

Knowing nothing about your problem this is where I would stop. However, if your problem satisfies Leibniz's Integral Rule we can reduce this to:

\begin{align*} d \mathbf{X} \ = \ \left ( \int_{0}^\infty \ \frac{\partial}{\partial \mathbf{A}} \ \left (\mathrm{e}^{\mathbf{A}t} \ \mathbf{Q} \ \mathrm{e}^{\mathbf{A}t} \ \right ) \, dt \right ) \ d \mathbf{A} +\ \ \left ( \int_{0}^\infty \ \frac{\partial}{\partial \mathbf{Q}} \ \left (\mathrm{e}^{\mathbf{A}t} \ \mathbf{Q} \ \mathrm{e}^{\mathbf{A}t} \ \right ) \, dt \right ) \ d \mathbf{Q} \end{align*}

Which we can simplify to:

\begin{align*} d \mathbf{X} \ = \ \left ( \int_{0}^\infty \ \ \left ( \ \frac{\partial \mathrm{e}^{\mathbf{A}t}}{\partial \mathbf{A}} \ \mathbf{Q} \ \mathrm{e}^{\mathbf{A}t} \ + \ \mathrm{e}^{\mathbf{A}t} \ \mathbf{Q} \ \frac{\partial \mathrm{e}^{\mathbf{A}t}}{\partial \mathbf{A}} \ \right ) \, dt \right ) \ d \mathbf{A} +\ \ \left ( \int_{0}^\infty \ \mathrm{e}^{\mathbf{A}t} \ \mathbf{I} \ \mathrm{e}^{\mathbf{A}t} \ \, dt \right ) \ d \mathbf{Q} \end{align*}

Which finally resolves to:

\begin{align*} d \mathbf{X} \ = \ 2 \left ( \int_{0}^\infty \ t \ \mathrm{e}^{\mathbf{A}t} \ \mathbf{Q} \ \mathrm{e}^{\mathbf{A}t} \, dt \right ) \ d \mathbf{A} +\ \ \left ( \int_{0}^\infty \ \mathrm{e}^{2 \mathbf{A}t} \, dt \right ) \ d \mathbf{Q} \end{align*}

Edit: for clarification, here I am using $d\mathbf{X}$ as shorthand for $\frac{d\mathbf{X}}{d\mathbf{H}}$. Additionally, I forgot to transfer in integrating variable t and have edited my answer to reflect this.

avringo
  • 21
  • Thank you avringo, I will look into whether the Lyapunov solution satisfies Leibniz's integral rule. This seems like a place for me to start. – Tychus Aug 02 '24 at 23:26
  • 1
    The differential computation seems wrong. For example, it should be $\int_{0}^{\infty}e^{At}dQe^{At} ,dt$ instead of $\int_{0}^{\infty}e^{2At},dt,dQ$. I believe the first term is also wrong. – Mason Aug 04 '24 at 00:53
  • Mason, when you say it should be $\int_{0}^\infty \ \mathrm{e}^{\mathbf{A}t} d \mathbf{Q} \mathrm{e}^{\mathbf{A}t} , dt$ instead of $\int_{0}^\infty \ \mathrm{e}^{2 \mathbf{A}t} , dt d \mathbf{Q}$, are you assuming that the problem satisfies Leibniz's integral rule (as in avringo's answer)? Or more generally, is there a particular line in avringo's answer that you disagree with? – Tychus Aug 04 '24 at 19:47
  • @Tychus Yes I assume that we can differentiate under the integral, which is most often the case, but should be checked at some point. See my answer for details. – Mason Aug 11 '24 at 22:01
  • I believe @Mason is correct. see this post as the problem is more complicated than I assumed. – avringo Aug 19 '24 at 23:56
2

We give two approaches to the computation of $dX (H)$, where $X : \mathbb{R}^p \rightarrow \mathbb{R}^{N \times N}$.

First approach: We have \begin{eqnarray*} X (H) & = & \int_0^{\infty} e^{At} Qe^{At} dt. \end{eqnarray*} By differentiating under the integral sign, which can be justified using dominated convergence or some other method and depends on the particulars of $A (H)$ and $Q (H)$ and their derivatives, we have the differential of $X$: \begin{eqnarray*} dX (H) & = & \int_0^{\infty} d (e^{At} Qe^{At}) dt. \end{eqnarray*} We have \begin{eqnarray*} d (e^{At} Qe^{At}) & = & d (e^{At}) Qe^{At} + e^{At} dQe^{At} + e^{At} Qd (e^{At}) . \end{eqnarray*} Hence \begin{eqnarray*} dX (H) & = & \int_0^{\infty} (d (e^{At}) Qe^{At} + e^{At} dQe^{At} + e^{At} Qd (e^{At})) dt. \end{eqnarray*} The differential of $d (e^{tA})$ in terms of $dA$ is given as a series, see https://www.sciencedirect.com/science/article/pii/S0196885885710172. I don't think there are any more simplifications that can be done here.

Second approach: We have $AX + XA = - Q$, so \begin{eqnarray*} - dQ & = & (dA) X + AdX + (dX) A + X (dA) . \end{eqnarray*} I don't think this can be simplified further.

Mason
  • 12,787