Kalman Filter Velocity data looking too similar to position data
이전 댓글 표시
I'm creating a Kalman filter that intakes Accelerometer and Angular Velocity measurements from Matlab mobil IMU sensors, and filters it, then calculates the position and velocity. My question is on if I am going about calculating the position and velocity wrong, of if this is a good result but it looks strange for some reason?
Here is an abridged look at the sections of code I'm concerned with
dt = 0.1;
% Initial R and V calculation
aRaw = [Accx, Accy, Accz];
vi = aRaw .* dt;
ri = .5 * aRaw .* (dt^2);
% ~~Data is filtered here~~
% Filtered R and V calculation
af = [Accxf, Accyf, Acczf];
vf = af .* dt;
rf = .5 * af .* (dt^2);
af is the filtered acceleration data in x,y,z. I just followed basic kinematics equations, is that the wrong way to calculate it? Initial velocity and positioned are calculated the same way but from the raw data, charts are provided.

If this isn't the issue, where should I be looking to figure this out? My only other guess is maybe its an issue with the state variables. Thank you.
Tried changing sensor data, adjusting kinematic formulas, and debugging. Expected different looking results for position and velocity.
채택된 답변
추가 답변 (1개)
Les Beckham
2024년 10월 8일
0 개 추천
It appears that you aren't differentiating the position to get the velocity, you are just multiplying it by dt. Thus the two plots look the same with only a scale factor difference. Similarly for the acceleration, you should be differentiating the velocity, not just applying a scale factor.
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

