Optimal State Estimation

Chapter 9.4 - Fixed-Interval Smoothing

9.4 FIXED-INTERVAL SMOOTHING

Suppose we have measurements for a fixed time interval. In fixed-interval smoothing we seek an estimate of the state at some of the interior points of the time interval. During the smoothing process we do not obtain any new measurements. Section 9.4.1 discusses the forward-backward approach to smoothing, which is perhaps the most straightforward smoothing algorithm. Section 9.4.2 discusses the RTS smoother, which is conceptually more difficult but is computationally cheaper than forward-backward smoothing.

9.4.1 Forward-backward smoothing

Suppose we want to estimate the state xmbased on measurements from k = 1 to k = N, where N > m. The forward-backward approach to smoothing obtains two estimates of xm. The first estimate, f, is based on the standard Kalman filter that operates from k = 1 to k = m. The second estimate, b, is based on a Kalman filter that runs backward in time from k = N back to k = m. The forward-backward approach to smoothing combines the two estimates to form an optimal smoothed estimate. This approach was first suggested in [Pra69].

Suppose that we combine a forward estimate f of the state and a backward estimate bof the state to get a smoothed estimate of x as follows:

09_04_Optimal_State_Estimation-1.jpg

where Kf and Kb are constant matrix coefficients to be determined. Note that f and bare both unbiased since they are both outputs from Kalman filters. Therefore, if x is to be unbiased, we require Kf+ Kb= I (see Problem 9.9). This gives

09_04_Optimal_State_Estimation-2.jpg

The covariance of the estimate can then be found as

09_04_Optimal_State_Estimation-3.jpg

where ef = x - xf , eb = x - xb, and we have used the fact that = 0. The estimates f and b are both unbiased, and ef and ebare independent (since they depend on separate sets of measurements). We can minimize the trace of P with respect to Kf using results from Equation (1.66) and Problem 1.4:

09_04_Optimal_State_Estimation-4.jpg

where Pf = is the covariance of the forward estimate, and Pb = is the covariance of the backward estimate. Setting this equal to zero to find the optimal value of Kfgives

09_04_Optimal_State_Estimation-5.jpg

The inverse of (Pf + Pb) always exists since both covariance matrices are positive definite. We can substitute this result into Equation (9.57) to find the covariance of the fixed-interval smoother as follows:

09_04_Optimal_State_Estimation-6.jpg

Using the identity (A + B) -1 = B - 1(AB -1 + I) -1 (see Problem 9.2), we can write the above equation as

09_04_Optimal_State_Estimation-7.jpg

Multiplying out the first term, and again using the identity (A + B) -1 = B - 1(AB -1 + I) -1on the last two terms, results in

09_04_Optimal_State_Estimation-8.jpg

From the matrix inversion lemma of Equation (1.39) we see that

09_04_Optimal_State_Estimation-9.jpg

Substituting this into Equation (9.62) gives

09_04_Optimal_State_Estimation-10.jpg

These results form the basis for the fixed-interval smoothing problem. The system model is given as

09_04_Optimal_State_Estimation-11.jpg

Suppose we want a smoothed estimate at time index m. First we run the forward Kalman filter normally, using measurements up to and including time m.

  1. Initialize the forward filter as follows:
  2. 09_04_Optimal_State_Estimation-12.jpg
  3. For k = 1, …, m, perform the following:
  4. 09_04_Optimal_State_Estimation-13.jpg

At this point we have a forward estimate for xm, along with its covariance. These quantities are obtained using measurements up to and including time m.

The backward filter needs to run backward in time, starting at the final time index N. Since the forward and backward estimates must be independent, none of the information that was used in the forward filter is allowed to be used in the backward filter. Therefore, must be infinite:

09_04_Optimal_State_Estimation-15.jpg

We are using the minus superscript on to indicate the backward covariance at time N before the measurement at time N is processed. (Recall that the filtering is performed backward in time.) So will be updated to obtain after the measurement at time N is processed. Then it will be extrapolated backward in time to obtain , and so on.

Now the question arises how to initialize the backward state estimate 09_04_Optimal_State_Estimation-19.jpg at the final time k = N. We can solve this problem by introducing the new variable

09_04_Optimal_State_Estimation-20.jpg

A minus or plus superscript can be added on all the quantities in the above equation to indicate values before or after the measurement at time k is taken into account. Since = ∞ it follows that

09_04_Optimal_State_Estimation-21.jpg

The infinite boundary condition on means that we cannot run the standard Kalman filter backward in time because we have to begin with an infinite covariance. Instead we run the information filter from Section 6.2 backward in time. This can be done by writing the system of Equation (9.65) as

09_04_Optimal_State_Estimation-22.jpg

Note that should always exist if it comes from a real system, because Fk comes from a matrix exponential that is always invertible (see Sections 1.2 and 1.4). The backward information filter can be written as follows.

  1. Initialize the filter with = 0.

  2. For k = N, N-1, … , perform the following:
09_04_Optimal_State_Estimation-24.jpg

The first form for above requires the inversion of . Consider the first time step for the backward filter (i.e., at k = N). The information matrix is initialized to zero, and then the first time through the above loop we set = . If there are fewer measurements than states, will always be singular and, therefore, will be singular at k = N. Therefore, the first form given above for will not be computable. In practice we can get around this by initializing to a small nonzero matrix instead of zero.

The third form for above has its own problems. It does not require the inversion of , but it does require the inversion of Qk-1. So the third form of is not computable unless Qk-1 is nonsingular. Again, in practice we can get around this by making a small modification to Qk-1 so that it is numerically nonsingular.

Since we need to update sk = bkbk instead of bk (because of initialization issues) as defined in Equation (9.69), we rewrite the update equations for the state estimate as follows:

09_04_Optimal_State_Estimation-38.jpg

Now note from Equation (6.33) that we can write = + , and Kbk = . Substituting these expressions into the above equation for gives

09_04_Optimal_State_Estimation-38.jpg

We combine this with Equation (9.72) to write the backward information filter as follows.

  1. Initialize the filter as follows:
  2. 09_04_Optimal_State_Estimation-42.jpg

  3. For k = N, N - 1, …, m + 1, perform the following:
  4. 09_04_Optimal_State_Estimation-43.jpg
  5. Perform one final time update to obtain the backward estimate of xm:
  6. 09_04_Optimal_State_Estimation-44.jpg

    Now we have the backward estimate and its covariance . These quantities are obtained from measurements m + 1, m + 2, …, N.

After we obtain the backward quantities as outlined above, we combine them with the forward quantities from Equation (9.67) to obtain the final state estimate and covariance:

09_04_Optimal_State_Estimation-47.jpg

We can obtain an alternative equation for m by manipulating the above equations. If we substitute for Kf in the above expression for m then we obtain

09_04_Optimal_State_Estimation-48.jpg

Using the matrix inversion lemma on the rightmost inverse in the above equation and performing some other manipulations gives

09_04_Optimal_State_Estimation-49.jpg

where we have relied on the identity(A + B) -1 = B - 1(AB -1 + I) -1 (see Problem 9.2). The coefficients of and in the above equation both have a common factor which can be written as follows:

09_04_Optimal_State_Estimation-52.jpg

Therefore, using Equation (9.78), we can write Equation (9.80) as

09_04_Optimal_State_Estimation-53.jpg

Figure 9.9 illustrates how the forward-backward smoother works.

09_04_Optimal_State_Estimation-54.jpg

Figure 9.9 This figure illustrates the concept of the forward-backward smoother. The forward filter is run to obtain a posteriori estimates and covariances up to time m. Then the backward filter is run to obtain a priori estimates and covariances back to time m (i.e., a priori from a reversed time perspective). Then the forward and backward estimates and covariances at time m are combined to obtain the final estimate m and covariance Pm.

■ EXAMPLE 9.3

In this example we consider the same problem given in Example 9.1. Suppose that we want to estimate the position and velocity of the vehicle at t = 5 seconds. We have measurements every 0.1 seconds for a total of 10 seconds. The standard deviation of the measurement noise is 10, and the standard deviation of the acceleration noise is 10. Figure 9.10 shows the trace of the covariance of the estimation of the forward filter as it runs from t = 0 to t = 5, the backward filter as it runs from t = 10 back to t = 5, and the smoothed estimate at t = 5. The forward and backward filters both converge to the same steady-state value, even though the forward filter was initialized to a covariance of 20 for both the position and velocity estimation errors, and the backward filter was initialized to an infinite covariance. The smoothed filter has a covariance of about 7.6, which shows the dramatic improvement that can be obtained in estimation accuracy when smoothing is used.

09_04_Optimal_State_Estimation-55.jpg

Figure 9.10 This shows the trace of the estimation-error covariance for Example 9.3. The forward filter runs from t = 0 to t = 5, the backward filter runs from t = 10 to t = 5, and the trace of the covariance of the smoothed estimate is shown at t = 5.

9.4.2 RTS smoothing

Several other forms of the fixed-interval smoother have been obtained. One of the most common is the smoother that was presented by Rauch, Tung, and Striebet, usually called the RTS smoother [Rau65]. The RTS smoother is more computationally efficient than the smoother presented in the previous section because we do not need to directly compute the backward estimate or covariance in order to get the smoothed estimate and covariance. In order to obtain the RTS smoother, we will first look at the smoothed covariance given in Equation (9.78) and obtain an equivalent expression that does not use Pbm. Then we will look at the snoothed estimate given in Equation (9.78), which uses the gain Kf, which depends on Pbm, and obtain an equivalent expression that does not use Pbm or bm.

9.4.2.1 RTS covariance updateFirst consider the smoothed covariance given in Equation (9.78). This can be written as

09_04_Optimal_State_Estimation-57.jpg

where the second expression comes from an application of the matrix inversion lemma to the first expression (see Problem 9.3). Prom Equation (9.72) we see that

09_04_Optimal_State_Estimation-58.jpg

Substituting this into the expression (+ ) -1 gives the following:

09_04_Optimal_State_Estimation-60.jpg

From Equations (6.26) and (9.76) recall that

09_04_Optimal_State_Estimation-61.jpg

We can combine these two equations to obtain

09_04_Optimal_State_Estimation-62.jpg

Substituting this into Equation (9.78) gives

09_04_Optimal_State_Estimation-63.jpg

Substituting this into Equation (9.85) gives

09_04_Optimal_State_Estimation-64.jpg

where the last equality comes from an application of the matrix inversion lemma. Substituting this expression into Equation (9.83) gives

09_04_Optimal_State_Estimation-65.jpg

where the smoother gain Kmis given as

09_04_Optimal_State_Estimation-66.jpg

The covariance update equation for Pm is not a function of the backward covariance. The smoother covariance Pmcan be solved by using only the forward covariance Pfm , which reduces the computational effort (compared to the algorithm presented in Section 9.4.1).

9.4.2.2 RTS state estimate updateNext we consider the smoothed estimate m given in Equation (9.78). We will find an equivalent expression that does not use Pbm or bm . In order to do this we will first need to establish a few lemmas.

Lemma 1

09_04_Optimal_State_Estimation-67.jpg

Proof: From Equation (9.67) we see that

09_04_Optimal_State_Estimation-68.jpg

Rearranging this equation gives

09_04_Optimal_State_Estimation-69.jpg

Premultiplying both sides by and postmultiplying both sides by gives thedesired result.
QED

Lemma 2The a posteriori covariance of the backward filter satisfies the equation

09_04_Optimal_State_Estimation-73.jpg

Proof: From Equation (9.78) we obtain

09_04_Optimal_State_Estimation-74.jpg

QED

Lemma 3The covariances of the forward and backward filters satisfy the equation

09_04_Optimal_State_Estimation-75.jpg

Proof: From Equation (9.67) and (9.72) we see that

09_04_Optimal_State_Estimation-76.jpg

Adding these two equations and rearranging gives

09_04_Optimal_State_Estimation-77.jpg

QED

Lemma 4The smoothed estimate k can be written as

09_04_Optimal_State_Estimation-78.jpg

Proof: From Equations (9.69) and (9.82) we have

09_04_Optimal_State_Estimation-79.jpg

From Equation (9.76) we see that

09_04_Optimal_State_Estimation-80.jpg

Substitute this expression for , and the expression for from Equation (9.67),into Equation (9.101) to obtain

09_04_Optimal_State_Estimation-83.jpg

Now substitute for Kfk [from Equation (9.67)] in the above equationto obtain

09_04_Optimal_State_Estimation-85.jpg

QED

Lemma 5

09_04_Optimal_State_Estimation-86.jpg

Proof: Recall from Equations (6.26) and (9.72) that

09_04_Optimal_State_Estimation-87.jpg

Combining these two equations gives

09_04_Optimal_State_Estimation-88.jpg

where we have used Equation (9.78) in the above derivation. Substitute this expression for into Equation (9.97) to obtain

09_04_Optimal_State_Estimation-90.jpg

Invert both sides to obtain

09_04_Optimal_State_Estimation-91.jpg

Now apply the matrix inversion lemma to the term in the above equation. This results in

09_04_Optimal_State_Estimation-93.jpg

QED

With the above lemmas we now have the tools that we need to obtain an alternate expression for the smoothed estimate. Starting with the expression for in Equation (9.76), and substituting the expression for from Equation (9.72) gives

09_04_Optimal_State_Estimation-96.jpg

Rearranging this equation gives

09_04_Optimal_State_Estimation-97.jpg

Multiplying out this equation, and premultiplying both sides by , gives

09_04_Optimal_State_Estimation-99.jpg

Substituting for Kk-1 from Equation (9.92) gives

09_04_Optimal_State_Estimation-100.jpg

Substituting in this expression for from Equation (9.95) gives

09_04_Optimal_State_Estimation-100.jpg

Substituting for + from Equation (9.97) on both sides of this expression gives

09_04_Optimal_State_Estimation-103.jpg

Premultiplying both sides by gives

09_04_Optimal_State_Estimation-105.jpg

Substituting Equation (9.105) for

09_04_Optimal_State_Estimation-107.jpg

Now from Equation (9.105) we see that

09_04_Optimal_State_Estimation-108.jpg

So we can add the two sides of this equation to the two sides of Equation (9.118) to get

09_04_Optimal_State_Estimation-109.jpg

Now use Equation (9.100) to substitute for Pk in the above equation and obtain

09_04_Optimal_State_Estimation-111.jpg

Rearrange this equation to obtain

09_04_Optimal_State_Estimation-112.jpg

From Equation (9.106) we see that . Also note that part of the coefficient of on the left side of the above equation can be expressed as

09_04_Optimal_State_Estimation-113.jpg

From Equation (9.67) we see that = . Therefore Equation (9.122) can be written as

09_04_Optimal_State_Estimation-115.jpg

Now substitute for Pkfrom Equation (9.90) and use Equation (9.91) in the above equation to obtain

09_04_Optimal_State_Estimation-115.jpg

Premultiplying both sides by gives

09_04_Optimal_State_Estimation-117.jpg

Now use Equation (9.91) to notice that the coefficient of on the left side of the above equation can be written as

09_04_Optimal_State_Estimation-119.jpg

Using Equation (9.90) to substitute for allows us to write the above expression as

09_04_Optimal_State_Estimation-121.jpg

Since this is the coefficient of in Equation (9.126), we can write that equation as

09_04_Optimal_State_Estimation-123.jpg

Now from Equations (9.78) and (9.82) we see that

09_04_Optimal_State_Estimation-124.jpg

From this we see that

09_04_Optimal_State_Estimation-125.jpg

Rewriting the above equation with the time subscripts (k - 1) and then substituting for the left side of Equation (9.129) gives

09_04_Optimal_State_Estimation-126.jpg

from which we can write

09_04_Optimal_State_Estimation-127.jpg

This gives the smoothed estimate k without needing to explicitly calculate the backward estimate. The RTS smoother is implemented by first running the standard Kalman filter of Equation (9.67) forward in time to the final time, and then implementing Equations (9.90), (9.91), and (9.133) backward in time. The RTS smoother can be summarized as follows.

The RTS smoother

  1. The system model is given as follows:
  2. 09_04_Optimal_State_Estimation-128.jpg

  3. Initialize the forward filter as follows:
  4. 09_04_Optimal_State_Estimation-129.jpg

  5. For k = 1, … , N (where N is the final time), execute the standard forward Kalman filter:
  6. 09_04_Optimal_State_Estimation-130.jpg

  7. Initialize the RTS smoother as follows:
  8. 09_04_Optimal_State_Estimation-131.jpg

  9. For k = N — 1, …, 1,0, execute the following RTS smoother equations:
09_04_Optimal_State_Estimation-132.jpg

 

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Engineering Consulting Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.