% Square root covariance filtering "shootout" on an % ill conditioned problem from P. Dyer & S. McReynolds, % "Extension of square-root filtering to include process noise" % Journal of Optimization Theory and Applications, Vol. 3, pp. 444-458, 1969. % % Example uses measurement sensitivity matrix % [ 1 1 1 ] % H = [ ], which has pseudorank = 1 when delta = eps. % [ 1 1 1+delta ] % % % "eps" is a Matlab reserved name for machine precision limit % (largest eps such that 1+eps == 1 in machine precision) % clear all; close all; delta = eps^(2/3); % % delta is such that delta>eps but delta^2 1e4) rdS(k)=1e4;end; rdK(k) = sqrt(rssK/rssCF); rdJ(k) = sqrt(rssJ/rssCF); if (rdJ(k) > 1e4) rdJ(k)=1e4;end; rdJ1(k) = sqrt(rssJ1/rssCF); rdJ2(k) = sqrt(rssJ2/rssCF); rdP(k) = sqrt(rssP/rssCF); rdC(k) = sqrt(rssC/rssCF); rdB(k) = sqrt(rssB/rssCF); end; % % Plot relative differences versus delta % top = 10^ceil(log10(max([max(rdS),max(rdK),max(rdJ),max(rdP),max(rdC),max(rdB)]))); bottom = 10^floor(log10(min([min(rdS),min(rdK),min(rdJ),min(rdP),min(rdC),min(rdB)]))); left = 10^floor(log10(min(d))); right = 10^ceil(log10(max(d))); loglog([right/50000,right/2000],[top/72900000,top/72900000],'r-',[right/50000,right/2000],[top/2430000,top/2430000],'g-',[right/50000,right/2000],[top/81000,top/81000],'b-',[right/50000,right/2000],[top/2700,top/2700],'y-',[right/50000,right/2000],[top/90,top/90],'k-',[right/50000,right/2000],[top/3,top/3],'k:',d,rdJ,'y-',d,rdP,'b-',d,rdC,'g-',d,rdB,'r-',d,rdK,'k-',d,rdS,'k:'); ylabel('RMS Relative Error in P'); xlabel('delta'); title('Grewal, Weill, & Andrews, Exam. 8.1 with Various Solution Methods'); text(right/1000,top/3,'Swerling'); text(right/1000,top/90,'Kalman'); text(right/1000,top/2700,'Joseph'); text(right/1000,top/81000,'Potter'); text(right/1000,top/2430000,'Carlson'); text(right/1000,top/72900000,'Bierman'); text(eps,bottom,'!'); text(eps/3,10*bottom,['log_2(eps) = ',num2str(log2(eps))]); text(sqrt(eps),bottom,'!'); text(sqrt(eps)/3,10*bottom,'sqrt(eps)'); %