Abstract

To solve the problem of large error of motion MEMS sensor in motion trajectory detection, a motion trajectory tracking and detection system based on motion sensor is proposed. The principle of trajectory tracking is that the three-dimensional velocity and displacement can be obtained by integrating the acceleration. In this paper, acceleration sensor is used to obtain acceleration data of moving object. In order to reduce the data measurement error, a Kalman filter is designed and implemented to eliminate random noise. Aiming at the system nonlinear error, a two speed sampling compensation algorithm is designed and implemented by using the random characteristics of kernel process scheduling algorithm. The system accuracy is significantly improved without increasing the computational burden. According to the characteristics of floating-point instruction system on Advanced RISC Machine (ARM) platform, the algorithms of process core modules such as square root and matrix multiplication are optimized and improved, which greatly improves the computing performance of the system. According to the results of the study, the average error of measurement of X-line displacement measurement of the space control system is 8.06%, the average error of measurement of Y-line displacement measurement is 7.41%, the average error of measurement of Z-line displacement measurement is 9.61%, and the average error of 3D dimensional measurement is 7.6%. The effectiveness and feasibility of the system are verified.

1. Introduction

Objects generally have the attribute of motion. For a long time, external observation methods have been used to detect the state of object motion, such as global positioning system (GPS) and eagle eye system (real-time playback system) [1]. The space part includes 28 satellites, which are distributed on the orbital plane with 60 degrees apart at 6 intersections, about 20000 kilometers from the ground. It is composed of GPS receiver and ground monitoring system. The system is huge and complex, expensive, and the actual effects are uneven. For example, the plane accuracy of mobile GPS positioning is generally a few meters to tens of meters, which can basically meet the positioning needs of daily life with registered permanent residence. The indoor positioning plane accuracy is about ±50 m, which cannot meet the complex application scenarios [2]. The “Eagle Eye System,” widely used in sports events, divides the three-dimensional space of the competition area into units of measurement in millimeters and then obtains the basic information of the competition using a high-speed camera. Shifting the flight direction of the object from different angles. This information is calculated to create a three-dimensional image. The eagle eye system is expensive and has high requirements for the environment of the observation site, resulting in limited applicable scenarios and cannot be popularized in general applications [3, 4].

In the field of human-computer interaction, the commonly used motion recognition and input devices are magnetic space tracking system, laser tracking system, and positioning system based on three-dimensional machine vision [5]. When the magnetic space tracking system works, the system transmits the spatial magnetic field signal to the surrounding three-dimensional space through the magnetic field source. There are three mutually orthogonal coils in the receiver. When the coil at the receiving end moves within the magnetic field range, the coil can sense the motion trajectory of the probe in three-dimensional space through electromagnetic induction. At the same time, the spatial position and various motion states of the receiver relative to the transmitting device can be obtained by calculating the three electromagnetic field strengths. The laser tracking system mainly relies on the laser beam to measure the distance of the target object and then obtains the spatial motion trajectory of the object by recording all the displacement data in the motion process of the space object. However, magnetic space tracking system, laser tracking system, and positioning system based on three-dimensional machine vision have their own advantages and disadvantages [6, 7]. Their common advantage is high measurement accuracy, which can be widely used in engineering fields requiring accurate measurement. The disadvantage is that the measurement process is limited by the external reference system, and the measurement range is limited. The magnetic space tracking system is limited by the magnetic field source, the laser tracking system is limited by the illumination range of the laser source, and the positioning system based on three-dimensional machine vision is limited by the placement position of the camera and the range of the scene that can be photographed. In addition, the magnetic space tracking system is very vulnerable to external magnetic field interference and shielding of iron products. The laser light source in the laser tracking system is easy to be damaged. The data calculation process of the positioning system based on three-dimensional machine vision is complex, and the system overhead is large [8]. Figure 1 shows the quality evaluation process of motion trajectory based on motion sensor.

2. Literature Review

The research on uniaxial acceleration sensor began in the late 1990s. The research contents mainly focus on the manufacturing process of acceleration sensor, sensor calibration method, and noise error of various acceleration sensors. The research on acceleration sensor mainly includes the design and manufacturing process of acceleration sensor [9]. Carreón and others used GPS to measure the motion trajectory of the object. Due to the influence of complex environment such as terrain or building shielding, the positioning accuracy of the receiver is very poor or even unable to locate [10]. Weizheng and Xiumei used microelectromechanical system (MEMS) acceleration sensor to detect the lateral displacement of the bridge. The system has good application, but there are still shortcomings, and the displacement measurement range is small [11]. Jain and others adopt MEMS acceleration sensor, which uses the acceleration integration principle to measure and estimate the motion trajectory. However, the cumulative error of the acceleration sensor is too large, which affects the measurement effect [12]. Shi and others analyzed the feasibility of MEMS acceleration sensor in displacement detection and proposed a new method to deal with the measurement noise [13]. Jiang and others proposed that motion displacement calculation is an important application of acceleration sensor to detect motion trajectory. Analog acceleration sensors are often used for measurement, with low cost. Due to the use of continuous integration, in traditional applications, the error of motion trajectory is smaller [14]. Samudrala and others believe that the main function of the motion trajectory detection system is to correct and integrate the acceleration data collected by MEMS acceleration sensor, so as to obtain the three-dimensional spatial displacement data of the object [15]. Marsh and others calculate the moving distance by collecting the vehicle acceleration and even identify the ramp through the body inclination, so as to judge whether it is the entrance and exit of the expressway. The integrated vehicle navigation system based on trajectory tracking technology can realize vehicle positioning without GPS blind area at low cost [16]. Maroufi and others proposed that MEMS technology is widely used in aerospace, automotive electronics, automatic control, military, and other products [17]. Amjad and others designed an object motion trajectory detection system with MEMS capacitive acceleration sensor adxl345 as the core in order to accurately detect the object motion trajectory, increase the measurement range of object displacement, and reduce the measurement error. Combined with Kalman filter and acceleration numerical correction algorithm, real-time detection of object motion displacement is realized [18].

Based on this study, this paper proposes a new system for tracking the spatial motion trajectory. The system is based on the MEMS acceleration sensor, which allows to collect and calculate the acceleration of the motion of space objects, overcome the limitations of the system’s external reference system measurement, and freely control the trajectory in a three-dimensional space environment. The measurement accuracy of this system is not as accurate as the above three control systems, but it has the advantages of small size, simple circuit, low production cost, and simple system maintenance. It is important for various fields of motion measurement and human measurement.

3. Research Methods

3.1. Principle of Motion Trajectory Tracking Detection System
3.1.1. Working Principle of Motion Sensor

The principle of acceleration measurement is based on Newton’s second law of mechanics. The amount of acceleration of an object is strongly proportional to the force received by the object and inversely proportional to the mass of the object, and the direction of acceleration is the same. Formula (1) is an acceleration calculation method:

The accelerometer is generally composed of the detection mass and spring in equation (1). The detection quality is fixed and can only move along the input shaft [19].

3.1.2. Coordinate System Conversion Principle

Because the direction of the object will change in space motion, the coordinate system of the , , and axes of the acceleration sensor will also change. This paper involves two coordinate systems: inertial coordinate system and geographic coordinate system.

(1) Inertial Coordinate System. The inertial coordinate system is a standard coordinate system that implements Newton’s law of motion. Therefore, the inertial coordinate system can be in a state of uniform linear motion without acceleration. In principle, the origin of the inertial coordinate system can be arbitrary, and the coordinate axes indicate three directions perpendicular to each other. All inertia sensors are measured relative to the inertial coordinate system, but decompose along the sensitive axis of the instrument. In this paper, the sensor carrier is used by origin, and the direction of the arrow is positive, forming a right-hand coordinate system, see Figure 2.

(2) Geographic Coordinate System. The axis is perpendicular to the reference ellipsoid and points to the inside of the earth, while the axis faces the true north (i.e., along the earth rotation angle velocity vector and the projection on the plane perpendicular to the D-line) the E-line points to the East horizontally and completes the right-hand orthogonal coordinate system.

Through the plane rotation of the reference coordinate system, the rotation angle (i.e., Euler angle) can be used to define the transformation matrix between orthogonal coordinate systems—directional cosine matrix. Geographic coordinate system . The carrier coordinate system can be generated by three consecutive rotations: the first rotation of angle around , the second rotation of angle around the line after rotation, the third rotation of angle around the line after the second rotation, and finally the carrier coordinate system . The relationship between the transformation matrix and Euler angle of each rotation can be expressed by symbols as follows.

For the first time, as shown in the following formula:

For the second time, as shown in the following formula:

3.2. Hardware Design of Spatial Tracking System Based on Motion Sensor
3.2.1. Overall System Structure and Function

The main function of the hardware system is to collect the three-dimensional motion acceleration of the target object and process the signal. The hardware system includes two parts: mobile terminal and base station terminal. The mobile terminal mainly realizes the functions of acceleration signal acquisition, a-center conversion, digital filtering, and signal transmission. The base station mainly realizes the functions of signal reception and signal processing [20]. At the same time, in order to facilitate data transmission and achieve a wider range of applications, the tracking system adopts wireless communication mode. The overall system architecture is shown in Figure 3.

In order to meet the functional requirements of the system, the mobile terminal is mainly composed of MEMS acceleration sensor, processor, and RF wireless transmitting circuit. The structure of the mobile end is shown in Figure 4. In this part of the circuit, the MEMS acceleration sensor outputs three groups of acceleration data along the , , and axes, respectively, and completes the band-pass filtering and A/D conversion of the analog acceleration signal. The gyroscope outputs the angular velocity data number of spatial rotation. The processor is responsible for the acceleration signal acquisition and RF communication circuit control; the RF transmitting circuit is responsible for transmitting the processed acceleration data to the base station through wireless mode. The base station is mainly composed of RF wireless receiving circuit, processor, and computer serial communication circuit. The structure of the base station is shown in Figure 5. In this part of the circuit, the RF receiving circuit is responsible for receiving the acceleration data from the mobile terminal. The processor is responsible for controlling the RF and serial communication circuit. The RS-232 serial communication circuit of the computer is responsible for sending the received acceleration data to the host computer for signal processing and calculation such as filtering, integration, and reconstruction.

3.2.2. MEMS Acceleration Sensor

Microelectromechanical system (MEMS) is also called microelectromechanical system. It is a new interdisciplinary subject developed on the basis of microelectronics technology and silicon micromachining technology. MEMS sensor is an important part of MEMS. Now, the products that have been formed and are being studied include pressure, torque, acceleration, speed, position, flow, magnetic field, temperature, and other MEMS sensors. Among them, mechanical MEMS sensor is the most important kind of microsensor. Acceleration sensor belongs to this kind of MEMS sensor, which is used to measure the motion acceleration of an object. Its basic principle is when the measured object has acceleration, the mass block in the acceleration sensor fixed on the object generates inertial force, the elastic component connecting the mass block generates deformation under the action of force, and the sensitive element detects the deformation proportional to the acceleration.

3.3. MEMS Gyroscope

MEMS gyroscope generally adopts the vibration working principle. With the help of Coriolis acceleration, the vibration of the gyroscope in the driving mode is coupled to the detection mode, and then the angular velocity of the object is obtained by detecting the displacement or corresponding strain of the gyroscope in the detection mode. MEMS gyroscopes can be classified from vibration structure, material, processing mode, driving mode, detection mode, and working mode. According to the vibration structure, MEMS gyroscope can be divided into linear vibration structure and rotating vibration structure. According to the material division, MEMS gyroscopes can be divided into silicon gyroscopes and nonsilicon gyroscopes. According to the driving mode, MEMS gyroscope can be divided into electrostatic drive, electromagnetic drive, and piezoelectric drive. According to the detection methods, MEMS gyroscopes can be divided into capacitive detection, piezoresistive detection, piezoelectric detection, optical detection, and tunnel effect detection. According to the working mode, MEMS gyroscope can be divided into rate gyroscope and rate integration gyroscope. According to the processing method, it can be divided into bulk micromachining, surface micromachining, etc.

3.4. Tracking System Error Detection and Software Compensation Algorithm
3.4.1. System Error Analysis and Error Handling Scheme

Sources of motion tracking system errors occur in many ways and are divided into static errors and dynamic errors, depending on the class of operating conditions. Due to the difference in the shape of the earth and the gravity of the disturbance, the error of the correct principle of the trajectory system is a dynamic error. This type of error program can be ignored. Installation of acceleration sensors on the platform is unclear due to installation errors, initial line accuracy, initial position, speed errors caused by initial conditions, and calculation static errors acceleration sensor defects due to component errors computer word length, speed limit, and quantizer quantization error due to theoretically and practically, the main components that have the greatest impact on system performance are component failures, installation errors, and initial condition errors.

Due to the error of any set of acceleration calculation results of the object in the three-dimensional integration model or the acceleration calculation principle of the multitarget system. In addition, due to the characteristics of integration operation, the error in the system will accumulate with the integration operation process, resulting in the accumulation of each small acceleration data error and resulting in a huge error in the final integration operation result. The errors in the system can be divided into the following categories.

Acceleration sensor error. This kind of error is caused by the acceleration sensor, which mainly includes (1)System random noise

In silicon capacitive acceleration sensors, random noise mainly consists of random noise in the mechanical field and stochastic-random noise in the circuit [21, 22]. The random noise in mechanical field is mainly Brownian noise of elastic system of acceleration sensor. The main random noise in the circuit mainly comes from the fluctuation caused by the heat-related dissipation process; fluctuations associated with the flow of stray particles; fluctuations associated with the release and capture of particles in flow. (2)Manufacturing Error of Acceleration Sensor. This kind of error is mainly caused by the manufacturing process of the acceleration sensor(3)Acceleration Measurement Error and Error Caused by Sensor Dynamics. These errors are related to the sensitivity and capacitance conversion efficiency of MEMS system(4)Error Caused by Environmental Factors. Such as the nonlinear error caused by the change of ambient temperature and the influence of magnetic field

Errors in the final calculation results are caused by packet loss and retransmission of acceleration data transmission. Figure 6 shows the acceleration data processing process of the upper computer.

To filter the Kalman filter to filter the acceleration sensor output signal based on two-state prediction. Kalman filter is suitable for stochastic systems. It can process the measured values related to only some states and obtain the estimated values of more states with the minimum error mean square.

3.4.2. Kalman Filter Design

Kalman Filter was proposed by the Hungarian mathematician Kalman to calculate the required signal through an algorithm from observations related to the extracted signal by a filtering algorithm. This is a linear fair bottom variation recursive filter calculation. That is the way it is. The Kalman filter is an optimal filter that uses the state-space method in the time zone to study and calculate states and uses linear differential equations to process multidimensional, static processes in real time. The Kalman filter is a highly efficient recursive filter called an autoregressive filter that can calculate the state of a dynamic system from a number of measurements that do not completely contain noise [23]. Let the Kalman filter model be as shown in the following formula:

where is the system state matrix, is the system noise, and is the state transition matrix, as shown in the following formula:

Under the noise environment, the measurement equation of the system is shown in the following formula:

where is the measurement noise, and is the measurement matrix, as shown in the following formula:

Since the mean values of noise and are 0, respectively, the average variance of noise is shown in the following formulas:

The average variance of estimation error is shown in the following formula:

The Kalman filter estimation model is shown in the following formula:

The state prediction model is shown in the following formula:

Equations (4) and (6) are rewritten into the following equations:

where is acceleration state, as shown in the following formula:

Therefore, the Kalman time update equation after adding a new state is shown in the following formulas:

Figure 7 shows the Kalman filter model.

4. Result Discussion

In the experiment, first move the moving end of the system along the -line direction of the accelerometer to move the system for 2 meters. In the figure, sample is the sampling point, acceleration (m/s2), velocity is the velocity (m/s), and distance is the spatial displacement (m). Figure 8 shows the acceleration signal before filtering. Figure 9 shows the filtered acceleration signal.

As shown in Figures 10 and 11, when the accelerometer stops moving, the calculated end speed of the system is approximately 0.08 m/s, and the calculated end displacement is about 1.55 m, which is 0.45 m less than the actual displacement. We will then save the initial test data and recalculate the cosmic velocity and cosmic displacement results using an improved acceleration correction, velocity, and displacement recovery algorithm. As shown in Figure 12, the end speed of the system is close to 0, and the end displacement is also close to the actual displacement, reaching 1.8 m.

To test the tracking efficiency of the system in three-dimensional space, the starting point of the system is recorded as the coordinate origin in the experiment. Move the tracking system along any curve for a certain distance in three-dimensional space (no rotation, always keep the -line of the acceleration sensor parallel to the gravity direction). After stopping the movement, the coordinates measured by the tape measure when the system terminates the movement are (1.68, 2.15, 1.34), that is, the moving distances of the moving end of the tracking system in the , , and axes are 1.68 m, 2.15 m, and 1.34 m, respectively. The actual offset position is shown in formula (18):

In this experiment, the three-dimensional measurement error is .

Repeat the experiment, and the results of multiple experiments are shown in Table 1.

According to the first experimental analysis of the above table, the average error of measurement of the -line displacement measurement of the space control system is 8.06%, the average error of the -line displacement measurement is 7.41%, and the average measurement error is 7.41%. The displacement of the line is 9.61%, and the average displacement error of measuring three-dimensional space is 7.6%.

System errors are relatively high compared to magnetic field monitoring systems and laser distance monitoring systems. In magnetic and laser control systems, an external reference system can improve the precise positioning of the system’s spatial coordinates. At the same time, their measurement range is limited by an external reference system. The space monitoring system based on the MEMS acceleration sensor can overcome external constraints and perform free distance measurements. However, this system has a big flaw. The main sources of error are as follows. (1)Restricted by the accuracy of acceleration sensor(2)Environmental impact, resulting in measurement deviation of MEMS mechanical characteristics, resulting in nonlinear errors that cannot be completely filtered out(3)The influence of gravity field leads to inaccurate measurement results(4)Random noise introduced by the system

5. Conclusion

The motion trajectory tracking system can track the three-dimensional motion trajectory of the target object and can also identify the motion trajectory, attitude, and spatial position of the tracked object, so as to detect and identify the spatial action. This paper designs a motion tracking and detection system based on motion sensor. The system uses a composite sensor chip integrating MEMS three-line acceleration sensor and three-line gyroscope to collect and process the motion acceleration and rotation angular velocity of the carrier, breaks through the limitation of the external reference system on the system measurement, and realizes the tracking of the free trajectory in the three-dimensional space environment. Its biggest advantage is that it can provide more complete autonomy and complete navigation information, such as position and speed. In addition, it also has the advantages of small volume, low cost, and simple circuit. It has important application value in the fields of motion measurement and human-computer interaction with low accuracy requirements.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that they have no competing interests.