Free Essay

Kal Man

In:

Submitted By 1q2w
Words 5610
Pages 23
The Kalman Filter
Max Welling
California Institute of Technology 136-93 Pasadena, CA 91125 welling@vision.caltech.edu
Until now we have only looked at systems without any dynamics or structure over time. The models had spatial structure but were de ned at one moment in time, i.e. they were \static". In this lecture we will analyse a powerfull dynamic model, which could be characterized as factor analysis over time, although the number of observed features is not necessarily larger than the number of factors. The idea is again to compute only the mean and the covariance statistics, i.e. to characterize the probabilities by Gaussians. This has the advantage of being completely tractible (for strongly nonlinear systems the Gaussian assumption can no longer hold). The power of the Kalman Filter (KF), is that it operates on-line. This implies, that to compute the best estimate of the state and its uncertainty, we can update the previous estimates by the new measurement. This implies that we don't have to consider all the previous data again, to compute the optimal estimates; we only need to consider the estimates from the previous time step and the new measurement. So what are KFs usually used for, or what do they model? It is not hard to motivate the KF, because in practice it can be used for almost \everthing that moves". Popular applications include, navigation, guidance, radar tracking, sonar ranging, satellite orbit computation, stock prize prediction, etc. These applications can summarized as denoising, tracking and control. It is used in all sorts of elds, like engineering, seismology, bioengineering, econometrics etc. For instance, when the Eagle landed on the moon, it did so with a KF. Also, gyroscopes in airplanes use KFs. And the list goes on and on. The main idea is that we like to estimate a state of some sort (location and velocity of airplane) and its uncertainty. However, we do not directly observe these states. We only observe some measurements from an array of sensors, which are noisy. As an additional complication, the states evolve in time, also with its own noise or uncertainties. The question now becomes, how can we still optimally use our measurements to estimate the unobserved (hidden) states and their uncertainties. In the following we will rst describe the Kalman Filter and derive the KF equations. We assume that the parameters of the system are xed (known). Then we derive the Kalman Smoother equations, which allow us to use measurements forward in time to help predict the state at the current time better. Because these estimates are usually less noisy than the if we used measurements up till the current time only, we say that we smooth the state estimates. Next, we will show how to employ the Kalman Filter and smoother equations to e ciently estimate the parameters of the model from training data. This will then be, not surprisingly, another instance of the EM algorithm. In the appendix you will nd some usefull lemma's and matrix equalities, together with the derivation of the \lag-one smoother", which is needed for learning. Let me brie y describe an example. Consider a ship at sea which has lost its bearings. They need to estimate their current position using the positions of the stars. In the meantime the ships moves on on a wavy sea. The question becomes, how can we incorporate the measurement optimally, to estimate the ships location at sea. Let's assume that the model for the ship's location over time is given by, yt+1 = yt + c + wt (1)

1 Introduction

2 Introductory Example

^ Let's also assume we have some estimate yt of the location at some time t and some uncertainty t2 . How does this change as the ships sails for one second. Of course, it will drift in the direction of its velocity by a distance c. However, the uncertainty grows, due to the waves. This is expressed as, ^ ^ yt+1 = yt + c (3)
1

This contains a drift term (constant velocity c), and a noise term1 . A noisy measurement is described by, (2) xt = yt + vt

The constant drift term will not be used in the main body of these classnotes

1

The uncertainty is given by,

(4) If, we do not do any measurements, the uncertainty in the position will keep growing, until we have no clue anymore as to where we are. If we add the information of a measurement, the nal estimate is weighted average between the observed position and the previous estimate, t 2 = 2+ 2 +1 t w

^ yt0 +1 =

We observe that if we have in nite con dence in the measurement v ! 0, then the new location estimate is simply equal to the measurement. Also, if we have in nite con dence in the previous estimate, the measurement is ignored. For the new uncertainty we nd, This is also easy to interpret, since it says that if one of the uncertainties dissappears, the total uncertainty disappears, since the other estimate can simply be ignored in that case. Notice that the uncertainty always decreases or stays equal, by adding the measurement. The estimates for the location and uncertainty, incorporatating the measurement, can be rewritten as follows, ^ ^ ^ yt0 +1 = yt+1 + Kt+1(xt+1 yt+1) (7) 02 2 (8) Kt+1) t+1 t+1 = (1
2 2 0 2 = t+1 v t+1 2 2 t+1 + v

2 2 t+1 v 2+1 + v yt+1 + t+1 + v xt+1 2 2^ 2 t

(5)

(6)

Kt+1 =

From this we can see that the state estimate is corrected by the measurement error, multiplied by a gain factor (the Kalman gain). If the gain is zero, no attention is paid to the measurement, if its one, we simply use the measurement as our new state estimate. Similarly for the uncertainties, if the measurement is in nitely accurate, the gain is one, which implies that there is no uncertainty left. On the other hand, if the measurement is worthless, the gain is zero, which therefore does not decrease the overall uncertainty. The above one dimensional example will be generalized to higher dimensions in the following.

2 t+1 2+1 + v 2 t

(9)

3 The Model

Let us rst introduce the state of the KF yt at time t. The state is a vector of dimension d and remains unobserved. At every time t we alo have a k dimenional vector of observations xt , which depend on the state and some additive Gaussian noise. We will assume the following dynamical model for the KF: yt+1 = Ayt + wt (10) xt = Byt + vt (11) Note that the dynamics is governed by a Markov process, i.e. the state at yt+1 is independent of all other states, given yt . The evolution noise and the measurement noise are assumed white and Gaussian, i.e. distributed according to, w Gw 0; Q] (12) v Gv 0; R] (13) The noise vectors vt and wt are also assumed to be uncorrelated with the the state yt . From this we simply derive, E yt ; vk ] = 0 8 t; k (14) E yt; wk ] = 0 t k (15) E xt ; vk ] = 0 t k 1 (16) E xt; wk ] = 0 t k (17) (18) E vt; wk ] = 0 8 t; k E vt ; vk ] = 0 t 6= k; = R t = k (19) (20) E wt; wk ] = 0 t 6= k; = Q t = k 2

The above model could be considered as a factor analysis model over time, i.e. at every instant we have a FA model, where the factors now depend on the factors of a previous time step. The initial state y1 is distributed according to y1 G ; ]: (21) It is easy to generalize this model to include a `drift' and external inputs. The drift is a constant change expressed by adding to the dynamical equation. yt+1 = Ayt + + wt 0 = A0 yt + wt (22)
0 where we incorporated the constant again through the rede nitions A0 = A; ] and yt = yt ; 1]. For the external inputs, we let the evolution depend on a l dimensional vector of inputs, ut , as follows, yt+1 = Ayt + Cut + wt (23)

This model is used when we want to control the system. We could even let the parameters fA; ; C; g depend on time. However, in the rest of this chapter we will assume the simplest case, i.e. a linear evolution without drift or inputs, and a linear measurement equation, with white uncorrelated noise. Since the initial state is Gaussian and the evolution equation is linear, this implies that the state at later times will remain Gaussian. We want to be able to estimate the state and the covariance of the state at any time t, given a set of observations x = fx1 ; :::; x g. If is equal to the current time t we say that we lter the state. If is smaller than t we say that we predict the state and nally, if is larger the t we say that we smooth the state. The main probability of interest is, p(yt jx ); (24) since it conveys all the information about the state yt at time t, given all the observations up to time . Since we are assuming that this probability is Gaussian, we only need to calculate its mean and covariance, denoted by ^ yt = E ytjx ] (25) ~ ~ Pt = E yt yt jx ] (26) ^ ~ where we de ned yt = yt yt , i.e. the state prediction error. Notice that these quantities still depend on the random variables x and are therefore random variables themselves. We will now prove however that the covariance P does actually not depend on x . P may be considered as a parameter therefore in the ~ following. To proof the above claim we simply show that the correlation between the random variables yt and x vanishes. For normally distributed random variables this implies that they are independent. ~ ^ Lemma 3 The random variables yt = yt yt and x = fx1 ; :::; x g are independent. ^ E yt x ] E yt (x ) x ] = Z dyt dx p(yt ; x ) yt x dyt dx p(yt ; x
Z Z

4 General Properties

proof

) yt x dyt dx p(x ) p(yt jx ) yt x = 0 since p(yt ; x ) = p(x ) p(yt jx ) From this we derive the following corollary, ^ ^ ~ ~ Pt1 ;t2 = E yt1 yt2 ] = E yt1 yt2 ] E yt1 yt2 ]

Z

dx p(x

)x

Z

dyt p(yt jx

) yt

(27)

^t Another usefull result we will need is the fact that the predicted measurement error "t = xt Byt 1 is independent of the measurements xt 1 . The predicted measurement error is also called the innovation, since it represents that part of the new measurement xt that can not be predicted using knowledge of the xt 1 measurements, since they are independent. 3

^ Lemma 4 The random variables "t = xt Bytt 1 and xt 1 = fx1; :::; xt 1g are independent. Proof The proof is simple, and proceeds again by proving that they are uncorrelated, ^ E "t; xt 1] = E xtxt 1 ] BE ytt 1 xt 1 ] t 1 ^t = BE yt x ] + BE vt xt 1 ] BE yt 1 xt 1 ] ~t = BE yt 1 xt 1 ] + BE vt xt 1 ] = 0; ~t where we used the result that yt 1 is independent of xt 1 proved directly above and (16). Notice, that since the innovation "t 1 is a function of xt 1 , this also implies the following corollary, for = 1; :::; t 1 (28) ^ Before we proceed we would like to remark we have not well motivated yt as the preferred estimate of the state yt given data x . Other possible choices could be, the most likely state given the data, or the most likely sequence of states y1 ; :::; yt given the data. It turns out that for Gaussian distributed random ^ variables, these objectives are equivalent. On top of that, it turns out that the yt is also the minimal variance estimator, i.e. it minimizes Pt .

E "t" ] = 0

5 Kalman Filter Equations
We will now proceed to derive the Kalman lter equations (i.e. = t). First write, p(yt jxt ) = p(xt jyt ) p(yt jxt 1 ) ; p(xt jxt 1 )

(29) (30) (31) (32) (33)

where

p(yt jx

t

1) =

Z

dyt 1 p(yt jyt 1 ) p(yt 1 jxt 1 )

The denominator in (29) is an unimportant normalization factor. The remaining densities are given by, = Gx Byt ; R] p(yt jyt 1 ) = Gy Ayt 1 ; Q] p(xt jyt ) t t

The equations (29) and (30) have interesting interpretations as a reactive reenforcement due to an observation and a di usion equation for the Gaussian probability between observations. Equation (29) is basically applying Bayes law in the same way as we did for Bayesian learning, i.e. we are updating the probability distribution of an unknown random variable by including evidence. This has the e ect of making the distribution peakier, i.e. less uncertain. The second equation (30) evolves the hidden state from one instant to the next, without considering more evidence. This has the e ect of making the distribution less peakier, i.e. introducing more uncertainty. Together, these equations express p(yt jxt ) in terms of p(yt 1 jxt 1 ) and may be used recursively. It is now easy to verify that in case of a prediction only the equation (30) remains, i.e. Z p(yt jx ) = dyt 1 p(yt jyt 1 ) p(yt 1 jx ) t, i.e. smoothing, is more di cult and will be dealt with later. Let us return to the ^t ltering case. We like to calculate the mean yt 1 and covariance Pt 1 of the pdf p(yt jxt 1 ), expressed in t t 1 t 1 ^ terms of the mean yt 1 and covariance Pt 1 of the density p(yt 1 jxt 1 ). Notice that these two estimators determine the densities completely, since they are Gaussian. For the mean we nd, ^ ytt
1 =

E ytjxt 1 ] = AE yt 1 jxt 1 ] + E wt 1 jxt 1 ] ^t 1 = Ayt 1
4

(35)

where we have used (17) and the fact that w has zero mean (12). For the covariance we write we rst write, ~ ytt
1 = (yt

~t 1 and notice that wt 1 is independent of yt 1 since this is a function of yt 1 and xt 1 , while wt 1 is independent of both (using 15 and 17). Thus we can write,

^ ytt 1 ) = Ayt 1 + wt ~t 1 = Ayt 1 + wt

1 1

^ Aytt

1 1

Ptt

1 =

^t Next we wish to calculate yt and Ptt interms of the above calculated quantities, using equation (29). We write, ^ G yt 1 ; Ptt 1 ] Gx Byt ; R] : p(yt jxt ) = y t (37) p(x jxt 1 ) t t

~ y E ytt 1 (~tt 1 )T ] ~t 1 ~t 1 = E (Ayt 1 + wt 1 )(Ayt 1 + wt 1 )T ] T ~ t 1 yt 1 = AE yt 1 (~t 1 )T ]AT + E wt 1 wt 1 ] = APt 1 AT + Q t 1

(36)

We will now use Lemma 1, applying (74) to the second term in the numerator of (37), and then applying (75) to the result of that we nd, p(yt jxt ) = k2 (xt ) Gyt

t

^t ( Pt 1 ] 1 + BT R 1 B) 1 ( Pt 1 ] 1 yt 1 + BT R 1 xt ); ( Pt 1 ] 1 + BT R 1B) 1 ]; (38) t t t Because we know that the multplication of two Gaussians is again a Gaussian and moreover that (38) must be normalized with respect to yt , we deduce the the factor k2 (xt ) = 1. Finally we must use Lemma 2 to show that p(yt jxt ) is a Gaussian distribution with the following mean and covariance, ^ ^ ^ ytt = ytt 1 + Kt(xt Bytt 1 ) t 1 t Pt = (I KtB)Pt Kt = Ptt 1 BT (R + BPtt 1 BT )
1

(39) (40) (41)

^0 where Kt is called the Kalman gain. These equations are initialized by y1 = and P0 = . These equations, 1 together with (35) and (36) constitute the celebrated Kalman Filter equations and allow one to estimate the state of the system on-line, i.e. every new observation can be used recursively, given the information that was already received before. Notice that the gain factor Kt grows if the measurement covariance R becomes smaller, thus putting more weight on the measurement residual (di erence between predicted an actual measurement). Also if the noise covariance Pt 1 becomes smaller, less emphasis is put on the measurement t residual. It is also instructive to notice that the evolution of the state noise Pt (and therefore the Kalman t gain Kt ), is independent of the measurements and states and may be precomputed. From a numerical point of view, equation (40) is not preferable, due to the fact that it is a di erence of two postive de nite matrices, which is not guaranteed to result in a positive de nite matrix, and may lead to numerical instabilities. This however, is easily xed by noting that from (41) we can derive,

KtRKT = (I KtB)Ptt 1BT KT ; t which can be used to rewrite (40) as,

(42) (43)

Ptt = (I KtB)Ptt 1 (I Kt B)T + KtRKT ; t which is a sum of two postive de nite matrices!

6 Kalman Smoother Equations x Next we want to solve the smoothing problem. This implies that we are going to include later measurements ; > t, to improve our estimates of the states yt . The resultant estimates will be smoother (less noisy). 5

First concentrate on the mean E yt 1 jx ], for > t. We will now invoke the corollary of Lemma 1, ^ ^ identifying y = yt 1 , x = yt , y = yt 1 , x = yt and Gz ; ] = p(yt 1 ; yt jx ). Using these identi cations we nd, ^ ^ yt 1 = E yt 1 jx ] = E yt 1 jyt = yt ; x ]: (44) Next we write, p(yt 1 ; yt ; xt 1 ; xt ; :::; x ) p(yt 1 ; yt jx ) = p(x ) t 1 t 1 t 1 t 1 j = p(xt ; :::; x jyt 1 ; yt ; x ) p(ypt(yt )1 ; x ) p(yt 1 jx ) p(x ) x t 1 y ) (y j = p(xt ; :::; x jp(tx p:::;txytjx1 ) 1p)(yt 1 jx ) t t; = k1 (yt ; x ) p(yt jyt 1 ) p(yt 1 jxt 1 ) ^t 1 t 1 = k1 (yt ; x ) Gy Ayt 1 ; Q] Gy 1 yt 1 ; Pt 1 ] (45) In the same spirit as the derivation for the kalman lter (see derivation around 37), we will now use Lemma 1, applying (74) to the second term in (45), and then applying (75) to the result of that, p(yt 1 ; yt jx ) p(yt 1 jyt ; x ) = p(yt jx ) 1 ]; ^t 1 = k2 (yt ; x ) Gy 1 ( Pt 1 ] 1 + AT Q 1 A) 1 ( Pt 1 ] 1 yt 1 + AT Q 1 yt ); ( Pt 1 ] 1 + AT Q 1 A) (46) t 1 t 1 t 1 Notice the similarity between (38) and (46). Because we know that the multplication of two Gaussians is again a Gaussian and moreover that (46) must be normalized with respect to yt 1 , we deduce the the factor k4 (yt ; x ) = 1. Finally we invoke (44) and Lemma 2 to nd, ^ 1 ^ yt 1 = ytt 1 + Jt 1 (^t ytt 1 ) y ^ (47) t 1 T t 1 1 Jt 1 = Pt 1A Pt ] (48) ^ where we used (36) in the last line. This is initialized with y , computed from the Kalman Filter equations. For the covariance we rst observe, ^ ~ 1 ~ ^ 1 yt 1 + Jt 1 yt = ytt 1 + Jt 1 Aytt 1 ; (49) where we used (35) and (47). Multiplying both sides with their respective transpose from the right, taking ~ ^ expectations, and using the fact that yt 1 is independent of yt (since the latter is a function of x and t 1 t 1 ~ ^ Lemma 3) and similarly for yt 1 and yt , gives us, ^ ^ t ^ 1^ 1 Pt 1 + Jt 1E yt yt ]JT 1 = Ptt 1 + Jt 1AE ytt 1 ytt 1 ]AT JtT 1: (50) 1 Then we use, ^ ^ E yt yt ] = E yt yt] Pt (51) T = E (Ayt 1 + wt 1 )(Ayt 1 + wt 1 ) ] Pt (52) = AE yt 1 yt 1 ]AT + Q Pt (53) where (15) and (20) and the corollary following Lemma 3 was used. Analoguesly, ^ 1^ 1 (54) E ytt 1 ytt 1 ] = E yt 1 yt 1] Ptt 1 1 Putting these together and using (36), we nd Pt 1 = Ptt 1 + Jt 1(Pt Ptt 1)JT 1 (55) t 1 which is initialized by P , computed from the Kalman Filter equations. Equations (47), (55) and (48) are the so called Kalman smoother equations. If we want to estimate a state yt given data x with > t, then we rst apply the Kalman lter equations recursively until we have reached the state y . While moving ^t ^t forward we store the values for yt , yt 1 , Pt and Pt 1 , t = 1::: . Then we move backward by applying the t t smoother equations, until we have reached the state t we would like to estimate. Because we include more observations in the estimation of the state, the result will be less noisy as compared to the Kalman lter result, hence the name smoother. t t t

6

We will now proceed to estimate the parameters f ; ; B; R; A; Qg of the Kalman lter model using EM. We consider the states yt as hidden variables, while x are the observations. We assume we have observed N sequences of length . The joint probability of the complete data is given by, p(y ; x

7 Parameter Estimation for the Kalman Model
) = p(y1 )
Y
t

For EM, we are interested in the expectation of the joint pdf over the posterior density,
Q

=2

p(yt jyt 1 )

Y t =1

p(xt jyt )

(56)

= =

N XZ

N 1 X Z dy p(y jx ) (d + k) log(2 ) n 2 n=1 + log det + ( 1) log det Q + log det R + (y1 )T 1 (y1 )

n

=1

dy p(y

jxn ) log p(y ; xn )]

+ +

X t X t =2

(yt Ayt 1 )T Q 1(yt Ayt 1 ) (57)

Inspection of this objective function reveals that the only su cient statistics that need to be calculated in the E-step are, ^ (58) E ytjxn ] = yt;n t = 1; :::; ^ ^ E ytyt jxn ] = Pt + yt;nyt;n Mn t = 1; :::; (59) t n ^ ^ E ytyt 1 jxn ] = Pt;t 1 + yt;nyt 1;n Mt;t 1 t = 2; :::; (60) Fortunately, except for the last one, these are precisely the quantities that can be calculated through the Kalman Filter and Smoother recursions. The last quantity, which is called the lag-one covariance smoother is computed in the appendix C. It is given by the following recursion, Pt 1;t 2 = Ptt 1JT 2 + Jt 1 (Pt;t 1 APtt 1)JT 2 : (61) 1 t 1 t which is initialized by, P ; 1 = (I K B)AP 1: (62) 1 We now concentrate on the M-step, which maximizes (57) with respect to the parameters of the joint density only, i.e. the parameters present in the posterior are held xed. Taking derivatives with respect to and equating to zero gives,
X @ Q= @ n=1
N

=1

(xt;n Byt )T R 1 (xt;n Byt )]

1 (^ y1;n =1

)=0) (63) (^1;n )T + y
N X n

1 new = N

N X

For

this implies,
@ @

n

^ y1;n ))

1Q = N

1 2

new

1 =N

N X n

N 1 X(Mn y ^ 2 n=1 1 1;n

T

T

=1

Mn 1

new new

T

1 = P1 + N 7

=1

(^1;n y

new )(^ 1;n

y

new )

T

(64)

where we used that Pt is independent of xn . Taking derivatives with respect to A gives.
XX @ Q= (Q 1 Mn 1 t;t @A n=1 t=2
N

Q 1AMn 1) ) t
=1 t=2

Anew =
For Q we nd,
@ Q= @Q

"

N XX n

=1 t=2

M

#"

n t;t

1

N XX n

M

# 1

n t

1

(65)

1( 2

Qnew = N ( 1 1) (Mn Anew Mn 1;t); t t n=1 t=2 where we used (65), and Mn 1;t = (Mn 1 )T . For B we have, t t;t
N XX

N 1 X X(Mn AMn 1)N Q 2 Mt;t 1AT + AMn 1AT ) ) t t 1;t t n=1 t=2

(66)

XX @ ^ Q= (R 1 xt;n yt;n @B n=1 t=1

N

R 1BMn) ) t
=1 t=1

Bnew =

"

N XX n

And nally we have for R, N @ 1 1 X X(x x ^ T Q = NQ @R 2 2 n=1 t=1 t;n t;n xt;n yt;n B N XX ^ R = 1 (x x B y x ); new =1 t=1

^ xt;nyt;n

#"

N XX n

M

# 1

n t

(67)

^ Byt;nxt;n + BMnBT ) ) t (68)

N

n

where we used (67). Alternating E-steps and M-steps will thus converge to the maximum likelihood estimates of these parameters. Notice that the recursion equations ful l a double role. They may be used to e ciently compute the E-step in the learning problem, and, once the parameters are xed, to estimate the optimal state and state-covariance of the dynamical system, possibly on line.

=1 t=1

t;n t;n

new t;n t;n

8 Computation of Likelihood
L =
N X n

To monitor the total log-likelihood of the system we may calculate,
=1

log p(xn )] =
Z

N XX n

The mean and covariance of the Gaussians p(xt;n jxt 1;n ) can be computed as follows (omitting n for notational convenience), ^ x 1 = t t

=1 t=2

X log p(xt;n jxt 1 )] + log p(x1;n )]: n n N

=1

(69)

= = =

Z Z Z

dxt p(xt jxt 1 ) xt dxt dxt dyt
Z Z

dyt p(xt jyt ) p(yt jxt 1 ) xt dyt t ^ Gx Byt ; R] Gy ytt 1 ; Ptt 1 ] xt t t

^t = Byt 1 :

^ Gy ytt 1 ; Ptt 1 ] Byt (70) 8

For p(x1 ) the above calculation gives, Similarly, for the covariance we nd,

^1 x0 = B ^ ^ xtt 1 xtt 1) t (71)

Htt

1 =

Z

= =

Z Z

dxt p(xt jxt 1 ) (xt xt dxt dyt
Z

dyt t ^ ^ ^ Gx Byt ; R] Gy ytt 1 ; Ptt 1 ] (xt xt xtt 1 xtt 1 ) t The covariance for p(x1 ) is then given by,

^ ^ ^ Gy ytt 1 ; Ptt 1 ] (R + Byt yt BT xtt 1 xtt 1 ) ^t ^t ^t ^t = R + B(Pt 1 + yt 1 yt 1 )BT Byt 1 yt 1 BT t t 1 T = R + BPt B :

(72) (73)

H0 = R + B BT 1

A Lemma's identities, Lemma 1 Let Gy

;

] denote a normal density with mean

and covariance . We have the following (74) (75)

Gx Ay; ] = k1 (x) Gy (AT 1 A) 1 AT 1 x; (AT 1 A) 1 ]; Gy a; A] Gy b; B] = Gy (A 1 + B 1 ) 1 (A 1 a + B 1 b); (A 1 + B 1 ) 1 ] Ga b; A + B]:
Also, if we write z = y; x], = y; x

] and y; y

=

h

y y jx

Z

yy xy

yx xx

i

, then we have, (76)

Gz ; ] Gx x ; xx] = Gy

dx Gz ;

] = Gy

yy yx

] ( xx ) 1(

x

x);

yy

yx

(

xx

) 1

xy

]

(77)

As a corollary we notice that

Lemma 2 Consider a d aT Pa > 08 a (i.e. positive eigenvalues). The following equalities hold, (P 1 + BT R 1 B) 1 = P PBT (BPBT + R) 1 BP (P 1 + BT R 1 B) 1 BT R 1 = PBT (BPBT + R) 1

E y jx = x ] = E y ] d matrix P > 0, a k k matrix R > 0 and a k

(78) d matrix B, where P > 0 implies (79) (80)

B Matrix Identities

In the derivations to follow, the following idetities are useful, aT Ab = tr AbaT ] tr AB] = tr BA] @ tr AB] = BT @A
@ tr AT B] @A

(81) (82) (83) (84) (85) (86)

= B log det A] = log det A 1 ] @ log det A] = (AT ) 1 @A 9

In the E-step of the EM algorithm that estimated the parameters of the KF, we needed the lter and smoother equations. However, one quantity remains undetermined, which is the so called lag-one-covariance-smoother, Pt;t 1. This quantity is only needed backwards. First we will derive the initial value the backward recursions,

C Lag-One Covariance Smoother
Ptt;t
1 =

~t 1 ~t where we used (11), (39) and (47) with = t. Next, we write this out and use that both yt 1 and yt 1 are independent of vt , which is proved using (14) and (16). This will give t (90) Pt;t 1 = Ptt;t 1 1 Ptt 1BT KT JT 1 KtBPtt;t 1 1 + Kt(BPtt 1 BT + R)KT JT 1 t t t t t 1 = (I Kt B)APt 1 ; (91) where in the last ~t independent of yt t line we used (41) and Pt 1 1 = APt 1 , which is proved using the fact that wt 1 is t;t 1 1 (15, 17). If we set t = we nd the initial condition, 1

~~ E ytt ytt 1 ] ~t ^t ~t = E fyt 1 Kt (xt Byt 1 )gfyt ~t ~t ~t = E fyt 1 Kt (Byt 1 + vt )gfyt

1 1 1 1

Jt Jt

^ 1 Kt (xt By 1 )g] t 1 ~ 1 Kt (Byt + vt )g] t t

(87) (88) (89)

P;

1 = (I

K B)AP

1: 1

(92)

The derivation for the backward recursion is somewhat elaborate. First we write from (47) and (35), ^ ~ 1 ~ ^ 1 yt 1 + Jt 1yt = ytt 1 + Jt 1 Aytt 1 (93) t 2 t 2 ^ ~ ~ ^ yt 2 + Jt 2 yt 1 = yt 2 + Jt 2 Ayt 2 (94) Next, we equate, ^ ^ y E (^t 1 + Jt 1 yt )(^t 2 + Jt 2yt 2 )T ] = y t 1 t 1 t 2 ^ ^ 2 E (^t 1 + Jt 1Ayt 1 )(^t 2 + Jt 2 Aytt 2 )T ] ) y y (95) (96) where lemma 3 was used several times to get rid of cross-terms. We will now rewrite some of the terms appearing above, ^ ^ E yt yt 1] = E ytyt 1 ] Pt;t 1 = E (Ayt 1 + wt 1)(Ayt 2 + wt 2)T ] Pt;t 1 = AE yt 1yt 2 ]AT + AE yt 1wt 2 ] Pt;t 1 = AE yt 1yt 2 ]AT + AE (Ayt 2 + wt 2)wt 2 ] Pt;t 1 = AE yt 1yt 2 ]AT + AQ Pt;t 1: (97) Next, ~ 1~ 2 ~ 2 ^ 2 ~ 2 E ytt 1 ytt 2 ] = E fytt 1 Kt 1(xt 1 Bytt 1 )gytt 2 ] = ~ 2 Ptt 2;t 2 Kt 1E (Bytt 1 + vt 1)~tt 2 ] = y 2 1 Ptt 2;t 2 Kt 1BPtt 2;t 2 ; (98) 1 1 where (39) and (11) was used. Next, ^ 1~ 2 E ytt 1 ytt 2 ] = ^ 2 ~ 2 ~ 2 E fytt 1 + Kt 1(Bytt 1 + vt 1)gytt 2 ] = Kt 1BPtt 2;t 2 : (99) 1 10 ^ ^ Pt 1;t 2 + Jt 1E yt yt 1 ]JT 2 = t t 1 t 2 t 1 t 2 ~ ~ ^ ~ ^ 1^ 2 E yt 1 yt 2 ] + Jt 1 AE yt 1 yt 2 ] + Jt 1 AE ytt 1 ytt 2 ]AT JT 2 ; t

Finally we have, ^ 1^ 2 E ytt 1 ytt 2 ] = E (^tt 1 + Kt 1"t 1)^tt 2 ] = y 2 y 2 ^ 2^ 2 E ytt 1 ytt 2 ] = E yt 1yt 2 ] Ptt 2;t 2; 1 where the most important ingredient was lemma 4. Putting this together, we have Pt 1;t 2 = Ptt 2;t 2 Kt 1BPtt 2;t 2 + 1 1

(100)

Jt 1 AKt 1BPtt Jt 1 Pt;t 1JT 2 t

2 1;t 2

Jt 1APtt

2 AT JT t 2 1;t 2

Jt 1 AQJT 2 + t

(101)

The second line can be rewriten as follows,

Ptt 1JT 2 1 t

(I Kt 1 B)Pt t t (I Kt 1 B)Pt

2 1;t 2 = 2 Pt 2 ] 1 APt 2 = 1 t 1 t 2

(102)

where we used (40) and (48). The third line can be rewritten as,

Jt 1A(Kt 1 BPtt 2;t 2 Ptt 2;t 2 AT JT 2 QJT 2) = t t 1 1 t 2 t 2 T T Jt 1A(Kt 1 BPt 1 Pt 1;t 2A Q)Jt 2 = Jt 1A(Kt 1 BPtt 2 Ptt 2)JT 2 = 1 1 t Jt 1A(I Kt 1B)Ptt 2 JT 2 = 1 t Jt 1APtt 1JT 2 ; 1 t where again (40) and (48) was used, and the fact that,

(103) (104)

Ptt 2 = Ptt 1

2 AT + Q 1;t 2

which can be derived analoguesly to (36). Finally, putting this together we derive the lag-one covariance smoother, Pt 1;t 2 = Ptt 1JT 2 + Jt 1 (Pt;t 1 APtt 1)JT 2 : (105) 1 t 1 t

11

Similar Documents

Premium Essay

Self Assessment

...Getting into the field of counseling is path that directly correlates with my passion; helping others. It has been a natural habit for me since my youth to be motivated by giving others guidance and clarity through different types of obstacles and challenges. Earning my degree will be one of the final steps I will need to reach my career goals and ambitions. I would Like to open up a consulting firm that handles direct services of counseling to people. I would like to specialize in child and family counseling and have a network of counselors working for me, servicing other population's needs. My 10 year experience working directly with at-risk youth in a school setting, help me gain a drive to facilitate young people in minding their family strife. My belief is that the dysfunctional and fractured home life is at the core of the delinquent youth. There is no greater satisfaction, than assisting a young person and their family through chaos and developing a plan to having a healthy relationship. I believe that a healthy family promotes a sound mind and body within a person and is an intricate piece in becoming a productive citizen. In order for me to be competent in the counseling role, I need to acknowledge and recognize my strengths and weaknesses. Strengths that would help me in the counseling field are primarily centered <?n my genuine "want" for people to do well and be productive for themselves. With that belief I continuously focus on the positive attributes of a...

Words: 747 - Pages: 3

Free Essay

Guys vs Men

...Manhood and its Manliness vs Your Basic Guy It has been known guys have a different point of view than a girl, but do guys really have to go past the limit of certain things to get through it all? In Dave Barry’s essay he states many things saying guys like neat stuff and like taking on pointless challenges. His tone is also in a joking matter for his essay, meaning not everything he says is serious. It’s probably there for comedy relief. Many of the things he says may be true but this doesn’t account for every guy out there. Though it might have happen sometime in a guy’s life doesn’t really mean it’s every day in their life. In his essay he has it broken down into three sections stating guys like neat stuff, really pointless challenges and do not have a moral code of some sort. Guys liking neat things doesn’t really mean like something that is clean like he states. It’s more mechanical base for most guys but there are some guys fascinated by other things than just cars and technology. Some can be interested in art, food, read and much more. That is a bias thing that most people think that guys find neat. When coming to challenges guys don’t back down from one any matter how stupid or meaningless it is. They like to be first or like to prove they are better than others. Yes, there will be some guys out there doing pointless challenges that make no sense at all. Though there are some challenges out there that guys would take seriously and try their best to do well at. For...

Words: 769 - Pages: 4

Premium Essay

Conflict Resolution

...The conflict over the devastation of the wetlands is a destructive conflict, no parties are cooperating. There is competitive motivation to win against the oil industry in a billion-dollar lawsuit. There is a hostile attitude toward the oil companies for destroying protected land. The issue over the control of resources in Louisiana is a blame game between the Oil companies and the state. This has created credibility issues for both sides, there are many factors involved in the destruction of the wetlands near the gulf coast, the state is blindly blaming oil companies for it. This makes the conflict somewhat misattributed and displaced. The people protecting the wetlands want the oil to pay for the projects that will help stop erosion but it’s not clear if that will do any good. To promote cooperative interdependence between the oil companies involved and the people protecting the wetlands is difficult because it is close to impossible to please both parties in this situation that involves out recourses and money. I can’t see anyway to make this a mutually beneficial situation. The Board fails to see that its not just he oil companies and the oil companies fail to recognize that their drilling took a huge toll in this particular area even though there are many of factors that destroy the habitat. The credibility of both parties also makes it hard to see a positive out come. This is an international conflict involving social values in Afghanistan. Women’s rights are close...

Words: 1208 - Pages: 5

Premium Essay

Characterization - the Man Who Loved Flowers

...The Man Who Loved Flowers Characterization of the main character The main character in Stephen King’s The Man Who Loved Flowers is a young man with black hair and light blue eyes. The man is described as being nicely dressed, wearing a grey suit with the tie pulled down a little and the top collar button undone. We assume that he is from New York City as that is where we find him during the story, although it isn’t stated directly. As we follow this young guy through the streets of New York City, he is described through the thoughts of an old lady and a flower vendor which he passes on his way. They assuming that he is in love, seeing the bounce in his steps and the half-smile on his lips. The young man seems like a very friendly and polite person, this is mainly based on his conversation with the flower vendor, an example on this is to find on page 178 lines 11-12 “I’m gonna tell you what I think. Hey! Advice is still free, isn’t it?” The young man smiled and said. ”I guess it’s the only thing left that is.” The way people smile and recognize themselves in him, when he passes them, also indicates that his appearance is friendly as well. It seems as if he has a lot on his mind as he doesn’t notice any of the ongoing events he finds himself in the middle of. An example on this is to find in page 179 lines 16-18 He was unaware of the two teen-aged girls who passed him going the other way and then clutched themselves and giggled. Right up until the end of the story...

Words: 425 - Pages: 2

Free Essay

The Representation of Masculinity in Men's Beauty Product

...Abstract: This study attempts to investigate the representation of masculinity in the printed advertisement of Mens Biore Double Scrub. All phenomena in the advertisement are described. To present more analytical description, the signs found in the advertisement are analyzed based on Barthes’ orders of signification. Besides that, this study also employs Kress and Van Leeuwen’s method of reading images and intertextual analysis in order to obtain more comprehensive analysis. The result of this study shows that Mens Biore Double Scrub advertisement represents two different concepts of masculinity. The first one is the traditional concept of masculinity. The second one is the new concept of masculinity offered by the advertisement. Generally, words that are used to represent both concepts of masculinity are power, confidence, aggressiveness, competition, challenge, and bravery. The connotative signified success, financial independence, and physical attractiveness are emphasized to change the concept of traditional masculinity to be in line with the company’s need. Keywords: advertisement, semiotics, masculinity Abstrak: Penelitian ini berupaya untuk menganalisa representasi maskulinitas dalam iklan cetak Mens Biore Double Scrub. Seluruh fenomena dalam iklan tersebut dideskripsikan. Untuk menyajikan deskripsi yang analitis, tanda-tanda yang ditemukan dalam iklan tersebut dianalisa berdasarkan gagasan orders of signification milik Barthes. Selain itu, penelitian ini juga menerapkan...

Words: 3643 - Pages: 15

Premium Essay

The Man Who Loved Flowers

..."The Man who loved Flowers" The title of the text is “The Man who loved flowers”. Reading this title made me at once pay more attention to the flowers that have an symbolic meaning. My interpretation of the symbolic meaning of the flowers’ colours is that they represent the girl in the lane, the young man and the relationship between them. The white rose represent the girl, it stands for innocence and ignorance, just like the girl that hasn’t done anything wrong and is unknowing about the man’s intentions. The yellow rose represents the young man. Yellow colour is often connected with lies and falseness as the man tricks the reader and the girl into believing that he is an ordinary man. The last colour is red, it stands for love and is the colour of blood, and love is what connects Nora and the young man. The young man is well dressed (s. 175 l. 11-12) ”he had that look about him. He was dressed in a light grey shit, the narrow tie pulled down a little”. He has got an ordinary face (s.175 l.13-14) “not an extraordinary face, but on this soft spring evening...” . The people that look at him see him as an symbol of spring and young love. You can see that in the way they describe him when he walks by the old lady at the end of the story. This is also what the reader sees him as until the man steps into the lane. Stephen King makes us believe that this is a love story, all the people the man walks by looks at him and think that he is in love, an example is (175 l. 8-10)...

Words: 753 - Pages: 4

Free Essay

Letter to a Cat

...your introductory paragraph) Length: 2 pages (with double spacing) – no more, no less. Criteria for marking: 1. Good, error-free language 2. The conclusive paragraph “answers” the introductory paragraph. 3. Coherence from one paragraph to the next. Julia Blackburn, The Mermaid (A British short story published in 1998.) The man was still there poised in indecision and staring at the thing which lay heaped at his feet. I saw then that it was not a human corpse, or the trunk of a tree, or a bundle of sail that he had found, but a mermaid. She was lying face down, her body twisted into a loose curl, her hair matted with scraps of seaweed. The year was fourteen hundred and ten and it was very early in the morning with the sun pushing its way gently through a covering of mist that floated aimlessly over the land and the water. The man had never seen a mermaid before except for the one carved in stone above the east door of the church. She had very pointed teeth and a double tail like two soft and tapering legs, while this one had a single tail which could have belonged to a large halibut or a cod. The man stepped forward and squatted down beside her. The pattern of her interlinking scales glinted with an oily light. He stroked them along the direction in which they lay and they were wet...

Words: 1301 - Pages: 6

Premium Essay

In the National Gallery

...National Gallery. The main character has decided to spend an hour looking at one special picture. At first the person is sitting quietly studying the picture, but then an elder man enter the room and sits next to the main character. After a little while another man sits down next to the older man, but the second man is younger. As they sit the elder man starts to tell the younger boy about the painting and the painter Stubbs. The main character can’t help but listen to the elder man and his knowledge about the painting and painter. As the two men has sit for a while the young man suddenly gets annoyed and snaps at the elder man and then leaves room afterwards. The elder man stays in his seat. The room gets filled with some young French schoolgirls; they are loud and noisy and get a lot of attraction from everyone in the room. But there is one girl that the main character especially observes. The main character notices that the man next to him/her is staring at the girl as well, but more as if she was really something special. The main character starts to analyse the girl and also see that there is something special about her. The girl suddenly leaves the rest of the group and sits down next to the man. At first she watch the picture but then falls asleep. The man and main character starts to talk about her. The man tells that the French girl looks just like a 16-yearold girl he was in love with when he was 12 years old. He starts talking about the summer with her, that he would always...

Words: 388 - Pages: 2

Premium Essay

Hidden Intellectualism

...Kunal Arora English 101 Professor Martinez 5 April 2011 A Rose for Emily A Rose for Emily is a short intriguing story written by William Faulkner. Emily the main character is portrayed as a woman who kept to herself throughout her whole life. In her younger years her father had driven all her suitors away.  No man was good enough for Emily. Emily’s loneliness was especially apparent after her father died and when her boyfriend Homer disappeared. Her hair had turned an irony gray after her father died. She had a black manservant throughout her whole life that went to the market, cooked and gardened for her. During the end of her life the manservant’s visits were the only way that the townspeople knew that she was still alive. After her father died Emily kept his body in her house. A few days after Emily’s father’s death a couple of ladies came to give their condolences. But Emily came to the door dressed in casual clothes and showed no signs of grief. The townspeople were about to resort to law enforcement when she finally broke down and told them that her father was dead. The townspeople did not believe she was crazy, even though they knew insanity ran in her family.  They thought Emily did this because they remembered how the father drove all the young men away. Now she was a figure that could be pitied on by the town, alone and penniless. Eventually Emily met Homer, a Yankee who came into town to pave sidewalks during the summer of Emily’s father’s death. They started...

Words: 776 - Pages: 4

Premium Essay

Why Women Cant Have It All Response

...Stanley Sidik English 122 Prof McKinnon 7/16/12 “Why women can’t have it all” by Slaughter: Response After reading the title of this article “Why women can’t have it all” it makes me ponder what this “all” exactly means. After reading the article I discovered that “all” is a great career, a big bank account, a successful husband, perfect kids, and a nice house at the same time. As she Slaughter did experience this dilemma of choosing to spend more time with her family or keep her decent career which is director of policy planning for the State Department. She also begins to question the equality of women is the workplace are they being treated the same way as man? In my business class, my professor informed me that during job interviews they intend to avoid pregnant women as they will get 10 paid weeks off and would ruin the payroll of the company. This is the just one of many disadvantages that career moms face. As I continued reading the article I felt I had to be defensive in some parts , but not because I disagree her claims and it felt as if there was a dagger soon to be puncturing my lung ,but me being a male accused of things I did not commit. While reading the article it ranged if men won’t sacrifice because they think the women eventually will. Slaughter answers this question by saying that men are socialized to prioritize differently than women, but I myself would never ask someone to sacrifice something if I wouldn’t if I were in her or his shoes. After...

Words: 334 - Pages: 2

Free Essay

An Inconventient Truth

... I understand Zimmerman frustration and all with the burglaries and people in their gated community being held captive in their own home by black guys and as Zimmerman stated it’s punks like him (Trayvon) who always gets away, and at that point I believe that’s when Zimmerman had taken the law into his own hands. The media play’s their role as well into the madness. Just by watching the media it can be very misleading and sometimes confusing. The media portrayed Trayvon as this innocent teenager that didn’t get into trouble or do any wrong, but as I research deeper into this for my argumentative essay I found out that Martin was not this innocent teenager, he was into a lot of things. This young man was into gang banging,...

Words: 310 - Pages: 2

Premium Essay

How to Tell a True War Story

...Brianne ENGL 1126 Summary of How to Tell a True War Story How to Tell a True War Story is written by Tim O’Brien. It is set in Vietnam between the years of nineteen fifty-four and nineteen seventy-five. In this section, the story starts out by talking about a man named Rat Kiley. Kiley is writing a letter to a friend’s sister telling her how good of a man he really was. He also writes about different stories that happened and how he was the first to volunteer for things, just to emphasize the greatness of this man. The sister of the deceased man does not write back to Rat Kiley which greatly upsets him. The story goes on to identify the man as Curt Lemon. Eventually, it is clear how Lemon died. Kiley and Lemon were tossing a grenade back and forth to each other when suddenly Lemon ended up stepping into a booby trap. Another man in the military by the name of Mitchell Sanders tells O’brien a story to teach him lesson. The story is about two men who set out to the mountains on a mission. After a few days of living up there, the men hear strange noises. It gets worse and worse so they order that the land below them be attacked. They pack up their stuff and walk down the mountain. When they reach the bottom their commander asks them what they heard and the men reply with nothing. Sanders claims the moral of the story is that no one listens, you need to listen to the quiet. He goes on to say that the moral of a war story cannot be extracted without a deeper meaning surfacing...

Words: 565 - Pages: 3

Free Essay

Macho Men Are the Only Real Men

...come to accept the fact that women can do everything that man can do. It is now acceptable for women to be “manly” without losing their womanhood. The question is: if the image about women only being feminine has changed, how come men are still pressured to only be masculine? Are “macho” men the only “real” men? Does it take a strong jaw-line, defined and muscular abs, and a beer in one hand to be considered a “true” man? Today’s world has summed up men to be just that… In order to be considered real men, they can’t wear the color pink, drink diet soda, do housework, drink fruity-flavored alcoholic drinks, or be anything less than a sports-loving, scotch-drinking, gym-going, and woman-loving guy. In an ad about the new Dr. Pepper soda, “Dr. Pepper Ten”, the slogan that Dr. Pepper used was “IT’S NOT FOR WOMEN” in big, bold letters. This message implies that the drink is meant to be only for men. Underneath the slogan, the ad reads “A lady-free zone of rugged, macho, hair-on-your-chest awesomeness that’s definitely not for women.” In this ad, not only is Dr. Pepper discriminating women, but it is also raising the question that if a guy is not “rugged, macho”, and has “hair on his chest” then, could he not drink that soda? Would he fall in the same category as the women who can’t drink it, therefore not be considered a man? Dr. Pepper made it clear that this drink was for men even though the description of the “ideal man” that they would like to drink their new soda is very specific...

Words: 931 - Pages: 4

Free Essay

Healthcare Economics

...Michelle, Before I ever started my bullshit u hurt me in a way I still have not recovered w E and, you have never given the subject w other men a break for me to heal. Then, every so often there is always something going on w other men behind my back. U never tell me when u try to communicate w them and there will never be a reason for my woman to ever need attention from another man and me not know about it, matter of fact for ur next victim u should work on that bc it really isn’t right! I am always finding messages from other guys or u reaching out to them. And you want to stone me to death about a couple of words. I took a chance w u having a child that I never have or will give another chance w. U tought me a very valuable lesson. I feel that as a man, husband , and step father I have done more than I had to offer and have to offer but I try! In between the other men in our relationship u stay out of the house county etc.. and don’t even bother to tell me and that shit is not cool get all dressed up to hang out in a house , Really! Come on. But, at this point I don’t want to feel like this by u anymore and wanting absolutely nothing from You. If it does not pertain to a bill I don’t want to know and even then I would prefer u just wrote it down or passed on the message. You u want to hang out with ur friends bc I do, and there’s nothing wrong but when u make ur plans ahead time to disappear or ur already gone. My problem with that is no matter where I go or whom Im with...

Words: 735 - Pages: 3

Premium Essay

Relatioships

...between a man and a woman, mother and father, girlfriend and boyfriend, sister and brother, aunt and nephew or niece, and or same sex, etc.. Having a relationship can either be intimate or not. Having some sense of closeness and connection is most important because you have a trust and confidence person whether or not they are blood related or not. In a relationship there is always good and bad. The issues that I observed within my past to be the main issues in a relationship are communication,sex, money, responsibilities in the home, prioritizing the relationship, and trust. Now, what you do, how you interpret the situation, how you respond and how you resolve each situation will determine the outcome. The results can either damage or blossom the relationship. I have grown to understand that it takes two people to resolve any issue within a relationship. It can not just be the male solving all the issues. A woman has a voice just as much as the male but theres a respect for the male because he is the dominant part of the relationship. Today is a very different. Women are becoming more independant simply because men are not holding their dominance respectfully in a relationship because of domestic violence and neglect of the family dynamics. They can leave a woman and his kids without thinking twice. this is only my opinion and i could be wrong. I will give you a list of positive strategies that I think will be helpful to resolving a conflict between a woman and a man in a...

Words: 285 - Pages: 2