Applying Advanced Sensors and Algorithms for Low-Cost Motion Tracking

作者:John Mayer

投稿人:DigiKey

High-performance motion tracking technologies have migrated from esoteric military, avionics, marine, and industrial applications into an expanding range of consumer applications. Still, bringing high-performance motion tracking to the consumer market often forces designers to reconcile conflicting goals, particularly with respect to cost, power consumption, and computational resources.

However, thanks to advances in MEMS design and manufacturing processes, a new generation of inertial measurement units (IMUs) are helping designers deliver higher levels of performance, with fewer compromises.

This article will outline the design issues and tradeoffs before introducing a new 6-axis IMU that promises to offload computationally intensive operations from the host processor. It will also discuss new computational partitioning strategies that are helping designers achieve a higher level of motion tracking accuracy at significantly lower system power levels. Finally, new optimal estimation algorithms and a dev kit that will allow developers to build more efficient sensor fusion solutions will be discussed.

The sensor performance tradeoffs

As is typical, consumer devices must be optimized for low cost. Traditionally, designers of consumer systems using MEMS motion sensing have opted to stream accelerometer and gyroscope samples from the IMU to the applications processor (AP) or sensor hub controller, before performing further processing on the data.

However, precision motion tracking requires significant computational resources to perform sensor fusion with currently available 6 and 9-axis IMUs. In these applications, designers must support sampling rates of at least several hundred hertz or more. Designers have struggled to deliver that high level of performance at low cost, without overloading the system processor and undermining the user experience.

Two more issues designers face are time to market and minimizing power consumption. Given that all sensors drift over time, calibration is key to the development of highly accurate and consistent motion tracking subsystems. Writing auto calibration algorithms is one option, but the time it takes often conflicts with the short time-to-market windows common in the consumer marketplace. As high-performance tracking edges its way into portable and wireless systems, limits in system power consumption provide additional obstacles. Developers wrestle with delivering the large computational resources needed for highly accurate motion tracking while also optimizing battery life.

A number of recent technological advances promise to make the developer’s job a lot easier. New 6-axis IMUs now come equipped with advanced vector digital signal processing (DSP) coprocessors that promise to offload computationally intense operations from the host processor. At the same time, new computational partition strategies are helping designers achieve a higher level of motion tracking accuracy at significantly lower system power levels. Finally, new optimal estimation algorithms based on extended Kalman filter theory now allows developers to build more efficient sensor fusion solutions.

Intelligent IMUs

An excellent example of this new generation of MEMS IMUs is the FIS1100, originally developed by Fairchild, now part of ON Semiconductor. This smart MEMS sensor module integrates a 3-axis accelerometer with a 3-axis gyroscope and supplies inputs for an optional external third party 3D magnetometer. When used with the XKF3 sensor fusion library and a 3D magnetometer, the FIS1100 offers a complete 9 degrees of freedom (9DOF) solution (Figure 1).

A key component of the IMU is the AttitudeEngine, a custom vector DSP coprocessor capable of encoding high frequency motion at high internal sampling rates, while preserving full accuracy across any output data rate (ODR). This allows the coprocessor to process inertial data at a fraction of the power needed to perform the same calculations on a generic system processor.

Using the FIS1100, designers can use the coprocessor to offload computationally intensive operations from the host processor, eliminating the need for frequent data interrupts and allowing the system processor to remain in sleep mode longer. This dedicated hardware block can reduce motion signal processing power consumption by up to a factor of 10, without compromising accuracy.

Diagram of ON Semiconductor FIS1100 IMU

Figure 1: In a typical application the FIS1100 IMU integrates its embedded 3-axis gyroscope and 3-axis accelerometer with a third-party magnetometer via a master I2C interface. An application processor manages this 9DOF solution via a SPI 4-wire interface. (Image source: ON Semiconductor)

Kalman filtering

To help develop higher accuracy motion tracking solutions at extremely low power levels, developers are employing new optimal estimation algorithms based on Kalman filtering theory. Generally, Kalman filtering is an algorithm that uses a series of measurements observed over time that contain statistical errors and other inaccuracies to predict estimates of unknown variables. This series tends to be more accurate than a single measurement.

The Kalman filter estimates a process by using a two-step form of feedback control. The filter estimates the process state at some time and then obtains feedback in the form of noisy measurements. As such, the equations for the Kalman filter fall into two groups: time update equations and measurement update equations. The time update equations are responsible for projecting forward (in time) the current state and error covariance estimates to obtain estimates for the next time step. The measurement equations are responsible for feedback.

Once the outcome of the next measurement is recorded, the estimates are updated using a weighted average. In this process, more weight is given to estimates with higher certainty.

It’s important to remember that the Kalman filter algorithm is recursive. This makes practical implementations much more feasible.

Unlike other approaches that are designed to operate on all the data directly for each estimate, Kalman filter theory recursively conditions the current estimate on all the past measurements. It can run in real time using only the present input measurements and the previously calculated state and its uncertainty matrix. No additional past information is required.

Advances in sensor fusion

The Kalman filtering techniques described above were used by engineers at XSENS, a developer of sensor fusion software acquired by Fairchild in 2014. The team created an optimal estimation algorithm called XKE3 that improves motion tracking performance at very low power. The XKE3 Sensor Fusion is a binary software library that integrates 3D accelerometer, 3D gyroscope and 3D magnetometer data to calculate 3D orientation in an earth-fixed frame of reference. The reliability of the XKE3 algorithms is well established; they have been used for over a decade in military and industrial applications.

By bundling the FIS1100, featuring its 3-axis accelerometer and 3-axis gyroscope with a third party magnetometer and the XKE3 sensor fusion software, ON Semiconductor offers developers a complete 9DOF solution. Moreover, this bundled solution dramatically simplifies system development by providing roll, pitch and yaw orientation specs.

Traditionally, designers needing to add motion tracking functionality had to wade through archaic sensor-level specifications and learn complex motion processing basics. Now they have a solution that provides roll, pitch and yaw specifications, allowing them to know what heading performance to expect before they build their first prototype.

Running on a microcontroller or application processor, the XKE3 library collects motion data from the FIS1100 at a configurable rate. In this 9-axis solution (Figure 1, again), the FIS1100 samples accelerometer and gyroscope data at a relatively high frequency (1 kHz) and sends it to the AttitudeEngine coprocessor, which performs strap-down integration (SDI) calculations with high accuracy. The coprocessor also synchronizes magnetometer data to the inertial data to get cloning and sculling compensated orientation and velocity increments, along with the optional magnetometer data, and transfers it all to the XKE3 engine.

The XKE3 plays a key role in sensor calibration. For instance, a wide variety of processes, ranging from vibration and temperature to device age and mechanical stress, can alter magnetometer output over time. Often, these changes in calibration parameters are very subtle. XFK3 compensates for these changes using a zero-user interaction calibration that continually and automatically calibrates each sensor for the most important errors. This eliminates the need for user interruptions.

Computational partitioning

Another key factor in the FIS1100 and XKE3’s ability to improve motion tracking performance at lower power is the use of innovative computational partitioning strategies. Traditionally designers have streamed accelerometer and gyroscope samples from the IMU to the host processor which then performs SDI of the inertial quantities. This architecture is shown in (Figure 2). The integrated values are then used by sensor fusion algorithms to provide the desired output.

Diagram of accelerometer and gyroscope traditional architecture

Figure 2: In this depiction of a traditional architecture, accelerometer and gyroscope samples are streamed directly from the IMU to the host processor to perform SDI of inertial quantities. (Image source: ON Semiconductor)

Employing this architecture, the streaming of accelerometer and gyroscope signals at high speed from the IMU to the host processor is necessary to preserve motion tracking accuracy. However, high-speed data transmissions to the host processor are not necessary since the update rate required for the final application ranges from just a few Hz, for applications like pedestrian navigation, up to 30 to 60 Hz for gaming, fitness tracking and robotics control. Even higher performance applications like virtual and augmented reality only require about 100 Hz. In this situation, designers only need to stream data at high rates to perform accurate numerical integration of acceleration and angular velocity.

However, designers still pay a price for streaming data at high rates. The architecture forces the host processor to handle more frequent data interrupts, preventing it from entering sleep mode as often as possible. Accordingly, overall system power consumption rises.

One way to mitigate this problem is by using a FIFO buffer on the IMU side. Unfortunately, that approach presents new problems such as:

  • The need for the host processor to process significantly more data
  • An increased possibility for bus contention/conflict on SPI/I2C when multiple peripherals share the same bus
  • A higher probability for packet loss in wireless applications
  • An increased need for high-speed serial bus modes and DMA support on the host processor

Designers can dramatically reduce the computational load on the system processor by segmenting the algorithm into a high-performance section running on the FIS1100, a low-rate segment running on the XKE3 engine, and then use the FIS1100 to implement SDI algorithms on the IMU side (Figure 3). This approach is even more beneficial when the system is running in high-accuracy, 3D-fusion mode with full auto-calibration.

Diagram of SDI calculations on the FIS1100 AttitudeEngine

Figure 3: With the architecture depicted above, designers gain higher power efficiency by performing high-data-rate SDI calculations on the FIS1100 AttitudeEngine and streaming low-rate orientation and velocity increments to the XKF3 sensor fusion algorithm running on the host side. (Image source: ON Semiconductor)

Moreover, by running the state-tracking portion at a very low sampling rate on the XKE3 engine, designers can track a larger number of states, enabling statistical optimal tracking of multiple calibration parameters without paying a penalty in system resources.

Running the FIS1100 in AttitudeEngine mode, designers can achieve this by converting accelerometer and gyroscope signals into the digital domain, and by using low-pass filters with a wide bandwidth of about 200 Hz. This allows the AttitudeEngine to perform SDI calculations at a 1 kHz input rate in hardware, ensuring that any errors from the digital calculations of the integrals of motion are negligible.

Having the FIS1100 stream motion data encoded as orientation and velocity increments instead of traditional angular velocity and acceleration samples, the calculations are accurate, independent of the chosen output rate. Low output rates result in coarser time representation of the motion data, but the data remains accurate. As a result, output rate can be selected according to specific application requirements rather than being driven by the need to perform numerical integration with high accuracy.

Using this innovative architecture, designers gain multiple benefits:

  • Running SDI on dedicated hardware instead of the host processor dramatically reduces power consumption
  • Motion information remains accurate regardless of the chosen output data rate
  • Moving the SDI function to the IMU side of the architecture simplifies system integration by reducing computational demands

Development kit to kickstart designs

Building high accuracy motion tracking solutions can take significant time and effort. To accelerate analysis of system performance and accuracy, as well as simplify hardware integration and embedded software integration, ON Semiconductor offers an evaluation kit for the FIS1100. The kit provides the evaluation system for the FIS1100 in combination with the XKE3 sensor fusion library, reference drivers for the FIS1100, and an example sensor fusion project for ARM® Cortex®-M microcontrollers.

The evaluation kit is managed through an easy-to-use MT manager Windows GUI application. Evaluation begins by mounting the Arduino compatible FEBFIS1100 MEMS_IMU6D3X shield onto an NXP LPCXPRESSO54102 MCU board as shown (Figure 4). The MCU board is then connected to the host PC via a USB cable.

Image of Arduino UNO R3-compatible FEBFIS1100MEMS_IMU6D3X shield

Figure 4a

Image of NXP LPCXpresso54102 ARM Cortex-M development board

Figure 4b

Figure 4: The FIS1100 evaluation kit simplifies analysis of system performance and software and hardware integration by supplying a two-board set that mounts an Arduino UNO R3-compatible FEBFIS1100MEMS_IMU6D3X shield (a) on a NXP LPCXpresso54102 ARM Cortex-M development board (b). (Image source: ON Semiconductor)

Once the drivers are installed, users launch the MT Manager application which automatically scans for connected systems and displays. When developers select an evaluation kit in the device list, they can manage system operating parameters by opening the output configuration panel. All the major functions of the FIS1100 and XKE3 fusion library can be configured through the output configuration dialog screen.

To help interpret sensor data, the MT Manager offers a number of helpful visualization tools. A 3D orientation view offers a representation of the 3D orientation of the evaluation board. An inertial data view helps the user understand the inertial and magnetic field data output by the XKE3 fusion library. Included are corrections for typical sensor errors such as gyroscope biases and magnetic hard and soft iron distortions. For users that need to track short term motion of the system, such as the movement of an arm with respect to the torso, a velocity data view provides a graphical utilization of the XKE3 fusion library’s high pass velocity output.

Conclusion

High-performance motion tracking capabilities are no longer limited to arcane military and avionics applications. Today demand is rapidly growing for the development of those same capabilities in cost-sensitive consumer markets. As described, designers can now apply a new generation of intelligent, low-noise, low-drift IMUs. New approaches to computational partitioning and advances in sensor fusion software make that transition possible.

References

  1. An Introduction to the Kalman Filter
  2. The Extended Kalman Filter: An Interactive Tutorial for Non-Experts
 

免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。

关于此作者

John Mayer

John H. Mayer is a contributing writer at DigiKey. He has worked as an editor at Computer Design Magazine, Computer Design News and Test & Measurement World Magazine and as an independent writer covering technology trends in semiconductors, wireless communications, mobile computing, consumer electronics, power management and test equipment.

关于此出版商

DigiKey

DigiKey 总部设在美国明尼苏达州锡夫里弗福尔斯市,是一个同时针对原型开发/设计提供小批量供应、针对生产提供大批量供应的全球电子元件综合服务提供商,在 DigiKey 上提供 750 多家优质制造商品牌、六百多万种产品。