当前位置:网站首页>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
边栏推荐
- PRIDE-PPPAR源码解析
- Force buckle 1189 Maximum number of "balloons"
- [算法] 剑指offer2 golang 面试题1:整数除法
- On March 15, the official version of go 1.18 was released to learn about the latest features and usage
- 使用rtknavi进行RT-PPP测试
- Affichage du changement de valeur du Buff de gain de l'interface graphique de défaillance
- Guided package method in idea
- Database course design: college educational administration management system (including code)
- FairyGUI复选框与进度条的组合使用
- Pride-pppar source code analysis
猜你喜欢

闇の連鎖(LCA+树上差分)

There is no red exclamation mark after SVN update

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

Office提示您的许可证不是正版弹框解决

服务未正常关闭导致端口被占用

Fairygui joystick

Theoretical derivation of support vector machine

FGUI工程打包发布&导入Unity&将UI显示出来的方式

Wechat applet development experience

Programming homework: educational administration management system (C language)
随机推荐
Knowledge system of digital IT practitioners | software development methods -- agile
燕山大学校园网自动登录问题解决方案
FairyGUI人物状态弹窗
[offer29] sorted circular linked list
Office提示您的许可证不是正版弹框解决
Mixed use of fairygui button dynamics
[algorithm] sword finger offer2 golang interview question 10: subarray with sum K
Halcon knowledge: gray_ Tophat transform and bottom cap transform
[leetcode19] delete the penultimate node in the linked list
Mysql database reports an error: row size too large (> 8126) Changing some columns to TEXT or BLOB or using ROW_ FORMAT=DY
[algorithm] sword finger offer2 golang interview question 6: sum of two numbers in the sorting array
Derivation of logistic regression theory
[算法] 剑指offer2 golang 面试题2:二进制加法
[dry goods] cycle slip detection of suggestions to improve the fixed rate of RTK ambiguity
Teach you to release a DeNO module hand in hand
Usage differences between isempty and isblank
FairyGUI循环列表
FGUI工程打包发布&导入Unity&将UI显示出来的方式
【rtklib】在rtk下使用抗差自适应卡尔曼滤波初步实践
Special palindromes of daily practice of Blue Bridge Cup