Derivative a Matrix quadratic form with respect to a inner variable? Lyapunov function and pasivity control.

288 Views Asked by At

I'm trying to derivate a Lyapunov candidate function in order to analize stability for a pasivity control strategy but I'm not sure how to proceed. I hope some of you could guide me here, the expression is the following:

\begin{equation} V=\frac{1}{2}S^{T}M(q)S \end{equation}

where $M(q) \in \mathbb{R}^{n \times n}$ is a symmetric inertial matrix from a mechanical system and $S\in \mathbb{R}^{n\times1}$ is the expanded error defined as $S=\Delta \dot{q}+\alpha \Delta q$, with $\Delta q = q_{d}-q$, $q_{d}$ is a desired trajectory. The closed loop system is the following:

\begin{equation}\label{eq:sis6} \mathbf{M}(\mathbf{q})\dot{S}+\mathbf{C}(\mathbf{q},\dot{\mathbf{q}})S+K_{d}S=0 \end{equation}

The system has this from since I'm using a regressor $Y(q,\dot{q},\ddot{q})P$, anyways I want to derivate $V$, so I know it has to parts: one derivates $M(q)$ and other derivates $S$, I'm not sure how to derivate the latter though. This is what I did:

\begin{align*} \dot{V}=&\frac{1}{2}\{S^{T}\dot{M}S+2(MS)\} \end{align*}

Nevertheless, I'm not quite sure if this is the correct approach, I know if I derivate first M with respect of $q$ I will get $S^{T}\dot{M}S$, but the second part only turns into $2(MS)$ with respect of $S$ but am I not suppose to derivate with respect of $q$?. This is were I'm stuck because I want to make use of a characteristic called "pasivity" ($S^{T}(M-(C+C^{T}))S=0$) which should lead to $\dot{V}=-S^{T}K_{d}S$.

I saw this expression in a book:

\begin{align*} \dot{V}=S^{T}\dot{M}S+S^{T}(M\dot{S}) \end{align*}

I don't know how did they get it.

1

There are 1 best solutions below

0
On

Just applying the product rule should give the correct result. Using this on your Lyapunov function

$$ V = \frac12 S^\top M(q)\,S, $$

yields

$$ \dot{V} = \frac12 \left(\dot{S}^\top M(q)\,S + S^\top \dot{M}(q)\,S + S^\top M(q)\,\dot{S}\right), $$

where $\dot{x}$ represents taking the time derivative of $x$. I want to clarify $\dot{M}(q)$ does not represent taking the partial derivative of $M(q)$ with respect to $q$. In terms of dimensions this would also not work. Instead you could evaluate each component of $\dot{M}(q)$, denoted with $\dot{M}_{ij}(q)$, with

$$ \dot{M}_{ij}(q) = \frac{\partial\,M_{ij}(q)}{\partial q} \dot{q}. $$

Lastly, since $M(q)$ is symmetric the first and last term of $\dot{V}$, given by $\dot{S}^\top M(q)\,S$ and $S^\top M(q)\,\dot{S}$, can be combined into $2\,S^\top M(q)\,\dot{S}$.


Using the notation defined here it also possible to write the time derivative of $M(q)$ as

$$ \dot{M}(q) = \frac{\partial\,M(q)}{\partial q} (I \otimes \dot{q}), $$

where $I$ is the $n$ by $n$ identify matrix, $\otimes$ denotes the Kronecker product and the partial derivative of the matrix is defined as

$$ \frac{\partial\,M(q)}{\partial q} = \begin{bmatrix} \frac{\partial\,M_{1,1}(q)}{\partial q_1} & \cdots & \frac{\partial\,M_{1,1}(q)}{\partial q_n} & \frac{\partial\,M_{1,2}(q)}{\partial q_1} & \cdots & \frac{\partial\,M_{1,n}(q)}{\partial q_n} \\ \vdots & & \vdots & \vdots & & \vdots \\ \frac{\partial\,M_{n,1}(q)}{\partial q_1} & \cdots & \frac{\partial\,M_{n,1}(q)}{\partial q_n} & \frac{\partial\,M_{n,2}(q)}{\partial q_1} & \cdots & \frac{\partial\,M_{n,n}(q)}{\partial q_n} \end{bmatrix}, $$

which is in $\mathbb{R}^{n\times n^2}$.