Spacecraft attitude determination and control
How satellites know which way they point and turn to where they need to look: rotations, dynamics, sensors, estimation, actuators and control, ending in a complete CubeSat design. Every number checked by a script.
Free preview: chapter 1 of 18, complete. The full course: 18 chapters · 39 worked examples · 54 practice problems · 2079 script checks.
How to use this pack
- 1Read 'The idea in one minute' and the 'You will be able to' list.
- 2Work through the short sections and the worked examples with a pencil.
- 3Try each practice problem before opening the hint; open the full solution only to check.
- 4Do the three-question check and the spaced recap before moving on.
What is in the full course
- 1Frames and direction cosine matricesFree preview30 min
- 2Euler angles and gimbal lock30 min
- 3Quaternions40 min
- 4Attitude kinematics30 min
- 5The inertia tensor and principal axes35 min
- 6Euler's equations and spin stability40 min
- 7Disturbance torques40 min
- 8Sun sensors, Earth sensors and magnetometers35 min
- 9Star trackers and gyros40 min
- 10Attitude determination: TRIAD, Wahba, QUEST45 min
- 11Kalman filtering for attitude45 min
- 12Actuators: wheels, CMGs, magnetorquers, thrusters40 min
- 13Feedback control: PD, bandwidth and settling40 min
- 14Detumbling, momentum management and slews45 min
- 15Stabilisation modes: spin, gravity gradient, three-axis40 min
- 16Pointing budgets: knowledge versus control35 min
- 17CubeSat ADCS and testing on the ground35 min
- 18Worked mission case: a 6U imager end to end50 min
This preview is chapter 1, complete. Your ticks are saved in this browser only. Original work, and a study aid, not assignment answers.
Frames and direction cosine matrices
Attitude is the answer to one question: how is the satellite turned relative to something we care about? We describe it by two sets of axes, one fixed to the reference (the stars, or the orbit) and one fixed to the body. The direction cosine matrix is a 3 × 3 table of the cosines between those axes. Multiply a vector by it and you get the same vector seen from the other frame.
You will be able to
- Name the frames ADCS uses: inertial, orbit (LVLH) and body
- Write a direction cosine matrix and use it to change a vector's frame
- Combine rotations in the right order and pull the axis and angle out of a DCM
Three frames
The inertial frame I points at fixed stars (ECI, J2000). The orbit frame O moves with the satellite: z to nadir, x roughly along the velocity, y opposite the orbit normal. The body frame B is glued to the structure. Pointing requirements are usually written as a body attitude relative to I or O.
The DCM
ABI maps components: vB = ABI vI. Its rows are the body axes in inertial components; its columns are the inertial axes in body components. It is orthonormal (A Aᵀ = I) with determinant +1, so its inverse is just its transpose.
Combining rotations
To go from I to B and then from B to C, multiply: ACI = ACB ABI. The newest rotation goes on the left. Order matters: two 90° turns in different orders give different attitudes.
Euler's theorem
Any rotation, however it was built, equals one rotation by an angle a about one fixed axis e. The trace of the DCM gives the angle, tr A = 1 + 2 cos a. That axis and angle reappear in quaternions (Chapter 3).
Key equations
where
where
So A⁻¹ = Aᵀ: going back is free.
The newest rotation goes on the left.
where
R₁ and R₂ follow the same pattern about x and y.
where
Worked examples
The same Sun, seen from a turned satellite
Given
A satellite's body frame B starts aligned with the inertial frame I, then turns by 30° about the shared z axis. The Sun lies along the inertial x axis, vI = (1, 0, 0). Write the DCM ABI and find the Sun direction in body axes.
new symbols
Working
- A frame rotation by ψ about z is R₃(ψ) = [cos ψ sin ψ 0; −sin ψ cos ψ 0; 0 0 1]
- With ψ = 30°: ABI = [+0.866 +0.500 +0.000; -0.500 +0.866 +0.000; +0.000 +0.000 +1.000]
- vB = ABI vI = first column of A = (0.866, -0.500, 0.000)
- Check: A Aᵀ = I and det A = 1.000, so A is a proper rotation
Answer. vB = (0.866, -0.500, 0.000): the Sun now sits 30° on the negative-y side of the body x axis.
Sanity check. Turn the frame one way and a fixed vector appears to turn the other way. That sign flip is the most common error in attitude work.
A_BI = [[ 0.866 0.5 0. ] [-0.5 0.866 0. ] [ 0. 0. 1. ]] v_B = (0.866, -0.500, 0.000) det A = 1.000
Rotations do not commute
Given
Turn a frame 90° about z then 90° about the new x axis. Compare with doing the two turns in the opposite order. Where does the inertial x direction end up in each case?
new symbols
Working
- Successive frame rotations multiply on the left: first R₃, then R₁ gives A = R₁(90°) R₃(90°)
- A = [+0 +1 +0; -0 +0 +1; +1 -0 +0], so vB = A (1, 0, 0) = (0, -0, 1)
- Opposite order: A' = R₃(90°) R₁(90°) = [+0 +0 +1; -1 +0 +0; +0 -1 +0], so vB' = (0, -1, 0)
- The two results differ by 90°
Answer. z then x gives (0, -0, 1); x then z gives (0, -1, 0). Same two turns, different attitude.
Sanity check. Finite rotations are not vectors: you cannot add them. That is why attitude needs matrices or quaternions, and why the order of an Euler sequence must always be stated.
z then x: v_B = (0, -0, 1) x then z: v_B = (0, -1, 0) angle between the results = 90 deg
Practice
Write the DCM from the body axes
Given
A star tracker reports that the body x axis points along inertial (0, 1, 0) and the body y axis along inertial (0, 0, 1). Find the body z axis, write ABI, and express the Sun direction sI = (0.6, 0.8, 0) in body axes. Which body face does the Sun light most?
The rows of ABI are the body axes written in inertial components. Get z from z = x × y.
Answer. zB = (1, 0, 0) (inertial), sB = (0.8, 0.0, 0.6); the +x face sees the Sun most, at 36.9° from its normal.
Working
- zB = xB × yB = (0, 1, 0) × (0, 0, 1) = (1, 0, 0)
- ABI = rows (xB; yB; zB) = [+0 +1 +0; +0 +0 +1; +1 +0 +0]
- sB = ABI sI = (0.8, 0.0, 0.6)
- Largest component is along +xB
Answer. zB = (1, 0, 0) (inertial), sB = (0.8, 0.0, 0.6); the +x face sees the Sun most, at 36.9° from its normal.
Sanity check. |sB| = 1 still: a rotation never changes a length. A non-unit result means a typing error in A.
z_B = (1, 0, 0) s_B = (0.8, 0.0, 0.6) Sun is 36.9 deg from the +x face normal
Find the single rotation hidden in a DCM
Given
A DCM is A = [+0.6825 +0.5901 -0.4313; -0.4313 +0.8015 +0.4141; +0.5901 -0.0966 +0.8015]. Find the angle and axis of the single rotation it represents.
The trace gives the angle: tr A = 1 + 2 cos a. The antisymmetric part gives the axis.
Answer. a = 50.0° about e = (0.333, 0.667, 0.667) = (1, 2, 2)/3.
Working
- tr A = 2.2856, so cos a = (tr A − 1)/2 = 0.6428 and a50.00°
- Axis e = (A₂₃ − A₃₂, A₃₁ − A₁₃, A₁₂ − A₂₁) / (2 sin a)
- = (0.5107, 1.0214, 1.0214) / 1.5321 = (0.3333, 0.6667, 0.6667)
- |e|1.0000
Answer. a = 50.0° about e = (0.333, 0.667, 0.667) = (1, 2, 2)/3.
Sanity check. The axis comes out with unit length without forcing it, which confirms the matrix is a clean rotation.
A = [[ 0.6825 0.5901 -0.4313] [-0.4313 0.8015 0.4141] [ 0.5901 -0.0966 0.8015]] angle a = 50.00 deg axis e = (0.3333, 0.6667, 0.6667), |e| = 1.0000 3 e = (1, 2, 2), so e = (1, 2, 2)/3
Build the orbit frame a nadir-pointer flies in
Given
The reference satellite is in a circular 550 km orbit, inclination 97.6°, right ascension of the ascending node 0°, at argument of latitude 40°. Build the orbit (LVLH) frame: z towards nadir, y opposite the orbit normal, x completing the triad. Write AOI and find the inertial x direction (where the Sun is on 21 March, roughly) in orbit-frame components.
Position: rI = r R₁(i)ᵀ (cos u, sin u, 0). Velocity is perpendicular. Then z = −r̂, y = −(r × v)/|r × v|, x = y × z.
Answer. AOI = [-0.643 -0.101 +0.759; +0.000 +0.991 +0.132; -0.766 +0.085 -0.637]; the inertial x direction is (-0.643, 0.000, -0.766) in the orbit frame.
Working
- r = RE + h = 6928.1 km; rI = (5307.3, -589.0, 4414.2) km
- v = √(μ/r) = 7585.1 m/s; vI = (-4875.6, -768.5, 5759.5) m/s
- zO = −r̂ = (-0.766, 0.085, -0.637); yO = −(r × v)/|r × v| = (0.000, 0.991, 0.132); xO = y × z = (-0.643, -0.101, 0.759)
- AOI = [-0.643 -0.101 +0.759; +0.000 +0.991 +0.132; -0.766 +0.085 -0.637]
- Check: xO · v̂ = 1.000000 (x is along the velocity), det1.000000
- sO = AOI (1, 0, 0) = (-0.643, 0.000, -0.766)
Answer. AOI = [-0.643 -0.101 +0.759; +0.000 +0.991 +0.132; -0.766 +0.085 -0.637]; the inertial x direction is (-0.643, 0.000, -0.766) in the orbit frame.
Sanity check. Every row is a unit vector and the rows are mutually perpendicular. A nadir-pointing satellite holds ABO = I, so this is also its attitude.
r_I = (5307.3, -589.0, 4414.2) km, v = 7585.1 m/s A_OI = [[-0.643 -0.101 0.759] [ 0. 0.991 0.132] [-0.766 0.085 -0.637]] x_O . v_hat = 1.000000, det = 1.000000 s_O = (-0.643, 0.000, -0.766)
Common mistakes
- Using Aᵀ where A is needed. Write the frame subscripts (ABI takes I to B) and cancel them like units.
- Mixing active rotations (turn the vector) and frame rotations (turn the axes). They are transposes of each other.
- Multiplying rotations in the wrong order. The newest rotation goes on the left.
- Reading columns as body axes. The rows of ABI are the body axes.
Check yourself
Sources for this chapter
- R13Markley, F. L., Attitude Determination Using Vector Observations: A Fast Optimal Matrix Algorithm, NASA GSFC (1993)
- R14Markley, F. L., Attitude Representations for Kalman Filtering, AAS 01-309 (2001)
Where in each source, and links: References.
17 more chapters in the full course
The full Spacecraft attitude determination and control course continues with 17 more chapters (665 minutes of study and 51 more graded problems), the formula sheet, the glossary, every assumption with its source, and a printable PDF. It comes with the founding membership.
Founding membershipFounding membership opens soon. Join the free weekly email to hear first.
Answers
| Problem | Answer |
|---|---|
| A1.1 | zB = (1, 0, 0) (inertial), sB = (0.8, 0.0, 0.6); the +x face sees the Sun most, at 36.9° from its normal. |
| A1.2 | a = 50.0° about e = (0.333, 0.667, 0.667) = (1, 2, 2)/3. |
| A1.3 | AOI = [-0.643 -0.101 +0.759; +0.000 +0.991 +0.132; -0.766 +0.085 -0.637]; the inertial x direction is (-0.643, 0.000, -0.766) in the orbit frame. |
References
Every reference the pack cites. "Where" names the section, table or page that holds the cited value; an entry says so when the source was not read in full or is not openly available.
| Id | Reference |
|---|---|
| R13 | Markley, F. L., Attitude Determination Using Vector Observations: A Fast Optimal Matrix Algorithm, NASA GSFC (1993)Where: Wahba's problem, optimal matrix solution, comparison with TRIAD (NASA NTRS record)https://ntrs.nasa.gov/citations/19930015542Cited in: Chapter 1 |
| R14 | Markley, F. L., Attitude Representations for Kalman Filtering, AAS 01-309 (2001)Where: Multiplicative (MEKF-style) attitude error with norm-preserving quaternion reset (NASA NTRS record)https://ntrs.nasa.gov/citations/20010067774Cited in: Chapter 1 |
The references cited by this preview. The full course lists every source it uses.