Problemcore
Wahba's problem
Also called optimal attitude from vector observations.
Find the rotation that best maps a set of reference unit vectors to their measured body frame directions in weighted least squares.
Wahba's problem asks for the rotation that best explains a set of direction measurements. A spacecraft or a robot knows some directions in a reference frame, for example the direction to the Sun and the local magnetic field from a model, and it measures the same directions in its own body frame. The rotation from the reference frame to the body frame is its attitude. With noise, no rotation matches all pairs, so Wahba (1965) asked for the rotation with the least weighted sum of squared errors. The problem has an exact solution as an eigenvector of a matrix (Davenport's q-method) or from a singular value decomposition, and a fast iterative one (QUEST). The rotation step of optimal superposition in structural biology is the same problem with vectors that are not unit: the Kabsch algorithm and quaternion superposition solve it there, and this page links them rather than repeating them.
In plain words
You stand in a field at night and see two known stars. You know where those stars are on a sky map, and you see where they are relative to your own head. From this you can work out which way you are facing. With perfect eyes, two stars are enough and the answer is exact. Real sensors are noisy, so the directions you see do not fit any single way of facing. Wahba's problem asks for the way of facing that fits all the seen directions best, with more trust given to the better sensors. "Best" means that the sum of the squared misses is as small as possible. The problem looks hard because a rotation is a constrained object, but it has a clean exact answer.
Definition
Data. Unit vectors in the reference frame, unit vectors in the body frame, and weights . The model is , where the attitude matrix is in the special orthogonal group . In the notation of rigid-body motion, .
Task. Find
The gain form. For unit vectors, . With and the attitude profile matrix ,
so the problem is to maximize the linear function over . All the data enter through the matrix . This identity holds exactly; it is the first step of every known solution.
Constraint. must be a rotation, not only an orthogonal matrix. Without the condition , the answer can be a reflection, which no rigid body can perform.
Variants
- Two vectors, one exact. The TRIAD method uses exactly two pairs and matches the first one exactly. It does not minimize .
- Non-unit vectors. If the and have any lengths, the loss is still a constant minus with the same , so every solution below still applies. This is the centered form of optimal superposition.
- Weights from noise. Shuster and Oh (1981) chose as the inverse variance of a sensor noise that is small and symmetric about the true direction. Then is a maximum likelihood estimate, and the inverse of the Hessian of at is the covariance of the attitude error.
- Dynamic. When the body turns between measurements and a gyro is available, the static problem becomes a filtering problem; see attitude estimation.
Examples
Exact data. Let , with , and let the true be the rotation by degrees about , the matrix with rows , , . Then has rows , , , so and . Every method recovers this , and the minimum loss is .
Two noisy vectors. Keep but tilt by degrees toward : . Now the measured angle between the two directions is degrees, while the reference angle is degrees, so no rotation fits both. TRIAD with first fits exactly and misses by degrees, at loss . The optimal rotation misses each vector by degree, at loss , half the loss of TRIAD. The q-method page computes this answer step by step.
No unique answer. If all are parallel, every rotation about that direction fits equally well, and the minimizer is a whole circle of rotations.
Known algorithms
- TRIAD method. Two pairs only, closed form, . Exact for noise-free data, not optimal with noise.
- Davenport's q-method. The optimal attitude is the unit quaternion that is the eigenvector of the largest eigenvalue of a symmetric matrix built from . to build , then one symmetric eigenproblem.
- QUEST. Finds the largest eigenvalue of by Newton's method on its characteristic polynomial, starting from , and the eigenvector from a closed-form adjugate column. plus a few Newton steps.
- SVD method. With the singular value decomposition , the optimum is (Markley, 1988). The Kabsch algorithm is the same formula for point sets.
- Faster closed forms. FOAM and ESOQ avoid the eigensolver with other closed forms; Markley and Mortari (2000) compare them with QUEST for speed and robustness.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Davenport's q-method | O(n) worst | O(1) extra | deterministicexactofflineiterative | 1 language |
| QUEST algorithm | O(n + k) worst | O(1) extra | deterministicexactofflineiterative | 1 language |
| TRIAD method | O(1) worst | O(1) extra | deterministicnot exactofflineiterative | 1 language |
Bounds
- Exact recovery (theorem). If the data are exact, , and at least two are not parallel, then is the unique minimizer and . Proof: and , and a rotation that fixes two independent directions is the identity.
- Range of the loss (theorem). , where is the largest eigenvalue of ; see the proof on the q-method page.
- Uniqueness (theorem). The minimizer is unique if and only if is a simple eigenvalue of . If has rank at most , as when all are parallel, the minimizer is not unique.
- Cost. Any algorithm must read all pairs, so time. The q-method, QUEST and the SVD method reach , because after is formed the remaining work is on a matrix of fixed size.
Reductions
- To a linear objective. Wahba's problem is equivalent to maximizing over ; only matters.
- To a symmetric eigenproblem. With written by a unit quaternion , , a quadratic form, so the problem becomes the symmetric eigenproblem for the largest eigenvalue of . This is the q-method.
- To an SVD. Maximizing over rotations is solved by the SVD of , with a sign fix that turns a reflection into a rotation.
- From optimal superposition. After both point sets are centered, the rotation of least RMSD solves Wahba's problem with and the centered points and all weights . So the algorithms of one field solve the other.
Applications
- Spacecraft attitude from star trackers, Sun sensors and magnetometers, where Wahba's problem was first posed.
- The attitude of a drone or a phone from gravity and the magnetic field when it is not accelerating, often as the measurement step inside a filter.
- Registration of point sets in computer vision and structural biology, by the reduction from superposition.
References
- Grace Wahba, A least squares estimate of satellite attitude, SIAM Review 7(3), 1965, page 409, the problem statement (Problem 65-1)
- F. Landis Markley and John L. Crassidis, Fundamentals of Spacecraft Attitude Determination and Control, Springer, 2014, Chapter 5 (static attitude determination methods)
- F. Landis Markley and Daniele Mortari, Quaternion attitude estimation using vector observations, Journal of the Astronautical Sciences 48(2-3), 2000, pages 359 to 380, the survey of solutions of Wahba's problem: the q-method, QUEST, the SVD method and the faster methods
- F. Landis Markley, Attitude determination using vector observations and the singular value decomposition, Journal of the Astronautical Sciences 36(3), 1988, pages 245 to 258, the solution of Wahba's problem from the singular value decomposition of the attitude profile matrix
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 3MK9DJ Edit this page History Report an error Markdown