New-Tech Europe Magazine | Sep 2019 | Digital Edition
block, the computation block, and the decision tree (Figure 4). The machine learning core’s sensor data block aggregates data streams from the IMU’s internal accelerometers and gyroscopes and from any external sensors attached to the IMU through the I2C interface. The computation block can filter the sensor data using predefined filtering parameters, and compute windowed statistics including the mean, variance, peak-to-peak amplitude, minimum, maximum, and zero crossing for the sensor data. The decision tree compares the computed sensor data statistics against thresholds to classify the input data. As with the LSM6DSO’s FSM, a dedicated tool in the Unico development environment is used to program the IMU’s machine learning core. The finite state machine and the machine learning core can also be used in conjunction with a host processor to implement more sophisticated position tracking algorithms. The downloadable STMicroelectronics X-CUBE-MEMS1 software pack for the company’s STM32Cube development system includes the following example software routines: Activity recognition – Provides information on the type of activity being performed by the user including holding still, walking, fast walking, jogging, biking, or driving. This algorithm might typically be used in a mobile phone or some sort of wearable device. Motion duration detection – When combined with pedometer data, motion duration detection can be used to determine the number of seconds that a user is active. This algorithm might typically be used in a wearable device for fitness or health tracking.
Figure 4: The machine learning core in the STMicroelectronics LSM6DSO IMU consists of three blocks: a sensor data block that aggregates data streams from internal and external sensors, a computation block that filters the sensor data and computes statistics on that sensor data, and a decision tree that classifies events based on the computed statistics. (Image source: STMicroelectronics)
Vibration or motion intensity detection – Provides information about the intensity of user motion and can distinguish motion intensity in a range from 0 (still) to 10 (sprinting). This algorithm might typically be used in a mobile phone or some sort of wearable fitness device. Carrying position recognition – Provides information about how the user is carrying a device and can distinguish among the following positions: on a desk, in a hand, near the head, in a shirt pocket, in a trouser pocket, in a jacket pocket, and held in a swinging arm. This algorithm might typically be used in a mobile phone or some other sort of carried device for activity related context detection. Conclusion The need to keep a host processor running tomaintain a position fix and to detect movement and gestures from IMU data can be a difficult goal to achieve with battery-powered embedded designs because of the host processor’s relatively high power consumption. However, a
new generation of low-power IMUs with sufficient on board processing to perform machine learning can solve this problem by allowing the host processor to sleep in a low current mode until it’s needed. About this author Rich Miron, Applications Engineer at Digi-Key Electronics, has been in the Technical Content group since 2007 with primary responsibility for writing and editing articles, blogs and Product Training Modules. Prior to Digi-Key, he tested and qualified instrumentation and control systems for nuclear submarines. Rich holds a degree in electrical and electronics engineering from North Dakota State University in Fargo, ND.
20 l New-Tech Magazine Europe
Made with FlippingBook flipbook maker