Exoskeleton position prediction and closed loop step control system and method
By integrating electromyography signal acquisition, neural network inference, and closed-loop control within a single chip, high-precision, low-latency motion tracking of the upper limb assistive/rehabilitation exoskeleton system is achieved, solving the problems of large response delay and poor portability in existing technologies, and improving the system's response speed and predictive ability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHAANXI CHENGLAN TECHNOLOGY SERVICE CO LTD
- Filing Date
- 2026-03-06
- Publication Date
- 2026-05-05
AI Technical Summary
Existing upper limb assistive/rehabilitation exoskeleton systems rely on high-power, bulky external computing platforms, resulting in large response delays, poor portability, and limited electromyographic signal processing capabilities, making it impossible to achieve accurate motion prediction and high-precision control.
The system integrates electromyography (EMG) signal acquisition, neural network inference, and closed-loop control within a single chip. It uses a one-dimensional convolutional regression network to predict the incremental position of the exoskeleton and achieves zero-delay tracking through dual closed-loop control. The system includes an EMG signal acquisition unit, a motor position feedback unit, a neural network operation unit, and a dual closed-loop control unit.
It achieves high-precision, low-latency tracking of exoskeleton motion, with a compact system and low power consumption, meeting the needs for real-time and natural interaction.
Smart Images

Figure CN121806684B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human-computer interaction technology, and more specifically, to an exoskeleton position prediction and closed-loop stepping control system and method. Background Technology
[0002] Current upper limb assistive / rehabilitation exoskeleton systems generally employ intent recognition schemes based on joint angle sensors or torque sensors. These schemes determine the wearer's movement intent by collecting angle changes in joints such as the shoulder and elbow, or by manipulator torque information. Such schemes typically acquire sensor data at a sampling frequency not exceeding 200Hz and rely on computers or high-performance embedded platforms to run complex deep learning models for intent parsing and motion planning. While this method can achieve a certain degree of motion tracking, its reliance on external computing platforms results in a large overall system size and high power consumption. Furthermore, the response latency from signal acquisition to motion execution generally exceeds 300ms, making it difficult to meet the requirements for real-time and natural interaction.
[0003] To further improve response speed, some studies have attempted to introduce surface electromyography (EMG) signals as an intention sensing source, leveraging the characteristic that neuromuscular activity precedes actual movement to achieve motion prediction. However, limited by the limited computing power and storage resources of traditional microcontrollers, existing embedded solutions typically only extract amplitude features from EMG signals and make judgments based on simple thresholds, failing to achieve accurate and advance prediction of the future spatial trajectory of the upper limb. Furthermore, these systems often employ open-loop stepper motor drives, which are susceptible to step loss due to sudden load changes or high-speed motion, resulting in poor position control accuracy. Consequently, they struggle to stably and accurately track the complex motion trajectory formed by the shoulder, elbow, and wrist joints, failing to meet the demand for high-speed, high-precision assistance one step ahead.
[0004] In summary, existing technologies for exoskeleton systems suffer from significant limitations in intent recognition, motion prediction, and drive control: they either rely on high-power, bulky external computing platforms, resulting in large response delays and poor portability; or, while attempting to use electromyography (EMG) signals, they are constrained by embedded computing power, enabling only simple real-time motion triggering without predictive capabilities; furthermore, the use of open-loop stepper motor control at the execution level results in insufficient accuracy and reliability. Therefore, there is an urgent need for a highly integrated, lightweight solution capable of simultaneously performing high-speed acquisition of bilateral upper arm surface EMG signals, real-time motion intent prediction based on an artificial intelligence model, and high-precision closed-loop drive control of stepper motors within a single microcontroller chip. This would significantly improve the exoskeleton's response speed, predictive ability, and tracking accuracy while maintaining system compactness and low power consumption. Summary of the Invention
[0005] The purpose of this application is to overcome the shortcomings of existing technologies by providing an exoskeleton position prediction and closed-loop stepping control system and method, which can solve the defects of existing technologies such as large intention recognition delay, need for external AI accelerator, easy loss of steps in open-loop stepping, and high system size and power consumption, and achieve zero-delay tracking of shoulder, elbow and wrist compound movements.
[0006] The objective of this application is achieved through the following technical solution:
[0007] In a first aspect, this application proposes an exoskeleton position prediction and closed-loop stepping control system, comprising:
[0008] The microcontroller unit is used to perform electromyography signal acquisition, neural network inference, pulse generation and closed-loop correction functions within a single chip;
[0009] The electromyography (EMG) signal acquisition unit is connected to the microcontroller unit and is used to acquire surface EMG signals from both upper arms of the user, preprocess the surface EMG signals and extract features, and output digital EMG features.
[0010] The motor position feedback unit is connected to the microcontroller unit and is used to acquire the absolute position and speed information of the closed-loop stepper motor in real time.
[0011] The neural network operation unit, integrated into the microcontroller unit, implements a one-dimensional convolutional regression network based on the CMSIS-NN library. It concatenates digital electromyographic features with the absolute position and velocity information of the closed-loop stepper motor into a multi-dimensional input vector to predict the three-dimensional spatial position increment of the exoskeleton in the next moment.
[0012] The dual closed-loop control unit, connected to the microcontroller unit, is used to convert the predicted value of the three-dimensional spatial position increment into stepper motor control commands, and perform closed-loop correction in combination with the real-time position of the motor. Zero-delay tracking control is achieved through a predictive-execution parallel pipeline.
[0013] In one possible implementation, the electromyography signal acquisition unit includes a differential amplifier circuit, a notch filter circuit, and an analog-to-digital converter circuit;
[0014] The differential amplifier circuit uses a low-noise instrumentation amplifier for signal amplification;
[0015] Notch filters are used to filter out power frequency interference;
[0016] The analog-to-digital conversion circuit is composed of an external ADC and an on-chip ADC within the microcontroller unit cascaded together.
[0017] In one possible implementation, the motor position feedback unit employs a hybrid closed-loop stepper motor, which integrates a magnetic encoder.
[0018] The magnetic encoder feeds back the absolute angular position data of the motor rotor to the microcontroller unit in real time through the SPI communication interface;
[0019] The microcontroller unit filters the received absolute angle position data.
[0020] In one possible implementation, the hierarchical structure of the one-dimensional convolutional regression network includes, in sequence: a first convolutional layer, a first activation layer, a first average pooling layer, a second convolutional layer, a second activation layer, a second average pooling layer, a flattening layer, a fully connected layer, a third activation layer, and an output regression layer.
[0021] The three nodes of the output regression layer correspond to the position increments of the exoskeleton in the X, Y, and Z directions of space, respectively.
[0022] The one-dimensional convolutional regression network has been quantized with INT8 integers before execution.
[0023] In one possible implementation, the system uses a sliding time window to buffer and splice electromyographic signals and motor states;
[0024] The sliding window is stored cyclically in SRAM using a DMA double-buffering mechanism.
[0025] In one possible implementation, the neural network operation unit calculates the root mean square value, zero-crossing rate, and wavelength of the bilateral surface electromyography signals within the sliding time window, forming a 6-dimensional electromyography feature vector.
[0026] The real-time angle information obtained by the motor position feedback unit is subjected to first-order and second-order difference operations to obtain angular velocity and angular acceleration, which are then combined with the angle values to form a 3D motor dynamic state vector.
[0027] The 6-dimensional electromyographic feature vector, the 3-dimensional motor dynamic state vector, and the motor control quantity from the previous control cycle are concatenated into a multi-dimensional input vector.
[0028] In one possible implementation, the neural network processing unit is also used to map the three-dimensional spatial position increments to the angle increments of the shoulder, elbow, and wrist joints, respectively.
[0029] The angle increment is smoothed by filtering.
[0030] The smoothed joint angle increment is superimposed with the current actual joint angle obtained by the motor position feedback unit to generate the target tracking position of each joint, which is then sent to the dual closed-loop control unit.
[0031] In one possible implementation, the dual closed-loop control unit includes:
[0032] The position loop is used to compare the predicted position increment with the real-time position of the motor, generate a position error signal, and output a speed reference value using a PD control law.
[0033] The speed loop is used to calculate the correction amount of the motor pulse frequency based on the position error, and a PI control law is used for amplitude limiting.
[0034] A pulse generator timer is used to generate stepper motor drive pulses based on the corrected frequency, enabling control to advance to the next predicted position.
[0035] Secondly, this application proposes an exoskeleton position prediction and closed-loop stepping control method, including:
[0036] Collect surface electromyography (EMG) signals from both upper arms of the user;
[0037] Real-time acquisition of the absolute position and speed information of the closed-loop stepper motor;
[0038] The electromyographic features within the sliding window are concatenated with the absolute position and velocity information to form a multidimensional input vector;
[0039] By using a one-dimensional convolutional regression network embedded in the microcontroller chip, the predicted value of the three-dimensional position increment of the exoskeleton at the next moment is obtained through inference.
[0040] The predicted position increment is converted into stepper motor pulse commands and then compared with the real-time position of the motor in a closed loop to achieve zero-delay tracking control of the exoskeleton movement.
[0041] In one possible implementation, the step of concatenating the electromyographic features within the sliding window with the absolute position and velocity information into a multidimensional input vector includes:
[0042] For bilateral surface electromyography signals within the sliding time window, the root mean square value in the time domain, the zero-crossing rate, and the wavelength are calculated to form a 6-dimensional electromyography feature vector.
[0043] The real-time angle information obtained by the motor position feedback unit is subjected to first-order and second-order difference operations to obtain angular velocity and angular acceleration, which are then combined with the angle values to form a 3D motor dynamic state vector.
[0044] The 6-dimensional electromyographic feature vector, the 3-dimensional motor dynamic state vector, and the motor control quantity from the previous control cycle are concatenated into a multi-dimensional input vector.
[0045] The main solution and its various further alternatives described above can be freely combined to form multiple solutions, all of which are solutions that can be adopted and are claimed in this application; furthermore, the (non-conflicting alternatives) can also be freely combined with each other and with other alternatives. Those skilled in the art, after understanding the solution of this application, will realize from the prior art and common general knowledge that there are many combinations, all of which are technical solutions to be protected in this application, and will not be exhaustively listed here.
[0046] This application discloses an exoskeleton position prediction and closed-loop stepper control system and method. The microcontroller unit performs electromyography (EMG) signal acquisition, neural network inference, pulse generation, and closed-loop correction functions. The EMG signal acquisition unit acquires surface EMG signals, performs preprocessing and feature extraction, and outputs digital EMG features. The motor position feedback unit acquires the absolute position and velocity information of the closed-loop stepper motor in real time. The neural network operation unit concatenates the digital EMG features and the absolute position and velocity information of the closed-loop stepper motor into a multi-dimensional input vector to predict the three-dimensional spatial position increment of the exoskeleton at the next moment. The dual closed-loop control unit converts the predicted value of the three-dimensional spatial position increment into stepper motor control commands and performs closed-loop correction in combination with the real-time position of the motor. Zero-delay tracking control is achieved through a predictive-execution parallel pipeline, realizing high-precision, low-delay tracking of exoskeleton movement and achieving high system integration and lightweight design. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 A schematic diagram of the structure of an exoskeleton position prediction and closed-loop stepping control system proposed in an embodiment of this application is shown.
[0049] Figure 2 A schematic diagram of the neural network-to-encoder feedback process proposed in an embodiment of this application is shown.
[0050] Figure 3 A schematic diagram showing the predicted and actual values of the floating-point model proposed in this application embodiment is illustrated.
[0051] Figure 4 A schematic diagram showing the predicted and actual values of the quantization model proposed in this application is illustrated.
[0052] Figure 5 A schematic diagram of the one-dimensional convolutional regression network proposed in an embodiment of this application is shown.
[0053] Figure 6 A schematic diagram of an exoskeleton system based on electromyographic signal prediction and stepper motor closed-loop control is shown.
[0054] Figure 7 This diagram illustrates the process of constructing multimodal features from raw signals to neural network inputs.
[0055] Figure 8 The graph shows the trend of key performance indicators of the 1D-CNN neural network during training.
[0056] Figure 9 The diagram illustrates the error distribution of the quantization model on the exoskeleton position prediction task.
[0057] Figure 10 The diagram illustrates the error distribution of the floating-point model in the exoskeleton position prediction task. Detailed Implementation
[0058] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0059] Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0060] Please refer to Figure 1 , Figure 1 This paper presents a schematic diagram of an exoskeleton position prediction and closed-loop stepping control system according to an embodiment of this application. The system includes:
[0061] The microcontroller unit is used to perform electromyography signal acquisition, neural network inference, pulse generation and closed-loop correction functions within a single chip;
[0062] The electromyography (EMG) signal acquisition unit is connected to the microcontroller unit and is used to acquire surface EMG signals from both upper arms of the user, preprocess the surface EMG signals and extract features, and output digital EMG features.
[0063] The motor position feedback unit is connected to the microcontroller unit and is used to acquire the absolute position and speed information of the closed-loop stepper motor in real time.
[0064] The neural network operation unit, integrated into the microcontroller unit, implements a one-dimensional convolutional regression network based on the CMSIS-NN library. It concatenates digital electromyographic features with the absolute position and velocity information of the closed-loop stepper motor into a multi-dimensional input vector to predict the three-dimensional spatial position increment of the exoskeleton in the next moment.
[0065] The dual closed-loop control unit, connected to the microcontroller unit, is used to convert the predicted value of the three-dimensional spatial position increment into stepper motor control commands, and perform closed-loop correction in combination with the real-time position of the motor. Zero-delay tracking control is achieved through a predictive-execution parallel pipeline.
[0066] The exoskeleton position prediction and closed-loop stepper control system proposed in this application uses an STM32H750XBH6 microcontroller as its core microcontroller unit. This unit integrates signal acquisition, neural network inference, and control functions within a single chip, eliminating the need for external processing accelerators or memory. The electromyography (EMG) signal acquisition unit collects surface EMG signals at configurable frequencies from 500Hz to 2kHz using differential electrodes attached to the user's upper arms, digitizing these signals into EMG features. Simultaneously, the motor position feedback unit acquires the absolute position and velocity information of the closed-loop stepper motors in real time. The neural network processing unit, embedded in the microcontroller's on-chip Flash memory and built based on the CMSIS-NN library, fuses the EMG signal features with the absolute position and velocity information, forming a 10-dimensional input vector through a 256-millisecond sliding window to predict the exoskeleton's three-dimensional spatial position increment at the next moment. Finally, the dual closed-loop control unit converts this predicted position increment into control commands for the stepper motors and performs closed-loop correction in real time, combining the motor position feedback to achieve zero-delay tracking control of the wearer's movements.
[0067] The electromyography signal acquisition unit includes a differential amplifier circuit, a notch filter circuit, and an analog-to-digital converter circuit;
[0068] The differential amplifier circuit uses a low-noise instrumentation amplifier for signal amplification;
[0069] Notch filters are used to filter out power frequency interference;
[0070] The analog-to-digital conversion circuit is composed of an external ADC and an on-chip ADC within the microcontroller unit cascaded together.
[0071] The differential amplifier circuit first amplifies and suppresses common-mode noise in the surface electromyography signals acquired from both upper arms; then, the signal passes through a 50Hz notch filter to remove power frequency interference. The analog-to-digital converter adopts an architecture that cascades an external 8-bit ADC with the on-chip 16-bit ADC of the STM32H750XBH6 microcontroller. This design effectively improves the overall sampling resolution of the system, achieving an effective signal resolution of 12 bits.
[0072] The motor position feedback unit uses a hybrid closed-loop stepper motor, which integrates a magnetic encoder.
[0073] The magnetic encoder feeds back the absolute angular position data of the motor rotor to the microcontroller unit in real time through the SPI communication interface;
[0074] The microcontroller unit filters the received absolute angle position data.
[0075] The motor position feedback unit employs a hybrid closed-loop stepper motor with an integrated absolute magnetic encoder. The magnetic encoder transmits the absolute angular position data of the motor rotor to the microcontroller unit in real time via a high-speed SPI communication interface at a frequency of at least 1kHz. The microcontroller unit performs digital filtering processing, such as moving average or low-pass filtering, on the received raw position information to effectively suppress noise.
[0076] The hierarchical structure of a one-dimensional convolutional regression network includes, in sequence: a first convolutional layer, a first activation layer, a first average pooling layer, a second convolutional layer, a second activation layer, a second average pooling layer, a flattening layer, a fully connected layer, a third activation layer, and an output regression layer.
[0077] The three nodes of the output regression layer correspond to the position increments of the exoskeleton in the X, Y, and Z directions of space, respectively.
[0078] The one-dimensional convolutional regression network has been quantized with INT8 integers before execution.
[0079] The neural network operation unit is implemented using a one-dimensional convolutional regression network. Its structure includes: a first convolutional layer using a 7-kernel type, outputting 16 channels; followed by a first ReLU activation function to introduce non-linearity; and then a first average pooling layer for dimensionality reduction with a pooling size of 2. Next, a second convolutional layer uses a 5-kernel type to further extract features, expanding the output channels to 32, and is also processed by a second ReLU activation function and a second average pooling layer. Afterward, the network uses a flattening layer to convert the feature map into a one-dimensional vector, which is then input into a fully connected layer with 64 nodes, followed by a third ReLU activation function. Finally, the output regression layer uses 3 nodes to predict the incremental position of the exoskeleton in the X, Y, and Z directions. After INT8 quantization, the total number of parameters is less than 90kB, and the peak RAM usage during runtime is less than 64kB.
[0080] The system uses a sliding time window to buffer and stitch together electromyographic signals and motor states;
[0081] The sliding window is stored cyclically in SRAM using a DMA double-buffering mechanism.
[0082] The sliding window utilizes a direct memory access (DMA) double-buffering mechanism to achieve circular storage in the microcontroller's static random access memory (SRAM). This design ensures the continuity and efficiency of data acquisition and processing, avoiding signal loss or system latency caused by memory operations. The data length within the window can be configured in software according to the sampling frequency of the electromyographic signal: 128 data points are stored in the window when the sampling frequency is 500Hz; and 512 data points are stored when the sampling frequency is increased to 2kHz.
[0083] The neural network processing unit is also used to map the three-dimensional spatial position increments to the angle increments of the shoulder, elbow, and wrist joints, respectively.
[0084] The angle increment is smoothed by filtering.
[0085] The smoothed joint angle increment is superimposed with the current actual joint angle obtained by the motor position feedback unit to generate the target tracking position of each joint, which is then sent to the dual closed-loop control unit.
[0086] This stage begins with kinematic mapping, whereby the abstract vector output by the neural network, representing the expected displacement of the exoskeleton's end in a three-dimensional Cartesian coordinate system, is mapped to specific angle increments for the shoulder, elbow, and wrist joints based on a predefined upper limb exoskeleton kinematic model. Subsequently, the system performs smoothing filtering on the resulting sequence of joint angle increments. Finally, the smoothed joint angle increments are superimposed with the real-time actual angles of each joint obtained by the motor position feedback unit. The generated target tracking position is then sent in real-time to the dual-loop control unit as the input setpoint for the position loop, compared with the continuously fed-back actual position to generate an error signal, thereby driving the motor to achieve high-precision tracking.
[0087] The neural network processing unit calculates the root mean square value, zero-crossing rate, and wavelength of the bilateral surface electromyography signals within the sliding time window, forming a 6-dimensional electromyography feature vector.
[0088] The real-time angle information obtained by the motor position feedback unit is subjected to first-order and second-order difference operations to obtain angular velocity and angular acceleration, which are then combined with the angle values to form a 3D motor dynamic state vector.
[0089] The 6-dimensional electromyographic feature vector, the 3-dimensional motor dynamic state vector, and the motor control quantity from the previous control cycle are concatenated into a multi-dimensional input vector.
[0090] For bilateral upper arm surface electromyography (EMG) signals, the unit independently calculates three key time-domain features for each side: the root mean square (RMS) value, used to quantify the average energy intensity of the signal, characterizing the force and envelope of muscle contraction; the zero-crossing rate, which counts the number of times the signal crosses the zero level, reflecting the frequency component changes of the EMG signal and the speed of muscle activation; and the waveform length, which calculates the cumulative absolute change of the signal waveform over a period of time, describing the complexity and stability of the signal. These three features from each side together constitute a 6-dimensional EMG feature vector, thereby capturing the neuromuscular activity patterns of bilateral limb coordinated movements.
[0091] For the absolute joint angle information provided in real time by the motor position feedback unit, the unit dynamically expands it through continuous real-time differential operations: first, a first-order difference is performed to obtain the instantaneous angular velocity of the joint, representing the direction and speed of movement; then, a second-order difference is performed to calculate the angular acceleration, reflecting the changing trend of the movement speed. The original joint angle, the calculated angular velocity, and the angular acceleration together form a 3D motor dynamic state vector, accurately describing the real-time kinematic state of the exoskeleton actuator. Finally, to achieve the coherence and smoothness of the control strategy, the system also incorporates the motor control quantity output from the previous control cycle as historical context. Ultimately, the above 6D electromyographic feature vector, 3D motor dynamic state vector, and 1D historical control quantity are concatenated and fused at the feature level to form a multi-dimensional input feature vector.
[0092] The dual closed-loop control unit includes:
[0093] The position loop is used to compare the predicted position increment with the real-time position of the motor, generate a position error signal, and output a speed reference value using a PD control law.
[0094] The speed loop is used to calculate the correction amount of the motor pulse frequency based on the position error, and a PI control law is used for amplitude limiting.
[0095] A pulse generator timer is used to generate stepper motor drive pulses based on the corrected frequency, enabling control to advance to the next predicted position.
[0096] The dual-loop control unit is responsible for converting the position commands predicted by the neural network into precise motor motion. Internally, it comprises three working components: a position loop, a speed loop, and a pulse generator timer. The position loop first compares the predicted position increment output by the neural network processing unit with the absolute position fed back in real time by the motor position feedback unit, generating a position error signal. The speed loop then dynamically calculates the correction amount for the required pulse frequency of the stepper motor based on this position error signal. Finally, the pulse generator timer generates and outputs the pulse commands to drive the closed-loop stepper motor in real time based on the corrected frequency.
[0097] The system has a total latency of ≤260ms, including a 256ms sliding window, ≤1ms inference time, and ≤3ms motor response time, which meets the tracking requirements of human body movements 150–200ms in advance.
[0098] Figure 6 A schematic diagram of an exoskeleton system based on electromyography (EMG) signal prediction and stepper motor closed-loop control is shown. During the offline training and deployment phase, surface EMG signals and related motion data are first collected and processed from the user's upper arms. Feature extraction and normalization preprocessing are then performed to prepare a high-quality dataset for model training. A one-dimensional convolutional neural network (1D-CNN) floating-point model is trained using this dataset. Its network structure is: Conv1D(7,16)→ReLU→AvgPool2→Conv1D(5,32)→ReLU→AvgPool2→Flatten→Dense(64)→ReLU→Dense(3). After training, the model undergoes full integer quantization using INT8 quantization technology to significantly reduce model size and computational overhead. Finally, the quantized model is embedded into the microcontroller's on-chip Flash memory and efficiently deployed using the CMSIS-NN library, preparing it for online inference.
[0099] The online real-time control phase constitutes the core closed loop of the system's operation. The process begins with sEMG electrodes worn on both upper arms of the user. The weak electromyographic signals collected by the electrodes are first processed by an analog front-end, including differential amplification and 50Hz power frequency notch filtering to improve the signal-to-noise ratio. The processed signals are sampled by an external 8-bit ADC and an on-chip 16-bit ADC cascaded together, with the sampling frequency configurable between 500Hz and 2kHz, achieving a combined 12-bit effective resolution. The sampled data is automatically transferred to a circular buffer in SRAM via a DMA double-buffering mechanism for cyclic storage, forming a sliding time window of 256ms. The system extracts electromyographic features from this sliding window and concatenates them with the motor status read in real time from the motor encoder via the SPI interface and the control quantity from the previous moment, forming a 10-dimensional input feature vector.
[0100] Subsequently, the feature vector is fed into a 1D-CNN regression network embedded in Flash for real-time inference. The network outputs a prediction of the user's movement intention within ≤1ms, namely the position increment of the exoskeleton's end effector in three-dimensional space. This position increment is then converted into target angles for each joint motor by the target generation and kinematic mapping module. Following this, the system enters a dual-loop control phase: first, the position loop converts the target angles... The actual angle fed back by the motor encoder The system compares the signals to generate an error signal. Then, the speed loop calculates the correction amount for the stepper motor drive pulse frequency based on the error. The pulse timer generates the final STEP and DIR control signals based on the corrected frequency. These signals drive the closed-loop stepper motor to perform actions, while the motor's built-in 12-bit encoder continuously feeds back the real-time position via the SPI interface, forming a closed loop to ensure control accuracy. The entire process from receiving a command to generating a response takes ≤3ms.
[0101] Figure 7 This diagram illustrates the process of constructing multimodal features from raw signals to neural network input. First, the signal undergoes differential amplification and 50Hz power frequency notch filtering in the analog front-end to improve the signal-to-noise ratio. Then, it is digitized via an ADC sampling module using a cascaded combination of 8-bit and 16-bit ADCs. The sampled data is stored in the SRAM circular storage area via a DMA double-buffer mechanism, with a sliding window buffer of 256ms. Simultaneously, the system reads the joint angle θ through the motor encoder SPI interface and calculates the velocity ω and acceleration α using differential calculations. In the feature processing stage, the bilateral electromyographic signals within the sliding window are fed in parallel into the feature extraction module, where their root mean square, zero-crossing rate, and wavelength time-domain features are calculated. Finally, the 6-dimensional electromyographic features and 4-dimensional motor state features are fused at the feature concatenation node to form a unified 10-dimensional input vector. This vector fully encapsulates the user's movement intention and the real-time device status, providing a standardized input for subsequent real-time inference by the 1D-CNN neural network.
[0102] Example 1: The exoskeleton position prediction and closed-loop stepping control system and method proposed in this application are applied to a rehabilitation training type myoelectric driven exoskeleton.
[0103] First, this embodiment adopts a highly integrated design, with the total weight of the single-limb exoskeleton system controlled within 280g. This includes a microcontroller housing weighing 25g, a 5V / 2000mAh polymer lithium battery weighing 95g, a closed-loop stepper motor and encoder module weighing 120g, and the remainder being wires and electrodes. The joint support is made of carbon fiber composite material, with one active degree of freedom each at the shoulder, elbow, and wrist. The stepper motor is a 42mm hybrid closed-loop stepper motor, integrating a 12-bit high-precision magnetic encoder with a resolution of 4096 steps / revolution, a reduction ratio of 5:1, and a peak output torque of 2.0 N·m. The rotation range of each joint is limited to -120 degrees to +120 degrees to meet ergonomic requirements and ensure safe use. The wearable part uses medical-grade elastic fabric straps, with quick-adjustable buckles on both shoulder straps, and an 8cm wide breathable waistband to effectively distribute pressure and ensure comfort during extended wear. The electromyography (EMG) acquisition electrodes adopt a differential electrode pair layout. The main electrode is attached to the belly of the biceps and triceps on the right side of the user, and the reference electrode is set at the bony prominence on the outside of the elbow joint. The electrode spacing is fixed at 3cm and is reliably fixed by medical conductive gel. It can be quickly adjusted according to the user's arm circumference within the range of 22cm to 38cm to meet the needs of users with different body types.
[0104] Second, the core hardware control configuration: The core controller is the high-performance STM32H750XBH6 microcontroller based on the ARM Cortex-M7 core. This microcontroller has a main frequency of 480MHz. I-Cache and D-Cache functions are enabled in the system configuration, and the Flash wait cycle is set to 4 to fully utilize its computing power. The ADC configuration uses on-chip ADC1 and ADC2 for dual-channel synchronous acquisition, triggered by timer TIM2 at a configurable frequency from 500Hz to 2kHz. After 4x oversampling, it outputs 12-bit effective resolution data. An external 8-bit ADC is cascaded via the SPI1 interface to achieve an overall 12-bit precision for the signal chain. Acquired data is transferred to a double buffer in SRAM1 via DMA1Stream2 / 3, enabling data transfer without CPU intervention. The encoder interface reads the absolute position values of the three joint magnetic encoders via the SPI2 interface with a 1kHz frequency timer interrupt, also employing the DMA2 Stream 0 double buffer mechanism to effectively reduce CPU load. Motor control uses timers TIM3, TIM4, and TIM8 to generate three independent PWM pulse signals, dynamically adjustable from 100 Hz to 50 kHz, directly driving the STEP and DIR pins of the closed-loop stepper driver. The DIR pin controls the rotation direction via GPIO. The memory allocation scheme is as follows: AXI-SRAM is used to store the activation buffer and intermediate feature maps of the 1D-CNN model; SRAM1 is used to store the original data, feature vectors, and normalization parameters of the sliding window; SRAM2 is used to run the FreeRTOS real-time operating system and inference task stack. The first 128 kB of the on-chip Flash is used for the bootloader, 128-640 kB for application code, 640 kB-1.5 MB for storing the INT8 quantized 1D-CNN model weights and lookup tables, and 1.5 MB-2 MB are reserved for OTA firmware upgrade backup.
[0105] Third, EMG signal acquisition and preprocessing: The EMG signal acquisition and preprocessing module uses an INA128 low-noise instrumentation amplifier as the signal front end, with an input impedance greater than 10 GΩ and a gain configured to 1000 times via an external resistor. An active 50 Hz notch filter and a 4th-order Butterworth low-pass filter are integrated into the signal chain to ensure output noise is less than 3 microvolts RMS. ADC sampling data is automatically filled into a circular buffer in SRAM1 via a DMA mechanism. The buffer size is dynamically configured according to the sampling rate: when the sampling rate is 500 Hz, the buffer stores 128 data points; when the sampling rate is 2 kHz, the buffer stores 512 data points. Whenever the buffer is half full, a DMA half-transfer completion interrupt is triggered, thus notifying the feature extraction task to begin calculation.
[0106] Fourth, multimodal feature extraction and input vector construction: The multimodal feature extraction module in this embodiment runs in a high-priority task of the FreeRTOS real-time operating system (priority 3, stack size 2 kB), using fixed-point arithmetic to improve computational efficiency. Electromyography (EMG) feature extraction calculates three types of temporal features for bilateral EMG signals within a 256 ms sliding window: root mean square (RMS), calculated using the following formula: , This is a sequence of discrete sampled values of electromyography (EMG) signals within a sliding time window. This represents the total number of sampling points within the sliding time window. For summation operations, This refers to square root calculation. The root mean square (RMS) characterizes the signal envelope strength; the zero-crossing rate (ZCR) is the number of times a signal crosses zeros, reflecting the signal's frequency characteristics; wavelength (WL) is calculated using the following formula: , To take the absolute value, and The values are sampled from adjacent electromyographic (EMG) signals within the sliding window. Through the above processing, a total of 6-dimensional EMG feature vectors are generated (3-dimensional on the left + 3-dimensional on the right). Motor state characteristics are obtained by reading the magnetic encoder angle values θ (in degrees, range -180 to +180 degrees) of the three joints via the SPI interface, and the angular velocity is calculated using the first-order difference method. , The joint angle in the current control cycle, This refers to the joint angle in the previous control cycle. The time interval between two angle samples is given. Angular acceleration is calculated using the second-order finite difference method. , The angular velocity calculated for the current control cycle. The angular velocity is calculated for the previous control cycle, where the time interval is... =1 ms, and simultaneously record the motor pulse frequency of the previous control cycle as historical control quantity, generating a total of 4-dimensional motor state features. The above 10-dimensional feature vectors are then Z-score normalized according to the mean and standard deviation saved during the training phase: , among them These are the original eigenvalues. This is the average value calculated for this feature on the training dataset. The standard deviation of this feature is calculated on the training dataset. These are the normalized feature values. The normalization parameters are stored in a separate storage area of the on-chip Flash memory, occupying 80 bytes of storage space.
[0107] Fifth, the construction and training of 1D-CNN neural networks: Figure 5A schematic diagram of the one-dimensional convolutional regression network proposed in this application embodiment is shown. The network structure adopts a typical 1D-CNN architecture, with an input shape of (10,1). The network layers sequentially include: a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a flattening layer, a fully connected layer, and an output layer, outputting a 3D vector. , These correspond to the incremental position prediction values for the shoulder, elbow, and wrist joints, respectively. Raw electromyographic signals and motor position data were collected from real rehabilitation training scenarios. A training dataset containing 50,000 sets of [10-dimensional feature vectors, 3-dimensional position increment labels] was generated using a sliding window approach. The dataset was divided into training, validation, and test sets in an 8:1:1 ratio. The training strategy employed supervised learning using the TensorFlow 2.15 framework, with Adam as the optimizer and mean squared error (MSE) as the loss function. An early stopping strategy was used during training. Figure 8 The graph shows the trend of key performance indicators of the 1D-CNN neural network during training. After training, the model's mean absolute error (MAE) on the test set was 0.031, and the coefficient of determination (R²) reached 0.97. Quantization deployment used TensorFlow Lite to perform INT8 full integer quantization on the trained floating-point model. During quantization, 1000 representative datasets were used for calibration to ensure that the accuracy loss after quantization was less than 5%. The quantized model size was 87 kB. It was converted to optimized C code using the ST X-CUBE-AI tool and then compiled and linked into the firmware. Figure 3 This paper illustrates a schematic diagram of the predicted and actual values of the floating-point model proposed in an embodiment of this application. Figure 4 A schematic diagram showing the predicted and actual values of the quantization model proposed in this application is illustrated.
[0108] Sixth, Embedded Inference and Performance Verification: The embedded inference function in this embodiment is implemented on an STM32H750 microcontroller. Neural network inference is executed as a separate task within the FreeRTOS real-time operating system. The inference task is woken up by a timer interrupt every 256 ms, reads the normalized 10-dimensional input vector from SRAM1, and calls the aiRun() function generated by the STX-CUBE-AI tool to perform forward inference. Performance test data shows that a single inference operation takes 0.82 ms, consuming approximately 393,600 clock cycles. Peak RAM usage is 58 kB, including a 42 kB activation buffer, a 12 kB input / output buffer, and 4 kB system overhead. The CPU utilization during inference is approximately 0.32%, indicating that the system has sufficient capacity to handle other real-time tasks. The network output is the predicted joint position increment at the current moment. , The angle prediction increments for the shoulder, elbow, and wrist joints are given, in degrees. To improve output stability, the predicted values are smoothed using a Kalman filter, with the process noise covariance Q set to 0.01 and the measurement noise covariance R set to 0.1 to effectively eliminate occasional abnormal predictions.
[0109] Seventh, Dual-Closed-Loop Stepping Control Strategy: This embodiment adopts a cascaded dual-closed-loop control strategy consisting of a position loop and a velocity loop. Figure 2 This illustration shows a schematic diagram of the neural network-to-encoder feedback process proposed in an embodiment of this application, with the neural network output... , , To target generation / mapping ( The location loop will predict the location increments from the neural network. Superimposed on the current encoder feedback position Up, obtain the target location The position loop controller calculates the position error. The output speed reference value is adopted using the PD control law. , where proportional gain It can be set to 5.0, differential gain. It can be set to 0.8. The speed loop controller calculates the speed error. The output pulse frequency correction is achieved using a PI control law. , where proportional gain Set to 2.0, integral gain Set to 0.5. Final pulse frequency. , The base pulse frequency, calculated based on the current motion trajectory, is limited to a range of 100 Hz to 50 kHz. Pulse generation is implemented by timer TIM3, whose automatic reload register (ARR) is based on... Dynamically updated: ,in This is the core clock frequency of the system. This is the prescaler coefficient. The timer switches the GPIO output state in the update interrupt to generate precise STEP pulses. The DIR pin determines the rotation direction based on the sign of Δθ: DIR = 1 (forward) when Δθ > 0, and DIR = 0 (reverse) when Δθ < 0. Encoder feedback reads the absolute position value of the magnetic encoder at a frequency of 1 kHz via an SPI timer interrupt, and reduces noise through a moving average filter. The closed-loop error between the feedback position and the target position is monitored in real time. When the error exceeds ±2 degrees, a protection interrupt is triggered, immediately stopping the motor output and issuing an alarm signal.
[0110] 8. Rehabilitation Training Experiment and Effect Analysis: This embodiment selected 5 stroke rehabilitation patients for a 2-week rehabilitation training experiment. The training tasks included forward grasping and lateral extension, with each training session lasting 30 minutes, 3 times a week. System performance test results showed that in the grasping task, the system's average response latency was 242 milliseconds, the average joint trajectory following error was 1.8 degrees, and the standard deviation was 0.6 degrees. Patient subjective evaluations showed that 85% of patients believed that the exoskeleton could "predict" their movement intentions and had no obvious sense of delay. In terms of rehabilitation effects, after 2 weeks of training, the patients' average active range of motion of the right upper limb increased by 15 degrees, the average Fugl-Meyer score improved by 8 points, and the average RMS value of electromyography signals increased by 28% compared with before training, indicating that muscle strength was significantly restored. Energy consumption test data showed that during 8 hours of continuous rehabilitation training, the system's average power consumption was 1.1 watts, and the actual battery life of the 5V / 2000mAh battery was 8.2 hours, meeting the needs of all-day use.
[0111] Figure 9 This diagram illustrates the error distribution of the quantization model on the exoskeleton position prediction task. Figure 10 The diagram illustrates the error distribution of the floating-point model in the exoskeleton position prediction task. The floating-point model exhibits an ideal normal distribution, with its peaks concentrated near zero error, indicating that the model's predictions closely match the actual values, demonstrating excellent accuracy. In contrast, the quantized model's error distribution shows wider dispersion and a slight systematic shift, intuitively reflecting the accuracy loss inevitably introduced during the quantization process from 32-bit floating-point to 8-bit integer. However, the overall range of errors after quantization remains controllable, with most prediction errors being small, proving that INT8 quantization successfully retains the model's core predictive capabilities while significantly reducing computational and storage overhead.
[0112] Example 2: The exoskeleton position prediction and closed-loop stepping control system and method proposed in this application are applied to an industrial heavy-duty handling assist exoskeleton.
[0113] First, the mechanical structure and load capacity have been upgraded: This embodiment features a specialized upgrade to the mechanical structure for industrial applications. The articulated arm is made of high-strength 7075 aluminum alloy, and the backplate is made of high-strength glass fiber composite material. This keeps the total weight of the single-limb exoskeleton system at 1.65 kg, increasing the rated load capacity to 25 kg and the peak load to 30 kg. The joint degrees of freedom remain at 3, the transmission system reduction ratio has been increased to 10:1, and the stepper motor has been upgraded to a 57 mm high-torque hybrid closed-loop stepper motor with a peak output torque of 12 N·m. The magnetic encoder resolution has been upgraded to 14 bits, with a repeatability accuracy better than 0.5 degrees. The wearable system uses industrial-grade high-strength nylon webbing and a quick-release buckle structure, and the waist backplate integrates a polyurethane cushioning pad to effectively distribute load pressure. The electromyography electrodes have been upgraded to waterproof conductive rubber electrodes, adapting to the high-temperature and high-humidity environments common in industrial workshops.
[0114] Second, hardware control system upgrade: The hardware control system in this embodiment has been specifically upgraded for industrial heavy-duty application scenarios. The MCU configuration remains unchanged as an STM32H750XBH6 microcontroller, but the main frequency has been increased to 480 MHz, and the neural network inference time is still less than 1 ms. To adapt to high-speed operation scenarios, the ADC sampling rate is configured to 2 kHz, and the sliding window length is configured to 512 points. The drive system has been upgraded to a 48 V high-performance closed-loop stepper driver, supporting RS-485 bus communication, with a current loop closed-loop bandwidth greater than 3 kHz and a maximum output current of 8 A. The microcontroller establishes a communication link with the driver through the UART4 interface, sending position / speed commands in real time and reading driver status information. The power system uses a 48 V / 5 Ah lithium battery pack, providing a stable 5 V / 3 A power supply to the microcontroller through a high-efficiency DC-DC converter. The battery management system integrates multiple protection functions for overcharge, over-discharge, and overcurrent, and reports battery power and health status to the microcontroller in real time through the I2C interface. The heat dissipation system adopts a two-stage heat dissipation scheme: the microcontroller housing is equipped with a 40×40×10 mm aluminum heat sink, which is in direct contact with the MCU chip through thermally conductive silicone; the driver adopts a forced air cooling system to ensure that the core temperature of the system does not exceed 65 degrees Celsius during continuous high-load operation.
[0115] Third, high-speed data acquisition and feature extraction optimization: This embodiment specifically optimizes the data acquisition and feature extraction modules for high-speed industrial operation scenarios. The ADC configuration increases the sampling rate to 2 kHz, and the DMA dual buffer size is correspondingly expanded to 512 points × 2 channels × 2 bytes = 2048 bytes. To minimize interrupt latency, the DMA transfer completion interrupt priority is set to the highest level. The feature extraction algorithm is accelerated using optimized functions from the CMSIS-DSP library: RMS calculation uses the arm_rms_q15 function, and wavelength feature calculation uses the arm_abs_q15 function, fully utilizing the SIMD instruction parallel processing capability of the Cortex-M7 core. Actual test data shows that the feature extraction time is significantly reduced from 1.2 ms to 0.6 ms, improving efficiency by approximately 50%. The electromyography acquisition channels are expanded to 4, and new monitoring points for the anterior and posterior deltoid muscles are added. The feature vector dimension is correspondingly expanded to 12 dimensions. Due to the increased input dimension, the first convolutional layer of the network needs to be retrained to adapt to the new feature space.
[0116] Fourth, 1D-CNN Model Expansion and Retraining: This embodiment specifically expands and optimizes the neural network model for heavy-duty industrial applications. The network structure is adjusted by modifying the input shape to (12,1) to accommodate the newly added electromyography (EMG) acquisition channel, while the structure of the remaining network layers remains unchanged. Due to the increased input dimension, the number of parameters in the first convolutional layer increases by approximately 20%, resulting in a model size of 95 kB after INT8 quantization. Training data generation was performed in an actual factory handling scenario, collecting operational data from 10 workers covering typical actions such as lifting, carrying, and putting down, generating a training dataset containing 80,000 samples. Data augmentation was performed through random noise injection and time shifting. The training strategy employed a transfer learning approach, using the model trained in Example 1 as pre-training weights, with only the fully connected layers and output layer fine-tuned, for a total of 20 epochs. After training, the model achieved a mean absolute error of 0.042 and a coefficient of determination of 0.94 on the industrial-specific test set, demonstrating good prediction accuracy and generalization ability. Inference performance verification shows that the single inference time on the STM32H750 microcontroller is 0.96 ms, and the peak RAM usage is 62 kB, which fully meets the real-time requirements of the 1 kHz control loop and ensures the stability of high-speed continuous operation in industrial scenarios.
[0117] Fifth, optimization of the heavy-load dual-closed-loop control strategy: This embodiment specifically optimizes the dual-closed-loop control strategy for industrial heavy-load applications. The position loop enhancement section adds a feedforward compensation term to the PD controller, dynamically adjusting the control gain based on the load weight measured by the force sensor. The control law is modified as follows: ,in m is the load mass. = 1.5 is the feedforward gain. The speed loop limiting section adds an output frequency limiting stage to prevent overshoot during high-speed motor operation. Meanwhile, the acceleration limit is set to 5000 degrees / s², and a first-order low-pass filter is used to smooth frequency changes to improve stability. The safety protection section relaxes the closed-loop error monitoring threshold between the encoder feedback position and the target position to ±3 degrees, and adds an overload protection mechanism for the torque sensor: when the joint torque exceeds 15 N·m and lasts for 100 ms, the system immediately stops the motor output and cuts off the power supply to ensure the safety of the equipment and operators.
[0118] Sixth, Industrial Field Experiment and Performance Evaluation: This embodiment underwent a one-month field test at an automotive parts factory, with five workers participating in the experiment, handling 15-25 kg parts 150-200 times per day on average. In the task of handling a 20 kg cast iron flywheel, the system's average response delay was 258 ms, the average joint trajectory following error was 2.3 degrees, and the standard deviation was 0.9 degrees. The encoder feedback position accuracy reached ±0.3 degrees, and the closed-loop control mechanism effectively compensated for the dynamic deviation caused by the load torque. The assistive effect was verified through an electromyography signal amplitude comparison experiment. After activating the exoskeleton assistance, the RMS signal amplitude of the worker's biceps brachii decreased by 58%, indicating that the exoskeleton effectively shared approximately 60% of the load. Worker subjective evaluations showed that 90% of participants believed the exoskeleton significantly reduced labor intensity, and shoulder and elbow fatigue was significantly reduced after each shift. Reliability testing showed that during an 8-hour shift, the system performed approximately 28,000 inference operations and generated approximately 23 million motor drive pulses without experiencing any loss of synchronization, overcurrent, or communication failures. The tested battery life was 8.5 hours, meeting the requirements for a single shift. Cost analysis revealed that the core system's material cost was approximately 1,850 yuan, significantly lower than traditional industrial exoskeleton systems (typically 8,000-15,000 yuan), demonstrating a substantial cost advantage.
[0119] The following presents a possible implementation of an exoskeleton position prediction and closed-loop stepping control method, which is used in the aforementioned system, including:
[0120] Collect surface electromyography (EMG) signals from both upper arms of the user;
[0121] Real-time acquisition of the absolute position and speed information of the closed-loop stepper motor;
[0122] The electromyographic features within a 256 ms sliding window are concatenated with the absolute position and velocity information to form a 10-dimensional input vector;
[0123] The three-dimensional position increment prediction value of the exoskeleton at the next moment is obtained by inferring through a one-dimensional convolutional regression network embedded in the flash memory of the microcontroller.
[0124] The predicted position increment is converted into stepper motor pulse commands and then compared with the real-time position of the motor in a closed loop to achieve zero-delay tracking control of the exoskeleton movement.
[0125] First, surface electromyography (EMG) signals from both upper arms of the user are acquired using a configurable sampling frequency ranging from 500 Hz to 2 kHz. Simultaneously, the absolute position and velocity information of the closed-loop stepper motors driving the joints are acquired in real-time at a frequency of 1 kHz. Next, the system fuses and concatenates the EMG signal features within the most recent 256-millisecond sliding time window with the absolute position and velocity information to construct a 10-dimensional input feature vector. Then, a one-dimensional convolutional regression network based on the CMSIS-NN library, embedded in the on-chip Flash of the STM32H750XBH6 microcontroller, performs real-time inference on this input vector to obtain the predicted position increment of the exoskeleton in three-dimensional space at the next moment. Finally, the system converts this predicted position increment into corresponding stepper motor pulse commands and immediately performs closed-loop correction and compensation with the real-time position information fed back from the motors, thereby achieving early judgment of the wearer's movement intentions and zero-delay smooth tracking control.
[0126] In a specific embodiment of this application, the system's operation process and technical effects are described in detail below:
[0127] Device Wearing and Initialization: First, the exoskeleton is worn on the user's right upper arm, forearm, and hand, and the straps are adjusted to ensure a comfortable fit. Then, two surface electromyography (EMG) electrodes are attached to the biceps and triceps muscles of the user's right upper arm. These electrodes are connected via flexible wires to a microcontroller unit housing (model STM32H750XBH6) fixed to the back of the exoskeleton. After power-on, the system automatically executes a calibration procedure, records the user's baseline EMG signal at rest, and completes system initialization. Initialization configuration includes setting the EMG signal sampling frequency to 500 Hz and the corresponding sliding time window length to 128 data points, corresponding to a time length of 256 ms.
[0128] Training Task Execution: At the start of rehabilitation training, the therapist sets the training task through the system's human-machine interface. When the patient attempts to actively extend their right arm and open their fingers, the system enters its real-time workflow: the electromyography (EMG) signal acquisition unit synchronously acquires surface EMG signals from both upper arms at a frequency of 500 Hz. The signals are amplified by a differential amplifier circuit, filtered by a 50 Hz notch filter to remove power frequency interference, and digitized to 12 bits effective resolution through a cascaded 8-bit external ADC and an on-chip 16-bit ADC. The digitized signals are cyclically stored in SRAM using a DMA double-buffer mechanism, with each 256 ms data accumulation forming a complete sliding window. The neural network processing unit then extracts features from the signals within this time window, calculating three types of features: root mean square envelope, zero-crossing rate, and wavelength, generating a total of 6-dimensional EMG feature vectors from both sides. Simultaneously, the closed-loop stepper motors integrated into the elbow and wrist joints transmit signals via their 12-bit magnetic encoders at a frequency of 1... The current angle information is fed back at a kHz frequency. The microcontroller calculates the angular velocity and angular acceleration in real time and combines them with the control input from the previous moment to form a 4D motor state feature. The above 10-dimensional feature vector is input into an INT8 quantized one-dimensional convolutional neural network model embedded in the on-chip Flash. This model sequentially performs a forward inference process with a 7x16 kernel, ReLU activation, average pooling, a 5x32 kernel, ReLU activation, average pooling, flattening, a 64-node fully connected layer, ReLU activation, and a 3-node output, taking approximately 0.8 ms. It outputs the predicted elbow and wrist joint position increments and hand opening / closing increments. The dual closed-loop control unit superimposes the predicted position increments onto the current position to generate the target position. After the position loop calculates the error, the speed loop dynamically adjusts the pulse frequency. Finally, the STEP / DIR signal is output through the pulse generation timer to drive the stepper motor to perform the action. The motor response time is approximately 2 ms. With real-time feedback and correction from the encoder, the closed-loop stepper motor accurately reaches the target position with a repeatability accuracy of 0.1 degrees. The total latency of the entire system from intent recognition to exoskeleton execution of actions is no more than 260 ms, including 256 ms sliding window, 0.8 ms inference time, 2 ms motor response time, and about 1 ms of other processing time, thus enabling the exoskeleton to synchronously follow the patient's intention to extend their arm and open their hand.
[0129] Training process monitoring and adjustment: After the patient successfully touches the target ball, the system records the electromyographic characteristics, predicted movement trajectory, actual movement trajectory, and control commands of this movement in local memory. The therapist can view the training report generated by the system via a wireless communication interface. The report may include the number of movements completed, average response delay, trajectory following error, and the improvement of electromyographic signal amplitude relative to historical data. The system has an adaptive assist force adjustment function. When the system detects that the patient's electromyographic signal intensity exceeds a preset threshold, it will gradually reduce the proportion of motor drive torque, guiding the patient to rely more on voluntary muscle strength to complete the movement, thereby achieving personalized rehabilitation training.
[0130] Training Completion and Assessment: After completing the set training duration, the system automatically generates a rehabilitation assessment report. The report quantifies the training effect, for example, showing a 12-degree increase in the active range of motion of the patient's right upper limb compared to before training, a 22% increase in the average RMS value of electromyography signals, and a 15% reduction in movement completion time. After training, the patient removes the exoskeleton, and the system automatically switches to a low-power standby mode, at which point the overall power consumption can be reduced to 50 mW. The rehabilitation therapist can wirelessly upload all data from this training session to the hospital's rehabilitation management system for long-term efficacy tracking and analysis.
[0131] Technical Effects: By utilizing the characteristic that electromyographic (EMG) signals lead actual movements by approximately 150-200 ms and controlling the total system latency to within 260 ms, this system achieves real-time response to the patient's movement intentions. The patient's subjective experience is that the exoskeleton is synchronized with their own thoughts. In terms of control precision, relying on closed-loop stepper motors and dual closed-loop control algorithms, the system achieves a repeatability accuracy of up to 0.1 degrees for the shoulder, elbow, and wrist joints, reliably completing rehabilitation movements requiring fine trajectory tracking, such as grasping and extension. Regarding system integration and practicality, the core control unit is lightweight and requires minimal wearing effort; powered by a 5V / 2000mAh battery, the entire device has a battery life exceeding 8 hours, meeting the needs of all-day rehabilitation training. Furthermore, all EMG signal processing and artificial intelligence inference are completed within the local microcontroller unit, eliminating the need to upload patient physiological data to the cloud, thus effectively avoiding privacy risks and ensuring data security.
[0132] In another specific embodiment proposed in this application, the method is used in an industrial heavy-duty handling auxiliary system:
[0133] Application Scenarios: This implementation is designed for heavy-duty material handling operations in manufacturing workshops. For example, in an automotive parts factory, workers need to carry cast iron parts weighing between 15 and 25 kilograms to the assembly line for extended periods, with an average of over 200 carrying trips per day. Such repetitive, high-load work easily leads to chronic strain injuries in joints such as the shoulders and elbows. By applying the exoskeleton position prediction and closed-loop stepping control system described in this invention, the labor intensity of workers can be effectively reduced and work efficiency improved.
[0134] System Configuration and Operation Preparation: Before the operation begins, the worker first dons a specially designed exoskeleton vest. This vest integrates closed-loop stepper motors and drive mechanisms with 12-bit magnetic encoders at the shoulder, elbow, and wrist joints. Waterproof surface electromyography (EMG) electrodes are attached to the outer sides of both upper arms, with electrode leads routed along the inside of the vest, ultimately connecting to a microcontroller housing fixed to the waist. After the system is powered on, the microcontroller automatically performs a self-test process, including checking the ADC channel status, initializing the DMA buffer, verifying the integrity of the INT8 quantization model in Flash memory, and confirming the communication link with the motor encoder. The system is configured in high sampling rate mode, with the EMG signal sampling frequency set to 2 kHz and the corresponding sliding time window length set to 512 points to accommodate rapid movements in industrial settings. The worker then completes five standard arm-raising and lowering movements, and the system records their baseline EMG characteristics and movement habit data for subsequent personalized model fine-tuning.
[0135] Heavy-duty handling operation process: When a worker approaches the shelf and intends to lift a heavy object, the muscles in both upper arms begin to pre-activate, and the amplitude of the surface electromyography (EMG) signal rises rapidly. The system's real-time workflow then begins: the EMG signal acquisition unit acquires the raw signal at a high speed of 2 kHz, amplifies it through a differential amplifier circuit with software-configurable gain, and filters out power frequency interference in the industrial environment using a 50 Hz notch filter circuit; a DMA double buffer mechanism ensures that the high-speed data stream is not lost, and a 512-point sliding window is cyclically updated in SRAM. The neural network operation unit triggers an inference calculation every 256 ms: extracting the EMG features and motor state features within the current time window, which together form a 10-dimensional input vector. This vector is input to a fixed 1D-CNN model optimized by the CMSIS-NN library for inference, taking approximately 0.9 ms, and outputting the predicted position increment values of each joint. The dual closed-loop control unit responds immediately: the position loop generates the target position based on the predicted increment and the current position; the speed loop dynamically increases the upper limit of the pulse frequency to 5 kHz to ensure driving torque based on the heavy load situation identified through motor current sampling; the pulse timer then outputs high-frequency pulses to drive three sets of stepper motors, causing the exoskeleton joints to move to the predicted position in advance. When the worker actually grabs the 20 kg flywheel and begins to lift, the load torque may cause a deviation of about 0.3° in the encoder feedback position. The closed-loop control algorithm immediately compensates for this, ensuring that the position following error is less than 0.5°. During this process, the exoskeleton motors provide about 60% of the lifting assistance torque, reducing the equivalent load on the worker's shoulder and elbow joints to about 8 kg, significantly reducing the pressure. The total delay from intention generation to execution is about 258 ms, giving the worker the subjective experience of "exoskeleton predicting the action".
[0136] During the subsequent transport of the parts to the assembly line several meters away, the system continuously acquired electromyographic (EMG) signals at 2 kHz and updated its predictions every 256 ms. In phases requiring upper limb stability, such as walking, the EMG signals changed gradually, and the neural network prediction increment approached zero. The system entered a hold mode, using closed-loop control to counteract disturbances caused by gait variations. During the lowering phase, the EMG signals exhibited characteristic changes again, and the system predicted that the joint needed to extend. It then guided the exoskeleton to assist in completing a controlled lowering motion, avoiding impact.
[0137] Continuous Operation Performance and Statistics: During a 2-hour shift, workers completed approximately 180 handling operations, and the system operated stably. The neural network inference executed approximately 28,000 times with an average time of 0.92 ms; the motor drive pulses accumulated approximately 23 million times without any loss of synchronization; the encoder provided approximately 7.2 million sets of feedback data, and the closed-loop correction compensated for approximately 4,500° of angle error. The microcontroller's on-chip resource usage remained stable, with 87 kB of model parameters and a peak SRAM usage of 58 kB. The overall power consumption was 50 mW in standby, 800 mW in light load, and 1.15 W in heavy load. Powered by a 5V / 5000 mAh battery, it can support approximately 8.5 hours of continuous operation, meeting the needs of a single shift. After the shift, workers can view statistical reports via Bluetooth Low Energy on a mobile app, including quantitative data such as cumulative handling weight, auxiliary torque ratio, and joint load reduction, to assess the auxiliary effect and long-term health benefits.
[0138] Technical Effects: In this industrial application scenario, the system of this invention exhibits the following technical effects: By providing approximately 60% of the auxiliary torque, the equivalent load when a worker handles a 20 kg part is significantly reduced to approximately 8 kg, effectively alleviating shoulder and elbow joint pressure and work fatigue; the system's total latency of less than 260 ms, with its advance prediction and synchronous response capabilities, shortens the average handling time by approximately 10%, improving work efficiency; the control strategy based on a closed-loop stepper motor and real-time position feedback ensures the system's operational stability and safety even under conditions of sudden load changes, avoiding step loss or position drift; the single-chip integration solution using STM32H750 simplifies the hardware structure, enhances reliability, optimizes power consumption, and provides strong battery life; the overall system material cost is significantly lower than traditional industrial exoskeleton solutions, making large-scale factory deployment economically feasible.
[0139] Compared with the prior art, the embodiments of this application have the following beneficial effects:
[0140] First, by fusing electromyographic and motor data through a 256-millisecond sliding window and utilizing a lightweight network embedded in a microcontroller to complete inference within 1 millisecond, it can predict the combined movement positions of the shoulder, elbow, and wrist 150-200 milliseconds in advance. Combined with a prediction-execution pipeline with a total latency of no more than 260 milliseconds, the exoskeleton can synchronously respond to user intentions, fundamentally solving the problem of sluggish response in traditional exoskeletons.
[0141] Secondly, all signal acquisition, AI inference, and motion control processes are completed within a single STM32 chip, eliminating the need for an external industrial control computer or AI accelerator. This results in a core system size of only 50x30x8 mm and a weight of less than 25 grams, allowing it to be directly embedded in an exoskeleton strap, thus improving the device's portability and user comfort.
[0142] Third, a closed-loop stepper motor with an integrated 12-bit magnetic encoder is used, and the predicted trajectory is corrected in real time through position-speed dual closed-loop control. This improves the repeatability accuracy of the shoulder and elbow joints to within 0.1 degrees, enabling reliable execution of rehabilitation and assisted movements that require fine trajectory tracking, such as grasping and extension.
[0143] Fourth, through extreme optimization of INT8 quantization and the CMSIS-NN library, the neural network inference power consumption is only 30 milliwatts. The entire system consumes less than 1.2 watts under 5V power supply, with a battery life of more than 8 hours, which is sufficient to support a full day of rehabilitation training or assisted work. Moreover, it does not require a cooling fan, ensuring the device's quiet operation and reliability.
[0144] Fifth, all acquisition, analysis, and control decisions involving personal biosignals and motion data are completed on the device itself; wireless communication is only used for non-real-time data recording. This architecture ensures that sensitive physiological data does not need to be uploaded to the cloud, effectively avoiding the risk of information leakage.
[0145] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. An exoskeleton position prediction and closed-loop stepping control system, characterized in that, include: The microcontroller unit is used to perform electromyography signal acquisition, neural network inference, pulse generation and closed-loop correction functions within a single chip; The electromyography (EMG) signal acquisition unit is connected to the microcontroller unit and is used to acquire surface EMG signals from both upper arms of the user, preprocess the surface EMG signals and extract features, and output digital EMG features. The motor position feedback unit is connected to the microcontroller unit and is used to acquire the absolute position and speed information of the closed-loop stepper motor in real time. The neural network operation unit, integrated into the microcontroller unit, implements a one-dimensional convolutional regression network based on the CMSIS-NN library. It concatenates digital electromyographic features with the absolute position and velocity information of the closed-loop stepper motor into a multi-dimensional input vector to predict the three-dimensional spatial position increment of the exoskeleton in the next moment. The dual closed-loop control unit, connected to the microcontroller unit, is used to convert the predicted value of the three-dimensional spatial position increment into the stepper motor control command, and perform closed-loop correction in combination with the real-time position of the motor. Zero-delay tracking control is achieved through a predictive-execution parallel pipeline. The dual closed-loop control unit includes: The position loop is used to compare the predicted position increment with the real-time position of the motor, generate a position error signal, and output a speed reference value using a PD control law. The speed loop is used to calculate the correction amount of the motor pulse frequency based on the position error, and a PI control law is used for amplitude limiting. A pulse generator timer is used to generate stepper motor drive pulses based on the corrected frequency, enabling control to advance to the next predicted position. The system uses a sliding time window to cache and splice electromyographic signals and motor states; The sliding window is stored cyclically in SRAM using a DMA double-buffering mechanism; The neural network processing unit calculates the root mean square value, zero-crossing rate, and wavelength of the bilateral surface electromyography signals within the sliding time window, forming a 6-dimensional electromyography feature vector. The real-time angle information obtained by the motor position feedback unit is subjected to first-order and second-order difference operations to obtain angular velocity and angular acceleration, which are then combined with the angle values to form a 3D motor dynamic state vector. The 6-dimensional electromyographic feature vector, the 3-dimensional motor dynamic state vector, and the motor control quantity from the previous control cycle are concatenated into a multi-dimensional input vector.
2. The exoskeleton position prediction and closed-loop stepping control system as described in claim 1, characterized in that, The electromyography signal acquisition unit includes a differential amplifier circuit, a notch filter circuit, and an analog-to-digital converter circuit; The differential amplifier circuit uses a low-noise instrumentation amplifier for signal amplification; Notch filters are used to filter out power frequency interference; The analog-to-digital conversion circuit is composed of an external ADC and an on-chip ADC within the microcontroller unit cascaded together.
3. The exoskeleton position prediction and closed-loop stepping control system as described in claim 1, characterized in that, The motor position feedback unit uses a hybrid closed-loop stepper motor, which integrates a magnetic encoder. The magnetic encoder feeds back the absolute angular position data of the motor rotor to the microcontroller unit in real time via the SPI communication interface; The microcontroller unit filters the received absolute angle position data.
4. The exoskeleton position prediction and closed-loop stepping control system as described in claim 1, characterized in that, The hierarchical structure of a one-dimensional convolutional regression network includes, in sequence: a first convolutional layer, a first activation layer, a first average pooling layer, a second convolutional layer, a second activation layer, a second average pooling layer, a flattening layer, a fully connected layer, a third activation layer, and an output regression layer. The three nodes of the output regression layer correspond to the position increments of the exoskeleton in the X, Y, and Z directions of space, respectively. The one-dimensional convolutional regression network has been quantized with INT8 integers before execution.
5. The exoskeleton position prediction and closed-loop stepping control system as described in claim 1, characterized in that, The neural network processing unit is also used to map the three-dimensional spatial position increments to the angle increments of the shoulder, elbow, and wrist joints, respectively. The angle increment is smoothed by filtering. The smoothed joint angle increment is superimposed with the current actual joint angle obtained by the motor position feedback unit to generate the target tracking position of each joint, which is then sent to the dual closed-loop control unit.
6. A method for exoskeleton position prediction and closed-loop stepping control, characterized in that, The method is applied to the exoskeleton position prediction and closed-loop stepping control system of any one of claims 1-5, including: Collect surface electromyography (EMG) signals from both upper arms of the user; Real-time acquisition of the absolute position and speed information of the closed-loop stepper motor; The electromyographic features within the sliding window are concatenated with the absolute position and velocity information to form a multidimensional input vector; The steps of concatenating the electromyographic features within the sliding window with the absolute position and velocity information into a multidimensional input vector include: For bilateral surface electromyography signals within the sliding time window, the root mean square value in the time domain, the zero-crossing rate, and the wavelength are calculated to form a 6-dimensional electromyography feature vector. The real-time angle information obtained by the motor position feedback unit is subjected to first-order and second-order difference operations to obtain angular velocity and angular acceleration, which are then combined with the angle values to form a 3D motor dynamic state vector. The 6-dimensional electromyographic feature vector, the 3-dimensional motor dynamic state vector, and the motor control quantity from the previous control cycle are concatenated together to form a multi-dimensional input vector. By using a one-dimensional convolutional regression network embedded in the microcontroller chip, the predicted value of the three-dimensional position increment of the exoskeleton at the next moment is obtained through inference. The predicted position increment is converted into stepper motor pulse commands and then compared with the real-time position of the motor in a closed loop to achieve zero-delay tracking control of the exoskeleton movement.
Citation Information
Patent Citations
Upper limb exoskeleton rehabilitation robot control method based on radial basis neural network
CN107397649A
Exoskeleton joint angle prediction method and system based on sEMG signal
CN111643321A