Assertion failed using particle filter
3 views (last 30 days)
Show older comments
I am using Matlab particle filter (particlefilter) for a power system state estimation which is IEEE5 bus system. When i run the code, I get the following error after some iterations:
%Error using matlabshared.tracking.internal.StateEstimator/assertPreconditions (line 44)
%Assertion failed.
%Error in matlabshared.tracking.internal.MeanStateEstimator/estimate (line 42)
% obj.assertPreconditions(particleManager, particles, weights, isCircVar);
%Error in matlabshared.tracking.internal.ParticleFilter/getStateEstimate (line 626)
% stateEst = obj.StateEstimator.estimate(...
%Error in matlabshared.tracking.internal.ParticleFilter/correct (line 586)
stateCorr = obj.getStateEstimate;
%Error in main (line 67)
xEst(k,:) = correct(myPF,yMeas(k,:));
and this my code:
myPF = particleFilter(@ieee5_statefunctions,@ieee5_likelihood);
initialize(myPF,1000,[ 1; 0 ; 0 ; 1 ; 0 ; 0 ; 1 ; 0 ; 0 ; 1 ; 0 ; 1 ; 0], eye(13));
myPF.StateEstimationMethod = 'mean';
myPF.ResamplingMethod = 'systematic';
xEst = zeros(size(xTrue));
for k=1:size(xTrue,1)
xEst(k,:) = correct(myPF,yMeas(k,:));
predict(myPF);
end
my guess is after some iterations the estimated numbers get so big that causes error but I can't find where is my problem. I hope someone could help me.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!