当前位置:网站首页>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
边栏推荐
- Devops' future: six trends in 2022 and beyond
- Easy to use shortcut keys in idea
- [rtklib] preliminary practice of using robust adaptive Kalman filter under RTK
- Combination of fairygui check box and progress bar
- In 2020, the average salary of IT industry exceeded 170000, ranking first
- FairyGUI增益BUFF數值改變的顯示
- Fairygui loop list
- 【GNSS】抗差估计(稳健估计)原理及程序实现
- Prove the time complexity of heap sorting
- [算法] 剑指offer2 golang 面试题1:整数除法
猜你喜欢
[算法] 剑指offer2 golang 面试题2:二进制加法
闇の連鎖(LCA+树上差分)
[算法] 劍指offer2 golang 面試題2:二進制加法
PR 2021 quick start tutorial, first understanding the Premiere Pro working interface
[algorithm] sword finger offer2 golang interview question 13: sum of numbers of two-dimensional submatrix
Guided package method in idea
[Chongqing Guangdong education] Shandong University College Physics reference materials
Excel导入,导出功能实现
Unity3d makes the registration login interface and realizes the scene jump
Force buckle 1189 Maximum number of "balloons"
随机推荐
WSL common commands
There is no red exclamation mark after SVN update
FairyGUI人物状态弹窗
Compile GDAL source code with nmake (win10, vs2022)
Derivation of logistic regression theory
(课设第一套)1-5 317号子任务 (100 分)(Dijkstra:重边自环)
PRIDE-PPPAR源码解析
[algorithm] sword finger offer2 golang interview question 5: maximum product of word length
rtklib单点定位spp使用抗差估计遇到的问题及解决
第一人称视角的角色移动
2022国赛Re1 baby_tree
FairyGUI循环列表
1041 be unique (20 points (s)) (hash: find the first number that occurs once)
FairyGUI簡單背包的制作
Meanings and differences of PV, UV, IP, VV, CV
Unity3d, Alibaba cloud server, platform configuration
Fairygui joystick
[Yu Yue education] guide business reference materials of Wuxi Vocational and Technical College of Commerce
FairyGUI简单背包的制作
平衡二叉树详解 通俗易懂