当前位置:网站首页>Fundamentals of UD decomposition of KF UD decomposition [1]
Fundamentals of UD decomposition of KF UD decomposition [1]
2022-07-06 12:54:00 【Proletarians】
It's going on KF UD When decomposing , Variance of state vector - Covariance matrix P Yes, it is UD In the form of ,UD Decomposition is its foundation , The purpose of this article is to reduce the number of UD Decomposed learning time , If it can play the role of throwing bricks and attracting jade, it would be better .
One 、 The purpose of this chapter is three :
First , Let's be clear , What kind of matrix is a symmetric positive definite matrix ?
secondly , We need to know ,UD The form of decomposition is as follows :P=UDU^T, among ,U Is a unit upper triangular matrix ,D It's a diagonal matrix .
Last , We need to be able to code , That is, given a symmetric positive definite matrix P, You get the matrix U and D.
The following is lazy operation , Put the screenshot of the document directly ...

stay matlab Chinese handwriting UD The decomposed code is as follows , Please ignore code robustness :
% Realize the symmetric positive definite matrix UD decompose
% demo
% U = 1 2 3 4 D = 1 0 0 0 P = 95 66 38 16
% 0 1 2 3 0 3 0 0 66 47 28 12
% 0 0 1 2 0 0 2 0 38 28 18 8
% 0 0 0 1 0 0 0 4 16 12 8 4
P=[95 66 38 16;
66 47 28 12;
38 28 18 8;
16 12 8 4];
% P=[ 220 166 113 66 25
% 166 127 88 52 20
% 113 88 63 38 15
% 66 52 38 24 10
% 25 20 15 10 5];
% UD Principle of decomposition ( From right to left , From bottom to top , List before you go )
% because P Is a symmetric positive definite matrix , Only need to P The upper triangular element of
% 1、 Calculation P Number of matrix columns of
[pi,pj]=size(P);
U=diag(ones(pi,1));
D=diag(ones(pi,1));
if pj>1
disp('matrix P is ok!')
for i=pj:-1:1
Pii=P(i,i);
P_D_num=pj-i; % according to Pii To calculate Dii when , need D Number of elements
u2d=0.0;
if P_D_num>0
ip1=i+1;
for k=ip1:pj
u2d=u2d+D(k,k)*U(i,k)*U(i,k);
end
end
D(i,i)=Pii-u2d; % dii
disp(['P_col= ',num2str(i)])
if i==1
disp('UD over!') % First column
elseif i==pj
for j=1:pj-1
U(j,pj)=P(j,pj)/D(i,i); % The last column
end
else
ip1=i+1; % plus 1
im1=i-1; % minus 1
for k=1:im1;
disp(['P_row= ',num2str(k)])
udu=0.0;
for j=ip1:pj
udu=udu+U(k,j)*U(i,j)*D(j,j);
end
if j==pj
U(k,i)=(P(k,i)-udu)/D(i,i);
end
end
end
disp('-----------')
end
end
disp('D')
D
disp('U')
U
边栏推荐
- Teach you to release a DeNO module hand in hand
- Implementation of Excel import and export functions
- MySQL shutdown is slow
- [899] ordered queue
- Solution to the problem of automatic login in Yanshan University Campus Network
- C code implementation of robust estimation in rtklib's pntpos function (standard single point positioning spp)
- [算法] 剑指offer2 golang 面试题10:和为k的子数组
- FairyGUI增益BUFF數值改變的顯示
- 抗差估计在rtklib的pntpos函数(标准单点定位spp)中的c代码实现
- Fairygui joystick
猜你喜欢

平衡二叉树详解 通俗易懂

Database course design: college educational administration management system (including code)

Unity scene jump and exit

Code example of MATLAB reading GNSS observation value o file

FGUI工程打包发布&导入Unity&将UI显示出来的方式
![[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等](/img/11/ee0628a68542236fc641966579a31a.png)
[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等

Particle system for introduction to unity3d Foundation (attribute introduction + case production of flame particle system)

FairyGUI循环列表

Detailed explanation of balanced binary tree is easy to understand

Force buckle 1189 Maximum number of "balloons"
随机推荐
[offer29] sorted circular linked list
(core focus of software engineering review) Chapter V detailed design exercises
FairyGUI人物状态弹窗
[algorithm] sword finger offer2 golang interview question 4: numbers that appear only once
IText 7 generate PDF summary
[Chongqing Guangdong education] reference materials for regional analysis and planning of Pingdingshan University
Unity scene jump and exit
Compile GDAL source code with nmake (win10, vs2022)
[algorithm] sword finger offer2 golang interview question 2: binary addition
[Yu Yue education] guide business reference materials of Wuxi Vocational and Technical College of Commerce
Knowledge system of digital IT practitioners | software development methods -- agile
SVN更新后不出现红色感叹号
Implementation of Excel import and export functions
The port is occupied because the service is not shut down normally
堆排序【手写小根堆】
Basic DOS commands
雇佣收银员【差分约束】
Halcon knowledge: gray_ Tophat transform and bottom cap transform
Unity3D摄像机,键盘控制前后左右上下移动,鼠标控制旋转、放缩
2022国赛Re1 baby_tree