OpenFAST
Wind turbine multiphysics simulator
|
For any direction cosine matrix (DCM), \(\Lambda\), this routine calculates the logarithmic map, \(\lambda\), which a skew-symmetric matrix: More...
Public Member Functions | |
subroutine | dcm_logmapr (DCM, logMap, ErrStat, ErrMsg, thetaOut) |
For any direction cosine matrix (DCM), \(\Lambda\), this routine calculates the logarithmic map, \(\lambda\), which a skew-symmetric matrix: More... | |
subroutine | dcm_logmapd (DCM, logMap, ErrStat, ErrMsg, thetaOut) |
For any direction cosine matrix (DCM), \(\Lambda\), this routine calculates the logarithmic map, \(\lambda\), which a skew-symmetric matrix: More... | |
For any direction cosine matrix (DCM), \(\Lambda\), this routine calculates the logarithmic map, \(\lambda\), which a skew-symmetric matrix:
\begin{equation} \lambda = \log( \Lambda ) = \begin{bmatrix} 0 & \lambda_3 & -\lambda_2 \\ -\lambda_3 & 0 & \lambda_1 \\ \lambda_2 & -\lambda_1 & 0 \end{bmatrix} \end{equation}
The angle of rotation for \(\Lambda\) is
\begin{equation} \theta= \begin{matrix} \cos^{-1}\left(\frac{1}{2}\left(\mathrm{trace}(\Lambda)-1\right)\right) & \theta \in \left[0,\pi\right]\end{matrix} \end{equation}
And the logarithmic map is
\begin{equation} \lambda = \left\{ \begin{matrix} 0 & \theta = 0 \\ \frac{\theta}{2\sin\theta} \left( \Lambda - \Lambda^T\right) & \theta \in \left(0,\pi\right) \\ \pm\pi v & \theta = \pi \end{matrix} \right. \end{equation}
where \(v\) is the skew-symmetric matrix associated with the unit-length eigenvector of \(\Lambda\) associated with the eigenvalue 1. However, this equation has numerical issues near \(\theta = \pi\), so for \(\theta > 3.1\) we instead implement a separate equation to find lambda * sign(lambda(indx_max)) and use \(\Lambda - \Lambda^T\) to choose the appropriate signs.
This routine is the inverse of DCM_exp (nwtc_num::dcm_exp).
Use DCM_logMap (nwtc_num::dcm_logmap) instead of directly calling a specific routine in the generic interface.
[in] | dcm | the direction cosine matrix, \(\Lambda\) |
[out] | logmap | vector containing \(\lambda_1\), \(\lambda_2\), and \(\lambda_3\), the unique components of skew-symmetric matrix \(\lambda\) |
[out] | thetaout | the angle of rotation, \(\theta\); output only for debugging |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
subroutine nwtc_num::dcm_logmap::dcm_logmapd | ( | real(dbki), dimension(3,3), intent(in) | DCM, |
real(dbki), dimension(3), intent(out) | logMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
real(dbki), intent(out), optional | thetaOut | ||
) |
For any direction cosine matrix (DCM), \(\Lambda\), this routine calculates the logarithmic map, \(\lambda\), which a skew-symmetric matrix:
\begin{equation} \lambda = \log( \Lambda ) = \begin{bmatrix} 0 & \lambda_3 & -\lambda_2 \\ -\lambda_3 & 0 & \lambda_1 \\ \lambda_2 & -\lambda_1 & 0 \end{bmatrix} \end{equation}
The angle of rotation for \(\Lambda\) is
\begin{equation} \theta= \begin{matrix} \cos^{-1}\left(\frac{1}{2}\left(\mathrm{trace}(\Lambda)-1\right)\right) & \theta \in \left[0,\pi\right]\end{matrix} \end{equation}
And the logarithmic map is
\begin{equation} \lambda = \left\{ \begin{matrix} 0 & \theta = 0 \\ \frac{\theta}{2\sin\theta} \left( \Lambda - \Lambda^T\right) & \theta \in \left(0,\pi\right) \\ \pm\pi v & \theta = \pi \end{matrix} \right. \end{equation}
where \(v\) is the skew-symmetric matrix associated with the unit-length eigenvector of \(\Lambda\) associated with the eigenvalue 1. However, this equation has numerical issues near \(\theta = \pi\), so for \(\theta > 3.1\) we instead implement a separate equation to find lambda * sign(lambda(indx_max)) and use \(\Lambda - \Lambda^T\) to choose the appropriate signs.
This routine is the inverse of DCM_exp (nwtc_num::dcm_exp).
Use DCM_logMap (nwtc_num::dcm_logmap) instead of directly calling a specific routine in the generic interface.
[in] | dcm | the direction cosine matrix, \(\Lambda\) |
[out] | logmap | vector containing \(\lambda_1\), \(\lambda_2\), and \(\lambda_3\), the unique components of skew-symmetric matrix \(\lambda\) |
[out] | thetaout | the angle of rotation, \(\theta\); output only for debugging |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
subroutine nwtc_num::dcm_logmap::dcm_logmapr | ( | real(reki), dimension(3,3), intent(in) | DCM, |
real(reki), dimension(3), intent(out) | logMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
real(reki), intent(out), optional | thetaOut | ||
) |
For any direction cosine matrix (DCM), \(\Lambda\), this routine calculates the logarithmic map, \(\lambda\), which a skew-symmetric matrix:
\begin{equation} \lambda = \log( \Lambda ) = \begin{bmatrix} 0 & \lambda_3 & -\lambda_2 \\ -\lambda_3 & 0 & \lambda_1 \\ \lambda_2 & -\lambda_1 & 0 \end{bmatrix} \end{equation}
The angle of rotation for \(\Lambda\) is
\begin{equation} \theta= \begin{matrix} \cos^{-1}\left(\frac{1}{2}\left(\mathrm{trace}(\Lambda)-1\right)\right) & \theta \in \left[0,\pi\right]\end{matrix} \end{equation}
And the logarithmic map is
\begin{equation} \lambda = \left\{ \begin{matrix} 0 & \theta = 0 \\ \frac{\theta}{2\sin\theta} \left( \Lambda - \Lambda^T\right) & \theta \in \left(0,\pi\right) \\ \pm\pi v & \theta = \pi \end{matrix} \right. \end{equation}
where \(v\) is the skew-symmetric matrix associated with the unit-length eigenvector of \(\Lambda\) associated with the eigenvalue 1. However, this equation has numerical issues near \(\theta = \pi\), so for \(\theta > 3.1\) we instead implement a separate equation to find lambda * sign(lambda(indx_max)) and use \(\Lambda - \Lambda^T\) to choose the appropriate signs.
This routine is the inverse of DCM_exp (nwtc_num::dcm_exp).
Use DCM_logMap (nwtc_num::dcm_logmap) instead of directly calling a specific routine in the generic interface.
[in] | dcm | the direction cosine matrix, \(\Lambda\) |
[out] | logmap | vector containing \(\lambda_1\), \(\lambda_2\), and \(\lambda_3\), the unique components of skew-symmetric matrix \(\lambda\) |
[out] | thetaout | the angle of rotation, \(\theta\); output only for debugging |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |