View Single Post
  #6   Spotlight this post!  
Unread 25-01-2015, 20:55
Richard100 Richard100 is offline
Registered User
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Southern Maryland
Posts: 79
Richard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to behold
Re: Got Gyro drift? Try Sensor Fusion !

Here is the RoboBees IMU-based Attitude and Heading Reference System (AHRS), designed for the roboRIO, and written in LabVIEW.
Porting to the roboRIO is complete, and issues with the WPI I2C library changes (mentioned above) have been resolved. To try it out, load the Project file, open the IMU Demo VI, and follow the instructions listed on the front panel. Some additional update details:

(a) The calibration time has been optimized to take advantage of the roboRIO’s processing speed improvement over the cRIO. A new set of cycle-time benchmarks were established for the IMU READ operation:
__________________________________________________ ______________
- IMU Read benchmarks, with roboRIO or 4-slot cRIO -

For enabled Accelerometer (A), Rate Gyro (G), and Magnetometer (M), the time to execute IMU Read in milliseconds (ms):

Code:
Sensor ... roboRIO Slow / Fast           4-slot cRIO Slow / Fast selected
A           .      0.42      0.34                   5.2      3.6
G           .      1.05      0.69                   5.2      3.6
M           .      0.42      0.34                   5.2      3.6
A + G       .      2.1       1.3                    10       6.7
A + M       .      0.7       0.6                    10       6.7
G + M       .      2.1       1.3                    10       6.7
A + G + M   .      2.9       1.9                    14.7     9.8
("Slow" is when the code’s Fast parameter is deasserted. "Fast" skips the sensor data ready verification before each sensor read operation, which is a good default setting.)
__________________________________________________ ______________

(b) The Complementary Filter uses a value called ‘Alpha’ to set the fusion point between sensors. There are now suggested Alpha value starting points on the IMU Demo Front Panel to lower the learning curve on filter tuning for optimal fusion.

(c) This code has been tested with both AdaFruit’s 9 DoF IMU Breakout Board (Product ID: 1714) and their 10 DoF IMU Breakout Board (Product ID: 1604), and is compatible with either Rate Gyroscope chip version (STMicroelectronics L3GD20 or L3GD20H).

(d) Includes a ‘Bad Cal’ indication for the Magnetometer calibration process, completing the set (A,G,M). These detect when excessive variation exists in the calibration data set produced by IMU OPEN, which can result from some of the common calibration failure modes (like bumping the Rate Gyro when is should be at rest, and attempting to cal the Mag near a field disturbance).

(e) Includes basic Magnetic Anomaly Detection. This might be used for knowing when to stop trusting the Complementary Filter’s Yaw output or knowing when another robot gets near yours. Calibrated magnetic data should be consistent with data available at NOAA’s National Geophysical Data Center at :

http://www.ngdc.noaa.gov/geomag-web/...e=true#igrfwmm
(at least it was in Southern Maryland).

(f) The code has a known issue in interfacing with the MXP’s I2C bus, using the Rev Robotics MXP Expansion Board. Works fine with the roboRIO’s On-Board I2C bus. This is probably something I’m missing in software configuration, and is under review.

Enjoy and good luck this season !
Attached Files
File Type: zip AdaIMU roboRIO.zip (1.75 MB, 147 views)
Reply With Quote