4.33333

4.3 | 6 ratings Rate this file 419 downloads (last 30 days) File Size: 84.7 KB File ID: #18465

Learning the Kalman Filter in Simulink

by Yi Cao

 

25 Jan 2008 (Updated 29 Jan 2008)

Code covered by BSD License  

A Simulink model to learn the Kalman filter and Gassian processes.

Download Now | Watch this File

File Information
Description

The zip file contains a Simulink model, which describes a Gassian process and the Kalman filter. A m-script is provided to show how to use this model from the command window. Two examples taken from the File Exchange are included in the m-file to explain how the Kalman filter works.

The package provides a way for beginners to learn the Kalman filter by just editting the model parameters without the need to know the details of calculation. By looking into masked subsystems, you will also be albe to learn how it can be implemented in Simulink.

The model is developed in R14SP1 (MATLAB 7.0.1, Simulink 6.1). If you require it to work with previous version, please let me know.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Learning the Kalman Filter, An Intuitive Introduction to Kalman Filter
This submission has inspired the following:
Learning the Kalman-Bucy Filter in Simulink, Learning the Kalman Filter: A Feedback Perspective

Required Products Simulink
MATLAB release MATLAB 7.0.1 (R14SP1)
Zip File Content  
Published M Files Learning the Kalman Filter in Simulink Examples
Other Files
kalman simulink/runkalmanfilter.m,
kalman simulink/html/runkalmanfilter_01.png,
kalman simulink/html/runkalmanfilter_02.png,
kalman simulink/html/runkalmanfilter_03.png,
kalman simulink/html/runkalmanfilter_eq13019.png,
kalman simulink/html/runkalmanfilter_eq39812.png,
kalman simulink/kalmanfilter.mdl,
kalman simulink/html/runkalmanfilter_eq47464.png,
kalman simulink/html/runkalmanfilter_eq488660.png,
kalman simulink/html/runkalmanfilter_eq62371.png,
kalman simulink/html/runkalmanfilter_eq42551.png
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
27 Jan 2008 Scheffe held

i dont like it. more confusing than helping.
why sample time 1?

27 Jan 2008 Yi Cao

I am sorry you do not like the model. But, I do not understand what you refer to about sample time 1. The first example does not have sample time. The second example has the sample time 0.1 second. This is because the original problem is a continuous time problem. To use the discrete time version Kalman filter, we have to discretize the system, hence need a sample time. A continuous time Simulink model of Kalman filter (Kalman-Bucy filter) has been developed and submitted to the File Exchange. You may wish to try that one to see if you like it.

06 Feb 2008 Gabrie Tejeda

Excelent, very usefull.
Thanks

20 Mar 2008 YH Zhang

Great, but some pictures are missing in The HTML folder
such as,feedbackKF.png,KalmanLTI.png.

21 Mar 2008 Yi Cao

Dear YH Zhang,

Thanks for pointing out these missing files although this is regarding to another submission: Learning the Kalman Filter: A Feedback Perspective. http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=18628&objectType=FILE

These files have been added now.

16 Jan 2009 Todor Tchangov

Dear Yi Cao,
Knowing your good level, it’s well simplified and definitely a base to get started.

It is properly presented (for the first time in US History) as Bucy and others...
and Rudolf Kalman... who then ...moved in US... and…
Please, read the history, Colleagues:
Who was the American Engineer who made this working... and rectified the Mathematicians Problems ? That way this is the American Invention.

About the Continuous Linear Process:
I think that I have problems, but the major one is with the Process model.
 
The "A-matrix Process Dynamics- Integration" of X – output of the process, presents the Result of x-dot (or k+1). And this point is “Actuated by U input. How the “u” is presented to all different states (MISO) is presented by B matrix.

After that the Matrix C will present what is measurable and what is Observable.
And then according to “how the “A dynamics” filters the Noise Spectrum presented in point "x-dot" and + + + + will make Kalman Filter to decide “what is true signal and how to restore it”.

Now understanding only “how a (negative) feedback works” and modifies the “Transfer behavior” from Point a to point b… Check out that you made a Positive feedback from X = X+1 (???) to + summing point…!?!?!?! This model has a positive feedback…which in 1985 we had fast “overloading” and had to cold restart our 4 Mb Hard Disk Drive PCs.

But I like your work and I love you guys:
Because it is hard and…
We are big Family.

Sincerely yours,
Todor Tchangov
Sonic Works
todor@sonicworks.com
tezo.spartak@gmail.com
cell: 210 906 5110

22 Jan 2009 Imtiaz Hussain

Thanks a lot........... very useful

05 Apr 2009 V. Poor  
Please login to add a comment or rating.
Updates
28 Jan 2008

update the model to work with MIMO systems plus an MIMO example.

29 Jan 2008

update html file

Tag Activity for this File
Tag Applied By Date/Time
filter design Yi Cao 22 Oct 2008 09:44:49
filter analysis Yi Cao 22 Oct 2008 09:44:49
kalman filter Yi Cao 22 Oct 2008 09:44:49
gaussian process Yi Cao 22 Oct 2008 09:44:49
simulink Yi Cao 22 Oct 2008 09:44:49
kalman filter Prasetyo Utomo 11 Nov 2008 02:38:17
state space control Todor Tchangov 16 Jan 2009 13:32:40
state observer Todor Tchangov 16 Jan 2009 13:33:07
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com