# [Kalman and Bayesian Filters in Python](https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python)
Introductory text for Kalman and Bayesian filters. All code is written in Python, and the book itself is written using Jupyter Notebook so that you can run and modify the code in your browser. What better way to learn?
**"Kalman and Bayesian Filters in Python" looks amazing! ... your book is just what I needed** - Allen Downey, Professor and O'Reilly author.
**Thanks for all your work on publishing your introductory text on Kalman Filtering, as well as the Python Kalman Filtering libraries. We’ve been using it internally to teach some key state estimation concepts to folks and it’s been a huge help.** - Sam Rodkey, SpaceX
Start reading online now by clicking the binder or Azure badge below:
[![Binder](http://mybinder.org/badge.svg)](https://beta.mybinder.org/v2/gh/rlabbe/Kalman-and-Bayesian-Filters-in-Python/master)
![alt tag](https://raw.githubusercontent.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/master/animations/05_dog_track.gif)
What are Kalman and Bayesian Filters?
-----
Sensors are noisy. The world is full of data and events that we want to measure and track, but we cannot rely on sensors to give us perfect information. The GPS in my car reports altitude. Each time I pass the same point in the road it reports a slightly different altitude. My kitchen scale gives me different readings if I weigh the same object twice.
In simple cases the solution is obvious. If my scale gives slightly different readings I can just take a few readings and average them. Or I can replace it with a more accurate scale. But what do we do when the sensor is very noisy, or the environment makes data collection difficult? We may be trying to track the movement of a low flying aircraft. We may want to create an autopilot for a drone, or ensure that our farm tractor seeded the entire field. I work on computer vision, and I need to track moving objects in images, and the computer vision algorithms create very noisy and unreliable results.
This book teaches you how to solve these sorts of filtering problems. I use many different algorithms, but they are all based on Bayesian probability. In simple terms Bayesian probability determines what is likely to be true based on past information.
If I asked you the heading of my car at this moment you would have no idea. You'd prefer a number between 1° and 360° degrees, and have a 1 in 360 chance of being right. Now suppose I told you that 2 seconds ago its heading was 243°. In 2 seconds my car could not turn very far, so you could make a far more accurate prediction. You are using past information to more accurately infer information about the present or future.
The world is also noisy. That prediction helps you make a better estimate, but it also subject to noise. I may have just braked for a dog or swerved around a pothole. Strong winds and ice on the road are external influences on the path of my car. In control literature we call this noise though you may not think of it that way.
There is more to Bayesian probability, but you have the main idea. Knowledge is uncertain, and we alter our beliefs based on the strength of the evidence. Kalman and Bayesian filters blend our noisy and limited knowledge of how a system behaves with the noisy and limited sensor readings to produce the best possible estimate of the state of the system. Our principle is to never discard information.
Say we are tracking an object and a sensor reports that it suddenly changed direction. Did it really turn, or is the data noisy? It depends. If this is a jet fighter we'd be very inclined to believe the report of a sudden maneuver. If it is a freight train on a straight track we would discount it. We'd further modify our belief depending on how accurate the sensor is. Our beliefs depend on the past and on our knowledge of the system we are tracking and on the characteristics of the sensors.
The Kalman filter was invented by Rudolf Emil Kálmán to solve this sort of problem in a mathematically optimal way. Its first use was on the Apollo missions to the moon, and since then it has been used in an enormous variety of domains. There are Kalman filters in aircraft, on submarines, and on cruise missiles. Wall street uses them to track the market. They are used in robots, in IoT (Internet of Things) sensors, and in laboratory instruments. Chemical plants use them to control and monitor reactions. They are used to perform medical imaging and to remove noise from cardiac signals. If it involves a sensor and/or time-series data, a Kalman filter or a close relative to the Kalman filter is usually involved.
Motivation
-----
The motivation for this book came out of my desire for a gentle introduction to Kalman filtering. I'm a software engineer that spent almost two decades in the avionics field, and so I have always been 'bumping elbows' with the Kalman filter, but never implemented one myself. As I moved into solving tracking problems with computer vision the need became urgent. There are classic textbooks in the field, such as Grewal and Andrew's excellent *Kalman Filtering*. But sitting down and trying to read many of these books is a dismal experience if you do not have the required background. Typically the first few chapters fly through several years of undergraduate math, blithely referring you to textbooks on topics such as Itō calculus, and present an entire semester's worth of statistics in a few brief paragraphs. They are good texts for an upper undergraduate course, and an invaluable reference to researchers and professionals, but the going is truly difficult for the more casual reader. Symbology is introduced without explanation, different texts use different terms and variables for the same concept, and the books are almost devoid of examples or worked problems. I often found myself able to parse the words and comprehend the mathematics of a definition, but had no idea as to what real world phenomena they describe. "But what does that *mean?*" was my repeated thought.
However, as I began to finally understand the Kalman filter I realized the underlying concepts are quite straightforward. A few simple probability rules, some intuition about how we integrate disparate knowledge to explain events in our everyday life and the core concepts of the Kalman filter are accessible. Kalman filters have a reputation for difficulty, but shorn of much of the formal terminology the beauty of the subject and of their math became clear to me, and I fell in love with the topic.
As I began to understand the math and theory more difficulties present themselves. A book or paper's author makes some statement of fact and presents a graph as proof. Unfortunately, why the statement is true is not clear to me, nor is the method for making that plot obvious. Or maybe I wonder "is this true if R=0?" Or the author provides pseudocode at such a high level that the implementation is not obvious. Some books offer Matlab code, but I do not have a license to that expensive package. Finally, many books end each chapter with many useful exercises. Exercises which you need to understand if you want to implement Kalman filters for yourself, but exercises with no answers. If you are using the book in a classroom, perhaps this is okay, but it is terrible for the independent reader. I loathe that an author withholds information from me, presumably to avoid 'cheating' by the student in the classroom.
From my point of view none of this is necessary. Certainly if you are designing a Kalman filter for an aircraft or missile you must thoroughly master all of the mathematics and topics in a typical Kalman filter textbook. I just want to track an image on a screen, or write some code for an Arduino project. I want to know how the plots in the book are made, and chose different parameters than the author chose. I want to run simulations. I want to inject m
没有合适的资源?快使用搜索试试~ 我知道了~
阮考定位复习资料2004
共348个文件
py:85个
ipynb:44个
cpp:31个
需积分: 0 0 下载量 137 浏览量
2023-12-18
19:55:26
上传
评论
收藏 617.28MB 7Z 举报
温馨提示
阮考定位复习资料2004
资源推荐
资源详情
资源评论
收起资源包目录
阮考定位复习资料2004 (348个子文件)
test3.bag 24.48MB
test1.bag 1.4MB
test2.bag 521KB
html_build_book.bat 902B
build_book.bat 493B
clean_book.bat 265B
update_pdf.bat 262B
run_notebooks.bat 210B
6x9build_book.bat 187B
build_book6x9.bat 143B
make_chapter.bat 95B
book_to_pdf.bat 67B
build_book 209B
data_node.cc 15KB
clean_book 450B
config 344B
config 292B
ros_filter.cpp 134KB
navsat_transform.cpp 32KB
test_ukf_localization_node_interfaces.cpp 32KB
test_ekf_localization_node_interfaces.cpp 32KB
ros_robot_localization_listener.cpp 20KB
ekf.cpp 17KB
genImuCalib.cpp 17KB
ukf.cpp 16KB
filter_base.cpp 15KB
test_filter_base_diagnostics_timestamps.cpp 14KB
testLidar.cpp 13KB
robot_localization_estimator.cpp 7KB
ros_filter_utilities.cpp 7KB
test_robot_localization_estimator.cpp 7KB
getImu.cpp 7KB
test_filter_base.cpp 6KB
test_ros_robot_localization_listener.cpp 5KB
test_ros_robot_localization_listener_publisher.cpp 5KB
test_ukf.cpp 5KB
test_ekf.cpp 4KB
robot_localization_listener_node.cpp 4KB
test_localization_node_bag_pose_tester.cpp 4KB
filter_utilities.cpp 3KB
getLidar.cpp 3KB
test_navsat_transform.cpp 3KB
test_navsat_conversions.cpp 3KB
ukf_node.cpp 2KB
ekf_node.cpp 2KB
test_topic.cpp 2KB
navsat_transform_node.cpp 2KB
testc.cpp 927B
custom.css 5KB
2014-03-26-000-Data.csv 1.8MB
description 73B
description 73B
exclude 240B
exclude 240B
foxy-devel 185B
foxy-devel 41B
13_particle_move.gif 5.67MB
particle_filter_anim.gif 299KB
04_gaussian_animate.gif 250KB
multivariate_ellipse.gif 136KB
02_no_info.gif 97KB
multivariate_track1.gif 61KB
05_dog_track.gif 59KB
05_volt_animate.gif 54KB
02_simulate.gif 31KB
.gitattributes 342B
.gitignore 220B
.gitignore 59B
gen_BALM.h 13KB
data_node.h 6KB
Lidar_parser_base.h 1KB
imu_asensing.h 1KB
point_type.h 406B
HEAD 373B
HEAD 213B
HEAD 213B
HEAD 199B
HEAD 32B
HEAD 30B
HEAD 27B
HEAD 23B
ros_filter.hpp 30KB
filter_base.hpp 16KB
navsat_transform.hpp 13KB
navsat_conversions.hpp 8KB
robot_localization_estimator.hpp 7KB
ros_robot_localization_listener.hpp 7KB
ros_filter_utilities.hpp 6KB
ukf.hpp 4KB
filter_utilities.hpp 4KB
measurement.hpp 4KB
filter_state.hpp 3KB
filter_common.hpp 3KB
ekf.hpp 3KB
ros_filter_types.hpp 2KB
license.html 911B
full_globaltoc.html 401B
html_book 245B
html_build_book 1007B
pack-829687bb7076b8a587c2cabcabef46b7bf7088a9.idx 196KB
共 348 条
- 1
- 2
- 3
- 4
资源评论
Freja_Issac
- 粉丝: 34
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- RAG技术知识图谱概览
- VMware Workstation功能强大的桌面虚拟计算机软件
- 中文命名实体识别,采用bilstm+crf模型基于Pytorch实现
- PowerGREP V5.3.3 Retail
- 美赛数学建模算法-使用Matlab实现灰色系统建模GreySystem-国赛-题解.zip
- 基于albert-bilstm-crf架构利用keras框架实现NER
- RegexMagic V2.13.1 Retail
- python-3.6.5-macosx 安装包
- 美赛数学建模算法-使用Matlab实现图论GraphTheory-包括求最短路径-国赛-题解.zip
- RegexBuddy v4.14.1 Retail
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功