- #1
jblc
- 10
- 0
While trying to learn kalman filters, I see contradictory info for a simple gyro State Space representation. Please be patient with this post, I've put a fair bit of time trying to make it easy to follow and read!
My goal is to understand how a moving IMU's orientation can be found. I'd appreciate any help!
Say there's just one gyro, with angular rate output reading ω. And just one state output, actual angVel of the system. Yes, this is a trivial example, as of course angVel of system = ω (if ignoring noise).
Question: Which of the below two cases is generally correct? Later i'll work up to a higher DOF, but even in the 1D case A and B matrices change depending on which version is used below, so the kalman filter should behave differently. Any help would be great.
Note : this post assumes discrete control, ie xk+1 = Axk + Buk, vs the xdot = Ax + Bu type.
Case 1) some people input the reading ω into the control vector u: angVel = Ax + Bu = Ax + Bω. This is then angVel = 1*ω. So A = 0 and B = 1.
Eg. equation 9 of http://www.mouser.com/applications/sensor_solutions_mems/
But ω is a sensor reading, not a control input of the system, no? It is telling us what we're seeing, not what we're inputting. Normally B maps things in u, like forces/torques, into describing how the system moves as a result.
The forces/torque mapping of, say, an airplane is described by B; a gyro is just a reading of what actually happens. So where does the reading get inputted? Or do all of those forces/torques and the gyro readings get put into the control vector u together?
I would have thought the sensor measurements (gyro reading) go into the x vector, to be then mapped into the measurement vector z later on via z = Cx: z = angVelreading = 1*ω, so C = 1 in this trivial example.
Case 2) Others input the reading ω into part of the state vector x: angVel = Ax + Bu = Aω = ω. So A = 1 and B = 0. Eg pg.4 of http://see-out.com/sandramau/doc/Mau05MathKalman.pdf. In the case of the kalman filter, though, it seems that we shouldn't be erasing/over-riding part of the state vector by putting our reading ω in place of angVel, because all of the previous calculated (not measured) state is needed for a proper prediction.
Lastly for a single gyro, some people take the angle θ as the measurement output in z. Eg. Eqtn.3.2 of http://www.olliw.eu/2013/imu-data-fusing/
This doesn't make sense to me, as our purpose in the first place may be to measure angle, and angle measurements aren't readily available -- only rates ω are available. Wouldn't you want angular velocity as one of the the measurement states instead of θ?
My goal is to understand how a moving IMU's orientation can be found. I'd appreciate any help!
Say there's just one gyro, with angular rate output reading ω. And just one state output, actual angVel of the system. Yes, this is a trivial example, as of course angVel of system = ω (if ignoring noise).
Question: Which of the below two cases is generally correct? Later i'll work up to a higher DOF, but even in the 1D case A and B matrices change depending on which version is used below, so the kalman filter should behave differently. Any help would be great.
Note : this post assumes discrete control, ie xk+1 = Axk + Buk, vs the xdot = Ax + Bu type.
Case 1) some people input the reading ω into the control vector u: angVel = Ax + Bu = Ax + Bω. This is then angVel = 1*ω. So A = 0 and B = 1.
Eg. equation 9 of http://www.mouser.com/applications/sensor_solutions_mems/
But ω is a sensor reading, not a control input of the system, no? It is telling us what we're seeing, not what we're inputting. Normally B maps things in u, like forces/torques, into describing how the system moves as a result.
The forces/torque mapping of, say, an airplane is described by B; a gyro is just a reading of what actually happens. So where does the reading get inputted? Or do all of those forces/torques and the gyro readings get put into the control vector u together?
I would have thought the sensor measurements (gyro reading) go into the x vector, to be then mapped into the measurement vector z later on via z = Cx: z = angVelreading = 1*ω, so C = 1 in this trivial example.
Case 2) Others input the reading ω into part of the state vector x: angVel = Ax + Bu = Aω = ω. So A = 1 and B = 0. Eg pg.4 of http://see-out.com/sandramau/doc/Mau05MathKalman.pdf. In the case of the kalman filter, though, it seems that we shouldn't be erasing/over-riding part of the state vector by putting our reading ω in place of angVel, because all of the previous calculated (not measured) state is needed for a proper prediction.
Lastly for a single gyro, some people take the angle θ as the measurement output in z. Eg. Eqtn.3.2 of http://www.olliw.eu/2013/imu-data-fusing/
This doesn't make sense to me, as our purpose in the first place may be to measure angle, and angle measurements aren't readily available -- only rates ω are available. Wouldn't you want angular velocity as one of the the measurement states instead of θ?
Last edited by a moderator: