DNN-Based FES Control for Gait Rehabilitation of Hemiplegic Patients

: In this study, we proposed a novel machine-learning-based functional electrical stimulation (FES) control algorithm to enhance gait rehabilitation in post-stroke hemiplegic patients. The electrical stimulation of the muscles on the paretic side was controlled via deep neural networks, which were trained using muscle activity data from healthy people during gait. The performance of the developed system in comparison with that of a conventional FES control method was tested with healthy human subjects. studied to predict the operation time of FES and to alert the impending exhaustion of muscle activity for safe use of the developed system. This study focused on the FES-induced ankle motion by stimulating the TA and the soleus only, while hemiplegia affects the motion of other joints. In our future work, we plan to apply the developed algorithm to the rehabilitation of knee and hip movements, as well as ankle movement. The FSR-based method used in this study is limited to coarse detection of the gait state, and additional sensors such as IMU can allow finer prediction of the gait phase. The recent development of the multi-pad electrode enables FES control of the muscles of various sizes. The novel sensor and FES technologies can be applied to the system developed in this study to extend its application to the rehabilitation of various lower extremity motor functions. The proposed FES control can be applied more effectively in combination with exoskeleton-type rehabilitation robots. Further studies are required to address redundant actuation issues with hybrid rehabilitation systems of FES and exoskeleton robots.


Introduction
A stroke occurs when the blood supply to the brain is blocked by an ischemic or hemorrhagic event due to a thrombus inside the blood vessel [1]. Strokes are commonly accompanied by several functional disorders such as muscle paralysis, speech-language disorders, memory problems, and emotional problems depending on the degree of brain damage [2]. Approximately 50% of stroke patients suffer from hemiplegia, a major cause of immobility, which degrades patients' quality of life. In the entire rehabilitation process, restoration of mobility is the first priority. Among the various types of mobility impairments, foot drop caused by spasticity of the ankle joint is the most common in hemiplegic patients [3,4].
To alleviate spasticity and improve functionality in post-stroke patients, many studies have been conducted on physical and neurological treatments, such as exercise therapy and electric stimulation therapy [5][6][7]. Among these treatments, functional electrical stimulation (FES) is one of the most widely used methods for the rehabilitation of poststroke hemiplegic patients. Using FES, muscles can be directly contracted to elicit joint movement by evoking a series of low-energy electrical impulses (action potentials) to excite nerves or muscles. In addition, FES has an advantage over other physical rehabilitation methods in terms of treating neurological injuries, including neural plasticity [8][9][10].
Many studies have proven that gait ability can be improved by using FES for isometric contraction therapy and walking therapy for the paretic limb [8,11]. Liberson et al. demonstrated an improvement in dorsiflexion in post-stroke patients after FES-based treatment [12]. Chae et al. demonstrated that FES-aided walking influences afferent inputs to the central nervous system, which can improve brain plasticity [12,13].
In the application of FES to gait assistance, the amplitude and timing of the FES signal needs to be adequately controlled. Through tuning of the amplitude and timing, the optimal envelope of the FES signal can be acquired to generate walking motion. Early studies employed a rectangular pattern of the FES signal with on/off switching only [12]. Subsequent studies introduced the trapezoidal envelope with ramp up/down for the FES signal to relieve muscle fatigue that can be caused by abrupt changes in the electric stimulus in the rectangular pattern [14].
It was argued that neither the rectangular on/off pattern nor the trapezoidal pattern of the FES envelope was close to the electromyogram (EMG) patterns observed during natural walking [15][16][17]. Researchers have attempted to enhance the rehabilitation outcome by designing the envelope of the FES signal to match the EMG patterns acquired from natural movements. Lyons et al. demonstrated that the dorsiflexion angle increased by 76%, and the overall current decreased by 47% when an electrical stimulation pattern close to the natural EMG envelope was employed [15]. These studies employed a rather simple approach by mapping the EMG envelope to the intensity of the FES. However, this approach had limitations in terms of the generation of accurate muscle forces required for producing natural gait motion.
To generate a natural movement, the relationship among FES, EMG, and the required joint torque and motion should be identified. Frigo et al. estimated the joint torque based on the measurement of evoked EMG, which was a combined signal of volitional EMG and FES artifacts measured using surface electrodes [18]. The drawback of this method was that the estimation was highly sensitive to the measurement of EMG, where the measurement was easily affected by external disturbances and electrode attachment conditions. Koji et al. investigated the relationship between the joint torque and FES intensity through isometric contraction tests. Their experimental results yielded a linear model for the joint torque and FES amplitude [19]. This linear model was used to simply estimate the FES intensity, which was required to produce the target joint torque. However, the model was inappropriate for the estimation of joint torque during dynamic body movements owing to the complexity of the neuromusculoskeletal system of the human body [20]. Other researchers employed Hill's muscle model consisting of a mechanical spring and a damper to estimate joint torque based on EMG data [21,22]. While this approach was robust in the application of muscle stimulation, it suffered from variability in EMG measurement caused by electrode reposition, skin condition, and muscle fatigue [23].
In recent years, machine learning has been actively used in various applications. Machine learning algorithms can learn from training data to make estimations, predictions, or decisions by themselves. Among the many developed machine learning techniques, deep neural networks (DNNs) have shown outstanding performance in handling nonlinearity and noisy signals. As an alternative to mathematical models for the human musculoskeletal system, such as Hill's muscle model, the DNN model can be used to estimate the joint torque to produce a desired motion. Recent studies have shown that a DNN model is capable of estimating the joint torque in the presence of high noise in biosignals [24][25][26][27]. Li et al. demonstrated that estimation accuracy can be improved by using biosignal data from agonist and antagonist muscles, rather than from agonists alone [28]. Among many DNN models, the convolutional neural network (CNN) appears to be a promising model for many applications such as estimation models for biosignals, medical image segmentation, and medical diagnosis [29][30][31][32]. Specifically, it performs well in extracting features from time-series data, such as EMG [32].
To predict the required joint torques for the motion of the paretic limb using a neural network model, a natural choice for the input to the network would be EMG signals from the unaffected limb [33][34][35]. Bong et al. developed a robotic rehabilitation system with a muscle-to-muscle interface for post-stroke hemiplegic patients [35]. In the rehabilitation system, the FES intensity on the target muscles at the paretic side was controlled by an online comparison of the EMG signals from the paretic and unaffected sides.
Therefore, we proposed a machine learning technique to control gait rehabilitation systems for hemiplegic patients. The FES input to the paretic side is generated based on EMG data collected from normal, natural gaits to provide a reference walking pattern for the paretic side. The envelopes of the EMG signals were functionalized for various walking speeds. Using the functionalized EMG data as the input, the neural network model predicted the desired joint torque, and the amplitude of the FES input to the paretic leg was determined using the linear relationship between the FES and joint torque. The effectiveness of the proposed technique was tested in healthy human subjects through isometric contraction and treadmill walking experiments. Its performance was compared with that of a trapezoidal envelope of FES intensity, which was conventionally used in clinical trials. The experimental results showed that leg motion could be improved by relieving muscle fatigue and increasing the range of joint motion with the proposed control system.
The remainder of this paper is organized as follows: Section 2 describes the proposed FES control algorithm. Section 3 explains the experiments conducted to test the FES control system. Sections 4 and 5 summarize and discuss the experimental results, respectively. Section 6 concludes and proposes future works. Figure 1 illustrates a schematic of the gait rehabilitation system for post-stroke hemiplegic patients. As the patient is incapable of generating sufficient muscle force and range of motion in the paretic side, the muscle activities induced by FES are designed to assist the patient to generate a natural gait motion with sufficient muscle force and range of motion. In the proposed rehabilitation system, the ground reaction forces on the unaffected and paretic sides were measured using force-sensitive resistors (FSR) to determine the gait phase and walking speed on the paretic side. With the gait phase and walking speed, the reference EMG envelopes for the muscles on the paretic side were determined. As it is difficult even for the patient's unaffected side to perform the muscle activities yielding normal, natural gait patterns, the reference EMG data were acquired from healthy subjects. Subsequently, the envelopes of the EMG signals were functionalized for various walking speeds. With the functionalized EMG envelope as the input, a DNN model predicted the joint torque for a specific gait phase, which enabled natural ankle movement of the paretic side. Using the linear model between the joint torque and FES intensity, the amplitude of the FES was determined based on the joint torque estimated by the DNN model. The FES signal applied to the muscles on the paretic side was controlled based on the foot-ground contact information.

Measurement and Processing of EMG Data
To provide a reference EMG for the paretic side, EMG data were collected from six healthy male subjects aged between 20 and 30 years. The EMG data were collected during treadmill walking through off-the-shelf wireless surface EMG electrodes (Delsys Inc., USA). The EMG was measured from the soleus and tibialis anterior (TA) with walking speeds ranging from 1 to 5 km/h. Since the soleus and TA are the prime movers of ankle motion (plantarflexion and dorsiflexion), the EMG patterns of the two muscles can be used to describe the muscle activities for ankle motion during gait.
The acquired EMG data were rectified using a 6th order high-pass filter (HPF) with a cutoff frequency of 40 Hz. Subsequently, the rectified EMG signals were divided into gait cycles with 1000 data points so that the signals could be ensemble-averaged over gait cycles. To determine the gait cycle and gait phase, wireless FSRs were attached to the soles of two feet to gather ON/OFF information at the heels and toes based on a predetermined threshold. Measurements from immovable contact points during gaits, such as the toes and the first metatarsal heads, were used to provide stable contact information.
The EMG signal was then normalized with respect to the peak value of the rectified EMG at a walking speed of 5 km/h. Figure 2 shows the ensemble average of rectified EMG from the soleus and tibialis anterior with varying walking speeds on the treadmill. The EMG magnitude of the upper 15% was considered as muscle activation, and the muscle activation during gait could be characterized as follows [36]: Based on the muscle activation model, the EMG envelopes were functionalized using trigonometric functions by using a curve fitting tool in MATLAB software (MathWorks, Natick, MA, USA). Functionalized EMG envelopes are shown in Figure 3. The minimum and maximum amplitudes of the functionalized EMG envelopes were chosen as feature points. Figure 3a,b show the feature points in the percentile gait cycle, where the soleus and TA had three and five feature points, respectively: S_1, S_2, and S_3 for the soleus and T_1, T_2, T_3, T_4, and T_5 for the TA. Figure 3c,d show the changes in the functionalized EMG envelopes depending on the changes in the walking speed. The observations from the gait experiments showed that the positions of all the feature points in the percentile gait cycle varied depending on the walking speed, except for T_3, as shown in Figure 3d.

Control of the FES Based on Reference EMG
To apply an FES capable of producing the desired EMG patterns, understanding the relationship between the reference EMG and its corresponding FES is essential. Few studies have addressed this issue; however, Koji et al. used a simple linear model mapping from EMG to FES [19]. The problems in controlling FES can be alleviated by subdividing the FES control into two stages: mapping from the reference EMG to the FES envelope and generating the FES signal depending on the gait phase.
In this study, the FES envelope was computed using a DNN model based on the reference EMG described in the previous section. The FES signals were applied to the target muscles according to the gait phase detected by the FSR sensors.

Mapping from EMG to FES
Mathematical models of the musculoskeletal system have been commonly employed to estimate the joint torque from the reference EMG [37]. However, through this modelbased approach, computing the muscle activities of musculoskeletal models from EMG signals is difficult [22].
Recently, machine learning techniques have been employed as an alternative to model-based approaches for joint torque estimation. Machine learning is an algorithm type that enables a computer to learn by itself without any specific guidelines for training conditions, and this approach has shown prowess in identifying an underlying pattern hidden inside a highly noisy dataset [26]. Among a variety of machine learning techniques, deep learning has become popular owing to its effectiveness in handling nonlinear problems with anti-noise robustness. DNNs are a type of artificial neural network (ANN) model based on multi-layer perceptron (MLP) and deep learning training. As a type of DNN model, a CNN, featuring convolution and pooling layers, has the strength in the extraction of key features of input data. While CNN is commonly used for two-dimensional input data such as images, one-dimensional CNNs (1D CNNs) are also effective in analyzing time-series data, such as EMG signals.
To estimate the required joint torque from the reference EMG, a combination of a 1D CNN and a fully connected MLP were employed in this study. The structure of CNN-MLP model is illustrated in Figure 4. In the network model, there were three 1D CNN layers in the series. Each 1D CNN had a convolution and pooling layer. The three convolution layers had a kernel size of 16 and a filter size of 128, and the three pooling layers had pooling sizes of 6, 4, and 2. The three 1D CNNs compute the convolution with stride lengths of 1, 0, and 1. After the 1D CNNs, the flattened layer was located to match the dimensions of the dataset. Following the flattening layer, five fully connected MLPs with layer sizes of 129, 128, 128, 64, and 1 were used in the series. For the activation functions of MLPs, the first four MLPs used rectified linear unit (ReLU), whereas the last MLP used a hyperbolic tangent function (Tanh) to take nonlinearity into account. For model training, the Adam optimizer was employed, which was stable and effective in training a DNN. To train the CNN-MLP model, the training data were acquired from isometric contraction tests using a customized apparatus described in Section 3.2.2, where the EMG at the soleus and TA and the corresponding ankle torque were measured. The dataset was divided into training, evaluation, and test sets with a ratio of 6:2:2. To avoid overfitting of the model, the training ended after it reached the fifth epoch of the dataset. The final root means square error (RMSE) value evaluated using the test dataset was 4.966.
The developed CNN-MLP model was employed to estimate the ankle joint torque from the reference EMG envelopes for the soleus and TA. Figure 5a-c show the footground contact information at the heel and toe on the paretic side, the reference EMG envelopes for the soleus and TA, and the estimated ankle joint torque, respectively.
Using the modulated EMG profiles as input, the CNN-MLP model estimated the joint torque at the ankle on the paretic side. As can be observed from the EMG data in Figure 2, the co-activation of the soleus and TA is rarely observed during gait, with the exception of the gait in the low-speed range (below 2 km/h). Under this assumption, the positive torque in Figure 5c indicates the plantar flexion solely by activation of the soleus, and the negative torque indicates dorsiflexion solely by the activation of the TA. The developed CNN-MLP model computes the joint torque to produce the desired motion on the paretic side. As for the FES signals to be applied to the target muscle on the paretic side, amplitude of the FES was modeled to be proportional to the joint torque, as in the study of [19]. As the soleus and TA were modeled to activate without co-contraction during cyclic gait motion, amplitudes of the FES to the soleus and the TA were proportional to the positive and negative joint torques, respectively.

Generation of FES Signal According to Gait Phase
To generate cyclic gait motion, it is essential to apply the FES signals to the target muscles at a correct time, considering the walking speed. The walking speed can be represented by the time difference of heel strikes (TDH), which is the difference between the times of heel-ground contact of the two feet, measured by FSR sensors. Based on the estimated TDH, the profiles of the reference EMG envelopes were determined and fed to the soleus and TA.
Along with the measurement from FSR sensors, the finite state machine (FSM) is commonly used to determine the state in the gait cycle [38,39]. In this study, a thresholdbased FSM with FSR sensors was used to determine the gait phase because it is highly accurate for both indoor and outdoor environments with a low computational demand [40]. Figure 6 illustrates that the FSM-based control algorithm modulates the amplitude and duration of the FES for the soleus and TA. In one gait cycle, there are three states, and the gait state is determined by the on/off signals from the four FSR sensors on the two feet. Depending on the gait state, different control laws were applied to produce FES signals to the soleus and TA. State 1 starts at the heel strike on the paretic side. As state 1 starts, a new gait cycle is initiated, and the TDH is updated. In state 1, the reference EMG for the soleus was updated based on the newly updated TDH, while that of the TA was identical to the previous gait cycle. The reference EMG data were fed into the DNN model to yield the joint torque. Subsequently, the FES signals proportional to the positive and negative joint torques were applied to the soleus and TA, respectively.
State 2 starts at the toe strike on the paretic side. The reference EMG for the TA is updated based on the current TDH, whereas the FES signal for the TA was set to zero. In state 2, the FES signal was applied to the soleus only, based on the reference EMG for the soleus.
State 3 is the swing phase and starts at toe-off on the paretic side. In state 3, the FES for the soleus was set to zero, and the FES signal was applied to the TA only, based on the reference EMG for the TA.
When the FSR sensors detect the loss of foot-ground contact for both feet, the control algorithm enters the emergency stop state and sets the FES for the soleus and TA to zero.

Experiments
While the developed system was designed for the rehabilitation of hemiplegic patients, healthy human subjects were used for testing as a preliminary evaluation of the system. The developed DNN-based FES envelope prediction system was compared with a conventional system using a trapezoidal FES envelope, which is widely used in commercial FES devices. Performance of the two systems (DNN-based envelope (DBE) and TE (trapezoidal envelope)) was compared considering the following factors: (1) the range of motion of the ankle joint during treadmill gait at various walking speeds, and (2) muscle fatigue after the repetitive isometric contraction of the ankle joint.
In this study, 11 healthy male subjects aged between 20 and 30 years participated in the experimental tests. From six subjects, EMG data during treadmill gait were collected, and the data were used to train the DNN model, as described in Section 2.2. Five subjects participated in the comparison tests of the DBE and TE. Each subject was fully informed about the features of the developed system and procedures of the experiments before signing a consent form. The experiments involving human subjects were approved by the Institutional Review Board of Korea University in Seoul, Korea (KUIRB-2019-0061-01).

FES Control System
A dual-channel FES unit (Roscoe Medical, USA) was used to stimulate the soleus and TA (Figure 7a). A microcontroller unit (Arduino, Italy) was used to control the FES device using Bluetooth wireless communication. The FES signal with a frequency of 40 Hz and pulse width of 200 µs was applied to human subjects. The maximum amplitudes of the FES were determined by the pain threshold of each subject. Modularized wireless EMG sensors (Delsys Inc., Boston, MA, USA) were used to measure muscle activity in the soleus and TA of the subjects. The bipolar surface electrodes were positioned on the skin surface of the bellies of the muscles along with the muscle fiber directions. The skin surface, where the electrodes were placed, was shaved and scrubbed. The EMG sensors were then fastened using elastic bandages to avoid noises caused by electrode movements.
A pair of customized shoes with four FSR sensors (Ohmite Manufacturing Co., Rolling Meadows, IL, USA) was used to detect foot-ground contact at the heel and toe in contact. The FSR sensors were attached to the soles of the heel and the first metatarsal head of the shoes. To measure the joint angles at the ankles, goniometers were taped to the shoes. The signals from the sensors were transmitted to the microcontroller unit using XBee modules (Digi International, Minnetonka, MN, USA) attached to the lateral sides of the shoes. The total weight of the shoe and the wireless communication module was about 120 g, which is light enough to barely affect normal walking.
The EMG and goniometer data were sampled using a data acquisition device (National Instruments, Austin, TX, USA) at a frequency of 1 kHz, while the FSR data were sampled at 250 Hz.

Treadmill Tests
The performance of the FES envelope predicted by DNN was compared with that of the conventional trapezoidal envelope in treadmill walking tests. Figure 8 shows the experimental setup with the FES control system. In the treadmill tests, each subject was instructed to walk naturally on the treadmill at five different walking speeds: 1, 2, 3, 4, and 5 km/h. The subject was equipped with the FES control system, as described in Section 3.1. For each walking speed, the two FES envelopes (DBE and TE) were applied in a random order, so that the subjects were not aware of which FES envelope was being used. To avoid the effect of muscle fatigue, more than 10 min of rest was given to each subject between the tests with the two FES envelopes. The duration of the test session for each walking speed was 30 s following 15 s of transition time for the subject to adapt to the speed. The range of motion of a joint during gait can be used as one way to assess the closeness of FES-induced walking to natural walking. Using a goniometer, the joint angle at the ankle was measured while the subject was walking on the treadmill. Performance of the DBE and TE were compared regarding the range of motion of the ankle joint during treadmill gait.

Isometric Contraction Tests
In the treadmill tests, sufficient rest time was given between test sessions to eliminate the effect of muscle fatigue on the experimental results. Another issue associated with muscle fatigue is safety. Treadmill walking with exhausted muscles can cause accidents, such as trips and falls, which may lead to injury. For safety reasons, we conducted isometric contraction tests, rather than treadmill tests, to compare the effects of FES envelopes on muscle fatigue.
For the isometric contraction tests, a customized device was built for this study, as shown in Figure 9. This device restricted the motion of the ankle joint and measured the joint torque in both plantar flexion and dorsiflexion. The joint torque could be calculated by the product of the force, measured by the load cell, and the distance between the load cell and ankle joint. Furthermore, one foot of the subject was strapped firmly to the device for isometric conditions, while the subject was sitting on a chair positioned in front of the device. The soleus of the strapped leg was stimulated by two different FES envelopes. Both FES envelopes were set to correspond to those for a gait of 3 km/h. The duration of the stimulation for isometric contraction was set to 5 min, which was long enough to cause FES-induced muscle fatigue.
To estimate muscle fatigue, surface EMG at the soleus was measured before and after FES stimulation. For the EMG measurement, each subject was asked to sustain 90% of their maximum voluntary isometric contraction (MVIC), where the MVIC for each subject was obtained before the isometric contraction tests. During 30 s of voluntary isometric contraction, the force was monitored by a loadcell. The EMG data were collected only when the force was maintained at a constant level.
FES-induced muscle fatigue could be estimated based on the changes in EMG before and after FES stimulation. As an index to assess muscle fatigue, changes in the median frequency (MDF) of EMG signals are commonly used [41]. A decrease in the MDF of the EMG signal indicated the amount of muscle fatigue. Performance of the DBE and TE were compared based on the decrease in MDF of the EMG signal before and after FES application.

Results
This section presents the experimental results of the treadmill and isometric contraction tests. Figure 10 shows a typical experimental result during treadmill gait at a walking speed of 3 km/h. Figure 10a plots the FES results for the TE and DBE, and Figure 10b compares the ankle joint angles generated by FES-induced muscle contractions in the cases of the TE and DBE. Figure 10b shows that the difference between the two joint angles was conspicuously between 55 and 90% of the gait cycle, which corresponded to the period from the maximum dorsiflexion in the stance phase to the mid-swing phase. The largest difference occurred at 70% of the gait cycle around the maximum plantarflexion of −5.969 and −8.203 for the TE and DBE, respectively. A larger plantarflexion of the DBE case suggested that the soleus was stimulated more effectively to produce a higher thrust force during the stance phase.  Figure 11 compares the maximum plantarflexion angles generated by the TE and DBE for five subjects at five different gait speeds. The results showed that the maximum plantarflexion by using DBE was larger than that of the TE with a statistically significant difference for most of the cases. The only exceptions were subjects 1 and 2 in a higher walking speed range. For subject 1, the maximum plantarflexion was larger with the TE at 4 and 5 km/h. Moreover, for subject 2, the maximum plantarflexion was larger with the TE at 4 km/h. However, differences in the exceptional cases were statistically insignificant.  Figure 12 shows a typical plot of the MDF of EMG from the soleus before and after a 5 min isometric stimulation. The MDF was computed in the window with a data size of 1000 ms and a stride length of 500 ms. In addition, the MDF of each window is represented by the blank dots. The average MDF over one bout of contraction was indicated by the broken lines. A decrease in the MDF indicated the amount of FES-induced muscle fatigue after each stimulation. Figure 12. MDF of EMG from the soleus before (black) and after (gray) 5 min contraction. Figure 13 compares the reduction ratios of the MDFs of the EMG signals after each stimulation using the TE and DBE. Figure 13a shows that the reduction ratios of MDF in the soleus were smaller with the DBE for all subjects. This result demonstrates that FESinduced fatigue in the soleus could be significantly alleviated using the DBE. However, unlike in the soleus, the difference between the reduction ratios with the DBE and TE appears to be insignificant in the TA, as shown in Figure 13b.

Discussion
Performance of the DNN-based FES control algorithm was assessed experimentally and compared with a conventional FES control method with a trapezoidal envelope.
The results from the treadmill tests showed that the proposed method could generate larger ranges of motion in the push-off phase, as could be deduced from the maximum plantarflexion angles. Therefore, a larger thrust force could be produced with the proposed control system [42,43]. The treadmill tests were performed with five subjects at five different walking speeds (a total of 25 cases). There were three exceptional cases in which the maximum plantarflexion angles were larger with the TE, without statistical significance.
The results of isometric contraction tests indicated that FES-induced muscle fatigue in the soleus could be relieved by using the DNN-based FES control system, as a decrease of MDF in the EMG signals proved. However, an insignificant difference was observed in the muscle fatigue of the TA. A possible explanation would be that the TA was not required to produce much work during gait, compared with the soleus, which required a relatively large amount of work to generate push-off force.
The consideration of electric energy consumption was critical for the operation of battery-operated FES devices. Efficient FES control can decrease battery energy consumption to enable longer operation times. The time integral of the FES signal applied to the muscle can be used to indicate the electric energy consumption by the FES device. Figure 14 compares the time integrals of the FES signals generated by the TE and DBE over one gait cycle. The ratio of time integral with the DBE to that of the TE was computed for the FES from the soleus and TA at five different gait speeds. Therefore, the electric energy distribution by the DBE amounts to between 70 and 90% of that of the TE in the soleus. In the TA case, the ratio was nearly 100%, showing no advantage of the DBE over TE. Consequently, the electric energy consumption and FES-induced fatigue could be reduced by using the DBE, which is advantageous in the battery management of FES devices.

Conclusions
In this study, we developed a novel gait rehabilitation system controlled by deep neural networks (DNNs) to provide functional electric stimulation (FES) for hemiplegic patients. The DNN-based controller computed amplitude of the FES on the paretic side based on the reference EMG and walking speed. The reference EMG was computed by functionalizing the EMG envelopes acquired from the treadmill gaits of healthy human subjects at various walking speeds. For the training data of the DNN, the EMG data and its corresponding joint torque were collected during isometric contraction tests with healthy human subjects.
The DNN algorithm (CNN-MLP) was implemented on the FES control system to stimulate the soleus and TA during gait, and its performance was assessed in comparison with a conventional method based on the trapezoidal FES envelope considering the range of motion of the ankle joint during treadmill gait, amount of FES-induced fatigue after isometric stimulation, and amount of energy consumption. The experimental results showed that the proposed FES control system could produce a larger range of motion with reduced muscle fatigue and less energy consumption by providing a smooth and timely assistive force compared to the conventional FES control method.
In addition, we aimed to develop an FES control algorithm to produce natural gait patterns in hemiplegic patients. By generating FES signals for the paretic side based on EMG data of healthy people, the burden on the muscles was effectively relieved while providing sufficient thrust force. Unlike conventional FES control methods with on/off step-like patterns or trapezoidal patterns, the smooth FES pattern can alleviate the impact on the muscles and electric energy consumption of the control device.
The developed FES control algorithm is expected to be effective for chronic hemiplegia with a low degree of disability. However, further clinical evaluations are necessary. Furthermore, the long-term effect of muscle fatigue induced by FES should be further studied to predict the operation time of FES and to alert the impending exhaustion of muscle activity for safe use of the developed system. This study focused on the FES-induced ankle motion by stimulating the TA and the soleus only, while hemiplegia affects the motion of other joints. In our future work, we plan to apply the developed algorithm to the rehabilitation of knee and hip movements, as well as ankle movement. The FSR-based method used in this study is limited to coarse detection of the gait state, and additional sensors such as IMU can allow finer prediction of the gait phase. The recent development of the multi-pad electrode enables FES control of the muscles of various sizes. The novel sensor and FES technologies can be applied to the system developed in this study to extend its application to the rehabilitation of various lower extremity motor functions. The proposed FES control can be applied more effectively in combination with exoskeleton-type rehabilitation robots. Further studies are required to address redundant actuation issues with hybrid rehabilitation systems of FES and exoskeleton robots.