How is artificial intelligence generated by the data generated by the sensor?

Kaustubh Gandhi, Software Product Manager, Bosch Sensortec

Artificial intelligence (AI) is currently revolutionizing all aspects of society. For example, by combining the advantages of data mining and deep learning, artificial intelligence can now be used to analyze large amounts of data from a variety of sources, identify patterns, provide interactive understanding, and make intelligent predictions.

An example of this innovative development is the application of artificial intelligence to data generated by sensors, especially data collected by smartphones and other consumer devices. Motion sensor data as well as other information such as GPS addresses can provide a large number of different data sets. So the question is: “How can you use artificial intelligence to get the most out of these synergies?”

Motion data analysis

An illustrative real-world application will be able to determine the user's activity at each time period by analyzing the usage data, whether in sitting, walking, running or sleeping situations.

In this case, the benefits of smart products are self-evident:

1. Improve customer life cycle value
Increasing user engagement can reduce customer churn.

2. More competitive product positioning
The next generation of smart products meets the growing expectations of consumers.

3. Create real value for end users Accurate detection and analysis of indoor sports can achieve sensitive navigation functions, health risk monitoring, and improve equipment efficiency. In-depth knowledge of the actual usage scenarios of multiple smartphones and wearable platforms will greatly help product designers understand the user's repetitive habits and behaviors, such as determining the correct battery size or determining the right timing for push notifications.

Smartphone manufacturers are becoming more interested in artificial intelligence functions, which is highlighting the importance of identifying simple daily activities, such as the number of steps, which will surely evolve into more in-depth analysis, such as physical activity. For popular sports like football, product designers will not only focus on athletes, but will also facilitate more people, such as coaches, fans and even large companies such as broadcasters and sportswear design companies. These companies will benefit from in-depth data analysis to accurately quantify, improve and predict athletic performance.

Data acquisition and preprocessing

After identifying this opportunity, the next logical step is to think about how to effectively collect these huge data sets.

For example, in activity tracking, raw data is collected by axial motion sensors, such as accelerometers and gyroscopes in smartphones, wearables, and other portable devices. These devices acquire motion data on three axes (x, y, z) in a completely concealed manner, ie continuously track and evaluate activities in a way that is user-friendly.

Training model

For supervised learning of artificial intelligence, tagged data is needed to train the "model" so that the classification engine can use this model to classify actual user behavior. For example, we collect athletic data from test users who are running or walking, and provide this information to the model to help them learn.

Since this is basically a one-time method, a simple application and camera system can accomplish the task of "labeling" the user. Our experience shows that as the number of samples increases, the human error rate in classification decreases. Therefore, it makes more sense to get more sample sets from a limited number of users than to get smaller sample sets from a large number of users.

It is not enough to get only raw sensor data. We observed that to achieve a highly accurate classification, some features need to be carefully determined, that is, the system needs to be informed of features or activities that are important to distinguish each sequence. The process of artificial learning is repetitive. In the preprocessing stage, which features are most important is still unclear. Therefore, equipment must make some guesses based on expertise that may have an impact on classification accuracy.

For activity identification, the indicative features may include "filtered signals" such as body acceleration (original acceleration data from the sensor) or "derived signals" such as Fast Fourier Transform (FFT) values ​​or standard deviation calculations.

For example, the University of California, Irvine's Machine Learning Database (UCI) created a data set that defines 561 features. The data set consists of six basic activities for 30 volunteers, standing, sitting, lying, walking. Based on the lower steps and the upper steps.

Pattern recognition and classification

After collecting the raw motion data, we need to apply machine learning techniques to classify and analyze it. The machine learning techniques available to us range from logistic regression to neural networks.

Support vector machines (SVMs) are such a learning model for artificial intelligence. Physical activity, such as walking, consists of a sequence of multiple movements. Since the support vector machine excels at sequence classification, it is a reasonable choice for activity classification.

The use, training, expansion, and prediction of support vector machines are simple, so multiple sample collection experiments can be easily set up side by side for processing nonlinear classifications of complex real-life data sets. Support vector machines can also be optimized for many different sizes and performances.

After identifying a technology, we must choose a software library for the support vector machine. The open source library LibSVM is a good choice. It is very stable and has detailed records, supports multi-class classification, and provides all major developer platforms from MATLAB to Android.

Continuous classification challenge

In practice, while the user is moving, the device in use is subject to real-time classification for activity recognition. In order to minimize product costs, we need to balance the cost of transmission, storage, and processing without compromising results, or information quality.

Suppose we can afford the cost of data transfer, all data can be stored and processed in the cloud. In fact, this will bring huge data costs to users, and the user's equipment will of course be connected to the Internet. The cost of wireless network, Bluetooth or 4G modules will inevitably further increase the equipment cost.

To make matters worse, in non-urban areas, access to 3G networks is often not ideal, such as when hiking, cycling or swimming. This reliance on large amounts of data transmission in the cloud slows updates and requires periodic synchronization, which greatly offsets the practical benefits of AI motion analysis. In contrast, processing these operations only on the device's main processor can significantly increase power consumption and reduce the execution cycle of other applications. Similarly, storing all data on the device increases storage costs.

Round the square

To solve these conflicting problems, we can follow four principles:

1. Split - Split feature processing from the execution of the classification engine.

2. Reduce - intelligently select the features needed for accurate activity identification to reduce the amount of storage and processing required.

3. Use - The sensors used must be able to acquire data at a lower power consumption, implement sensor fusion (combining data from multiple sensors), and perform feature pre-processing for ongoing execution.

4. Retention - A model that retains system support data that determines user activity.

By splitting the feature processing with the execution of the classification engine, the processor connected to the acceleration and gyro sensors can be much smaller. This effectively avoids the need to continuously transfer real-time data blocks to more powerful processors. Feature processing such as fast Fourier transforms for transforming time domain signals into frequency domain signals would require a low power fuse processor to perform floating point operations.

Furthermore, in the real world, a single sensor has physical limitations and its output deviates over time, for example due to offset and nonlinear scaling caused by soldering and temperature. To compensate for this irregularity, sensor fusion is required, as well as fast, inline, and automatic calibration.

77.png

Figure 1: Functional flow of activity classification (source Bosch Sensortec)

In addition, the selected data capture rate can significantly affect the amount of computation and throughput required. In general, a 50 Hz sampling rate is sufficient for normal human activity. But in the fast moving activities or sports

A line rate of 200 Hz is required for line analysis. Similarly, in order to achieve faster response times, a 2 kHz separate accelerometer can be installed to determine the user's purpose.

To meet these challenges, low power or application specific sensor hubs can significantly reduce the CPU cycles required by the classification engine. For example, Bosch Sensortec's BHI160 and BNO055 products are such sensor hubs. The associated software directly generates the fused sensor output directly at different sensor data rates.

777.png

The initial selection of features to be processed can then greatly affect the size of the training model, the amount of data, and the computational power required to train and execute inline predictions. Therefore, choosing the features required to classify and differentiate specific activities is a key decision and is likely to be an important business advantage.

Looking back at the UCI machine learning database mentioned above, it has a complete data set of 561 features, and the test accuracy of the active classification using the model trained by the default LibSVM kernel is as high as 91.84%. However, after completing the training and feature rankings, the selection of the most important 19 features is sufficient to achieve 85.38% activity classification test accuracy. After a careful examination of the rankings, we found that the most relevant features are the average, maximum and minimum values ​​of the frequency domain transform and the raw data of the sliding window acceleration. Interestingly, these features cannot be achieved only by preprocessing. Sensor fusion is necessary to ensure sufficient data reliability and is therefore particularly useful for classification.

in conclusion

All in all, technology development has now reached the point of running advanced artificial intelligence on portable devices to analyze the data of motion sensors. These modern sensors operate at low power consumption, while sensor fusion and software partitioning significantly increase the efficiency and feasibility of the entire system while greatly simplifying application development.

To complement the sensor infrastructure, we leverage open source libraries and best practices to optimize feature extraction and classification.

Providing a truly personalized experience for users has become a reality. With artificial intelligence, the system can take advantage of the data collected by sensors from smartphones, wearables and other portable devices to provide people with more depth capabilities. In the coming years, a series of devices and solutions that are still unimaginable will be more developed. Artificial intelligence and sensors open up a new world of exciting opportunities for designers and users.

pIYBAFog9qeAE-YcAASxmg4Vy8g482.png

Figure 4: Artificial intelligence and sensors open up a new world of exciting opportunities for designers and users. (Source: Bosch; Image: Depositphotos/Krisdog)

About Bosch Sensortec

Bosch Sensortec GmbH, a wholly owned subsidiary of Robert Bosch GmbH, develops and supplies custom MEMS sensors and solutions for smartphones, tablets, wearables and IoT products. The portfolio includes 3-axis accelerometers, gyroscopes and geomagnetic sensors, integrated 6- and 9-axis sensors, environmental sensors, and a comprehensive software portfolio. Since its inception in 2005, Bosch Sensortec has become a leader in MEMS technology in these markets. Since 1995, Bosch has been a pioneer in the field of MEMS sensors and a global market leader. The number of MEMS sensors sold to date has exceeded 8 billion. One of every two smartphones in the world uses Bosch Sensortec sensors.

wago 2059

Guangdong Ojun Technology Co., Ltd. , https://www.ojunconnector.com