Extremely complex vector-matrix expression and its differentiation by vector

kronecker productmatricestensorsvector analysisvectors

Given:

  1. $Q=R_z(\psi)R_y(\xi)R_x(\phi)$ – rotation matrix

  2. $\boldsymbol{\theta}=\left[\begin{array}{@{}c@{}} \phi \\ \xi \\ \psi
    \end{array} \right]$
    – vector of angles

  3. $p=Q\left[\begin{array}{@{}c@{}} 0 \\ 0 \\ 1 \end{array} \right]$
    vector

  4. $i_p=\begin{pmatrix} I_x & 0 & 0 \\ 0 & I_y & 0 \\ 0 & 0 &
    I_z\end{pmatrix}$
    – constant matrix;

  5. $[p]_×=\begin{pmatrix} 0 & -p(3) & p(2) \\ p(3) & 0 & -p(1) \\ -p(2)
    & p(1) & 0\end{pmatrix}$
    – skew-symmetry matrix for vector $p$

  6. $I_p=[p]_×[p]_×^T+Qi_pQ^T$


Task:

Find general formula in vector-matrix form for derivative of matrix $I_p$ by vector $\boldsymbol{\theta}$, i.e. $\frac{dI_p}{d\boldsymbol{\theta}}$


My considerations:

$\frac{dI_p}{d\boldsymbol{\theta}} \approx \frac{d[p]_×}{d\boldsymbol{\theta}}[p]_×^T+[p]_×\frac{d[p]_×^T}{d\boldsymbol{\theta}}+\frac{dQ}{d\boldsymbol{\theta}}i_pQ^T+Qi_p\frac{dQ^T}{d\boldsymbol{\theta}}$

I think that the chain rule is suitable here, but I am not good at differentiating matrices by vector. And I'm guessing the tensor product might be needed here.

This is an excerpt from the article https://www.sciencedirect.com/science/article/abs/pii/S0094114X10000418. How do I write this using vector-matrix operations?
enter image description here

Best Answer

$ \def\l{\left} \def\r{\right} \def\lr#1{\l(#1\r)} \def\p{{\partial}} \def\g#1#2{\frac{\p #1}{\p #2}} $For typing convenience, let $P = [p]_\times$ and note that $P^T=-P \;\;{\rm and}\;\;Pp=0$

Since $p=Qe_3$ is a unit vector $$\eqalign{ P^3 &= -P \\ P^2 &= (pp^T-I) \\ PP^T &= (I-pp^T) \\ &= I-Qe_3e_3^TQ^T \\ }$$ which reduces your main function to $$\eqalign{ I_p &= I + Q\,\big(i_p-e_3e_3^T\big)\,Q^T \\ &= I + Q\,i_p^\prime\,Q^T \\ }$$ The Rodrigues formula for a given axis $\big(a,\,A=[a]_\times\big)$ and angle $(\theta)$ can be differentiated $$\eqalign{ R &= I + (\sin\theta)A + (1-\cos\theta)A^2 \\ \g{R}{\theta} &= (\cos\theta)A + (\sin\theta)A^2 \;=\; AR \;=\; RA \\ }$$ The given composite rotation matrix $\big(Q=R_3R_2R_1\big)$ can be likewise differentiated $$\eqalign{ \g{Q}{\theta_1} &= R_3R_2R_1A_1 \;&=\; QA_1 \\ \g{Q}{\theta_2} &= R_3A_2R_2R_1 \\ \g{Q}{\theta_3} &= A_3R_3R_2R_1 &= A_3Q \\ }$$ and $$\eqalign{ \g{I_p}{\theta_k} &= \lr{\g{Q}{\theta_k}}\,i_p^\prime\,Q^T + Q\,i_p^\prime\,\lr{\g{Q}{\theta_k}}^T \\ }$$ The paper that you're reading is uses the Kronecker product $(\otimes)$ to define a block-style gradient $$\nabla_X F = \lr{\g{}{X}\otimes F}$$ This is called the Vetter Matrix Calculus, and if you Google for that phrase one of the first links will be an excellent 1978 review article by Brewer from the IEEE Journal.

It's interesting, but I've always found it a bit awkward to use.