• No results found

5 Electronic System

5.2 Sensors

5.2.1 Attitude Heading Reference System

To monitor the position of the body and pelvis some form of sensor must be implemented. An Attitude Heading Reference System (AHRS) consists of 3 Gyroscopes, 3 Accelerometers and 3 Magnetometers. These systems are currently used in intelligent gait humanoids [33]. An on board processor calculates the rate of change with respect to time outputting an absolute position in Hexadecimal. The magnetometer is used as a horizontal reference to compute the rotational angle whereas the gravity is used for the Roll and Pitch. The AHRS is shown in (Figure 5-12)

Figure 5-12: Top and Bottom view of the CH 6dm AHRS (www.chrobotics.com)

Communication with the CHR-6dm is performed over a TTL (3.3V) UART at 115200 Baud. The AHRS can be configured to transmit raw sensor in addition to angle estimates, and the transmission rate can be configured in 1 Hz increments from 20 Hz to 300 Hz. Alternatively, the CHR-6dm can operate in "silent mode," where data is transmitted only when specific requests are received over the UART. Regardless of the transmission mode and rate, internal angle estimates are maintained at over 500 Hz to ensure long-term accuracy.

A major disadvantage of using MEMS systems for navigation/positioning is that they typically suffer from drift. Drift is the expression for an accumulated error in the position calculations. Because the system is continually adding minute changes to its previously

81

calculated position, any errors in measurement, however small are accumulated resulting in a gradual drift effect.

To try and reduce the possibility of drift there are several algorithms and filters that can be implemented. The CH 6dm has a built in Extended Kalman Filter (EKF) which through statistical models, simulates the potential error in calculated value and actual value. EKF performance can be tuned by adjusting the process noise covariance matrix and the measurement noise covariance matrices (there are two measurement noise matrices - one for the accelerometers, and one for the magnetometer).

The process noise matrix is used to specify how much the EKF "trusts" data from the gyros with respect to data from the magnetic sensors and accelerometers. The lower the values along the diagonal of the matrix, the more the rate gyros are trusted. Conversely, if the diagonal elements are large, the gyros are trusted less and the accelerometers and magnetometers are weighted more heavily.

The CH 6dm has full calibration capabilities of accelerometers, gyroscopes, and the magnetometer. This is necessary when the sensor is not mounted exactly as desired. (Figure 5-13) show the user interface which allows for calibration and displays rate gyro, accelerometer, and angle values.

Figure 5-13: AHRS user interface with a 3D representation of the orientation (www.chrobotics.com)

82

5.2.1.1

Protocol

Each packet received by the AHRS must begin with the three byte sequence "snp" to signal the beginning of a new packet. The fourth byte is Packet Type indicator (PT), which identifies the packet being received.

Packet Structure

1 Byte 1 Byte 1 Byte 1 Byte 1 Byte 1 Byte 1 Byte 1 Byte

S N P PT D1 Dn Checksum

PT is the function that the user wants the AHRS to perform. If the user requires positional data, and the sensor is set to “listen mode”, the user must request the GET_DATA function.

In Listen Mode, 0x01 causes the AHRS to transmit data from all active channels in a SENSOR_DATA packet. D1 D2 D3 D4 D5 D6 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 1st active channel 2nd active channel yaw pitch roll Yaw

rate Pitch rate Roll rate m x m y m z g x g y g z a z a y a z 0

The first two bytes following the data length byte indicate which channels are active. The actual

sensor data is contained in the remaining data bytes.

If all channels are active, then data is given in the following order:

yaw, pitch, roll,

yaw_rate, pitch_rate, roll_rate, mag_z, mag_y, mag_x,

gyro_z, gyro_y, gyro_x, accel_z, accel_y, accel_x

83

5.2.1.2

Calibration

The 6dm AHRS provides automated calibration routines which help simplify integration. These routines include; rate gyro bias calibration, magnetometer hard and soft, iron calibration, and accelerometer calibration. However for more accurate applications it may be necessary to individually calibrate various sensors in the AHRS. There are a variety of calibration procedures that can be performed ranging from very simple to more complex, these are listed below.

x Rate gyro bias calibration

x Rate gyro scale factor calibration x Accelerometer bias calibration

x Magnetometer soft and hard iron calibration

x Accelerometer and magnetometer reference vectors

x Accelerometer and rate gyro cross-axis misalignment correction

5.2.1.3

Extended Kalman Filtering

The Kalman filter addresses the general issue of noise contained in measurements observed over time with the intention of producing values that are closer to the true values [34]. The Extented Kalman filter is used if the process being estimated is non-linear which is a common occurrence in an autonomous vehicle [34].

The 6dm AHRS has built in Extended Kalman filtering which makes the sensor one of the most accurate AHRS in the low budget range. The disadvantage of EKF is that in general it is not an optimal estimator, it is difficult to implement, difficult to tune, and only reliable for systems that are almost linear [34].

Invariant extended Kalman filtering (IEKF) is similar to EKF but is more suited for non-linear systems as it combines the advantages of both EKF and ‘symmetry preserving filters’ which is a very recent adaption to filter theory [34]. IEKF at present is only available in high grade AHRS so therefore EKF will be sufficient for the initial development of the humanoid robot.

84

The EKF can be tuned on the 6dm through the calibration mode but is not advised as it is tuned to a reasonable standard from the factory and there is no ‘reset’ for the EKF.

Related documents