Intensity- and Duration-Adaptive Functional Electrical Stimulation Using Fuzzy Logic Control and a Linear Model for Dropfoot Correction

Functional electrical stimulation (FES) is important in gait rehabilitation for patients with dropfoot. Since there are time-varying velocities during FES-assisted walking, it is difficult to achieve a good movement performance during walking. To account for the time-varying walking velocities, seven poststroke subjects were recruited and fuzzy logic control and a linear model were applied in FES-assisted walking to enable intensity- and duration-adaptive stimulation (IDAS) for poststroke subjects with dropfoot. In this study, the performance of IDAS was evaluated using kinematic data, and was compared with the performance under no stimulation (NS), FES-assisted walking triggered by heel-off stimulation (HOS), and speed-adaptive stimulation. A larger maximum ankle dorsiflexion angle in the IDAS condition than those in other conditions was observed. The ankle plantar flexion angle in the IDAS condition was similar to that of normal walking. Improvement in the maximum ankle dorsiflexion and plantar flexion angles in the IDAS condition could be attributed to having the appropriate stimulation intensity and duration. In summary, the intensity- and duration-adaptive controller can attain better movement performance and may have great potential in future clinical applications.

. Some researchers have found that the maximum ankle dorsiflexion angle by using FES with a certain stimulation intensity had individual differences due to the varying muscle tone and residual voluntary muscle activity and varied during gait cycles (12,13). If the stimulation intensity was set to a constant value during the whole gait cycle, the result could be that the muscle fatigues rapidly (14). Another important problem was that the FES using fixed stimulation duration from the heel-off event to the heel-strike event would affect the ankle plantar flexion angle (15,16). Closed-loop control was an effective way to adjust the stimulation parameters automatically, and several control techniques have been proposed (17,18). Negård et al. applied a PI controller to regulate the stimulation intensity and obtain the optimal ankle dorsiflexion angle during the swing phase (19). A similar controller was also used in Benedict et al. 's study, and the controller was tested in simulation experiments (20). Cho et al. used a brain-computer interface to detect a patient's motion imagery in real time and used this information to control the output of the FES (21). Laursen et al. used the electromechanical gait trainer Lokomat combined with FES to correct the foot drop problems for patients, and there were significant improvements in the maximum ankle dorsiflexion angles compared to the pre-training evaluations (22). There were also several studies that used trajectory tracking control to regulate the output and regulate the pulse width and pulse amplitude of the stimulation (23). The module was based on an adaptive fuzzy terminal sliding mode control and fuzzy logic control (FLC) to determine the stimulation output and force the ankle joint to track the reference trajectories. In their study, FES applied to TA was triggered before the heel-off event. Because the TA activation has been proven to occur after the heel-off event and the duration of the TA activation changed with the walking speed (24,25), a time interval should be implemented after the heel-off event (26). In Thomas et al. 's study, the ankle angle trajectory of the paretic foot was modulated by an iterative learning control method to achieve the desired foot pitch angles (27). The non-linear relationship between the FES settings and the ankle angle influenced the responses of the ankle motion (28). FLC represents a promising technology to handle the non-linearity and uncertainty without the need for a mathematical model of the plant, which has been widely used in robotic control (29). Ibrahim et al. used FLC to regulate the stimulation intensity of the FES (30), and the same control was used on the regulation of the stimulation duration to obtain a maximum knee extension angle in Watanabe et al. 's study (31). However, most closed-loop controls adjust only one stimulation parameter, and few FES controls considered both varying the stimulation intensity and duration while accounting for the changing walking velocities.
In the present study, an intensity-and duration-adaptive FES was established, the FLC and a linear model were used to regulate the stimulation intensity and duration, respectively. The performance of the intensity-and duration-adaptive stimulation (IDAS) was compared with those of stimulation triggered by no stimulation (NS), heel-off stimulation (HOS), and speedadaptive stimulation (SAS) for poststroke patients walking on a treadmill. The objective of this study is to find an appropriate FES control strategy to realize a more adaptive ankle joint motion for poststroke subjects.

MaTerials anD MeThODs subjects
Seven poststroke subjects [five males and two females; mean (±SD) age of the subjects was 46.1 (±11.2) years old; mean (±SD) months after stroke was 9.1 (±7.1) months; Fugl-meyer motor assessment for lower limb was conducted by a physical therapist and the mean value was 25.8 (±3.3) scores] with the ability to walk continuously, and had sufficient passive ankle range of motion to enable their paretic ankle joint to reach at least 5° plantar flexion with the knee flexed at 90° were recruited. Before participating in the experiment, all of the subjects consented to the experimental protocol and provided their written informed consent. The study was approved by the Ethics Committee of the Guangdong Work Injury Rehabilitation Center.

system Description
The FES rehabilitation system is presented in Figure 1. The system consists of a treadmill (G6425-F3, Beistegui Hermanos, Spain), a functional electrical stimulator (P2-9632, Faisco, China), a micro-controller (STC89C52, Amtel, USA), a motion capture system with four cameras (OptiTrack, NaturalPoint, USA), and a footswitch (B-201, Tekscan, USA). To obtain the positions of each lower limb joint, five markers were attached to them and the three dimensional signals of each marker were captured through the motion capture system. Five markers from top to bottom were placed on the following anatomical reference locations: the mid-thigh sufficiently distal to the hip, the lateral knee joint, the mid-shank sufficiently distal to the knee joint, the lateral malleolus, and the space between the second and third metatarsal heads (32). Additionally, a four segment rigid body model of the lower extremity was implemented to calculate the joint angles (32). A footswitch was placed on the hindfoot to detect the heel-off and heel-strike events, and the signals were recorded on the computer by the A-D converter (see Figure 1). The input signals of the motion capture system  and A-D converter were then acquired by the PC-based module, which included the data processing part and the FES control part. The data processing part adopted the input signals to calculate the walking speed, and the joint angle data included the angle signals, the error signals, and the derivative of the error signals. The fuzzy rules and the speed-adaptive rules were adopted to calculate the output signals uout1 and uout2, which were the duty ratio and trigger signal, respectively, and then, they were transmitted to the microcontroller. The microcontroller was used to generate the PWM modulation signal, which was delivered to the stimulator to regulate the stimulation intensity and duration. Finally, the stimulator generated the stimulation current to the surface of the TA muscle through two surface electrical stimulation electrodes (M2223, 3M, USA). The pulse amplitude of the stimulator ranged from 0 to 120 mA. The sample rates of the motion capture system and the footswitch were 100 Hz.

intensity-and Duration-adaptive Fes
The intensity-and duration-adaptive FES system was implemented during the walking to induce an appropriate ankle joint motion. The structure of the FES system is presented in Figure 2.
The output of the FLC and the output of the linear model were transmitted to the micro-controller as two independent signals to determine the intensity and duration of stimulation, respectively. In this study, a change in the stimulation intensity was realized by the modulation of the stimulation pulse amplitude. In the control process, the maximum ankle dorsiflexion angles of each cycle were compared to the desired angle, and the output uout1 was adjusted on the basis of the error in the next cycle. There are several steps for the proposed FLC system. First, fuzzification was a procedure that translated the inputs into fuzzy linguistic variables. In the proposed FLC, the inputs were the error signal, e, and the derivative of the error signal, Δe. Here, e was the difference between the actual maximum ankle dorsiflexion angle, θa, and the reference value, θreq. Additionally, θreq was 4.9°, which was from the normal maximum ankle dorsiflexion angle of human walking (33). The membership degree values of the two inputs can be calculated according to the membership functions, and the functions were defined as triangular membership functions, which were used for the fuzzification process. The input fuzzy sets were acquired by the seven membership functions including negative small (NES), negative medium (NM), negative big (NB), zero (Z), positive small (PS), positive medium (PM), and positive big (PB), and the output fuzzy sets were composed from three membership functions, the PS, PM, and PB (23). Then, we used the predefined fuzzy rule set ( Table 1) to elaborate the relationship between the inputs and the outputs of the membership degree value. Finally, the center of the area was implemented as a defuzzification process to transform the membership degree values of the control signal to the actual value of the output uout1 (34). The uout1 was transmitted to the microcontroller to control the degree of the PWM wave. For the linear model, the input was the walking speed, which was calculated by the coordinates of the marker on the toe (35) and the values based on the previous five step speeds were averaged (36). The output of the linear model uout2 was determined by the time interval of the TA, which was from the heel-off event to the onset timing of the TA activation and the duration of the TA, which was from the onset timing to the terminal timing of the TA activation. In this study, the onset timing and terminal timing were the two trigger signals that the values of uout2 converted from 0 to 1 and 1 to 0, respectively. They were transmitted to the microcontroller through the serial communication function to control the generation and interrupt of the PWM wave. There were linear relationships between the stimulation duration and walking speed, and between the time interval and walking speed (25). After the correlation analysis and least square curve fitting, the linear models of the walking speed for the time interval and EMG duration were built, and the slope and intercept were −111.7 and 416.9 for the first linear relationship and −213.2 and 877.7 for the second. All of the slopes and intercepts were obtained from healthy subjects in the preliminary experiments.

experimental Procedure
During the experiment, the subjects were instructed to hold onto a handrail and walk on a treadmill. Each subject walked on the treadmill at multiple speeds to adapt to the treadmill walking before participating in the experiment. Poststroke subjects were instructed to walk at three speeds: slow, free, and fast. The free speed was the comfortable walking speed on the treadmill, while the fast speed was approximately 25-30% larger than the free walking speed (37). The slow speed was smaller than the free speed with the same proportion. The subjects walked in the four conditions at each speed: no stimulation (NS), FESassisted walking triggered by the HOS, FES-assisted walking triggered by the SAS, and FES-assisted walking triggered by the IDAS. There were 12 trails for each poststroke subject. The order of the trials was randomly arranged, and a 2-min rest was given between each pair of successive trials to avoid muscle fatigue. In the NS condition, there was no FES during walking. In the HOS condition, the TA stimulation was triggered and terminated by the heel-off and heel-strike events, respectively (38). The stimulation intensity was set as a constant to achieve a neutral ankle angle with the subjects seated (12). In the SAS condition, the duration of the TA stimulation was linear with the walking speed, and the stimulation intensity was the same as the value in the HOS condition. In the IDAS condition, the maximum stimulation intensity was set when reaching the maximum tolerance or achieving the sufficient ankle dorsiflexion angle for each subject (27), and the actual stimulation intensity in the experiment would not exceed this maximum value. The duration of the TA stimulation in this condition was the same as that in the SAS condition. The pulse width and the frequency of stimulation were 390 µs and 40 Hz in the four conditions.

Data analysis and statistical evaluation
The coordinates of the five markers were acquired to calculate the walking speeds, the maximum ankle dorsiflexion angle, the maximum knee flexion angle during the swing phase, and the ankle plantar flexion angle at the toe-off event. The kinematic signal was filtered by a second-order low-pass Butterworth filter with a cutoff frequency of 15 Hz (39).
The Kolmogorov-Smirnov test was used to assess all of the variables for the normality of the distribution. Then, the oneway analysis of variance with repeated measures (ANOVA) was applied to analyze the influence of the stimulation condition (NS, HOS, SAS, and IDAS) on the ankle dorsiflexion, ankle plantar flexion, and knee flexion angles. If there was a significant difference, then post hoc analysis was conducted using the Bonferroni between different conditions. All of the statistical analyses were performed using SPSS 19 (SPSS, Inc., Chicago, IL, USA), and the level of significance was set at 0.05. resUlTs automatic adjustment of Pulse amplitude Figures 3A,B showed the error signal between the actual maximum ankle dorsiflexion angle and the reference value, e, and the derivative of the error signal, Δe, in the IDAS condition. Figure 3C showed the adaptive pulse amplitude of one poststroke subject during FES-assisted hemiplegic walking at free speed. From Figure 3, there were relatively large errors at the beginning of the walking. After the cycle to cycle adjustment of the pulse amplitude in real-time according to the FLC, the maximum ankle dorsiflexion angles reached the reference value in approximately 5 s and the errors were lower than 2° after the adjustment (The positive ankle angle was equal to the ankle dorsiflexion angle and the negative ankle angle was equal to the ankle plantar flexion angle.) The mean errors between the maximum ankle dorsiflexion angles and reference value were 1.4°, 1.7°, and 1.7° at the slow, free, and fast speed, respectively, in the IDAS condition, which were the smallest values among the four stimulation conditions at each speed (The mean errors were 4.5°, 4.0°, and 4.1° at the slow, free, and fast speed, respectively, and in the NS condition were 2.4°, 2.9°, and 2.8°, at the    slow, free, and fast speed, respectively; in the HOS condition, they were 3.0°, 3.6°, and 3.1° at the slow, free, and fast speed, respectively, in the SAS condition).

Kinematic Data in the Four stimulation conditions
The Kolmogorov-Smirnov test was applied to the kinematic variables, and the results indicated that all the variables followed a Gaussian distribution (P > 0.05). Figure 4 presents the ankle and knee angles of a stroke subject in a gait cycle at free speed. Figure 5 presents the maximum ankle dorsiflexion angles during the swing phase, the ankle plantar flexion angles at the toeoff event, and maximum knee flexion angles of the poststroke subjects during the swing phase in the four walking conditions. Compared to the NS condition, the HOS, SAS, and IDAS conditions all achieved a larger maximum ankle dorsiflexion angle during the swing phase at all of the speeds, and the differences were significant (P < 0.05). The maximum ankle dorsiflexion angles in the IDAS condition were closest to 4.9° compared to those in the HOS and SAS conditions at all of the speeds. At the slow, free, and fast speed walking, the average maximum ankle dorsiflexion angles in the IDAS condition were 4.1°, 4.2°, and 4.5°, respectively ( Table 2). The values of the maximum ankle dorsiflexion angles in the IDAS condition were larger than those in the HOS and SAS conditions at all of the speeds, and significant differences were found between the IDAS and HOS conditions at the free and fast speeds. The maximum ankle dorsiflexion angles of two subjects were larger than 4.9° at the free speed in the HOS and SAS conditions, which were 5.3° and 6.6°, respectively, and the average maximum ankle dorsiflexion angles were 2.8°, 2.9°, and 3.2° at the slow, free, and fast speed,  respectively, in the HOS condition and were 2.1°, 2.4°, and 2.4° at slow, free, and fast speed, respectively, in the SAS condition. The SDs of the maximum ankle dorsiflexion angles in the HOS and SAS conditions were larger than those in the IDAS condition at all of the speeds. The plantar flexion angle in the HOS condition had the minimum value, and the plantar flexion angles in the SAS and IDAS conditions were significantly larger than those in the HOS condition at all of the speeds ( Table 3). The plantar flexion angles in the SAS and IDAS conditions were similar to that in the NS condition. The maximum knee flexion angles in the SAS (33.0°) and IDAS conditions (33.0°) were significantly larger than those in the NS (31.4°) and HOS conditions (30.5°) at the slow speed, and there was a significant difference between the NS (33.4°) and HOS conditions (32.1°) at the free speed ( Table 4). No significant differences in the maximum knee flexion angle were found in the other two walking conditions (P > 0.05).

DiscUssiOn
Functional electrical stimulation-assisted ankle dorsiflexion was triggered mainly by the fixed stimulation parameters or the modulation of one parameter in previous studies (33,40,41). In this study, an intensity-and duration-adaptive FES stimulation was established, and the FLC and linear model were used to regulate the intensity and duration in the IDAS condition, respectively. The performance of the IDAS was compared with those in the NS, HOS, and SAS conditions. Although higher maximum ankle dorsiflexion angles in the HOS and SAS conditions than that in the NS condition were found, the stimulation intensity was set to be a constant in these two conditions, which could not account for the changing ankle angles during the gait cycles. If the intensity was too strong, then an exaggerated foot lift would be caused during walking. Overlarge maximum ankle dorsiflexion angles of two subjects were observed in the HOS and SAS conditions, which might cause the muscle to fatigue rapidly and the subjects to feel discomfort (14). If the intensity was too weak, then, it might not yield a sufficiently large maximum ankle dorsiflexion angle during walking. The insufficient maximum ankle dorsiflexion angles would lead to decreased foot clearance, which results in an increasing risk of falls (42,43). Delivering FES in the IDAS condition was intensity adaptive, which can account for changing the ankle angles during the gait cycles. As demonstrated by the results in Figures 4 and 5, the SDs of the maximum ankle dorsiflexion angles in the IDAS condition were smallest compared to those in other conditions at all of the speeds, and they were closer to the data of the healthy subjects described in the previous research (44), which would produce a more safe foot lift during walking. The larger variance in other conditions might be caused by the loss of muscle control ability during walking due to the fixed stimulation intensity (36). Although the ankle plantar flexion angle was not worsened in the SAS condition, a smaller maximum ankle dorsiflexion angle was observed in the SAS condition than that in the HOS condition. This difference would cause a smaller ankle excursion influencing the stability of walking, and a similar result was also shown in Kesar et al.'s study (45). Because the TA muscles were activated with the same stimulation intensity in these two conditions, greater stimulation intensity for the TA muscle would be required to generate a larger maximum ankle dorsiflexion angle during the swing phase in the SAS condition. At the same time, the stimulation intensity should be regulated to an appropriate magnitude but not an excessively high level, to avoid muscle fatigue.
In addition to the stimulation intensity being important, the stimulation duration was also essential for the FES parameterization. Liberson et al. and Springer et al. started and terminated the stimulation using heel-off events and heel-strike events, respectively (46,47). Although there was improvement in the maximum ankle dorsiflexion angle in the HOS condition, the ankle plantar flexion angle was worsened at the toe-off event in the HOS condition when compared to those in other conditions, which suggest that they were not the optimal timing for the stimulation (shown in Figure 5). On the other aspect, the FES triggered by the HOS condition led to the decreased maximum knee flexion angles at the swing phase when compared to those in the other conditions, and similar results were also discovered in Bhadra et al. 's study (48). The decreased maximum knee flexion angles were related to the decreased ankle plantar flexion angles at the toe-off event. Additionally, the decreased ankle plantar flexion angle would result in a decreased forward propulsive force (12). There were improvements in the maximum ankle dorsiflexion angles, ankle plantar flexion angles, and maximum knee flexion angles at all of the speeds in the IDAS condition, which suggested that the proposed control was more suitable for the poststroke subjects' rehabilitation.
Although both the maximum ankle dorsiflexion and ankle plantar flexion angle have improved in the IDAS condition, there were still some limitations. Only movement in the sagittal plane was considered in this study. Further studies will be conducted to address the undesired foot eversion/inversion in the frontal plane for poststroke subjects. The maximum ankle dorsiflexion angle, ankle plantar flexion angle, and maximum knee flexion angle were applied to evaluate the performance of FES-assisted walking, and more evaluation methods will be investigated in a future study, such as the differences in the pattern of ankle/knee motion between the poststroke subjects and healthy subjects. Peri et al. combined cycling with FES to enhance functional improvements for poststroke subjects (49). In our future study, the combination of the proposed FES control strategy and cycling will be investigated to further confirm its clinical effectiveness.
cOnclUsiOn The purpose of this study was to apply an intensity-and durationadaptive FES control to determine the output of a stimulator and to explore whether the proposed control strategy was appropriate or not for poststroke subjects' rehabilitation. The results showed that there were improvements in both the maximum ankle dorsiflexion angle and ankle plantar flexion angle in the IDAS condition compared to those in the other conditions. In the future, more studies on electrode placements are needed to validate whether the ankle joint angle is influenced by the precision of the electrode placements. Investigations could also be conducted with more poststroke subjects in a clinical experiment to validate the effectiveness in rehabilitation training.

eThics sTaTeMenT
Before participating in the experiment, all of the subjects consented to the experimental protocol and provided their written informed consent before participating in the study, and the study was approved by the Ethics Committee of the Guangdong Work Injury Rehabilitation Center.

aUThOr cOnTribUTiOns
GC and RS designed the study, and GC conducted the experiments. ZS, YZ, and XW helped to perform the experiments. GC and RS analyzed the data, interpreted the results, and drafted and revised the manuscript. All of the authors approved the final version of the manuscript.