cancel
Showing results for 
Search instead for 
Did you mean: 

Motion Activity Recognition library application and functions in X-CUBE-MEMS1

LauraCx
ST Employee

Motion Activity Recognition library application and functions in X-CUBE-MEMS1

1. Motion Activity Recognition library

Activity recognition is one of the most common and requested in nowadays personal electronics landscape, especially as regards the wearable market. For this reason, this Community icon is the rendering of a typical personal electronic user. Activity recognition is also a key bridge for the use of STM32 embedded AI.

MotionAR library provides real-time information on the type of activity you are performing. It is able to distinguish and classify among the following activities: no activity (0), stationary (1), walking (2), fast walking (3), jogging (4), biking (5), driving (6), managing the data acquired from accelerometer.
1586.png

2.Calibration Algorithm

The library is based on accelerometer data only, and requires a data sampling frequency of 16 Hz., and can to distinguish among the following activities: stationary, walking, fast walking, jogging, biking, driving.
 

The central function that performs the activity recognition is this one:

void MotionAR_Update (MAC_input_t *data_in, MAR_output_t *data_out, long int timestamp)

*data_in parameter is a pointer to a structure with input data, *data_out parameter is a pointer to enum with the items described in the previous post and timestamp variable is a relative time for actual sample in ms.
See below the detailed output of the activity recognition of MotionAR algorithm! :fast_down_button:

1587.png
 

3. References

User Manual 2193  Getting started with MotionAR activity recognition library in X-CUBE-MEMS1 expansion for STM32Cube 

Version history
Last update:
‎2021-10-22 02:44 AM
Updated by: