Derivation of the Kalman Filter

Similar documents
Multiplying matrices by diagonal matrices is faster than usual matrix multiplication.

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to :

Conceptual Questions for Review

EE5120 Linear Algebra: Tutorial 1, July-Dec Solve the following sets of linear equations using Gaussian elimination (a)

Chapter 4. Solving Systems of Equations. Chapter 4

Introduction to Determinants

MIDTERM 1 - SOLUTIONS

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Lecture 12: Solving Systems of Linear Equations by Gaussian Elimination

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

Section 6.4. The Gram Schmidt Process

Matrix Solutions to Linear Equations

6-3 Solving Systems by Elimination

Block-tridiagonal matrices

Linear Algebra. and

x + 2y + 3z = 8 x + 3y = 7 x + 2z = 3

Inverses. Stephen Boyd. EE103 Stanford University. October 28, 2017

Chapter 2 Notes, Linear Algebra 5e Lay

Linear Algebra, Vectors and Matrices

P = A(A T A) 1 A T. A Om (m n)

(Linear equations) Applied Linear Algebra in Geoscience Using MATLAB

2. Every linear system with the same number of equations as unknowns has a unique solution.

Topics. Vectors (column matrices): Vector addition and scalar multiplication The matrix of a linear function y Ax The elements of a matrix A : A ij

Study Guide for Linear Algebra Exam 2

THE NULLSPACE OF A: SOLVING AX = 0 3.2

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Lecture 4: Applications of Orthogonality: QR Decompositions

Review problems for MA 54, Fall 2004.

[ Here 21 is the dot product of (3, 1, 2, 5) with (2, 3, 1, 2), and 31 is the dot product of

Lesson U2.1 Study Guide

Math 4377/6308 Advanced Linear Algebra

MAC1105-College Algebra. Chapter 5-Systems of Equations & Matrices

4 Elementary matrices, continued

Index. book 2009/5/27 page 121. (Page numbers set in bold type indicate the definition of an entry.)

Applied Numerical Linear Algebra. Lecture 8

Linear Algebra. The Manga Guide. Supplemental Appendixes. Shin Takahashi, Iroha Inoue, and Trend-Pro Co., Ltd.

MAT 610: Numerical Linear Algebra. James V. Lambers

MATH 1120 (LINEAR ALGEBRA 1), FINAL EXAM FALL 2011 SOLUTIONS TO PRACTICE VERSION

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

Problem Set (T) If A is an m n matrix, B is an n p matrix and D is a p s matrix, then show

7.6 The Inverse of a Square Matrix

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

Elementary Linear Algebra

Methods for Solving Linear Systems Part 2

Chapter 3 - From Gaussian Elimination to LU Factorization

1 - Systems of Linear Equations

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

Finite Math - J-term Section Systems of Linear Equations in Two Variables Example 1. Solve the system

Linear Algebra Primer

Applied Linear Algebra in Geoscience Using MATLAB

Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination

22m:033 Notes: 3.1 Introduction to Determinants

MATH 240 Spring, Chapter 1: Linear Equations and Matrices

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

3 Fields, Elementary Matrices and Calculating Inverses

Chapter 3: Theory Review: Solutions Math 308 F Spring 2015

Matrix Basic Concepts

Matrix decompositions

Linear Algebra, Summer 2011, pt. 3

The matrix will only be consistent if the last entry of row three is 0, meaning 2b 3 + b 2 b 1 = 0.

Chapter 7. Tridiagonal linear systems. Solving tridiagonal systems of equations. and subdiagonal. E.g. a 21 a 22 a A =

Introduction to Matrices

Worksheet for Lecture 25 Section 6.4 Gram-Schmidt Process

Math 103, Summer 2006 Determinants July 25, 2006 DETERMINANTS. 1. Some Motivation

This property turns out to be a general property of eigenvectors of a symmetric A that correspond to distinct eigenvalues as we shall see later.

Problem Set # 1 Solution, 18.06

Math 313 Chapter 1 Review

Linear Algebra. Min Yan

Linear Algebra and Matrix Inversion

Designing Information Devices and Systems I Discussion 4B

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

The definition of a vector space (V, +, )

Lecture 6. Numerical methods. Approximation of functions

Review Questions REVIEW QUESTIONS 71

c 1 v 1 + c 2 v 2 = 0 c 1 λ 1 v 1 + c 2 λ 1 v 2 = 0

Notes on Eigenvalues, Singular Values and QR

Matrices and systems of linear equations

pset2-sol September 7, 2017 a 2 3

4 Elementary matrices, continued

LS.1 Review of Linear Algebra

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

Linear Algebra. Solving Linear Systems. Copyright 2005, W.R. Winfrey

1 Last time: least-squares problems

MITOCW ocw f99-lec17_300k

Introduction to Systems of Equations

Sections 6.1 and 6.2: Systems of Linear Equations

ENGI 9420 Lecture Notes 2 - Matrix Algebra Page Matrix operations can render the solution of a linear system much more efficient.

Solving Consistent Linear Systems

Elementary Row Operations on Matrices

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 6

DETERMINANTS, COFACTORS, AND INVERSES

18.06SC Final Exam Solutions

CS 246 Review of Linear Algebra 01/17/19

Vector, Matrix, and Tensor Derivatives

Math 123, Week 2: Matrix Operations, Inverses

1 Implementation (continued)

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

Jim Lambers MAT 610 Summer Session Lecture 1 Notes

Image Registration Lecture 2: Vectors and Matrices

MTH 2032 Semester II

Transcription:

Derivation of the Kalman Filter Kai Borre Danish GPS Center, Denmark

Block Matrix Identities The key formulas give the inverse of a 2 by 2 block matrix, assuming T is invertible: T U 1 L M. (1) V W N P Our applications have symmetric matrices. All blocks on the diagonal are symmetric; the blocks off the diagonal are U V T and M N T. The key to Kalman s success is that the matrix to be inverted is block tridiagonal. Thus U and V are nonzero only in their last block entries, and T itself is block tridiagonal. But the general formula gives the inverse

without using any special properties of T, U, V, W : L T 1 T 1 U PV T 1 M T 1 U P N PV T 1 (2) P (W V T 1 U) 1. The simplest proof is to multiply matrices and obtain I. The actual derivation of (2) is by block elimination. Multiply the Ì row T Í U by V T 1 and subtract from V W Í: Ì I 0 T U V T 1 I V W T U. (3) 0 W V T 1 U

The two triangular matrices are easily inverted, and then block multiplication produces (2). This is only Gaussian elimination with blocks. In the scalar case the last corner is W V U/T. In the matrix case we keep the blocks in the right order! The inverse of that last entry is P. Now make a trivial but valuable observation. We could eliminate in the opposite order. This means that we subtract U W 1 times the second row Ì V W Í from the first row Ì T U Í: I U W 1 0 I T V U W T U W 1 V 0 V W Inverting this new right side yields different (but still correct) formulas for the blocks L, M, N, P in the inverse matrix..

We pay particular attention to the (1, 1) block. It becomes L (T U W 1 V) 1. That is completely parallel to P (W V T 1 U) 1, just changing letters. Now compare the new form of L with the form in (2). Their equality is the most important formula in matrix update theory. We only mention four of its originators: Sherman Morrison Woodbury Schur: (T U W 1 V) 1 T 1 T 1 U(W V T 1 U) 1 V T 1. (4) We are looking at this as an update formula, when the matrix T is perturbed by U W 1 V. Often this is a perturbation of low rank. Previously we looked at (1) as a bordering formula, when the matrix T was bordered by U and V and W. Well, matrix theory is beautiful.

Derivation of the Kalman Filter We will base all steps on the two previous matrix identities. Those identities come from the inverse of a 2 by 2 block matrix. The problem is to update the last entries ( of T 1 ) 1, when new rows are added to the big matrix. Those new rows will be of two kinds, coming from the state equation and the observation equation. A typical filtering step has two updates, from k 1 to k (by including the state equation) and then

to k (by including the observation equation): 1 A 0 F 0 I A 1 2 A 0 F 0 I A 1 F 1 I 2 A 0 F 0 I A 1 F 1 I. A 2

The step to k adds a new row and column (this is bordering). The second step only adds a new row (this is updating). The least-squares solution Çx k 1 k 1 for the old state leads to Çx k k 1 (using the state equation) and then to Çx k k (using the new observation b k ). Remember that least squares works with the symmetric block tridiagonal matrices Ì k T k 1 k k. So we need the change in Ì k 1 when k 1 is bordered and then updated: Bordering by the row R [ 0... F k 1 I ] adds R T ǫ,k 1 R Updating by the row W [ ] 0... 0 A k adds W T e,k 1 W.

We are multiplying matrices using columns times rows. Every matrix product B A is the sum of (column j of B) times (row j of A). In our case B is the transpose of A, and these are block rows and columns. The matrices ǫ,k 1 least squares. and 1 e,k appear in the middle, because this is weighted The complete system, including all errors up to ǫ k and e k in the error vector k, is k Ü k k k : 2 Ü 2 A 0 F 0 I A 1 F 1 I A 2 x 0 x 1 x 2 b 0 0 b 1 0 b 2 e 0 1 e 1 2 e 2 2 2. (5)

The weight matrix 1 k 1 2 for the least-squares solution is block diagonal: 1 e,0... 1 ǫ,2 1 e,2 Our task is to compute the last corner block P k k of the matrix ( T k 1 k k ) 1. We do that in two steps. The prediction finds P k k 1 from the bordering step, when the state row is added to k 1 (producing k ). Then the correction finds P k k when the observation row is included too..

The second task is to compute the prediction Çx k k 1 and correction Çx k k for the new state vector x k. This is the last component ÇÜ of k. If we compute all components ÇÜ of k, then we are smoothing old estimates as well as filtering to find the new Çx k k. Naturally affects all the update formulas. The derivation of these formulas will be simpler if we begin with the case I, in which all noise is white. Then we adjust the formulas to account for the weight matrices. We compute the last entries in ( T 1 ) 1 and then in T 1 ) 1 T 1. These entries are P ( k k and Çx k k. Block matrices will be everywhere.

There is another approach to the same result. Instead of working with T (which here is block tridiagonal) we could orthogonalize the columns of. This Gram-Schmidt process factors into a block É orthogonal times a block bidiagonal Ê. Those factors are updated at each step of the square root information filter. ÉÊ This approach adds new insight about orthogonalizing the innovations.

Updates of the Covariance Matrices We now compute the blocks P k k 1 and P k k in the lower right corners of ( T k k) 1 and ( T k k) 1. Then we operate on the right side, to find the new state Çx k k. Remember that k comes by adding the new row Ì V Ì 0... F k 1 I Í. Then T k 1 k 1 grows to k T k by adding V I T Ì V I Í: Í Ì T k k T k 1 k 1 V T V V V T I I Í. (6)

Because V is zero until its last block, equation (6) is really the addition of a 2 by 2 block in the lower right corner. This has two effects at once. It perturbs the existing matrix T T k 1 k 1 and it borders the result T new. The perturbation is by V T V. The bordering is by the row V and the column V T and the corner block I. Therefore the update formula for T 1 new goes inside the bordering formula: Update to T V T V : T 1 new T 1 T 1 V T (I V T 1 V T ) 1 V T 1 Border by V, V T, I : P (I V T 1 new V T ) 1. Substitute the update into the bordering formula and write Z for the block

V T 1 V T. This gives the great simplification P I Z: P (I V ( T 1 T 1 V T (I Z) 1 V T 1) V T) 1 ( I Z Z(I Z) 1 Z ) 1 I Z. (7)

This block P is P k k 1. It is the corner block ( in k T k) V I Í has been included, and the matrix Z is Ì V T 1 V T [ ] 0... F k 1....... P k 1 k 1 1. The row 0. F T k 1 F k 1 P k 1 k 1 F T k 1. Therefore P I Z in equation (7) is exactly the Kalman update formula P k k 1 I F k 1 P k 1 k 1 F T k 1. (8)

The identity matrix I will change to ǫ,k when the covariance of the state equation error k is accounted for. Now comes the second half of the update. The new row W 0... 0 A Ì k enters from the observation equations. This Í row is placed below k to give k. Therefore W T W is added to k T k to give T k k. We write for the big tridiagonal matrix k T k before this update, and we use the update formula (4) for the new inverse: ( T k k) 1 ( W T I W) 1 1 1 W T (I W 1 W T ) 1 W 1. (9) Look at W 1 W T. The row W Ì 0... 0 A k Í is zero until the last block. The last corner of 1 is P k k 1, found above.

Therefore W 1 W T reduces immediately to A k P k k last block of 1 W T is P k k 1 A T k. 1 A T k. Similarly the Now concentrate on the last block row in equation (9). Factoring out 1 on the right, this last row of ( T k k) 1 is ( I Pk k 1 A T k (I A k P k k 1 A T k ) 1 A k ) (last row of 1 ) (I K k A k ) ( last row of ( T k k) 1). (10) In particular the final entry of this last row is the corner entry P k k in ( T k k) 1 : P k k (I K k A k )P k k 1. (11)

This is the second half of the Kalman filter. It gives the error covariance P k k from P k k 1. The new P uses the observation equation b k A k x k e k, whereas the old P doesn t use it. The matrix K that was introduced to simplify the algebra in (10) is Kalman s gain matrix: K k P k k 1 A T k ( I Ak P k k 1 A T k ) 1. (12) This identity matrix I will change to e,k when the covariance of the observation error is accounted for. You will see in a later equation for Çx k k why we concentrated on the whole last row ( of T k k) 1, as well as its final entry P k k in (11).