Math and Engineering

How to Design Kalman Filter?

Kalman Filter designing: If we are to the object of study is a room temperature. Judgments based on your experience, the room temperature is constant, that is, the next minute the temperature is equal to the temperature of this minute (assuming we do a minute of time units). Suppose you are on your experience is not 100% believe that there may be deviations from top to bottom several times. We call these deviations as a Gaussian white noise (White Gaussian Noise), which is later in front of these deviations is not related to and consistent with Gaussian distribution (Gaussian Distribution). In addition, we put a thermometer in the room, but the thermometer is not accurate, measurement error than the actual value. We also put these errors as Gaussian white noise. Well, now we have two for a minute about the room temperature values: the predictive value of your experience (Predictive value) and the thermometer's value (measured value). Here we use the combination of the two values of noise to their respective estimated the actual room temperature. Of course, we do not need very much to see the exact model. We know the temperature of this room is near the same temperature for a time, so A = 1. Does not control volume, so U (k) = 0. So come to: X (k | k-1) = X (k-1 | k-1) ... ... ... .. (6) Formula (2) can be changed: P (k | k-1) = P (k-1 | k-1) + Q ... ... ... (7) Because the measured value is the thermometer, correspond directly with the temperature, so H = 1. 3,4,5 can be replaced by the following formula: X (k | k) = X (k | k-1) + Kg (k) (Z (k)-X (k | k-1)) ... ... ... (8) Kg (k) = P (k | k-1) / (P (k | k-1) + R) ... ... ... (9) P (k | k) = (1-Kg (k)) P (k | k-1) ... ... ... (10) Now we simulate a set of measurements as input. Suppose the real room temperature is 25 degrees, I simulated 200 measurements, the average of these measurements is 25 degrees, but several times by adding a standard deviation of the Gaussian white noise. Order Kalman filtering to work, we need to tell the two zero-time Kalman initial value is X (0 | 0) and P (0 | 0). Not too concerned about their values, one can easily give up, because as Kalman's work, X will gradually converge.But for P, usually do not get 0, because this might lead to Kalman totally believe you given X (0 | 0) is the best system, so that algorithms can not converge. I chose the X (0 | 0) = 1 degree, P (0 | 0) = 10. The system's real temperature is 25 degrees, figure used black lines. Figure in red is the optimal Kalman filtering output results (the results in the algorithm set Q = 1e-6, R = 1e-1). Example download: temperature.txt Another example download: Free_falling.txt In installed folder, you will find some klm files such as Free_falling.klm, temperature.klm. When you have opened the software, You can Click 'open Project' to open the demos. With three steps, you will get the results.
 How to design Kalman Filter

Click here to download Visual Kalman FilterFree Download (Full function trial, size:3.4 MB)

   Click here to get Visual Kalman Filter now!Get Now (Only $69.95)

[Return to Visual Kalman Filter ]

Home Visual Kalman Filter Matrix Calculator Pro Easy CurveFit Download Purchase Contact
Copyright (C) 2007-2011 HAN Software, All rights reserved.