projects:robots:inertial_navigation_system
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| projects:robots:inertial_navigation_system [2024/04/25 14:53] – jhagstrand | projects:robots:inertial_navigation_system [2024/04/29 04:51] (current) – [videos] jhagstrand | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Inertial Navigation System (INS) ====== | ====== Inertial Navigation System (INS) ====== | ||
| + | |||
| + | spreadsheet of data:\\ | ||
| + | https:// | ||
| + | |||
| INS Intertial Navigation System - Sensors, processors, and software to estimate position. | INS Intertial Navigation System - Sensors, processors, and software to estimate position. | ||
| Line 21: | Line 25: | ||
| * magnetometer - measures the strength of the magnetic fields operating on a vehicle. | * magnetometer - measures the strength of the magnetic fields operating on a vehicle. | ||
| - | * barometer - measures | + | * barometer/ |
| - | * altimeter - measures the height of a vehicle | + | |
| + | === Inertial Measurement Unit (IMU) === | ||
| - | Inertial Measurement Unit | + | A collection of 3 accelerometers and 3 gyroscopes. |
| + | This device gives us six numbers: linear motion along each of the x,y,z axes, | ||
| + | and rotational motion around each of the x,y,z axes. | ||
| + | This gives us the complete picture of inertial motion of the vehicle. | ||
| - | movement relative to the earth' | ||
| - | | ||
| - | o | + | It is not enough to measure motion. |
| - | Sensors | + | We also need to know our current position, or orientation, |
| - | motion sensors | + | Imagine we experienced an acceleration along the x-axis for two seconds. |
| + | During that two seconds we went from standing still to moving upwards at 8 meters per second squared. | ||
| + | Now where are we | ||
| - | accelerometer | + | ???? does the accelerometer |
| - | gyroscope | + | 3 types of accelerometer: |
| + | https:// | ||
| - | IMU - Inertial Measurement Unit - | ||
| + | velocity vs acceleration | ||
| + | |||
| + | per Steppe School youtubes: | ||
| + | |||
| + | bias, aka offset, must be removed from each measurement | ||
| + | * accelerometer | ||
| + | * measures linear acceleration, | ||
| + | * unit: mg, 1g = 9.8 m/s2, 1mg = 1 thousandth of a g | ||
| + | * has bias, but not so critical as gyroscope and magnetometer | ||
| + | * gravity is an acceleration of 1g or 1000mg. | ||
| + | * the upright and at-rest measurement should be x:0, y:0, z:1000. | ||
| + | * as the sensor is rotated the acceleration due to gravity is distributed among the x,y,z axes. | ||
| + | * gyroscope | ||
| + | * gyroscope measures angular velocity, not acceleration | ||
| + | * gyroscope unit: degrees per second | ||
| + | * at rest, gyroscope returns the bias | ||
| + | * by subtracting the bias from a readingd, the at rest measurement is x:0, y:0, z:1000 | ||
| + | * calibration is done at rest for some seconds, the average of readings is the bias | ||
| + | * 20948 chip has " | ||
| + | * magnetometer | ||
| + | * no registers, so we must keep variables and do the subtraction from each measurement | ||
| + | * calibration is done during 3D rotation for some seconds | ||
| + | * ((max - min) / 2) should be zero, so the actual value during calibration is the bias | ||
| + | * in addition to the bias, we also have an adjustment for declination, | ||
| + | |||
| + | localization = changing reference system from the body of the sensor to the earth | ||
| + | * sensor readings give data relative to the body, the vehicle | ||
| + | * ahrs values give data relative to the earth | ||
| + | |||
| + | units: | ||
| + | * linear velocity: meters per second | ||
| + | * linear acceleration: | ||
| + | * angular velocity: degrees per second, radians per second | ||
| + | * angular acceleration: | ||
| + | * rotation velocity: hertz, cycles per second | ||
| + | * 10**-6 | ||
| + | * 10**-3 | ||
| + | |||
| + | accelerometer and gyroscope measure motion | ||
| + | we know that the z-axis is pointing straight up, but the x and y-axes are relative to some random or arbitrary starting point | ||
| + | by adding a magnetometer, | ||
| + | |||
| + | the magnetometer measures the strength of magnetic fields acting on the sensor | ||
| + | the most significant magnetic field is that of the earth | ||
| + | |||
| + | naming absurdities: | ||
| + | * IMU inertial measurement unit | ||
| + | * does not measure inertia. It's components measure accleration, | ||
| + | * is not a unit of measurement | ||
| + | * 6-axis imu or 9-axis imu. There are only three axes: x,y,z. | ||
| + | * 6dof or 9dof. A sensor does not have degrees of freedom. | ||
| Line 81: | Line 139: | ||
| 9250 obsolete, replace with ICM-20948 | 9250 obsolete, replace with ICM-20948 | ||
| https:// | https:// | ||
| - | |||
| - | TDK Invensense | ||
| - | makes both MPU9250 and ICM20948 | ||
| - | 9250 EOL in 2018 | ||
| - | registers are different, therefore different driver required | ||
| - | https:// | ||
| - | |||
| - | breakout boards from adafruit and sparkfun | ||
| - | |||
| - | adafruit ICM20948 | ||
| - | use Adafruit ICM20 library for arduino | ||
| - | https:// | ||
| - | provides GPIO pins but also STEMMA QT connector | ||
| - | no video demo | ||
| - | see Paul McWhorter youtubes | ||
| - | |||
| - | 2015: Adafruit 9-DOF Absolute Orientation IMU Fusion Breakout - BNO055 | ||
| - | https:// | ||
| - | video demo, no heading mentioned, euler and quat, quat more accurate, too slow for vehicle | ||
| - | https:// | ||
| - | Bosch Sensortec BNO055 | ||
| - | "not recommended for new designs" | ||
| - | "You could use BHI260AP in new design", | ||
| - | components: | ||
| - | Atmel SAM20D processor | ||
| - | BMA280 accelerometer | ||
| - | BMI055 gyroscope | ||
| - | BMM150 magnetometer | ||
| - | built-in fusion library, closed source: | ||
| - | Euler angles | ||
| - | quaternion | ||
| - | modi: IMU (motion), compass, M4G, NDOF | ||
| video by very creepy guy using adafruit bno055, but no compass heading, source code on screen but not downloadable | video by very creepy guy using adafruit bno055, but no compass heading, source code on screen but not downloadable | ||
| Line 154: | Line 180: | ||
| Magnetometer calibration | Magnetometer calibration | ||
| + | hold the sensor level and spin it horizontally | ||
| + | the graph of the results should be a perfect circle, and the radius of the circle is the strength of the magnetic field | ||
| https:// | https:// | ||
| - | Scott Lobdell, | + | Scott Lobdell, |
| + | start with 9 measurements from the 3 sensors * 3 axes | ||
| + | calibrate the magnetometer using a 3D bias to get corrected values of the 3 magnetometer measurements | ||
| + | begin ahrs | ||
| + | localize the acceleration vector from [x,y,z] to [north, | ||
| + | convert the 9 measurements into a quaternion | ||
| + | convert the quaternion into a 3x3 rotation matrix | ||
| + | multiply the acceleration vector times the inverse of the rotation matrix, giving the localized acceleration vector | ||
| + | remove the acceleration due to gravity [0,0,1] to [0,0,0] | ||
| + | apply the declination offset | ||
| https:// | https:// | ||
| + | ===== videos ===== | ||
| + | |||
| + | Paul McWhorter: 9-axis IMUs with Arduino, youtube \\ | ||
| + | Adafruit Bosch BNO055 \\ | ||
| + | 26 videos, in particular: \\ | ||
| + | #10: Making a tilt-compensated compass \\ | ||
| + | #21: Visualizing 3D rotations in VPython using Quaternions \\ | ||
| + | |||
| + | Scott Lobdell: How to implement an IMU \\ | ||
| + | no specific chip or code \\ | ||
| + | hand-drawn diagrams and verbal description of calibration and AHRS calculations | ||
| + | |||
| + | MicWro Engr, Michael Wrona: Magnetometer Errors and Calibration \\ | ||
| + | Adafruit Precision NXP 9-DOF Breakout Board - FXOS8700 + FXAS21002 \\ | ||
| + | series of youtubes made while developing his custom " | ||
| + | Magneto calibration software \\ | ||
| + | [[Michael Wrona notes | notes]] | ||
| + | |||
| + | Steppe School: STM32 and ICM20948 IMU part 1. accelerator and gyroscope | ||
| + | https:// | ||
| + | 3 videos | ||
| + | |||
| + | ===== Commercial Products ===== | ||
| + | |||
| + | Arduino-compatible, | ||
| + | |||
| + | === MPU9250 === | ||
| + | chip: TDK Invensense MPU9250 \\ | ||
| + | date: ? \\ | ||
| + | status: EOL as of 2018 (supposedly replaced by ICM20948) \\ | ||
| + | comments: users complain that this product is no longer being manufactured and the market is flooded with fakes that don't work. \\ | ||
| + | |||
| + | === ICM20948 === | ||
| + | board: boards available from adafruit and sparkfun \\ | ||
| + | chip: TDK Invensense MPU9250 \\ | ||
| + | date: 2018 \\ | ||
| + | datasheet: https:// | ||
| + | status: supposedly replaces MPU9250, but registers are different, therefore different driver required \\ | ||
| + | comment: users complain that the DMP is not finished. DMP output is not available in current libraries | ||
| + | videos: | ||
| + | * https:// | ||
| + | * see Paul McWhorter youtubes | ||
| + | libraries: | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | === BNO055 === | ||
| + | board: Adafruit 9-DOF Absolute Orientation IMU Fusion Breakout, BNO055 \\ | ||
| + | chip: Bosch Sensortec BNO055 \\ | ||
| + | date: 2014 \\ | ||
| + | status: "Not recommended for new designs...You could use BHI260AP...", | ||
| + | datasheet: https:// | ||
| + | components: | ||
| + | * Atmel SAM20D processor | ||
| + | * BMA280 accelerometer | ||
| + | * BMI055 gyroscope | ||
| + | * BMM150 magnetometer | ||
| + | * built-in fusion library, closed source: | ||
| + | * Euler angles | ||
| + | * quaternion | ||
| + | * modes: IMU, compass, M4G, NDOF | ||
| + | libraries: | ||
| + | * https:// | ||
| + | videos: | ||
| + | * https:// | ||
| + | * video demo, no heading mentioned, euler and quat, quat more accurate, too slow for vehicle | ||
| + | * https:// | ||
| + | |||
| + | === LIS3MDL === | ||
| + | board: Polulu #2862 MinIMU-9 v6 Gyro, Accelerometer, | ||
| + | chips: | ||
| + | datasheets: | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | === UM7-LT === | ||
| + | board: made by Redshift Labs, sold by Polulu | ||
| + | chip: UM7 | ||
| + | description: | ||
| + | * AHRS, includes microcontroller running a Kalman Filter | ||
| + | * expensive 160 USD | ||
| + | * Redshift Labs appears to be out of business | ||
projects/robots/inertial_navigation_system.1714071209.txt.gz · Last modified: 2024/04/25 14:53 by jhagstrand