A method and system for classifying and detecting electromyographic signals by combining spiking neural networks and high-dimensional computation

By combining spiking neural networks and hyperdimensional computation to classify electromyographic signals, the problems of insufficient computational cost and robustness of traditional models are solved, achieving low-power and high-efficiency electromyographic signal classification, which is suitable for real-time detection of edge devices.

CN120561683BActive Publication Date: 2026-03-06HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510652217.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2026-03-06
Estimated Expiration
2045-05-20

AI Technical Summary

Technical Problem

Traditional deep learning models suffer from high computational costs, large resource requirements, insufficient robustness, and reliance on large amounts of labeled data in electromyography signal classification, making it difficult to meet the needs of lightweight design, high energy efficiency, and data privacy protection for edge devices.

Method used

A method for classifying electromyographic signals combining spiking neural networks (SNN) and high-dimensional computation (HDC) is proposed. Features are extracted by SNN and mapped to the high-dimensional binary space of HDC for classification. The leakage integral and excitation (LIF) model and random projection matrix are used for feature encoding, and Hamming distance is used for classification.

Benefits of technology

It achieves low-power, real-time, and robust electromyography signal classification, suitable for resource-constrained edge devices, improving classification accuracy and efficiency while reducing computational complexity and energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120561683B_ABST
    Figure CN120561683B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of electromyography (EMG) signal classification and detection technology, and discloses an EMG signal classification and detection method combining SNN and HDC. This invention proposes an EMG signal classification and detection framework combining SNN and HDC, aiming to achieve ultra-low power operation. In this framework, SNN utilizes random untrained weights to perform event-driven feature extraction, thereby minimizing computational overhead; HDC achieves noise-resistant classification through high-dimensional representation. The integration of the two not only achieves energy-efficient real-time detection, but is also particularly suitable for resource-constrained scenarios such as wearable devices. The proposed method achieves an average accuracy of 95% (peak accuracy of 96.44%) in three fatigue recognition tasks, with a training speed 5.7 times faster than one-dimensional convolutional neural networks (1D-CNN) and 45 times faster than five-dimensional long short-term memory networks (5D-LSTM). Even using only 20% of the training data, the method still maintains an accuracy of over 90%, fully demonstrating its efficiency and robustness in practical deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electromyography (EMG) signal classification and detection technology, and particularly relates to an EMG signal classification and detection method and system that combines spiking neural networks and hyperdimensional computation. Background Technology

[0002] Muscle fatigue is a common physiological phenomenon that typically occurs during sustained or repetitive muscle contractions. Its main characteristics include a gradual decline in muscle strength, reduced movement speed, and decreased endurance. This phenomenon is related to a variety of factors, such as depletion of energy reserves, accumulation of metabolic byproducts, and decreased efficiency in nerve impulse transmission. Muscle fatigue not only affects daily activities and work efficiency but may also increase the risk of sports injuries and chronic musculoskeletal diseases. Therefore, accurate identification and assessment of muscle fatigue are crucial for optimizing physical function, preventing health problems, and improving the practical effectiveness of sports medicine, rehabilitation science, and ergonomics.

[0003] Surface electromyography (sEMG) signals, as a non-invasive technique, can effectively measure the electrical activity of muscle motor units. Due to its high sensitivity to changes in muscle state and its real-time, multi-channel characteristics, sEMG signals are of significant value in assessing muscle fatigue. However, with the increasing demand for low-power edge devices in complex applications, traditional processing systems face significant challenges in handling data-intensive tasks related to sEMG signal analysis. These challenges include limited computing resources, high energy consumption, and requirements for real-time performance and robustness.

[0004] In recent years, deep learning-based methods have been widely used in electromyography (EMG) signal classification. Most studies have demonstrated the effectiveness of these methods in EMG signal classification by extracting time-domain and frequency-domain features for model training. However, despite the excellent classification performance of deep learning models, their high computational cost and resource requirements have become major bottlenecks in practical applications. An ideal EMG signal classifier for edge devices needs to meet the following requirements: lightweight design to reduce computational and memory overhead, high energy efficiency to optimize battery life, strong robustness to noise and hardware failures, few-shot learning ability to reduce dependence on labeled data, and local processing capability to ensure data privacy protection. Traditional deep learning models struggle to meet these requirements simultaneously.

[0005] Muscle fatigue, defined here as localized neuromuscular fatigue, can be effectively assessed using surface electromyography (sEMG), a non-invasive biosignaling technique that captures neuromuscular activity. sEMG reflects fatigue by detecting spectral shifts towards higher frequencies during muscle movement, offering the advantage of real-time monitoring compared to invasive biochemical or imaging methods. While alternative methods such as mechanomyography exist, sEMG remains the most mature method for fatigue characterization due to its reliability and minimal signal attenuation.

[0006] EMG signal classification method based on sEMG

[0007] When local muscles are fatigued, significant changes in the time and frequency domain characteristics of surface electromyography (sEMG) signals can be observed. These characteristic changes in sEMG signals have become the focus of many studies on EMG signal classification. However, most existing classification methods rely on a single neural network, which often suffers from high computational complexity and insufficient robustness.

[0008] Wang et al. collected sEMG signals from participants during cycling and used an LSTM network for EMG signal classification. While LSTM performs well in capturing temporal dependencies, its gating mechanism and long-term memory function require more parameters and computational resources, leading to increased computational overhead. X. Wang et al. addressed this issue by dividing the processed EMG signals into seven segments, extracting features, and then applying various algorithms (including nearest neighbor, logistic regression, and support vector machine (SVM)) to achieve three-level fatigue classification. Although SVM achieved the best classification results among these methods, it requires a large amount of space to store training samples and kernel matrices. Furthermore, the computational complexity of SVM increases when dealing with high-dimensional features, resulting in limited robustness. Similarly, Q. Liu et al. proposed an improved whale optimization algorithm combined with SVM to improve the accuracy of dynamic fatigue classification. Despite this optimization, SVM still faces fundamental challenges in terms of computational efficiency and robustness when dealing with high-dimensional data.

[0009] Spiking Neural Network

[0010] Spiking neural networks (SNNs) are computational models that simulate the communication process between neurons in biological nervous systems, differing significantly from traditional artificial neural networks. Traditional neural networks represent and transmit information using continuous values, while SNNs use discrete pulses or spikes at specific points in time as information carriers, more closely resembling how the brain processes information in the real world. This unique working mechanism makes SNNs outstanding in applications requiring low energy consumption and fast response times.

[0011] To more accurately simulate biological neural systems, the Leakage Integral and Activation (LIF) model is employed as one of its fundamental architectures. The LIF model provides a simplified yet effective mathematical description of the behavior of individual neurons. In this model, each neuron acts as a capacitor with leakage characteristics: when the cumulative stimulus signals from other neurons or the external environment reach a certain threshold, the neuron fires a "discharge" event, producing a spike output. After firing, the neuron enters a brief refractory period, during which it does not respond to new stimuli until it recovers. This mechanism not only reflects the fundamental working principle of biological neurons but also enables networks built based on this model to process information with high temporal precision, making them well-suited for tasks requiring strict real-time performance.

[0012] Hyperdimensional computing

[0013] Hyperdimensional computing (HDC) is a computational paradigm inspired by neurons in the brain. Unlike traditional numerical computation, HDC uses high-dimensional vectors to represent data, with dimensions reaching hundreds of thousands or even millions. This representation gives HDC a unique advantage in handling complex pattern recognition and memory tasks.

[0014] Traditional numerical computation typically represents data as scalars or low-dimensional vectors, which suffers from the "curse of dimensionality" when dealing with high-dimensional data. As dimensionality increases, data sparsity rises rapidly, leading to a dramatic increase in computational complexity. High-Dimensionality Conversion (HDC) alleviates this problem by representing data as signal patterns in a high-dimensional space. In HDC, each data item is encoded as a high-dimensional binary vector called a hypervector. These hypervectors typically have a much larger dimension than those used in traditional numerical computation. Hypervectors from the same class are grouped together to form hypervectors of a specific class. To improve accuracy, HDC performs a self-check during the iteration process: misclassified vectors are added to the correct hypervector class, while those initially misclassified are removed. This classification check uses Hamming distance to query the most similar hypervector.

[0015] Based on the above analysis, the problems and shortcomings of the existing technology are as follows:

[0016] While deep learning models excel in classification performance, their high computational cost and resource requirements are major bottlenecks in practical applications. An ideal electromyography (EMG) signal classifier for edge devices needs to meet the following requirements: lightweight design to reduce computational and memory overhead, high energy efficiency to optimize battery life, strong robustness to noise and hardware failures, few-shot learning capability to reduce reliance on labeled data, and local processing capability to ensure data privacy. Traditional deep learning models struggle to simultaneously meet these requirements. Summary of the Invention

[0017] To address the problems existing in the prior art, this invention provides a method for classifying and detecting electromyographic signals by combining SNN and HDC.

[0018] This invention is implemented as follows: a method for classifying and detecting electromyographic signals combining SNN and HDC includes:

[0019] Step 1, Preprocessing;

[0020] Step 2: Use SNN to extract features;

[0021] Step 3, encoding;

[0022] Step 4, train with HDC.

[0023] Furthermore, the preprocessing:

[0024] A 20-350Hz bandpass filter is used to improve signal quality while preserving fatigue-related signal components; a 150-250ms time window is used to balance classification delay and accuracy.

[0025] In terms of feature extraction, time-domain and frequency-domain analysis are combined to capture the non-stationary characteristics of EMG signals; eight clinically significant features are extracted; time-domain features include integral EMG, mean absolute value, and zero crossover rate; frequency-domain features include mean frequency and median frequency; peak frequency and frequency ratio; and wavelet energy.

[0026] Furthermore, the feature extraction using SNN is described as follows:

[0027] A spiking neural network is used as the core feature extractor to extract time-dynamic features from raw electromyography signals; the design of this network integrates the biomimetic characteristics of biological neurons with engineering optimization strategies.

[0028] After the data is loaded into memory, it will be sent to the SNN for processing; the LIF neuron model is used as the core computational unit of the SNN; the membrane potential V of the LIF neuron (t) It evolves according to the following differential equation:

[0029]

[0030] Where τ is the membrane time constant, I (t) Indicates the synaptic input current; when V (t) When the threshold is exceeded, the neuron emits a pulse, and the membrane potential is reset to the baseline value V. rest After discretization, the membrane potential update rule becomes...

[0031] In the formula, τ controls the potential decay rate, W∈R N×M The weight matrix of the fully connected layer is given by input X.[t] The signal is the electromyographic signal after standardization and row-level normalization; when the membrane potential exceeds the threshold V th At this time, the neuron triggers a pulse, resetting the potential to the resting state; this mechanism simulates the action potential firing process of biological neurons, converting continuous signals into sparse pulse sequences; it captures the instantaneous muscle activation patterns of electromyographic signals, repeatedly inputting the data into the SNN at T time steps; and outputs a pulse s for each time step. [t] ∈{0,1} M Accumulate the results and calculate the average distribution rate:

[0032]

[0033] eigenvectors F∈R M Each element represents the activation frequency of the corresponding neuron within the time window, compressing dynamic impulse activity into static statistics;

[0034] SNNs use arctangent instead of gradient to achieve end-to-end training:

[0035]

[0036] This function provides a smooth gradient approximation near the pulse trigger point (x=0) so that the error can be updated by the standard backpropagation algorithm for the weight matrix W; the weights are initialized using a Gaussian distribution with a mean of 0 and a standard deviation of 1.

[0037] Furthermore, the encoding:

[0038] The encoding module maps the spatiotemporal features extracted by the SNN hidden layer to a high-dimensional binary space suitable for HDC; let the feature vector output by the SNN hidden layer be f∈R. H Where H is the dimension of the hidden layer, and the random projection matrix W∈{-1,+1} is used. H×D (where D is the dimension of the hyperspace) Perform a linear transformation:

[0039] hV=f·W#(5)

[0040] Furthermore, the training using HDC is described as follows:

[0041] The training process consists of two main phases: encoding and hyperdimensional classification;

[0042] Phase 1 (Hyperdimensional Encoding): During training, the SNN extracts feature vectors f∈R. H Through random projection matrix W∈{-1,+1} H×D Mapped to D-dimensional hyperspace:

[0043] hv=f·W∈R D #(6)

[0044] The projection result is binarized using a sign function to generate a hyperdimensional vector H∈{-1,+1}. D :

[0045] H = sign(h)#(7)

[0046] The second stage (hyperdimensional classification): During training, the system accumulates hyperdimensional vectors of the same class into the corresponding class prototype based on the sample labels.

[0047]

[0048] Where C k ∈Z D Let be the prototype vector of class k.

[0049] Another object of the present invention is to provide an electromyography signal classification and detection system combining SNN and HDC, comprising:

[0050] The preprocessing module is used to extract k types of time-domain and frequency-domain features from the original signal.

[0051] The SNN feature extraction module is used to dynamically process these features over time for spiking neural layers with leakage integrals and excitation neurons;

[0052] The encoding module is used to map the spatiotemporal features extracted by the SNN hidden layer to a high-dimensional binary space suitable for HDC.

[0053] The training module is used to encode impulse patterns into D-dimensional supervectors through binding operations, and then perform classification and testing based on Hamming distance according to a pre-trained prototype, where the system verifies and evaluates the classification robustness under signal changes.

[0054] Another object of the present invention is to provide a computer device including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the electromyography signal classification and detection method combining SNN and HDC.

[0055] Another object of the present invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the electromyography signal classification and detection method combining SNN and HDC.

[0056] Another objective of this invention is to provide an information data processing terminal for implementing the electromyography signal classification and detection system combining SNN and HDC.

[0057] Based on the above technical solutions and the technical problems solved, please analyze the advantages and positive effects of the technical solution to be protected by this invention from the following aspects:

[0058] First, emerging neuromorphic computing models offer a highly promising solution. These models can perform complex computational tasks with ultra-low power consumption, making them particularly suitable for edge computing scenarios. Furthermore, this invention addresses the core problems of traditional deep learning models in electromyography signal classification, such as high computational cost, large resource requirements, insufficient robustness, and reliance on large amounts of labeled data. By combining with edge computing, neuromorphic models can achieve local data processing, reduce dependence on cloud computing, enhance data privacy protection, and significantly reduce overall energy consumption.

[0059] In the preprocessing stage, a combined optimization of 20-350Hz bandpass filtering and a 150-250ms time window effectively suppresses noise while preserving fatigue-related signal components, resolving the trade-off between signal fidelity and computational delay inherent in traditional methods. A multi-domain feature extraction strategy integrates eight clinical features, including time-domain integral EMG, zero-crossing rate, frequency-domain median frequency, and wavelet energy, overcoming the limitations of single-domain analysis in representing non-stationary electromyographic signals and providing more discriminative feature primitives for subsequent processing.

[0060] Among them, spiking neural networks (SNNs) and high-dimensional computing (HDCs) exhibit unique advantages: SNNs achieve efficient and energy-saving computation through event-driven processing and temporal information encoding, while HDCs excel at robust pattern recognition using high-dimensional distributed representations. Unlike the continuous computation paradigm of traditional artificial neural networks, the bio-inspired architecture of SNNs enables them to efficiently process temporal and sparse signals, making them particularly suitable for processing dynamic data such as electromyographic signals.

[0061] This invention proposes an electromyography (EMG) signal classification and detection framework combining SNN and HDC, aiming to achieve ultra-low power operation. In this framework, SNN utilizes random, untrained weights to perform event-driven feature extraction, thereby minimizing computational overhead; HDC achieves robust classification through high-dimensional representation. The integration of these two technologies not only enables energy-efficient real-time detection but is also particularly suitable for resource-constrained scenarios such as wearable devices.

[0062] To validate the effectiveness of the framework, experiments were conducted on a self-collected biceps fatigue dataset and public datasets. Experimental results show that the proposed method achieves an average accuracy of 95% (peak accuracy of 96.44%) across three fatigue recognition tasks, with training speeds 5.7 times faster than one-dimensional convolutional neural networks (1D-CNN) and 45 times faster than five-dimensional long short-term memory networks (5D-LSTM). Notably, even using only 20% of the training data, the method maintains an accuracy rate exceeding 90%, demonstrating its efficiency and robustness in practical deployments.

[0063] The main contributions of this invention are as follows:

[0064] 1. Compared with traditional models, the proposed Deep Spike Neural Network (DSN) combining SNN and HDC achieves a classification accuracy of 95.31% in 1.25 seconds, which is 5.7 times faster than 1D-CNN (7.16 seconds) and 45.2 times faster than LSTM (56.51 seconds) in three-class tasks. At the same time, it achieves an accuracy of 98.53% in binary classification tasks, which is comparable to the peak performance of LSTM.

[0065] 2. Unlike most studies that focus only on a single stage of fatigue, the method of this invention employs a data extraction strategy that tracks the entire fatigue process from relaxation to exertion. This comprehensive analytical approach significantly improves the accuracy and efficiency of the assessment while ensuring the reliability of the study.

[0066] 3. Compared with traditional deep learning models, the DSN method of this invention uses a single-layer SNN with random weights as the feature extractor for the HDC layer, avoiding the complex weight training process and significantly reducing computational complexity and energy consumption. This characteristic makes it particularly suitable for real-time electromyography signal classification and detection on resource-constrained embedded systems and edge devices.

[0067] 4. By segmenting multi-channel electromyography (EMG) signal data into equal-length segments and performing feature extraction and classification on each segment, the robustness and classification accuracy of the model are further improved. This multi-segment feature processing method can more comprehensively reflect the dynamic changes of muscle fatigue, especially in complex and diverse motion environments.

[0068] The electromyography (EMG) signal classification framework combining SNN and HDC proposed in this invention shows significant advantages in accuracy, efficiency, and energy consumption, providing an efficient and reliable solution for real-time EMG signal analysis in wearable devices and edge computing scenarios.

[0069] Secondly, the architecture of this invention can provide low-cost intelligent monitoring technology for wearable medical and health fields or muscle monitoring devices. It can also facilitate the development of medical-grade electromyography (EMG) diagnostic patches, utilizing real-time muscle fatigue analysis capabilities to expand into the fitness market and achieve deployment on domestically produced hardware.

[0070] Internationally, existing electromyography (EMG) classification technologies have long been plagued by low accuracy, high power consumption, and poor robustness. While traditional SNN schemes offer low power consumption (e.g., Intel Loihi chips), they are limited by insufficient spatiotemporal feature extraction capabilities and are susceptible to interference. While HDC, when used alone, possesses noise resistance, it cannot effectively handle the dynamic changes in EMG signals. This invention achieves a deep fusion of SNN feature extraction and HDC hyperdimensional computational classification, achieving an average accuracy of 95% on real-world datasets. Attached Figure Description

[0071] Figure 1 This is a flowchart of the electromyography signal classification and detection method combining SNN and HDC provided in the embodiments of the present invention.

[0072] Figure 2 This is a block diagram of the electromyography signal classification and detection system combining SNN and HDC provided in an embodiment of the present invention.

[0073] Figure 3 This is the algorithm structure design diagram provided in the embodiment of the present invention.

[0074] Figure 4 This is a graph showing the accuracy variation of different data volumes under different noise probabilities, provided by an embodiment of the present invention.

[0075] Figure 5 This is a graph showing the accuracy changes of different models provided in the embodiments of the present invention under different bit error rates. Detailed Implementation

[0076] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0077] like Figure 1 As shown, an embodiment of the present invention provides a method for classifying and detecting electromyographic signals by combining SNN and HDC, comprising the following steps:

[0078] S101, Preprocessing;

[0079] S102, using SNN to extract features;

[0080] S103, encoding;

[0081] S104, trained using HDC.

[0082] 1. In the preprocessing stage, this method first uses a bandpass filter (passband range 20-350Hz) to filter the raw electromyography (EMG) signal to eliminate low-frequency baseline drift and high-frequency noise interference, while retaining mid-to-high frequency components closely related to muscle fatigue and contraction activity. Subsequently, the filtered signal is segmented according to a time window of 150-250 milliseconds to minimize classification delay while ensuring the integrity of signal features, thus meeting the requirements of real-time detection.

[0083] 2. Regarding feature extraction, this method comprehensively considers the non-stationary characteristics of electromyography (EMG) signals, combining time-domain and frequency-domain analysis to extract eight clinically significant features. Time-domain features include integral EMG, mean absolute value, and zero-crossing rate, used to measure muscle activity intensity and periodic changes; frequency-domain features select parameters such as mean frequency, median frequency, peak frequency, and frequency ratio to characterize the signal's spectral distribution and energy concentration. Furthermore, wavelet transform can characterize the transient features of the signal at multiple scales, providing richer feature representations for subsequent classification.

[0084] 3. The extracted multidimensional feature vectors are then subjected to deep encoding and feature enhancement using a spiking neural network (SNN). The SNN captures the dynamic changes in electromyographic signals by leveraging the temporal characteristics of pulse firing, mapping continuous feature vectors to pulse sequences and preserving key information of the electromyographic signal through sparse firing in the time domain. The core of this stage is to utilize membrane potential updates and synaptic plasticity mechanisms to achieve adaptive learning of the input signal, thereby improving robustness to noise and variability and compressing redundant features.

[0085] 4. The final step employs high-dimensional computation (HDC) to train and classify the feature sequences processed by the SNN. HDC maps features to a high-dimensional space, encodes the feature patterns corresponding to the pulse sequences into hypervectors, and distinguishes different categories based on vector operations. Compared with traditional low-dimensional classification methods, HDC is more tolerant of slight feature perturbations in high-dimensional space and can achieve stable classification performance with fewer training samples, thus effectively improving the robustness of electromyography signal classification and detection.

[0086] Preprocessing provided in this embodiment of the invention:

[0087] A 20-350Hz bandpass filter is used to improve signal quality while preserving fatigue-related signal components; a 150-250ms time window is used to balance classification delay and accuracy.

[0088] In terms of feature extraction, time-domain and frequency-domain analysis are combined to capture the non-stationary characteristics of EMG signals; eight clinically significant features are extracted; time-domain features include integral EMG, mean absolute value, and zero crossover rate; frequency-domain features include mean frequency and median frequency; peak frequency and frequency ratio; and wavelet energy.

[0089] This invention provides an embodiment of using SNN to extract features:

[0090] A spiking neural network is used as the core feature extractor to extract time-dynamic features from raw electromyography signals; the design of this network integrates the biomimetic characteristics of biological neurons with engineering optimization strategies.

[0091] After the data is loaded into memory, it will be sent to the SNN for processing; the LIF neuron model is used as the core computational unit of the SNN; the membrane potential V of the LIF neuron (t) It evolves according to the following differential equation:

[0092]

[0093] Where τ is the membrane time constant, I (t) Indicates the synaptic input current; when V (t) When the threshold is exceeded, the neuron emits a pulse, and the membrane potential is reset to the baseline value V. rest After discretization, the membrane potential update rule becomes...

[0094] In the formula, τ controls the potential decay rate, W∈R N×M The weight matrix of the fully connected layer is given by input X. [t] The signal is the electromyographic signal after standardization and row-level normalization; when the membrane potential exceeds the threshold V th At this time, the neuron triggers a pulse, resetting the potential to the resting state; this mechanism simulates the action potential firing process of biological neurons, converting continuous signals into sparse pulse sequences; it captures the instantaneous muscle activation patterns of electromyographic signals, repeatedly inputting the data into the SNN at T time steps; and outputs a pulse s for each time step. [t] ∈{0,1} M Accumulate the results and calculate the average distribution rate:

[0095]

[0096] eigenvectors F∈R M Each element represents the activation frequency of the corresponding neuron within the time window, compressing dynamic impulse activity into static statistics;

[0097] SNNs use arctangent instead of gradient to achieve end-to-end training:

[0098]

[0099] This function provides a smooth gradient approximation near the pulse trigger point (x=0) so that the error can be updated by the standard backpropagation algorithm for the weight matrix W; the weights are initialized using a Gaussian distribution with a mean of 0 and a standard deviation of 1.

[0100] The encoding provided in this embodiment of the invention:

[0101] The encoding module maps the spatiotemporal features extracted by the SNN hidden layer to a high-dimensional binary space suitable for HDC; let the feature vector output by the SNN hidden layer be f∈R. H Where H is the dimension of the hidden layer, and the random projection matrix W∈{-1,+1} is used. H×D (where D is the dimension of the hyperspace) Perform a linear transformation:

[0102] hV=f·W#(5).

[0103] The HDC training provided in this embodiment of the invention:

[0104] The training process consists of two main phases: encoding and hyperdimensional classification;

[0105] Phase 1 (Hyperdimensional Encoding): During training, the SNN extracts feature vectors f∈R. H Through random projection matrix W∈{-1,+1} H×D Mapped to D-dimensional hyperspace:

[0106] hv=f·W∈R D #(6)

[0107] The projection result is binarized using a sign function to generate a hyperdimensional vector H∈{-1,+1}. D :

[0108] H = sign(h)#(7)

[0109] The second stage (hyperdimensional classification): During training, the system accumulates hyperdimensional vectors of the same class into the corresponding class prototype based on the sample labels.

[0110]

[0111] Where C k ∈Z D Let be the prototype vector of class k.

[0112] like Figure 2 As shown, an embodiment of the present invention provides an electromyography signal classification and detection system combining SNN and HDC, comprising:

[0113] The preprocessing module is used to extract multi-domain features from the original signal and generate an N-dimensional feature vector for each sample;

[0114] The SNN feature extraction module is used to dynamically process these features over time for spiking neural layers with leakage integrals and excitation neurons;

[0115] The encoding module is used to map the spatiotemporal features extracted by the SNN hidden layer to a high-dimensional binary space suitable for HDC.

[0116] The training module is used to encode impulse patterns into D-dimensional supervectors through binding operations, and then perform classification and testing based on Hamming distance according to a pre-trained prototype, where the system verifies and evaluates the classification robustness under signal changes.

[0117] The raw electromyography (sEMG) signal is first preprocessed using a bandpass filter (typical bandwidth 20–450 Hz) to remove baseline drift and power frequency interference. Then, the signal is windowed (e.g., a 200 ms sliding window with 50% overlap). Within each time window, statistical features are extracted in the time domain (e.g., root mean square value RMS, zero crossover rate ZC), frequency domain (e.g., mean frequency MNF, power spectral density PSD), and time-frequency domain (e.g., short-time Fourier transform or wavelet packet energy). This constructs a multi-domain feature vector set of dimension N, which serves as the starting point for encoding the SNN input space.

[0118] The aforementioned N-dimensional feature vectors are mapped to Spike trains and input into the SNN model. The spiking neural network uses Leaky Integrate-and-Fire (LIF) neurons as the basic computational units, combined with time coding mechanisms (such as Latency Coding or Population Rate Coding) to achieve temporal serialization of features. After activation by static mapping or Poisson coding in the input layer, event-driven dynamic features across time scales are extracted through multiple layers of spiking convolutions or fully connected layers. Finally, a spatiotemporally coupled neural activity pattern is formed in the hidden layer, reflecting the temporal dependence and amplitude variations in electromyographic signals.

[0119] The temporal patterns output from the SNN hidden layers are reduced within a time window, and then transformed into sparse or binary high-dimensional vectors using a high-dimensional mapping function (such as based on random projection or orthogonalization transformation). Through binding and bundling operations of HDC, multiple time segments are encoded into D-dimensional supervectors based on the temporal structure and class labels of the signal. Hadamard multiplication or XOR operations in HD space are used to enhance the distributed representation between features, avoiding the impact of local perturbations on the overall representation.

[0120] During the inference phase, the system uses the class prototype vectors trained in HDC as the matching benchmark. For each test sample, a hypervector is generated, and approximate nearest neighbor classification is performed by calculating Hamming distance or cosine similarity with the prototype set. This process requires no backpropagation or gradient optimization, exhibiting high interpretability and low computational resource consumption. The system further introduces signal perturbations (such as EMG intensity fluctuations and noise injection) for robustness verification, demonstrating its stable classification performance under low signal-to-noise ratio conditions.

[0121] Specific implementation of the present invention:

[0122] 1. DSN architecture for EMG signal classification

[0123] The proposed DSN architecture for fatigue classification in EMG consists of four core modules, such as... Figure 1 As shown, the preprocessing module extracts multi-domain features from the original signal, generating an N-dimensional feature vector for each sample; SNN feature extraction, where the spiking neural layer with leakage integral and excitation neurons dynamically processes these features over time; in the training module, the spiking pattern is encoded into a D-dimensional supervector through binding operations, and then classification and testing are performed based on the pre-trained prototype using Hamming distance, where the system verifies and evaluates the classification robustness under signal variations.

[0124] Figure 3 Algorithm Structure Design. The proposed framework integrates a spiking neural network (SNN) for spatiotemporal feature extraction and high-dimensional computation to achieve efficient classification. The SNN captures dynamic EMG patterns through bio-inspired pulse coding, while the HDC maps features to a high-dimensional space for classification.

[0125] 1.1 Preprocessing

[0126] Electromyography (EMG) signals have wide applications in various fields such as prosthetic control and human-computer interaction. To effectively classify these signals, meticulous signal preprocessing and feature extraction are required. A 20-350Hz bandpass filter was employed to improve signal quality while preserving fatigue-related signal components. Furthermore, a time window of 150-250 milliseconds was used to balance classification latency and accuracy.

[0127] In terms of feature extraction, time-domain and frequency-domain analysis were combined to capture the non-stationary characteristics of EMG signals. Eight clinically significant features were extracted. Time-domain features included integral EMG and mean absolute value (for quantifying signal strength) and zero crossover rate (for approximating frequency content). Frequency-domain features included mean frequency and median frequency (for monitoring spectral changes and indicating fatigue status); peak frequency and frequency ratio (for capturing neuromuscular adaptation); and wavelet energy (providing information for time-frequency analysis).

[0128] IEMG and MAV reflect increased muscle activation intensity, while MNF and MDF capture progressive spectral compression. Their complementary trends validate the ability of multi-domain methods to characterize fatigue dynamics, providing discriminative input for subsequent SNN-based feature extraction and HDC classification. This set of features addresses the inherent non-stationarity of EMG signals, demonstrating significant advantages over single-domain methods.

[0129] 1.2 Using SNN to extract features

[0130] This paper employs a spiking neural network (SNN) as the core feature extractor, whose main task is to extract time-dynamic features from raw electromyography (EMG) signals. The design of this network integrates the biomimetic characteristics of biological neurons with engineering optimization strategies, aiming to efficiently capture the time-varying characteristics of EMG signals.

[0131] After the data is loaded into memory, it will be sent to the SNN for processing. The LIF neuron model is used as the core computational unit of the SNN. The membrane potential V of the LIF neuron... (t) It evolves according to the following differential equation:

[0132]

[0133] Where τ is the membrane time constant, I (t) This represents the synaptic input current. When V (t) When the threshold is exceeded, the neuron emits a pulse, and the membrane potential is reset to the baseline value V. rest After discretization, the membrane potential update rule becomes...

[0134] In the formula, τ controls the potential decay rate, W∈R N×M The weight matrix of the fully connected layer is given by input X. [t] This is the electromyographic signal after standardization and row-level normalization. When the membrane potential exceeds the threshold V... th At this time, the neuron triggers a pulse, resetting the potential to the resting state. This mechanism mimics the action potential firing process of biological neurons, converting a continuous signal into a sparse pulse sequence. To capture the transient muscle activation patterns of electromyographic signals, the input data is repeatedly input into the SNN at T time steps. For each time step, a pulse s is output. [t] ∈{0,1} M Accumulate the results and calculate the average distribution rate:

[0135]

[0136] eigenvectors F∈R MEach element represents the activation frequency of the corresponding neuron within a time window, compressing dynamic impulse activity into static statistics. This design not only preserves the temporal characteristics of muscle contraction (such as burst activation and relaxation cycles) but also provides dimensionally regular inputs for subsequent classifiers.

[0137] To overcome the non-differentiability of the impulse function, SNNs use the arctangent instead of the gradient to achieve end-to-end training:

[0138]

[0139] This function provides a smooth gradient approximation near the impulse trigger point (x=0) so that the error can update the weight matrix W using the standard backpropagation algorithm. The weights are initialized using a Gaussian distribution with a mean of 0 and a standard deviation of 1 to ensure diversity of initial responses and stability of training.

[0140] 1.3 Encoding

[0141] The encoding module maps the spatiotemporal features extracted by the SNN hidden layer to a high-dimensional binary space suitable for HDC. Let the feature vector output by the SNN hidden layer be f∈R. H (where H is the dimension of the hidden layer), using the random projection matrix W∈{-1, +1} H×D (where D is the dimension of the hyperspace) Perform a linear transformation:

[0142] hV=f·W#(5)

[0143] To enhance robustness to noise and achieve energy-efficient bitwise operations, a sign function is used to binarize the projection vectors. The random projection matrix W is fixed during training, eliminating backpropagation overhead while ensuring approximate orthogonality between different feature maps. This is a key property for achieving HDC error recovery. Through this encoding scheme, the temporal dynamics of SNN spike capture are embedded into stable geometric relationships within a hyperdimensional space, allowing subsequent HDC classifiers to perform efficient similarity-based inference via hardware-friendly XOR operations.

[0144] 1.4 Training with HDC

[0145] This paper implements the EMG signal classification task through HDC training. The core idea is to combine symbolic computation in high-dimensional space with biomimetic feature extraction from SNN to construct an efficient and robust classifier. The training process consists of two main stages: encoding and high-dimensional classification.

[0146] Phase 1 (Hyperdimensional Encoding): During training, the SNN extracts feature vectors f∈R. H Through random projection matrix W∈{-1,+1} H×D Mapped to D-dimensional hyperspace:

[0147] hv=f·W∈R D #(6)

[0148] The projection result is binarized using a sign function to generate a hyperdimensional vector H∈{-1,+1}. D :

[0149] H = sign(h)#(7)

[0150] Binarization not only compresses storage space but also enhances the model's robustness to noise, making it suitable for deployment on resource-constrained edge devices. Electromyographic signals exhibit significant individual variability and noise interference; hyperdimensional encoding, through randomness and sign operations in high-dimensional space, constructs feature representations insensitive to distribution shifts.

[0151] The second stage (hyperdimensional classification): During training, the system accumulates hyperdimensional vectors of the same class into the corresponding class prototype based on the sample labels.

[0152]

[0153] Where C k ∈Z D Let be the prototype vector of class k. The essence of the accumulation mechanism is to construct class centroids in high-dimensional space, enhance the common features of similar samples, and amplify the differences between different samples.

[0154] During the testing phase, the hyperdimensional vector f of the input sample... n By using Hamming distance and the prototypes of each class C k Perform matching and categorization.

[0155] The dot product operation is equivalent to calculating the similarity between two vectors. The greater the similarity, the higher the degree of matching between the sample and the category. Hamming distance matching is implemented through bitwise operations, which is computationally efficient and suitable for real-time classification tasks. The sign operation of HDC and Hamming distance matching not only ensures classification accuracy but also greatly reduces computational complexity, meeting the real-time requirements of wearable devices.

[0156] I. Specific application areas or related products of this invention.

[0157] This invention has broad applicability in the medical and health field, particularly for intelligent interaction and physiological state monitoring based on surface electromyography (EMG) signals. This technology can be integrated into intelligent muscle monitoring systems, enabling real-time monitoring and control of muscle activity through multi-degree-of-freedom analysis, helping users regain fine motor skills. It can also be applied to wearable rehabilitation monitoring devices, dynamically tracking muscle fatigue and providing real-time feedback for exercise rehabilitation training, assisting clinicians in optimizing treatment plans. Furthermore, this technology can be extended to the field of implantable medical devices, achieving long-term acquisition and accurate analysis of neuromuscular signals through miniaturized design, providing low-power solutions for various complex monitoring scenarios. The lightweight architecture and anti-interference characteristics of this technology further support diverse applications in sports and health monitoring, human-computer interaction interfaces, and telemedicine, demonstrating multi-dimensional technological value from clinical medicine to daily health management.

[0158] II. Evidence related to the technical effects obtained by the embodiments of the present invention.

[0159] The technical effectiveness of this invention is fully verified by the following comparative experimental data: Compared with current mainstream electromyography signal classification methods, this scheme demonstrates significant advantages in both accuracy and efficiency. In terms of classification performance, this method (DSN) achieves an accuracy of 95.31% in a three-class classification task, significantly outperforming the 82.3% of the LSTM model and the 91.96% of SVM, and comparable to the top-tier LSTM level of 98.53% in a two-class classification scenario. Regarding computational efficiency, this method achieves over 95% classification accuracy in 1.25 seconds of computation time, a 5.7-fold speedup compared to CNN's 7.16 seconds, and a 45-fold improvement over LSTM's 56.51 seconds for three-class classification. The hardware adaptability advantages are reflected in the following: the number of model parameters is compressed to 1 / 3 of the CNN solution (requiring only 3.072 million matrix operations), and the computational complexity is reduced to 20.3% of CNN (15,154,176 FLOPs → 3,072,000 computations), while maintaining real-time performance comparable to traditional machine learning methods such as Random Forest (RF) and XGBoost (1.25 seconds vs. RF / XGBoost, though not explicitly stated, but of the same order of magnitude). These data confirm that this solution achieves a substantial reduction in algorithm complexity while maintaining high accuracy, providing key technical support for the embedded deployment of wearable medical devices.

[0160]

[0161] Robustness analysis ensures that a neural network maintains a stable output when the input data undergoes small changes. Typically, if bits in a floating-point number are flipped, the resulting numerical error can grow exponentially.

[0162] In this experiment, the present invention systematically changes the hypervector dimension for multiple values ​​D and introduces different noise levels into the hypervector. The present invention trains a model for each dimension and evaluates its accuracy as the noise level increases. Figure 4 As shown, the results reveal a clear trend: the robustness of high-dimensional hypervectors to noise is significantly improved.

[0163] For example, when D = 6000, even with 40% of the elements flipped, the model still maintains an accuracy of 90.12%, only a 5.18% decrease from the noise-free baseline. In contrast, the accuracy of low-dimensional hypervectors (e.g., D = 1000) decreases more significantly with increasing noise, dropping to 72.55% at 40% noise. This demonstrates that the neural network of this invention is highly robust and has a high tolerance for hardware errors.

[0164] Bit error rate (BER) is a key metric that quantifies the reliability of a data transmission or storage system by measuring the ratio of erroneous bits to the total number of bits processed. In emerging computing technologies such as resistive random access memory and other non-volatile memories, BER is a common challenge due to inherent hardware limitations, low-voltage operation, or environmental noise. These bit-level errors can significantly degrade the performance of machine learning models, especially when applied to sensitive tasks such as classification.

[0165] To investigate the impact of bit error rate (BER) on various neural network architectures, this invention introduces simulated BER into the data and model parameters to accurately replicate challenging real-world scenarios where BER constitutes a significant operational factor. This approach allows the invention to create controlled test conditions while maintaining experimental validity.

[0166] This invention compares performance with different classifiers and evaluates it across a range of BER levels, starting from a severe error condition (0.8) and gradually progressing to near-optimal levels (0.0001). The results are as follows: Figure 5 As shown. The method of the present invention maintains high accuracy at all BER levels, especially under low to medium BER conditions, while the combination of SNN with MLP and SNN with VAE shows higher sensitivity to bit errors, especially at higher BER levels.

[0167] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.

[0168] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for detecting the classification of electromyographic signals combining SNN and HDC, characterized in that, The method comprises the following steps: Step 1: preprocessing, performing 20-350Hz band-pass filtering on the electromyographic signal, and segmenting in a time window of 150-250 milliseconds; Step 2: extracting features using SNN, simultaneously extracting feature vectors including integral EMG, average absolute value, zero-crossing rate, average frequency, median frequency, peak frequency, frequency ratio, and wavelet energy from the filtered and segmented electromyographic signal from the time domain and the frequency domain, and inputting the feature vectors into a spiking neural network SNN for time sequence coding; Step 3: coding, performing feature representation on the pulse sequence processed by SNN; Step 4: training with HDC, mapping the feature representation to a high-dimensional vector space, and using a high-dimensional HDC method to classify and identify different action categories or muscle activity patterns; The coding comprises: The coding module maps the spatiotemporal features extracted by the SNN hidden layer to a high-dimensional binary space suitable for HDC; Let the feature vector of SNN hidden layer output be where H is the dimension of hidden layer, and a random projection matrix is used to perform linear transformation, and D is the dimension of hyper-dimensional space: The HDC training comprises: The training process is divided into two main stages: coding and hyper-dimensional classification; The first stage is hyper-encoding: During the training process, the feature vectors extracted by the SNN are mapped to a D-dimensional hyper-sphere by a random projection matrix into a D-dimensional hyper-sphere: The projection result is binarized by using a sign function to generate a hyperdimensional vector : The second stage is hyper-dimensional classification: during the training process, the system accumulates hyper-dimensional vectors of the same class into the corresponding class prototype according to the sample label: wherein is a prototype vector of the class .

2. The electromyographic signal classification detection method of claim 1, wherein, The band-pass filter used in step 1 is used to remove the low-frequency baseline drift and high-frequency noise of the electromyographic signal, and the time window of 150-250 milliseconds is used to balance the classification delay and feature integrity, and in step 2, the key features of the non-stationary electromyographic signal are obtained by combining time domain and frequency domain analysis, thereby improving the robustness of the subsequent SNN and HDC combined classification.

3. The method of claim 1, wherein the SNN and HDC are combined. The SNN feature extraction comprises: The pulse neural network is used as the core feature extractor to extract time dynamic features from the original electromyographic signal; The design of the network combines the biomimetic characteristics of biological neurons and engineering optimization strategies; After the data is transmitted into the memory, it will be sent to the SNN for processing; The LIF neuron model is adopted as a core computing unit of the SNN; the membrane potential of the LIF neuron evolves according to the following differential equation: evolves according to the following differential equation: where is the membrane time constant, denotes the synaptic input current; when exceeds a predefined threshold, the neuron emits a spike, and the membrane potential is reset to a baseline value After discretization, the membrane potential update rule becomes: In the formula, Controlling the potential decay rate, is the weight matrix of the full connection layer, the input is the electromyographic signal after standardization and row-level normalization; when the membrane potential exceeds the threshold , the neuron triggers a pulse, and the potential is reset to the resting state; This mechanism simulates the action potential discharge process of biological neurons to convert continuous signals into sparse pulse sequences; capture the instantaneous muscle activation pattern of the electromyographic signal, input data to repeat input SNN at a time step; Pulse output for each time step Accumulate, compute average firing rate: eigenvector each element of the eigenvector represents the activation frequency of the corresponding neuron in the time window, compressing the dynamic spike activity into a static statistic SNN uses arctangent instead of gradient to realize end-to-end training: This function provides a smooth approximation of the gradient near the impulse trigger point x = 0 so that the error updates the weight matrix by the standard backpropagation algorithm ; the weights are initialized using a Gaussian distribution with mean 0 and standard deviation 1.

4. A system for implementing the SNN and HDC combined myoelectric signal classification method according to any one of claims 1 to 3, characterized in that, The electromyographic signal classification and detection system combining SNN and HDC comprises: A preprocessing module for extracting multi-domain features from the original signal and generating an N-dimensional feature vector for each sample; An SNN feature extraction module for a pulse neural layer with leaky integration and excitation neurons to process these features through time dynamics; An encoding module for mapping the spatiotemporal features extracted by the SNN hidden layer to a high-dimensional binary space suitable for HDC; A training module for encoding pulse patterns into D-dimensional hyper-vectors through binding operations, and then performing classification and testing based on Hamming distance according to the pre-trained prototype, wherein the system verifies the classification robustness under signal changes.

5. A computer device, comprising: The computer device comprises a memory and a processor, and the memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the electromyographic signal classification and detection method combining SNN and HDC according to any one of claims 1-3. 6.A computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor, causes the processor to perform the steps of the method for classification and detection of myoelectric signals combining SNN and HDC according to any one of claims 1-3.

7. An information data processing terminal, characterized by The information data processing terminal is configured to implement the system for classification and detection of myoelectric signals combining SNN and HDC according to claim 4.

Citation Information

Patent Citations

  • Realization method of lightweight super-dimensional calculation classification model

    CN114997312A

  • Low-training-burden myoelectricity mode recognition method and system based on spiking neural network

    CN116138794A