when i highlith error between variable and its estimate (by adding a new variable err=x-xestimate) i plot err. a cycle limit (oscillation )is in this figure.and a gap appear between variable and its estimate .
is it an explanation and solution to this.

hi,
the states are well estimated by EKF,but if chaging in extended state variable at middle of the simulation EKF converdge always to the initial value one.
please i want explication.

@ Matthew (Jun 28)
I had the same problem (with P growing exponentially). Like you said: this has to do with the Alpha parameter. It has to do with how the Unscented Transform calculates its transformed mean. In certain cases (I think when measurement covariance is very low, and process covariance is a few orders of magnitude greater), there can be some rounding errors in Matlab, which causing the transformed mean to come up short.
To fix this, I changed the UT function to be like this:
~~~~~~~~~~
function [y,Y,P,Y1] = ut(f,X,Wm,Wc,n,R)
L=size(X,2);
% y=zeros(n,1); % LINE COMMENTED OUT HERE
Y=zeros(n,L);
for k=1:L
Y(:,k)=f(X(:,k));
% y=y+Wm(k)*Y(:,k); % LINE COMMENTED OUT HERE
end
y = mean([Y(:,1)'; mean(Y(:,2:end)')]); % LINE ADDED HERE
Y1=Y-y(:,ones(1,L));
P=Y1*diag(Wc)*Y1'+R;

Somehow only the first state is tracked correctly. The estimate of x(2) and x(3) is always almost zero no matter how I change the model. Clearly there is a bug...

I found that for my system, the covariance matrix was growing like crazy (P_k~10^8*P_k-1) and was getting complex.
Try adjusting the alpha parameter. 10e-3 was way too small for my system, and 0.1 was the bare minimum that I could avoid the covariance issues. 0.15 seemed to work best.
in general, alpha is recommended to be between 10e-3 and 1.

Comment only