sigma_pts
Calculates 2*n+1 sigma points in n dimensions.
Sigma points are used in the unscented transform to estimate the result of applying a given nonlinear transformation to a probability distribution that is characterized only in terms of a finite set of statistics.
If only the dimension n is given the resulting points have zero mean and identity covariance matrix. If the mean m or the covariance matrix K are given, then the resulting points will have those statistics. The factor l scales the points away from the mean. It is useful to tune the accuracy of the unscented transform.
There is no unique way of computing sigma points, this function implements the algorithm described in section 2.6 "The New Filter" pages 40-41 of
Uhlmann, Jeffrey (1995). "Dynamic Map Building and Localization: New Theoretical Foundations". Ph.D. thesis. University of Oxford.
Source Code: sigma_pts
K = [1 0.5; 0.5 1]; # covariance matrix # calculate and build associated ellipse [R,S,~] = svd (K); theta = atan2 (R(2,1), R(1,1)); v = sqrt (diag (S)); v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; t = linspace (0, 2*pi, 100).'; xe = v(1,1) * cos (t) + v(2,1) * sin (t); ye = v(1,2) * cos (t) + v(2,2) * sin (t); figure(1); clf; hold on # Plot ellipse and axes line ([0 0; v(:,1).'],[0 0; v(:,2).']) plot (xe,ye,'-r'); col = 'rgb'; l = [-1.8 -1 1.5]; for li = 1:3 p = sigma_pts (2, [], K, l(li)); tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... p(1,1), p(1,2), ['o' col(li)]); h(li) = tmp(1); endfor hold off axis image legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); |