Frequently Asked Questions
How does one optimize the Accuracy of a Generation 2 navX-Sensor?
Optimizing Accuracy of a Generation 2 navX-SensorIn addition to the automatic sensor calibration and factory-provided defaults, Generation 2 navX-Sensors provide advanced users additional support for optimizing yaw accuracy for a chosen use case, via these tabs in the Advanced Configuration Tool:
- Full-scale Ranges
- Accelerometer Calibration
- Sensor Fusion
All values discussed below are stored in the navX-sensor's flash-memory and will be maintained for future use, even after rebooting the navX-sensor.
Full-scale RangesThe Full-scale Ranges tab enables configuration of the sensing range of a navX-sensor's gyroscopes and accelerometers.
Gyroscope Range (Deg/Sec)A gyroscope's "Full-scale Range" specifies the maximum number of degrees/second the gyroscope can measure. A lower gyroscope full-scale range provides a higher angular resolution and can improve yaw angle accuracy; however, if the range is exceeded (e.g., via a very rapid rotation) a lower gyroscope full-scale range might cause "saturation" and introduce significant error to integrated yaw angles.
Gyroscope full-scale ranges may be even multiples of 125 degrees/second (125, 250, 500, 1000, 2000) and the maximum full-scale range depends upon the model of navX-sensor.
Rule of thumb: Estimate the fastest rotation expected, double it, and round to the nearest Gyroscope full-scale range multiple.
NOTE: Modifying Gyroscope Range may impact the Gyroscope Scale Factor; therefore, after modifying Gyro Range, consider updating the "Gyro Scale Factor" on the Sensor Fusion Tab.
Accelerometer Range (G)An accelerometer's "Full-scale Range" specifies the maximum number of G the accelerometer can measure. A lower full-scale range provides a higher acceleration resolution and can improve estimates of velocity and displacement; however if the range is exceeded (e.g., via a very rapid acceleration) a lower accelerometer full-scale range might "saturate" and introduce significant errors to integrated displacement values.
Accelerometer full-scale ranges may be even multiples of 2 G (2/4/8/16).
Rule of thumb: 2G is best for smaller robots, 4G may be better for larger robots. If extremely high-speed impacts are expected, even larger values may be used.
NOTE: Modifying Accelerometer Range may impact the Accelerometer Calibration; therefore, after modifying Accelerometer Range, consider re-running the "Accelerometer Calibration" on the Accelerometer Calibration Tab.
Accelerometer CalibrationThe Accelerometer Calibration tab enables an advanced, manual calibration of a navX-Sensor's accelerometer sensors.
Although basic Accelerometer Calibration is performed during Factory Calibration, a more comprehensive manual accelerometer calibration can be performed using the "Accelerometer Calibration" tab. This calibration helps ensure the pitch and roll angles are as accurate as possible, and also can improve the quality of velocity and displacement estimates.
Calibration Process1) Press "Start Calibration". The Accel Cal. State and Accel Cal. Quality should now indicate "Uncalibrated"
2) Slowly, steadily rotate the circuit board so that all 4 edges of the board, and both faces of the board, are facing the earth.
3) Once the correction motions have been detected, the Accel Cal. State will change to "Done", and the Accel Cal. Quality should be "Good". If after the Accel Cal. State changes to "Done", the Accel Cal. Quality is not "Good", the calibration should be restarted to ensure the best possible results.
Sensor FusionThe Sensor Fusion tab enables modification of several key coefficients which govern the navX-sensor Sensor Fusion algorithm.
Gyroscope Scale Factor RatioEach gyroscope measures angular rotation slightly differently, due to inherent physical differences in the sensor; variations from the ideal measurement are known as "Gyroscope Scale Factor Error".
The Gyroscope Scale Factor Ratio is used to tune a particular gyroscope's response, correcting for scale factor error. The navX-sensor provides default Gyroscope Scale Factor Ratio values that are sufficient for most use cases, however to achieve the highest possible integrated yaw angle accuracy, the Gyroscope Scale Factor ratio may be adjusted.
Calibration Process1) Set the Gyro Scale Factor Ratio to 1.0. This disables all scale factor adjustments, ensuring that the reported yaw angle exhibits the amount of uncorrected Gyroscope Scale Factor Errors in the underlying sensor.
2) Ensure the navX-sensor is still and flat, with the "yaw axis" perpendicular to the earth. Using some sort of structure to hold the sensor still and flat, which also has a straight edge that can be used for physical alignment is highly recommended.
3) Start the navXUI.
4) Orient the navX-sensor so that it is pointing to "0 degrees", and press the "Reset Yaw" button; at this point, the yaw angle reported in the navXUI should indicate 0.00.
5) Slowly rotate the navX-sensor exactly 90 degrees to the right. Using a mechanical stop to ensure this angle is correct is highly recommended. The yaw angle reported in the navXUI should be near +90 degrees (e.g., +89.23). Write down this angle, as it will be used later in the calculation described below.
6) Slowly rotate the navX-sensor until it is pointing 90 degrees to the left of "0 degrees". The yaw angle reported in the navXUI should be near -90 degrees (e.g., -90.87). Write down this angle, as it will be used later in the calculation described below.
7) For higher accuracy, perform the above test multiple times, and calculate the average value for each angle.
8) Calculate the scale factor ratio by dividing 90 degrees by the average of the positive and negative 90 degree rotation values. For example:
+90 Angle: 91.36
-90 Angle: -90.87
Gyro Scale Factor Ratio = 90 / ( (abs(+90 angle) + abs(-90 angle)) / 2)
For example: Gyro Scale Factor Ratio = 90/(((abs(91.36)+abs(-90.87))/2)= 0.987
8) Once calculated, enter the new Gyro Scale Factor Ratio into the Sensor Fusion Tab and press the corresponding "Set" button.
9) After setting the Gyro Scale Factor Ratio, re-run the above test. At this point, a smaller and similar amount of angular error should be seen for both the +90 and -90 Angles. The goal here is that the error should be similar for both angles.
Max. Gyro Error (Deg/Sec)The navX-sensor onboard sensor fusion algorithms merge together data from the accelerometers and gyroscopes when calculating the yaw angle. As much as possible, gyroscope data should be used (since it is more accurate over short periods of time than the accelerometer data). However over longer periods of time and when the sensor is still, the accelerometer data can help correct/minimize yaw drift.
The "Max. Gyro Error" coefficient is used to control the "mix" of data from gyroscopes and accelerometers during sensor fusion. The basic idea is to always trust the gyroscopes, unless the measurements from the gyroscope fall below an "error" (or noise) threshold in which case the accelerometer data may be used to correct for yaw drift. The smaller the "Max. Gyro Error" coefficient, the less impact accelerometer data has on the integrated yaw angle.
NOTE: This setting is an advanced configuration setting, and should only be modified from the default value if directed by Kauai Labs support personnel.
Last Updated 4 years ago