Deployment and selection of sensor nodes
The design of the minimum hardware system designed in this paper mainly contains sensor module, microprocessor module, power supply module communication link. The overall framework of the system is shown in Fig. 3.

Block diagram of the proposed human motion pattern detection system.
The information sensing unit of this design is MEMS sensor. The selection of waist and thigh locations for MEMS sensor deployment is grounded in the biomechanical principles of the Hanavan human body model24. The Hanavan model provides a framework for understanding the distribution of body segments and their contributions to overall motion dynamics. The waist, near the body’s center of gravity, captures global motion trends such as posture shifts and rotational movements, which are essential for understanding the overall activity pattern. The thighs, being large and stable segments, provide critical information on lower limb kinematics, including stride length, acceleration, and joint angles. These locations are optimal for capturing the most informative motion data while minimizing noise from high-frequency movements of distal segments like the ankles and wrists. Considering the application scenario of this model, the system design needs to fulfill the requirements of high accuracy, small size, low power consumption and easy wearability. In order to design a pattern recognition system with the highest accuracy using the minimum number of sensor units, we need to find the optimal placement nodes. The Inertial Measuring Unit (IMU) is used to measure the angular velocity and linear acceleration of the lower limb segments as direct biomechanical variables. At the same time, the direct output of the IMU is used to indirectly calculate the lower limb joint and segment inclination in the sagittal plane. The output undergoes several signal conditioning stages to remove noise and bias. In addition, the effect of misalignment on the raw data was eliminated by propriety calibration of the sensors. Therefore, the following conclusion was drawn: the optimal locations for the expression of human movement patterns are the waist and the thighs. The deployment location of the sensor nodes is thus determined.
Variations in adolescent anthropometrics, such as height, weight, and body proportions, can significantly impact sensor calibration and data consistency. Taller adolescents may have different segment lengths and moment arms, affecting the interpretation of angular velocity and acceleration data. Heavier individuals may introduce more soft tissue movement, leading to potential sensor displacement and increased noise in the raw signals. To address these challenges, the system employs a calibration routine that accounts for individual differences. The IMU system error calibration process, described in Sect. 3.2, is designed to correct for scale factor and zero-bias errors specific to each sensor and user. Additionally, the feature extraction process of empirical mode decomposition (EEMD) used in this study is robust to small changes in signal morphology, ensuring consistent pattern recognition among different populations.
IMU system error calibration
In an ideal inertial guidance coordinate system, the three-axis accelerometer coordinate system \(\:\left(\lambda\:_i\right.\), \(\:\lambda\:_j\), \(\:\lambda\:_k\)) and the three-axis gyroscope coordinate system (\(\:\xi\:_i\), \(\:\xi\:_j\), \(\:\xi\:_k\)) are perfectly coincident. Due to the presence of design and machining errors, an error angle will exist between the two. There will also be a scale factor and zero-bias error, which are the main factors affecting the accuracy of the coordinate results. In this study, the algorithm of multi-target capturing positioning information is used to collect the acceleration values of the three axes, i.e., \(\:\lambda\:_i\) \(\:\lambda\:_j\), \(\:\lambda\:_k\), under various static conditions, which are used as the solution conditions for the model parameters of the accelerometer; and then the calibrated data are used to assist in calibrating the angular parameters and optimizing the system’s reference coordinate system.
Data preprocessing
Outlier detection
The front-end data of this system is acquired through IMU sensors. When the components are guaranteed to work under the rated electrical state, data anomalies generally do not occur. However, considering the application scenarios of wearable devices, there is a possibility that the sensor data acquisition process may result in phenomena such as device dropping, power supply dropout, excessive environmental noise, etc., at which time the system front-end data will have abnormal values. Abstractly speaking, outliers are patterns that deviate from the expected normal behavior. Then, the normal behavior pattern can be represented by a region, and all normal observations can be regarded as belonging to this normal region, and those that do not belong to this region are regarded as outliers. There are various outlier detection methods, such as distance-based, probability distribution-based, and base-based. Here we are using the probability distribution-based method, which utilizes the most common normal distribution in statistics. According to the distribution probability situation of the data acquired by the sensor, we can determine whether the value is abnormal or not.
Let the data sample points be (\(\:i_1,i_2,i_3,\cdots\:,i_t\)), the mean value µ and variance σ can be calculated by Eq. (1) and Eq. (2).
$$\:\mu\:=\frac1t\sum\:_x=1^t\:i_x$$
(1)
$$\:\sigma\:^2=\frac1t\sum\:_x=1^t\:\left(i_x-\mu\:\right)^2$$
(2)
If the data samples fall in the above interval, the data is determined to be normal, if the data samples are not in this interval, the data is determined to be an outlier, and directly discarded for processing. Comprehensive analysis of the above, the outlier processing flow used in this paper is shown in Fig. 4.

Anomaly handling process.
Data noise reduction
For the collected data, in addition to outlier detection and elimination, it is also necessary to perform noise reduction and filtering on the data. Because the data transmission process may be subject to mechanical noise, electronic noise and electromagnetic wave signal interference, so noise reduction filtering is a necessary processing step before obtaining useful data. Here, we use op-amp MAX9203 hysteresis comparator to realize the data noise reduction. The supply voltage of the op-amp is ± 5 V, and the circuit parameters are designed by combining the general frequency bandwidth of human motion information. The built circuit is shown in Fig. 5.

Hysteresis comparator circuit for noise reduction in motion data.
The hysteresis comparator circuit employed in this study for noise reduction offers distinct advantages in the context of real-time motion data processing. Unlike software-based methods such as wavelet transforms and Kalman filters, the hysteresis comparator operates at the hardware level, providing immediate noise attenuation without introducing additional computational latency. This is particularly critical in real-time health monitoring applications where timely feedback is essential for effective intervention.
Wavelet transforms are powerful for decomposing signals into different frequency bands and removing noise through thresholding, but they require significant computational resources and are typically implemented offline or on powerful processors. Kalman filters, while effective for dynamic systems, demand precise modeling of the system dynamics and measurement noise characteristics, which can be challenging in the unpredictable environments of physical rehabilitation.
The hardware-based approach adopted in this system ensures minimal latency, as the noise reduction is accomplished directly within the analog domain before digitization. This contrasts with algorithmic methods that must process digitized signals, introducing delays due to sampling, quantization, and computational processing. However, hardware solutions like the hysteresis comparator may lack the adaptability of software-based methods in handling diverse noise profiles.
The choice between hardware and algorithmic noise reduction involves trade-offs in latency, computational resource consumption, and flexibility. Hardware-based methods, such as the hysteresis comparator, excel in low-latency applications and consume fewer computational resources, making them ideal for wearable devices with limited processing power. They are less susceptible to variations in software performance and can operate independently of the system’s main processor.
On the other hand, algorithmic approaches offer greater flexibility in adapting to different noise environments and signal characteristics. They can be updated and optimized post-deployment through software revisions, whereas hardware circuits require physical redesigns for modifications.
In this study, the hysteresis comparator circuit was chosen for its balance of effectiveness, simplicity, and compatibility with the system’s real-time requirements.
Improved SVM based human motion pattern recognition
PSO-SVM algorithm
Traditional Support Vector Machines (SVMs) are widely used for pattern recognition tasks due to their excellent classification performance, but their performance depends heavily on the choice of parameters. The particle swarm optimization (PSO) algorithm, as an effective global optimization algorithm, can be used to optimize the parameters of SVM. In this paper, a PSO algorithm is proposed to optimize the SVM model for human motion pattern recognition. PSO-SVM was selected over other classification models (e.g., Random Forest) due to its dual advantages in handling high-dimensional motion data and optimizing hyperparameters efficiently. Unlike traditional SVM models that require meticulous parameter tuning, our PSO-SVM algorithm optimizes the penalty parameter C and kernel parameter a through particle swarm optimization, enhancing classification accuracy and reducing overfitting risks.
Support vector machine is a machine learning method that follows the principle of minimizing structural risk while reducing the error and learning complexity of the training set. The basic idea is to determine a hyperplane and use that hyperplane to distinguish the information data as correctly as possible. Thus, the classification problem is transformed into a quadratic programming problem, namely
$$\left\{ {\beginarray*20c{\max \sum\limits_x = 1^t \alpha _x – \frac12\sum\limits_x = 1^t \sum\limits_y = 1^t j_xj_y\alpha _x\alpha _yZ\left( i_x,i_y \right) } \\ {\;s.n.\;\left\{ \beginarray*20c\sum\limits_x = 1^t j_x\alpha _x = 0 \\ 0 \leqslant\alpha _x \leqslant C,\,\,x = 1,2, \cdots ,t \endarray \right.} \endarray} \right.$$
(3)
where \(\:i_x\) is the training sample input variable; \(\:j_y\) is the corresponding output variable; \(\:\alpha\:_x\),\(\:\:\alpha\:_y\) are the Lagrange multipliers; C is the penalty parameter; \(\:Z\left(i_x,i_y\right)\) is the kernel function. The motion recognition problem is actually a multi-input, single-output nonlinear mapping problem, which requires the use of radial basis function (RBF) as the kernel function of SVM, i.e.:
$$Z\left( i_x,i_y \right) = \exp \left( { – a\left\^2} \right)a > 0$$
(4)
Where: a is the kernel parameter.
The final classification function of the support vector machine is obtained as:
$$f\left( i \right) = sign\left[ \sum\limits_x = 1^t \alpha _x Z\left( i,i_x \right) \right] = sign\left[ {\sum\limits_x = 1^t \alpha _x \exp \left( { – a i – i_x \right\^2 – h} \right)} \right]$$
(5)
where h is the bias. The support vector machine classification performance depends on the selection of the penalty parameter C and the kernel parameter a. Too small a kernel parameter a results in weak performance of the trained model, while too large a kernel parameter a results in overfitting of the training samples. The penalty parameter C affects the maximum impermissible error, and both of them affect the performance of the model. Therefore, PSO is used to optimize the parameters C, a of the SVM model. PSO is an algorithm based on an iterative model, where the value of the function to be optimized (the classification error function) is set as the fitness of each particle throughout the parameter optimization phase. The initial stage is a population of particles, where each particle vector represents an SVM model corresponding to a different C, a in the model, i.e. a potential optimal solution. Particle characteristics are described in terms of position, velocity and fitness values. The factors affecting the velocity and direction of particle motion are the historical motion information of itself and the population and the historical optimal position. The velocity of a particle is defined as the distance it moves in each iteration. So the velocity of the particle in d-dimensional subspace is:
$$\:Q_xd^z+1=\delta\:Q_xd^z+c_1r_1\left(U_xd^z-P_xd^z\right)+c_2r_2\left(U_ad^z-P_xd^z\right)$$
(6)
$$\:P_xd^z+1=P_xd^z+Q_xd^z+1$$
(7)
where δ is the inertia weight; \(\:c_1\) and \(\:c_2\) are the learning factors, which represent the local and global search ability of the particle swarm algorithm. \(\:P_xd^z\) is the position of particle x in the z-th iteration in the d-th dimension. \(\:U_xd^z\) is the extreme position of particle x in the individual; \(\:U_ad^z\) is the extreme position of particle x in the group.
The PSO parameters were optimized through iterative grid search and cross-validation. The inertia weight (δ) was initialized at 0.9 to prioritize global exploration, then linearly reduced to 0.4 to shift toward local refinement. Learning factors (c₁ = c₂ = 2.0) balanced individual and social learning, while swarm size (50 particles) and iterations (100 cycles) were determined via convergence tests. Fitness was defined as classification error minimization, ensuring alignment with the SVM’s objective function. This approach achieved stable convergence within 80 iterations, confirming parameter robustness.
Feature extraction
Empirical Mode Decomposition (EMD) is an adaptive analysis method for nonlinear and nonsmooth signals25. It can decompose a complex signal into a collection of intrinsic mode functions (IMFs) based on the local characteristic time scale of the signal. However, it cannot accurately reveal signal feature information due to the problem of mode mixing. To alleviate the mode mixing problem that occurs in EMD, ensemble empirical mode decomposition (EEMD) is proposed. Using EEMD, components with real physical meaning can be extracted from the signal.
The main advantages of EEMD over standard EMD are as follows:
-
(1)
Noise-Assisted Analysis: By adding white noise, EEMD introduces variability that helps separate overlapping frequency components. The noise acts as a “probing signal,” ensuring that each IMF corresponds to a distinct physical mode.
-
(2)
Improved Robustness: Averaging multiple decompositions (each with different noise realizations) cancels out the added noise while preserving the true signal components. This reduces mode mixing and enhances the interpretability of motion patterns.
-
(3)
Adaptability to Nonlinear Signals: EEMD’s noise-assisted approach is particularly effective for adolescent motion data, which often exhibits irregular and transient features due to rapid physiological changes.
In order to extract the EEMD features, a white noise of finite amplitude is added to the signal, and the added white noise will fill the entire time-frequency space uniformly. When signals are added to a uniformly distributed white background, the different signals are automatically projected into the background built by the white noise at an appropriate reference scale. As the number of averaging times increases, the residual noise decreases, which can effectively improve the problem of frequency aliasing that tends to occur in EMD decomposition. Considering the characteristics of the data acquired by inertial sensors, which are generally nonlinear and nonsmooth signals, decomposing the signals and extracting the effective parameters using EEMD is a key step in motion recognition. The feature extraction process is as follows: the waist sensor node is close to the center of gravity of the human body, which is mainly used to detect the overall motion trend of the human body; the thigh area sensors are used to detect the motion details, such as the speed of the motion, the angle of the motion and so on. The six-axis sensors on each node can obtain the acceleration information (\(\:\lambda\:_i\) \(\:\lambda\:_j\), \(\:\lambda\:_k\)) and angular velocity information (\(\:\xi\:_i\), \(\:\xi\:_j\), \(\:\xi\:_k\)) in three axis directions at the same time. For the motion data in the three axes directions, the nodes can measure the inertial signal components in the i, j, and k directions, which are used to express the motion of the human body in different directions. The combined acceleration and combined angular velocity are used to express the overall motion of the limb. The calculation formula is as follows:
$$\:\lambda\:=\sqrt\lambda\:_i^2+\lambda\:_j^2+\lambda\:_k^2$$
(8)
$$\:\xi\:=\sqrt\xi\:_i^2+\xi\:_j^2+\xi\:_k^2$$
(9)
In our study, we optimized several key parameters to ensure the robustness of the EEMD process without overcomplicating the decomposition:
Noise Amplitude: We used a finite amplitude white noise. The amplitude was set to a level that was sufficient to fill the time-frequency space without overwhelming the original signal components. This was determined through empirical testing to ensure that the noise contributed to the separation of signal features without introducing excessive artifacts.
Ensemble Size: The number of averages (ensemble size) was optimized to balance between the reduction of residual noise and computational efficiency. A larger ensemble size generally leads to better suppression of residual noise but increases computational load. We found that an ensemble size of 100 provided a good compromise, effectively reducing the impact of added noise while keeping the computation time within acceptable limits for real-time processing requirements.
These parameter choices were validated through experimental evaluation, ensuring that the EEMD process reliably extracted meaningful features from the nonlinear motion signals captured by the MEMS sensors.
Hierarchical algorithm
The patterns detected by the model in this paper mainly target the basic physical training patterns in the daily life of adolescents, such as standing, sitting, walking at a constant speed, accelerating running, going up and down the stairs, and so on. In order to further improve the efficiency of extracting features from motion signals, we classify the signals in advance according to their features. Firstly, the signal can be categorized into static and dynamic. Static motion patterns such as sitting, lying, standing; dynamic motion patterns such as walking, running and so on. On this basis, the motion patterns can be obtained more quickly by analyzing the posture of the motion patterns in combination with the angular velocity sensor. The result of motion state classification is shown in Fig. 6.

PSO- SVM classification results.
link
