Assertion failed using particle filter

2 visualizzazioni (ultimi 30 giorni)
amir saf
amir saf il 26 Set 2021
Modificato: Walter Roberson il 26 Set 2021
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.

Risposte (0)

Prodotti


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by