Kalman filter algorithm in NXPMotionSense library

Status
Not open for further replies.

techlin

Member
I've used Paul's NXPMotionSense library with Teensy 3.2 + Prop Shield. I'm interested in getting values in addition to the roll, pitch and yaw from the output of the Kalman filter algorithm, so I'd like to understand it more (and yes, I see the caveat in the documentation in SensorFusion.cpp advising that the casual developer not touch the file). Paul (or other reader), can you recommend a reference to the nomenclature used in SensorFusion.cpp?

Thanks,
T.Echlin
 
Depends on what exactly you want to know. I have the first two docs and the rest you probably can find on the web. Never could fin AN5023 though. Maybe someone has a copy they can post.

  • NXP Sensor Fusion User Guide
  • NXP Sensor Fusion Library for Kinetis MCUs, NSFK_DS
  • NXP Sensor Fusion for Kinetis MCUs User Guide
  • NXP Application Note AN5016, Rev. 2.0: Trigonometry Approximations
  • NXP Application Note AN5017, Rev 2.0: Aerospace, Android and Windows 8 Coordinate Systems
  • NXP Application Note AN5018, Rev. 2.0: Basic Kalman Filter Theory
  • NXP Application Note AN5019, Rev. 2.0: Magnetic Calibration Algorithms
  • NXP Application Note AN5020, Rev. 2.0: Determining Matrix Eigenvalues and Eigenvectors by Jacobi Algorithm
  • NXP Application Note AN5021, Rev. 2.0: Calculation of Orientation Matrices from Sensor Data
  • NXP Application Note AN5022, Rev. 2.0: Quaternion Algebra and Rotations
  • NXP Application Note AN5023, Rev. 2.0: Sensor Fusion Kalman Filters
  • NXP Application Note AN5286, Rev. 2.0: Precision Accelerometer Calibrations
 
Depends on what exactly you want to know.

I'm particularly interested in being able to pull out position approximations. People usually utilize the orientation approximations, but I'd like to try working with position estimates too.
 
Last edited:
Thanks for the suggestions. The math stackexchange link is hopeful, since the dynamical model should be easier. Still, more work than I thought which could be a bad thing given time constraints. I was hoping the position approximation was available already if I dug for it. My other option is to turn back to getting the data from the encoders + heading info from the IMU. I had some trouble with the encoder code I have so I put it on the back burner for a bit.
 
I'm particularly interested in being able to pull out position approximations. People usually utilize the orientation approximations, but I'd like to try working with position estimates too.

the accelerometer, magnetometer, gyro combo gives you mainly orientation. The accelerometers are far to low quality for obtaining the dynamic forward acceleration. Even if you were to do so, you need double integration to obtain the location multiplying the measurement error enormously.
 
Better choice. WMXZ is absolutely correct errors will build up quickly, I am using that combination (IMU + encoders) for my rovers, quadrature encoders will work better that hall effect sensors (if there is only one). I've got both working well. Let us know how it goes with the encoder code. Sure we all can help.
 
Ok, good to know ... I knew the double integration would amplify any error, but I hadn't looked at the quality of the accelerometer.
I have magnetic quadrature encoders on 2 wheels. They're Pololu ones (https://www.pololu.com/product/3081) that are very similar to what they use on their Zumos, which seem to give good encoder count information. Time to get back to the encoder code!
 
Use the teensy encoder library. Works great. Tha leaves the odometry part. Have a couple of good references for Tha which I will post tomorrow
 
Use the teensy encoder library. Works great. Tha leaves the odometry part. Have a couple of good references for Tha which I will post tomorrow

Thanks! I have Paul Stoffregen's Encoder library - what are the references that you had in mind?
 
Sorry for a delay in posting the references, start at the top and work you way down:

  1. http://www.robotnav.com/position-estimation/
  2. http://www.geology.smu.edu/dpa-www/robo/Encoder/imu_odo/ (pay attention to the stasis implementation)
  3. http://www.seattlerobotics.org/encoder/200010/dead_reckoning_article.html
  4. http://legolab.daimi.au.dk/DigitalControl.dir/NXT/Lesson10.dir/paper58.pdf
  5. http://ttuadvancedrobotics.wikidot.com/odometry

I found the first two references extremely helpful. Implemented a combo of both and works well.

Cheers
Mike
 
Status
Not open for further replies.
Back
Top