# Kalman gain for weighting a state which is not directly measured

Started by June 14, 2012
```Hi,
I have implemented a simple Kalman filter (using standard Kalman filter
equations) to integrate INS and wheel encoder. My state vector includes
&lsquo;displacement&rsquo; and &lsquo;velocity&rsquo;. (acceleration is the known input)
x=[disp; vel]
My model is:
d(disp)/dt=vel
I also have external measurements of velocity from wheel encoder.
Kalman gain therefore is a 2x1 vector: K=[K1; K2]. My problem is about the
values of Kalman gain.
In state estimate update equation (xhat=xhat+K(z-Hx)), since my innovation
is the difference of velocity measurement and Hx, (i.e. it only contains
velocity information), it seems like K1 should be zero. However, in my
program K1 equals 0.5. The plots of estimation results look OK though.
Should K1 be zero?
If not, where does it get new information about displacement weight while
we have only new velocity measurements?
Any help will be appreciated.

```
```On Thu, 14 Jun 2012 20:02:53 -0500, adelaide wrote:

> Hi,
> I have implemented a simple Kalman filter (using standard Kalman filter
> equations) to integrate INS and wheel encoder. My state vector includes
> &lsquo;displacement&rsquo; and &lsquo;velocity&rsquo;. (acceleration is the known input)
> x=[disp; vel]
> My model is:
> I also have external measurements of velocity from wheel encoder.
> Kalman gain therefore is a 2x1 vector: K=[K1; K2]. My problem is about
> the values of Kalman gain.
> In state estimate update equation (xhat=xhat+K(z-Hx)), since my
> innovation is the difference of velocity measurement and Hx, (i.e. it
> only contains velocity information), it seems like K1 should be zero.
> However, in my program K1 equals 0.5. The plots of estimation results
> look OK though. Should K1 be zero?
> If not, where does it get new information about displacement weight
> while we have only new velocity measurements?
> Any help will be appreciated.

If the velocity is wrong, then the position is wrong and should be
adjusted.  Therefore, K1 should be nonzero.

Does that help?
```
```>On Thu, 14 Jun 2012 20:02:53 -0500, adelaide wrote:
>
>> Hi,
>> I have implemented a simple Kalman filter (using standard Kalman filter
>> equations) to integrate INS and wheel encoder. My state vector includes
>> &lsquo;displacement&rsquo; and &lsquo;velocity&rsquo;. (acceleration is the known
input)
>> x=[disp; vel]
>> My model is:
>> I also have external measurements of velocity from wheel encoder.
>> Kalman gain therefore is a 2x1 vector: K=[K1; K2]. My problem is about
>> the values of Kalman gain.
>> In state estimate update equation (xhat=xhat+K(z-Hx)), since my
>> innovation is the difference of velocity measurement and Hx, (i.e. it
>> only contains velocity information), it seems like K1 should be zero.
>> However, in my program K1 equals 0.5. The plots of estimation results
>> look OK though. Should K1 be zero?
>> If not, where does it get new information about displacement weight
>> while we have only new velocity measurements?
>> Any help will be appreciated.
>
>If the velocity is wrong, then the position is wrong and should be
>adjusted.  Therefore, K1 should be nonzero.
>
>Does that help?
>
```
```>On Thu, 14 Jun 2012 20:02:53 -0500, adelaide wrote:
>
>> Hi,
>> I have implemented a simple Kalman filter (using standard Kalman filter
>> equations) to integrate INS and wheel encoder. My state vector includes
>> &lsquo;displacement&rsquo; and &lsquo;velocity&rsquo;. (acceleration is the known
input)
>> x=[disp; vel]
>> My model is:
>> I also have external measurements of velocity from wheel encoder.
>> Kalman gain therefore is a 2x1 vector: K=[K1; K2]. My problem is about
>> the values of Kalman gain.
>> In state estimate update equation (xhat=xhat+K(z-Hx)), since my
>> innovation is the difference of velocity measurement and Hx, (i.e. it
>> only contains velocity information), it seems like K1 should be zero.
>> However, in my program K1 equals 0.5. The plots of estimation results
>> look OK though. Should K1 be zero?
>> If not, where does it get new information about displacement weight
>> while we have only new velocity measurements?
>> Any help will be appreciated.
>
>If the velocity is wrong, then the position is wrong and should be
>adjusted.  Therefore, K1 should be nonzero.
>
>Does that help?

Thanks Tim.
So far, I realise it's OK that K1 is nonzero, right? Where does it get the
new information though? Because we don't have any new position information
in Innovation.
Also, I thought position state get correction only from the model through
corrected velocity. Isn't that correct?