User Manual TRAX Attitude & Heading Reference System (AHRS)
Table of Contents 1 COPYRIGHT & WARRANTY INFORMATION ................................................. 1 2 INTRODUCTION ......................................................................................... 2 3 SPECIFICATIONS ......................................................................................... 3 3.1 Characteristics & Requirements ........................................................... 3 3.2 Mechanical Drawings ......................................................................
7 OPERATION WITH PNI BINARY PROTOCOL ............................................... 36 7.1 Datagram Structure ............................................................................ 36 7.2 Parameter Formats ............................................................................. 37 7.2.1 Endianness ................................................................................. 37 7.2.2 Floating Point ............................................................................. 37 7.2.
List of Figures Figure 3-1: Figure 3-2: Figure 3-3: Figure 3-4: Figure 3-5: Figure 3-6: Figure 3-7: Figure 4-1: Figure 4-2: Figure 5-1: Figure 5-2: Figure 7-1: Typical Current Drawing During Application of External Power ......... 4 TRAX PCA Mechanical Drawing ........................................................... 6 Molex-to-Pigtail Cable Drawing, pn 12415 .......................................... 6 Molex-to-USB Cable Drawing, pn 13119 .............................................
1 Copyright & Warranty Information © Copyright PNI Sensor Corporation 2011. Revised March 2014. All Rights Reserved. Reproduction, adaptation, or translation without prior written permission is prohibited, except as allowed under copyright laws. For the most recent version of this manual, visit our website at www.pnicorp.com. PNI Sensor Corporation 2331 Circadian Way Santa Rosa, CA 95407, USA Tel: (707) 566-2260 Fax: (707) 566-2261 Warranty and Limitation of Liability.
2 Introduction Thank you for purchasing PNI Sensor Corporation’s TRAX attitude & heading reference system (AHRS). The TRAX employs a proprietary Kalman filtering algorithm that intelligently fuses PNI's patented Reference Magnetic Sensors with a 3-axis gyroscope and 3-axis accelerometer.
3 Specifications 3.1 Characteristics & Requirements Table 3-1: Performance Specifications1 Parameter Value Heading AHRS Mode Accuracy2 Resolution Range Attitude Heading Compass Mode Attitude Pitch Roll Accuracy Resolution Static Accuracy3 Resolution Repeatability Pitch Range Roll Static Accuracy Resolution Repeatability 2.0° rms 0.1° ± 90° ± 180° 2.0° rms 0.01° 0.3° rms 0.1° 0.05° rms ± 90° ± 180° 0.2° rms 0.01° 0.05° rms Footnotes: 1.
Table 3-2: Absolute Maximum Ratings Parameter Supply Voltage Storage Temperature Minimum Maximum Units -0.3 -40 +10 +85 VDC °C CAUTION: Stresses beyond those listed above may cause permanent damage to the device. These are stress ratings only. Operation of the device at these or other conditions beyond those indicated in the operational sections of the specifications is not implied. Table 3-3: Electrical Requirements Parameter Value Supply Voltage 3.8 to 9 VDC 2.4 V minimum 0.6 V maximum ±5.
Table 3-4: I/O Characteristics Parameter Value Communication Interface Communication Protocol Communication Rate1 Maximum Data Output Rate RS232 UART & USB PNI Binary 2400 to 921,600 baud ≈30 samples/sec Footnote: 1. The TRAX can operate up to 921,600 baud, but native RS232 is limited to 115,200 baud. Table 3-5: Environmental Requirements Parameter Value Operating Temperature1 Storage Temperature -40C to +85C -40C to +85C Footnote: 1.
3.
Figure 3-5: TRAX Enclosed Mechanical Drawing Figure 3-6: ODU-to-USB Cable Drawing, pn 13082 Figure 3-7: ODU-to-RS232 Cable Drawing, pn 13081 PNI Sensor Corporation TRAX User Manual DOC#1016505 r06 Page 7
4 Set-Up This section describes how to configure the TRAX in your host system. To install the TRAX into your system, follow these steps: Make electrical connections to the TRAX. Evaluate the TRAX using the TRAX Studio program, or a binary terminal emulation program, such as RealTerm or Tera Term, to ensure the TRAX is working properly. Choose a mounting location. Mechanically mount the TRAX in the host system. Perform a user calibration. 4.
4.2 Installation Location The TRAX’s wide dynamic range and sophisticated algorithms allow it to operate in many environments. For optimal performance however, you should mount the TRAX with the following considerations in mind: 4.2.1 Operate within the TRAX’s dynamic range The TRAX can be user calibrated to correct for static magnetic fields created by the host system. However, each axis of the TRAX has a calibrated dynamic range of ±125 µT.
method used for aircraft orientation, where the outputs are heading, pitch and roll. When using Euler angles in aviation, roll is defined as the angle rotated around an axis through the center of the fuselage, while pitch is rotation around an axis through the center of the wings. These rotations are dependent on each other since the axes of rotation move with the plane.
Figure 4-2: TRAX Enclosed Mounting Orientations PNI Sensor Corporation TRAX User Manual DOC#1016505 r06 Page 11
5 User Calibration The magnetic sensor in the TRAX is calibrated at PNI’s factory in a magnetically controlled environment. However sources of magnetic distortion positioned near the TRAX in the user’s system will distort Earth’s magnetic field and should be compensated for in the host system with a user calibration. Examples of such sources include ferrous metals and alloys (ex. iron, nickel, steel, etc.), batteries, audio speakers, current-carrying wires, and electric motors.
5.1 Magnetic Calibration Two fundamental types of magnetic distortion exist: hard-iron and soft-iron. These are discussed in the following paragraphs, plus a discussion on how temperature also affects magnetic fields and other considerations. For more information on magnetic distortion and calibration, see PNI’s white paper “Local Magnetic Distortion Effects on 3-Axis Compassing” at PNI’s website (http://www.pnicorp.com/technology/papers).
Other Considerations Unlike a compass, such as PNI’s TCM module, the TRAX is an AHRS and as such it can compensate for transient changes in the local magnetic field. However, the TRAX will work best if it is kept away from dynamic magnetic fields. For example, if there is an electric motor is in the host system that will be turning on and off during TRAX operation, then mount the TRAX far away from the motor such that the motor’s state does not affect the heading when TRAX is in Compass Mode.
properly configured with respect to the mounting orientation, Endianness, north reference, etc. Section 6.5 outlines how to perform a calibration using TRAX Studio, while Section 7.6.2 provides a step-by-step example of how to perform a calibration using the PNI protocol. 5.1.1 Full-Range Calibration A Full-Range Calibration is appropriate when the TRAX can be tilted ±45° or more. This method compensates for hard and soft-iron effects in three dimensions, and allows for the highest accuracy readings.
Table 5-2: 12 Point Full-Range Calibration Pattern Sample # Yaw1 Pitch Roll 0° 90° 180° 270° ±5° ±5° ±5° ±5° 30° to 40° -30° to -40° 30° to 40° -30° to -40° 30° 120° 210° 300° > +45° > +45° > +45° > +45° 30° to 40° -30° to -40° 30° to 40° -30° to -40° 60° 150° 240° 330° < -45° < -45° < -45° < -45° 30° to 40° -30° to -40° 30° to 40° -30° to -40° First Circle 1 2 3 4 Second Circle 5 6 7 8 Third Circle 9 10 11 12 Footnote: 1.
Table 5-3: 12 Point 2D Calibration Pattern Sample # Yaw Pitch1 Roll1 1 2 3 4 5 6 7 8 9 10 11 12 0° 30° 60° 90° 120° 150° 180° 210° 240° 270° 300° 330° 0° max. negative 0° max. positive 0° max. negative 0° max. positive 0° max. negative 0° max. positive 0° max. negative 0° max. positive 0° max. negative 0° max. positive 0° max. negative 0° max. positive Footnote: 1. For best results, the tilt experienced during calibration should match that experienced in service.
Note that a similar and acceptable alternative pattern would be to follow the recommended 12 point Full-Range Calibration pattern, but substituting the >±45° of pitch with whatever pitch can be achieved and the ±10° to ±20° of roll with whatever roll can be achieved up to these limits. See Section 5.1.1 for more information. 5.1.4 Hard-Iron-Only Calibration It is not uncommon for the hard-iron magnetic distortions around the TRAX to change.
vector, which in turn will result in an inaccurate heading reading. For this reason, the TRAX should be stationary when taking a measurement. As previously mentioned, PNI calibrates the accelerometer in its factory prior to shipment. But over time the bias and offset of the accelerometer will drift. For this reason PNI recommends the accelerometer be recalibrated every 6 to 12 months. The user may return the TRAX to PNI for accelerometer calibration, or the user may perform a user accelerometer calibration.
Note: While the TRAX is shown removed from the host system, the Accelerometer Calibration may be performed with the TRAX mounted in the host system. Figure 5-2: Accelerometer Calibration Starting Orientations 5.2.2 Mag-and-Accel Calibration The TRAX allows for a simultaneous magnetometer and accelerometer calibration. This requires a good calibration pattern, stable measurements (not handheld), and installation in the user’s system such that the appropriate local magnetic environment is present.
6 Operation with TRAX Studio The TRAX Studio program puts an easy-to-use, graphical-user interface (GUI) onto the binary command language used by the TRAX. TRAX Studio is intended for evaluating, demonstrating, and calibrating the enclosed version of TRAX (“TRAX Enclosed”). Among other features, the program can log and save the outputs from the TRAX to a file for off-line evaluation. Anything that can be done using TRAX Studio also can be done using PNI’s binary protocol, as discussed in Section 7. 6.
Settings”, and under the header are the various TRAX Studio tabs, which are discussed in the subsequent sections. The header is the same regardless of which tab is selected. To connect, set the “Serial” field to the appropriate COM port. To determine this, in Windows right click on “My Computer”, select “Manage”, then select “Device Manager”. Expand “Ports” and note the port for “USB Serial Port”. This should be the assigned COM port for the TRAX. Set the baud rate.
Save Clicking the button will save any changes made in TRAX Studio to the TRAX’s onboard non-volatile and volatile memory. Apply Selecting the button will apply any changes to the TRAX’s volatile memory, but not to the non-volatile memory. If the TRAX is powered off/on, the settings will revert to whatever was last saved in the non-volatile memory. Read Clicking the button will read the current settings in the TRAX’s volatile memory and display them.
6.4.1 General Settings Baud Rate The baud rate can be altered by selecting the desired baud rate from the pull down menu, clicking on “Save”, and then powering the device off and back on. The new baud rate will not take effect until the device has been powered off/on. The default baud rate is 38400. Mounting TRAX Studio supports 16 mounting orientations, as previously illustrated in Figure 4-2. The default is “Standard”. Output Units The TRAX can output heading, pitch, and roll in either degrees or mils.
Declination The declination represents the heading difference between magnetic north and true north, and needs to be entered if “True” is selected as the “North Reference”. Declination varies primarily with location, although it also gradually changes over time (years) for a given location. To find the declination for where the TRAX will be used, go to http://www.ngdc.noaa.gov/geomagmodels/Declination.jsp.
Acquisition Mode the TRAX controls the data rate while in Polled Mode the TRAX Studio program controls the data rate. Polled Mode is the default. Sample Delay The Sample Delay is relevant when Continuous Mode is selected. It is the time delay, in seconds, between completion of TRAX sending one set of data and the start of sending the next sample set. If the delay is set to 0, then TRAX will begin sending new data as soon as the previous data set has been sent.
6.5.1 Calibration Settings Calibration Type The “Calibration Type” pull down menu establishes the type of calibration to be performed. The options are Full, 2D, Hard-Iron-Only, Limited-Tilt, and Accelerometer. These are briefly discussed below and in more detail in Section 5. Full Range – recommended calibration method when ≥45° of tilt is possible. 2D – recommended when the available tilt range is limited to ≤5°. Hard Iron Only – serves as a hard-iron recalibration to a prior calibration.
However, the TRAX can store eight (8) sets of magnetic calibration coefficients and eight (8) sets of accelerometer calibration coefficients. This feature is useful if the compass will be placed in multiple locations that have different local magnetic field properties. The default is index number 0 and initially this is populated at PNI with factory-generated coefficients for the device itself. The other sets initially are unpopulated.
If “Automatic Sampling” is checked the TRAX needs to be held steady for a short time and then a sample automatically will be taken. Once the window indicates the next number, the device’s orientation should be changed and held steady for the next sample. Once the pre-set number of samples has been taken (as set on the Configuration tab) the calibration is complete. Regardless of whether “Automatic Sampling” is selected, two criteria must be met for a calibration sample to be taken.
in a particular section can result in a poor score. Distribution is not calculated for an Accelerometer Calibration. Tilt Error Indicates if the TRAX experienced sufficient tilt during the calibration, taking into account the calibration method. The score should be 0. Tilt Error is not calculated for an Accelerometer Calibration. Tilt Range This reports the larger of either half the full pitch range or half the full roll range of all sample points.
Start/Stop Testing Clicking the button results in the Heading, Pitch, and Roll values being updated on the Test Tab screen, as well as the Heading Status. If the Acquisition Mode is set to “Continuous”, then the data will be continuously updated. The button will change to read , such that clicking it again will stop the screen from updating. If the Acquisition Mode is set to “Single”, then only one measurement will be displayed on the screen.
Show 3D Model Selecting the button launches the 3D Model window, as shown below. Clicking the button begins continuous updating of the orientation of the rendered model, and of the heading, pitch, and roll output fields. The button on the Test Tab screen and on the 3D Model screen are linked such that selecting either of them will stop or start both screens. Clicking on will expand the window to the full computer screen, and the button will now read .
to place it in Compass Mode. Specifically, it is necessary to calibrate the TRAX in Compass Mode. (This is handled automatically in TRAX Studio, so it is not necessary for the user to place the TRAX in Compass Mode when doing a calibration in TRAX Studio.) Also, it may be beneficial to operate in Compass Mode to conserve battery life, since in Compass Mode the TRAX turns off the gyros, generally uses less CPU power, and can be placed in Sleep Mode to significantly reduce current consumption.
To acquire data and export it, follow the procedure below: Select the parameters you wish to log in the window on the left. Use Shift -Click and Ctrl-Click to select multiple items. In the screen shot above, “Heading”, “Pitch”, “Roll”, and “Heading Status” were selected. Note that Heading Status can be 0, 1, or 2, corresponding to “green”, “yellow”, or “red”. Click the button to start logging. The button changes to a button after data logging begins.
the effect of the calibration coefficients. The Graph Tab normally would be used in Compass Mode because of this. The graph can be used to visually see hard and soft-iron effects within the environment measured by the TRAX, as well as corrected output after a user calibration has been performed. The data can be saved to a .txt log file by clicking . To clear the data, select . To clear both the data and the plot, select . 6.
7 Operation with PNI Binary Protocol The SeaTRAX utilizes a binary communication protocol, where the communication parameters should be configured as follows: Table 7-1: Port Configuration Parameter Value Number of Data Bits Start Bits Stop Bits Parity 8 1 1 none 7.
7.2 Parameter Formats 7.2.1 Endianness TRAX can treat 32-bit and 16-bit parameters as having big or little Endian formatting. For 32-bit parameters, the big Endian byte order is ABCD EFGH, while the little Endian byte order is DCBA HGFE. For 16-bit parameters the big Endian byte order is ABCD, while the little Endian byte order is DCBA. The Endianness is selectable by the user per Section 7.4.2. The default is big Endian, and this is generally assumed in the manual. 7.2.
7.2.3 Signed Integer For signed integers, the most significant bit (msb) represents the sign of the value, where 0=positive and 1=negative. Signed integers are represents in 2’s compliment. Signed 32-Bit Integer (SInt32) SInt32-based parameters are signed 32-bit numbers (2’s compliment). represents the sign of the value, where 0=positive and 1=negative.
7.2.4 Unsigned Integer Unsigned 32-Bit Integer (UInt32) UInt32-based parameters are unsigned 32-bit numbers. 31 24 23 16 15 8 7 msb 0 lsb Big Endian 7 0 15 8 23 16 31 lsb 24 msb Little Endian Unsigned 16-Bit Integer (UInt16) UInt16-based parameters are unsigned 16-bit numbers. 15 8 7 msb 0 lsb 7 0 15 lsb Big Endian 8 msb Little Endian Unsigned 8-Bit Integer (UInt8) UInt8-based parameters are unsigned 8-bit numbers. 7 0 byte 7.2.
7.3 Commands Overview Table 7-2 provides a summary of the basic commands available with the TRAX. Table 7-2: TRAX Command Set Frame ID Dec Hex Command Description Queries the device’s type and firmware revision. Response to kGetModInfo Sets the data components to be output.
31 0x1F kTakeUserCalSample 36 0x24 kFactoryIAccelCoeff 37 79 80 81 0x25 0x4F 0x50 0x51 kFactoryAccelCoeffDone kSetFunctionalMode kGetFunctionalMode kGetFunctionalModeResp 110 0x6E kSetResetRef 119 0x77 kSetMagTruthMethod 120 121 0x78 0x79 kGetMagTruthMethod kGetMagTruthMethodResp Commands the TRAX to take a sample during user calibration Resets accelerometer calibration coefficients to original factory-established values Respond to kFactoryAccelCoeff Puts TRAX in Compass Mode or AHRS Mode
only be set one at time. To save these in non-volatile memory, the kSave command must be issued. Payload Config ID Value UInt8 ID Specific Example: To configure the declination, the payload would look like: Payload 1 10.0 Declination ID Declination Angle (Float32) Table 7-3: Configuration Identifiers Settings Config.
kBaudRate 14 UInt8 kMilOut kHPRDuringCal kMagCoeffSet kAccelCoeffSet 15 16 18 19 Boolean Boolean UInt32 UInt32 4 – 2400 5 – 3600 6 – 4800 7 – 7200 8 – 9600 9 – 14400 10 – 19200 11 – 28800 12 – 38400 13 – 57600 14 - 115200 True or False True or False 0-7 0-7 12 False True 0 0 Configuration parameters and settings for kSetConfig: kDeclination (Config. ID 1d) This sets the declination angle to determine True North heading.
Table 7-4: Sample Points Number of Samples Calibration Mode Allowable Range Minimum Recommended Full-Range Limited-Tilt 2D Calibration Hard-Iron-Only Accelerometer-Only Mag-and-Accel 10 to 18 10 to 18 10 to 18 4 to 18 12 to 32 12 to 32 12 12 12 6 18 18 kUserCalAutoSampling (Config. ID 13d) This flag is used during user calibration. If set to TRUE, the TRAX automatically takes calibration sample points once the minimum change and stability requirements are met.
kAccelCoeffSet (Config. ID 19d) This command provides the flexibility to store up to eight (8) sets of accelerometer calibration coefficients in the TRAX. The default is set number 0. To store a set of coefficients, first establish the set number (number 0 to 7) using kAccelCoeffSet, then perform the accelerometer calibration. The coefficient values will be stored in the defined set number. kSetConfigDone (frame ID 19d, 0X13) This frame is the response to kSetConfig frame. The frame has no payload.
Payload MagTruthMethod UInt8 MagTruthMethod Payload Value: “1”: Standard “2”: Tight “3”: AutoMerge kGetMagTruthMethod (frame ID 120d, 0X78) This frame queries the setting of the Mag Truth Method. It has no payload. kGetMagTruthMethodResp (frame ID 121d, 0X79) This frame is the response of kGetMagTruthMethod and the payload is the same as for kSetMagTruthMethod. 7.4.
kSetResetRef (frame ID 110d) This frame re-aligns the TRAX 9-axis heading to the 6-axis (mag and accel) heading and establishes the criteria for the reference magnetic field. The frame should be sent when the user is confident the local magnetic field is not distorted. It has no payload. 7.5.2 Data Acquisition Parameters kSetAcqParams (frame ID 24 d) This frame sets the sensor acquisition parameters in the TRAX.
Note that the inverse of the SampleDelay is somewhat greater than the actual sample rate, since the SampleDelay does not include actual acquisition time. kSetAcqParamsDone (frame ID 26 d) This frame is the response to kSetAcqParams frame. The frame has no payload. kGetAcqParams (frame ID 25 d) This frame queries the unit for acquisition parameters. The frame has no payload. kGetAcqParamsResp (frame ID 27 d) This frame is the response to kGetAcqParams frame.
kQuaternion kTemperature 77 7 kDistortion 8 kCalStatus 9 kAccelX kAccelY kAccelZ kMagX kMagY kMagZ kGyroX kGyroY kGyroZ 21 22 23 27 28 29 74 75 76 0x4D 0x07 0x08 0x09 0x15 0x16 0x17 0x1B 0x1C 0x1D 0x4A 0x4B 0x4C 4x Float32 Float32 Boolean Boolean Float32 Float32 Float32 Float32 Float32 Float32 Float32 Float32 Float32 quaternion ˚ Celsius True or False (Default) True or False (Default) G G G T T T radians/sec radians/sec radians/sec Component types are listed below. All are read-only values.
kAccelX, kAccelY & kAccelZ (Component IDs 21d, 22d, 23d) These values represent the accelerometer sensor data for the x, y, and z axis, respectively. The values are normalized to g (Earth’s gravitational force). kMagX, kMagY & kMagZ (Component IDs 27d, 28d, 29d) These values represent the magnetic sensor data for the x, y, and z axis, respectively. The values are given in µT.
Payload 2 5 359.9 79 ID Count Heading ID Heading (Float32) Heading Status ID 1 Heading Status (UInt8) 7.6 Calibration Commands 7.6.1 User Calibration Commands First, note that in order to perform a user calibration, it is necessary to place the TRAX in Compass Mode, as discussed in Section 7.7. Note that TRAX allows for a maximum of 12 calibration points.
Limited-Tilt Calibration Recommended calibration method when >5° of tilt calibration is available, but tilt is restricted to <45°. (i.e. full range calibration is not possible.) Accel-Only Calibration Select this when an accelerometer calibration will be performed. Accelerometer and Magnetic Calibration (110d = 6Eh) Selected when magnetic and accelerometer simultaneously.
7.6.2 Performing a User calibration The steps below provide an example of the steps to perform a user calibration. Using the kSetParam command, set the number of tap filters to 0. Using the kSetConfig command, set kUserCalAutoSampling. “False” is generally recommended, but “True” may be more convenient. Using the kSetConfig command, set kMagCoeffSet (magnetometer calibration) and/or kAccelCoeffSet (accelerometer calibration). These fields allow the user to save multiple sets of calibration coefficients.
methods. Note that it is possible to get acceptable scores for DistributionError and TiltError and still have a rather high MagCalScore value. The most likely reason for this is the TRAX is close to a source of local magnetic distortion that is not fixed with respect to the device. Bytes 5-8: Reserved for PNI use. AccelCalScore: Represents the over-riding indicator of the quality of the accelerometer calibration. An acceptable score is ≤1.
kFactoryAccelCoeffDone (frame ID 37 d) This frame is the response to kFactoryAccelCoeff frame. The frame has no payload. 7.7 Compass Mode Commands The TRAX normally operates in AHRS Mode, which uses a proprietary Kalman algorithm to fuse the inputs of its 3-axis gyroscope, 3-axis accelerometer, and 3-axis magnetometer. However, the user can place the TRAX in Compass Mode, wherein it only uses the inputs from the accelerometer and magnetometer to establish heading, pitch, and roll.
7.7.2 FIR Filters When operating in Compass Mode, the TRAX incorporates a finite impulse response (FIR) filter to provide a more stable heading reading. The number of taps (or samples) represents the amount of filtering to be performed. The number of taps directly affects the time for the initial sample reading, as all the taps must be populated before data is output. The FIR filter settings have no affect when operating in AHRS Mode.
10 01.1484431942626e-1 03.8014333463472e-2 11 09.5354386848804e-2 04.5402682509802e-2 12 07.1024151197772e-2 05.2436112653103e-2 13 04.6451949792704e-2 05.8693165018301e-2 14 02.5971390034516e-2 06.3781858267530e-2 15 01.2710056429342e-2 06.7373451424187e-2 16 07.9724971069144e-3 06.9231186101853e-2 17 06.9231186101853e-2 18 06.7373451424187e-2 19 06.3781858267530e-2 20 05.8693165018301e-2 21 05.2436112653103e-2 22 04.5402682509802e-2 23 03.8014333463472e-2 24 03.
kGetFIRFiltersResp (frame ID 14d) This is the response to kGetFIRFilters and it has the same payload definition as kSetFIRFilters. 7.7.3 Power Down/Up For certain applications it is desirable to conserve battery power. To maintain accurate heading readings in AHRS Mode generally requires continual sensor updates to the Kalman algorithm. However, this is not the case in Compass Mode wherein readings may be taken only when heading information is desired.