Adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search
By using a cluster-guided neural architecture search method, the generated Transformer architecture is directly correlated with the physiological changes in sEMG signals, solving the problem of low efficiency in traditional methods and achieving efficient and robust muscle fatigue prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGXIA UNIVERSITY
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional neural architecture search methods are inefficient in predicting muscle fatigue. The generated network architecture lacks correlation with the physiological changes in sEMG signals and is prone to overfitting, resulting in weak generalization ability.
We employ a clustering-guided and neural architecture search approach. We generate prior information through unsupervised clustering, construct a dynamic Transformer architecture search space, use Markov decision processes for process modeling, and combine real-time sEMG signals for muscle fatigue prediction.
The computational efficiency of the model was improved, and the depth and width of the generated architecture corresponded to the physiological characteristics of muscle fatigue, thus enhancing the robustness and cross-subject generalization ability of the model.
Smart Images

Figure CN122153512A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of biomedical engineering technology, and in particular to an adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search. Background Technology
[0002] Objective quantification of muscle fatigue is of great significance for preventing sports injuries, optimizing rehabilitation training, and ensuring human-machine coordination safety. Surface electromyography (sEMG), as a direct electrophysiological representation of muscle activity, has become a core method for monitoring muscle fatigue due to its non-invasiveness, real-time nature, and sensitivity to muscle activation state.
[0003] Deep learning models are introduced to automatically extract deep features from sEMG. Convolutional Neural Networks (CNNs) excel at capturing local time-frequency patterns; Long Short-Term Memory (LSTM) networks can model the temporal dependencies of signals; and Transformer models, through their self-attention mechanism, can effectively capture long-range dependencies. Furthermore, traditional NAS methods (such as reinforcement learning-based RL-NAS and Differentiable Architecture Search (DARTS)) are used, with performance on the validation set as the sole optimization objective, to automatically explore network structures within a vast search space.
[0004] However, in the specific field of sEMG fatigue prediction, traditional NAS has revealed fundamental shortcomings: 1) The search process is completely independent of the inherent statistical characteristics and physiological meaning of the input data. This search method, which is detached from the data, is equivalent to blindly exploring without a map, which is inefficient and requires huge amounts of computing resources.
[0005] 2) The generated network architecture is only the result of mathematical optimization, and its decisions on the number of layers, width, etc. lack an interpretable correlation with the physiological changes in sEMG signals (such as fatigue-induced spectral shift and increased complexity).
[0006] 3) Because the stability information of the signal distribution is not incorporated, the architecture obtained by the search is prone to overfitting to specific noise patterns or individual features of the training set, resulting in weak generalization ability. Summary of the Invention
[0007] The purpose of this invention is to provide an adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search, aiming to solve or improve at least one of the above-mentioned technical problems.
[0008] To achieve the above objectives, the present invention provides the following solution: An adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search includes: Acquire labeled surface electromyography (sEMG) signals and preprocess them, dividing the data into training and testing sets; For the preprocessed sEMG signal, a sliding window is used to extract time-domain and frequency-domain features to generate feature vectors; Unsupervised clustering of feature vectors is performed to generate prior information; A dynamic Transformer architecture search space is constructed, a Markov Decision Process (MDP) is used for process modeling, and the controller is trained and tested using training and testing sets to obtain the final adaptive model. Prior information from real-time sEMG signal sets is obtained, and the final adaptive model is used to obtain the muscle fatigue index.
[0009] Further, temporal characteristics include: The average rectified value (ARV) is expressed as follows: The root mean square (RMS) expression is: In the formula, Let be the amplitude of the sEMG signal at the i-th sampling point; This determines the number of sampling points within the analysis window.
[0010] Furthermore, frequency domain characteristics are obtained by performing a fast Fourier transform on the surface electromyography signal to obtain the spectrum, and then calculating the power spectrum, including: The average power frequency MNF is expressed as: In the formula, This refers to the nth frequency component in the FFT result; Frequency point The corresponding power spectral density value; This represents the number of positive frequency points. The median frequency (MDF) is expressed as follows: In the formula, The minimum index required to ensure that the accumulated power reaches 50% of the total power.
[0011] Furthermore, unsupervised clustering is performed on the feature vectors to generate prior information, including: Z-score normalization is applied to the time-domain and frequency-domain features of all samples; The K-means algorithm is used to partition the standardized feature space; Determine the optimal number of clusters K using the elbow method; For each cluster generated Calculate the mean vector and variance scalar .
[0012] Furthermore, a dynamic Transformer architecture search space is constructed, including: Encoder depth Embedded Dimension ; Number of heads for multiple attention Feedforward network dimension Activation function .
[0013] Furthermore, Markov Decision Processes (MDPs) are used for process modeling, including: state space The expression is: In the formula, The proportion of normalized cluster means; The normalized cluster variance proportion; The embedding dimension chosen in the previous architectural decision; and Let be the mean vector and variance scalar of the k-th cluster, respectively; To take the maximum value for all clusters; Action space For a specific set of structural parameters selected from the search space ( );in, Select the encoder depth; For the selected embedding dimension; The number of heads selected for multi-head attention; The selected activation function; reward function The expression is: In the formula, This is the mean square error loss; This represents the total number of parameters in the model. It is the natural logarithm; and For weight hyperparameters.
[0014] Furthermore, the controller is trained and tested using the training and test sets to obtain the final adaptive model, including: Using training and testing sets, an LSTM network is trained as the architecture controller using the policy gradient algorithm. Through training and testing, the final adaptive model is obtained.
[0015] Furthermore, by acquiring real-time sEMG signals and combining them with prior information, and using the final adaptive model, a muscle fatigue index is predicted, including: After preprocessing the real-time sEMG signal, time-domain and frequency-domain features are extracted to construct feature vectors; Calculate the Euclidean distance between the feature vector and the mean vector of the cluster in the prior information, and concatenate the prior information of the nearest cluster with the feature vector to obtain the enhanced feature vector; The enhanced feature vectors are mapped to a high-dimensional latent space through a linear projection layer to generate an initial embedding representation; The controller receives the current state. ;in, The cluster to which the current sEMG signal most likely belongs; The controller employs a continuous-discrete smooth mapping to output the optimal action instantaneously. ); The corresponding Transformer encoder is generated based on the optimal action, and the initial embedding representation is processed to obtain a high-dimensional feature vector; The high-dimensional feature vectors are input into a decoder with a fixed structure, and finally mapped to continuous fatigue index prediction values through a linear layer. ,in It indicates no fatigue. It signifies complete exhaustion.
[0016] Furthermore, the controller employs a continuous-discrete smooth mapping to output the optimal action instantaneously. ),include: depth The smooth mapping expression is: In the formula, For dynamically selected encoder depth; and These are the minimum and maximum permissible depths, respectively. It is a sigmoid activation function; Scale factor; This is the complexity threshold; This is a round-down operation; The normalized cluster variance proportion; Embedded Dimension The smooth mapping expression is: In the formula, The embedding dimension is dynamically determined; and These are the minimum and maximum dimensions in the search space, respectively. This represents the proportion of the normalized mean of the current cluster. and These are the scaling factor and threshold bias that control the sensitivity of dimension switching, respectively; It is a ladder mapping function; Number of attention heads The expression is: In the formula, A fixed dimension for each attention head; This is the mapping function from dimension to head count; The selection expression for the activation function is: In the formula, The type of activation function to be ultimately selected; The normalized cluster variance proportion; The switching threshold; This is the conditional judgment logic.
[0017] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: This invention discloses an adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search. The method effectively solves the problem of disconnection between traditional NAS methods and sEMG signals by integrating prior information generated by unsupervised clustering into the dynamic neural architecture search process. The controller uses signal complexity as the state input, reducing computational overhead; the depth and width of the generated Transformer architecture directly correspond to the physiological characteristics of the muscle fatigue stage, possessing strong interpretability; simultaneously, the guidance mechanism based on cluster distribution stability enhances the model's robustness to individual differences and noise, significantly improving cross-subject generalization ability. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic flowchart of the method of the present invention; Figure 2 This is a schematic diagram illustrating the time-series changes of different muscle fatigue characteristic indicators in this embodiment; Figure 3 This is a visualization diagram of the feature space clustering results and evolution path in this embodiment; Figure 4 This is a schematic diagram showing the distribution of the number of generated models in this embodiment; Figure 5 This is a schematic diagram comparing the prediction performance under different data clusters of complexity in this embodiment. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The purpose of this invention is to provide an adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search, aiming to solve or improve at least one of the above-mentioned technical problems.
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] like Figure 1 As shown, this invention provides an adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search, including: Step 1: Acquire labeled surface electromyography (sEMG) signals and preprocess them, dividing them into training and testing sets, including: Using a multi-channel wireless surface electromyography (EMG) acquisition system (such as Delsys Trigno), with a sampling frequency of no less than 2000 Hz, EMG signals were acquired during the subject's performance of a standardized fatigue-inducing task (such as isometric contraction of the elbow joint to exhaustion).
[0024] Preprocessing includes: Outlier handling: Identify and eliminate signal anomalies caused by momentary electrode loosening or strong interference.
[0025] Bandpass filtering: A fourth-order Butterworth bandpass filter (20–500 Hz) is used to filter out low-frequency motion artifacts and high-frequency noise.
[0026] Signal segmentation: The continuous signal is segmented using a sliding window method. The preferred window length is 0.5 seconds, and the overlap rate is 25%, to balance temporal resolution and feature stability.
[0027] Step 2: For the preprocessed sEMG signal, extract time-domain and frequency-domain features using a sliding window method to generate feature vectors, including: Temporal characteristics include: The average rectified value (ARV) reflects the average intensity of muscle activation. It is sensitive to low-amplitude noise and is often used for early fatigue monitoring. Its expression is: The root mean square (RMS) is a measure of signal energy, more sensitive to large-amplitude signals, and reflects the magnitude of muscle contraction force. Its expression is: In the formula, Let be the amplitude of the sEMG signal at the i-th sampling point; The number of sampling points within the analysis window; Frequency domain characteristics are obtained by performing a Fast Fourier Transform (FFT) on the surface electromyography signal to obtain the spectrum, and then calculating the power spectrum, including: The mean power frequency (MNF) characterizes muscle fatigue. During muscle fatigue, high-frequency components decay more rapidly, leading to a significant decrease in MNF. It is one of the most sensitive frequency domain indicators of fatigue, and its expression is: In the formula, This refers to the nth frequency component in the FFT result; Frequency point The corresponding power spectral density value; This represents the number of positive frequency points. Median Frequency (MDF), expressed as: In the formula, The minimum index required to ensure that the accumulated power reaches 50% of the total power.
[0028] Step 3: Perform unsupervised clustering on the feature vectors to generate prior information, including: Z-score standardization is applied to the time-domain and frequency-domain features of all samples to eliminate differences in the dimensions of each feature; The K-means algorithm is used to partition the standardized feature space; The optimal number of clusters K is determined by the elbow method; in this embodiment, for the elbow flexion task, K=4 can effectively distinguish different fatigue stages.
[0029] For each cluster generated Calculate the mean vector and variance scalar (The average variance of samples within a cluster across each feature dimension). The average energy activation intensity of the fatigue mode represented by the cluster. The degree of discreteness and non-stationarity of signals within a quantization cluster, i.e., the complexity of the signal.
[0030] Prior information of each cluster Persistent storage serves as a guiding knowledge base for the prediction phase.
[0031] Step 4: Construct a dynamic Transformer architecture search space, use Markov Decision Process (MDP) for process modeling, and train and test the controller using training and test sets to obtain the final adaptive model, including: The discretized model architecture configuration search space includes: Encoder depth Embedded Dimension ; Number of heads for multiple attention Feedforward network dimension Activation function .
[0032] The Markov decision process includes: state space The expression is: In the formula, The proportion of normalized cluster means; The normalized cluster variance proportion; The embedding dimension chosen in the previous architectural decision; and Let be the mean vector and variance scalar of the k-th cluster, respectively; To take the maximum value for all clusters; Action space For a specific set of structural parameters selected from the search space ( );in, Select the encoder depth; For the selected embedding dimension; The number of heads selected for multi-head attention; The selected activation function; reward function The expression is: In the formula, This is the mean square error loss; This represents the total number of parameters in the model. It is the natural logarithm; and These are weight hyperparameters; Using training and testing sets, an LSTM network is trained as the architecture controller using a policy gradient algorithm (such as PPO). Training and testing are then performed to obtain the final adaptive model.
[0033] The controller learns based on the input state. (i.e., the cluster feature complexity of the current sample), outputting the architectural action that yields a high reward (i.e., high performance and high efficiency). .
[0034] Step 5: Obtain real-time sEMG signals and combine them with prior information. Using the final adaptive model, obtain the muscle fatigue index, including: After preprocessing the real-time sEMG signal, time-domain and frequency-domain features are extracted to construct feature vectors; Calculate the Euclidean distance between the feature vector and the mean vector of the cluster in the prior information, and concatenate the prior information of the nearest cluster with the feature vector to obtain the enhanced feature vector; The enhanced feature vectors are mapped to a high-dimensional latent space through a linear projection layer to generate an initial embedding representation; The controller receives the current state. ;in, The cluster to which the current sEMG signal most likely belongs is determined by minimum Mahalanobis distance or maximum a posteriori probability. The specific process is as follows: Obtain the preprocessed real-time sEMG signal feature vector at the current moment. Calculate its comparison with offline pre-stored Center of fatigue mode cluster The distance between them.
[0035] To eliminate the influence of different feature dimensions and consider feature correlation, Mahalanobis distance is used for matching, and the determination formula is as follows: In the formula, Represents the real-time feature vector and the first Mahalanobis distance between cluster centers; for real-time extraction. 3D feature vectors (including ARV, RMS, MNF, and MDF); The first one stored for the offline clustering stage The feature mean vector of each cluster; For the first The inverse matrix of the covariance matrix of the characteristic distribution of each cluster.
[0036] The cluster index most likely to belong is determined using the minimum distance criterion. : Sure Then, the controller extracts the normalized mean proportion corresponding to the cluster. and normalized variance ratio As the status input for dynamic search.
[0037] After receiving the state input, the controller outputs the optimal action instantaneously through a continuous-discrete smoothing mapping mechanism. ),include: To avoid due to (Signal complexity) Tiny fluctuations cause frequent jumps in discrete architecture parameters, resulting in depth The smooth mapping expression is: In the formula, For dynamically selected encoder depth; and These are the minimum and maximum permissible depths, respectively. It is a sigmoid activation function; The scaling factor controls the steepness of the Sigmoid function. A complexity threshold determines when to switch depth levels; This is a floor function to obtain the number of discrete layers; The normalized cluster variance proportion.
[0038] To ensure the model width expands smoothly with signal energy, the embedding dimension is... The smooth mapping expression is defined as: In the formula, The embedding dimension is dynamically determined; and These are the minimum dimension (e.g., 128) and the maximum dimension (e.g., 768) in the search space, respectively. This represents the proportion of the normalized mean of the current cluster, reflecting the signal energy. and These are the scaling factor and threshold bias that control the sensitivity of dimension switching, respectively; The step mapping function maps continuous values to the search space. The closest discrete value.
[0039] Due to the number of attention heads It must be divisible by the dimension, and its output is constrained by the embedded dimension: In the formula, A fixed dimension for each attention head; when the energy index trigger When increasing, This allows for simultaneous expansion, thereby enhancing the ability to extract features from multiple subspaces without increasing the computational complexity of a single head.
[0040] To ensure that the nonlinear expressive power matches the signal complexity, the expression for selecting the activation function is: In the formula, The type of activation function to be ultimately selected; The normalized cluster variance ratio reflects the complexity or non-stationarity of the signal. This indicates the switching threshold (e.g., set to 0.6). For conditional judgment logic, when the signal complexity exceeds When needed, it automatically switches to a non-linear expression with stronger capabilities. function.
[0041] The corresponding Transformer encoder is generated based on the optimal action, and the initial embedding representation is processed to obtain a high-dimensional feature vector; The high-dimensional feature vector is input into a decoder with a fixed structure, which includes fully connected layers, normalization layers, and a multilayer perceptron (MLP). Finally, it is mapped to continuous fatigue index prediction values through a linear layer. ,in It indicates no fatigue. It signifies complete exhaustion.
[0042] like Figure 2 As shown, with increasing muscle fatigue, ARV and RMS show a continuous upward trend, while MNF and MDF decrease significantly, reflecting a typical leftward shift in the electromyographic spectrum. This characteristic evolution pattern provides a solid physiological basis for the unsupervised clustering and dynamic architecture decision-making of this invention: the feature distributions corresponding to different fatigue stages differ significantly, making it possible to construct priors based on cluster statistics (such as mean and variance); simultaneously, the degree of feature fluctuation increases with fatigue progression, further confirming the necessity of dynamically adjusting the model capacity to match signal complexity.
[0043] like Figure 3 As shown, in the dimensionality-reduced feature space, sEMG samples with different fatigue levels exhibit a clear clustering structure and a continuous evolution path. As fatigue intensifies, the samples gradually migrate from the lower left corner (low activation, low complexity) to the upper right corner (high activation, high complexity), and their distribution changes from compact to diffuse, reflecting a typical muscle fatigue dynamic process. This visualization not only verifies the effectiveness of unsupervised clustering but also reveals the dynamic change in signal complexity with fatigue development, providing solid data support for the proposed 'dynamic Transformer architecture decision based on cluster statistical prior': that is, when samples are located in high-variance clusters, a higher-capacity model should be automatically activated to cope with non-stationarity, thereby achieving synergistic optimization of accuracy and efficiency.
[0044] To verify the performance of the technical solution of the present invention, a comparison of model decoding under different component removal conditions was conducted, as shown in Table 1.
[0045] According to Table 1, the model of this invention is available in MAE and R. 2 In terms of metrics, it significantly outperforms all ablation variants. In particular, removing cluster features leads to a substantial performance drop, demonstrating the crucial role of statistical priors in improving the model's semantic understanding; while disabling dynamic depth or width both cause a significant increase in error, validating the effectiveness of the architecture's adaptive mechanism. When a fixed Transformer is used entirely, the model fails to capture the dynamic evolution of signal complexity during the fatigue process, and performance degrades to near baseline levels. This indicates that the proposed 'clustering-guided + dynamic configuration' collaborative framework is key to achieving high-precision and high-efficiency muscle fatigue monitoring.
[0046] To verify the performance of this invention and other models on the muscle fatigue prediction task, a comparative experiment was conducted, as shown in Table 2.
[0047] In Table 2, SVR (SupportVectorRegression) is a classic machine learning method that uses kernel functions to map features to a high-dimensional space for regression.
[0048] MEFFNet is a convolutional neural network based on multi-scale feature fusion, which may combine time-frequency domain features (such as wavelets and STFTs).
[0049] Transformer–LSTM–XGBoost is a hybrid model: LSTM handles time series - Transformer enhances attention - XGBoost integrates regression.
[0050] Transformer is a standard Transformer encoder-decoder architecture used for sequence modeling.
[0051] MACNet is a fusion of multi-scale CNNs and attention mechanisms; The CNN-LSTM-Transformer is a three-level hybrid architecture: CNN extracts local features, LSTM models the temporal sequence, and Transformer captures global interactions.
[0052] NAS automatically designs network structures based on Neural Architecture Search, but it is usually a statically optimal architecture (i.e., globally optimal, not sample-level dynamic).
[0053] As shown in Table 2, the model of this invention significantly outperforms existing methods, including traditional machine learning (SVR), deep hybrid models (CNN-LSTM-Transformer), and neural architecture search methods (NAS), in four metrics: MSE, RMSE, MAE, and MAPE. In particular, compared with the current best NAS model, this invention reduces MAE by 17.6% and MAPE by 22.5%, fully demonstrating the superiority of the 'cluster-guided dynamic architecture' strategy in muscle fatigue prediction tasks. This performance improvement stems from two innovations: (1) explicit modeling of statistical priors of sEMG fatigue patterns through unsupervised clustering; and (2) achieving sample-level model capacity adaptation to accurately match signal complexity. Therefore, this invention not only achieves a new level of accuracy but also makes comprehensive breakthroughs in physiological interpretability, computational efficiency, and generalization ability.
[0054] like Figure 4 As shown, the MSE distribution of the generated models is displayed. The results show that more than 80% of the models have an MSE < 0.15, indicating that the architecture controller of this invention can efficiently generate high-performance models and avoid the waste of a large number of inefficient architectures in traditional NAS.
[0055] like Figure 5 As shown, the prediction performance is compared under different cluster complexities. It can be seen that in low-complexity clusters (clusters 1-2), CG-NAS performs similarly to the fixed Transformer; however, in high-complexity clusters (clusters 3-4), CG-NAS significantly outperforms the Transformer, and shows a statistically significant difference in cluster 4 (p<0.05). This fully demonstrates that the present invention, through a dynamic architecture mechanism guided by cluster priors, achieves accurate perception and response to the complexity of sEMG signals, significantly improving prediction accuracy and robustness in challenging scenarios while ensuring computational efficiency.
[0056] In one embodiment, it includes: S1, Subject Recruitment and Experimental Task Design: Ten healthy participants (5 men and 5 women) aged 22 to 30 years were recruited.
[0057] None of the participants had a history of neuromuscular disease, and they were asked to avoid strenuous upper limb exercises for 72 hours prior to the experiment.
[0058] During the experiment, the subjects remained seated with their torsos fixed to the back of the chair to reduce body sway.
[0059] Subjects used their dominant arm to perform tasks.
[0060] Subjects held a dumbbell (the weight was adaptively selected based on individual ability, and the specific value was not specified in the original text) and performed maximum range of motion elbow flexion and extension movements at a self-selected but constant rhythm.
[0061] The exercise continues until the subject is unable to continue performing the standard movements due to muscle fatigue, at which point it is determined to be exhaustion.
[0062] S2, Surface electromyography (sEMG) signal acquisition: Signals were recorded using the DelsysTrigno™ wireless surface electromyography (EMG) acquisition system.
[0063] Electrode placement: Single-channel surface electrodes are attached only to the belly of the biceps brachii muscle.
[0064] The electrodes are precisely placed along the direction of the muscle fibers, and the skin is cleaned with 75% ethanol before application to reduce contact resistance.
[0065] The sampling frequency is set to 2000Hz.
[0066] The total duration of the entire motion process is recorded synchronously for subsequent fatigue tag generation.
[0067] No mechanical sensors (such as force sensors, dynamometers) or maximum spontaneous contraction force (MVC) measuring devices were used.
[0068] S3, sEMG signal preprocessing Preprocessing the raw sEMG signal in the MATLAB environment: First, outlier detection and removal are performed. Then a 4th-order Butterworth bandpass filter is applied. The filter cutoff frequency is set to 20Hz to 500Hz to effectively remove low-frequency motion artifacts, baseline drift, and high-frequency noise (including 50Hz power frequency interference).
[0069] S4. The sliding window method is used to perform segmented analysis on the filtered continuous sEMG signal: The window length is 500 milliseconds; The sliding step size is 375 milliseconds, corresponding to a 25% window overlap rate.
[0070] For the sEMG signal within each window, the following four classic fatigue sensitivity features are calculated to form a 4-dimensional feature vector. ARV (Average Rectified Value); RMS (Root Mean Square); MNF (Mean Frequency); MDF (Median Frequency).
[0071] S5, Generating Ground Truth (Fatigue Labels) No mechanical signals (such as peak force or MVC) were used as monitoring labels.
[0072] Fatigue labels are generated linearly from normalized motion time: Let the total time to exhaustion for the subject to complete the task be... ; For the i-th time window, its corresponding timestamp is ; The true fatigue index of this window is defined as: therefore, It is a variable that changes continuously within the interval [0,1], where: This indicates that the task has just begun and the muscles are not fatigued. This indicates that the task is complete and the muscles have reached complete exhaustion.
[0073] S6, Offline Cluster Analysis and Statistical Prior Construction Perform Z-score normalization (zero-mean, unit-variance normalization) on the 4-dimensional feature vectors of all training set samples.
[0074] The K-means clustering algorithm is used to perform unsupervised clustering on the standardized feature space.
[0075] Analysis of Within-Cluster Sum of Squares (WCSS) as a function of cluster number using the Elbow Method Based on the changing trend, the optimal number of clusters is determined. .
[0076] For each cluster Calculate its statistical properties: Cluster mean vector , representing the central characteristic of the cluster; Cluster variance scalar , is defined as the average variance of all samples in the cluster across the four feature dimensions, i.e.: In the formula, Let be the cluster variance scalar of the k-th cluster; Let j be the set of values for all samples in the k-th cluster across the j-th feature dimensions; Let be the sample variance of the j-th feature within cluster k.
[0077] These 4 sets of statistical priors Storage, used for subsequent guidance of neural architecture searches.
[0078] S7 constructs a dynamic Transformer architecture search space, including: Construct an end-to-end network consisting of an input layer, a dynamic Transformer encoder, and a fixed decoder.
[0079] The encoder consists of up to 5 stacked Transformer blocks, each containing a multi-head self-attention (MSA) network and a feedforward network (FFN).
[0080] The neural architecture search space is defined as follows: Network Depth Level ; Embedded Dimension ; Number of attention heads ; Feedforward network dimensions ; Activation function: based on cluster complexity index Dynamically select ReLU or GELU.
[0081] S8, Cluster-Guided Dynamic Architecture Mapping and Smoothing Mechanism For each input sample, first determine its cluster. .
[0082] Calculate the mean proportion of this cluster. and variance ratio .
[0083] based on and Dynamically determine network hyperparameters: Embedded Dimension and Positive correlation; Network Depth and Positive correlation.
[0084] To avoid due to Small fluctuations cause frequent architectural jumps, so a soft threshold smoothing function is introduced: Among them, experimental setup , .
[0085] S9, Model Training and Validation Configuration Dataset splitting: All data are randomly divided into training set, validation set and test set in a ratio of 70%:20%:10% (split by sample, not by subject).
[0086] Optimizer: Adam, initial learning rate .
[0087] Batch size: 32.
[0088] Reinforcement learning controller: An LSTM network is used as the policy network. The PPO (Proximal Policy Optimization) algorithm is used for training. The reward function is defined as: Training cycle: The architecture search process converges to a stable policy after iterating on the validation set for about 50 epochs.
[0089] S10, model deployment, includes: The optimal dynamic architecture strategy obtained in the search phase is solidified and the final adaptive Transformer prediction model is instantiated.
[0090] The model was finally trained end-to-end using the combined training and validation sets (which together comprised 90%) to optimize all learnable parameters, including attention weights, FFN weights, etc.
[0091] Performance was evaluated on a separate test set (10% of the data): For each test window, perform feature extraction and cluster affiliation determination; The model is based on the statistical prior of the cluster to which it belongs ( Automatically configures the hyperparameters of the Transformer encoder, such as depth and width; Perform forward propagation and output the predicted value of the continuous fatigue index. .
[0092] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0093] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search, characterized in that, include: Acquire labeled surface electromyography (sEMG) signals and preprocess them, dividing the data into training and testing sets; For the preprocessed sEMG signal, a sliding window is used to extract time-domain and frequency-domain features to generate feature vectors; Unsupervised clustering of feature vectors is performed to generate prior information; A dynamic Transformer architecture search space is constructed, a Markov Decision Process (MDP) is used for process modeling, and the controller is trained and tested using training and testing sets to obtain the final adaptive model. Prior information from real-time sEMG signal sets is obtained, and the final adaptive model is used to obtain the muscle fatigue index.
2. The adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search according to claim 1, characterized in that, The time-domain features include: The average rectified value (ARV) is expressed as follows: The root mean square (RMS) expression is: In the formula, Let be the amplitude of the sEMG signal at the i-th sampling point; This determines the number of sampling points within the analysis window.
3. The adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search according to claim 1, characterized in that, The frequency domain characteristics are obtained by performing a fast Fourier transform on the surface electromyography signal to obtain the spectrum, and then calculating the power spectrum, including: The average power frequency MNF is expressed as: In the formula, This refers to the nth frequency component in the FFT result; Frequency point The corresponding power spectral density value; This represents the number of positive frequency points. The median frequency (MDF) is expressed as follows: In the formula, The minimum index required to ensure that the accumulated power reaches 50% of the total power.
4. The adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search according to claim 1, characterized in that, The unsupervised clustering of feature vectors to generate prior information includes: Z-score normalization is applied to the time-domain and frequency-domain features of all samples; The K-means algorithm is used to partition the standardized feature space; Determine the optimal number of clusters K using the elbow method; For each cluster generated Calculate the mean vector and variance scalar .
5. The adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search according to claim 1, characterized in that, The construction of the dynamic Transformer architecture search space includes: Encoder depth Embedded Dimension ; Number of heads for multiple attention Feedforward network dimension Activation function .
6. The adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search according to claim 1, characterized in that, The Markov Decision Process (MDP) is modeled as follows: state space The expression is: In the formula, The proportion of normalized cluster means; The normalized cluster variance proportion; The embedding dimension chosen in the previous architectural decision; and Let be the mean vector and variance scalar of the k-th cluster, respectively; To take the maximum value for all clusters; Action space For a specific set of structural parameters selected from the search space ( );in, Select the encoder depth; For the selected embedding dimension; The number of heads selected for multi-head attention; The selected activation function; reward function The expression is: In the formula, This is the mean square error loss; This represents the total number of parameters in the model. It is the natural logarithm; and For weight hyperparameters.
7. The adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search according to claim 1, characterized in that, The process of training and testing the controller using training and testing sets to obtain the final adaptive model includes: Using training and testing sets, an LSTM network is trained as the architecture controller using the policy gradient algorithm. Training and testing are then performed to obtain the final adaptive model.
8. The adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search according to claim 1, characterized in that, The process of acquiring real-time sEMG signals and combining them with prior information, then using the final adaptive model to obtain the muscle fatigue index, includes: After preprocessing the real-time sEMG signal, time-domain and frequency-domain features are extracted to construct feature vectors; Calculate the Euclidean distance between the feature vector and the mean vector of the cluster in the prior information, and concatenate the prior information of the nearest cluster with the feature vector to obtain the enhanced feature vector; The enhanced feature vectors are mapped to a high-dimensional latent space through a linear projection layer to generate an initial embedding representation; The controller receives the current state. ;in, The cluster to which the current sEMG signal most likely belongs; The controller employs a continuous-discrete smooth mapping to output the optimal action instantaneously. ); The corresponding Transformer encoder is generated based on the optimal action, and the initial embedding representation is processed to obtain a high-dimensional feature vector; The high-dimensional feature vectors are input into a decoder with a fixed structure, and finally mapped to continuous fatigue index prediction values through a linear layer. ,in It indicates no fatigue. It signifies complete exhaustion.
9. The adaptive muscle fatigue prediction method based on clustering guidance and neural architecture search according to claim 1, characterized in that, The controller employs a continuous-discrete smooth mapping to instantaneously output the optimal action. ),include: depth The smooth mapping expression is: In the formula, For dynamically selected encoder depth; and These are the minimum and maximum permissible depths, respectively. It is a sigmoid activation function; Scale factor; This is the complexity threshold; This is a round-down operation; The normalized cluster variance proportion; Embedded Dimension The smooth mapping expression is: In the formula, The embedding dimension is dynamically determined; and These are the minimum and maximum dimensions in the search space, respectively. This represents the proportion of the normalized mean of the current cluster. and These are the scaling factor and threshold bias that control the sensitivity of dimension switching, respectively; It is a ladder mapping function; Number of attention heads The expression is: In the formula, A fixed dimension for each attention head; This is the mapping function from dimension to head count; The selection expression for the activation function is: In the formula, The type of activation function to be ultimately selected; The normalized cluster variance proportion; The switching threshold; This is the conditional judgment logic.