der_Peuler_by_v¶

Provides the derivative of the product between the projection matrix $$P^{AG}(\mathbf{\Theta})$$ (that projects a vector in G frame onto A frame) and a constant vector expressed in G frame of reference, $$\mathbf{v}_G$$, with respect to the Euler angles, $$\mathbf{\Theta}=[\phi,\theta,\psi]^T$$:

$\frac{\partial}{\partial\Theta}(P^{AG}(\Theta)\mathbf{v}^G) = \frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}$

where $$\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}$$ is the resulting 3 by 3 matrix.

Being $$P^{AG}(\Theta)$$ the projection matrix from the G frame to the A frame in terms of the Euler angles $$\Theta$$ as $$P^{AG}(\Theta) = \tau_x(-\Phi)\tau_y(-\Theta)\tau_z(-\Psi)$$, where the rotation matrix is expressed as:

$\begin{split}C^{AG}(\Theta) = \begin{bmatrix} \cos\theta\cos\psi & -\cos\theta\sin\psi & \sin\theta \\ \cos\phi\sin\psi + \sin\phi\sin\theta\cos\psi & \cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi & -\sin\phi\cos\theta \\ \sin\phi\sin\psi - \cos\phi\sin\theta\cos\psi & \sin\phi\cos\psi + \cos\phi\sin\theta\sin\psi & \cos\phi\cos\theta \end{bmatrix}\end{split}$

and the projection matrix as:

$\begin{split}P^{AG}(\Theta) = \begin{bmatrix} \cos\theta\cos\psi & \cos\theta\sin\psi & -\sin\theta \\ -\cos\phi\sin\psi + \sin\phi\sin\theta\cos\psi & \cos\phi\cos\psi + \sin\phi\sin\theta\sin\psi & \sin\phi\cos\theta \\ \sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi & -\sin\phi\cos\psi + \cos\phi\sin\theta\sin\psi & \cos\phi\cos\theta \end{bmatrix}\end{split}$

the components of the derivative at hand are the following, where $$f_{1\theta} = \frac{\partial \mathbf{f}_1}{\partial\theta}$$.

$\begin{split}f_{1\phi} =&0 \\ f_{1\theta} = &-v_1\sin\theta\cos\psi \\ &+v_2\sin\theta\sin\psi \\ &+v_3\cos\theta \\ f_{1\psi} = &-v_1\cos\theta\sin\psi \\ &- v_2\cos\theta\cos\psi\end{split}$
$\begin{split}f_{2\phi} = &+v_1(-\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi) + \\ &+v_2(-\sin\phi\cos\psi - \cos\phi\sin\theta\sin\psi) + \\ &+v_3(-\cos\phi\cos\theta)\\ f_{2\theta} = &+v_1(\sin\phi\cos\theta\cos\psi) + \\ &+v_2(-\sin\phi\cos\theta\sin\psi) +\\ &+v_3(\sin\phi\sin\theta)\\ f_{2\psi} = &+v_1(\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_2(-\cos\phi\sin\psi - \sin\phi\sin\theta\cos\psi)\end{split}$
$\begin{split}f_{3\phi} = &+v_1(\cos\phi\sin\psi+\sin\phi\sin\theta\cos\psi) + \\ &+v_2(\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_3(-\sin\phi\cos\theta)\\ f_{3\theta} = &+v_1(-\cos\phi\cos\theta\cos\psi)+\\ &+v_2(\cos\phi\cos\theta\sin\psi) + \\ &+v_3(-\cos\phi\sin\theta)\\ f_{3\psi} = &+v_1(\sin\phi\cos\psi+\cos\phi\sin\theta\sin\psi) + \\ &+v_2(-\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi)\end{split}$
param euler

Vector of Euler angles, $$\mathbf{\Theta} = [\phi, \theta, \psi]$$, in radians.

type euler

np.ndarray

param v

3 dimensional vector in G frame.

type v

np.ndarray

returns

Resulting 3 by 3 matrix $$\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}$$.

rtype

np.ndarray