Next Article in Journal
Absolute Depth Measurement Using Multiphase Normalized Cross-Correlation for Precise Optical Profilometry
Next Article in Special Issue
LEO-Augmented GNSS Based on Communication Navigation Integrated Signal
Previous Article in Journal
A Model-Based System for Real-Time Articulated Hand Tracking Using a Simple Data Glove and a Depth Camera
Previous Article in Special Issue
StarNAV: Autonomous Optical Navigation of a Spacecraft by the Relativistic Perturbation of Starlight
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Derivation of All Attitude Error Governing Equations for Attitude Filtering and Control

by
Ahmad Bani Younes
1,* and
Daniele Mortari
2
1
Aerospace Engineering, San Diego State University, 5500 Campanile Drive, San Diego, CA 92182-1308, USA
2
Aerospace Engineering, Texas A&M University, College Station, TX 77843-3141, USA
*
Author to whom correspondence should be addressed.
Sensors 2019, 19(21), 4682; https://doi.org/10.3390/s19214682
Submission received: 23 September 2019 / Revised: 17 October 2019 / Accepted: 22 October 2019 / Published: 28 October 2019
(This article belongs to the Special Issue Attitude Sensors)

Abstract

:
This article presents the full analytical derivations of the attitude error kinematics equations. This is done for several attitude error representations, obtaining compact closed-forms expressions. Attitude error is defined as the rotation between true and estimated orientations. Two distinct approaches to attitude error kinematics are developed. In the first, the estimated angular velocity is defined in the true attitude axes frame, while in the second, it is defined in the estimated attitude axes frame. The first approach is of interest in simulations where the true attitude is known, while the second approach is for real estimation/control applications. Two nonlinear kinematic models are derived that are valid for arbitrarily large rotations and rotation rates. The results presented are expected to be broadly useful to nonlinear attitude estimation/control filtering formulations. A discussion of the benefits of the derived error kinematic models is included.

1. Introduction

Many attitude representations are available for modeling problems in science and engineering [1,2,3,4,5,6,7,8,9]. Nonlinearity of the representation of a given physical motion and location of geometric singularities are dependant on (1) the true motion, (2) the attitude representation selected, and (3) the particular choice of estimated axes. Selecting the appropriate representation is highly linked with the kind of problem being considered. The most popular attitude parameterizations are as follows [1,10,11,12]:
  • Direction Cosine Matrix (DCM): nine-parameter matrix representation subject to orthogonal constraint, non-singular;
  • Principal axis and angle: three-parameter representation (the axis is a unit vector), singular (axis undefined when the angle is zero);
  • Euler–Rodrigues parameters (quaternion): four-parameter vector representation subject to unit norm, non-singular;
  • Rodrigues parameters (RP; Gibbs vector): three-parameter representation, singular (infinite values for π rotations);
  • Modified Rodrigues parameters (MRP): three-parameter representation; and
  • Cayley–Klein parameters: 2 × 2 complex matrix representation subject to unitary constraint.
Definitions, characteristics, and transformations between these representations can be found in many references [1,4,5,6,8,10,13]. For applications requiring large and rapid rotational dynamics, there exists a need for developing attitude error kinematic models that exactly describe arbitrary large rotational motions. In particular, for control problems, Markley [8] has considered different attitude error representations for estimating the state of a maneuvering spacecraft. He has clarified the relationship between the four-component quaternion and the Multiplicative Extended Kalman Filter. Cao et al. [14] developed an unscented predictive filter for satellite formation. Later, Cao et al. [15] proposed a huber-based Kalman filter for the attitude estimation problem of small satellites. Batch and Paielli [16] investigated the rigid-body attitude error using inversion techniques to obtain a robust linearized model of attitude control error dynamics. Sun et al. have derived relative rotational and transnational dynamics error for spacecraft rendezvous control [17]. Crassidis et al. [18] studied a variable-structure control strategy for maneuvering vehicles. In their work, they used a feedback linearizing technique and added an additional term to the spacecraft maneuvers to deal with model uncertainties, which they demonstrated always provides an optimal response. Ahmed et al. [19] extended previous work to consider adaptive asymptotic tracking during maneuvers while estimating inertia properties. They used a Lyapunov argument to generate an unconditionally robust control law with respect to their assumed parametric uncertainty. Bani Younes et al. [20,21] considered generalized optimal control formulations that handle nonlinear system dynamics and enable the development of control gain sensitivities to handle plant model uncertainties during maneuvers. Sharma and Tiwari [22] introduced MRP for parameterization of the orientation error. They defined the attitude error as an additive quantity. Their work is extended by retaining a rigorous nonlinear MRP-based error equation. Schaub et al. [23] developed a new penalty function for optimal control formulation of spacecraft attitude control problems. This function returns the same scalar penalty for a given physical attitude regardless of the attitude coordinate choice. A recent work by Tanygi investigated the projective geometry of vectorial attitude parameterizations with applications for control [24] and estimation [25]. Junkins [26] discussed the link between designing a good controller and the choice of coordinates to represent the attitude kinematics. He linearized the attitude error equations by defining the departure motion as an additive error from a nominal trajectory. Unfortunately, the error in orientation cannot be rigorously represented as additive (linear) because of the nonlinear behavior of underlying kinematical descriptions [2].
Error equations are challenging to define for quaternion variables because of the implied coupling effects between the quaternion components and the implicit norm constraint. The position error is linear and, therefore, can be described by the distance between the two vectors representing the true and the estimated position states. Unfortunately, the error in orientation in not linear and, therefore, must be described by a matrix product (corrective attitude matrix [2]). An exact quaternion error equation is defined as the quaternion product between the true quaternion and the inverse quaternion of the estimated (or reference) state. The significant advantage of this approach is that the norm constraint is preserved and, most importantly, that the quaternion error product remains valid for arbitrarily large relative rotations. This fact is exploited to develop equivalent arbitrarily large relative rotational representations for the vehicle attitude motion. The resulting expressions are compact, accurate, and computationally efficient.
The primary goal of this paper is to develop uniformly valid kinematics equations to describe the time-evolution of the attitude error. References [1,3,4,5,10] contain good review for the attitude kinematics equations. This paper presents compact nonlinear attitude error kinematics equations that can be used in attitude control and/or estimation dynamics problems. Exact analytical (closed-form and no approximations) attitude error kinematic equations are derived for most popular and known attitude representations. This paper extends previous work originally initiated by the authors on developing attitude error kinematics [27,28,29,30], where the estimated angular velocity is defined in the true attitude axes frame. It builds on our initial findings and extends the formulations to address more detailed developments and to present two distinct error kinematics approaches treated with more compact depth and insights in the derivations. It also presents simulation examples that demonstrate the applications in attitude filtering and tracking control. The multiplicative Kalman filter is discussed to enable the use of these attitude error kinematics for two different coordinate choices. The resulting expressions have been optimized to obtain the most compact and computationally efficient forms. Also, the applications of these formulations are discussed by solving the open-loop optimal spacecraft tracking control problem.
The major contribution of this paper is the complete development of attitude error kinematics equations where the estimated angular velocity is defined in either the true attitude axes frame or in the estimated attitude axes frame. These equations can be used for arbitrarily large relative rotations and rotation rates. These attitude errors represent rotations between estimated and true attitudes. Numerical integrations of these kinematic equations are performed to validate the machine error accuracy for each attitude representation. Singularities and constraints are discussed for minimum and non-minimum attitude parameter representations, respectively. Applications are expected in rotational dynamics problems for both nonlinear attitude estimation filtering and attitude tracking.

2. Attitude Error Kinematics

With reference to Figure 1, let C be the true attitude matrix (DCM) of which the axes are [ x , y , z ] (dashed, black) and let C ^ be the estimated attitude matrix of which the axes are [ x ^ , y ^ , z ^ ] (dashed, red).
The relationships between the DCM with the corresponding Euler’s angles associated with the rotation axes and sequences are given in Table A1. The attitude error is described by the corrective attitude matrix:
δ C = C C ^ T .
In fact, the product between δ C and the estimated attitude C ^ provides the true attitude:
δ C C ^ = ( C C ^ T ) C ^ = C .
In particular, matrix δ C is the transformation matrix for vectors from the estimated [ x ^ , y ^ , z ^ ] frame to the true [ x , y , z ] frame.
Let ω be the true angular velocity vector (black solid in Figure 1) of which the elements are defined in the [ x , y , z ] axes of the true attitude. Now, consider ω ^ to be the estimate of the true angular velocity vector (red solid in Figure 1). Two distinct cases appears:
(1)
The estimated ω ^ is defined in the true body axes frame ( x , y , z ). In this case, ω and ω ^ are defined in the same reference frame. Therefore, the angular velocity error vector is as follows:
δ ω = ω ω ^ .
This case finds application in simulations when the true attitude is known.
(2)
The estimated ω ^ is defined in the estimated body axes frame ( x ^ , y ^ , z ^ ). In this case, ω and ω ^ are defined in two different reference frames. Therefore, the angular velocity error vector is as follows:
δ ω = ω δ C ω ^ ,
where δ C is provided by Equation (1). This case is important in real applications as the true attitude is always unknown and the estimated angular velocity can be defined in the estimated attitude frame only.
The true attitude dynamics is defined by ω and C. They satisfy the DCM kinematic equations:
[ ω × ] = C ˙ C T .
The estimated angular velocity satisfies the dynamic equation:
I ω ^ ˙ = [ ω ^ × ] I ω ^ + u ,
where I 3 × 3 is the moments of inertia tensor and u 3 is the torque acting on the system. We assume that the system parameters are deterministic.
To develop the attitude error kinematics equations, two distinct analysis must be performed. These two derivations are associated to the two angular velocity errors definitions provided in Equations (2) and (3), respectively. The following two sections derive the attitude error kinematics equations valid for arbitrarily large angles and rate errors.

2.1. Simulation Case: Estimated Angular Velocity Given in the True Attitude Frame

In this section, the estimated and the true angular velocities are expressed in same coordinate frames, δ ω = ω ω ^ . This approach is suitable in simulations where the true body attitude is known. When using the same reference frame for true and estimated angular velocities, the angular velocity error dynamics equation is written as follows [21,27,28]:
δ ω ˙ = I 1 { [ ω ^ × ] I [ ( I ω ^ ) × ] } δ ω I 1 [ ( δ ω ) × ] I δ ω + I 1 u ω ^ ˙ I 1 [ ω ^ × ] I ω ^ .
In the following subsections, the attitude error kinematic equations are derived for the most important attitude representations and for arbitrarily large rotational angles and angular rates. These equations are mathematically simple and compact. They can be used, for instance, to validate novel control theories and/or attitude estimation filtering techniques.

2.1.1. Quaternion Error Kinematics

The quaternion error is a four-dimensional vector defined as follows:
δ q = δ q v δ q 4 ,
where δ q v = { δ q 1 , δ q 2 , δ q 3 } T = e sin ϕ 2 , δ q 4 = cos ϕ 2 , e is the principal axis, and ϕ is the principal angle. The kinematic solution for the true quaternion trajectory defines the desired relative rotational motion for the spacecraft. Equation (1) written in term of quaternion is as follows:
δ q = q q ^ 1 ,
where q ^ 1 is the inverse of the estimated quaternion rotation and ⊗ represents the quaternion product. Note that the error, δ q , is also a quaternion, that is, a unit vector representing the rotation from the estimated axes to the true axes. This expression is valid for arbitrarily large rational motions and provides a foundation for developing all other kinematic variable generalizations presented. We follow reference [1] in writing the quaternion product as follows:
q q = q 4 q v + q v q 4 q v × q v q 4 q 4 q v · q v ,
where q and q represent two arbitrary quaternions. The quaternion error rate is as follows:
δ q ˙ = q ˙ q ^ 1 + q q ^ ˙ 1 .
Quaternion kinematics evolves according to the kinematic equation:
q ˙ = 1 2 ω 0 q = 1 2 [ ω × ] ω ω T 0 q = 1 2 Ω ( ω ) q .
The derivative of the identity q ^ q ^ 1 = { 0 , 0 , 0 , 1 } T leads to q ^ ˙ q ^ 1 + q ^ q ^ ˙ 1 = 0 . Hence, the inverse quaternion evolves:
q ^ ˙ 1 = 1 2 q ^ 1 ω ^ 0 = 1 2 [ ω ^ × ] ω ^ ω ^ T 0 q ^ 1 = 1 2 Γ ( ω ^ ) q ^ 1 ,
where Γ ( ω ^ ) is the estimated angular velocity matrix. Substituting Equation (7) and Equation (8) into Equation (6), yields the following:
δ q ˙ = 1 2 Ω ( ω ) δ q 1 2 q q ^ 1 ω ^ 0 = 1 2 Ω ( ω ) δ q 1 2 δ q ω ^ 0 .
This allows us to write the following:
δ q ω ^ 0 = Γ ( ω ^ ) δ q .
The quaternion error rate equation becomes the following:
δ q ˙ = 1 2 [ Ω ( ω ) Γ ( ω ^ ) ] δ q .
Now, by substituting the angular velocity error given in Equation (2) into Equation (9), the bilinear differential equation for the tracking error kinematics becomes the following:
δ q ˙ = 1 2 [ Ω ( δ ω + ω ^ ) Γ ( ω ^ ) ] δ q = 1 2 [ Ω ( δ ω ) + Γ ˜ ( ω ^ ) ] δ q ,
where Γ ˜ ( ω ^ ) is a matrix defined as follows:
Γ ˜ ( ω ^ ) = Ω ( ω ^ ) Γ ( ω ^ ) = 2 [ ω ^ × ] 0 3 × 1 0 1 × 3 0 .
Equation (10) can be rewritten in the following compact form:
δ q ˙ = 1 2 ( [ δ ω × ] + 2 [ ω ^ × ] ) δ ω δ ω T 0 δ q v δ q 4 .
This equation can be split into the scalar and vector part of the quaternion as follows [28]:
δ q ˙ v = 1 2 [ δ ω × ] + 2 [ ω ^ × ] δ q v + δ q 4 δ ω δ q ˙ 4 = 1 2 δ ω T δ q v .
These above equations are exact for arbitrarily large and rapid relative rotational motions.

2.1.2. Rodrigues Parameter Error Kinematics

Rodrigues parameters are a minimum attitude parametrization. The RP vector is defined in terms of quaternion parameters as follows [10]:
ρ = q v q 4 = e tan ϕ 2 ,
where the inverse transformation is given as follows:
q 4 = 1 1 + ρ 2 and q v = ρ 1 + ρ 2 ,
where ρ 2 = ρ T ρ . Note that the attitude error given in Equation (12) is represented in the quaternion form. An exact nonlinear model for the quaternions with no approximation is used to preserve the quaternion unit norm. This implies that the quaternion error still represents a finite orientation that can be mapped to any other attitude representations. Here, the quaternion error to RP using Equation (13) is mapped. Thus, the RP error vector is simply expressed as follows:
δ ρ = δ q v δ q 4 .
The inverse mapping for quaternion variables follows:
δ q 4 = 1 1 + δ ρ 2 and δ q v = δ ρ 1 + δ ρ 2 ,
where δ ρ 2 = δ ρ T δ ρ . The RP error differential equation is obtained by taking the derivative of Equation (14) and substituting Equations (12) and (15), which yields the following [28]:
δ ρ ˙ = 1 2 [ δ ω × ] + 2 [ ω ^ × ] δ ρ + δ ω + 1 2 δ ω T δ ρ δ ρ .
Equation (16) provides the desired RP attitude error nonlinear kinematic differential equation.

2.1.3. Modified Rodrigues Parameter Error Kinematics

Modified Rodrigues parameters are an elegant addition to the family of attitude representations. MRP vector is defined in terms of the quaternion parameters by the following [10]
σ = q v 1 + q 4 = e tan ϕ 4 .
The inverse transformation is given by the following:
q 4 = 1 σ 2 1 + σ 2 and q v = 2 σ 1 + σ 2 .
Similarly, since the attitude error in Equation (12) is expressed by quaternion, the mapping into MRP can be performed using Equation (17). Thus, MRP error vector is expressed as follows:
δ σ = δ q v 1 + δ q 4 .
The inverse mapping for quaternion variables follows:
δ q 4 = 1 δ σ 2 1 + δ σ 2 and δ q v = 2 δ σ 1 + δ σ 2 .
The MRP error differential equation is obtained by taking the derivative of Equation (18) and substituting Equation (12) and Equation (19), which yields the following compact, nonlinear, third-order form [28]:
δ σ ˙ = 1 4 2 [ δ ω × ] + 2 [ ω ^ × ] δ σ + ( 1 δ σ 2 ) δ ω + 1 2 δ ω T δ σ δ σ .
Equation (20) provides the exact MRP attitude error kinematic differential equation.

2.1.4. Euler Angles Error Kinematics

The most famous attitude representation is described by three angles, known as Euler angles, ( θ 1 , θ 2 , θ 3 ) associated with subsequent rotations about three coordinate axes. The variations of these angles represent the attitude error of δ C . There are several conventions for Euler angles, depending on the axes about which the rotations are carried out. In the following, we assume the rotation is 3-1-3 (yaw-roll-yaw) sequences, then we generalize the expression for arbitrary rotation sequence. We start from the mapping equations from quaternion to Euler angles [6]. For the 3-1-3 set, the transformation is as follows:
δ q v δ q 4 = sin ( δ θ 2 2 ) cos ( δ θ 1 δ θ 3 2 ) sin ( δ θ 2 2 ) sin ( δ θ 1 δ θ 3 2 ) cos ( δ θ 2 2 ) sin ( δ θ 1 + δ θ 3 2 ) cos ( δ θ 2 2 ) cos ( δ θ 1 + δ θ 3 2 ) 313 = Θ 313 ( δ θ 1 , δ θ 2 , δ θ 3 ) .
Differentiating Equation (21), we obtain the following:
δ q v ˙ δ q ˙ 4 = H 313 ( δ θ 1 , δ θ 2 , δ θ 3 ) δ θ ˙ 1 δ θ ˙ 2 δ θ ˙ 3 313 ,
where H 313 ( δ θ 1 , δ θ 2 , δ θ 3 ) is a 4 × 3 matrix. Thus, Euler angle rates can be written in the following least-squares solution:
δ θ ˙ 1 δ θ ˙ 2 δ θ ˙ 3 313 = ( H 313 T H 313 ) 1 H 313 T δ q v ˙ δ q ˙ 4 .
Substituting Equation (12) and making use of Equation (21), we obtain the following:
δ θ ˙ 1 δ θ ˙ 2 δ θ ˙ 3 313 = 1 2 ( H 313 T H 313 ) 1 H 313 T ( [ δ ω × ] + 2 [ ω ^ × ] ) δ ω δ ω T 0 Θ 313 ( δ θ 1 , δ θ 2 , δ θ 3 ) .
In general, for the generic i-j-k Euler angles sequence, the formula is as follows [28]:
δ θ ˙ i δ θ ˙ j δ θ ˙ k i j k = 1 2 ( H i j k T H i j k ) 1 H i j k T ( [ δ ω × ] + 2 [ ω ^ × ] ) δ ω δ ω T 0 Θ i j k ( δ θ 1 , δ θ 2 , δ θ 3 ) .
Equation (22) represents the attitude error kinematic equation using any Euler angle sequence.

2.1.5. Principal Axis and Angle Error Kinematics

Any rigid-body rotation can be obtained by a single rotation about a principal axis, e , by a principal angle, ϕ . To derive the kinematics of the principal axis/angle for attitude error, we start from the definition of the quaternion:
δ q 4 = cos ( δ ϕ / 2 ) and δ q v = δ e sin ( δ ϕ / 2 ) .
Taking the derivative of Equation (23), substituting Equation (12), and solving for δ ϕ ˙ and δ e ˙ , we obtain the following [28]:
δ ϕ ˙ = δ ω T δ e ^ ,
where δ e ^ = δ e δ e T δ e and
δ e ˙ = 1 2 [ δ ω × ] + 2 [ ω ^ × ] δ e ^ + ( δ ω T δ e ^ ) δ e ^ δ ω cot ( δ ϕ / 2 ) .
Equations (24) and (25) are the desired nonlinear kinematic differential equation of the attitude error using principal axis and principal angle.

2.1.6. Direction Cosine Matrix Error Kinematics

The DCM error can be written as follows:
δ C = C C ^ T .
Performing the derivative of Equation (26) and making use of the attitude kinematics, C ˙ = [ ω × ] C , and the DCM inverse identity, C ^ ˙ T = C ^ T C ^ ˙ C ^ T , we obtain the following [28]:
δ C ˙ = [ δ ω × ] δ C [ ω ^ × ] δ C + δ C [ ω ^ × ] .

2.1.7. Cayley–Klein Error Parameters Kinematics

Cayley–Klein parameters is an attitude representation provided by a 2 × 2 complex matrix. This matrix is as follows:
δ K = δ q 4 I 2 × 2 + i δ q 1 σ 1 + δ q 2 σ 2 + δ q 3 σ 3 = δ q 4 + i δ q 3 δ q 2 + i δ q 1 δ q 2 + i δ q 1 δ q 4 i δ q 3 ,
where σ 1 = 0 1 1 0 , σ 2 = 0 i i 0 , and σ 3 = 1 0 0 1 are the three Pauli spin matrices. The principal angle can be computed from the following:
δ ϕ = 2 cos 1 1 2 tr δ K .
Rewriting Equation (28) in column form, we obtain the following:
col ( δ K ) = δ K 1 , 1 δ K 2 , 1 δ K 1 , 2 δ K 2 , 2 = δ q 4 + i δ q 3 δ q 2 + i δ q 1 δ q 2 + i δ q 1 δ q 4 i δ q 3 = 0 0 i 1 i 1 0 0 i 1 0 0 0 0 i 1 δ q v δ q 4 = Ψ 0 δ q ,
where Ψ 0 is a non-singular constant matrix. Differentiating Equation (29), substituting Equation (12), and using q v = Ψ 0 1 col ( δ K ) , we obtain the following [28]:
col ( δ K ˙ ) = Ψ 0 2 [ δ ω × ] + 2 [ ω ^ × ] δ ω δ ω T 0 Ψ 0 1 col ( δ K ) ,
where the col ( δ K ) has to satisfy the constraint equation δ q T δ q = 1 that leads to col ( δ K ) T Ψ 0 T Ψ 0 1 col ( δ K ) = 1 or col ( δ K ) T col ( δ K ) = 2 .

2.2. Estimation/Control Case: Angular Velocity Estimated in the Estimated Attitude Frame

In this section, the estimated and the true angular velocities are expressed in different coordinate frames: δ ω = ω δ C ω ^ .
This equation explicitly accounts for the obvious truth that the estimated and true angular velocity vectors are expressed in different coordinate frames. This definition explicitly computes the angular velocity error in the current body frame. This kinematic variable definition leads to the following angular velocity error dynamics equation:
δ ω ˙ = I 1 [ δ C ω ^ × ] I [ I δ C ω ^ × ] δ ω I 1 [ δ ω × ] I δ ω + I 1 u + + [ δ ω × ] δ C ω ^ ω ^ ˙ I 1 [ δ C ω ^ × ] I δ C ω ^ .
It is clear that the angular velocity error dynamics equation is coupled with the attitude solution. This is expected as the estimated angular velocity has to be mapped to the true frame using the attitude corrective matrix, δ C .

2.2.1. Direction Cosine Matrix Error Kinematics

To investigate the new attitude error parametrization for the estimation/control case, the direction cosine matrix is differentiated for the attitude error given in Equation (1):
δ C = C C ^ T δ C ˙ = C ˙ C ^ T + C C ^ ˙ T .
Recall the attitude kinematics of the current motion C ˙ = [ ω × ] C and the estimated motion C ^ ˙ = [ ω ^ × ] C ^ . Equation (32) can be written:
δ C ˙ = [ ω × ] δ C + δ C [ ω ^ × ] .
The angular velocity error is δ ω = ω δ C ω ^ . Therefore, we obtain the following:
δ C ˙ = [ δ ω × ] δ C [ δ C ω ^ × ] δ C + δ C [ ω ^ × ] .
Using the transformation of skew-symmetric tensor identity [4], we obtain the following:
[ δ C ω ^ × ] = δ C [ ω ^ × ] δ C T .
Also, since δ C is an orthogonal matrix, Equation (34) reduces to the following:
δ C ˙ = [ δ ω × ] δ C .
It is interesting that the attitude error kinematics equation is similar to the attitude kinematics equation. This result agrees with the demonstration presented in Tanygin’s work [24]. Hence, the attitude error kinematics using other attitude parameterizations can be simply obtained.

2.2.2. Quaternion Error Kinematics

The quaternion error is a four-dimensional vector defined as follows:
δ q = δ q v δ q 4 = δ q 1 δ q 2 δ q 3 δ q 4 .
The transformation from quaternion error, δ q , to DCM error, δ C , is given by the following:
δ C = ( δ q 4 2 δ q v T δ q v ) I + 2 δ q v δ q v T 2 δ q 4 [ δ q v × ] .
The inverse transformations is as follows:
δ q 4 = ± 1 2 1 + tr [ δ C ]
δ q v = 1 4 δ q 4 δ C 23 δ C 32 δ C 31 δ C 13 δ C 12 δ C 21 .
This transformation shows the redundancy in selecting the sign of the scalar parameter, δ q 4 . The positive sign is associated to δ ϕ π , while the negative is associated to π < δ ϕ 2 π .
The kinematics differential equation of the quaternion error is derived by differentiating Equation (38):
δ q ˙ 4 = δ C ˙ 11 + δ C ˙ 22 + δ C ˙ 33 8 δ q 4 .
Substituting the expressions of the diagonal elements
δ C ˙ 11 = ( δ C 23 δ C 32 ) δ ω 1 δ C ˙ 22 = ( δ C 31 δ C 13 ) δ ω 2 δ C ˙ 33 = ( δ C 12 δ C 21 ) δ ω 3
in Equation (40) yields the following:
δ q ˙ 4 = 1 2 ( δ q 1 δ ω 1 δ q 2 δ ω 2 δ q 3 δ ω 3 ) = 1 2 δ q v T δ ω .
Similar derivations are applied on δ q ˙ 1 , δ q ˙ 2 , and δ q ˙ 3 in Equation (). The kinematic error differential equation for quaternion is then the following:
δ q ˙ = 1 2 δ q 4 I 3 × 3 + [ δ q v × ] δ q v T δ ω = 1 2 [ δ ω × ] δ ω δ ω T 0 δ q ,
where I 3 × 3 is the 3 × 3 identity matrix.

2.2.3. Rodrigues Parameter Error Kinematics

Rodrigues parameters error vector is simply expressed by the following:
δ ρ = δ q v δ q 4 = tan δ ϕ 2 δ e ,
Also, the inverse mapping for quaternion variables follow:
δ q 4 = 1 1 + δ ρ 2 and δ q v = δ ρ 1 + δ ρ 2 ,
where δ ρ 2 = δ ρ T δ ρ . The differential equation for the RP error follows by taking the derivative of Equation (43):
δ ρ ˙ = δ q v ˙ δ q 4 δ q ˙ 4 δ q v δ q 4 2 .
Substituting Equation (42) into Equation (45) yields the following:
δ ρ ˙ = 1 2 δ q 4 I 3 × 3 + [ δ q v × ] δ q 4 + δ q v δ q 4 2 δ q v T δ ω .
This equation can be further simplified by substituting Equation (44) to yield the compact quadratic form:
δ ρ ˙ = 1 2 I 3 × 3 + [ δ ρ × ] + δ ρ δ ρ T δ ω .
Equation (46) is the RP attitude error kinematic differential equation. The above form approaches singularity when | δ ϕ | ± π .

2.2.4. Modified Rodrigues Parameter Error Kinematics

Modified Rodrigues parameters error vector is expressed as follows:
δ σ = δ q v 1 + δ q 4 = tan δ ϕ 4 δ e ,
The inverse mapping to quaternion is as follows:
δ q 4 = 1 δ σ 2 1 + δ σ 2 and δ q v = 2 δ σ 1 + δ σ 2 .
The differential equation for the MRP error follows from the derivative of Equation (47):
δ σ ˙ = δ q v ˙ 1 + δ q 4 δ q ˙ 4 δ q v ( 1 + δ q 4 ) 2 .
Substituting Equation (42) into Equation (49) yields the following:
δ σ ˙ = 1 2 δ q 4 I 3 × 3 + [ δ q v × ] 1 + δ q 4 + δ q v δ q v T ( 1 + δ q 4 ) 2 δ ω .
This equation is simplified by substituting Equation (48) to obtain a compact quadratic form:
δ σ ˙ = 1 4 ( 1 δ σ 2 ) I 3 × 3 + 2 [ δ σ × ] + 2 δ σ T δ σ δ ω .
Equation (50) provides the MRP attitude error kinematic differential equation. The above form approaches singular behavior as | δ ϕ | ± 2 π .

2.2.5. Euler Angles Error Kinematics

There are 12 distinct Euler angles sequences, depending on the axes about which the rotations are carried out. Review the development in Section 2.1.4; similar derivations are followed here that yield to the general i-j-k Euler angle error kinematics equations:
δ θ ˙ i δ θ ˙ j δ θ ˙ k i j k = 1 2 ( H i j k T H i j k ) 1 H i j k T [ δ ω × ] δ ω δ ω T 0 Θ i j k ( δ θ 1 , δ θ 2 , δ θ 3 ) .
Equation (51) is the desired kinematic differential equation using Euler angles to represent the attitude error.
Alternatively, the Euler angles error kinematics can be derived by writing the angular velocity error vector in the body frame in terms of the Euler angles error rates. For example, the angular velocity error vector for 3-1-3 rotation sequence is given by the following:
δ ω = R 313 ( δ θ 1 , δ θ 2 , δ θ 3 ) 0 0 δ θ ˙ 1 + R 31 ( δ θ 2 , δ θ 3 ) δ θ ˙ 2 0 0 + R 3 ( δ θ 3 ) 0 0 δ θ ˙ 3 ,
where R 313 ( δ θ 1 , δ θ 2 , δ θ 3 ) = R 3 ( δ θ 3 ) R 1 ( δ θ 2 ) R 3 ( δ θ 1 ) is the 3-1-3 rotation sequence, where
R 1 ( δ θ ) = 1 0 0 0 cos ( δ θ ) sin ( δ θ ) 0 sin ( δ θ ) cos ( δ θ ) , R 2 ( δ θ ) = cos ( δ θ ) 0 sin ( δ θ ) 0 1 0 sin ( δ θ ) 0 cos ( δ θ ) , and R 3 ( δ θ ) = cos ( δ θ ) sin ( δ θ ) 0 sin ( δ θ ) cos ( δ θ ) 0 0 0 1 .
Equation (52) can be written in the compact form:
δ ω = M 313 δ θ ˙ 1 δ θ ˙ 2 δ θ ˙ 3 ,
where
M 313 = sin ( δ θ 2 ) sin ( δ θ 3 ) cos ( δ θ 3 ) 0 sin ( δ θ 2 ) cos ( δ θ 3 ) sin ( δ θ 3 ) 0 cos ( δ θ 2 ) 0 1 .
The kinematic differential equation of 3-1-3 Euler angles error is the inverse of Equation (54):
δ θ ˙ 1 δ θ ˙ 2 δ θ ˙ 3 = M 313 1 δ ω 1 δ ω 2 δ ω 3 = M 313 1 δ ω .
The complete set of 12 Euler angles error kinematics in terms of M i j k 1 and the angular velocity error vector is provided in Appendix A.

2.2.6. Principal Axis and Angle Error Kinematics

To derive the kinematics of the principal axis/angle for attitude error, we start from the definition of the quaternion:
δ q 4 = cos ( δ ϕ / 2 ) and δ q v = δ e sin ( δ ϕ / 2 ) .
Taking the derivative and solving for δ ϕ ˙ and δ e ˙ , we obtain the following:
δ ϕ ˙ = 2 δ q ˙ 4 sin ( δ ϕ / 2 ) and δ e ˙ = δ q ˙ v 1 2 δ e δ ϕ ˙ cos ( δ ϕ / 2 ) sin ( δ ϕ / 2 ) .
Substituting Equation (42) and making use of δ q v = δ e ^ sin δ ϕ / 2 and the identity [ δ e ^ × ] [ δ e ^ × ] = δ e ^ δ e ^ T I 3 × 3 , we obtain the following:
δ ϕ ˙ = δ ω T δ e ^ ,
where δ e ^ = δ e δ e T δ e and
δ e ˙ = 1 2 [ δ e ^ × ] [ δ e ^ × ] [ δ e ^ × ] cot ( δ ϕ / 2 ) δ ω .
Equations (56) and (57) represent the kinematic equations of the attitude error using principal axis and principal angle.

2.2.7. Cayley–Klein Error Parameters Kinematics

Cayley–Klein parameters is an attitude representation provided by a 2 × 2 complex matrix. This matrix is as follows:
δ K = δ q 4 I 2 × 2 + i δ q 1 σ 1 + δ q 2 σ 2 + δ q 3 σ 3 = δ q 4 + i δ q 3 δ q 2 + i δ q 1 δ q 2 + i δ q 1 δ q 4 i δ q 3 ,
where σ 1 , σ 2 , and σ 3 are the three Pauli spin matrices. The principal angle can be computed from the following:
δ ϕ = 2 cos 1 1 2 tr δ K .
It has been already shown in (Section 2.1.7) that the Cayley–Klein parameters can be written in the column form:
col ( δ K ) = δ K 1 , 1 δ K 2 , 1 δ K 1 , 2 δ K 2 , 2 = Ψ 0 δ q ,
where Ψ 0 = 0 0 i 1 i 1 0 0 i 1 0 0 0 0 i 1 is a non-singular constant matrix. The kinematics equation of the Cayley–Klein error column vector is as follows:
col ( δ K ˙ ) = Ψ 0 δ q ˙ .
Substituting Equation (42) into Equation (58) and making use of col ( δ K ) = Ψ 0 δ q , the kinematics equation of the Cayley–Klein error column vector yields the following:
col ( δ K ˙ ) = 1 2 Ψ 0 [ δ ω × ] δ ω δ ω T 0 Ψ 0 1 col ( δ K ) ,
where the col ( δ K ) has to satisfy the constraint equation col ( δ K ) T col ( δ K ) = 2 .
Appendix B summarizes the attitude error kinematics using the two definitions of the angular velocity error.

2.3. Numerical Validation

Numerical integrations of all the kinematic equations presented are performed for arbitrary initial conditions to validate the machine error accuracy for each attitude representation. For this particular example, the initial conditions are given in Table 1, where constant angular velocity is considered. The validation test is performed as follows:
  • Integrate the true attitude kinematics for each attitude representation using the attitude kinematics equations;
  • Transform the time history solution of the true attitude for each attitude representation to the direction cosine matrix C or quaternion q ;
  • Integrate the estimated attitude kinematics for each attitude representation using the attitude kinematics equations;
  • Transform the time history solution of the estimated attitude for each attitude representation to the direction cosine matrix C ^ or quaternion q ^ ;
  • Calculate the attitude error of the two solutions in steps 2 and 4 using δ C = C C ^ T or δ q = q q ^ 1 ; then, calculate the principal angle of the attitude error, δ ϕ * ;
  • For approaches 1 and 2, integrate the attitude error kinematics for each attitude representation using the attitude error kinematics equations in Appendix B (Table Figure A1); then, calculate the principal angle of the attitude error δ ϕ for each approach;
  • Calculate the absolute error Δ ( δ ϕ ) = | δ ϕ * δ ϕ | , as shown in Figure 2.
Figure 2 represents the validation test of the two approaches (step 6) compared to the classical approach (step 5). Figure 2a,b show the computation error, Δ ( δ ϕ ) = | δ ϕ * δ ϕ | , of the attitude error computed using the first approach (Figure 2a) and the second approach (Figure 2b) for the following attitude representations: direction cosine matrix, quaternion, Rodrigues parameters, and modified Rodrigues parameters. The first approach represents the simulation case, denoted by kinematic error 1. The second approach represents theestimation/control case, denoted by kinematic error 2. The two figures Figure 2c,d show the computation error, Δ ( δ ϕ ) = | δ ϕ * δ ϕ | , of the attitude error computed using the first approach (Figure 2c) and the second approach (Figure 2d) for the following attitude representations: principal axis/angle, Euler angles (3-1-3), Euler angles (1-2-3), and Cayley–Klein parameters. The computation error retains the accuracy level of the numerical integrator used (MATLAB®  function ode45).

3. Kalman Filter

In this section, a sequential extended Kalman filter (EKF) formulation is developed and presented for the two approaches. The development of compact forms of nonlinear attitude error kinematics enables the applications of arbitrarily large relative rotations and rotation rates in different attitude coordinates. Since quaternions present no singularities, it is the most popular coordinate for attitude estimation. However, it must obey the norm constraint.

3.1. Estimated Angular Velocity Defined in the True Attitude Frame

The estimated angular velocity vector ω ^ is defined in the true body axes frame ( x , y , z ). In this case, ω and ω ^ are defined in the same reference frame. Therefore, the angular velocity error vector is as follows:
δ ω = ω ω ^ .
This case finds application during simulations when the true attitude is available. The quaternion error kinematics is given by Equation (12), which can be linearized for first-order approximation to the following [8]:
δ q ˙ v [ ω ^ × ] δ q v + 1 2 δ ω δ q ˙ 4 0 .
Unfortunately, this linearization requires that the estimated quaternion is close to the true quaternion to preserve the normalization constraint.
A common sensor model to measure the angular rate is the rate-integrating gyro, which is defined by the following:
ω = ω ˜ β η v β ˙ = η u ,
where η v N ( 0 , σ v 2 I 3 × 3 ) and η u N ( 0 , σ u 2 I 3 × 3 ) are zero-mean Gaussian noise with variances given by σ v 2 and σ u 2 , respectively; β is the gyro bias vector; and ω ˜ is the measured angular velocity, which is given by the following:
ω ˜ = ω ^ + β ^ ,
where ω ^ and β ^ are the estimated angular velocity and the estimated gyro bias vectors, respectively. Hence, the angular velocity error is given by the following:
δ ω = ( δ β + η v ) ,
where δ β = β β ^ . The multiplicative extended Kalman filter error model is now given by the following (note: β ^ ˙ = 0 ):
δ q ˙ v [ ω ^ × ] δ q v 1 2 ( δ β + η v ) δ β ˙ η u .

3.2. Estimated Angular Velocity Defined in the Estimated Attitude Frame

In this section, the estimated and the true angular velocities are expressed in different coordinate frames, δ ω = ω δ C ω ^ . It has been discussed earlier that the attitude error kinematics equations for this approach take the same form as the attitude kinematics equations; see Figure A1. The quaternion error kinematics is linearized for first-order approximation to the following:
δ q ˙ v 1 2 δ ω δ q ˙ 4 0 ,
where the first-order approximation of the attitude error matrix is given by the following:
δ C I 3 × 3 2 [ δ q v × ] .
Considering the same rate-integrating gyro sensor model defined in Equation (61) and the observed angular velocity definition in Equation (62), the angular velocity error is written as follows:
δ ω = ( I 3 × 3 δ C ) ω ˜ ( δ β + η v ) = 2 [ ( ω ^ + β ^ ) × ] δ q v ( δ β + η v ) ,
where δ β = β δ C β ^ . The multiplicative extended Kalman filter error model is now given by the following (note: β ^ ˙ = 0 ):
δ q ˙ v [ ( ω ^ + β ^ ) × ] δ q v 1 2 ( δ β + η v ) δ β ˙ η u + [ δ ω × ] δ C β ^ .

3.3. Extended Kalman Filter Error Model

For a single sensor, we define the true and estimated body vectors as follows:
b = C ( q ) r b ^ = C ( q ^ ) r ,
where r = { x , y , z } T is the 3 × 1 vector of the vehicle position in the earth-centered, earth-fixed (ECEF) coordinates, the true attitude matrix is C ( q ) = C ( δ q ) C ( q ^ ) , C ( δ q ) is defined in Equation (37), and C ( q ^ ) = ( q ^ 4 2 q ^ v T q ^ v ) I + 2 q ^ v δ q ^ v T 2 q ^ 4 [ q ^ v × ] . Thus, the estimation error of the body vector is defined as follows:
Δ b b b ^ = 2 [ C ( q ^ ) r × ] δ q v .
The sensitivity matrix of n measurement sets is given by the following:
H = 2 [ C ( q ^ ) r 1 × ] 0 3 × 3 2 [ C ( q ^ ) r 2 × ] 0 3 × 3 2 [ C ( q ^ ) r n × ] 0 3 × 3 .
The EKF error model is given by the following:
Δ x ˜ ˙ = F ( x ^ ( t ) , t ) Δ x ˜ ( t ) + G ( t ) w ( t ) ,
where Δ x ˜ ( t ) = [ δ q v T δ β T ] T ; w = [ η v T η u T ] T ; and F ( x ^ ( t ) , t ) , G ( t ) , and Q ( t ) are given by Table 2:
Discrete-time attitude observation n × 1 model at time t k is given by the following:
y ˜ k = [ C ( q ) r 1 ] q ) r 2 ] q ) r n ] t k + ν 1 ν 2 ν n t k h k ( x ^ k ) + v k ,
where v k N ( 0 , R k ) is zero-mean gaussian measurements noise with covariance error matrix R k . Thus, the error state update is given by the following:
Δ x ˜ ^ k + = K k [ y ˜ k h k ( x ^ k ) ] ,
where Δ x ˜ ^ k + = [ δ q ˜ ^ k + δ β ˜ ^ k + ] T , y ˜ k is the measurement output, h k ( x ^ k ) is the estimate output, and K k is Kalman gain, as given in Equation (75).
The EKF is implemented following the below sequential steps [30,31]:
  • Initialization: at t 0 and for given initial states x 0 = [ q ^ 0 , β 0 ] T and initial value of the covariance matrix P 0 , the initial values are given by the following:
    x ^ ( 0 ) = E { x ( 0 ) } = x 0 P ( 0 ) = E { ( x ( 0 ) x 0 ) ( x ( 0 ) x 0 ) T } = P 0 ,
    where the superscript (−) denotes priori values and E { } is the expectation operator. Assume that x ( 0 ) N ( 0 , P ( 0 ) ) .
  • Gain: compute the Kalman gain matrix:
    K k = P k H k T ( x ^ k ) H k ( x ^ k ) P k H k T ( x ^ k ) + R k 1 ,
    where H k ( x ^ k ) h x | x ^ k is given in Equation (71).
  • Update: update the state estimate x ^ k + and covariance P k + at each measurement:
    x ^ k + = x ^ k + K k [ y ˜ k h k ( x ^ k ) ] P k + = [ I 3 × 3 K k H k ( x ^ k ) ] P k + ,
    where the superscript (+) denotes posteriori values.
  • Propagation: propagate both the state estimate x ^ k and covariance P k using the posteriori estimate x ^ k + and posteriori covariance P k + . The estimated angular velocity, ω ^ = ω ˜ β ^ , is used to propagate the quaternion kinematics:
    q ^ ˙ = 1 2 [ ω × ] ω ^ ω ^ T 0 q ^ β ^ ˙ = 0 P ˙ = F P + P F T + G Q G T ,
    where the matrices F, G, and Q are given by Table 2.

3.4. Numerical Simulation

This section presents simulation results that utilize data provided by a star tracker to estimate the attitude of slow spinning spacecraft under the following scenario:
  • Optical axis aligned with z ^ axis of the body reference frame.
  • Sensor field of view: 10 × 12 .
  • Star catalog with magnitude threshold = 6.
  • Observed stars affected by multiplicative Gaussian noise [32] due to centroid error, 3 σ = 20 .
  • spacecraft is spinning about the y ^ axis with constant angular velocity 1.01 rad/s.
  • Simulation time is 300 s with sampling frequency of 10 Hz.
The directions captured by the sensor field of view during the whole trajectory is shown in Figure 3. Figure 4 shows the attitude estimation error, which is defined as the principal angle between estimated and true DCM and is small and within the predicted covariance ( ± 3 σ ) error.

4. Optimal Tracking Control

A general scalar nonnegative attitude penalty function is utilized to formulate an optimal feedback control for the spacecraft tracking problem. This new variable yields identical performance index values, regardless of the attitude variables selected. The general final finite-time optimal control formulating is given by minimizing the following performance index [29]:
= 1 2 Φ ( t f , δ ω ( t f ) , δ ζ ( t f ) ) + 1 2 t 0 t f L ( δ ω , δ ζ , u , t ) d t ,
which is subject to x ˙ = [ δ ω ˙ T δ ζ ˙ T ] T = f ( δ ω , δ ζ , u ) , where δ ω is the angular velocity error, δ ζ is an arbitrary attitude representation of the attitude error, and the penalty functions are (using δ ω ( t f ) = δ ω t f and δ ζ ( t f ) = δ ζ t f ):
Φ ( t f , δ ω ( t f ) , δ ζ ( t f ) ) = Q 1 g ( δ ζ t f ) + δ ω t f T Q 2 δ ω t f and L ( δ ω , δ ζ , u , t ) = Q 3 g ( δ ζ ) + δ ω T Q 4 δ ω + u T R u .
The weights Q 1 and Q 3 are scalars, and the weights Q 2 , Q 4 , and R are 3 × 3 matrices. The f ( δ ω , δ ζ , u ) is the spacecraft error dynamics. The scalar function g ( δ ζ ) is a general nonnegative attitude penalty function. The function is chosen to produce the same cost for a given physical orientation [23,29]:
g ( [ δ C ( δ e ^ , δ ϕ ) ] ) = 1 4 ( 3 tr ( [ δ C ] ) ) = sin 2 ( δ ϕ / 2 ) ,
when using exact nonlinear attitude error kinematics, the orientation will work for large angles; δ ϕ = ± 180 . Therefore, the function is bounded 0 g ( δ C ) 1 for all possible rotations. Thus, the attitude cost reaches its highest value at the maximum rotation angle. Defining the attitude cost function in terms of the DCM makes it universally valid for arbitrary choice of attitude coordinates. It can be simply parameterized by any other attitude coordinate. The universal quadratic penalty function for arbitrary attitude error representations is given in Table 3. This penalty function returns the same cost for a given physical attitude, thereby eliminating the dependency of the optimal control solution on the choice of the attitude coordinate.

4.1. Reference Angular Velocity Defined in the Body Attitude Frame

The reference ω r and current ω angular velocities are expressed in the same coordinate frames; i.e., δ ω = ω ω r . It can be shown that the general expression of the attitude error kinematics of this set can be given as follows:
δ ζ ˙ = [ f δ ζ ( δ ζ ) ] δ ω [ ω r × ] δ ζ ,
with initial state δ ζ ( t 0 ) = δ ζ 0 . The Hamiltonian H for this system of equations is defined, for the given optimal control problem in Equations (79) and (80), as follows:
H = 1 2 ( Q 3 g ( δ ζ ) + δ ω T Q 4 δ ω + u T R u ) λ δ ω T I 1 ( [ ω r × ] I [ ( I ω r ) × ] ) δ ω + [ δ ω × ] I δ ω u + I ω r ˙ + [ ω r × ] I ω r ) + λ δ ζ T ( [ f δ ζ ( δ ζ ) ] δ ω [ ω r × ] δ ζ ) ,
where λ δ ω and λ δ ζ are the co-state variables for the angular velocity error and the attitude error, respectively. Invoking the standard necessary condition for optimality, the co-state differential equations are given by the following:
λ ˙ δ ω = Q 4 δ ω [ f δ ζ ( δ ζ ) ] T λ δ ζ ( I [ δ ω × ] [ ( I δ ω ) × ] ( [ ω r × ] I [ ( I ω r ) × ] ) T ) I 1 λ δ ω λ ˙ δ ζ = 1 2 Q 3 g ( δ ζ ) ( δ ζ ) ( [ f δ ζ ( δ ζ ) ] δ ω ) T λ δ ζ [ ω r × ] λ δ ζ ,
The two co-state differential equations are integrated backward in time with given terminal values λ δ ω ( t f ) = Φ ( δ ω ) | t f and λ δ ζ = Φ ( δ ζ ) | t f . The optimal control is given by the first-order necessary conditions for an extremum, H u = 0 , leading to u = ( I R ) 1 λ δ ω .

4.2. Reference Angular Velocity Defined in the Reference Attitude Frame

The reference and current angular velocities are expressed in different coordinate frames, i.e., δ ω = ω δ C ω r . Therefore, this definition explicitly computes the angular velocity error in the current body frame. As an important result of this set, the expressions of the attitude error kinematics follow the attitude kinematics equation for any given attitude representation choice. Therefore, the general expression of the attitude error kinematics of this set can be given as follows:
δ ζ ˙ = [ f δ ζ ( δ ζ ) ] δ ω ,
with initial state δ ζ ( t 0 ) = δ ζ 0 . The Hamiltonian H for this system of equations is as follows:
H = 1 2 ( Q 3 g ( δ ζ ) + δ ω T Q 4 δ ω + u T R u ) λ δ ω T I 1 ( [ δ C ω r × ] I [ I δ C ω r × ] δ ω + [ δ ω × ] I δ ω u I [ δ ω × ] δ C ω r + I ω ˙ r + [ δ C ω r × ] J δ C ω r ) + λ δ ζ T [ f δ ζ ( δ ζ ) ] δ ω .
Invoking the standard necessary condition for optimality, the co-state differential equations are given by the following:
λ ˙ δ ω = Q 4 δ ω [ f δ ζ ( δ ζ ) ] T λ δ ζ ( I [ δ ω × ] [ ( I δ ω ) × ] ( [ δ C ω r × ] I [ ( I δ C ω r ) × ] ) T + [ δ C ω r × ] I ) I 1 λ δ ω λ ˙ δ ζ = 1 2 Q 3 g ( δ ζ ) ( δ ζ ) ( [ f δ ζ ( δ ζ ) ] δ ω ) T λ δ ζ [ ω r × ] λ δ ζ ( δ ζ ) [ δ ˙ ω ] T λ δ ω ,
The optimal control is given by the first-order necessary conditions for an extremum, H u = 0 , leading to u = ( I R ) 1 λ δ ω . Note the last term in the ( λ ˙ δ ζ ) expression involves calculating the partial derivative of the angular velocity error kinematic, ( δ ζ ) [ δ ˙ ω ] , which obviously leads to difficult math. This step is also required when performing coordinate mapping between the DCM into other attitude parameters.

4.3. Numerical Simulation

This section presents simulation results of a fixed final-time and final-state open-loop optimal control solution for the spacecraft tracking problem. Modified Rodrigues parameters are used for the attitude motion. The initial and final state variable conditions for this example are given in Table 4. The spacecraft moment of inertia tensor is given in Table 5. For simplicity, the weighting matrices are Q 1 = 0 , Q 3 = 1 , Q 2 = 0 3 × 3 , and Q 4 = R = I 3 × 3 . However, one can sweep those penalties to obtain different solutions sets. This example stands to solve the open-loop optimal control problem for the spacecraft tracking problem using arbitrary attitude representation. We consider the universal performance index given in Table 3. The state and co-state differential equations are solved in a Boundary Value Problem (BVP) framework using a shooting method (MATLAB fsolve) [29,33]. The optimal open-loop solution is shown in Figure 5. The time history of the optimal trajectory and control is shown in Figure 5a for MRPs representation. The trajectory is controlled to drive the spacecraft for a given initial state error, δ ω ( 0 ) and δ ζ ( 0 ) , to rest at zero attitude error after 25 seconds. It is noted that the optimal open-loop solution obtained for various attitude representation produces the same angular displacement δ ϕ and total cost, as given in Figure 5b.

5. Conclusions

Full analytical derivations of attitude error kinematics equations have been presented. Compact forms of attitude error kinematics equations are derived for various attitude parameterizations. The attitude error is defined as the rotation error between the true and estimated orientations. Several attitude error representations are developed for describing the orientation error kinematics. Two approaches to attitude error kinematics are introduced. The first one considers the estimated angular velocity defined in the true body axes, while in the second one, the estimated angular velocity is defined in the estimated body axes. These two angular velocity definitions are usually adopted in simulations and in real estimation/control applications, respectively. These two nonlinear kinematic models are valid for arbitrarily large relative rotations and rotation rates. These results are expected to be broadly useful for generalizing extended Kalman filtering formulations and optimal control tracking problems.

Author Contributions

Conceptualization, D.M.; project administration, A.B.Y.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. Angular Velocity Error Vector and Euler Angle Error Rates Mapping

This appendix presents forward and inverse mapping between the angular velocity error vector δ ω and the Euler angle error rates δ θ ˙ = δ θ ˙ 1 δ θ ˙ 2 δ θ ˙ 3 T in the following form:
δ θ ˙ = M i j k 1 δ ω
Note that the shorthand notations c i = cos ( δ θ i ) and s i = sin ( δ θ i ) are used in Table A1.
Table A1. Angular velocity error vector and Euler angle error rates mapping.
Table A1. Angular velocity error vector and Euler angle error rates mapping.
i-j-k M ijk 1 M ijk i-j-k M ijk 1 M ijk
1-2-1 1 s 2 0 s 3 c 3 0 s 2 c 3 s 2 c 3 s 2 c 2 s 3 c 2 c 3 c 2 0 1 s 2 s 3 c 3 0 s 2 c 3 s 3 0 2-3-1 1 c 2 0 c 3 s 3 0 c 2 s 3 c 2 c 3 c 2 s 2 c 3 s 2 s 3 s 2 0 1 c 2 c 3 s 3 0 c 2 s 3 c 3 0
      
1-2-3 1 c 2 c 3 s 3 0 c 2 s 3 c 2 c 3 0 s 2 c 3 s 2 s 3 c 2 c 2 c 3 s 3 0 c 2 s 3 c 3 0 s 2 0 1 2-3-2 1 s 2 c 3 0 s 3 s 2 s 3 0 s 2 c 3 c 2 c 3 s 2 c 2 s 3 s 2 c 3 s 3 0 c 2 0 1 s 2 s 3 c 3 0
      
1-3-1 1 s 2 0 c 3 s 3 0 s 2 s 3 s 2 c 3 s 2 c 2 c 3 c 2 s 3 c 2 0 1 s 2 c 3 s 3 0 s 2 s 3 c 3 0 3-1-2 1 c 2 s 3 0 c 3 c 2 c 3 0 c 2 s 3 s 2 s 3 c 2 s 2 c 3 c 2 s 3 c 3 0 s 2 0 1 c 2 c 3 s 3 0
      
1-3-2 1 c 2 c 3 0 s 3 c 2 s 3 0 c 2 c 3 s 2 c 3 c 2 s 2 s 3 c 2 c 3 s 3 0 s 2 0 1 c 2 s 3 c 3 0 3-1-3 1 s 2 s 3 c 3 0 s 2 c 3 s 2 s 3 0 c 2 s 3 c 2 c 3 s 2 s 3 s 2 c 3 0 s 2 c 3 s 3 0 c 2 0 1
      
2-1-2 1 s 2 s 3 0 c 3 s 2 c 3 0 s 2 s 3 c 2 s 3 s 2 c 2 c 3 s 2 s 3 c 3 0 c 2 0 1 s 2 c 3 s 3 0 3-2-1 1 c 2 0 0 c 3 0 c 2 c 3 c 2 s 3 c 2 s 2 s 3 s 2 c 3 s 2 0 1 c 2 s 3 c 3 0 c 2 c 3 s 3 0
      
2-1-3 1 c 2 s 3 c 3 0 c 2 c 3 c 2 s 3 0 s 2 s 3 s 2 c 3 c 2 c 2 s 3 c 3 0 c 2 c 3 s 3 0 s 2 0 1 3-2-3 1 s 2 c 3 s 3 0 s 2 s 3 s 2 c 3 0 c 2 c 3 c 2 s 3 s 2 s 2 c 3 s 3 0 s 2 s 3 c 3 0 c 2 0 1
      

Appendix B. Attitude Error Kinematics

Attitude error kinematics equations for various attitude representations and for the two approaches—estimated angular velocity defined in the true attitude frame (for simulations) or defined in the estimated attitude frame (for real applications)—are summarized in Figure A1. These equations are used to integrate the attitude error rate.
Figure A1. Summary of the attitude error kinematics equations. The terms in red indicate the differences between the two forms
Figure A1. Summary of the attitude error kinematics equations. The terms in red indicate the differences between the two forms
Sensors 19 04682 g0a1

References

  1. Shuster, M.D. A Survey of Attitude Representations. J. Astronaut. Sci. 1993, 41, 439–517. [Google Scholar]
  2. Mortari, D. The Attitude Error Estimator. In Proceedings of the International Conference on Dynamics and Control of Systems and Structures in Space, Cambridge, UK, 14–18 July 2002. [Google Scholar]
  3. Markley, F.L.; Crassidis, J.L. Fundamentals of Spacecraft Attitude Determination and Control; Space Technology Library, Springer: New York, NY, USA, 2014. [Google Scholar]
  4. Hughes, P.C. Spacecraft Attitude Dynamics; J. Wiley: Hobken, NJ, USA, 1986; Chapter 1. [Google Scholar]
  5. Goldstein, H. Classical Mechanics, 2nd ed.; Addison-Wesley, Addison-Wesley Publishing Company: Reading, MA, USA, 1980; Chapter 4. [Google Scholar]
  6. Junkins, J.L.; Turner, J.D. Optimal Spacecraft Rotational Maneuvers; Studies in Astronautics; Elsevier: Amsterdam, The Netherlands, 1986; Chapter 3. [Google Scholar]
  7. Junkins, J.L.; Singla, P. How Nonlinear Is It? A Tutorial on Nonlinearity of Orbit and Attitude Dynamics. J. Astronaut. Sci. 2004, 52, 7–60. [Google Scholar]
  8. Markley, F.L. Attitude Error Representations for Kalman Filtering. J. Guid. Control Dyn. 2003, 26, 311–317. [Google Scholar] [CrossRef]
  9. Van Der Ha, J.; Shuster, M. A Tutorial on Vectors and Attitude. IEEE Control Syst. 2009, 29, 94–107. [Google Scholar] [CrossRef]
  10. Schaub, H.; Junkins, J.L. Analytical Mechanics of Space Systems; AIAA Education Series; American Institute of Aeronautics and Astronautics: Reston, VA, USA, 2003; Chapter 3. [Google Scholar]
  11. Wiener, T. Theoretical Analysis of Gimballess Inertial Reference Equipment Using Delta-Modulated Instruments. Ph.D. Thesis, Department of Aeronautical and Astronautical Engineering, MIT, Cambridge, MA, USA, 1962. [Google Scholar]
  12. Marandi, S.; Modi, V. A Preferred Coordinate System and the Associated Orientation Representation in Attitude Dynamics. Acta Astronaut. 1987, 15, 833–843. [Google Scholar] [CrossRef]
  13. Modi, V. Spacecraft Attitude Dynamics: Evolution and Current Challenges. Acta Astronaut. 1990, 21, 689–718. [Google Scholar] [CrossRef]
  14. Cao, L.; Chen, X.; Misra, A.K. A Novel Unscented Predictive Filter for Relative Position and Attitude Estimation of Satellite Formation. Acta Astronaut. 2015, 112, 140–157. [Google Scholar] [CrossRef]
  15. Cao, L.; Qiao, D.; Chen, X. Laplace 1 Huber Based Cubature Kalman Filter for Attitude Estimation of Small Satellite. Acta Astronaut. 2018, 148, 48–56. [Google Scholar] [CrossRef]
  16. Bach, R.; Paielli, R. Linearization of Attitude-Control Error Dynamics. IEEE Trans. Autom. Control 1993, 38, 1521–1525. [Google Scholar] [CrossRef]
  17. Sun, L.; Huo, W.; Jiao, Z. Disturbance-Observer-Based Robust Relative Pose Control for Spacecraft Rendezvous and Proximity Operations Under Input Saturation. IEEE Trans. Aerosp. Electron. Syst. 2018, 54, 1605–1617. [Google Scholar] [CrossRef]
  18. Crassidis, J.L.; Vadali, S.R.; Markley, F.L. Optimal Variable-Structure Control Tracking of Spacecraft Maneuvers. J. Guid. Control Dyn. 2000, 23, 564–566. [Google Scholar] [CrossRef]
  19. Ahmed, J.; Coppola, V.T.; Bernstein, D.S. Adaptive Asymptotic Tracking of Spacecraft Attitude Motion with Inertia Matrix Identification. J. Guid. Control Dyn. 1998, 21, 311–321. [Google Scholar] [CrossRef]
  20. Younes, A.B.; Turner, J.D.; Majji, M.; Junkins, J.L. An Investigation of State Feedback Gain Sensitivity Calculations. In Proceedings of the AIAA/AAS Astrodynamics Specialist Conference, Toronto, ON, Canada, 2–5 August 2010. [Google Scholar]
  21. Younes, A.B.; Turner, J.D.; Majji, M.; Junkins, J.L. Nonlinear Tracking Control of Maneuvering Rigid Spacecraft. In Proceedings of the 21st AAS/AAS Space Flight Mechanics Meeting, New Orleans, LA, USA, 13–17 February 2011. [Google Scholar]
  22. Sharma, R.; Tewari, A. Optimal Nonlinear Tracking of Spacecraft Attitude Maneuvers. IEEE Trans. Control Syst. Technol. 2004, 12, 677–682. [Google Scholar] [CrossRef]
  23. Schaub, H.; Junkins, J.L.; Robinett, R.D. New Penalty Functions and Optimal Control Formulation for Spacecraft Attitude Control Problems. J. Guid. Control Dyn. 1997, 20, 428–434. [Google Scholar] [CrossRef]
  24. Tanygin, S. Projective Geometry of Attitude Parameterizations with Applications to Control. J. Guid. Control Dyn. 2013, 36, 656–666. [Google Scholar] [CrossRef]
  25. Tanygin, S. Projective and Differential Geometry of Attitude Errors with Applications to Estimation. J. Guid. Control Dyn. 2013, 36, 1254–1266. [Google Scholar] [CrossRef]
  26. Junkins, J.L. Adventures on the Interface of Dynamics and Control. J. Guid. Control Dyn.s 1997, 20, 1058–1071. [Google Scholar] [CrossRef]
  27. Younes, A.B.; Turner, J.D.; Mortari, D.; Junkins, J.L. A Survey Of Attitude Error Representations. In Proceedings of the AIAA/AAS Astrodynamics Specialist Conference, Minneapolis, MN, USA, 13–16 August 2012. [Google Scholar] [CrossRef]
  28. Younes, A.B.; Mortari, D.; Turner, J.D.; Junkins, J.L. Attitude Error Kinematics. J. Guid. Control Dyn. 2014, 37, 330–336. [Google Scholar] [CrossRef]
  29. Younes, A.B.; Mortari, D. Attitude Error Kinematics: Applications in Control. In Proceedings of the 26th AAS/AIAA Space Flight Mechanics Meeting, Napa, CA, USA, 14–18 February 2016. [Google Scholar]
  30. Younes, A.B.; Mortari, D. Attitude Error Kinematics: Applications in Estimation. In Proceedings of the 26th AAS/AIAA Space Flight Mechanics Meeting, Napa, CA, USA, 14–18 February 2016. [Google Scholar]
  31. Crassidis, J.; Junkins, J. Optimal Estimation of Dynamic Systems; Chapman & Hall/CRC Applied Mathematics & Nonlinear Science; CRC Press: Boca Raton, FL, USA, 2011. [Google Scholar]
  32. Mortari, D.; Majji, M. Multiplicative Measurement Model. J. Astronaut. Sci. 2009, 57, 47–60. [Google Scholar] [CrossRef]
  33. Li, F.; Bainum, P.M. A improved Shooting Method for Solving Minimum-Time Maneuver Problems. In Advances in dynamics and control of flexible spacecraft and space-based manipulations. In Proceedings of the ASME, Winter Annual Meeting, Dallas, TX, USA, 25–30 November 1990. [Google Scholar]
Figure 1. True and estimated ( ^ ) attitude frames and angular velocities
Figure 1. True and estimated ( ^ ) attitude frames and angular velocities
Sensors 19 04682 g001
Figure 2. Validation test. (large angular rotation δ ϕ = [ 145 , 170 ] deg). (a) Kinematics error 1. (b) Kinematics error 2. (c) Kinematics error 1. (d) Kinematics error 2. DCM= Direction Cosine Matrix; RP= Rodrigues parameters; MRP = Modified Rodrigues parameters.
Figure 2. Validation test. (large angular rotation δ ϕ = [ 145 , 170 ] deg). (a) Kinematics error 1. (b) Kinematics error 2. (c) Kinematics error 1. (d) Kinematics error 2. DCM= Direction Cosine Matrix; RP= Rodrigues parameters; MRP = Modified Rodrigues parameters.
Sensors 19 04682 g002
Figure 3. Stars view over the trajectory. (a) Stars sphere. (b) Observed stars by an orbiting spacecraft.
Figure 3. Stars view over the trajectory. (a) Stars sphere. (b) Observed stars by an orbiting spacecraft.
Sensors 19 04682 g003
Figure 4. Attitude estimation. (a) Attitude estimation error: principal angle. (b)Attitude estimation error: Euler’s angles.
Figure 4. Attitude estimation. (a) Attitude estimation error: principal angle. (b)Attitude estimation error: Euler’s angles.
Sensors 19 04682 g004
Figure 5. Open-loop optimal solution for the tracking motion.(a) Time history of the optimal trajectory, ω and MRPs, and control. (b) Time history of the principal angle and the total optimal cost.
Figure 5. Open-loop optimal solution for the tracking motion.(a) Time history of the optimal trajectory, ω and MRPs, and control. (b) Time history of the principal angle and the total optimal cost.
Sensors 19 04682 g005
Table 1. Initial conditions.
Table 1. Initial conditions.
ParameterInitial Condition
ω (rad/s) { 0.7972 , 0.5202 , 0.3064 } T
ω ^ (rad/s) { 0.7931 , 0.5898 , 0.1521 } T
q { 0.3112 , 0.2937 , 0.5374 , 0.7267 } T
q ^ { 0.0104 , 0.8248 , 0.4319 , 0.3647 } T
Table 2. The extended Kalman filter (EKF) model.
Table 2. The extended Kalman filter (EKF) model.
δ ω = ω ω ^ δ ω = ω δ C ω ^
F = [ ω ^ × ] 1 2 I 3 × 3 0 3 × 3 0 3 × 3 G = 1 2 I 3 × 3 0 3 × 3 0 3 × 3 I 3 × 3 Q = σ v 2 I 3 × 3 0 3 × 3 0 3 × 3 σ v 2 I 3 × 3 F = [ ( ω ^ + β ^ ) × ] 1 2 I 3 × 3 2 [ β ^ × ] [ ( ω ^ + β ^ ) × ] [ β ^ × ] G = 1 2 I 3 × 3 0 3 × 3 β ^ × ] I 3 × 3 Q = σ v 2 I 3 × 3 0 3 × 3 0 3 × 3 σ v 2 I 3 × 3
Table 3. Universal penalty function for attitude error.
Table 3. Universal penalty function for attitude error.
Attitude ParameterPenalty Function
DCM g ( δ C ) = 1 4 ( 3 tr ( δ C ) )
Quaternion g ( δ C ( δ q ) ) = δ q 1 2 + δ q 2 2 + δ q 3 2
CRPs g ( δ C ( δ ρ ) ) = δ ρ T δ ρ 1 + δ ρ T δ ρ
MRPs g ( δ C ( δ σ ) ) = 4 δ σ T δ σ ( 1 + δ σ T δ σ ) 2
Euler Angles * g ( δ C ( δ θ ) ) = 1 4 [ 3 ( 1 + cos δ θ 2 ) cos ( δ θ 1 + δ θ 3 ) cos δ θ 2 ]
Principal angle/axis g ( δ C ( δ e ^ , δ ϕ ) ) = sin 2 ( δ ϕ / 2 )
Cayley-Klein g ( δ C ( δ K ) ) = 1 1 4 tr ( δ K ) 2
* For the 3-1-3 rotation sequence.
Table 4. Initial/boundary conditions.
Table 4. Initial/boundary conditions.
Time (s)Attitude Error (MRPs) δ ζ Angular Velocity Error δ ω (rad/s)
0 1 3 [ 1 , 1 , 1 ] T [ 0.1 , 0.2 , 0.3 ] T
25 [ 0 , 0 , 0 ] T [ 0 , 0 , 0 ] T
Table 5. The spacecraft principal moment of inertia components (kg·m 2 ).
Table 5. The spacecraft principal moment of inertia components (kg·m 2 ).
I 1 86.215
I 2 85.070
I 3 113.565

Share and Cite

MDPI and ACS Style

Bani Younes, A.; Mortari, D. Derivation of All Attitude Error Governing Equations for Attitude Filtering and Control. Sensors 2019, 19, 4682. https://doi.org/10.3390/s19214682

AMA Style

Bani Younes A, Mortari D. Derivation of All Attitude Error Governing Equations for Attitude Filtering and Control. Sensors. 2019; 19(21):4682. https://doi.org/10.3390/s19214682

Chicago/Turabian Style

Bani Younes, Ahmad, and Daniele Mortari. 2019. "Derivation of All Attitude Error Governing Equations for Attitude Filtering and Control" Sensors 19, no. 21: 4682. https://doi.org/10.3390/s19214682

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop