当前位置:网站首页>Kalman filter-1
Kalman filter-1
2022-07-07 03:37:00 【wmzjzwlzs】
from : Kalman filtering (kalman filter) What does it have to do with mean filtering ? - You know
Read an article 《 Kalman filter that a fool can understand ( Translated from Internet blog )》, I found that many people in the comments said they couldn't understand , Decided to write a Kalman filter that a real fool can understand .
The article starts with a simple average , The problem goes from simple to complex , Finally, Kalman filter is introduced .
One 、 Average
for instance : Here's the picture , There is a slider on a rod , There is a ranging laser head at one end of the rod , Now measure the position of the slider .
[ Laser head ]->_______[ slider ]__________
Three measurements :1 rice 、0.9 rice 、1.2 rice
Obviously take the average (1+0.9+1.2)/3=1.033 Meters are more accurate .
Two 、 weighted average
Suppose there are two laser heads :
[ Two laser heads ]=》________[ slider ]_________
Two laser heads simultaneously measure :1.1 Rice and 1.5 rice
Average 1.3 Is rice more accurate ? not always , If the measurement accuracy of two laser heads is the same , That average 1.3 Rice is more accurate .
If their measurement accuracy is different , Such as laser head 1 The measurement error variance is 0.01, Laser head 2 The error variance is 0.1, Then separate laser head 1 The measured value of 1.1 Mean meter ratio 1.3 Meters are more accurate , Because the laser head 2 It's too bad , You can calculate the variance of the average

The variance of the average value is higher than that of the laser head 1 The error variance of is larger , Obviously, the average is not good . But the laser head 2 Is the measurement of completely useless ? You can use another method to calculate the average , It is called weighted average
![]()
Obviously with 0.9 and 0.1 Do the weighted average , The variance decreases , The weighted average is more accurate than both measurements . How much is the best weight of the two weighted average values ? It can be assumed A weight of a, be A weight of (1-a), Take it in and calculate

This is about a The quadratic function of ,
The variance of the weighted average is the minimum ( The extreme value problem of quadratic function in high school mathematics ), That is to say The ratio of the weighting coefficients of is equal to the reciprocal of the ratio of their variances .
3、 ... and 、 Kalman filtering
Now the slider is not stationary , It's athletic , Suppose uniform motion ,1 rice / second , The laser head measures once per second

Express n Time slider position , Express n The measured value of the laser head at the moment , Indicates the measurement error . Obviously, we can't average or weighted average the multiple measurements of the laser head now , Because the slider is moving . What shall I do? ? The simplest way is to put
As a result , That is to say
The estimate of , But this is not the best , Because the equation of motion of the slider is not used . Then use the simplest way to average

Is this calculation better than directly using the measured value as the result , You can calculate the variance of their estimates

Obviously, this method of averaging estimates smaller variance , When n As we go to infinity
. You can also change the initial value of the estimated value , For example 0 As initial value
![]()
By the same calculation, we can find ,n As we go to infinity , Variance of estimated value
still
, That is, as long as the number of iterations is enough , The error is independent of the initial value , All converge to the same value .
In fact, the above average value is not optimal , You can try to calculate the weighted average of each step , The ratio of the two weights is also the reciprocal of the ratio of variances . Again you will find , The variance of the estimate will converge , The convergence value is independent of the choice of initial value .
Did you find it here , The above result is very similar to Kalman filter , In fact, this is Kalman filter , But the state transition equation and measurement equation are particularly simple . Replace the equation of state and measurement equation with standard equation , Same as above , Each iteration uses the best weighting coefficient to calculate the weighted average , You will find that this is the standard Kalman filter , Just remember that the ratio of the best weighting coefficients is equal to the reciprocal of the ratio of variances . in other words , In fact, Kalman filter is to choose the weighted average of the best weighting coefficient .
The above equation of state and measurement equation are one-dimensional , What if they are all multidimensional ? Multidimensional equations need to be solved by the least square method . The one-dimensional least squares solution is the mean , The multi-dimensional least square solution can be understood as the multi-dimensional average , And the weighted least square solution is the weighted average . So for the multidimensional equation of state and measurement equation , At each iteration, the weighted least square method is used to calculate the state estimation value .
Conclusion : The essence of Kalman filter is to choose the weighted average of the best weighting coefficient ; The weighted least square method is to find the multi-dimensional weighted average .
What's the use of understanding this ? I found that many people see problems related to filtering , Just want to toss the seemingly advanced Kalman filter , It's not necessary , If average or weighted average is used ( Multidimensional correspondence least square method or weighted least square method ) All measured values can be included , Generally, there is no need to toss Kalman filter , It's essentially the same , Unless Kalman filtering can introduce additional and more accurate observations .
边栏推荐
- U.S. Air Force Research Laboratory, "exploring the vulnerability and robustness of deep learning systems", the latest 85 page technical report in 2022
- 树莓派设置静态ip
- Jerry's question about DAC output power [chapter]
- 亚像素级角点检测Opencv-cornerSubPix
- 代码质量管理
- 存储过程与函数(MySQL)
- 图形化工具打包YOLOv5,生成可执行文件EXE
- 什么是 BA ?BA怎么样?BA和BI是什么关系?
- 22. (ArcGIS API for JS) ArcGIS API for JS Circle Collection (sketchviewmodel)
- Huawei and Xiaomi "copy each other"
猜你喜欢

注意力机制原理

【DPDK】dpdk样例源码解析之三:dpdk-l3fwd_001

leetcode

U.S. Air Force Research Laboratory, "exploring the vulnerability and robustness of deep learning systems", the latest 85 page technical report in 2022

Depth analysis of compilation constants, classloader classes, and system class loaders

When you go to the toilet, you can clearly explain the three Scheduling Strategies of scheduled tasks

VHDL实现任意大小矩阵加法运算

2022.6.28

Do you know the five most prominent advantages of E-bidding?

codeforces每日5题(均1700)-第七天
随机推荐
海思3559万能平台搭建:RTSP实时播放的支持
When you go to the toilet, you can clearly explain the three Scheduling Strategies of scheduled tasks
概率论公式
编译常量、ClassLoader类、系统类加载器深度探析
Cryptography series: detailed explanation of online certificate status protocol OCSP
About Estimation Statistics
Clock in during winter vacation
VHDL实现单周期CPU设计
qt-线程等01概念
[untitled]
24. (ArcGIS API for JS) ArcGIS API for JS point modification point editing (sketchviewmodel)
Set static IP for raspberry pie
R data analysis: how to predict Cox model and reproduce high score articles
19. (ArcGIS API for JS) ArcGIS API for JS line acquisition (sketchviewmodel)
Basic concepts of Huffman tree
Jerry's ble exiting Bluetooth mode card machine [chapter]
QT thread and other 01 concepts
Variables, process control and cursors (MySQL)
安装 torch 0.4.1
22.(arcgis api for js篇)arcgis api for js圆采集(SketchViewModel)