Abstract
Athlete’s heart rate measurement has certain guiding significance for athlete training and competition intensity arrangement. At present, the accuracy and efficiency of the athlete’s heart rate measurement method cannot meet the actual training needs of athletes. In view of this, based on support vector machine, this research combines with improved algorithm to build athlete heart rate measurement model. Moreover, in this study, the denoising algorithm of multi-channel spectral matrix decomposition is used to eliminate the interference factors. The heart rate measurement algorithm based on support vector machine (Mix-SVM) proposed by this paper mainly includes the following parts: preprocessing, preliminary filtering of motion noise, sparse signal reconstruction model, spectral subtraction, and heart rate spectral peak tracking method based on SVM. In addition, in order to verify the effectiveness of the algorithm in this study, a control experiment is designed to verify the efficiency and accuracy of the algorithm proposed by this study. The research results show that the algorithm proposed by this paper has certain advantages in accuracy and efficiency.
Introduction
How to tap the sports potential of athletes and realize the breakthrough development of competitive ability is the fundamental task of sports training. To achieve this, we must use reasonable means and methods. Only in this way can the athlete’s competitive ability develop from the current state to the ideal goal and provide guarantee and possibility for achieving excellent results [1].
Gas metabolism is an indirect indicator that reflects energy metabolism and reflects the functional capabilities and coupling relationships of human breathing, circulation, muscle and other systems [2]. Heart rate variability refers to a phenomenon in which sinusoidal heart rate changes periodically or quasi-periodically with time. The analysis of the gas metabolism and heart rate variability of rowers before and after winter training can evaluate the training effect of aerobic capacity and its possible mechanism to a certain extent, which is of great significance for formulating and perfecting training plans and evaluating training levels.
How to accurately measure heart rate is an important issue that needs to be solved urgently. There are currently two mainstream heart rate measurement techniques that have been proposed [3]: One is the traditional electrocardiogram technique (Electrocardiogram, ECG), which requires attaching lead electrode pads to a fixed position on the chest to measure the electrocardiographic signal and then record the changes in the electrocardiographic cycle. This method has been used for a long time. Although this method of heart rate measurement can obtain a high-precision heart rate measurement value, its use cost is high, the operation is complicated, and the volume is large, which is not easy to carry. Moreover, it is not suitable for home monitoring, so it is difficult to meet the requirements of future electronic health monitoring, wearable devices and so on. The second is photoplethysmography (PPG) [4], which mainly uses photoelectric technology to non-invasively detect blood volume changes in human micro-vessel walls. This technology has many advantages for heart rate measurement, such as simple hardware implementation, small PPG sensor size (suitable for embedding in wearable devices), low price, and no need for reference sensors, which is also a current focus of attention.
Athletes have a faster metabolism and need a high frequency of systolic pumping of blood, so as to achieve the need for blood circulation during quietness and exercise. Therefore, the heart rate of athletes is higher than that of the average person. If the control of the training load is unreasonable or the load is too large during football training, it may cause tachycardia and myocardial strain to the athletes and ultimately endanger life. Therefore, monitoring the response of the heart rate and controlling the training load in sports training have a significant positive effect on the normal growth and development of athletes’ heart organs and other organs and the safety of life during exercise.
Related work
The commonly used methods of heart rate variability analysis are linear analysis and nonlinear analysis, and linear analysis is divided into time domain analysis and frequency domain analysis. Because the nonlinear analysis method involves very complicated mathematical problems, it is not mature in clinical research applications. Therefore, the more common and accepted methods today are: time domain analysis and frequency domain analysis [5]. HRV is a non-invasive indicator used to study autonomous control of heart rate and has a wide range of applications. In the field of sports, it can be used to evaluate athletes’ athletic performance and athletic ability, to analyze the effects of different types of sports on the human body, to diagnose sports diseases, and to monitor the effects of fitness exercises. Moreover, it can be used as a psychological intervention to train athletes, and even can be used to study nutritious food. In recent years, the application research of HRV in the field of sports has developed rapidly in terms of depth and breadth [6].
In order to understand the influence of Taijiquan exercise on heart rate variability (HRV) of the elderly, the literature [7] tested the HRV of 16 elderly people who practiced Tai Chi for a long time. It was found that the elderly who had been practicing Tai Chi for a long time could quickly recover their HR and autonomic balance after exercise, which is more suitable for the elderly to practice for a long time. Literature [8] found that 11-month regular yoga exercise can increase the HF of the subjects in a quiet state, which indicates that yoga exercise can increase the tension of the vagus nerve to enhance the protective effect of the vagus nerve on the heart. However, yoga has no significant effect on sympathetic tone. The literature [9] and the literature [10], etc., conducted 20-minute and 30-minute moderate-intensity training for 20 and 7 healthy young male sedentary persons, respectively.
The study in the literature [11] pointed out that the autonomous adaptation of the heart to the duration of daily aerobic physical training is manifested by the autonomous component of the vagus nerve, and this adaptation is not proportional to the time of daily physical training, which is consistent with the conclusions of Tulppo et al. After observing the effect of long-term exercise training on cardiac autonomic function of college athletes of different specialties, the literature [12] obtained the results: systematic exercise training can significantly improve the heart rate variability of the body, so that it has a higher autonomic nerve regulation reserve. Moreover, basketball is superior to football in improving cardiac autonomic regulation.
Taking competitive aerobics college athletes as the research object, the literature [13] analyzed the factors influencing the variability of the heart rate variability of the competitive aerobics college athletes under increasing load and the difference of HRV between the competitive aerobics college athletes and the ordinary college students under the increasing load. It is concluded that in incremental load exercise, with the increase of exercise intensity, the HRV value of the experimental group and the control group decreased significantly, the experimental group decreased more rapidly, and some indicators of HRV can be used for the selection of competitive aerobics athletes. The literature [14] measured the changes of heart rate variability indexes of wrestling athletes during heavy exercise training, observed the effect of heavy exercise training on the cardiac autonomic function of athletes, and initially discussed the application of heart rate variability indexes in the evaluation of human sports fitness. The literature [15] conducted a longitudinal study on the performance of the athletes throughout the season and observed the activity of the autonomic nerves through HRV spectroscopic analysis. It was found that the hockey player with the highest total score is also high in total power and performs best in sports. At the same time, the athlete with the lowest total score has the lowest total power and the worst performance in sports. There are also studies that use HRV as an intervention method to improve athletic performance through its feedback. The literature [16] used the HRV biofeedback method to intervene the Latin dancers, and found that the HRV biofeedback method can improve the performance of Latin dancers, which is embodied in the use of HRV biofeedback method can improve sports skills.
The literature [17] believed that after exercise training, the RR interval increases significantly and the power of HRV high frequency (HF) of sympathetic nerve intervention increases. However, studies of the literature [18] and the literature [19] show that there is no significant change in HRV except regular increase in VO2max and slow heartbeat at rest after regular exercise. The article [24] dealt with IoT and human behaviour data with the collection and analysis of data from distinctive resources. The article [25] implements cooperative cognitive intelligence in the field of vehicular communication. The article [26] proposes the concept of SmartBuddy for implementing intelligent and smart city-based environments. The article [27] uses partitioning algorithm for speeding up the process of video processing. The article [28] does IoT and BigData Analytics in the real time environments using Hadoop ecosystem [29, 30].
Denoising algorithm based on multi-channel spectral matrix decomposition
Inspired by the SMV model in the TROIKA method and the MMV model in the JOSS method, the spectrum matrix X is first decomposed into a motion noise spectrum matrix A and a real PPG signal spectrum matrix B, namely
On the one hand, the PPG signal without noise interference can truly reflect the heart rate, and the heart rate is quasi-periodic, so the PPG signal itself is sparse in the frequency domain [20]. On the other hand, the strong correlation between the motion acceleration signal and the motion noise signal appears in the frequency domain as the spectral peak position of the original PPG signal spectrum and the spectral peak position of the motion acceleration signal spectrum are substantially the same [21]. According to this, row sparse constraints and global sparse constraints are applied to the above matrices A and B, respectively. Therefore, the objective function of the multi-channel spectral matrix decomposition model proposed in this study combined with compressed sensing theory can be expressed as follows:
In the function,

Structure of matrix A and B.
By observing the MC-SMD model, it can be seen that the column vectors of the observation matrix Y are composed of multi-channel PPG signals and motion acceleration signals in the same time period. In the simulation experiment, the first and second columns of the observation matrix Y refer to PPG signals of different channels (acquired from different positions of the wrist), and the remaining three columns are the three different directions of the synchronized motion acceleration signal.
This section mainly introduces the objective function optimization problem of the model. Through observation, it is found that it is a composite function composed of the differentiable empirical cost function part P (A, B) and the convex non-smooth regularization part Q (A, B), namely
As we all know, the compound function of the above-mentioned form has been extensively studied by academia. This section uses the near-end gradient acceleration algorithm (APG) to solve Equation (2). Compared with the traditional sub-gradient method, APG has an excellent convergence speed when solving the global optimal solution. In other words, APG can obtain a global optimal solution with a residual equal to O (1/m2) after iterations.
Thus, using synthetic gradient mapping, Equation (2) can be constructed as the following function:
Among them, the first-order Taylor expansion of P (A, B) and Q (A, B) at point (γ, Γ) is expressed as F (A, B, γ, Γ), and the square of the Euclidean distance between (A, B) and (γ, Γ) is the remainder of the Taylor expansion. The partial derivatives of P (A, B) with respect to A and B are ∇ p L (Θ, Ψ) and ∇ Q L (Θ, Ψ), respectively. ℓ is a parameter that can effectively control the step size.
In the m-th iteration of the APG algorithm, by aggregating the linear combination (γm+1, Γm+1) of (A
m
, B
m
) and (Am+1, Bm+1) in this step, the historical information of (A, B) in the previous iteration process will be memorized. Therefore, the update equation for (γm+1, Γm+1) is expressed as follows:
In the equation, when m = 0, α
m
= 1, and when m > 1,
In order to better describe the iterative optimization process of APG, we need to introduce two conclusion equations, namely
Among them, S (Gi,j) is the soft threshold operation, and its specific expression is as follows:
For W
τ
(G), the value of the i-th row is calculated as follows:
In the formula, g i represents the i-th row of the matrix G.
The optimization problem of Equation (8) can be decomposed into two sub-problems, and through Equations (9) and (10), the Equations (13) and (14) are simplified.
The heart rate measurement algorithm (Mix-SVM) based on support vector machine proposed in this study mainly includes the following parts: preprocessing, preliminary filtering of motion noise, sparse signal reconstruction model, spectral subtraction, and heart rate spectral peak tracking method based on SVM. The overall framework of the algorithm is shown in Fig. 2.

Flow chart of heart rate estimation.
The preprocessing stage consists of under-sampling and band-pass filtering operations. First, the multi-channel PPG signal with a sampling frequency of 125 Hz and the synchronized motion acceleration signal are under-sampled, so the sampling frequency of the algorithm is 25 Hz. Therefore, the multi-channel PPG signal and the synchronized motion acceleration signal after under-sampling need to be filtered by a second-order Butterworth filter with a passband of 0.4 Hz to 4 Hz to remove motion noise and other interference noise outside the passband.
This section mainly introduces how the adaptive filter can achieve the preliminary removal of the motion noise of the multi-channel PPG signal. Although the adaptive filter has been widely used in this field, the reference signal used is directly extracted from the PPG signal itself. This type of method is mainly used in clinical situations that contain only slight motion noise. For severe motion noise, its removal effect is not good. Therefore, this chapter proposes to use principal component analysis (PCA) to extract reference signals related to motion noise from motion acceleration signals. The preliminary filtering of the motion noise in the multi-channel PPG signal can be divided into two stages, and the process will be described in detail in the following.
Least Mean Square Adaptive Filter (LMs-ANC): In this process, all motion noise-related reference signals generated in the previous stage will be used by the least mean square adaptive filter (LMS-ANC). LMS-ANC uses the minimum mean square error as a performance index, and constantly updates the filter weights, thereby completing the removal of some motion noise in the multi-channel PPG signal.
The mathematical expression of the observed PPG signal y (n) is:
In the formula, y0 (n) represents the PPG signal without motion noise, and m (n) represents the motion noise signal.
In summary, the update formula of the difference e (n) and the filter weight w (n) is expressed as follows:
In the formula, m′ (n) represents the estimated motion noise signal, a (n) represents the reference signal related to motion noise, and μ is a parameter.
Similarly, inspired by the SMV and MMV models, we can extract the row sparse characteristics of the spectral matrix based on the strong correlation between the motion noise of the multi-channel PPG signal and the synchronized motion acceleration signal. Based on this, this section proposes a sparse signal reconstruction model combined with the theory of cs. The mathematical expression of the objective function of this model is:
Among them,
Observing the above model, it can be seen that the column vectors of the observation matrix y are composed of multi-channel PPG signals and motion acceleration signals in the same time period respectively. The multi-channel PPG signals refer to the signals after preliminary denoising by LMS-ANC. In the simulation experiment, the first and second columns of the observation matrix y still refer to PPG signals of different channels, and the remaining three columns are still three different directions of synchronized motion acceleration signals.
At present, a variety of algorithms have been proposed to optimize the objective function of the above model, but there is a strong correlation between adjacent columns of the matrix Φ, so not all algorithms are applicable. However, when the columns of the matrix Φ are highly correlated, the M-FOCUSS algorithm still has a faster calculation speed and reliable performance. At the same time, the M-FOCUSS algorithm is a derivative form of FOCUSS-like algorithms. It will converge as soon as the coefficient is large, and only a few iterations are required during the operation. Therefore, this chapter will use the regularized M-FOCUSS algorithm to solve the optimal solution of the objective function of the above model. The mathematical expression of the algorithm is as follows:
Among them,
Because the sparse signal reconstruction model has certain advantages in the spectral matrix solution algorithm, only the simple spectral subtraction method can easily extract the correct heart rate signal. The specific steps of the operation mode of spectral subtraction proposed in this chapter are as follows:
Step 1: At each frequency point f i (i = 1, 2, ⋯ , N), the largest spectral coefficient in the frequency spectrum of the motion acceleration signal is selected, which is defined as Acc i .
Step 2: The PPG signal spectrum of each channel subtracts Acc i from the spectral coefficient of f i . Then, the maximum spectral coefficient of the PPG signal spectrum of each channel is selected within the 0 ⩽ f i ⩽ 199 range, defined as Pmaxj.
Step 3: If the spectrum coefficient of the PPG signal of a channel is less than m in the range of 0 ⩽ f i ⩽ 199, it is set to Pmaxj/5. At this time, a clean multi-channel PPG signal spectrum is generated in the 0 ⩽ f i ⩽ 199 range.
In order to better understand the operation of spectral subtraction, there are a few points that need to be explained:
First, the frequency point f i of the digital signal spectrum is counted from 0, so the relationship between it and the position index i is as follows:
Second, the relationship between the frequency f
i
of the digital signal and the frequency factory of the analog signal is shown in Equation (19).
Among them, f s is the sampling frequency and N is the number of spectrum grids.
Third, according to incomplete statistics, the highest human heart rate is recorded at 230 beats/minute, and in most cases (including strenuous exercise) the heart rate will not exceed 180 beats/minute. In the simulation experiment, we set the number of spectral grids for the sampling frequency f s = 25 Hz to N = 1024, so the spectral peak corresponding to the heart rate will be within the range 0 ⩽ f i ⩽ 199.
Fourth, in order to ensure the effective operation of spectral subtraction, the multi-channel PPG signal spectrum and the motion acceleration signal spectrum should have the same energy value.
A labeled training sample set is given.
Amongthem, x1∈ R
n
, y ∈ { - 1, 1 }. Once the vector W and the offset { (x1, y1) , (x2, y2) , ⋯ , (x
n
, y
n
) } satisfy the inequality (20), then we think that the given training set g is linearly separable. The expression of formula (20) is as follows:
Among them, “.” represents the vector dot product.
Since all elements in the training sample set satisfy formula (20), we rewrite formula (20) to obtain the following equivalent form:
If it is assumed that an optimal hyperplane can divide { (x1, y1) , (x2, y2) , ⋯ , (x
n
, y
n
) } linearly, then the optimal hyperplane is denoted as w0 · x + b0 = 0, that is:
In order to better solve the optimization problem of Equation (22), Lagrange function and Kuhn-Tucker condition can be introduced to obtain the optimal classification function, namely:
Among them, a i > 0 is the Lagrange coefficient.
In layman’s terms, the learning strategy of SVM is to obtain a hyperplane with a maximum interval in the feature space. Therefore, according to the relevant theory of functional, only need to select a function that meets the Mercer condition to get the corresponding classification function, namely:
Among them, the K (x i , x j ) function is called a kernel function.
With the continuous in-depth study of SVM, a large number of models and methods based on SVM ideas continue to emergeand are widely used in various fields. At present, its main application areas include: pattern recognition (such as face, character, image recognition; handwriting, speech identification; text, image classification, etc.), regression estimation (such as nonlinear system estimation; probability density function estimation; prediction, modeling and control, etc.), network intrusion detection, data mining, mail classification and financial prediction, biological information, and signal processing, etc.
The motion noise in the multi-channel PPG signal has been effectively removed. Next, the tracking and positioning of the peak corresponding to the heart rate will be performed. This chapter proposes a heart rate spectrum peak tracking method based on support vector machine (SVM). This method regards the heart rate spectrum peak tracking problem as a pattern classification task. In this process, the statistical characteristics of the multi-channel PPG signal are fully considered. This section will be divided into two parts to introduce the heart rate spectral peak tracking method based on SVM in detail, namely spectral peak discovery and spectral peak selection.
Spectrum peak discovery is mainly used to search for candidate spectrum peaks in the PPG signal spectrum. In this chapter, an adaptive threshold k is first set, that is
Among them, z refers to the PPG signal spectrum of each channel after denoising, and ξ is a parameter used to control the threshold value. max{ · } is a mathematical operation symbol that takes the most value, that is, the highest spectral peak coefficient of the PPG signal spectrum of each channel is selected. Then, we will use the threshold k to form a set of candidate spectral peaks, that is, when the amplitude of the spectral peak is greater than the threshold, the spectral peak is included in the candidate spectral peak set, otherwise the spectral peak is “ignored’ ’.
The final goal of the spectrum peak selection part is to locate the most accurate heart rate spectrum peak from the set of candidate spectrum peaks. As we all know, only one peak in each time window corresponds to the true heart rate. At the same time, the correct heart rate spectrum peak has many unique characteristics compared to the wrong heart rate spectrum peak. In order to better find effective features, the statistical characteristics of the correct heart rate spectrum peak are analyzed, and the analysis results are listed as follows: In the correct heart rate spectrum peak, about 75% of the heart rate spectrum peak has the largest coefficient in the corresponding time window; Among the correct heart rate spectrum peaks, the distance between about 84% of the heart rate spectrum peaks and the correct heart rate spectrum peak of the previous time window is the smallest; Among the correct heart rate spectrum peaks, about 96% of the heart rate spectrum peaks have the largest coefficient and the smallest peak-to-peak spacing.
Based on the above statistical characteristics, the coefficient ratio of the peaks of the heart rate spectrum and the peak-to-peak spacing can be used as features for subsequent classification work. Assuming that there are three candidate spectral peaks in the set of candidate spectral peaks, the expression of the coefficient ratio C
i
of the i-th candidate spectral peak is defined as follows:
Among them, coe i represents the coefficient of the i-th candidate peak, and coemax represents the largest coefficient in the set of candidate peaks.
Similarly, the calculation expression of the peak-to-peak distance D
i
between the i-th candidate spectrum peak and the heart rate spectrum peak of the previous time window is as follows:
Among them, f i represents the frequency of the i-th candidate spectral peak, and f prev represents the frequency of the estimated heart rate in the previous time window.
In view of SVM’s good robustness and accuracy in processing noisy signals, it is often used to solve classification or regression problems. In addition, the unique attributes of the decision surface of the support vector machine effectively ensure the better generalization performance of the learning machine. According to this, this chapter uses SVM to classify the correct heart rate peaks and wrong heart rate peaks. In the training phase, first, the candidate spectral peak coefficient ratio and peak-to-peak spacing features are extracted from the set of candidate spectral peaks. Secondly, the labeling operation is performed, that is, the correct heart rate peak is marked as “1’ ’, and the wrong heart rate peak is marked as “0’ ’. Then, SVM starts training according to the feature label and finds the support vector. Finally, the optimal hyperplane is determined from the above support vector. So far, the training work of the SVM classifier has come to an end.
In the testing stage, it is still necessary to select the two features of the candidate spectral peak coefficient ratio and peak-to-peak spacing and construct a feature vector. Then, the trained SVM classifier is used to detect whether it is the peak of the correct heart rate. The correct positioning of the heart rate spectrum peak in the current time window can be divided into three cases, namely
Among them, f
predict
represents the frequency corresponding to the predicted heart rate spectrum peak in the current time window, and
Once the frequency f
HR
corresponding to the correct heart rate spectrum peak is selected, the estimated heart rate BPM
est
of the current time window can be calculated by the following formula;
Amongthem, BPM est refers to the number of heart beats per minute.
In order to evaluate the performance of the offline heart rate measurement algorithm (JSSR) based on joint sparse spectral reconstruction proposed in this chapter, we conducted an algorithm validity test on the data set published by IEEESignalProcessCup2015. Similarly, the data set is collected from 12 healthy men with yellow skin, and their age was between 18.35. Moreover, each set of data consists of two channels of PPG signals, three channels of motion acceleration signals, and one channel of ECG signals. The PPG signal is collected from the tester’s wrist by pulse oximeters distributed in different positions. The synchronized motion acceleration signal is collected from the wrist using a three-axis accelerometer, and the ECG signal is collected from the chest of the tester using electrocardiographic electrodes, which can be regarded as the true heart rate. At the same time, the two pulse oximeters distributed in different positions use a green light source LED with a wavelength of 515rim, and the centers of the two are 2 cm apart. All the above signals are sent to nearby mobile devices such as computers or mobile phones by wireless transmission. All data used in the test are obtained through the following motion records, thatis, 1-2 km/h lasts 30 seconds; 6.8 km/h lasts 60 seconds; 12.15 km/h lasts 60 seconds; 6.8 km/h lasts 60 seconds; 12.15 km/h lasts 60 seconds; 1-2 km/h lasts 30 seconds. During this period, the tester needs to move the arm flexibly and make physical movements such as pulling clothes, wiping sweat from the forehead, pressing the treadmill buttons, etc. The average absolute errors of different heart rate measurement algorithms on 12 sets of data and the average absolute error percentages of different heart rate measurement algorithms on 12 sets of data are shown in Tables 1, 2 and Figs. 3 and 4, respectively.
The average absolute error of different heart rate measurement algorithms on 12 sets of data
The average absolute error of different heart rate measurement algorithms on 12 sets of data
Average absolute error percentages of different heart rate measurement algorithms on 12 sets of data

Statistical diagram of the average absolute error of different heart rate measurement algorithms on 12 sets of data.

Statistical diagram of the average absolute error percentage of different heart rate measurement algorithms on 12 sets of data.
In terms of algorithm performance, Fig. 5 shows the estimated heart rate curves of the four algorithms JSSR, MC-SMD, Mix-SVM and SVM on the third set of data sets (arbitrarily selected). Among them, SVM is an improved algorithm recognition model based on the improved algorithm in this study.

The heart rate estimationof Mix-SVM, MC-SMD and SVM on Set 3.
Similarly, the effectiveness of the SVM algorithm is evaluated by comparing the consistency of the estimated heart rate and the true heart rate. Figure 6 shows the B-A graph of the algorithm on 12 sets of data. The data is shown in Table 3.

Statistical diagram of heart rate estimation of SVM on Set 9.
The heart rate estimation of SVM on Set 9
The above research shows that the proposed SVM-based heart rate measurement algorithm for sports athletes is feasible and efficient in effectively removing sports noise and accurately measuring heart rate.
For the heart rate measurement algorithm of athletes during sports, we first need to effectively eliminate the sports noise contained in the PPG signal. Then, the position of the spectral peak corresponding to the center rate of the denoised multi-channel PPG signal is accurately located. Among them, the removal of motion noise is the most critical and complicated, which determines the performance of the heart rate measurement algorithm. In this paper, combined with the theory of compressed sensing, three robust heart rate measurement algorithms based on multi-channel PPG signals are proposed based on the structural characteristics of the spectral matrix. Among them, in order to improve the generalization ability of the entire heart rate measurement algorithm, we also use the SVM classifier to locate and track the heart rate spectrum peak. The research in this paper is based on the compressed sensing theory and uses the row sparse and global sparse characteristics of the spectral matrix to solve the problem of removing motion noise in the PPG signal, and then achieve accurate heart rate measurement. Through research, we can see that the method proposed in this paper has a certain effect.
