Mathematical function data model analysis and synthesis system based on short-term human movement

The paper proposes a data model analysis algorithm for human motion function based on short-term behaviour. The algorithm uses a functional data analysis (FDA) method to perform Fourier fitting on the motion data and extract the fitted approximate single period data. Finally, the algorithm depicts the internal change in the motion in the low-dimensional space. The study found that the characteristic motion data obtained by the algorithm has smooth characteristics, and the relevant case analysis also verifies the algorithm’s effectiveness.


Introduction
Human behaviour recognition is a method for computers to understand and describe human behaviour. It is a critical technology in related fields such as video surveillance, innovative nursing and human-computer interaction. Compared with traditional optical motion capture systems, wearable devices can collect data that are not affected by light, venue and occlusion [1]. Moreover, the device has the advantages of good portability and protection of the personal privacy of the collector. Therefore, the research on human behaviour recognition based on wearable motion capture systems is gradually becoming a hot topic nowadays.
Human behaviour actions are divided into periodic behaviours and non-periodic behaviours approximately. Approximately periodic behaviour refers to a movement behaviour that is executed multiple times continuously. The daily behaviour of the human body often has periodic characteristics, and the data sequence of daily behaviour collected by sensors also presents approximately periodic characteristics. This article considers converting this discrete motion data sequence into a periodic continuous function. This algorithm provides a theoretical basis for the study of the continuity characteristics of sports data and can accurately express the periodic characteristics of sports data [2]. Therefore, this article introduces the functional data analysis (FDA) algorithm to introduce the discrete data functional processing method. The basic idea of the algorithm is to treat the observed sample as a discrete data sequence but to treat the observed data as a whole and express it with a function. Then we use continuous data processing methods to analyse the samples.
2 Related theories and methods

FDA
The FDA method is a statistical method that has emerged in recent years. It is a development and extension of traditional statistical analysis methods. FDA is often used for economic data, meteorological data etc., but the application to sports data series is rare [3]. The changes of speed, acceleration and other variables in the process of human movement are continuous, while the corresponding data collected by sensors are all discrete. Because of this, the FDA's research on exercise data is reasonable. The general process of the FDA is as follows. For an observation data series, y = (y 1 , y 2 , · · · , y n ) T , we build a model Among them, x(t i ) represents the value of the function x(t) of the observation data sequence at t i , and ∈ i represents the noise. To estimate the value of x(t i ) in formula (1), we use the method of basis function expansion to select a set of basis functions Φ(t) = (φ 1 (t), φ 2 (t), . . . , φ K (t)). At the same time, the discrete data is converted into a linear combination of basis functions, After the basis function is determined, a set of values of the coefficient vector C = (c 1 , c 2 , · · · , c K ) T uniquely determines a function [4]. The most direct method to solve the coefficient vector is the least-squares method, and the solution is as follows to minimise the residual sum of squares For periodic observation data, the Fourier series is often used as the basis function.
Therefore, the Fourier expansion of the function x(t) of the observation data sequence is x(t) = c 1 + c 2 sin(ωt) + c 3 cos(ωt) + · · · + c 2k sin(kωt), c 2k+1 cos(kωt) The algorithm in this paper is mainly aimed at the periodic behaviour data of the human body collected by the wearable motion capture system [5]. We need to functionalise the discrete motion data to obtain the continuous characteristics of human motion. For this periodic discrete observation data, we use k-order Fourier series fitting and the value of k determines the complexity of the model. The model is more straightforward when the k value is small, but it is easy to cause the data to underfit. When the value of k is significant, the model may be more complicated, and over-fitting may occur. K can be estimated based on empirical values in this article, and k = 4. In addition, the frequency of the fitting function is denoted as ω f unc in the formula. The frequency ω f unc and period T f unc of the fitting function should be as close as possible to the frequency ω data and period T data of the original data. The individual difference of each fitting function can be maintained. Figure 2 shows two sets of original data sequences with approximate periodicity. We use Algorithm 1 to estimate the fundamental frequency ω to obtain the image of the 4th-order Fourier series fitting function. The formula is as follows: Experiments show that our use of Fourier series fitting can reflect the periodicity and local characteristics of the original data and remove outliers and abnormal points [6]. At the same time, compared with discrete motion data, the functionalised result reflects the continuity of human body motion and motion data. Moreover, it accurately selects a cycle starting point of the motion cycle.

Fourier series fitting applied to motion data
A movement behaviour often requires the use of multiple wireless sensors to collect data simultaneously, and each sensor is composed of multiple measurement units [7]. Therefore, each sensor generates a vector at each time and can be represented as follows: Among them, M represents the total number of sensor measurement units. A single sensor performs continuous sampling to generate an observation matrix a(t i ), i = 1, 2, · · · , n is the t i sampling data of a single sensor. Therefore, Eq. (8) can be expressed as Fourier series fitting is used for each column of the observation matrix. Then, we convert the data sequence of each measurement unit of a single sensor into a function about the sampling time t. Therefore, Eq. (9) is transformed into the following function vector: Multiple sensors collect the sample data at the same time, so there is the following observation function matrix: Note that N represents the total number of sensors and M represents the number of measurement units for each sensor.

Cycle start point selection
Different sample function matrices are obtained according to different types of behaviour data. However, the morphological curve characteristics of the corresponding functions in different sample function matrices are different [8]. This difference in morphology is the basis for the classification of sample sets, and this difference can be reflected in one movement cycle as shown in Figure 2. Therefore, we can distinguish between different behaviours by extracting only one period of data. We select one element f (t) from the sample function matrix of Eq. (11) and find its characteristic points. This paper selects the extreme point set f (t) as the feature point set of the function and then selects the point in the feature point set that makes f (t) to obtain the minimum value the starting point of the motion cycle [9]. Finally, each element function in the sample function matrix uses this starting point as the starting point of the motion cycle.
We choose the minimum extreme point as the starting point of the cycle and achieve data alignment. The minimum extreme point of the acceleration function in the vertical direction of the foot is the point where the acceleration value is the smallest during the movement. This time point often corresponds to when the person's foot is raised to the highest point. All the periodic behaviours based on footsteps include this movement process [10]. Therefore, we use this point as the starting point of the movement, which can align all sample functions of the same action here and also align periodic functions of different behaviours at this starting point.

Experimental environment and data sources
This article uses Windows7 64-bit operating system and Matlab software for experiments. The data set we used comes from the wearable sensor behaviour recognition database (WARD) provided by the University of Berkeley in the United States. This data set binds sensors to 5 parts of the body namely left wrist, right wrist, waist, left ankle and right ankle. Each sensor consists of a three-axis accelerometer and a two-axis gyroscope. The sampling frequency is 30 Hz. The data set includes 13 types of daily behaviours. When collecting data, 20 collectors are required to do each action 5 times. Therefore, a total of 1,300 samples are included in the data set. The 1000 samples of 10 types of dynamic behaviours selected are shown in Table 1. Push wheelchair Push the wheelchair for >10 s WARD, wearable sensor behaviour recognition database.

Data preprocessing and cycle extraction
WARD uses 5 sensors to collect data and each sensor has 5 measurement units. Therefore, the values of N and M are 5. So the sample function matrix is stated as follows: When sampling frequency F = 30 Hz, 45 points in the sensor sequence have been obtained with good experimental results. Note that1.5 s is close to the time to complete an action. In our experiment, the time for an ordinary person to complete an exercise cycle is T data = 1.5 s. In this paper, 45 points are used as the data length of a period. From Eq. (9), the length of the feature vector is N × M × [l/d] = 1125.
To calibrate the starting point of the cycle, it is necessary to select one of the element functions in the sample function matrix of Eq. (10) as the cycle's starting point. We use this period starting point as the starting point for the resampling of each element function in the sample function matrix. Since the acceleration function of the human body in the vertical direction can better reflect the difference of different behaviours and steps, the starting point of the calibration of this function is when a person's foot is raised to the highest point during exercise [11]. Therefore, we use the vertical acceleration function of the left ankle sensor in the WARD data set as the function of the starting point of the calibration cycle to be more accurate. Figure 3 shows a sample of the collector walking normally. We extract the acceleration data of the sensor at the left ankle in the vertical direction and periodically extract the results. From Figure 3, it can be seen that the algorithm used by us achieves a more accurate function of the motion data -ground cycle extraction.

Experimental results
In the simulation experiment, the K-CV method is adopted to select test samples and training samples. In the experiment, the data set is divided into K = 20 groups. We conducted a total of 20 experiments and they show that the algorithm used by us has a recognition rate of 97.5% for periodic human behaviour based on the WARD dataset. The specific results are shown in Table 2.   Table 3 and Figure 4 show the simulation results of different algorithms in the same environment using the WARD data set in Table 1. Table 3 and Figure 4 show that the recognition rate of this algorithm is higher than other algorithms [12]. The choice of the classifier is significant for behaviour classification. Table 4 results from a classification using different classifiers after extracting feature vectors according to algorithm used by us. It can be seen from Table 4 that the feature vector extracted by the algorithm can achieve a higher recognition rate.

Introduction to self-collecting database
To further verify the rationality and scalability of the algorithm, a motion capture system is used to record data under actual conditions. First, it applies the algorithm to the data set [13]. The database in this paper collects eight daily behaviours of 8 collectors of motion capture data. It extracts from the data of the left wrist, right wrist, waist, left ankle and right ankle. The data samples from the self-collected database are shown in the Figure 5. It is worth noting that the data sampling frequency of the WARD data set is low (30 Hz), while the motion capture system used by us has a high sampling frequency (90 Hz). It can be seen from Eq. (12) that if the resampling interval d of the fitting function is kept at one at this time, the period data length will be longer, and the feature vector dimension will be too large. To solve this problem, the sampling interval d in formula (12) is set to 3. Then the fitting function is resampled, and the feature vector is extracted. This adjustable resampling method reflects the applicability of this algorithm to the existing high-frequency motion capture system and reflects the advantages of operational data.

Experimental results
Analogous to the experimental approach of the WARD data set, we use the K-CV method to establish a training sample and test sample library, and finally the support vector machine is used for classification and recognition. It is found that the recognition rate reaches 98.75%.

Conclusion
This paper uses the FDA method to functionalise the discrete data compared with the traditional discrete motion data processing method. This paper expresses the continuity of human motion data. First, we accurately calibrated the starting point of the motion cycle according to the function of the motion data. We then extracted the periodic sequence of the motion data approximately according to the starting point. The method in this paper has certain advantages over traditional window processing methods. Then, we use SVM and the periodic data sequence extracted by this algorithm to classify the human body's dynamic behaviour better to obtain a recognition rate comparable to the traditional method. The algorithm's effectiveness in this paper has been verified on the public data set WARD and the self-collecting database.