134
Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 c 2003 by Michael L. Carroll

Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Overview of Kalman Filter Theory and

Navigation Applications

Day 4

Michael L. Carroll

Feb 25, 2003

c©2003 by Michael L. Carroll

Page 2: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Day 4: General Code Implementation Issues

Topics

• Simulation vs. Real-Time Implementation

• Survey of Navaids

• Filter Maintenance

• Filter Redundancy and Fault Tolerance

1

Page 3: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Day 4, Segment 1

Simulation vs. Real-Time Implementation

Topics

• Simulation

• Real-Time Implementation

2

Page 4: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Simulation

• Introduction to Matlab / Simulink

• Covariance Analysis

• Trajectory Simulation

3

Page 5: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Introduction to Simulink

• Matlab

• Simulink

4

Page 6: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Matlab

• Matrix-oriented scientfic computing tool from Mathworks

– Everything is a matrix: scalars are 1-by-1 matrices

• Lots of built-in numerical tools for matrix manipulation

• Industry standard

5

Page 7: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Matlab

% Row vector:

v = [1 2 3]; % Or separate columns with comma: v = [1, 2, 3];

% Column vector:

u = [1;2;3]; % Note: Rows separated with semicolon

% Natural multiplication:

x=v*u;

6

Page 8: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Matlab

%Displaying values:

v

u

x

7

Page 9: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Matlab

% Matrices: Combinations of rows and columns:

A = [1 2 3; 4 5 6; 7 8 9];

w = A*u;

% Matrix operators like inverse and transpose:

B = inv(A);

C = A’;

D = u*u’; % Symmetric matrix

8

Page 10: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Matlab

• Full-fledged programming language with control constructs

and looping

• Data structures

• Many c-like functions

• Extensive plotting

9

Page 11: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Matlab

• Expensive: >$2K / license

• Toolboxes and add-ons are extra

• Freeware alternative: Octave (go to www.gnu.org)

10

Page 12: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Simulink

• Simulation of Continuous and Discrete Systems

• Linear and Non-Linear

• Easy to Use, Drag and Drop, Block Diagram Interface

– Large collection of block libraries

• Easy integration with external routines, Matlab functions /

scripts, S-functions

11

Page 13: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Simulink

• Hierarchical Nesting of Subsystems

• Can build hybrid discrete / continuous systems

• Integrate inputs and outputs with Matlab Workspace

• Models can be executed in batch (from script or command

line) or interactively in GUI

12

Page 14: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Simulink

• See demo of Model Construction

13

Page 15: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Analysis

• Overview

• Various Approaches to Covariance Simulation

• SIMLTIC: SIMulation of Linear Time-Invariant Covariance

14

Page 16: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Analysis: Overview

• Covariance propagation and covariance update can be be

accomplished without actually dealing with the state vector

at all.

(1) Pk(−) = ΦkPk−1(+)ΦTk +Qk

(2) Pk(+) = [I −KkHk]Pk(−)

• Of course, the Kalman gain still has to be computed for use

in Eq. (2) above, the update equation. The gain is:

(3) Kk = Pk(−)HTk

[HkPk(−)HT

k +Rk]−1

15

Page 17: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Analysis: Overview

• As in real-time implementation, the Joseph form of the gain

equation is generally preferred, because of its superior nu-

merical properties:

(4) Pk(+) = [I −KkHk]Pk(−) [I −KkHk]T +KkRkK

Tk

16

Page 18: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Analysis: Overview

• The only items driving the covariance equations are the state

dynamics F , the process noise Q, and the measurement noise

R

• Thus, covariance analysis can provide good insight into how

well balanced the Q and R matrices are

• More importantly, covariance analysis is crucial in exploring

what-if scenarios with new measurement sources

17

Page 19: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Analysis: Overview

• As an example, suppose you want to evaluate several different

GPS receivers as navaids

• You can use a manufacturer’s published 1σ accuracy specifi-

cations in your measurement noise matrix R and run several

covariance simulations to see what the expected performance

is

18

Page 20: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Analysis

• Of course, if GPS is your only navaid, this is a no brainer:

the receiver with the least measurement noise performs best

• However, if this sensor is just one of several, you might find

that some less expensive receiver when thrown into the mix

with other navaids is good enough

19

Page 21: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Analysis: Overview

• Other uses: Debugging the filter

• If you save the actually used process noise Q and measure-

ment noise R from a real-time mission (using a maintenance

logging facility), then thse matrices can be fed into the co-

variance simulation to see what effect these have on the

gains.

• Or to see how the offline gains compare with the real-time

gains.

20

Page 22: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Analysis: Overview

• Covariance analysis is quite often used to determine proper

error budgets

• Error budget: How error sources are allocated to various

states and sensors

• E.g., in a nav application, to meet overall system position

accuracy requirements, certain combinations of misaligne-

ment, instrument bias, scale factor, and inertial noise error,

etc., will work when coupled with sensor errors

21

Page 23: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Analysis: Overview

• Optimal vs. Suboptimal

• Evaluating finite wordlength effects

• Bottom Line: Covariance analysis essential to filter mainte-

nance

– If you are planning to modify a Kalman filter at all, you

need to run covariance analysis simulations

– It is very risky not to do so!

22

Page 24: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Various Approaches to Covariance Simulation

• In the continuous formulation, covariance extrapolation can

be accomplished by solving the linear variance equation

(5) P = FP + PFT +Q

• This can be useful in exploring how a navigation system

”coasts” in the absence of measurements

– It can give you an idea of how fast the solution degrades

in free-inertial

23

Page 25: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Various Approaches to Covariance Simulation

• In the continuous case, we can also eliminate the gain be-

cause

lim∆t→0

K(t)

∆t= PHTR−1

• This leads to a single equation, the Matrix Riccati equation,

for covariance propadation and update:

(6) P = FP + PFT +Q− PHTR−1HP

24

Page 26: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Various Approaches to Covariance Simulation

• Matrix Riccati Equation reveals essential characteristics of

filter

P = FP + PFT +Q− PHTR−1HP

• Note that in this equation we increase estimation uncertainty

by adding in process noise

• And we decrease estimation uncertainty by the amount of

information (R−1) inherent in the measurement

25

Page 27: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Various Approaches to Covariance Simulation

• See Matlab / Simulink Model

matrix_riccati.mdl

• Dampled harmonic oscillator; parameter file

harmosc_riccati.mat

– 2d state vector: position and velocity

– 1 scalar measurement and scalar measurement noise R

26

Page 28: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

0 1 2 3 4 5 6 7 8 9 100.8

0.9

1

1.1

1.2

1.3

1.4

1.5

1.6

Time

Position and Velocity Variances: R=3.0

27

Page 29: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

0 1 2 3 4 5 6 7 8 9 100.8

0.9

1

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

Time

Position and Velocity Variances: R=3.1

28

Page 30: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

0 1 2 3 4 5 6 7 8 9 100.8

1

1.2

1.4

1.6

1.8

2

Time

Position and Velocity Variances: R=3.2

29

Page 31: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

0 1 2 3 4 5 6 7 8 9 100.8

1

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

Time

Position and Velocity Variances: R=3.3

30

Page 32: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

0 1 2 3 4 5 6 7 8 9 100.5

1

1.5

2

2.5

3

3.5

Time

Position and Velocity Variances: R=3.35

31

Page 33: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

0 1 2 3 4 5 6 7 8 9 100

2

4

6

8

10

12

14

Time

Position and Velocity Variances: R=3.39

32

Page 34: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Damped Harmonic Oscillator Covariance Analysis

• Matrix Riccati Differential Equation with constant F , H, Q,

R

• Varying R demonstrates extreme sensivitiy of P solution to

changes in R

• R = 3.3 is stable; but R = 3.4 is unstable

33

Page 35: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Damped Harmonic Oscillator Covariance Analysis

• Example illustrates how damping coefficient (reflected in sys-

tem dynamics matrix F ) and process noise uncertainty Q

interact with measurement noise uncertainty R

• Highly coupled, non-linear equation

P = FP + PFT +Q− PHTR−1HP

34

Page 36: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Alternative Forms of Matrix Riccati Equation

• Can be factored into two first-order, linear matrix

• May be better behaved numerically

– with Matlab / Simulink it is very easy to implment even

non-linear matrix differential equations

– Simulink’s ODE solvers may not always be up to the task,

however

35

Page 37: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Various Approachs to Covariance Simulation

• Discrete models:

– Implement regular filter processing less the state propa-

gation and update

36

Page 38: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

SIMLTIC: SIMulation of Linear Time-Invariant Covariance

• Discrete, Generic Covariance Simulation

• LTI = Constant Copefficients in System Dynamics

• Implemented as Simulink Subsystem Block

– Can be dropped into higher level models as required

– Output can be integrated with Matlab Workspace

37

Page 39: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

SIMLTICSIMulation of Linear Time Invariant Covariance

4

Phi(k)

3

K(k)

2

P(k)((+)

1

P(k)(−)

P(k)(−)

P(k)((+)

K(k)

Phi(k)

SIMLTIC Covariance AnalysisSubsystem

38

Page 40: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

SIMLTIC: SIMulation of Linear Time-Invariant Covariance

• Example: Covariance Comparison of Two Harmonic Oscilla-

tor Models

39

Page 41: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

SIMLTICComparing Performance of Two Models

8

Phi(k)2

7

K(k)2

6

P(k)((+)2

5

P(k)(−)2

4

Phi(k)1

3

K(k)1

2

P(k)((+)1

1

P(k)(−)1

P(k)(−)

P(k)((+)

K(k)

Phi(k)

SIMLTIC Covariance AnalysisSubsystem2

P(k)(−)

P(k)((+)

K(k)

Phi(k)

SIMLTIC Covariance AnalysisSubsystem1

40

Page 42: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

SIMLTICSubsystem 1

4

Phi(k)3

K(k)2

P(k)((+)

1

P(k)(−)

H

K

P(k)(−)

R

P(k)(+)

Update Error Covariance Matrix

z

1

Unit Delay

Q1

Process NoiseCovariance Matrix

R1

Measurement NoiseCovariance Matrix

H1

GeometryMatrix

F1

F

Q(k−1)

P(k−1)(+)

Phi(k−1)

P(k)(−)

Extrapolate ErrorCovariance Matrix

0

Display2

H

R

P(k)(−)

K(k)

Compute Kalman Gain

In1Phi(k−1)

Compute Transition Matrix

41

Page 43: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Warning: Matlab/Simulink WILL add a 1x1 matrix to a nxn martrix as if the 1x1 matrix were anxn with the same elementin each entry!!!!

Compute Kalman Gain

1

K(k)

0

inv(HPH’+R)Display

MATLABFunction

diag(HPH’+R)

MatrixMultiply

Product4

MatrixMultiply

ProductMatrix

Multiply

PH’*inv(HPH’+R)

HPH’+R inv(HPH’+R)

Invert via UD

0

Identity?

0

HPH’+R

1

Gain

Diagonal of inv(HPH’+R)

P(k)(−)

H

R

HPH’+R

H’

Compute Gain Denominator

HPH’+R

3

P(k)(−)

2

R

1

H

KalmanGain

PH’

HPH’+R

HPH’+R

42

Page 44: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Joseph Formof Covariance

Update

Update Error Covariance Matrix

1

P(k)(+)

MATLABFunction

transpose1

MATLABFunction

transpose

MATLABFunction

symmetrize

MATLABFunction

rss_ratio

MATLABFunctionnorm(u−u’)1

MATLABFunction

norm(u−u’)

MATLABFunction

norm

MATLABFunction

daig(P)

Symmetrization

Scope

MatrixMultiply

Product2

MatrixMultiply

Product

Norm of P−P’: prior / post / RSS ratio

of post−prior

MatrixMultiply

KR

Joseph Switch

I

Identify Matrix[B]

GotoB

[A]

Goto A

[B]

From B

[A]

From A

0

Error Covariance Display

Err CovMatrix

Diagonal of Err Cov Matrix

MatrixMultiply

(I−KH)P(k)(−)(I−KH)’

MatrixMultiply

(I−KH)P(k)(−)

4

R

3

P(k)(−)

2

K

1

H

(I−KH)P(k)(−)(I−KH)’+KRK’

(I−KH)P(k)(−)

43

Page 45: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Extrapolate Error Covariance Matrix

Updated Value ofcovariance matrix from previous cycle.

Output: P(k)(−) = Phi(k)*P(k−1)(+)Phi(k)’ + Q(k−1)

Transition matrix from previous cycle (see Gelb pg 110)

The eigenvalues of P(k−1)(+) should all benon−negative, if it is to be a positive semi−definite matrix.

The eigenvalues of P(k)(−) should all be non−negative, if it is to be a positive semi−definite matrix.

1

P(k)(−)

MATLABFunctionnorm(u−u’)2

MATLABFunctionnorm(u−u’)

MATLABFunction

max eigenvalue

MATLABFunctioneig(P(k−1)(+))

MATLABFunctioneig(P(k)(−)

MatrixMultiply

Phi*P*Phi’

Norm of P−P’ before

extrapolation

Norm of P−P’ after extrapolation

Max Eigenvalue

uT

MathFunction

Eigenvalues of P(k−1)(+)

Eigenvalues of P(k)(−)

0

Eigenvaluesprior to

extrapolation0

Display of Eigenvalues of P(k)(−)

0

Display

|u|

Abs1

|u|

Abs

3Phi(k−1)

2

P(k−1)(+)

1

Q(k−1)

44

Page 46: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Compute Transition Matrix

Note: This uses a constant F matrixfor simplicity. This only works for LTIsystems.

We use the Matlab matrix exponential basedon the Pade algorithm, i.e., expm()Note: Be sure to NOT collapse 2d results to 1d!!!

1

Phi(k−1)

MATLABFunction

diag(Phi)

MATLABFunction

diag(Ft)

Product

0

Phi

MATLABFunction

MATLAB Fcn

0

Ft

Diagonal of Phi

Diagonal of Ft

1

Delta_t

1

In1

Ft

FtFt

45

Page 47: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Transistion Matrix as Matrix Exponential

• If system dynamics matrix F is constant, i.e., not time-

varying over the interval of interest, then Φ(∆t) can be ex-

pressed as matrix exponential:

Φ(∆t) = I + F∆t+1

2![F∆t]2 +

1

3![F∆t]3 + · · ·

• If ∆t is small enough, the approximation Φ(∆t) ≈ I + F∆t

may be adequate

46

Page 48: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

0 1 2 3 4 5 6 7 8 9 100

50

100

150

200Comparitive Covariance Analysis of Damped Harmonic Oscillator

Position Estimation Error Variance (Model 1) Q1(1,1)=5; R1(1,1)=10Position Estimation Error Variance (Model 2) Q2(1,1)=5; R2(1,1)=150

0 1 2 3 4 5 6 7 8 9 100

50

100

150

200Velocity Estimation Error Variance (Model 1) Q1(2,2)=5; R1(1,1)=10Velocity Estimation Error Variance (Model 2) Q2(2,2)=5; R2(1,1)=150

47

Page 49: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

0 1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1Comparitive Covariance Analysis of Damped Harmonic Oscillator: Gains

Position Gain from Model 1Position Gain from Model 2

0 1 2 3 4 5 6 7 8 9 10−0.1

0

0.1

0.2

0.3

0.4

0.5

0.6Velocity Gain from Model 1Velocity Gain from Model 2

48

Page 50: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Trajectories

• In navigation applications, the system dynamics vary accord-

ing to where you are on the earth

• Some quantities are dependent on your latitude and longin-

tude.

• E.g., the vertical component of earth rate depends on your

latitude

49

Page 51: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Trajectories

• Therefore, in order to perform a covariance analysis of a nav-

igation system, a trajectory generator that computes truth

value dynamic quantities such as body rates and accelera-

tions is necessary

• This is the ”truth model” that can then be corrupted by

sensor error sources

50

Page 52: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Simulation vs. Real-Time

• Real-time time constraints

• Different processing rates

• Data Buffering

• Measurement Scheduling

• Keeping the Filter Awake

• Covariance Bumping

51

Page 53: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Time Constraints

• Simulation

– offline, non-realtime

– each calculation (transition matrix, Kalman gain, etc.)

can run to completion

– do not have to worry about rate group partitioning

• Real-Time

– time is of the essence

52

Page 54: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Real-Time: Different Processing Rates

• In real-time apps, you cannot waste processing cycles

– there are numerous other mission processing tasks to ac-

complish besides filtering

• Some, fast varying quanitites need to be updated often; oth-

ers, less often

53

Page 55: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Real-Time: Different Processing Rates

• For example: body rates and quantities highly-dependent on

them need to be updated as rapidly as possible

• Depends, of course, on platform dynamics

• Transport rates don’t need to be updated as often

54

Page 56: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Rate Allocation Example: Combat Talon I

• Kalman Gain Calcuation, State and Covariance Update: 0.1

Hz (was originally 0.05 Hz)

• State and Covariance Extrapolation: 4 Hz

– dependent on some 16 Hz Fast Nav calcs: body rates and

attitudes

– dependent of some 8 Hz Slow Nav calcs: transport rates

55

Page 57: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Buffering

• Keep low rate data from being clobbered by higher rate data

• Keep high rate data from being clobbered by low rate data

• Buffering: Orderly passage and distribution of data up and

down the rate group hierarchy

56

Page 58: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Buffering Example: Combat Talon I

• Slow rate group exec buffers data to and from faster rate

groups

• Faster rate groups do not push or pull data with respect to

slower groups

– REP8HZ buffers data to and from the 16 Hz rate group,

but does not control buffering to and from 4 Hz

– Hence REP16HZ does not call any BU’ routines

57

Page 59: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Buffering Example: Combat Talon IApproach

• Buffer from faster at beginning of start of slow rate group

• Buffer to faster at end of slow rate group

• Within BU’* routine:

1. Disable interrupts

2. Perform buffering assignments

3. Re-enable interrupts

58

Page 60: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

117 DEF PROC BU’BUFFER’TO’05HZ’FROM’FASTER;

118 BEGIN

119

120 DISABLE THE INTERRUPTS

121 %

122 DISABLE’INTRUPT;

123

124 BUFFER SYSTEM LATITUDE AND LONGITUDE FOR G/S

125 %

126 SYSTEM’LATITUDE’05 = SYSTEM’LATITUDE’16;

127 SYSTEM’LONGITUDE’05 = SYSTEM’LONGITUDE’16;

128

129 ENABLE THE INTERRUPTS

130 %

131 ENABLE’INTRUPT;

59

Page 61: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Measurement Scheduling

• Art / Science unto itself

• Determining which measurements to process when

• Usually fixed schedule with potential operator override

– CT I Position Fix and Altitude Cal

60

Page 62: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Measurement Scheduling

• Sequential Processing of Measurements

– Scalarize to avoid matrix inversion of HPHT +R

– Or at least reduce dimension

– feasible if R matrix can be block partitioned into uncorre-

lated blocks

61

Page 63: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Measurement Scheduling

• Examining eigenevalues of P

• The larger the eigenvalue, the less observable the associated

state eigenvector

• State eigenvector is linear combination of states

• Measurements can be scheduled to improve observability

62

Page 64: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Keeping Filters Awake

• Filter goes to sleep means error covariance for certain statesbecomes so small that measurements no longer have an ef-fect

• Can be the result of round-off problems

• Presence of non-random, determinisitc quantities can be con-tributors

– Random constants are nearly deterministic

– Watch out for states not driven by process noise!

63

Page 65: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Keeping Filters Awake

• Recall running average example

• That was a random constant

• Gain 1/N → 0 as N →∞

• CT I Filter has 12 states modeled as random constants, i.e.,

the non-varying states

64

Page 66: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Bumping

• Covariance bumping refers to the addition of process noise

to keep the filter from going to sleep

• Usually based on ad hoc rules

65

Page 67: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

In CT I GPS Observation Processing, three different kinds of

bumping:

146 DEF ITEM POSITION’BUMP STATIC REAL = 10.0;

147 DEF ITEM V’BUMP STATIC REAL = 10.0;

148 DEF ITEM COVARIANCE’BUMP STATIC REAL = 50.0;

...

182 OBS’COV’SCALER = POSITION’BUMP *

OBS’COUNT’SCALER;

---

185 NOISE’VECTOR(3) = (Y’KAL’OBS(INU,11) *

OBS’COUNT’SCALER * OBS’COV’SCALER * V’BUMP) **2;

---

245 OBS’COV’SCALER = COVARIANCE’BUMP *

OBS’COUNT’SCALER;

66

Page 68: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Exercises

1. For fixed R = 3.0, what will the the effect of increasing Q be

in the model harmosc riccati.mat?

2. Run the simulation with various values of Q and check to see

if the predicted behavior is achieved.

67

Page 69: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Day 4, Segment 2

Survey of Navaids

Topics

• GPS

• Position Fixes

• Radar

• Doppler Velocity Sensor (DVS)

• External Tracking Aids

68

Page 70: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

• Digital Terrain Elevation Data (DTED)

Page 71: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

69

Page 72: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Navigation Aids (Navaids)

• Measurement / Observation sources that aid in estimatingINS error sources and dynamics

• Because we are interested in estimating INS errors, we usedifferencing to cancel out the whole state information

• INS outputs x = xt+ xe, where xt is the true whole state in-formation generated by INS, i.e., position, velocity, attitude,etc.

• Navaid sensor outputs s = xt+xe, where xt is once again thetrue quantities corrupted by sensor errors xe.

70

Page 73: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Navigation Aids (Navaids)

• Note that the navaid sensor usually only outputs part of the

whole state vector, e.g., position and velocity, but not atti-

tude (in the case of GPS)

• That’s one reason why we have the h function

• The INS signal is mapped by a linearized measurement func-

tion (or matrix) h such that h(x) = h(xt)+h(xe) and h(xt) =

st

71

Page 74: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Navigation Aids (Navaids)

• Thus, we have

z = s− h(x)

= st + se − h(xt)− h(xe)

= st − h(xt) + se − h(xe)

= h(xt)− h(xt) + se − h(xe)

= se − h(xe)

• Our measurement, therefore, is the difference between the

navaid sensor errors and the INS errors

72

Page 75: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Navigation Aids (Navaids)

• If se is more than just white measurement noise, then we

would need to model this vector in the filter according to

known or assumed dynamics

• Hence, sometimes adding a new navaid means adding new

states to your filter

73

Page 76: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Navigation Aids (Navaids)

• It is crucial to examine the innovations sequence for any non-

white time correlations!

zk − h [xk(−)] = se(k)− h [(xe(k)]− h [xk(−)]

where we have added the index k for clarity

• We should have E[(zk − h [xk(−)])(zj − h

[xj(−)

])T

]= 0 when

k 6= j, which will in general be true provided E [se(k)] = 0

• If this is not the case, then it is probably se that is the culprit

and you’d better start modeling!

74

Page 77: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

• The condition

E[(zk − h [xk(−)])(zj − h

[xj(−)

])T

]= 0

says that the innovations sequence is uncorrelated in time.

• Recall that the innovations sequence is νk = zk − h [xk(−)]

• Thus, we should have E[νkν

Tj

]= 0

• This means that the optimal estimator xk(+) always makes

optimal use of the new information provided by νk

75

Page 78: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

GPS: The Global Positioning System

• 24+ satellites orbiting at 10,900 miles above surface

• Three Segments: Control, Space, User

• Time-tagged signals and known satellite position enable cal-

culation of signal time of flight and hence range traversed

from satellite to receiver

• Range to four satellites required to determine time plus three

position coordinates

76

Page 79: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

GPS: The Global Positioning System

• Satellites have precise atomic clocks

• User set receiver has less precise clock

• Time is of the essence: comparing satellite-generated time-

tag with user clock time of arrival determines transit time

• Note that user clock can be a source of systematic error

77

Page 80: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

GPS: The Global Positioning System

• Three types of navaid coupling:

– Loose coupling

– Tight coupling

– Deep coupling

78

Page 81: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Loosely-Coupled GPS

• GPS receiver-generated position and velocity are differenced

with INS position and velocity

• GPS position and velocity are generally pre-filtered (with a

Kalman filter) before being used in inertial filter

• GPS position and velocity are also composite quantities from

all satellites

• Least accurate approach to using GPS as a navaid

79

Page 82: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Loosely-Coupled GPS

• The GPS receiver does not have the advantage of using in-

ertial information to completely separate process noise from

measurement noise

• Simplifies Kalman integration: Don’t necessarily have to model

GPS receiver clock errors (assume receiver has already done

so)

80

Page 83: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Tightly-Coupled GPS

• Pseudorange and delta pseudorange for each individual satel-

lite are direct measurements presented to the filter

• Contains only measurement noise, not receiver filter’s model

of process noise

• Gives INS filter more fine-grained control over GPS measure-

ments

• Higher accuracy

81

Page 84: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Deeply-Coupled

• Uses high-rate inertial data to aid in code and carrier phase

tracking loops

• Most accurate solution when combined with tightly-coupled

INS filter as well

82

Page 85: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

GPS Errors

• Ephemeris data: Satellite’s reported position can be in error

• Satellite clock: Negligible since SA (selective availability) has

been turned off

• Ionosphere: Pseudorange errors caused by free electrons in

the ionosphere

83

Page 86: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

GPS Errors (cont)

• Troposphere: Pseudorange errors casued by temperature,

pressure, humidity influences on the speed of light

• Multipath: Errors casued by locking on to reflected signals

• Receiver Noise: Errors caused by receiver’s thermal noise and

software inaccuracies

84

Page 87: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Error Source C/A-

Code

Error

Budget

(meters)

P-Code

Error

Budget

(meters)

Multipath 12.0 1.2Receiver Noise /

Software

11.1 1.1

Ionosphereic Delays 9.0 3.1Satellite Clock and

Ephemeris Errors

3.9 3.9

Tropspheric Delays 2.0 2.0

85

Page 88: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Using Loosely-Coupled GPS Measurements

• Position

– Form primary GPS position observation by subtractingKalman-corrected INS reference position from raw GPSposition

– Next, the innovation (or measurement residual) is formedby subtracting off the extrapolated state estimate of po-sition error

– Extrapolated position error estimate needs to compensatefor accumulated velocity error during Kalman cycle (orsome fraction thereof)

86

Page 89: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Combat Talon I GPS Position Observation, KF’GPS’OBS’PROC,

we have:

87

Page 90: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

165 COMPUTE RESIDUALS

166 RESIDUALS(1) = Y’KAL’OBS(INU,1) * OBS’COUNT’SCALER - SVVAR(1)

167 - 5.0 * SVVAR(4);

168 RESIDUALS(2) = Y’KAL’OBS(INU,2) * OBS’COUNT’SCALER - SVVAR(2)

169 - 5.0 * SVVAR(5);

170 RESIDUALS(3) = Y’KAL’OBS(INU,7) * OBS’COUNT’SCALER - SVVAR(3) jlw vc correction

171 - 5.0 * SVVAR(6);

Page 91: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

GPS Velocity Measurements

• Based on carrier phase measurements in receiver

• Generally independent of position measurements

• Observation is once again difference between Kalman-compensated

INS reference velocity and GPS-indicated velocity

88

Page 92: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

GPS Measurment Noise Covariance

• Based on EHE (estimated horizontal error) and EVE (esti-

mated vertical error)

• These numbers highgly dependent on GDOPs

89

Page 93: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Geometric Dillution of Precision (GDOP)

• Satellites are not geostationary

• H matrix is time-varying

• Observability varies with time

• GDOP =

√tr

(HTH

)−1

90

Page 94: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

GDOP Chimney

• Large DGOP is bad; normal values 3-5

• Singularity periods of time (about 1 hr) when GDOP values

spike upward with a peak as much as 1000

• GDOP 50 ≈ 500 m position error

• Chimney’s effects should be less acute if receiver has enough

channels to track many satellites and to handle constellation

changes

91

Page 95: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Position Fix

• Overfly Fix

• Known location

• Delta formed between overfly location and indicated, Kalman-

compensated INS position

• Usually a one-shot opportunity, i.e., not periodic like GPS

92

Page 96: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Radar Fixes

• Instantaneous azimuth and elevation angles to a target of

known latitude and longitude

• Or converted to local Cartesian coordinates (north, east, and

altitude)

• Amount of cursor movement required to align curson with

target yields position fix delta

• Otherwise, processed in filter like GPS or visual position fix

93

Page 97: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Doppler Velocity Sensor (DVS)

• DVS provides genuine velocity measurement with respect to

ground

• DVS provides heading and drift velocities VH and VD

• Nonlinear measurement relationship to INS-indicated veloci-

ties Vx and Vy and platform azimuth β:

VH = −Vx sinβ + Vy cosβ

VD = Vx cosβ + Vy sinβ

94

Page 98: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

DVS

• Relationship between (Vx, Vy) and (VH , VD) is non-linear h

• To generate a linearized H matrix we compute partial deriva-

tives (Jacobians) to yield:

H =

[0 − sinβ 0 0 cosβ 0 0 0 −Vx cosβ − Vy sinβ0 cosβ 0 0 sinβ 0 0 0 −Vx sinβ + Vy cosβ

]

for a canonical 9-state filter.

95

Page 99: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

External Tracking Aids

• External platform tracks your vehicle and sends position /

velocity info (JTIDS)

• Bearing and distance measurments

– VOR, DME, TACAN

96

Page 100: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Digital Terrain Elevation Data (DTED)

• Published by National Geospatial Intelligence Agency (NGA)

– formerly NIMA, formerly DMA

• 1 deg geocells of terrain height for each lat/long pair

• DTED Levels 0,1,2

97

Page 101: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

DTED

• As navaid, a trail of radar altimeter measurements are stored

• Trail is correlated with DTED to determine offset

• SITAN, TERPROM

98

Page 102: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Day 4, Segment 3

Filter Maintenance

Topics

• Filter Performance and Integrity Monitoring

• Replacing Navaids

• Adding New Navaids

• Augmenting the State Vector

99

Page 103: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Filter Performance and Integrity Monitoring

• Covariance Monitoring

• Innovations Monitoring

• Corrective Action

100

Page 104: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Monitoring

• Ensuring Symmetry

• Managing Observability

• Ensuring Positive Definiteness

101

Page 105: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Monitoring: Ensuring Symmetry

• P is supposed to be positive definite and symmetric

• Symmetry means that PT = P , i.e., for each element pij of

P we must have pij = pji

• Roundoff error can cause loss of symmetry

• The best way to ensure symmetry is to work only with items

on or (say) above the diagonal and simply define elements

below he diagonal by fiat.

102

Page 106: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Monitoring: Ensuring Symmetry

• Both P (+) and P (−) need to be symmetrized

– After extrapolation: symmetrize

– After update: symmetrize

103

Page 107: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Monitoring: Managing Observability

• Observability means there is a linear path from the measure-

ments to states

• Structural observability determined by Φ and H:

If H is 1 × n, where n is the size of the state vector, then the

state x0 is said to be observable from n scalar measurements

z0, . . . , zn−1 if the block matrix[HT ΦTHT · · · (ΦT)n−1HT

]

is of rank n

104

Page 108: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Monitoring: Managing Observability

• If unobservable states are also unstable, estimation errors will

be unstable and P will show symptoms

– diag(P ) →∞

– I.e., one or more diagonal elements of P will grow without

bound

• Not the same as divergence: ”feature” of the design

105

Page 109: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Monitoring: Managing Observability

• Note also that the state estimation error variances (i.e., the

diagonals of P ) will naturally grow in the absence of mea-

surements

• Going for a long time without incorporating a measurement

is equivalent to lack of observability in the associated states

• Use covariance analysis simulation to detect non-observability

• The only real solution is to add new measurements

106

Page 110: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Covariance Monitoring: Ensuring Positive Definiteness

• P is supposed to be positive definite

• This means that x′Px > 0 whenever x 6= 0

• States modeled as random constants or other deterministic

states can cause loss of positivity

• Add covariance bumping: Add small amounts of process

noise to diagonal elements of Q for these states

107

Page 111: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Replacing Navaids

• Replacing a given sensor with another of the same type usu-

ally requires no changes to the state model

– unless replacement sensor has significant errory dynamics

that need to be modeled (see adding new sensors and

state augmentation)

• Measurement noise covariance generally has to change how-

ever

108

Page 112: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Adding New Navaids

• What kinds of navaids are desirable?

• What are the steps involved in adding a new navaid?

109

Page 113: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Adding New Navaids

Desirable Characteristics:

• Navaids which render observable otherwise unobservable states

• Those having a simple relationship (preferably linear) to the

state vector

• Having only white noise error dynamics

110

Page 114: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

• State Vector Augmentation: Expanding the size of the state

vector

– i.e., adding new states

• Why?

– new navaids with their own error dynamics (e.g., GPS)

– correlated (non-white) process noise

– correlated (non-white) measurement noise

111

Page 115: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

• Why? (continued)

– Correlation ⇒ dynamics

∗ No dynamics in white noise

– If dynamics are present they must be modeled

– Otherwise, dynamic effects will be allocated to other states

112

Page 116: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

• How?

– model non-white noise as result of feeding white noisethrough a linear system

– new states are outputs of new integrators

• State transition matrix Φ and error covariance matrix P growas j2, where j is number of new states

• Geometry matrix H grows as m · j, where m is number ofmeasurements and j is number of new states

113

Page 117: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

Example: Ship Inertial Navigation Systems (SINS)

• Long mission times

– Especially submarines

• Position fixes insufficient to calibrate gyro bias drift w/o fur-

ther modeling

114

Page 118: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

Example: Ship Inertial Navigation Systems (SINS)

• Gyro bias drift due to slowly changing bias

• Can be modeled as random walk

• Random walk modeled as integrated white noise

• Kalman filter needed to estimate drift

115

Page 119: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

Example: Ship Inertial Navigation Systems (SINS)

• Assume platform tilts are kept close to zero through velocity

measurements damping the Schuler oscillations

• North-West-Up (NWU) coordinate frame (or West-South-

Up)

116

Page 120: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

Example: Ship Inertial Navigation Systems (SINS)

• Two angular position errors in radians: ψN and ψW

– Note ψN is a small angular rotation about the north axis

and thus induces a west position error.

– Similarly, ψW is a small rotation about the west axis and

thus induces a south position error.

• θU = ψZ−ψN tan(λ), where ψZ is platform azimuth error and

λ is the latitude.

117

Page 121: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

Example: Ship Inertial Navigation Systems (SINS)

• Error Dynamics:

ψN −ΩUψW = δgN

ψW + ΩUψN −ΩNθU = δgW

θU + ΩNψW = δgU

where δgN , δgW , δgU are non-white gyro bias drift errors and

ΩN = Ωcos(λ) and ΩU = Ωsin(λ) are components of earth

rate

118

Page 122: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

Example: Ship Inertial Navigation Systems (SINS)

• Since δgN , δgW , δgU are non-white, the question arises as to

what kind of model is appropriate

• Empirical data indicates that gyro biases exhibit random walk

behavior over time

• Since random walk is the integral of white noise, white noise

can be viewed (in some sense) as the derivative of random

walk

119

Page 123: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector

Example: Ship Inertial Navigation Systems (SINS)

• Hence, the following dynamics of random walk apply:

δgN = wN

δgW = wW

δgU = wU

where wN , wW , wU are white noise processes.

120

Page 124: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State VectorExample: Ship Inertial Navigation Systems (SINS)

• We use the random walk equations to augment the statedynamics equations

• Thus we now have a six-state model:

ψNψWθUδgNδgWδgU

=

0 ΩU 0 1 0 0−ΩU 0 ΩN 0 1 0

0 −ΩN 0 0 0 10 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

ψNψWθUδgNδgWδgU

+

0 0 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 1 0 00 0 0 0 1 00 0 0 0 0 1

000wNwWwU

121

Page 125: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector: Summary

• Straightforward: When new, relevant dynamic relations found,

simply add the states to the state vector and add the new

dynamics to the F and/or Φ matrix

• Use basic models such as low-order systems driven by white

noise to model new states

122

Page 126: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Augmenting the State Vector: Summary

• Some Popular Models

– random walk

– random constant

– random ramp

– Gauss-Markov (i.e., exponentially correlated)

– combinations of the above!

123

Page 127: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Exercises

1. Write a simple 1-state model for a gyro bias modeled as a

random constant

2. Now augment this model to a 2-state model by adding a

random walk

124

Page 128: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Day 4, Segment 4

Filter Redundancy and Fault Tolerance

Topics

• Combat Talon Weighting Scheme

• Detecting Faults

• Graceful Degradation

125

Page 129: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Combat Talon Weighting Scheme

• Two separate INS error dynamics filters

• Use error covariance outputs from each filter to weight state

estimates

126

Page 130: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Combat Talon Weighting Scheme

• Weighting scheme:

wi(x) =σj(x)

σ1(x) + σ2(x)

where i 6= j ∈ 1,2 and x is the parameter in question

127

Page 131: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Alternatives to Weighting: Decentralized Filtering

• Decentralized filtering without feedback

• Decentralized filtering with feedback

128

Page 132: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Decentralized Filtering without Feedback

• Assume two local filters (like CT I)

• Then for the global error covariance we have:

P−1 = P−11 +M−1

1 + P−12 +M−1

2 +M−1

where P1, P2 are updated local error covariances for each

filter, M1,M2 are extrapolated local error covariances prior

to update, and M is the global filter’s prior error covariance.

129

Page 133: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Decentralized Filtering without Feedback

• The global filter’s estimate is

x = P[P−11 x1 −M1m

−11 + P−1

2 x2 −M2m−12 +M−1m

]

where m1,m2,m are the local a priori estimates for local filters

1 and 2 and the global filter, respectively.

130

Page 134: Overview of Kalman Filter Theory and Navigation ...Overview of Kalman Filter Theory and Navigation Applications Day 4 Michael L. Carroll Feb 25, 2003 °c 2003 by Michael L. Carroll

Exercises

1. Let the x position error variance for filter 1 be 4 meters, that

of filter 2 16 meters. Calculate the weighted average latitude

given lat1=33.3 deg, lat2=33.21.

2. How would the decentralized filter’s estimate differ from the

weighted average?

131