Development of a self-contained accelerometry based system for control of functional electrical stimulation in hemiplegia

For stroke patients, functional electrical stimulation (FES) has been shown in the past to greatly reduce gait impairments. A critical element of the success of this intervention is accurate and reliable triggering of the stimulation for step initiation. Foot switches are the most commonly used devices for triggering hemiplegic FES gait, but they have been known to produce unreliable results and degrade over time. This paper outlines the development of a self-contained accelerometry-based gait stimulation system that can be worn around the waist and unlike other systems, adds no additional hardware or equipment to don or doff. An acceleration algorithm was developed and shown to have significantly shorter heel strike detection delays than when detecting with a heel sensor which could lead to improved stimulation timing for step initiation.


I. INTRODUCTION
unctional Electrical Stimulation (FES) has for years been used in clinical practice as a treatment for stroke patients who suffer from gait impairments [1]. This treatment works by applying electrical impulses to peripheral nerves to elicit muscle contractions. A simple device for common peroneal nerve stimulation to control foot drop has been shown to improve walking in patients with hemiplegia [2], but one of the main problems with these systems is the ability to trigger stimulation at the appropriate time accurately and reliably. Foot switches or force sensitive resistors (FSRs) are the main source of heel strike or foot-off detection for these systems and their reliability can vary based on the placement of the device in the shoe, the type of footwear worn, the terrain walked, and the type and severity of impairment. Stimulation timing can then be affected by false triggering or large delays between when the heel actually strikes the ground and when the heel sensor detects it. In long-term use, foot switches have been shown to deform and malfunction from mechanical breakage of solder joints and sticking contacts [3]. In addition, foot switches require extra equipment that must be donned which can be difficult for Manuscript  stroke patients who suffer from upper extremity impairments. This equipment can also interfere with gait. In recent years, researchers have been investigating alternative means for the detection of gait events to control FES assisted walking for patients with hemiplegia and one of these is the accelerometer. Accelerometers are small, have a lower cost than other sensors such as gyroscopes, and can detect rapid and sensitive movements that are seen in gait [4]. Work with accelerometers has been shown to produce a reliable and repeatable signal and could be used for closedloop control [4]- [6]. While they have been shown to produce results that are as reliable as or better than heel sensors, these systems still require additional equipment that must be worn or attached.
In this study, an algorithm was developed to determine heel strike in both the affected and unaffected limb of a subject with hemiplegia using a single 3-axis accelerometer located inside the stimulator's external control unit (ECU) which was worn on a belt around the subject's waist. This algorithm was used to trigger electrical stimulation to assist the subject with hip flexion and ankle dorsiflexion using closed-loop accelerometer based control. Unlike other FES control systems, it requires no additional sensors or equipment to be worn and its reliability was compared against the commonly used heel contact sensor.

A. Subject
The subject studied (male, 193cm, 104.3kg, 50 y/o) suffers from hemiplegia due to stroke. He received an 8channel implanted pulse generator (IPG) to control hip flexion and ankle dorsiflexion on his affected (left) side. This IPG is controlled by a rechargeable ECU with a transmitting coil to provide power and stimulation control parameters to the implant, as seen in Figure 1 below. The subject's informed consent was obtained prior to the study.

B. Instrumentation and Data Acquisition
One 3-axis accelerometer (LIS344ALH, ST Microelectronics, Geneva, Switzerland) with evaluation board was used in this study. This accelerometer evaluation board (4.1cm x 3.6cm) was integrated into the ECU as shown in Figure 1 below. A 16 camera Vicon MX40 (Vicon Inc., Oxford, UK) motion capture and analysis system was used on an eight by three meter walkway. The standard Plug-in-Gait lower body 15 marker set was placed on the subject. The hardware low pass filter on the accelerometer evaluation board was set at 10Hz. Force sensitive resistors (FSRs) (B&L Engineering, Tustin, CA, USA) were used to measure heel contact and were placed inside each shoe. The accelerometer, foot sensor, and motion capture data were collected at 120 Hz. All data were acquired by Vicon and the laboratory data acquisition software developed using Simulink®/xPC real-time environment (The Mathworks Inc, Nantik, MA, USA). The xPC real-time environment software was used to control the subject's pre-programmed stimulation pattern.

C. Development of Acceleration-Based Algorithm
In determining gait events, force plates are the commonly accepted gold standard. However, this can be impractical due to the limited number of strides that can be obtained in a typical setup, especially in abnormal gait. O'Conner et al. [7] developed the foot velocity algorithm (FVA) as an accurate way to determine gait events using kinematic marker data. The velocity algorithm calculates the foot center vertical velocity and from the peaks and valleys in this signal, heel strike and toe off can be determined. The vertical velocity signal was calculated offline from heel and toe marker trajectory data. It was then compared to the FSRbased and acceleration-based results to determine the delays between true heel strike and heel strike detection with the force sensing resistors and the accelerometer.
The acceleration-based algorithm was developed using acceleration data that were collected in an initial experiment for the algorithm development. The acceleration signals during walking were converted to gravitational units of g with initial standing gravity component subtracted and then compared against true heel strike as determined by the FVA to find the optimal control algorithm. Figure 2 shows the low pass filtered acceleration signals (AP (anterior-posterior) at 3Hz and ML (medial-lateral) at 2Hz) during left and right step. A digital 2 nd order Butterworth filter was used. Note on this figure that a low to high transition in the step state relates to a left heel strike (LHS) and a high to low transition relates to a right heel strike (RHS). It is shown that the AP acceleration signal is periodic and contains peaks at left and right heel strike and the ML signal alternates between low and high at left heel strike and right heel strike, respectively. This is likely due to the pelvic list as weight is transferred from one leg to the other. Thus, the algorithm was designed to detect peaks in the filtered AP signal to determine when a heel strike occurs and the ML signal is compared against a baseline to determine if it is in a high or low state to indicate whether it is a RHS or LHS, respectively. The algorithm only searches for peaks in the AP signal that are above a threshold to eliminate any low magnitude noise. The beginning threshold is based upon the initial experiment but is updated based on the average of the previous three peaks in order to adjust over time in case there are variations in the acceleration signals due to change in walking speed, terrain or movement of the ECU. Each time the system is used, a calibration can automatically be performed to subtract off the gravity component and adjust for any variations in ECU placement. We can assume that LHS would occur at the end of left step and RHS would occur at the end of right step. Since the stimulation pattern is known, the algorithm only looks for left or right heel strike during the later part of the respective step. Thus, this should eliminate false triggers that may occur from foot dragging during swing. For this participant, stimulation was only triggered by the RHS to stimulate left hip flexion and ankle dorsiflexion but analyses were done on both limbs to show that for future participants both heel strikes can be detected and stimulation can be applied to either or both limbs.

D. Experimental Procedures
The subject was outfitted with the marker set, FSRs, and the ECU containing the accelerometer and performed twelve walking trials at his preferred speed using his previously determined stimulation pattern. Six trials used his standard automatic triggering free cycling stimulation pattern and six trials used the acceleration-based algorithm to determine heel strike on his unaffected limb to trigger stimulation on his affected limb. On the trials where the automatic pattern was used, the control software still calculated the detected heel strike using the acceleration-based algorithm in realtime so the delays could be compared against the FSR detection and true heel strike determined by FVA. FSR heel strike detection was based on the heel contact signal crossing the threshold of 90% of the maximum observed value [4].
The Simulink®/xPC control software performed this algorithm in real-time and sent out a digital output when a left or right heel strike was detected by the accelerometer algorithm. These output signals were compared against the true heel detection as determined by the FVA and against the FSR threshold detection to determine if this algorithm had a shorter delay in calculating heel strike than the FSR. Shorter delays should lead to a more reliable FES control system since large delays can trigger stimulation too late (i.e. the affected limb may have already initiated swing).

III. RESULTS
When the subject completed the trials, a total of 85 left steps and 77 right steps had been collected. The left and right heel strikes were analyzed independently to study the differences between the affected and unaffected limb. Figure  3 below shows the results of one of the trials and displays the FVA signal, the output from the acceleration algorithm, and the FSR output. The second troughs in the periodic pattern of the FVA correspond to true heel strikes [7]. These time points are represented by the dashed lines shown in each plot to illustrate how the true heel strike instances differ from the time points calculated by the acceleration algorithm and the common FSR threshold technique. The horizontal line in the bottom FSR plot represents 90% threshold, which was the value used to calculate its trigger. As can be seen in the figure, the acceleration trigger detected all of the right heel strikes for this trial and had a very minimal delay from true heel strike while the FSR had a longer delay before it would have triggered stimulation.
This output is typical for all of the collected trials. For the left (affected) leg, the average delay for the acceleration algorithm was 99 ± 56ms while the FSR method produced an average delay of 183 ± 56ms. For the unaffected side, the delay was even shorter. The acceleration algorithm for the right side had an average delay 25 ± 83ms while the FSR had a delay of 103 ± 27ms. These results are summarized in Table I. This shows that with a simple algorithm that is based on the AP and ML signals from an accelerometer located inside the stimulator's external control unit that is worn around the waist, we can get a significant (p < 0.001) Fig. 3. Plots of right foot velocity algorithm, acceleration-based algorithm triggers, and right FSR output. The vertical dashed lines indicate when true heel strike occurs as determined by the FVA. The horizontal line in the FSR plot indicates the 90% threshold for detection of heel strike. improvement in heel strike detection delay over the commonly used heel sensor method. The acceleration algorithm had a detection accuracy of 98% on LHS and an accuracy of 84% on RHS.
A stand-alone version of this accelerometry based triggering stimulation program for walking was used by the subject during activities of daily living at home and in the community. The participant has reported that the program functions well for daily use and he prefers this over his previously used heel switch triggering and free-running stimulation programs. He reports that the system performs well while walking over uneven terrain (inclines, grass, etc) and the stimulation is synchronized with his walking.

IV. DISCUSSION
The results from this study show that integrating an accelerometer inside a stimulator worn around the waist can reliably detect heel strike with significantly shorter delay as compared to a heel sensor. This shorter delay can lead to improved stimulation timing since long detection delays can lead to stimulation being applied too late in the gait cycle or the patient having to stand in double support waiting for the stimulation to initiate. In addition, this system is selfcontained, requires no additional equipment to be worn, has no cables that could tangle or interfere, and could be implemented in barefoot walking. While this study has shown promising results, they cannot be generalized to other subjects since the system was tested under ideal laboratory conditions. Further evaluation is needed to verify the performance of the algorithm when continuously changing walking speed (e.g. crowded places) and walking over uneven terrain. While this could add noise into the system, the peaks of the acceleration signals from heel strikes appear large enough to compensate for variability due to uneven terrain, as was reported by our subject.
While these results show reduced delays and high accuracy, the algorithm can still be improved upon. When studying the missed detections, it was seen that the AP acceleration peaks were just slightly under the threshold that the peaks must reach in order to trigger. This could be corrected in the future by adjusting how frequently and with what proportion the threshold is adjusted (currently set at 75% of the average of the past three peaks). The standard deviation for the right heel strike is also relatively high. This is a result of five steps actually being detected early. While this was rare, this could be corrected by taking a moving average of the duration of the previous few steps to find the recent step duration history and if a trigger is detected significantly before that, it could ignore the trigger and instead initiate the stimulation based on the moving average time.
Further advancement of this algorithm will be investigated on this participant with hemiplegia. There are also plans to implement this self-contained acceleration based triggering system with participants with spinal cord injuries who currently have implanted stimulation systems and use the ECU. Currently, this system is only designed to detect heel strike and trigger a pre-determined stimulation pattern. Future investigations will look into the feasibility of scaling the stimulation pattern based upon the walking speed and incorporating other sensors inside the ECU to detect other gait events or control stimulation based upon the terrain (uneven surfaces, inclines, stairs, etc.). These accelerationbased algorithms should be beneficial for any FES user including stroke, SCI, TBI and MS who has difficulty maintaining gait with an open-loop stimulation pattern, experiences unreliable results with heel sensor triggering, or has difficulties donning and doffing the extra equipment that is required for many control systems. Eventually, such a control system could be integrated into the IPG.