correct function on insFilter insfilterNonholonomic
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Im using the insfilterNonholonomic Object from Matlab. I want to correct the orientation of my state to the correct yaw-angel thats given from the GPS measurements. If im using the correct funtion on my filter the filter have a unpredictable behavior. I shortened my project to a correct function that get the State and the covariance an set it to the state. Therefor i think the correct function shouldn't have any effect, but it does.
Am i write that a correction of the current state with the current state an its correspondig covariance does not have any effect?
Why is my filter instable at certan time intervals?
Do i use the correct function correct?
My code(shortened):
gndFusion = insfilterNonholonomic('ReferenceFrame', 'NED', 'IMUSampleRate', imuFs,'ReferenceLocation', localOrigin, 'DecimationFactor', 2);
...
%init of filter
...
for i = 1:1:sim_rounds
predict(gndFusion, [accel_x(sampleIdx) accel_y(sampleIdx) accel_z(sampleIdx)], [gyro_x(sampleIdx) gyro_y(sampleIdx) gyro_z(sampleIdx)]);
if speed(sampleIdx) > 10
correct(gndFusion,1:4,gndFusion.State(1:4),gndFusion.StateCovariance(1:4)); % correct function that souldn't have any effect
end
end
with correct function:
without correct function:
0 Commenti
Risposte (1)
Ryan Salvo
il 7 Dic 2022
Hi Marvin,
Using the code snippet from your question, the call to the correct object function will have an effect on the filter state covariance. You can check this by saving the intial state and state covariance values before the call to correct.
filt = insfilterNonholonomic;
initState = filt.State;
initStateCov = filt.StateCovariance;
idx = 1:4;
correct(filt, idx, filt.State(idx), filt.StateCovariance(idx,idx));
initState(idx)
filt.State(idx)
initStateCov(idx,idx)
filt.StateCovariance(idx,idx)
Thanks,
Ryan
0 Commenti
Vedere anche
Categorie
Scopri di più su Audio Processing Algorithm Design in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!