Você está na página 1de 28

Spacecraft Attitude Dynamics and Control

Attitude Determination

Luiz Carlos Gadelha


UFABC

The problem of attitude determination


Attitude Measurements
Sun Sensors
Magnetometers
Deterministic Attitude Determination
The problem of attitude determination
Essentially all control systems require two types of hardware
components: sensors and actuators. Sensors are used to sense or
measure the state of the system, and actuators are used to adjust
the state (control) of the system.
A spacecraft attitude determination and control (SADC) system
typically uses a variety of sensors and actuators. Because attitude is
described by three or more attitude variables, this procedure is
slightly more complicated than for position of the satellite in space.
Attitude determination uses a combination of sensors and
mathematical models to collect vector components in the body and
inertial reference frames. These components are used in one of
several different algorithms to determine the attitude, typically in
the form of a Euler angles, quaternion or a rotation matrix.
The problem of attitude determination
The classification of attitude determination procedures is separate in
two types in terms of time of information used in the calculations.
In the first case, the algorithms consider exclusively the information
of the present time (“static” attitude). In counterpart, the other way
to obtain the attitude uses also the past information, i.e. take into
account values of the state variables in the past and the models of
their variation in time.
The mathematical analysis of attitude determination is complicated
by the fact that attitude determination is can be either
underdetermined (one measurement) or overdetermined (two
measurement).
The problem of attitude determination
The implication of last observation is that all attitude
determination algorithms are really attitude estimation
algorithms.
For the case of determination of “static” attitude, there are some
different methods and algorithms.
Consider that the satellite has a Sun sensors (that provides the
direction vector of the Sun in the satellite body frame) and
magnetometers (that provides the direction vector of the Earth
magnetic field in the satellite body frame).

This attitude sensors configuration are very usual in the satellites


with “static” attitude determination approach.
The problem of attitude determination
The problem of determination can be defined taking the relation
between the representation of the two direction vectors. For
example, the Sun and magnetic field, in the reference system of
interest, body frame and other one (inertial or orbital).

𝑠𝑏 = 𝑅𝑏𝑖 𝑠𝑖 , 𝑚𝑏 = 𝑅𝑏𝑖 𝑚𝑖

The attitude determination analyst needs to understand how


various sensors measure the body-frame components, how
mathematical models are used to determine the inertial-frame
components and how standard attitude determination algorithms
are used to estimate the rotation matrix 𝑅𝑏𝑖
Attitude Measurements
There are two basic classes of attitude sensors. The first class makes absolute
measurements, whereas the second class makes relative measurements.

Absolute measurement sensors are based on the fact that knowing the position of a
spacecraft in its orbit makes it possible to compute the vector directions, with respect to
an inertial frame, of certain astronomical objects, and of the force lines of the Earth's
magnetic field.

Absolute measurement sensors measure these directions with respect to a spacecraft or


body-fixed reference frame. By comparing the measurements with the known reference
directions in an inertial reference frame are able to determine (at least approximately) the
relative orientation of the body frame with respect to the inertial frame.

Absolute measurements are used in the static attitude determination algorithms.

Relative measurement sensors belong to the class of gyroscopic instruments, rate gyro and
the integrating gyro.
These instruments has been implemented as spinning disks mounted on gimbals;
however, modern technology has brought such marvels as ring laser gyros, fiber optic
gyros, and hemispherical resonator gyros.

Relative measurement sensors are used in the dynamic attitude determination


algorithms.
Sun Sensors
The sun sensors is important because of their relative simplicity
therefore, all spacecraft use sun sensors of some type.
The sun is a useful reference direction because of its brightness
relative to other astronomical objects, and its relatively small
apparent radius as viewed by a spacecraft near the Earth.
Most satellites use solar power, and need to make sure that solar
panels are oriented correctly with respect to the sun.
Some satellites have sensitive instruments that must not be
exposed to direct sunlight.
For all these reasons, sun sensors are usually components in
spacecraft attitude determination and control (SADC) systems.
Sun Sensors
The objective of a sun sensor is to provide an approximate unit
vector, with respect to the body reference frame Sb, that points
towards the sun.

Considering that the position of the spacecraft in its orbit is


known, then one knows Si .

So it is possible to determine (estimate) the rotation matrix 𝑅𝑏𝑖

S = 𝑠𝑏 = 𝑅𝑏𝑖 𝑠𝑖
Sun Sensors
Two types of sun sensors are available: analog and digital. Analog
sun sensors are based on photocells whose current I output is
proportional to the cosine of the angle α between the direction to
the sun and the normal to the photocell (Fig. 4.1a).
The current output is given by : I(α) = I(0) cos (α) from which α
can be determined.
The unit normal of the photocell is n, so that : s *n = cos α
However, knowing (α) does not provide enough information to
determine s completely, since the component of s perpendicular
to n remains unknown.
Typically, sun sensors combine two or more such photocells to
provide the complete unit vector measurement.
Sun Sensors
To determine the angle in a specific plane, one normally uses two
photocells in pair see Fig. 4.1b.

This arrangement gives the angle between the sun sensor normal n and
the projection of the sun vector s onto the n – t plane.

Then the two photocells generate currents

I1(α) = I(0) cos (αo - α)


I2(α) = I(0) cos (αo - α)

Taking the difference of these two expressions and following the


sequence from eq. 4.7 to 4.12 (pg 4.5) one obtains the vector Ss and
considering that Rbs is known then Sb can be obtained.
Magnetometers
The magnetometer measure the Earth's magneticfield in a
magnetometer-fixed reference frame. The orientation of the
magnetometer frame with respect to the spacecraft body frame is
determined by a algorithm. Therefore, the magnetometer provides a
measurement of the magneticfield in the body frame mb .
Through a mathematical model of the Earth's magneticfield one can
determine mi (inertial frame ) based on the time and the spacecraft's
position.
Using a simple dipole model of the Earth's magneticfield, one can
write the components of the magneticfield in the Earth-centered
inertial (ECI) frame as in Eq. (4.13) and following the sequence of the
pg. 4.7 to obtain the angle αm.
Attitude determination sensors vary in expense, complexity,
reliability and accuracy. Some of the accuracy characteristics are
included in Table 4.1.
Deterministic Attitude Determination
Determining the attitude of a spacecraft is equivalent to determining the
rotation matrix Rbi describing the orientation of the spacecraft-fixed reference
frame {b} , with respect to a known reference frame, i.e. an inertial frame {i}.

One needs three numbers to determine the matrix completely and but each
measured unit vector provides two pieces of information, so it takes at least two
different measurements to determine the attitude. This is the overdetermined
problem, since one has three unknowns and four known quantities.

Let’s start with two measurement vectors (with respect to the body) such as the
direction to the sun Sb and the direction of the Earth's magneticfield mb.
Considering the known components of the vectors in the inertial frame are si
and mi. The rotation matrix Rbi, satisfies
sb = Rbisi and mb = Rbimi
Let’s see Triad algorithm, because it is based on constructing two triads of
orthonormal unit vectors using the vector information that one has.
Algorithm TRIAD [Lerner/Wertz, 1978]
It is a very simple algorithm, since discards part of information to
obtain a deterministic determination (not overdetermined).
TRIAD considers only 2 direction vectors (2 sensors, Sun sensor +
magnetometer).
The algorithm is based on the construction of two triad of
orthonormal vectors, that represents a third frame 𝑡 in the two
interest frames, 𝑏 and 𝑖
Another main characteristics of TRIAD: since one information is
discarded, one elects the sensors with the best information (more
precision, less noise, etc).

Let’s consider the Sun sensor as the best one.


Algorithm TRIAD [Lerner/Wertz, 1978]
Once the Sun sensor is the best , one takes the Sun direction as the
first vector of 𝑡 base
𝑡1 = 𝑠
𝑡1𝑏 = 𝑠𝑏
𝑡1𝑖 = 𝑠𝑖

The second vector is defined by a vector perpendicular to the two


observation vectors
𝑡2 = 𝑠 × 𝑚
𝑠𝑏 × 𝑚𝑏
𝑡2𝑏 =
|𝑠𝑏 × 𝑚𝑏 |
𝑠𝑖 × 𝑚𝑖
𝑡2𝑖 =
|𝑠𝑖 × 𝑚𝑖 |
Algorithm TRIAD [Lerner/Wertz, 1978]
The third vector completes a orthonormal base
𝑡3 = 𝑡1 × 𝑡2
𝑡1𝑏 × 𝑡2𝑏
𝑡3𝑏 =
|𝑡1𝑏 × 𝑡2𝑏 |
𝑡1𝑖 × 𝑡2𝑖
𝑡3𝑖 =
|𝑡1𝑖 × 𝑡2𝑖 |

Now, one builds two rotation matrices putting the t vector


components into the columns of two 3X3 matrices.

𝐴𝑏 = 𝑡1𝑏 𝑡2𝑏 𝑡3𝑏 = 𝑅𝑏𝑡


𝐴𝑖 = 𝑡1𝑖 𝑡2𝑖 𝑡3𝑖 = 𝑅𝑖𝑡
Algorithm TRIAD [Lerner/Wertz, 1978]
Finally, the attitude matrix is easily obtained using this two matrices

𝑅𝑏𝑖 = 𝑅𝑏𝑡 𝑅𝑡𝑖 = 𝐴𝑏 𝐴𝑖 𝑇

From the rotation matrix, it is possible to extract Euler Angles and


quaternions and exio/Euler parameters.

Comments
• Low computational cost, low requirements in terms of memory.
• Does not use all available information.
• Less precise than other methods.

• Let’s see example 4.2 of pg 4-10


Statistical Attitude Determination
Another approach consists of using all available information, i.e. the
overdetermined problem.

Considering N observation vectors (provided by N different sensors),


𝒗𝒌 , 𝒌 = 𝟏, 𝟐, … 𝑵, and its representation in body and inertial frames

𝑣𝑘𝑏 = 𝑅𝑏𝑖 𝑣𝑘𝑖

Now the problem of attitude determination, is to find a matrix Rbi that


minimizes the loss function
𝑁
1 2
𝐽 𝑅𝑏𝑖 = 𝑤𝑘 𝑣𝑘𝑏 − 𝑏𝑖
𝑅 𝑣𝑘𝑖
2
𝑘=1

The smaller one can makes J(Rbi), the better is the approximation of Rbi.
Statistical Attitude Determination
Comments :

The solution is a numerical method to search the point where the


function J(Rbi) is minimum, but usually the computation efforts are
too right, and the solution can be not good.

In the book one presents three diferent methods for solving this
minimization problem: 1) an iterative numerical solution based on
Newton's method; 2) an exact method known as the q-method;
and 3) an efficient approximation of the q-method known as
QUEST (QUaternion ESTimator)
Q-Method [Davenport/ Keat, 1977]
This method minimizes the function J(Rbi), and begin by
expanding the loss function as follows:

𝑁
1 𝑏𝑖 𝑇
𝐽= 𝑤𝑘 𝑣𝑘𝑏 − 𝑅 𝑣𝑘𝑖 (𝑣𝑘𝑏 −𝑅𝑏𝑖 𝑣𝑘𝑖 )
2
𝑘=1

𝑁
1 𝑇 𝑇 𝑇 𝑏𝑖
𝐽= 𝑤𝑘 (𝑣𝑘𝑏 𝑣𝑘𝑏 + 𝑣𝑘𝑖 𝑣𝑘𝑖 − 2𝑣𝑘𝑏 𝑅 𝑣𝑘𝑖 )
2
𝑘=1
Q-Method [Davenport/ Keat, 1977]
• The vectors in the expression are unitary vectors, so
𝑇 𝑇
𝑣𝑘𝑏 𝑣𝑘𝑏 = 1 , 𝑣𝑘𝑖 𝑣𝑘𝑖 = 1
𝑁
𝑇 𝑏𝑖
𝐽= 𝑤𝑘 (1 − 𝑣𝑘𝑏 𝑅 𝑣𝑘𝑖 )
𝑘=1

• Minimizing J is equivalent to maximizing gain function g


𝑁
𝑇 𝑏𝑖
𝑔(𝑅) = 𝑤𝑘 (𝑣𝑘𝑏 𝑅 𝑣𝑘𝑖
𝑘=1
Q-Method [Davenport/ Keat, 1977]
This new expression for the determination problem have quite
simple solution if one adopts quaternion as attitude parameters
𝑅 = 𝑞42 − 𝑞 𝑇 𝑞 𝟏 + 2𝑞 𝑞𝑇 − 2𝑞4 [𝑞 ×]
𝑞𝑇 𝑞 = 1

• The expression of g became


𝑔 𝑞 = 𝑞 𝑇 𝐾𝑞
where
𝑆 − 𝜎1 𝑍 𝑁
𝐾=
𝑍𝑇 𝜎 𝐵= 𝑇
𝑤𝑘 (𝑣𝑘𝑏 𝑣𝑘𝑖
𝑆 = 𝐵 + 𝐵𝑇 𝑘=1
𝜎 = tr(𝐵)
𝑍 = 𝐵23 − 𝐵32 𝐵31 − 𝐵13 𝐵12 − 𝐵21 𝑇
Q-Method [Davenport/ Keat, 1977]
One can include the unitary norm condition (quaternions) in the
original maximization problem using Lagrange multiplier

𝑔′ 𝑞 = 𝑞 𝑇 𝐾𝑞 − 𝜆𝑞 𝑇 𝑞

Differentiating this expression, one obtains a stationary point,


defined by
𝐾𝑞 = 𝜆𝑞

As a result, the determination problem became a eigenvalue


problem
Q-Method [Davenport/ Keat, 1977]
Using the expression of eigenvalue problem, one obtains the
value of the original g function (to be maximized)

𝑔 𝑞 = 𝑞 𝑇 𝐾𝑞 = 𝑞 𝑇 𝜆𝑞 = 𝜆𝑞 𝑇 𝑞 = 𝜆

The conclusion is that the optimum attitude quaternion is the


one that corresponds to the biggest eigenvalue 𝜆
Consequently, the solution of the attitude determination
problem comes from the resolution of a eigenvalue problem
(with relative high computational cost)

A third method is an approximation of the solution for the


eigenvalue problem is called QUEST.
QUEST [Shuster & Oh, 1981]
The eigenvalue problem can be easily solved using Matlab functions.
But, on-board computing requirements are a concern for satellite
designers, so a more efficient way of solving the eigenproblem is
needed.
Based in previous experiences in physics problems, Shuster proposed a
simpler and approximative solution to the determination problem.
Considering the least-squares optimal attitude method that minimizes
the loss function
𝑁
1 2
𝐽 𝑅𝑏𝑖 = 𝑤𝑘 𝑣𝑘𝑏 − 𝑏𝑖
𝑅 𝑣𝑘𝑖
2
𝑘=1

𝑁
𝑇 𝑏𝑖
𝐽= 𝑤𝑘 (1 − 𝑣𝑘𝑏 𝑅 𝑣𝑘𝑖
𝑘=1
QUEST [Shuster & Oh, 1981]
And maximizes the gain function g
𝑁
𝑇 𝑏𝑖
𝑔 𝑅 = 𝑤𝑘 (𝑣𝑘𝑏 𝑅 𝑣𝑘𝑖 = 𝜆𝑜𝑝𝑡
𝑘=1
Rearranging these two expressions provides a useful result that
the optimum eigenvalue is related to J (to be minimized)
𝜆𝑜𝑝𝑡 = ∑𝑤𝑘 − 𝐽

For the best attitude solution, J should be small and


𝜆𝑜𝑝𝑡 ≈ ∑𝑤𝑘

In the QUEST method one adopts this value for the 𝜆𝑜𝑝𝑡
QUEST [Shuster & Oh, 1981]
To obtain the optimal eigenvector (quaternion). One possible
solution is obtained using Rodriquez parameters p

𝑞 Φ
𝑝= = 𝑎 atan
𝑞4 2

The eigenvalue problem is arranged and becomes


𝑝= 𝜆+𝜎 𝟏−𝑆 −1 𝑍

This expression still has a difficulty to inverse. Other way is to


solve (using Gaussian elimination) the equation

𝜆+𝜎 𝟏−𝑆 𝑝 =𝑍
QUEST [Shuster & Oh, 1981]
The quaternion is obtained using the Rodriquez parameters in the
form given by

1 𝑝
𝑞=
1 + 𝑝𝑇 𝑝 1

Comment:
One problem with this approach is that the Rodriguez parameters
become singular when the rotation is π radians. Shuster and Oh
have developed a method of sequential rotations which avoids
this singularity Ref. 9

Example 4.4 One repeats Example 4.3 using the QUEST method.
Some references
• M. D. Shuster and S. D. Oh, “Three-Axis Attitude
Determination from Vector Observations,” Journal of
Guidance and Control, Vol. 4, No. 1, 1981, pp. 70–77.
• E. J. Lefferts, F. L. Markley and M. D. Shuster, “Kalman Filtering
for Spacecraft Attitude Estimation,”. Journal of Guidance,
Control and Dynamics, Vol. 5, No. 5, 1982.
• Roberto Alonso and Malcolm D. Shuster, “TWOSTEP, a Fast
Robust Algorithm for Attitude-Independent Magnetometer
Bias Determination,” The Journal of the Astronautical
Sciences, Vol. 50, No. 4, 2002, pp. 433–451.
• James R. Wertz (Editor), "Spacecraft Attitude Determination
and Control", Springer, 1978.
• Vincent L. Pisacane (Editor), "Fundamentals of Space
Systems", Oxford Univ Press, 2005

Você também pode gostar