1 Introduction

Timing control of a functional electrical stimulation (FES) system is vital for the success of the device. Different FES applications rely on different control methods, which depend on the function to be replaced, as well as the remaining abilities of the user. FES is used in a range of applications, including restoration of control of internal organs, reaching and grasping, sit-to-stance and gait. The focus of this study is timing control of FES during gait.

In order to facilitate gait on a daily basis, an FES controller must meet a few basic requirements. Functionally, the controller must have high detection probability, high sensitivity, high selectivity as well as low chance of false detections. The device must operate in real-time and provide stimulation frequently over the duration of each day. Physically, the combined stimulation and control system must be limited in size and weight to facilitate ease of mobility for the users.

A common application of FES for gait improvement is the drop-foot stimulator. This application enables energy efficient gait and prevents falls [1, 2]. The drop-foot stimulator stimulates the peroneal nerve, contracting the tibialis anterior muscle, raising the toes during the swing phase of gait. As stimulation of the peroneal nerve causes the toes to rise, this stimulation facilitates not only swing but also ensures that heel strike occurs at initial contact. This is important, because initial contact of stroke subjects may involve toe or mid-foot strike, instead of heel strike. Currently, the most common device for controlling stimulation timing of the drop-foot stimulator is the heel switch. This is a force sensitive resistor, placed under the heel during gait. Upon application or removal of force on the sensor, the continuous signal from the heel switch changes in amplitude. When a preset threshold is crossed, stimulation is triggered. In the case of drop foot, stimulation is initiated when the heel lifts from the ground, removing force from the heel switch. Stimulation terminates when force is re-applied to the sensor, at the next heel strike of the stimulated foot.

In addition to the drop-foot problem, other research has shown that in stroke, push-off is severely affected due to early, low amplitude activation of the triceps surae [39]. For this reason, our research efforts aim at improving push-off of stroke subjects by electrically stimulating the paretic triceps surae during gait. The timing of stimulation must be optimal. As the heel switch has been widely used for stimulation control, and no prior research has focussed on improving push-off of stroke subjects, during gait, the heelswitch was also our initial choice for control of FES to induce push-off. Since the heel rises during push-off, heel-off occurs too late to facilitate push-off stimulation. For this reason, heel strike and a time delay must be used to trigger stimulation to induce push-off. Heel switch control was adequate for preparatory trials involving healthy subjects. However, problems arose when this control method was transferred to stroke subjects. These problems were predominantly of a technical and mechanical nature, resulting in inadequate and unreliable triggering of stimulation. Changing pressure on the heel switch inside the shoe during gait often triggered the stimulator more than once during one gait cycle. Other irregular stimulation was due to missing step detections, therefore, not activating the heel switch and not triggering stimulation. In order to correct this, it was often necessary to change the location of the heel switch and make adjustments, such as inserting an extra insole or rigid piece of material at the heel. Insertions, in combination with the heel switch often caused discomfort after some time, disrupting continuous use. For one subject, the amendments were painful and the heel switch had to be completely removed from inside the shoe and taped to the bottom of the outer sole. In general, it took a relatively long time to place the heel switch adequately and determine correct threshold values, increasing the chance that the stroke subjects became fatigued before actual use. Other researchers have also found the heel switch to be problematic due to a number of factors including incorrect positioning in the shoe, extra stimulation due to change in pressure of the heel switch [10], mechanical breakage of the heel switch and related cables [11], and loading and unloading decreasing its life expectancy [12]. Furthermore, users must always wear shoes [12] making it difficult to consider the entire system as a daily treatment.

In addition to problems with the application of the sensors, our preliminary evaluation showed that heel switches are unreliable for controlling calf muscle stimulation. As absolute time delays are used to trigger push-off stimulation and the duration of gait cycle intervals varies with gait speed [13], the heel switch control method for FES of push-off restoration is highly dependent on gait speed. Initial contact of stroke subjects is not always heel strike, and may vary from step to step of the same subject. Additionally, unlike the drop-foot stimulator, push-off stimulation does not improve heel strike, so a good heel strike and good triggering of the heel switch is not ensured. Therefore, control of stimulation to improve push-off using the heel switch with a preset time delay cannot be relied upon. Another problem that we encountered using heel switch control was continuous cycles of unwanted stimulation, which we refer to as “limit-cycling” [14]. Contraction of the calf muscle due to stimulation causes the heel to lift. This supports push-off by generating momentum to move the body forward. In some of the subjects, however, the heel returned to the ground, triggering the heel switch again, resulting in limit cycling. Instead of propulsion, this may lead to deceleration of the movement, if stimulation was triggered before the center of mass progressed enough over the foot. Due to the variability of gait in stroke, time since heel strike is not an adequate criterion to start stimulation of the triceps surae for push-off. Sufficient progression of the body over the foot is a more accurate criterion to evaluate. We also concluded that the sensory information used to control stimulation should not be primarily effected by the activation of the contracting muscle, because this can lead to unstable control and limit cycling. This was seen when the heel switch caused the heel to rise and reactivate the heel switch prematurely. Therefore, alternative sensing on the leg is preferable.

Pappas et al. [10] proposed a gyroscope and three force sensitive resistors built into an insole. While effective for their purposes and removing the problem of heel switch positioning, signals originating from the foot still have the other drawbacks mentioned.

A number of researchers have shifted control away from the foot. In most cases, the application was for a drop-foot stimulator and not for push-off. The shank has been the preferred location for stimulation control. This is likely to be due to the potential for implantation and minimization of cables, when implemented in an implant [11, 15]. Willemsen et al. [15] used accelerometers on the shank. Later, Dai et al. [12] low-pass filtered signals from clusters of accelerometers on the shank to obtain inclinations. Both studies focussed on drop-foot stimulation, but inclination of the shank may also be an important option for control of timing of push-off facilitation. Other researchers have used accelerometer clusters [16], or natural nerve signals [10, 17, 18] as well as manual switches built into crutches [10, 19]. When using manual switches, subjects have to press a button to activate a stimulation burst at every step taken. Reportedly, subjects can be trained to do this without conscious thought [19]. Bajd et al. [2022] have applied FES to the plantarflexors of spinal cord injured (SCI) subjects. The subjects manually triggered the stimulation using a push button [2022]. Other researchers have controlled FES using gait phase detection systems [23] and finite state control mechanisms [24] using variants of force sensitive resistors and predictive algorithms.

Others have also proposed detection methods for the purpose of gait analysis but not for FES control. Accelerometers, gyroscopes, and heel switches have been compared to establish the accuracy of heel strike detection [25]. In that study, the heel switches failed for 9 out of 32 subjects [25].

Tong and Granat [26] used a single gyroscope on the lower shank for gait analysis. They also controlled FES of the peroneal nerve of SCI subjects [27, 28] using neural network algorithms and various sensor combinations on the upper and lower legs, shoes, and crutches. Others [2931] also used gyroscopes in combination with other sensors, on various body segments, to control timing of FES.

Due to the clear unreliability of the heel switch and complexity of available FES control methods, a simple alternative control method is needed for control of push-off stimulation. As each control method must be suited to the function to be restored, distinct, quantifiable characteristics of the function must be known, in order to be properly exploited. During healthy gait, at push-off, the center of mass passes over the ankle. As this occurs, the triceps surae are activated to provide the force necessary for push-off. We propose to use the change in angle of the shank since the start of the stance phase as a control signal, because it relates to the progression of the body over the stance leg. It can be derived by integration of the shank angular velocity measured by a rate gyroscope on the shank. Advantages of measuring control signals from the shank is that stimulation of the triceps surae will not greatly affect the shank angular velocity pattern, whereas foot angular velocity is significantly altered due to FES of the plantarflexors [32] as the heel pivots over the forefoot. The other problems associated with instability and unreliability of the heel switches are also solved by controlling the stimulation from the shank, based on orientations rather than on preset time delays.

The goal of this research is to demonstrate that FES of the triceps surae of stroke subjects can be reliably controlled using one gyroscope, measuring shank angular velocity perpendicular to the sagittal plane. In contrast to methods used in the past, with multiple sensor combinations, on more than one body segment, the method proposed here requires only one gyroscope on one body segment, close to the stimulation location, to control the stimulation timing. Furthermore, this is a new application involving FES of the triceps surae of stroke subjects for push-off. If the FES proves successful in facilitating push-off of stroke subjects, a completely implantable stimulator may be possible.

2 Methods

2.1 Design

During gait, the shank experiences a characteristic pattern that repeats every gait cycle. Figure 1a shows a typical trace of shank angular velocity \( \left( {\dot{\varphi }_{\text{shank}} } \right) \) of a healthy subject during gait. The shank experiences high angular velocity as it rotates around the knee joint, during swing. At around heel strike, \( \dot{\varphi }_{\text{shank}} \) crosses negatively through zero as the shank rotation changes direction. During stance, the shank rotates relatively slowly around the ankle joint, over the foot. The proposed algorithm uses these distinctive \( \dot{\varphi }_{\text{shank}} \) features to control FES during gait.

Fig. 1
figure 1

Healthy subject data. a Shank angular velocity. b Integrated angular velocity (shank angle)

2.2 Algorithm

The control algorithm was intentionally kept simple and robust. The algorithm involves monitoring \( \dot{\varphi }_{\text{shank}} \) during gait. When \( \dot{\varphi }_{\text{shank}} \) exceeds a preset threshold during the swing phase, “Threshold Swing” (T sw) the algorithm is triggered. See “Threshold Swing” (T sw) in Fig. 1a. As the shank reduces speed, then the foot makes foot-floor contact, \( \dot{\varphi }_{\text{shank}} \) changes direction. At this time, \( \dot{\varphi }_{\text{shank}} \) crosses from a positive value to a value less than zero (Zero Crossing). This Zero Crossing is shown in Fig. 1a, where the signal crosses the “zero line”. At zero crossing, the integration of \( \dot{\varphi }_{\text{shank}} \) is initiated. Integration of angular velocity results in change in angle since zero crossing (Δφ); Δφ is shown in Fig. 1b. At a preset Δφ, the stimulation burst is given. This sequence of events repeats when T SW is again exceeded. T sw crossing is an important feature of this stimulation control, which prevents unwanted stimulation bursts by waiting for the indication that gait is in progress. If this threshold is not crossed, the algorithm will not be initiated. It is also important to note that the integration resets at every step as this prevents integration drift. It is clear from Fig. 1b that integration drift is successfully avoided.

The working algorithm can be summarized in the flow chart of Fig. 2.

Fig. 2
figure 2

Flow chart depicting the main steps involved in the stimulation control algorithm

2.3 Equipment

The algorithm operates in real time on an embedded controller in a purpose-built symmetrical bi-phasic stimulator. Angular velocity can be measured using a gyroscope. The gyroscope used for this research is inside an inertial sensor unit, the MT9, from Xsens Technologies B.V. The gyroscope sensitive to angular velocity of the sagittal plane was selected. MT9 signals are converted to binary data in the Xsens bus master at a sample frequency of 100 Hz. The stimulator is connected serially to the bus master. The digital signal is expressed in deg/s using calibration information inside the embedded controller.

2.4 Subjects

Five stroke subjects, recruited from the Roessingh Rehabilitation Centre, in Enschede, the Netherlands were included in this study. The medical ethical committee of The Roessingh Rehabilitation Centre approved the experiments.

The subjects were aged between 42 and 58 years old. All subjects had suffered a left hemispheric stroke. Testing was carried out at least 6 months post-stroke. Subjects had no previous experience of FES facilitated gait. Subjects 2, 4, and 5 used a walking stick daily, therefore also used it during the gait trials. Subjects 2 and 5 who normally used an ankle foot orthosis removed this aid during the experiments to prevent masking of any mechanical effect of stimulation. All subjects signed an informed consent form.

2.5 Subject preparation

An MT9 inertial sensor, attached to a Perspex plate which was made in-house, was fixed to the paretic leg. The MT9 was connected to the bus master, and in turn to the bi-phasic stimulator for stimulation control. Figure 3 shows a typical subject set up. The additional MT9 sensors were used to measure kinematics for purposes beyond the scope of this article. Only the MT9 on the shank was used to control stimulation onset. The stimulator was transported in a rucksack on the subject’s back.

Fig. 3
figure 3

Subject donned with equipment for FES experiments

2.6 Experimental protocol

The experiment comprises a stimulation phase and a non-stimulation phase. During non-stimulation phase, the subject walked at a self-determined pace on a flat surface, in a gait laboratory. The \( \dot{\varphi }_{\text{shank}} \) was analyzed after the first non-stimulated trial in a custom-built program in Lab View. T SW was estimated as approximately two-thirds of the maximum peaks of five sample steps.

The next stage of the Lab View program showed integrated values, in relation to angular velocity. The optimal Δφ for stimulation was approximately mid-stance. This could be seen on the \( \dot{\varphi }_{\text{shank}} \) data and correlated directly to the Δφ. Both T SW and Δφ were determined for each subject and manually input to the controller. The other stimulation settings included 15 bi-phasic pulses, with a negative pulse width of 300 μs applied at 50 Hz for a burst duration of 300 ms were the same for every subject. This burst duration was in accordance with the study of Bajd et al. [21]. Stimulation amplitude was different for each subject. This value was determined while subjects stood in push-off posture, with the foot of their paretic side on a force plate. Stimulation amplitude was increased until a forceful movement was generated.

During the stimulation phase, as with the pre-stimulation trials, the subjects walked at a self-determined pace. Stimulation was applied at every step when Δφ reached the preset value.

2.7 Results processing

In order to determine the reliability of the control method, a number of parameters were used. The number of steps taken was processed offline using gyroscope data. The number of stimulated steps could be found using stimulation artifact present in activation patterns of electromyography (EMG) data, which was recorded for purposes beyond the scope of this article [32]. Data were manually checked to determine when stimulation was missing and when extra stimulation bursts (false positives) were delivered. Reliability was calculated using the number of steps taken and the number of stimulation bursts detected, excluding the missing first step, when present. Because of synchronization between the two systems (EMG and MT9), some data had to be rejected as is reflected in the number of steps included from the 2–3 min measurement time.

3 Results

Figure 4a shows an example of angular velocity results recorded from a stroke subject who was a poor walker. In the figure, the triceps surae of the subject was stimulated at the same ∆φ in each gait cycle. The horizontal, dashed line, in Fig. 4a at approximately 100 deg/s provides an example of the maximum value that can be chosen for T sw. The horizontal dashed line at zero shows where the angular velocity crossed negatively through zero.

Fig. 4
figure 4

Patient Data. a Angular velocity [deg/s] of stroke subject number 5 during gait. Uppermost, horizontal dashed line is T sw, parallel to this, along zero is the zero line. The vertical lines indicate zero crossing. b Integrated angular velocity (change in angle in [deg] vs. time [s]) since negative crossing through zero

Figure 4b shows the repeatability of the integrated values, therefore the working of the algorithm for this subject. Note, however, that the values are not on the same time scales as the angular velocity signal. It is clear from the figure, that the shank angle does not reach the desired change in angle at exactly the same time instant, therefore the algorithm is not dependent on gait speed, but stimulation time varies depending on the time taken for the angle to change. This subject does not exhibit the exact angular velocity characteristics during gait as displayed in Fig. 1 for a healthy subject. However, the relatively large amplitude of angular velocity during swing, followed by zero crossing is sufficient for the algorithm to be meaningfully implemented. The angular velocity increases and decreases, in a cyclical manner, during the stance periods shown in Fig. 4, unlike the angular velocity of the healthy subjects, as shown in Fig. 1. Had stimulation been controlled with a heel switch, this subject may have experienced limit cycling, since the heel may have been unloaded and loaded repeatedly.

Table 1 gives an overview of the results of the stimulation repeatability using the gyroscope control algorithm. From the table it is clear that push-off of every first step is missed. This is because the leg to be stimulated must first provide the signal that gait is in progress and that stimulation is required. The angular velocity generated during swing, even if not preceded by stimulation is sufficient to trigger the algorithm in the subsequent steps. Also, one last stimulation burst always followed the final swing of the stimulated leg. This extra stimulation burst was undesired; however, this was limited to one extra burst per complete termination of gait. For two of the five subjects, stimulation was applied reliably for 100% of the steps taken. This was least 95% for two other subjects, while for Subject 5, this was approximately 50%. However, offline post-processing revealed that use of different threshold levels increased reliability of Subject 5 to 99%.

Table 1 Results summary of gyroscope stimulation timing control

4 Discussion

The results demonstrate that real-time triggering of stimulation for push-off during gait is possible using a uniaxial gyroscope signal. The algorithm used is sufficiently flexible to be utilized in stroke subjects. The primary condition for the operation of this algorithm is that angular velocity during swing has adequately high amplitude and is succeeded by zero crossing, as shank angular velocity changes direction.

The gyroscope control algorithm is not only independent of the method of foot-floor contact but also of gait speed. When the preset angle is reached, stimulation is applied, regardless of the time taken to reach this angle. Furthermore, the gyroscope is very flexible in terms of location on the shank. The gyroscope used for this description was placed on the lateral shank. The gyroscope sensitive to motion perpendicular to the sagittal plane was selected as the sensor to control the stimulation. Tong and Granat [2628] used the gyroscope on the lower shank, close to the foot, revealing the same angular velocity pattern over the gait cycle.

A few drawbacks exist for the gyroscope method, namely, the subjects’ first push-off will never be stimulated, as the user must first trigger the algorithm with a relatively high angular velocity during swing. Furthermore, the final step taken by the user may initiate an undesired stimulation burst, even if the user wishes to stand still. Although these drawbacks exist, they do not pose serious detrimental effects to the gait of the users as they affect only the first and last steps taken. Additionally, the missing first stimulation step is a feature of this algorithm as it is the main method of preventing unwanted stimulation, therefore is a small sacrifice for the potential benefits.

In their research, Skelly and Chizeck [23] stated that control of stimulation by preset timing is not optimal. This is supported by our initial experiments using heel switches. However, their solution to preset timing was to update timing parameters using data from a previous step. This solution may not be optimal when timing of subjects’ gait events vary from step to step. While the timing of the stimulation in our method was not preset, the burst duration was. However, it is possible to solve this by appending the algorithm to end the stimulation burst at toe-off, rather than 300 ms after stimulation onset. At toe-off, push-off is complete. This is theoretically a positive crossing through zero following the initial negative through zero crossing at the beginning of stance. In order to prevent overstimulation, such an algorithm should also include a maximum burst duration.

Currently, implants rely on a cable between the heel switch and the stimulator. However, research is being directed toward creating a completely implantable system, including stimulation control [33]. As only one sensor is required for our proposed controller, we expect that a minimal amount of energy will be required. Furthermore, there will be no need for cables from the controller to the stimulator, ensuring discretion for the user and increasing the chance of acceptability of this device as a daily support system. Additionally, there is no measurable processing delay. With a sample rate of 100 Hz, processing takes place within the sample time of 10 ms in the microcontroller, which is negligible compared to the time taken to reach the angle.

The above described stimulation controller, in combination with the implantable drop-foot stimulator, could potentially be used to improve the gait of hemiparetic subjects, ranging from preventing knee hyperextension during early stance to inducing push-off by calf muscle stimulation followed by lifting the toes during swing by subsequent stimulation of the dorsiflexor muscles.

We can conclude that a single gyroscope can be used to reliably control the timing of stimulation for a very precise action, such as push-off, during gait.