Professional Documents
Culture Documents
Spacecraft
Aero-Astro 16.322 Stochastic Estimation and Control
Final Project
Created By
Duncan Miller
December 5, 2014
Abstract
This paper presents filtering solutions for estimating the relative trajectory of a spin stabilized satellite. The
SPHERES satellites have been selected as the hardware testbed for implementing a Multiplicative Extended
Kalman Filter and novel Multiplicative Unscented Kalman Filter. Relative state measurements are provided by
imaging fiducial markers on the target. The results from this analysis show that when the dynamic nonlinearities
and non-Gaussian noises are NOT ignored, the Unscented Kalman Filter performs measurably better than the
MEKF. In future ISS test sessions, an Unscented Kalman Filter is expected to now be implemented in order to
improve satellite estimation and increase the probability of successful satellite docking.
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
Contents
1 Project Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Instantiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Project Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4 Measurement Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5 Multiplicative Extended Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5.1 Reparameterize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5.2 Linearize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5.3 Propagate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5.4 Measurement Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6 Unscented Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7 Noise Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.1 Process Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.2 Random Measurement Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
7.3 Type I Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
7.4 Type II Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
8 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
8.1 Representative Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
8.2 Representative Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.3 Modeling Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8.4 Montecarlo Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
9 Hardware Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
10 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
A Additional Mathematical Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
A.1 Quaternion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
A.2 Inertia Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
A.3 Full Linearization of the Euler Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
B Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
C Additional Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
C.1 Additional Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
C.1.1 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
C.1.2 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
C.2 Hardware Testing Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2014Dec5 0
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
1.1 Instantiation
The Synchronized Position Hold Engage Reorient Satel-
lites (SPHERES) has been selected as a platform for
this investigation. SPHERES is an on-orbit controls Figure 3: The proposed concept of operations for relative
testbed operated inside the ISS that provides long du- pose estimation.
2014Dec5 1
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
2 Project Scope A.1. ω defines the body-fixed rotation rates of the tar-
get relative to the inertial observer. The assembled state
For this project, I have developed a six degree of freedom vector to be estimated is collected as x.
stochastic simulator of a rigid body spacecraft. With this
we explore the performance of two filters in the presence
of nonlinear dynamics and non-Gaussian random noise in r = [rx ry rz ]T (1)
both simulation and real hardware: T
v = [vx vy vz ] (2)
1. A Multiplicative Extended Kalman Filter q = [q1 q2 q3 q4 ]T (3)
2. An Unscented Kalman Filter using the same Mul- T
ω = [ωx ωy ωz ] (4)
tiplicative parameterization of quaternions
x = [r v q ω]T (5)
This project is of intellectual merit for three reasons.
First, it is relevant to the class material covered this The second order dynamics can be rewritten as a set of
semester. I first researched the 6DOF equations of mo- first order differential equations. The continous time,
tion for a free-floating satellite. Then I formulated the stochastic, nonlinear dynamics are collected as follows.
dynamics as a 13-state time-varying estimation problem The process noise (Wv and Wω ) enter as acceleration
that can be reparameterized as a 12-state system which inputs on v̇ and ω̇. Although the forces and torques
preserves the quaternion norm. Second, this project tack- from the spacecraft thrusters are included in the conti-
les both the nonlinearities in dynamics and non-Gaussian nous time dynamics, they are dropped as 0 in the scope
random noise in measurements. This is necessary in order of this project. Thus, we describe the free floating non-
to measure the performance of the two filters being con- linear dynamics of a tumbling spacecraft as [3] [1]
sidered. Finally, the results presented herein consist of
Montecarlo simulations and real world data to show that ṙ = v (6)
the designed filters work effectively. Using this knowl-
1
edge, the filtering techniques will be applied directly to v̇ = (Wv + FT ) (7)
the SPHERES testbed on the International Space Station m
in the scope of a grander mission. 1 1 ω
q̇ = Ω(ω)q = ⊗q (8)
2 2 0
This project delivers (1) a stochastic propagator of non- ω̇ = J−1 (−ω × Jω + Wω + FR ) (9)
linear 6DOF dynamics, (2) a custom visualization of
the simulated state, (3) results and conclusions from Where we have defined J as the moment of inertia tensor
both simulated and hardware filtering, (4) an auto-coded along the geometric axes of the SPHERES. The definition
version of both filters for integration onto a real-world of the inertia tensor is covered in Appendix A.2.
testbed, (5) a body of Matlab code, plots, and config files
generated for this assignment. Ixx −Ixy −Ixz
J = −Iyx Iyy −Iyz (10)
−Izx −Izy Izz
3 Dynamics
The state of a spacecraft in inertial space can be rep- For convenience, I have introduced the outer-product ma-
resented as a 13 element state vector consisting of posi- trix for quaternion kinematrics as
tion, velocity, attitude and rotation rate elements. For
a six degree-of-freedom spacecraft, this representation is
0 −ω3 ω2 ω1
sufficient to model trajectories, disturbances, and control ω3 0 −ω1 ω2
inputs without any ambiguity. In the scope of the project Ω(ω) = −ω2 ω1
(11)
0 ω3
presented herein, the state to be estimated is a relative
−ω1 −ω2 −ω3 0
state. The position, velocity, attitude and rotation are
defined relative to an inertially fixed observer.
In addition, the cross product matrix [ω×] condenses the
Thus, r is the x,y,z displacement vector from the observer notation for subsequent state space representations.
to the target. v is the x,y,z velocty of the target relative to
the observer. q is a quaternion transform that relates the 0 −ω3 ω2
orientation of the observer’s frame to the target’s frame. [ω×] = ω3 0 −ω1 (12)
The definition of a quaternion is reviewed in Appendix −ω2 ω1 0
2014Dec5 2
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
4 Measurement Modeling the full state (including velocities) that filters out mea-
surement and process noise. The MEKF is reviewed
The measurement inputs to the filter are the position and herein.
quaternion of the target relative to the observer’s cam-
era frame. The observer is assumed to be inertially still The continous, nonlinear dynamics (as defined in Section
and has the role of identifying and tracking the tumbling 3) can be expressed in general as a stochastic nonlinear
spacecraft prior to docking. differential equation and nonlinear measurement equation
with the following notation.
r̄
yk = k (13)
σ̄k ẋ = f (x, t) + Bw w (14)
These measurements are the output of Haralick’s exte- y = h(x) + v (15)
rior orientation problem. The methodology is derived in
Tweddle 2010 [8] for a monochrome camera. Although 5.1 Reparameterize
out of the scope of this project, I have expanded on these
The discrete-time Extended Kalman Filter (EKF) has
principles for an RGB solution, which is what has been
been introduced to account for nonlinearities in the dy-
applied in Section 9. It has been shown that unique iden-
namic model. The nonlinear dynamics (expressed as f )
tification of four points on a plane is sufficient to deter-
can be linearized at every time step around the current
mine the translation (r) and rotation (q) between the
best estimate. In this way, the same optimality prinicples
observer and target frames without ambiguity.
employed for the traditional Kalman filter can be used
for nonlinear systems to drive the estimation error to zero.
The solution to the exterior orientation problem is ob- In this way, the zero vector (σ = 0) represents no error
tained by solving a least squares, iterative, nonlinear (the goal). The Modified Rodrigues Parameterization
equation. In addition to the solution, a mean squared is valid for angle errors less than a full rotation. This
reprojection error is also obtained with is proportional to is adequate since the error quaterion is reset to 0 after
the confidence of the estimate. This is detailed further in every measurement update.
Section 7 but in the end, the measurements are treated
as given for the purposes of this project. The MRPs can be calculated from each measurement by
determing the quaternion product of the measurement
and the complex conjugate of the current state estimate.
5 Multiplicative Extended Kalman
σ̄k−1 = q̄k ⊗ q∗refk−1 (18)
Filter
Also, at the end of each iteration, once the MRPs have
A Multiplicative Extended Kalman Filter (MEKF) has been filtered, the current best estimate of the target’s
been implemented to estimate the full state dynamics of quaternion can be recovered by taking the quaternion
the spin stabilized satellite. Since measurements are only product of the error quaterion and the previous estimate.
position and attitude, the information from the dynamic
equations can be used to obtain a smoothed estimate of qk = δq(σk ) ⊗ qrefk−1 (19)
2014Dec5 3
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
To apply the discrete MEKF equations, we must des- Lk = Qk|k−1 CTd [Cd Qk|k−1 CTd Rk ]−1 (42)
critize the dynamics to obtain Ad and Wd . x̂k|k = x̂k|k−1 + Lk (yk − hk (x̂k|k−1 )) (43)
Z ∆t
Qk|k = (I − Lk Cd )Qk|k−1 (44)
xk = eA∆t xk−1 + eAτ Bw wdτ (29)
0
However, in implementing the above equations, I oc-
xk = Ad xk−1 + wk (30) casionally encountered numerical stability issues when
2014Dec5 4
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
The propagated sigma points x̂ik can be used to obtain The process noise has been modeled as Gaussian white
a better approximation of the propagated mean and co- noise. For an orbiting spacecraft it can include micro-
varience. forces such as solar pressure, gravity gradients and at-
mospheric drag. However, in the instantiation of this es-
2n timation problem (i.e. SPHERES inside of the Interna-
1 X i
x̂k|k−1 = x̂k (50) tional Space Station) there are air drafts from circulating
2n i=1
fans that provide the largest magnitude disturbances. To
2n
1 X i make the results the most interesting, this is what has
Qk|k−1 = (x̂k − x̂k|k−1 )(x̂ik − x̂k|k−1 )T + wk−1 been modeled.
2n i=1
(51)
E[Wv (τ1 )Wv (τ2 )T ] = Wc1 δ(τ1 − τ2 ) (62)
New sigma points can be generated to obtain a more accu- T
E[Wω (τ1 )Wω (τ2 ) ] = Wc2 δ(τ1 − τ2 ) (63)
rate measurement prediction. In the scope of this project,
the measurement update equation is linear and this step E[Wv (τ1 )Wω (τ2 )T ] = 03×3 (64)
2014Dec5 5
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
7.2 Random Measurement Noise is the same, Figure 6 shows that the same pixel noise
w results in a larger angle noise in the second and third
Three families of measurement noise have been imple-
Euler angles. A small angle approximation provides the
mented in order to achieve the most realistic performance
following relation.
of the filters. First, the traditional random noise has been
included in the measurements. However, the noise on d−w w
cos θw = =1− (66)
the measurements has been modeled as nonlinear/non- d d
Gaussian. Due to nonlineararities in both the dynamics 2
θw w
and (now) the measurements we can conclude that the cos θ w ≈ 1 − =1− (67)
2 d
MEKF will not be an unbiased estimator for this problem. r
2w
θw , ψw ≈ (68)
d
The derivation for the nonlinear noise measurements be-
gins with assumption that the positions of the fiducial
markers on the image plane suffer from small Gaussian
noise perturbations. That is, the true pixel position of
the concentric circles can be distrubed normally with
some variance that is a function of the atmospheric light-
ing, image blur, software threasholding and CMOS noise.
However, we can conclude that there is a nonlinear trans-
form from pixel noise to quaternion measurement noise
in two of the three axes.
2014Dec5 6
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
falsely identifies a blob as a fiducial marker. This can Due to the conflicting units between states, some states
result in a measurement that may be significantly offset have smaller or larger variances. The matrices were se-
from the current state estimate. In the simulation, this lected based on expected disturbances. I also note that R
has been emulated by increasing the variance of the dis- is a function of η 2 , an output of the exterior orientation
crete random noise by a factor of 5 approximately 5% of problem and generally small (≈ 0.005).
the time.
Athough the filters presented herein do not actively per-
form outlier rejection, I chose to model this in the system
in order to make conclusions on the robustness of the fil-
ter.
rx ry
8 Simulation Results 1.5 0.2
1 Meas
Position (m)
Position (m)
The scenario studied is a spin stabilized case about the MEKF
0.1
x-axis of the target SPHERES satellite. The intial condi- 0.5 UKF
0
tions ensure that the SPHERES is aligned with the fidu- 0
Meas
cials pointed roughly towards the camera and the prod- −0.5
−0.1
MEKF
UKF
ucts of inertia of the SPHERES ensure that the nonlinear −1 −0.2
0 5 10 15 20 0 5 10 15 20
dynamics are interesting. Time (s) Time (s)
rz
r0 = [1 0 0]T m (70) 0.3
T
v0 = [−0.1 0 0] m/s (71) 0.2 Meas
Position (m)
MEKF
T
q0 = [0 0 1 0] (72) 0.1 UKF
T 0
ω0 = [0.1 − 0.02 − 0.0001] rad/s (73)
−0.1
x0 = [r0 v0 q0 ω0 ]T (74)
−0.2
0 5 10 15 20
In the scenario considered, I have propagated for 20 sec- Time (s)
onds with a time step of 0.01. Longer times were also
studied and the results were comparable. The noise co- Figure 7: Representative tracking of position states with
variances, R and Wc , were also varied. In the presented full noise modeling.
solution, I have set
2014Dec5 7
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
r
x
r
y
ω ω
x y
1 Meas Truth
Position (m)
Position (m)
0.1 0.2
MEKF MEKF
1
0.5 UKF UKF
0 0
0
Meas 0.5 Truth
−0.1 −0.2
−0.5 MEKF MEKF
UKF UKF
−1 −0.2 0 −0.4
0 5 10 15 20 0 5 10 15 20 0 5 10 15 20 0 5 10 15 20
Time (s) Time (s) Time (s) Time (s)
rz ωz
0.2 Meas
Position (m)
0
MEKF
0.1 UKF
−0.2
0
Truth
−0.4
−0.1 MEKF
UKF
−0.2 −0.6
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
Figure 8: Representative tracking of velocity states with Figure 10: Representative tracking of angular velocity
full noise modeling. states with full noise modeling.
The merits of the Unscented Transform manifest them- 8.2 Representative Errors
selves in the estimation of the nonlinear rotational dy-
namics with non-Gaussian noise. In Figure 22, it can be In this section, we plot the estimation errors relative to
seen that the magnitude of the noise varies periodically. the known truth states. The UKF performs better across
Since this plot is busy and small, a larger version is re- the board in the nonlinear states. It is noted that the
produced in the Appendix and the error vector is plotted UKF does suffer from higher frequency errors in the initial
in Figure 11. few steps compared with the MEKF but this is eventually
smoothed out for the better.
q1 q2
0.4 1
q1 Error q2 Error
0.1 0.06
0.2 Meas
Quaternion
Quaternion
Quaternion
0.5 0.5
MEKF MEKF
UKF 0.02 0.04
UKF
0 0
0.01 0.02
Meas
−0.5 −0.5 0 0
MEKF
UKF
−1 −1 −0.01 MEKF −0.02
0 5 10 15 20 0 5 10 15 20
UKF
Time (s) Time (s) −0.02 −0.04
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
Figure 9: Representative tracking of quaternion states
with full noise modeling. Figure 11: Representative quaternion error with full noise
modeling.
It can be seen that the MEKF suffers from higher fre-
quency, larger magnitude oscillations in the ω estimate The effects of the Type I errors get smoothed and inte-
compared to the UKF. grated into the angular rate estimates. It can be seen that
2014Dec5 8
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
Quaternion
0.05
much better than the MEKF from Type I errors.
0
Meas
−0.05
MEKF
UKF
−0.1
0 2 4 6 8 10 12 14 16 18 20
Time (s)
q1 Error
ωx Error ωy Error 0.06
Rotation Rate (rad/s)
0.5 0.5
MEKF MEKF
0.04
UKF UKF
0.02 MEKF
0 0 UKF
−0.02
0 2 4 6 8 10 12 14 16 18 20
−0.5 −0.5
0 5 10 15 20 0 5 10 15 20 Time (s)
Time (s) Time (s)
ωz Error Figure 13: Representative angular velocity error with full
Rotation Rate (rad/s)
0.5
MEKF
noise modeling.
UKF
0
In a second noise variation investigation, I changed the
noise covariances within the filters by a factor of two rel-
ative to the true W and R. In a real world filter, the
−0.5 process noise and measurement noise intensities will not
0 5 10 15 20
Time (s) be known exactly. In fact, they may be different by a
factor of 2 or more. I ran the MEKF and UKF filters and
Figure 12: Representative angular velocity error with full both demonstrated robustness to variation.
noise modeling.
q1
0.2
Quaternion
0.1
Meas
−0.1
MEKF
UKF
−0.2
0 2 4 6 8 10 12 14 16 18 20
Time (s)
q1 Error
0.03
MEKF
0.02
UKF
−0.01
−0.02
0 2 4 6 8 10 12 14 16 18 20
Time (s)
As an itellectual exercise, I have also moldeled the system
with varying degrees of noise to better understand the Figure 14: Representative angular velocity error with full
robustness of the controllers. First, I considered a simpli- noise modeling.
fied white noise case where the noise on the quaternion
measurement is directly white (does not undergo the non-
8.4 Montecarlo Simulation
linear transform described previously). In addition there
are no Type I errors. In this case the MEKF and UKF Since a single filter run is based on stochastic noise, it is
perform nearly identically. natural to perform a Montecarlo simulation in order to
2014Dec5 9
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
0.16
UKF
0.14
0.12
0.1
0.08
0.06
Figure 16: One instant of a measurement solution (target
is locked)
0.04
0.02
0
1 2 3 4 5 6 7 8 9 10 11 12 13
State Number
2014Dec5 10
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
Position (m)
0.1
UKF UKF
0.2
Meas Meas
0 0.18
−0.1
0.16
0.14
10 Summary and Conclusions
−0.2 0.12
0 2 4In this report, we have investigated the performance
6 8 0 2 4 6 8
Time (s) Time (s)
of two strategic filtering methods: a Multiplicative Ex-
rz
0.25 4
x 10 MEKF − UKF tended Kalman Filter (MEKF) and a Muliplicative Un- −5
0.2 2
Position (m)
Just by visual inspection of the video capture, it is clear The results from this project have direct application on
that the rotation rates are small and do not vary by more upcoming SPHERES test session on the ISS. Future work
than 10% throughout the run. However, the MEKF esti- on this project will address some simplifications and as-
mator exhibits high estimate oscillations in comparison to sumptions necessarily made here for simplicity.
the UKF until converging to a more reasonable solution.
• Actuator Modeling: The external forces and torques
generated by the satellites have been neglected in
ω1 ω2
this analysis. In the future if this filter is used dur-
Rotation Rate (rad/s)
3 5
2 3
UKF
1 1 expected to be marginally different than the pro-
0.5 0 cess noise for the flat floor demonstration. A thor-
0 −1
ough characterization of the intensity should be es-
−0.5 −2
timated prior to use.
−1 −3
0 2 4 6 8 0 2 4 6 8 • Sensor Noise: Similarly, the sensor noise on the ISS
Time (s) Time (s) is expected to be a function of the lighting condi-
tions and other disturbances. A thorough charac-
Figure 18: Angular rate estimate of the state in the
terization of the intensity should be estimated prior
SPHERES hardware demo
to use.
• Time Lag: There is no guarantee that the measure-
Finally, I note that the distrubances experienced in this ments will be acquired regularly or that the ∆t will
hardware demo are on the same order of magnitude ex- be perfect because Linux is a non-real time operat-
pected on the ISS, if not a bit larger than expected. The ing system. There will be some non-deterministic
air carriages are not perfect isolators and the glass table is time lag in the system between measurement up-
never perfectly balanced, which introduces process noises date and thruster actuation. This should be taken
2014Dec5 11
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
into account as much as is reasonably possible prior sigma points added computation time for propagation
to use. and filtering on the order of n. In the end, I was impressed
by the versatility of these filtering techniques and intend
The filters may also be improved by implementing an out- to use them in future estimation problems throughout my
lier rejection algorithm that can identify and discard Type career. The methodology presented in this paper may be
I errors which provided a certain amount of estimation scaled to future manned or unmanned missions to LEO,
latch-up. Also, it should be noted that the improvements the Moon, Mars and beyond.
from the UKF do not come for ‘free’. The additional
2014Dec5 12
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
References
[1] Sebasti Xamb Descamps. Euler and the dynamics of rigid bodies. Quaderns dHistria de lEnginyeria, Volum IX,
2008.
[2] James Diebel. Representing attitude: Euler angles, unit quaternions, and rotation vectors. Stanford University,
2006.
[3] Emil Fresk and George Nikolakopoulos. Full quaternion based attitude control for a quadrotor. European Control
Conference (ECC), 2013.
[4] Dr. Fuh. Analytic photogrammetry. Digital Camera and Computer Vision Laboratory. Department of Computer
Science and Information Engineering. National Taiwan University.
[5] Rush D. Robinett Hanspeter Schaub and John L. Junkins. Adaptive external torque estimation by means of
tracking a lyapunov function. 1996.
[6] F. Landis Markley. Attitude error representations for kalman filtering. In CASI NASA Archive.
[7] Philippe Martin. Generalized multiplicative extended kalman filter for aided attitude and heading reference
system. In AIAA Guidance, Navigation, and Control Conference, 2010.
[8] Brent Tweddle. Computer vision based navigation for spacecraft proximity operations. Master’s thesis, Mas-
sachusetts Institute of Technology, 2010.
2014Dec5 13
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
Appendices
A Additional Mathematical Definitions
A.1 Quaternion
A unit quaternion is a four element representation of the attitude of an object. It consists of a vector and scalar
elements that are related to the Euler axis and Euler angle of rotation as follows. Also as a unit quaternion, it obeys
the unit length constraint.
qv e sin φ/2
q= = (82)
q4 cos φ/2
|q|2 = |qv |2 + q42 = 1 (83)
Quaternion multiplication is a noncommunative operation that can be defined as either a matrix-vector product or
compacted in vector notation. I have defined va and vb as the vector parts of the quaternions qa and qb with q4 as
the scalar element of each.
qa4 −qa3 qa2 qa1 qb1
qa3 q a4 −q a1 q q
a2 b2
va × vb + q4a vb + q4b va
qa ⊗ qb =
= (84)
−qa2 qa1 qa4 qa3 qb3 q4a q4b − va • vb
−qa1 −qa2 −qa3 qa4 qb4
We also introduce the tranform from 1-2-3 Euler angles to quaternions which is needed for measurement noise
generation. The solution is provided in [2].
cφ/2 cθ/2 cψ/2 + sφ/2 sθ/2 sψ/2
−cφ/2 sθ/2 sψ/2 + sφ/2 cθ/2 cψ/2
q123 (φ, θ, ψ) =
cφ/2 cφ/2 sθ/2 + sφ/2 cθ/2 sψ/2 (85)
cφ/2 cθ/2 sψ/2 − sφ/2 sθ/2 cψ/2
Z Z Z
(Ixx )O = (y 2 + z 2 )dm (Iyy )O = (x2 + z 2 )dm (Izz )O = (x2 + y 2 )dm
m m m
Z Z Z
(Ixy )O = (Iyx )O = (xy)dm (Ixz )O = (Izx )O = (xz)dm (Iyz )O = (Iyz )O = (yz)dm
m m m
2014Dec5 14
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
B Visualization
A custom visualization was developed for this project to show the user or audience how the trajectory progresses
through time. A screen shot is shown in Figure 19 and a video has been presented during class. This helps in the
debugging process by seeing the mean motion in real time.
2014Dec5 15
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
C Additional Figures
Additional individual figures per state have been generated and populated in the published html report located in
the html subfolder.
rx ry
1.5 0.2
1 Meas
Position (m)
Position (m)
0.1
MEKF
0.5 UKF
0
0
Meas
−0.1
−0.5 MEKF
UKF
−1 −0.2
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
rz
0.3
0.2 Meas
Position (m)
MEKF
0.1 UKF
−0.1
−0.2
0 5 10 15 20
Time (s)
Figure 20: Representative tracking of position states with full noise modeling.
2014Dec5 16
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
rx ry
1.5 0.2
1 Meas
Position (m)
Position (m)
0.1
MEKF
0.5 UKF
0
0
Meas
−0.1
−0.5 MEKF
UKF
−1 −0.2
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
r
z
0.3
0.2 Meas
Position (m)
MEKF
0.1 UKF
−0.1
−0.2
0 5 10 15 20
Time (s)
Figure 21: Representative tracking of velocity states with full noise modeling.
2014Dec5 17
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
q1 q2
0.4 1
0.2 Meas
Quaternion
Quaternion
0.5
MEKF
0 UKF
0
−0.2
Meas
−0.5
−0.4 MEKF
UKF
−0.6 −1
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
q q
3 4
1 1
Meas
Quaternion
Quaternion
0.5 0.5
MEKF
UKF
0 0
Meas
−0.5 −0.5
MEKF
UKF
−1 −1
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
Figure 22: Representative tracking of quaternion states with full noise modeling.
2014Dec5 18
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
Truth
0.2
MEKF
1
UKF
0
0.5 Truth
−0.2
MEKF
UKF
0 −0.4
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
ω
z
Rotation Rate (rad/s)
0.2
−0.2
Truth
−0.4
MEKF
UKF
−0.6
0 5 10 15 20
Time (s)
Figure 23: Representative tracking of angular velocity states with full noise modeling.
2014Dec5 19
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
C.1.2 Errors
rx Error ry Error
0.04 0.04
MEKF 0.03 MEKF
Position (m)
Position (m)
0.02 UKF UKF
0.02
0 0.01
0
−0.02
−0.01
−0.04 −0.02
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
rz Error
0.02
0.01
Position (m)
−0.01
−0.02 MEKF
UKF
−0.03
0 5 10 15 20
Time (s)
Figure 24: Representative angular velocity error with full noise modeling.
2014Dec5 20
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
vx Error vy Error
0.05 0.05
MEKF MEKF
Velocity (m/s)
Velocity (m/s)
UKF UKF
0 0
−0.05 −0.05
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
vz Error
0.05
MEKF
Velocity (m/s)
UKF
−0.05
0 5 10 15 20
Time (s)
Figure 25: Representative angular velocity error with full noise modeling.
2014Dec5 21
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
q Error q Error
1 2
0.1 0.06
MEKF MEKF
0.05 UKF 0.04 UKF
0 0.02
−0.05 0
−0.1 −0.02
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
q3 Error q4 Error
0.03 0.06
MEKF
0.02 0.04
UKF
0.01 0.02
0 0
2014Dec5 22
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
0 0
−0.5 −0.5
0 5 10 15 20 0 5 10 15 20
Time (s) Time (s)
ω Error
z
Rotation Rate (rad/s)
0.5
MEKF
UKF
−0.5
0 5 10 15 20
Time (s)
Figure 27: Representative angular velocity error with full noise modeling.
2014Dec5 23
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
rx ry
0.2 0.24
Position (m)
0.1
UKF UKF
0.2
Meas Meas
0 0.18
0.16
−0.1
0.14
−0.2 0.12
0 2 4 6 8 0 2 4 6 8
Time (s) Time (s)
rz −5
x 10 MEKF − UKF
0.25 4
rx error (m/s)
0.2 2
Position (m)
0.15 0
0.1 −2
MEKF
0.05 UKF −4
Meas
0 −6
0 2 4 6 8 0 2 4 6 8
Time (s) Time (s)
Figure 28: Position estimate of the state in the SPHERES hardware demo
2014Dec5 24
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
v v
x y
0 0.06
0.04 MEKF
Velocity (m/s)
Velocity (m/s)
−0.02
UKF
0.02
−0.04
0
−0.06
−0.02
−0.08 MEKF −0.04
UKF
−0.1 −0.06
0 2 4 6 8 0 2 4 6 8
Time (s) Time (s)
vz −3 MEKF − UKF
x 10
0.06 10
MEKF
0.04 8
Velocity (m/s)
0 4
−0.02 2
−0.04 0
−0.06 −2
0 2 4 6 8 0 2 4 6 8
Time (s) Time (s)
Figure 29: Velocity estimate of the state in the SPHERES hardware demo
2014Dec5 25
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
q1 q2
0.3 0.15
0.2 MEKF
0.1
UKF
0.1 Meas
0.05
0
MEKF
0
−0.1 UKF
Meas
−0.2 −0.05
0 2 4 6 8 0 2 4 6 8
Time (s) Time (s)
q q
3 4
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
MEKF MEKF
0 UKF 0 UKF
Meas Meas
−0.2 −0.2
0 2 4 6 8 0 2 4 6 8
Time (s) Time (s)
Figure 30: Quaternion estimate of the state in the SPHERES hardware demo
2014Dec5 26
Relative Estimation
Duncan Miller, 16.322 Student
duncanlm@mit.edu
ω ω
1 2
Rotation Rate (rad/s)
2 MEKF MEKF
UKF UKF
1
0 0
−1
−2
−3 −5
0 2 4 6 8 0 2 4 6 8
Time (s) Time (s)
ω3 MEKF − UKF
Rotation Rate (rad/s)
2 3
0.5 0
0 −1
−0.5 −2
−1 −3
0 2 4 6 8 0 2 4 6 8
Time (s) Time (s)
Figure 31: Angular rate estimate of the state in the SPHERES hardware demo
2014Dec5 27