You are on page 1of 260

DEVELOPMENT OF AN ELECTROMYOGRAM-BASED CONTROLLER FOR

FUNCTIONAL ELECTRICAL STIMULATION-ASSISTED WALKING AFTER


PARTIAL PARALYSIS















By

ANIRBAN DUTTA








Dissertation Advisor: Dr. Ronald J. Triolo






A DISSERTATION PRESENTED TO THE GRADUATE SCHOOL
OF THE CASE WESTERN RESERVE UNIVERITY IN PARTIAL FULFILLMENT
OF THE REQUIREMENTS FOR THE DEGREE OF
DOCTOR OF PHILOSOPHY

Department of Biomedical Engineering

CASE WESTERN RESERVE UNIVERSITY

May, 2009

CASE WESTERN RESERVE UNIVERSITY
SCHOOL OF GRADUATE STUDIES
We hereby approve the thesis/dissertation of
_____________________________________________________
candidate for the ______________________degree *.
(signed)_______________________________________________
(chair of the committee)
________________________________________________
________________________________________________
________________________________________________
________________________________________________
________________________________________________
(date) _______________________
*We also certify that written approval has been obtained for any
proprietary material contained therein.
Anirban Dutta
Ph.D.
Dr. Robert F. Kirsch
Dr. Ronald J. Triolo
Dr. Patrick E. Crago
Dr. Roger D. Quinn
03/18/2009




















Sarasvathi Namastubhyam, Varade Kaamaroopini
Vidyaarambham Karishyaami, Siddhir Bhavatu Mey Sada






TABLE OF CONTENTS

page
LIST OF TABLES...........................................................................................................................4
LIST OF FIGURES .........................................................................................................................6
Abstract ..........................................................................................................................................13
Preface............................................................................................................................................15
Acknowledgements........................................................................................................................16
Introduction....................................................................................................................................18
Functional Electrical Stimulation (FES) for ambulation........................................................18
The hardware for the FES-controller......................................................................................19
Electromyogram as a command source for FES-controller for ambulation after
iSCI .....................................................................................................................................21
Electromyogram-based trigger for the FES-controller: specific objectives of
the work .......................................................................................................................23
Overview of the chapters........................................................................................................24
References...............................................................................................................................25
Figures ....................................................................................................................................28
Evaluation of surface electromyogram from partially paralyzed muscles as a
command source for functional electrical stimulation............................................................33
Abstract...................................................................................................................................33
Introduction.............................................................................................................................34
Methods ..................................................................................................................................35
Subjects............................................................................................................................35
Test of Controllability .....................................................................................................36
Test of Discriminability...................................................................................................38
Statistical Analysis ..........................................................................................................42
Results.....................................................................................................................................43
Results from the Test of Controllability..........................................................................43
Results from the Test of Discriminability .......................................................................44
Discussion...............................................................................................................................46
Conclusion..............................................................................................................................48
References...............................................................................................................................49
Figures ....................................................................................................................................51
Tables......................................................................................................................................60
Feasibility analysis of surface EMG-triggered FES-assisted ambulation after
incomplete spinal cord injury .................................................................................................66
1

Abstract...................................................................................................................................66
Introduction.............................................................................................................................66
Methods ..................................................................................................................................68
Subjects............................................................................................................................68
Data Acquisition and Processing.....................................................................................70
Muscle Selection .............................................................................................................72
Classifier Development and Offline Testing...................................................................73
Classifier Testing During FES-assisted Ambulation.......................................................75
Results.....................................................................................................................................76
Classifier Performance ....................................................................................................76
Repeatability of the Classifier Performance....................................................................77
Discussion...............................................................................................................................77
Conclusion..............................................................................................................................79
References...............................................................................................................................80
Figures ....................................................................................................................................84
Surface EMG-triggered FES-assisted gait parameters during over-ground walking in
the laboratory..........................................................................................................................91
Abstract...................................................................................................................................91
Introduction.............................................................................................................................92
Methods ..................................................................................................................................93
Subjects............................................................................................................................93
Gait Data Acquisition......................................................................................................94
Gait Parameters ...............................................................................................................97
Statistical Analysis ..........................................................................................................98
Results.....................................................................................................................................98
Discussion...............................................................................................................................99
Conclusion............................................................................................................................102
References.............................................................................................................................103
Figures ..................................................................................................................................104
Tables....................................................................................................................................109
Coordination and stability of surface EMG-triggered FES-assisted overground
walking in the laboratory......................................................................................................111
Abstract.................................................................................................................................111
Introduction...........................................................................................................................111
Methods ................................................................................................................................114
Subjects..........................................................................................................................114
Gait Data Acquisition....................................................................................................115
Coordination and Stability Analysis of Gait initiation..................................................118
Results...................................................................................................................................122
Linear regression model for gait initiation ....................................................................122
Coordination and stability during FES-assisted gait initiation......................................124
Discussion.............................................................................................................................125
Conclusions...........................................................................................................................129
2

References.............................................................................................................................130
Figures ..................................................................................................................................133
Development of an implanted intramuscular EMG-triggered FES system for
ambulation after incomplete spinal cord injury....................................................................143
Abstract.................................................................................................................................143
Introduction...........................................................................................................................144
Methods ................................................................................................................................146
Subjects..........................................................................................................................146
Command source selection............................................................................................147
Implantation of intramuscular EMG electrode..............................................................150
Classifier development for iEMG-triggered FES-assisted stepping .............................151
Online testing of the classifier in the laboratory ...........................................................155
Results...................................................................................................................................157
Muscles and location selection for intramuscular EMG ...............................................157
Classifier development and online performance ...........................................................158
Discussion.............................................................................................................................163
Conclusions...........................................................................................................................166
References.............................................................................................................................167
Figures ..................................................................................................................................171
Tables....................................................................................................................................185
CURRENT CHALLENGES AND RECOMMENDATIONS FOR Future work.......................188
Introduction...........................................................................................................................188
Evaluating the information content in EMG ........................................................................190
Optimal number of features in the EMG.......................................................................191
Optimal number of muscles or channels of EMG.........................................................194
Computational requirements for the external controller.......................................................197
Surface EMG gait data collection for selecting iEMG command sources ...........................198
Optimizing and verifying the iEMG electrode location prior to surgery .............................199
Summary...............................................................................................................................200
References.............................................................................................................................201
Figures ..................................................................................................................................203
Appendix......................................................................................................................................213
Bibliography ................................................................................................................................250


3

LIST OF TABLES
Table page

Table 2.1: The mean, the minimum, and the maximum average absolute tracking
error in %MVC during the four parts (0-25 sec, 25-50 sec, 50-75 sec, 75-100
sec) of the Test for Controllability. The p-value from the one-way two-tailed
ANOVA test for the average tracking error over the whole trial (100 sec) was
not statistically significant ( 0.01).................................................................................60 >
Table 2.2: The results from the Test of Discriminability for the muscles Gluteus
Medius (GM), Biceps Femoris (BF), Medial Gastrocnemius (MG), Rectus
Femoris (RF), Tibialis Anterior (TA), and Erector Spinae (ES at T9) are
presented for the able-bodied subjects. The Wilcoxon statistic (W) was
similar in magnitude to the corresponding Discriminability Index (DI).
Similarly the Standard Deviation (SD) of the DI over 10 random partitions
(i.e., 10-fold cross-validation) was similar in magnitude to the Standard Error
(SE) found for the Wilcoxon statistic (W). There were statistically
significant (p 0.05) differences in the means of DI due to the muscle type
as well as the classifier type...............................................................................................61
>
Table 2.3a: The results from the Test of Discriminability of iSCI-1 for the left step
classifier. The Wilcoxon statistic (W) was similar in magnitude to the
corresponding value of the Discriminability Index (DI). Similarly the
Standard Deviation (SD) of the DI was similar in magnitude to the Standard
Error (SE) found for the Wilcoxon statistic (W). There were statistically
significant (p 0.05) differences in the means of DI due to the muscle type
as well as the classifier type...............................................................................................62
>
Table 2.3b: The results from the Test of Discriminability of iSCI-1 for the right step.
The Wilcoxon statistic (W) was similar in magnitude to the corresponding
value of the Discriminability Index (DI). Similarly the Standard Deviation
(SD) of the DI was similar in magnitude to the Standard Error (SE) found for
the Wilcoxon statistic (W). There were statistically significant (p 0.05)
differences in the means of DI due to the muscle type as well as the classifier
type.....................................................................................................................................63
>
Table 2.4a: The results from the Test of Discriminability of iSCI-2 for the left step.
The Wilcoxon statistic (W) and the corresponding value of the
Discriminability Index (DI) were similar. The Standard Deviation (SD) of the
DI and the Standard Error (SE) found for the Wilcoxon statistic (W) were
similar. There were statistically significant (p>0.05) differences in the
means of DI due to the muscle type as well as the classifier type. ....................................64
Table 2.4 b: The results from the Test of Discriminability of iSCI-2 for the right step
classifier. The Wilcoxon statistic (W) and the corresponding value of the
Discriminability Index (DI) were similar. The Standard Deviation (SD) of the
4

DI and the Standard Error (SE) found for the Wilcoxon statistic (W) were
similar. There were statistically significant (p>0.05) differences in the
means of DI due to the muscle type as well as the classifier type. ....................................65
Table 4.1: The Mean, Standard Deviation (S.D), coefficient of variation (C.V.), 95%
confidence interval (95% C.I.) over 10 trials (N=10) of the EMG-triggered
and switch-triggered gait parameters gait speed (m/s), left step length (m),
right step length (m), left double support duration (s), right double support
duration (s), left swing phase duration (s), right swing phase duration (s) for
the subject iSCI-1. [ statistically significant (p<0.05) difference between the
command sources are shaded] .........................................................................................109
Table 4.2: The Mean, Standard Deviation (S.D), coefficient of variation (C.V.), 95%
confidence interval (95% C.I.) over 10 trials (N=10) of the EMG-triggered
and switch-triggered gait parameters gait speed (m/s), left step length (m),
right step length (m), left double support duration (s), right double support
duration (s), left swing phase duration (s), right swing phase duration (s) for
the subject iSCI-2. [ statistically significant (p<0.05) difference between the
command sources are shaded] .........................................................................................110
Table 6.1: The performance of the threshold-based classifier for iSCI-2....................................185
Table 6.2: The performance of the pattern recognition classifier for iSCI-2...............................186
Table 6.3: The minimum achievable sample time in s for the classifier algorithm in
different hardware that can serve as single board computer............................................187


5

LIST OF FIGURES
Figure page

Figure 1.1: Components of the FES system. .................................................................................28
Figure 1.2: Universal External Control Unit (UECU) with inductive coil and finger
switch. ................................................................................................................................29
Figure 1.4: Universal External Control Unit (UECU) stand-alone configuration
[1.22]. .................................................................................................................................31
Figure 1.5: Universal External Control Unit (UECU) configuration with xPC target
PC [1.22]. ...........................................................................................................................32
Figure 2.1: Experimental setup for the Test of Controllability of the surface EMG
from Rectus Femoris using visual pursuit tasks while the knee was fixed in a
dynamometer......................................................................................................................51
Figure 2.2: Experimental setup for surface EMG data collection with switch-
triggered FES-assisted overground walking. .....................................................................52
Figure 2.3: Experimental protocol for surface EMG data collection during
overground walking, where the subject had to start from standing and achieve
a self-selected gait speed within 5m. .................................................................................53
Figure 2.4: The left column shows the cumulative distribution function for the three
cases, 1 , 1 5 . 0 , 5 . 0 0 = < s s < DI DI DI and the right column shows the
corresponding Receiver Operating Characteristics curve..................................................54
Figure 2.5: TRACKING (broken black line) and TARGET (solid black line) signals
during visual pursuit task for the Test of Controllability. The boxes at each
data point show the lower quartile and upper quartile values of the
TRACKING signal. Whiskers extending at the top and bottom of the boxes
show the range of the TRACKING signal. The top panel presents the results
for iSCI-1 and the bottom panel for iSCI-2. The left panel presents the results
for the left Rectus Femoris and the right panel presents the results for the
right Rectus Femoris. .........................................................................................................55
Figure 2.6: TRACKING (broken black line) and TARGET (solid black line) signals
during visual pursuit task for the Test of Controllability with able-bodied
subjects. The boxes at each data point show the lower quartile and upper
quartile values of the TRACKING signal. Whiskers extending at the top and
bottom of the boxes show the range of the TRACKING signal. .......................................56
Figure 2.7: Top panel shows the results from the post hoc analysis of the
Discriminability Index with their critical values from Scheffes S procedure
for the muscles Gluteus Medius (GM), Biceps Femoris (BF), Medial
6

Gastrocnemius (MG), Rectus Femoris (RF), Tibialis Anterior (TA), and
Erector Spinae (ES at T9) obtained from the Test of Discriminability with
able-bodied subjects. The bottom panel shows the results from the post hoc
analysis of the Discriminability Index with their critical values from
Scheffes S procedure for different classifiers Pattern Recognition
Classifier (PRC) and Threshold-based Classifier (TC) obtained from the Test
of Discriminability with able-bodied subjects. ..................................................................57
Figure 2.8: Top panel shows the results from the post hoc analysis of the
Discriminability Index with their critical values from Scheffes S procedure
for the muscles Gluteus Medius (GM), Biceps Femoris (BF), Medial
Gastrocnemius (MG), Rectus Femoris (RF), Tibialis Anterior (TA), and
Erector Spinae (ES at T9) obtained from the Test of Discriminability of the
left and right step classifiers of iSCI-1. The bottom panel shows the results
from the post hoc analysis of the Discriminability Index with their critical
values from Scheffes S procedure for different classifiers Pattern
Recognition Classifier (PRC) and Threshold-based Classifier (TC) obtained
from the Test of Discriminability of the left and the right step classifiers of
iSCI-1. ................................................................................................................................58
Figure 2.9: Top panel shows the results from the post hoc analysis of the
Discriminability Index with their critical values from Scheffes S procedure
for the muscles Gluteus Medius (GM), Biceps Femoris (BF), Medial
Gastrocnemius (MG), Rectus Femoris (RF), Tibialis Anterior (TA), and
Erector Spinae (ES at T9) obtained from the Test of Discriminability of the
left and right step classifiers of iSCI-2. The bottom panel shows the results
from the post hoc analysis of the Discriminability Index with their critical
values from Scheffes S procedure for different classifiers Pattern
Recognition Classifier (PRC) and Threshold-based Classifier (TC) obtained
from the Test of Discriminability of the left and the right step classifiers of
iSCI-2. ................................................................................................................................59
Figure 3.1: a) X-ray of the iSCI subject implanted with implantable receiver-
stimulator (IRS-8) b) iSCI subject stepping with the switch-triggered FES
system. ...............................................................................................................................84
Figure 3.2: Experimental setup for testing EMG-triggered FES-assisted walking with
the block-diagram for the EMG-triggered FES system (ECU: external control
unit, LE: linear envelope). .................................................................................................85
Figure 3.3: Processing of the sampled EMG from Erector Spinae for training the
classifier a) rectified and reconstructed EMG signal b) linear envelope found
from processed EMG signal...............................................................................................86
Figure 3.4: Muscle selection for the classifier using receiver operating characteristics
curve from switch-triggered FES-assisted gait data (FS: Foot-Strike, FO:
7

Foot-Off) a) linear envelope (LE) indicating class True b) linear envelope
(LE) indicating class False. .............................................................................................87
Figure 3.5: Receiver operating characteristics curve of the classifiers using the test
data. ....................................................................................................................................88
Figure 3.6: State transition diagram of the EMG-based FES-controller. ......................................89
Figure 3.7: Offline testing of the classifier using receiver operating characteristics
curve a) time-error (negative means prediction) in detection of foot-off by the
classifier b) duration of the gait phases (left DS: double support phase
following left swing phase, right DS: double support phase following right
swing phase, SW: swing phase).........................................................................................90
Figure 4.1: Experimental setup for testing EMG-triggered FES-assisted walking with
the block-diagram for the EMG-triggered FES system (ECU: external control
unit). .................................................................................................................................104
Figure 4.2: EMG-based gait event detector for triggering FES-assisted steps. ..........................105
Figure 4.3: Plot of the Root Mean Square Error (RMSE) between the low-pass
filtered and unfiltered foot progression in sagittal plane with cut-off
frequencies to find the optimum cut-off frequency for low-pass filtering the
gait kinematics data. Optimum cut-off frequency was found to be 3.5 Hz for
iSCI data...........................................................................................................................106
Figure 4.4: Gait data collection protocol in laboratory conditions where the subject
had to start from standing and achieve a self-selected gait speed within
motion analysis systems volume of data capture (~5m).................................................107
Figure 4.5: Boxplot of average body weight support provided by the walker during
EMG-triggered (N=10 trials) and switch-triggered (N=10 trials) gait
normalized by the mean of that during EMG-triggered trials of iSCI-2. The
box shows the lower quartile, median, and upper quartile with whiskers
extending at each end showing the range of the data. The notches around the
median show the estimate of the uncertainty. The boxes whose notches dont
overlap indicate that their medians differ at 5% significance level. ................................108
Figure 5.1: Laboratory setup for EMG-triggered FES-assisted walking shown with a
flowchart for the EMG-based gait event detector for triggering FES-assisted
steps..................................................................................................................................133
Figure 5.2: Top panel: Selection of optimum cut-off frequencies for low-pass
filtering the kinematic data. Bottom panel: Most of power content in the
signals was below the optimum cut-off frequency, which were 6 Hz for able-
bodied and 3.5 Hz for iSCI data.......................................................................................134
Figure 5.3: Gait initiation protocol during the data collection.....................................................135
8

Figure 5.4: Typical pelvis motion in the direction of progression during gait
initiation. ..........................................................................................................................136
Figure 5.5: Euclidean distance from the origin of the perturbation of the 36 states
during gait initiation at the maximum left knee flexion. left panel: able-
bodied data (4 subjects). Middle panel: iSCI data (subject C1). right panel:
iSCI data (subject C2). [Normative: 4 subjects, 10 trials each; iSCI EMG-
trigger: 2 subjects, 10 trials each; iSCI Switch-trigger: 2 subjects, 10 trials
each; iSCI Auto-trigger: 2 subjects, 10 trials each]. ........................................................137
Figure 5.6: Percent Variance Accounted For (%VAF) by the Principal Components
(PC). Top panel: able-bodied data. Middle panel: iSCI-1 walking with EMG,
switch, and auto triggered FES. Bottom panel: iSCI-2 walking with EMG,
switch, and auto triggered FES. All the plots show the data averaged over 6
gait events. .......................................................................................................................138
Figure 5.7: Typical loading of the first 3 Principal Components (PCs) on the joint
angles (HA: Hip Angle, KA: Knee Angle, AA: Ankle Angle) found from the
weight matrix of the subject Able1. The prefix l indicates the left side
and r indicates the right side. The suffix x denotes sagittal plane, y
denotes frontal plane, and z denotes transverse plane for the joint angles....................139
W
Figure 5.8: Euclidean distance from the origin of the perturbation of the 5 principal
components at maximum left knee flexion left panel: able-bodied (4
subjects). Middle panel: iSCI-1 subject C1. right panel: iSCI-2 subject C2.
[Normative: 4 subjects, 10 trials each; iSCI EMG-trigger: 2 subjects, 10 trials
each; iSCI Switch-trigger: 2 subjects, 10 trials each; iSCI Auto-trigger: 2
subjects, 10 trials each]. ...................................................................................................140
Figure 5.9: Top panel: Scatter plot of QoF and Av. Eig. at 6 gait events for the
groups; the 4 able-bodied subjects: Able1, Able2, Able3, Able4, and the 2
iSCI subjects with different trigger modes: EMG1, EMG2, SW1, SW2,
Auto1, Auto2. Bottom panel: MANOVA cluster dendrogram plot of the
groups...............................................................................................................................141
Figure 5.10: Mahalanobis distances matrix between each pair of group means. ........................142
Figure 6.1: Experimental setup for data collection during FES-assisted walking with
the block-diagram for the FES system (ECU: external control unit, LE: linear
envelope)..........................................................................................................................171
Figure 6.2: Processing of the sampled surface EMG a) rectified and reconstructed
sEMG signal b) linear envelope found from processed sEMG signal.............................172
Figure 6.3: Experimental protocol for the collection of EMG data during over-
ground walking in the laboratory. ....................................................................................173
9

Figure 6.4: Examples of the multi-electrode matrix for simultaneous collection of the
surface EMG from multiple locations on the muscle belly. ............................................174
Figure 6.5: The steps during the implantation of intramuscular EMG electrode a)
insertion of probe, b) deployment of peelable sheath over probe, c) insertion
of the iEMG electrode through the peelable sheath, d) peeling off of the
polymer sheath leaving the iEMG electrode in place. .....................................................175
Figure 6.6: Pulse-width map of iSCI-1 i.e., the stimulation patterns with time as x-
axis and pulse-width in s as the y-axis that was used for FES-assisted
walking (Implanted muscles LIL: left iliopsoas, LES: left erector spinae,
LGM: left gluteus maximus, LQU: left vastus intermedius/lateralis, RIL:
right iliopsoas, RTFL: right tensor fasciae latae, RTA: right tibialis anterior,
RES: right erector spinae, RGM: right gluteus maximus, RQU: right vastus
intermedius/lateralis, RHS: right hamstring, RPA: posterior portion of the
right adductor magnus). ...................................................................................................176
Figure 6.7: The real-time cycle in IST-12 with 50 ms time period for stimulation
frequency of 20 Hz...........................................................................................................177
Figure 6.8: Parameters for the iEMG classifier computed from the training data that
was collected with the switch-triggered FES system.......................................................178
Figure 6.9: The flow chart of the iEMG-based two-stage classifier for triggering FES
for walking. ......................................................................................................................179
Figure 6.10: Usability Rating Scale to find the user perspective on ease/difficulty of
using the classifier [6.29]. ................................................................................................180
Figure 6.11: Best location found from the surface EMG for implanting intramuscular
EMG electrodes a) left gastrocnemius and right erector spinae b) left and
right gastrocnemius. .........................................................................................................181
Figure 6.12: a) Discriminability Index (DI) of left medial gastrocnemius (MG) for
the swing phase (SW) and double support phase (DS) during over-ground
walking for the subject iSCI-1 at each data point of the gait cycle b)
Discriminability Index (DI) of right erector spinae (ES) for the swing phase
(SW) and double support phase (DS) during over-ground walking for the
subject iSCI-1 at each data point of the gait cycle. [Shaded portion is the
classification region used by the classifiers]....................................................................182
Figure 6.13: Inhibition of iEMG from right erector spinae during right swing phase
(SW) as shown in the left panel due to electrical stimulation (shaded portion)
of the same muscle when compared to that in absence of electrical
stimulation shown in the right panel of the subject iSCI-1..............................................183
Figure 6.14b: a) Discriminability Index (DI) of right medial gastrocnemius (MG) for
the swing phase (SW) and double support phase (DS) during over-ground
10

walking for the subject iSCI-2 at each data point of the gait cycle b)
Discriminability Index (DI) of left medial gastrocnemius (MG) for the swing
phase (SW) and double support phase (DS) during over-ground walking for
the subject iSCI-2 at each data point of the gait cycle. [Shaded portion is the
classification region used by the classifiers]....................................................................184
Figure 7.1: An example of the classes True and False clustered in the feature
space defined by only three features found from the linear envelope of left
Erector Spinae (shown in left panel) and right Erector Spinae (shown in right
panel)................................................................................................................................203
Figure 7.2: a) Discriminability Index for the left step classifier with the ROC plot
from a feature space with 1, 2, 3 or 4 features and based on the surface EMG
from gluteus medius (GM), biceps femoris (BF), medial gastrocnemius
(MG), rectus femoris (RF), tibialis anterior (TA), and erector spinae (ES at
T9). b) Discriminability Index for the right step classifier with the ROC plot
from a feature space with 1, 2, 3 or 4 features and based on the surface EMG
from gluteus medius (GM), biceps femoris (BF), medial gastrocnemius
(MG), rectus femoris (RF), tibialis anterior (TA), and erector spinae (ES at
T9)....................................................................................................................................204
Figure 7.3: a) Discriminability Index for the left step classifier with the ROC plot
from a feature space with 1, 2, 3 or 4 features and based on the surface EMG
from left medial gastrocnemius (MG). b) Discriminability Index for the right
step classifier with the ROC plot from a feature space with 1, 2, 3 or 4
features and based on the surface EMG from right medial gastrocnemius
(MG). ...............................................................................................................................205
Figure 7.4: a) Discriminability Index (DI) for the left step classifier versus the
number of muscles added in the increasing order of their individual DI. b)
Discriminability Index (DI) for the right step classifier versus the number of
muscles added in the increasing order of their individual DI. .........................................206
Figure 7.5: a) Surface EMG patterns during gait from able-bodied subjects from
muscles lateral gastrocnemius (GL), medial gastrocnemius (GM), peroneus
longus (PL), biceps femoris (BF), rectus femoris (RF), tibialis anterior (TA),
gluteus medius (GD), vastus lateralis (VL), vastus medialis (VM), and
adductor longus (AD) are clustered in 4 groups based on their cross
correlation coefficients, shown by the dendogram plot. b) Three principal
components (or synergies Syn1, Syn2, and Syn3) found from those surface
EMG patterns which accounted for more that 90% variance in the data.........................207
Figure 7.6: For able-bodied subjects, the gait events such as heel strike, contralateral
foot off, mid stance, contralateral heel strike, ipsilateral foot off, maximum
knee flexion, mid swing are clustered (green dots) in the feature space
defined by only first 3 principal components (or synergies). ..........................................209
11

Figure 7.7: Discriminability Index (DI) for the left (black) and right (red) step
classifier versus the duration of unblanked surface EMG from left (for left
classifier) and right (for right classifier) medial gastrocnemius muscle..........................210
Figure 7.8: Schematic representation of a PC/104+ single board computer running
xPC target (The Mathworks Inc., USA) interfaced with UECU to supplement
its computational resources..............................................................................................211
Figure 7.9: Driven gait orthosis (DGO) like Lokomat shown here to control the
patients leg trajectories in sagittal plane during walking [photo taken from
7.5]. ..................................................................................................................................212

12

13
DEVELOPMENT OF AN ELECTROMYOGRAM-BASED CONTROLLER FOR
FUNCTIONAL ELECTRICAL STIMULATION-ASSISTED WALKING AFTER
PARTIAL PARALYSIS

ABSTRACT
by
ANIRBAN DUTTA
Paralysis can be caused by an injury to the spinal cord that may partially or
completely interrupt communication between the brain and the muscles. If the paralyzed
muscles below the level of injury remain innervated then they can be activated by
applying small electrical currents in a process known as Functional Electrical Stimulation
(FES). The electromyogram (EMG) is the time history of the electrical activity of a
muscle that can be used to find its level of activation. This dissertation investigated the
use of EMG as a command source for FES-assisted ambulation after incomplete spinal
cord injury (iSCI). The synergistic modulation of the volitional EMG was used to identify
the intent to transition from step to step even when partially paralyzed muscles were too
weak to produce enough moment at the joint to produce effective push-off.
This work has shown that:
1. The controllability of the surface EMG from a partially paralyzed muscle from
individuals with iSCI during a visual pursuit task was similar to able-bodied subjects.
2. Surface EMG from the ipsilateral erector spinae and medial gastrconemius
consistently performed well to identify the intent to step in able-bodied and iSCI subjects.
3. Spatio-temporal gait parameters with EMG-triggering were at least as good as
with standard switch-triggered FES for iSCI subjects in spite of the differences in their

injury levels, degree of preserved volitional control, and muscle set chosen for
stimulation.
4. EMG-triggering improved the coordination of the FES-assisted iSCI gait during
stand-to-walk transitions to levels similar to able-bodied gait.
5. Command sources can be selected objectively prior to implementing a fully
implantable EMG-triggered FES system for walking.
6. The optimal number of command sources, features, and signal processing
techniques can be determined to further improve the accuracy of EMG-triggering.
More research is needed to optimize the implantation site for EMG recording
electrodes and define the technical requirements for a clinically practical EMG-triggered
system to facilitate ambulation after iSCI.
14

PREFACE
This dissertation compiles my research work at the Cleveland FES Center during
my doctoral studies in the Department of Biomedical Engineering at the Case Western
Reserve University. The research work was a part of my job as a research assistant at the
Cleveland Louis Stoke Veterans Affairs Medical Center, to which I was affiliated from
spring 2004 to summer 2008.
This document is divided into seven chapters. This research work is a link that
starts based on prior work and ends where it lends itself to future work. The first chapter
starts the link where it gives an introduction to prior work and lays out the organization of
this study. The six chapters after that are written as manuscripts that are either accepted
or intended for publication in peer-reviewed journals. The last chapter ends the link
where it extrapolates the results obtained during the course of this study that can lend
itself to future work.
15

ACKNOWLEDGEMENTS
This work is indebted to the help and support obtained from many people. First and
foremost is my research advisor, Dr. Ronald Triolo whose ideas, advice, and inspirations
made this work possible. Then I would like to thank my Ph.D. supervisory committee
consisting of Dr. Robert Kirsch, Dr. Patrick Crago, and Dr. Roger Quinn who provided a
sounding board, sound advice, and encouragement during the course of this study.
My journey in the world of research started with my year-long undergraduate
project in the laboratory of Dr. Bireswar Majumdar. I want to thank him for instilling in
me the love for research and for tuning my mental compass to take a middle path between
theoretical and experimental research.
I am indebted to my friends for providing me with a stimulating environment to
pursue my graduate study. I am especially grateful to Nasir Shaikh, Saangiit Srivastava,
Niraj Bidkar, and Sanjay Solanki at University of Florida; Ashvin Mudaliar at Virginia
Tech; Curtis To, Raviraj Nataraj, Vanessa Everding, J. Luis Lujan, Lee Fisher, Tom
Bulea, and Steve Gartman at Case Western Reserve University.
I am grateful to the Cleveland FES Center for bringing together researchers,
clinicians, and engineers under one roof. I want to thank everyone at the Motion Study
Laboratory, especially Rudi Kobetic, Dr. Elizabeth Hardin, Dr. Musa Audu, Stephanie
Bailey, Lori Rohde, Lisa Boggs, Mike Miller, John Schnellenberger, and Barb Seitz. This
work is indebted to the technical support provided by the Technology Development
Laboratory of the Cleveland FES Center.
I wish to thank my family for providing me with a loving environment. This
includes my extended family and friends, especially my best friend Rachna Kumar
for helping me through difficult times, and for all the emotional support and caring, fights
16

and camaraderie. Lastly, and most importantly I thank my parents Durgadas Dutta and
Sunanda Dutta and my brother Arindam Dutta for always loving and supporting me
in whatever I do. This work is dedicated to them and The Almighty.
17

CHAPTER 1
INTRODUCTION
Functional Electrical Stimulation (FES) for ambulation
Paralysis can be caused by an injury to the spinal cord that may partially or
completely damage the communication between the brain and the muscles. The spinal
cord injury (SCI) can be complete or incomplete based on the extent of damage to the
communication channels between the brain and the lower motor neurons below the level
of injury. There are approximately 250,000 people living with SCI in USA and about
11,000 new cases each year [1.1]. If the paralyzed muscles below the level of injury
remain innervated after the injury then they can be electrically activated by applying a
series of electrical current pulses. Functional Electrical Stimulation (FES) refers to the
application of electrical pulses to restore neuromuscular function after paralysis. FES was
first used by Liberson for actuating paralyzed limbs [1.2]. FES has been successful in
providing walking function to spinal cord injured individuals with limited or no walking
abilities [1.3]. Most of the commercially available FES systems as well as the one that is
currently used by our group needs user input to select menu options and to trigger FES-
assisted stepping action. The current command interface for our FES system is a push-
button, which can be mounted on the walker or worn on a finger [1.4-1.7]. The push-
button as a command interface is plausible for selecting menu options during standing but
it is an impediment when it has to be actuated with fingers during walking to trigger
every step. Some individuals with limited finger and hand function find it difficult to
press push-buttons, more so while trying to maintain balance during ambulation. This
particular function of the push-button as a trigger for stepping action can be replaced by a
gait event detector. The gait event detector can identify the event (appropriate time during
18

a gait cycle) to activate the required pattern of electrical stimulation. Some of the gait
event detectors investigated in past by other researchers are based on foot-switches,
accelerometers, gyroscopes, and the electromyogram (EMG)/electroneurogram (ENG)
[1.8-1.16]. The gait event detector based on motion sensors needs volitional movement of
limb segments which may not be possible with subjects with paralysis. We decided to
investigate electromyogram (EMG) since it temporally precedes the joint kinetics and
kinematics (electromechanical delay about 100 ms [1.17]) and may be feasible as a
control source even for individuals with incomplete spinal cord injury (iSCI), who may
have lost their ability to move but may still have volitionally controllable EMG activity
[1.18]. The natural latency between electrophysiological and biomechanical events
provides time to detect the intent and then assist the intended movement with FES. EMG-
based triggering of FES patterns should integrate the FES-generated movement
seamlessly with the volitional effort that is necessary in the case of iSCI individuals who
have some sensory and motor function below the level of injury.
The hardware for the FES-controller
The Universal External Control Unit (UECU) with 8-channel Implanted Receiver-
Stimulator (IRS-8) and 12-channel Implanted Stimulator-Telemeter (IST-12) were used
to implement the FES-controller to deliver electrical stimulation to the targeted muscles
[1.4]. The UECU controlled the temporal pattern of the stimulation that was transmitted
to the IRS-8 or IST-12 using an inductive coupling. A finger-switch connected to the
UECU served as a command interface to select menu options. Figure 1.1 shows the
components of the FES system. The UECU is typically 11cm x 8cm x 4.5cm and holds
four modules as shown in Figure 1.2 with its accessories.
The UECU contains the following internal modules as shown in Figure 1.3 [1.22],
19

- Communications module: serves as a communication hub for the UECU
and a central processor during stand-alone operation of the UECU. It also
contains circuitry for the power switch and inter-module bus. It is equipped
with a 16-bit processor, 1MB RAM, and 2MB of flash memory.
- Implant control module: it has two radio frequency (6.78 MHz) channels to
communicate with two IRS or IST.
- System module: it manages the user interface like push-buttons, a display,
and sound. It also has four analog inputs (two single-ended and two
differential) that are acquired by a 12-bit analog-to-digital converter.
- Percutaneous stimulation module: it provides 12-channels of current-
controlled stimulation with maximum amplitude of 20mA and a compliance
voltage of 50V.
- Surface stimulation module: it provides 4 or 8 channels of stimulation with
maximum amplitude of 100mA and a compliance voltage of 100V.
A unique address is assigned to each module for sending messages over inter-module
bus.
A Simulink (The Mathworks Inc., USA) toolkit is provided with blocksets for
programming the UECU. Real-time workshop (The Mathworks Inc., USA) is used to
generate the C code from the Simulink models that can then be compiled for real-time
execution in the communications module (Motorola HC(S) 12) or xPC target PC. An
FES-controller implemented in Simulink (The Mathworks Inc., USA) can be executed in
the communication module target in a stand-alone UECU or can be implemented in an
external target PC running xPC target (The Mathworks Inc., USA). A target PC running
20

xPC target (The Mathworks Inc., USA) provides processing power and I/O capabilities
like data acquisition boards and serial ports. Figure 1.4 shows the stand-alone
configuration where the FES-controller is running in the communication module target in
the UECU. Figure 1.5 shows the UECU configuration with an xPC target PC. The
disadvantage of using an external xPC target PC is that the FES system is not portable.
The subject remains tethered to the external xPC target PC while using the FES system.
Electromyogram as a command source for FES-controller for ambulation after iSCI
The gait is roughly a cyclic process which can be divided into stepping of one side
followed by the other. A step defines the phase of the gait between foot-off that is the
instant when foot loses contact with the ground to the foot-off of the contralateral limb.
Gait is nevertheless a dynamic process where the steps dynamics are not isolated but one
step leads to the other steps in terms of the dynamics of the locomotor system. The
transition between the steps involves energy injection through push-off that generates a
burst of energy causing the foot to plantarflex and shifts the body towards the
contralateral limb and subsequently allowing the limb to swing forward. The push-off
correlates with a burst in the muscle activity over multiple synergist muscles, mainly the
ankle plantar-flexors. Electromyogram (EMG) is the time history of electrical activity in
the muscle that can be used to find the activation of the muscles. The burst in the muscle
activity during the push-off produces burst in the volitional EMG of all the synergist
muscles which have a pattern of activation during the transition phase of gait (i.e. left to
right step and right to left step transitions). This synergistic modulation of the volitional
EMG, if present in partially paralyzed muscles, can be used as a feature template to
identify the intent to transition from the left to right step and right to left step even when
21

partially paralyzed muscles are too weak to produce enough moment at the joint to
produce effective push-off.
Prior work has shown that the EMG synergies found by principal component
analysis can provide information related to gait events and also gait-speed [1.19].
Transition specific EMG features can be identified using principal component analysis
which can then be used to identify the transition phase of the gait. A binary classifier to
trigger the transition from left to the right step and vice versa can be trained with the
parameters from correlation analysis of the EMG pattern with transition specific EMG
feature template. The correlation coefficients of the features associated with these
transitions are postulated to be clustered in the feature space. During online operation, the
classifier will have to identify the cluster from windowed EMG using cross-correlation
with the specified features and determine the intended transition. This method can be
conceptually extended to identify the transitions to other tasks like side-stepping, stair-
climbing, different gait-speeds etc. It is postulated that EMG-triggered FES-controller
will have an impact on the coordination of the FES-assisted iSCI gait. Seamlessly
integrating the FES-generated movement with the volitional movement should
significantly enhance the transitions from one gait phase to the other during walking.
There are challenges associated with the implementation of this method. The nature
of motor deficits in iSCI population is very heterogeneous. Some individuals can walk to
a certain extent with upper-body support, some can stand using the extensor tone and
some are completely non-ambulatory. The partially paralyzed muscles had to be selected
appropriately such that the volitional EMG from those muscles had enough information
to identify the gait phase transitions. The EMG had to be blanked during the stimulation
22

to remove stimulation artifact that reduced the information content in the EMG. This may
produce overlapping clusters in EMG feature space that will be difficult to classify with
low false positive rate. More EMG channels (more than preferred two) may be needed in
order to reduce the false positive rate in that case. In this study, the enhanced
coordination during ambulation was investigated by dynamical systems tools like return
map analysis [1.20]. Subjective impressions of the two controllers were captured by a
Usability Rating Scale (URS) [1.21].
Electromyogram-based trigger for the FES-controller: specific objectives of the
work
The overall goal was to develop and evaluate an EMG-based trigger for the FES-
controller which can assist volitional motor function synergistically with electrical
stimulation during gait. The overall goal was divided into three specific aims.
Aim 1 - Muscle selection for EMG-based trigger: Select a set of two partially
paralyzed muscles in individuals with iSCI that yield consistent and reliable command
information for FES-assisted gait.
Hypothesis 1: The two partially paralyzed muscles will have volitionally
controllable EMG pattern similar to that in able-bodied individuals.
1. The iSCI subjects have volitional control over the surface EMG from the
partially paralyzed muscles that are comparable to able-bodied controls.
2. The iSCI subjects have EMG pattern in 2 partially paralyzed muscles with
enough information to identify the gait phase transitions during over-ground walking.
Aim 2 - Feasibility analysis of EMG-triggered FES-assisted ambulation:
Development and online-testing of a FES-controller for ambulation with a surface EMG-
based classifier for triggering FES-assisted steps in subjects with iSCI.
23

Hypothesis 2: It was hypothesized that two muscles can be used to detect intention
for foot-off with false-positive rate less that 2 % and true-positive rate greater than 85 %.
Aim 3 - Evaluation of EMG-triggered FES-assisted gait: Compare the FES-
assisted gait with the surface EMG-triggered FES-controller with the switch-triggered
one with dynamical systems tools like return map analysis and subjective tools like
Usability Rating Scale to evaluate enhancement in coordination, especially during the
gait phase transitions.
Hypothesis 3: EMG-triggered FES-controller will enhance the FES-assisted over-
ground ambulation when compared to switch-triggered one.

Overview of the chapters
Chapter 2 addresses Hypothesis 1 and discusses the evaluation of surface
electromyogram from partially paralyzed muscles as a command source for triggering
FES-assisted steps during walking.
Chapter 3 addresses Hypothesis 2 and assesses the feasibility of triggering FES-
assisted steps with surface EMG-based classifier running in real-time during over-ground
ambulation.
Chapter 4 and 5 address Hypothesis 3 and compare EMG-triggered FES-assisted
gait to switch-triggered stepping. Chapter 4 discusses the gait parameters during over-
ground walking in the laboratory. Chapter 5 discusses the coordination and stability
during stand-to-walk transition in the laboratory.
Chapter 6 presents a proof-of-concept implementation of a simple binary classifier
based on intramuscular EMG from a completely implanted neuroprosthesis using
24

methods developed in the earlier chapters for triggering FES-assisted steps with a fully
implantable FES system.
Chapter 7 discusses the challenges and the future work based on the results
presented in Chapters 2 to 6.
References
1.1. SCIIN, Spinal cord injury: facts and figures at a glance - June 2005. 2005, Spinal
Cord Injury Information Network.
1.2. W. T. Liberson, H. J. Holmquest, D. Scott, M.Dow, Functional electrotherapy:
stimulation of the peroneal nerve synchronized with the swing phase of the gait of
hemiplegic patients, Arch Phys Med Rehabil, vol. 42, 1961, pp. 101-105.
1.3. R. Kobetic, R. J. Triolo, J. P. Uhlir, C. Bieri, M. Wibowo, G. Polando, E. B.
Marsolais, J. A. Davis Jr., K. A. Ferguson, and M. Sharma, Implanted Functional
Electrical Stimulation System for Mobility in Paraplegia: A Follow-Up Case
Report, IEEE Trans. Rehabil. Eng., vol. 7, no. 4, Dec. 1999, pp. 390398.
1.4. B. Smith, Z. Tang, M.W. Johnson, S. Pourmehdi, M.M. Gazdik, J.R. Buckett, and
P.H. Peckham, An externally powered, multichannel, implantable stimulator-
telemeter for control of paralyzed muscle, IEEE Trans Biomed Eng., vol. 45, no.
4, 1998, pp. 463-475.
1.5. Z. Tang, B. Smith, J.H. Schild, and P.H. Peckham, Data transmission from an
implantable biotelemeter by load-shift keying using circuit configuration
modulator, IEEE Trans Biomed Eng., vol. 42, no. 5, 1995, pp. 525-528.
1.6. N. Bhadra, K.L. Kilgore, and P.H. Peckham, Implanted stimulators for
restoration of function in spinal cord injury, Med. Eng. Phys., vol. 23, 2001, pp.
19-28.
1.7. J. Knutson, M. Audu, and R. Triolo, Interventions for mobility and manipulation
after spinal cord injury: a review of orthotic and neuroprosthetic options, Topics
in Spinal Cord Rehab, in press.
1.8. J. R.W. Morris, Accelerometry a technique for the measurement of human body
movements, J Biomech., vol. 6, 1973, pp. 72936.
1.9. I. P. Pappas, M. R. Popovic, T. Keller, V. Dietz, and M. Morari, A reliable gait
phase detection system, IEEE Trans. Neural Syst. Rehabil. Eng., vol. 9, no. 2,
Jun. 2001, pp. 113-125.
25

1.10. A. Mansfield, and G. M. Lyons, The use of accelerometry to detect heel contact
events for use as a sensor in FES assisted walking, Med. Eng. Phys., vol. 25, no.
10, Dec. 2003, pp. 879-885.
1.11. R. Williamson, and B. J. Andrews, Gait event detection for FES using
accelerometers and supervised machine learning, IEEE Transactions on
Rehabilitation Engineering, vol. 8, 2000, pp. 312319.
1.12. T. Sinkjaer, M. Haugland, A. Inman, M. Hansen, and K. D. Nielsen,
Biopotentials as command and feedback signals in functional electrical
stimulation systems, Med. Eng. Phys., vol 25, no. 1, Jan. 2003, pp. 29-40.
1.13. R. T. Lauer, R. T. Smith, and R. R. Betz, Application of a neuro-fuzzy network
for gait event detection using electromyography in the child with cerebral palsy,
IEEE Trans. Rehabil. Eng., vol. 52, no. 9, Sep. 2005, pp. 15321540.
1.14. D. Graupe, and H. Kordylewski, Artificial neural network control of FES in
paraplegics for patient responsive ambulation, IEEE Trans. Biomed Eng., vol.
42, no. 7, Jul. 1995, pp. 699-707.
1.15. R. J. Triolo, and G. D. Moskowitz, The theoretical development of a
multichannel time-series myoprocessor for simultaneous limb function detection
and muscle force estimation, IEEE Trans. Biomed Eng., vol. 36, no. 10, Oct.
1989, pp. 1004-1017.
1.16. A. Dutta, R. Kobetic, and R. J. Triolo, EMG based triggering and modulation of
stimulation patterns for FES assisted ambulation a conceptual study, presented
at XXth Congress of the International Society of Biomechanics, Cleveland, OH,
Aug. 2005.
1.17. S. Zhou, M. F. Carey, R. J. Snow, D. L. Lawson, and W. E. Morrison, Effects of
muscle fatigue and temperature on electromechanical delay, Electromyogr Clin
Neurophysiol., vol 38, no. 2, Mar. 1998, pp. 67-73.
1.18. A. Dutta, and R. J. Triolo, Volitional surface EMG based control of FES-assisted
gait after incomplete spinal cord injury a single case feasibility study,
presented at NIH Neural Interfaces Workshop, Bethesda, MD, Sep. 2005.
1.19. A. Hof, H. Elzinga, W. Grimmius, and J. Halbertsma, Speed dependence of
averaged EMG pro-files in walking, Gait and Posture, vol. 16, 2002, pp. 7886.
1.20. Y. Hurmuzlu, and C. Basdogan, On the measurement of stability in human
locomotion, ASME Journal of Biomechanical Engineering, vol. 116, 1994, pp.
30-36.
1.21. E. Steinfeld, G. Danford, Eds. Enabling Environments: Measuring the Impact of
Environment on Disability and Rehabilitation. Kluwer/Plenum, 1999.
26

1.22. Stephen Trier, UECU Toolkit Manual, Version 1.9, 2004.

27

Figures

Laptop
PC
External
Control Unit
Coupling
Coil
In-Line
Connectors
Implantable
Receiver
Stimulator
Electrodes
Clinical
Interface
Implanted components
Figure 1.1: Components of the FES system.
28


Figure 1.2: Universal External Control Unit (UECU) with inductive coil and finger
switch.
29


Figure 1.3: Universal External Control Unit (UECU) internal modules [1.22].


30


Figure 1.4: Universal External Control Unit (UECU) stand-alone configuration [1.22].

31


Figure 1.5: Universal External Control Unit (UECU) configuration with xPC target PC
[1.22].
32

33
CHAPTER 2
EVALUATION OF SURFACE ELECTROMYOGRAM FROM PARTIALLY
PARALYZED MUSCLES AS A COMMAND SOURCE FOR FUNCTIONAL
ELECTRICAL STIMULATION
A manuscript based on this chapter was submitted for publication in The Journal of
Rehabilitation Research & Development.
Abstract
Functional Electrical Stimulation (FES) facilitates ambulatory function after
paralysis by electrically activating the muscles of the lower extremities by exciting the
peripheral motor nerves. The FES-assisted stepping can be triggered by a manual switch
or by a gait event detector (GED). The objective of this study was to evaluate the
performance of the surface electromyogram (EMG) from partially paralyzed muscles for
detecting the intent to step during level over-ground walking. Two subjects with
incomplete spinal cord injuries (iSCI) and four able-bodied subjects volunteered for this
study. Subject iSCI-1 (age 23 years, C6 ASIA C) was non-ambulatory without the
assistance of FES. Subject iSCI-2 (age 34 years, T1 ASIA D) could walk only short
distances without FES. The four able-bodied subjects, Able-1 (age 26 years), Able-2 (age
25 years), Able-3 (age 25 years) and Able-4 (age 54 years) had no known injury or
pathology to either lower extremity during the study. Partially paralyzed muscles showed
performance similar (one-way two-tailed ANOVA, p<0.01) to able-bodied muscles in
visual pursuit tasks involving contraction of the muscle in a controlled fashion. Ipsilateral
erector spinae and ipsilateral medial gastrconemius consistently performed well to
identify the intent to step in both able-bodied subjects and subjects with iSCI. left erector
spinae with a mean Discriminability Index (DI) of 0.87 for left step trigger and right
erector spinae with a mean DI of 0.83 for the right step trigger were best command

sources for iSCI-1. left erector spinae with a mean DI of 0.93 for left step trigger and
right medial gastrocnemius with a mean DI of 0.88 for the right step trigger were the best
command sources for iSCI-2.
Introduction
Functional electrical stimulation (FES) provides an opportunity for brace-free
ambulation to wheelchair dependent individuals with incomplete spinal cord injuries
(iSCI). FES systems can electrically activate a customized set of muscles selected to
address individual gait deficits with pre-programmed patterns of stimulation to produce
cyclic movement of the lower extremities for ambulation [2.1], [2.2]. Users normally use
a switch to manually trigger each step and progress through the customized pattern of
stimulation to achieve walking function. In this study we evaluated the controllability
(the ability to volitionally modulate the surface electromyogram (EMG) in a visual
pursuit task) and discriminability (the ability to determine the intent to step during level
overground walking) of the surface EMG from both able-bodied volunteers and
individuals with iSCI. Our goal was to specify a process and criterion for selecting two
muscles for a new command and control interface that can be implemented with two
channels of implanted EMG recording electrodes with our next family of implantable
stimulator-telemeters (IST) [2.3-2.6]. This report summarizes the evaluation of the
surface EMG from partially paralyzed muscles of two subjects with iSCI and its
comparison with normative data from 4 able-bodied subjects.
While gait event detection is possible with physical sensors such as force sensitive
resistors, accelerometers, gyroscopes [2.7], [2.8], biopotentials such as EMG can also
provide useful and reliable information when the movement is impaired [2.9-2.11]. The
EMG temporally precedes the generation of force in a muscle and the resulting
34

movement of a joint. This makes EMG an attractive signal for detection of intent and can
allow the desired movement to be assisted by FES. Graupe and Kordylewski presented a
neural network based classifier with on-line learning capabilities for individuals with
complete paraplegia [2.11], [2.12]. Thorsen et al. showed improved wrist extension with
stimulation controlled by surface EMG from partially paralyzed wrist extensors [2.13].
Futami et al. showed the feasibility of proportional control of FES with the surface EMG
from the same muscle (partially paralyzed knee extensors) in incomplete hemiplegia
[2.14]. Our preliminary study demonstrated the feasibility of FES-assisted walking
triggered by the surface EMG during double-support phase of gait (when both the feet are
on ground) [2.5]. A quantitative method is presented in this paper to evaluate the
electromyogram from partially paralyzed muscles as a command source for triggering
FES-assisted steps during ambulation.
Methods
Subjects
Two male subjects with incomplete spinal cord injury (iSCI) volunteered for this
study. iSCI-1 was a 23 years old male with C7 motor and C6 sensory incomplete spinal
cord injury (ASIA C) who could stand but could not initiate a step without the assistance
from FES. iSCI-2 was a 34 years old male with T1 motor and C6 sensory incomplete
spinal cord injury (ASIA D) who could walk only short distances without the assistance
from FES. They each received an 8 channel Implantable Receiver Stimulator (IRS-8) and
eight surgically implanted intramuscular electrodes in a related study designed to
facilitate household and limited community ambulation [2.15]. The four able-bodied
subjects, Able-1 (age 26 years), Able-2 (age 25 years), Able-3 (age 25 years) and Able-4
35

(age 54 years) provided the normative data for comparison. They had no known injury or
pathology to either lower extremity during the course of the study.
The subject iSCI-1 received intramuscular stimulating electrodes bilaterally
recruiting iliopsoas, vastus intermedius and lateralis, tensor fasciae latae, tibialis anterior,
and peroneus longus muscles. The subject iSCI-2 received stimulation electrodes only on
his left side recruiting iliopsoas, vastus intermedius and lateralis, tensor fasciae latae,
gluteus medius, gluteus maximus, posterior portion of adductor magnus, and tibialis
anterior (2 electrodes). Temporal patterns of stimulation to activate the muscles were
customized for their particular gait deficits according to established tuning procedures in
order to achieve forward stepping in a rolling walker [2.16], [2.17]. The subjects
completed 6 weeks of over-ground gait training (2 hour sessions, 3 times per week) with
a physical therapist using the implanted FES system. After discharge from rehabilitation,
they volunteered for the studies using the myoelectric control of the FES system.
Informed consent was obtained from all the subjects before their participation and
all study related procedures were approved by the Institutional Review Board of the
Louis Stokes Cleveland Department of Veterans Affairs Medical Center.
Test of Controllability
Controllability in control theory means that the system states can be changed by
changing the system input and reachability means that there exists an input that changes
the states from A to B in finite time. Reachability always implies controllability. We will
define controllability for this experimental evaluation based on the definition of
reachability as the ability to modulate the EMG activity from one level to another in a
finite time during a visual pursuit task. The experimental setup for evaluating the
controllability of a muscle with biofeedback is shown in Figure 2.1. The surface EMG
36

was collected from the rectus femoris while the subject was asked to track the absolute
value of a sinusoid of amplitude 0.7 and frequency 0.01 Hz over one time-period (i.e., the
TARGET signal) during a trial. The rectus femoris was maintained in an isometric
condition by Biodex System3 (Biodex Medical Systems, USA) dynamometer as shown in
Figure 2.1. The EMG was pre-amplified and low-pass filtered (anti-aliasing,
frequency
cutoff
=1000 Hz) by CED 1902 preamplifier (Cambridge Electronic Design,
England) before being sampled at 2200 Hz by the data-acquisition card (AT-MIO-64F-5,
National Instruments, USA) in a personal computer (PC). The data processing and
graphical display (GUI) were performed using Matlab R13 (The MathWorks, Inc., USA)
in the same PC. The EMG sampled by the data-acquisition card was band-pass filtered
(5th order zero-lag Butterworth, 20-500 Hz), de-trended and rectified before being
evaluated as a command signal (i.e., the TRACKING signal). The average EMG during
two seconds of maximum voluntary isometric contraction (MVC) was used for
normalization. The average magnitude of the EMG over two seconds while the subject
was asked to relax the muscle provided an estimate of the baseline activity. During visual
pursuit, the estimated baseline was subtracted from the EMG and then it was normalized
by the MVC. The normalized EMG was then divided into bins, each holding 0.1 sec of
data. The TRACKING signal (i.e., the processed EMG) pursuing the TARGET signal
was updated every 0.1 sec with the average value of the data in the latest bin only if the
mean was greater by twice the standard deviation, or less by one standard deviation, of
the data during MVC.
Both TARGET and TRACKING signals were projected on the wall in front of the
subject seated in the dynamometer. A set of five trials with a minimum five minutes of
37

rest in between the trials were conducted on the left and right rectus femoris of the
subjects with iSCI. A set of five trials were conducted only on the right rectus femoris of
the right-handed able-bodied subjects. The absolute value of the difference between the
TARGET and TRACKING signals, the tracking error signal
(
ERROR signal = TRACKING signal - TARGET signal
), was ensemble averaged over the set
of five trials. The trial period of 100 sec was divided into four parts of 25 sec each. The
first (0-25 sec) and the third (50-75 sec) parts were the periods during which the subject
was trying to contract the muscle to catch-up with the TARGET signal. The second (25-
50 sec) and the fourth parts (75-100 sec) were the periods when the subject was trying to
relax the muscle. The mean of the absolute tracking error was computed for each of these
four parts for comparison.
Test of Discriminability
Discriminability was defined as the ability to detect the intent to step with a binary
classifier using the surface EMG during the double-support phase of gait when both the
feet are in contact with the ground. Discriminability essentially indicated how well a
simple binary classifier could discriminate between the intent to step and the intent to
stand during the double-support phase of gait. Surface EMG signals were collected from
gluteus medius (GM), biceps femoris (BF), medial gastrocnemius (MG), rectus femoris
(RF), tibialis anterior (TA), and erector spinae (ES at T9) bilaterally. In case of iSCI
subjects, the surface EMG was collected during switch-triggered FES-assisted gait when
each step was initiated by depression of ring-mounted finger switch. The experimental
setup is shown in Figure 2.2 where subject is walking with an implanted switch-triggered
FES system based on an IRS-8 implanted pulse generator under the control of an external
38

control unit (ECU). Surface EMG was collected using Ag/AgCl electrodes with 2 cm.
inter-electrode distance following the SENIAM guidelines [2.18]. The EMG signals were
amplified and low-pass filtered (anti-aliasing, frequency
cutoff
=1000 Hz) by CED 1902
amplifiers (Cambridge Electronic Design, England) before being sampled at 2400 Hz
(AT-MIO-64F-5, National Instruments, USA) in the host personal computer (PC). The
CED 1902 amplifier has a switching circuit (clamp) which was activated by a trigger
pulse that disconnected the electrode inputs from the amplifier and connected them to the
common electrode just before the start of the stimulation pulse. The input channels of
CED 1902 were clamped this way when stimulation pulses were applied to the muscles to
prevent stimulation artifact. The gain of each channel was set separately in the CED 1902
amplifiers to prevent saturation at the maximum muscle activity during the gait-cycle.
The implanted FES system (i.e., IRS-8) delivered electrical pulses at a frequency of 20
Hz, so the sampled EMG was divided into bins of 50ms duration. In each bin, 30ms
following the start of the stimulation pulse was blanked to remove the residual
stimulation artifact and M-wave, thus leaving signal related to voluntary muscle activity.
The remaining 20 ms of data in each bin was detrended, band-pass filtered (5th order
zero-lag Butterworth, 20-500 Hz), and rectified. The blanked portion of the EMG was
reconstructed with the average value of the EMG in the preceding and succeeding blocks
[2.19]. Then the whole EMG pattern was low pass filtered (5
th
order zero-lag
Butterworth, frequency
cutoff
=3 Hz) to get the linear envelope. The EMG pattern for each
muscle was normalized by the maximum value of the EMG linear envelope (LE) during a
gait cycle. The normalized LEs during a gait cycle were then divided into double-support
and swing phase of gait based on the occurrence of foot-strike and foot-off. The foot and
39

ground contact sequences were determined from the insole foot switches (B&L
Engineering, USA) placed bilaterally at the medial and lateral heel, first and fifth
metatarsal, and big toe. The intent to step can be detected based on the magnitude of the
LE when it crosses a selected threshold (threshold-based) or by matching the LE pattern
with a specified pattern of muscle activity using cross-correlation analysis (pattern-
recognition).
The subjects were asked to start walking after standing for 3 sec and reach a self-
selected speed within 5m from the start position. After reaching the self-selected speed
the subjects had to decelerate and return to standing. The experimental protocol is shown
in Figure 2.3. The subjects were asked to wait in terminal stance for 3 sec. The
normalized LEs of each muscle were divided into two classes: the class True was
comprised of LEs (~ 150) during double-support phase prior to foot-off and the class
False consisted of the LEs (~150) during terminal stance and initial standing. Half of
the data were randomly allocated to training and used to find a characteristic pattern of
activation by ensemble averaging the LEs. The characteristic pattern found for the class
True was cross-correlated with the LEs from the other half of the data (test data) for the
classes True and False. A Receiver Operating Characteristics (ROC) curve shows
the tradeoff between sensitivity (True Positive Rate) and 1 specificity (False Positive
Rate) of a binary classifier [2.20]. The ROC curve was computed from the cross-
correlation coefficient (i.e., PRC for the pattern-recognition classifier) and the amplitude
(i.e., TC for the threshold-based classifier) of the LEs as the decision threshold was
varied over the range of data in the two classes, True and False. The LEs from all the
able-bodied subjects were pooled together. In case of able-bodied data, the left and the
40

right sides were considered similar and the performance of the PRC and TC was
evaluated only for the right side. The ipsilateral muscles are the muscles of the right side
and contralateral muscles are the muscles of the left side for the classifiers (PRC and TC)
trying to detect the intent to step on the right side.
Discriminability Index (DI
PRC
and DI
TC
) was defined as the area under the ROC
curve (AUC) which gave a measure of performance for the binary classifiers, PRC and
TC. Bradley showed that AUC exhibits a number of desirable properties when compared
to overall accuracy of the classifiers like increased sensitivity in Analysis of Variance
(ANOVA) tests standard error decreased as both AUC and the number of test samples
increased. AUC is also decision threshold independent and it is invariant to a priori class
probabilities [2.21]. The area under the ROC curve was numerically computed with
trapezoidal integration. Figure 2.4 illustrates the three cases,
where 1 , 1 5 . 0 , 5 . 0 0 = < s s < DI DI DI . We are interested in 1 5 . 0 < s DI such that the mean
of the True data is greater than or equal to the mean of the False data and the values
greater than the discrimination threshold are classified as True.
The data were randomly partitioned ten times into training and test data-sets for a
10-fold cross-validation. For consistency the same training and test data-sets were used
by both the classifiers (PRC and TC) for the computation of the ROC curves in a paired
experimental design. Therefore, 10 ROC curves for each classifier were generated by
randomly pooling the LEs into training and test data-sets. The DI was computed for each
ROC curve and then averaged to find the mean (DI
PRC
and DI
TC
) and standard deviation
(SD(DI
PRC
) and SD(DI
TC
)) for each classifier (DI
PRC
for pattern-recognition classifier and
DI
TC
for the threshold-based classifier) [2.21]. Wilcoxon statistic (W) was computed as
41

an alias of DI (i.e., a performance measure of the classifier) to compare the two for
robustness. The standard error (SE(W
PRC
) and SE(W
TC
)) was computed from an
approximation of the Wilcoxon statistic (W
PRC
and W
TC
) which assumes exponential
distribution of the data in the classes, True and False. SE (W) has been shown to be
conservative as it overestimates the standard error [2.22]
) 1 (
2
;
) 2 (
) )( 1 ( ) )( 1 ( ) 1 (
) (
2
2 1
2
2
2
1
W
W
Q
W
W
Q
C C
W Q C W Q C W W
W SE
n p
n p
+
=

=
+ +
=

Where C
p
and C
n
are the number of data points in the classes, True and False
respectively.
Statistical Analysis
One-way two-tailed analysis of variance (anova1 in Matlab R14, The
MathWorks, Inc., USA) was performed on the absolute tracking error that was obtained
from the Test of Controllability. All observations were considered to be mutually
independent for the ANOVA test. The p-value was computed for the null hypothesis that
the absolute tracking error parameter has the same mean for all the cases. If the p-value
was close to zero (<0.01) then the null hypothesis was rejected and the result was
considered statistically significant.
Two-way two-tailed analysis of variance (anova2 in Matlab R14, The MathWorks,
Inc., USA) was performed on Discriminability Index (DI) the performance measure for
the classifier and muscle, which was obtained from the Test of Discriminability. All
observations were considered to be mutually independent for the ANOVA test. The p-
value was computed for the null hypotheses: 1 the performance measure for the pattern-
recognition classifier (PRC) and threshold-based classifier (TC) have equal means, 2
42

the performance measure for all the muscles have equal means, 3 there is no
interactions between the classifier type and muscle type. If the p-value was close to zero
(<0.05) then that null hypothesis was rejected and the result was considered statistically
significant. To find which pairs were significantly different, post hoc tests were
performed with the critical values found from Scheffes S procedure.
ANOVA is insensitive to departures from the assumption of equal variances when
the sample sizes are equal, as in our case. Moreover, prior work has shown that ANOVA
is robust to violations of its assumptions [2.23]
Results
Results from the Test of Controllability
The TRACKING signal (broken black line) using the surface EMG of rectus
femoris and the TARGET signal (solid black line) that was the absolute value of a 0.01
Hz sinusoid of amplitude 0.7 during visual pursuit over 100 ms is shown in Figure 2.5
and 2.6. The top panel of Figure 2.5 shows the results for the rectus femoris of the left
and the right sides of iSCI-1 and the bottom panel shows the same for iSCI-2. Figure 2.6
shows the results for surface EMG from rectus femoris of the right side for the able-
bodied subjects. The solid black line is the TARGET signal and the broken black line
shows the TRACKING signal that was ensemble averaged over 5 trials. The boxes at
each data point show the lower quartile and upper quartile values of the TRACKING
signal. Whiskers extending at the top and bottom of the boxes show the range of the
TRACKING signal. Table 2.1 presents the mean, the minimum, and the maximum
average absolute tracking error during four parts (0-25 sec, 25-50 sec, 50-75 sec, 75-100
sec) of the trial. The p-value from the one-way two-tailed ANOVA test for the average
tracking error over the whole trial (100 sec) was not statistically significant ( 0.01). This >
43

shows that all the subjects (iSCI and able-bodied) performed similarly in the visual
pursuit task for the Test of Controllability. Individuals with iSCI were able to control the
contraction of their muscles equally well as able-bodied individuals.
The average absolute tracking error was smallest (mean = 5.48) in the first part (0-
25 sec) of the trial period, for the subjects with iSCI, corresponding to the initial period of
increasing isometric contraction. There was a slight deterioration in the performance of
the iSCI subjects in the third part of the trial, corresponding to the second period of
increasing contraction (50-75 sec, mean=7.96) when compared to the first part (0-25 sec,
mean=5.48). The subjects with iSCI performed worse in the second (25-50 sec,
mean=9.11) and fourth (75-100 sec, mean=10.27) parts of the trial period, which required
relaxing the muscle in a controlled fashion.
Results from the Test of Discriminability
Table 2.2 shows the results from the Test of Discriminability for the muscles
gluteus medius (GM), biceps femoris (BF), medial gastrocnemius (MG), rectus femoris
(RF), tibialis anterior (TA), and erector spinae (ES at T9) for the able-bodied subjects.
The Wilcoxon statistic (W) was similar in magnitude to the corresponding
Discriminability Index (DI). Similarly the Standard Deviation (SD) of the DI over 10
random partitions (i.e., 10-fold cross-validation) was similar in magnitude to the Standard
Error (SE) found for the Wilcoxon statistic (W). There were statistically significant
(p>0.05) differences in the means of DI due to the muscle type as well as the classifier
type. The results from the post hoc analysis are presented in Figure 2.7. The top panel of
Figure 2.7 shows that the Ipsilateral MG, Ipsilateral ES, Contralateral BF, Contralateral
GM, and Contralateral TA in black markers that have performed the best (mean DI=1) as
a command source in the Test of Discriminability. The bottom panel of Figure 2.7 shows
44

that the Pattern Recognition Classifier (mean DI
PRC
=0.7586) performed much better than
the Threshold-based Classifier (mean DI
TC
=0.5016).
Table 2.3a and b show the results from the Test of Discriminability of iSCI-1 for
the left step and right step classifiers respectively. The Wilcoxon statistic (W) was similar
in magnitude to the corresponding value of the Discriminability Index (DI). Similarly the
Standard Deviation (SD) of the DI was similar in magnitude to the Standard Error (SE)
found for the Wilcoxon statistic (W). There were statistically significant (p 0.05)
differences in the means of DI due to the muscle type as well as the classifier type. The
results from post hoc analysis are presented in Figure 2.8. The top panel first column of
Figure 2.8 shows that left ES (mean DI=0.8705) in black marker performed the best
followed by left MG (mean DI=0.7881) in gray marker in the Test of Discriminability for
the left step. The bottom panel first column of Figure 2.8 shows that Pattern Recognition
Classifier (mean DI
PRC
=0.6486) in black marker performed slightly better than the
Threshold-based Classifier (mean DI
TC
=0.6071) in gray marker in the Test of
Discriminability for the left step. The top panel second column of Figure 2.8 shows that
right ES (mean DI=0.8299) performed the best followed by right MG (mean DI=0.7989)
in the Test of Discriminability for the right step. The bottom panel first column of Figure
2.8 shows that Pattern Recognition Classifier (mean DI
PRC
=0.6559) in black marker
performed slightly better than the Threshold-based Classifier (mean DI
TC
=0.5886) in gray
marker in the Test of Discriminability for the right step.
>
Table 2.4a and b show the results from the Test of Discriminability of iSCI-2 for
the left step and right step classifiers respectively. The Wilcoxon statistic (W) and the
corresponding value of the Discriminability Index (DI) were similar. The Standard
45

Deviation (SD) of the DI and the Standard Error (SE) found for the Wilcoxon statistic
(W) were similar. There were statistically significant (p 0.05) differences in the means
of DI due to the muscle type as well as the classifier type. The results from post hoc
analysis are presented in Figure 2.9. The top panel first column of Figure 2.9 shows that
left ES (mean DI=0.9293) in black marker performed the best followed by left MG (mean
DI=0.8736) and right RF (mean DI=0.8536) in the Test of Discriminability for the left
step. The bottom panel first column of Figure 2.9 shows that Pattern Recognition
Classifier (mean DI
PRC
=0.71856) in black marker performed much better than the
Threshold-based Classifier (mean DI
TC
=0.45457) in gray marker in the Test of
Discriminability for the left step. The top panel second column of Figure 2.9 shows that
right MG (mean DI=0.8805) performed the best followed by right ES (mean DI=0.853)
and left RF (mean DI=0.8484) in the Test of Discriminability for the right step. The
bottom panel first column of Figure 2.9 shows that Pattern Recognition Classifier (mean
DI
PRC
=0.6853) in black marker performed slightly better than the Threshold-based
Classifier (mean DI
TC
=0.54613) in black marker in the Test of Discriminability for the
right step.
>
Discussion
The controllability of the surface EMG from partially paralyzed rectus femoris of
subjects with incomplete SCI was evaluated in a visual pursuit task and found to have
performance similar (p<0.01) to able-bodied subjects (Figure 2.5 & 2.6, Table 2.1). The
average absolute tracking error was the performance measure during the visual pursuit
task which was smallest in the first part (0-25 sec) of the trial period for the subjects with
iSCI. The subjects with iSCI found it difficult to relax the muscle in a controlled fashion
after the first part (0-25 sec), which deteriorated the performance in the second part (25-
46

50 sec) of the trial period. Subject iSCI-1 found it difficult to reach the baseline at the end
of second part (25-50 sec) which deteriorated the performance during the muscle
contraction task in the third part (50-75 sec). Subject iSCI-2 could reach the baseline at
the end of the second part (25-50 sec) with his right rectus femoris but not with his left.
Subject iSCI-2 had more volitional control over his right side than his left. Overall,
subjects with iSCI performed better in muscle contraction tasks (0-25 sec and 50-75 sec)
than the muscle relaxation tasks (25-50 sec and 75-100 sec). The muscles that are under
contraction and increased muscle activity during the double-support phase of the gait
would be more robust for triggering the subsequent step. The partially paralyzed muscles
were evaluated for classification in the Test of Discriminability, where the muscles which
had were considered, such that the mean of the True data is greater than or
equal to the mean of the False data and the values greater than the discrimination
threshold were classified as True.
1 5 . 0 < s DI
In the Test of Discriminability, Ipsilateral ES and Ipsilateral MG consistently
performed well in both able-bodied subjects and the subjects with iSCI. The
Discriminability Index (DI) was computed from the Area under the ROC curve which
was similar to the Wilcoxon Statistic (W) which assumes that the data in the True and
False classes have exponential distributions. The variability associated with DI was
estimated from the Standard Error (SE) associated with W which was similar in
magnitude to the Standard Deviation (SD) computed from 10-fold cross-validation
partitions. Also, the Pattern Recognition Classifier (PRC) consistently performed better
than the Threshold-based Classifier (TC) in both the cases able-bodied subjects and
subjects with iSCI. The basic PRC used an ensemble average of the LEs in the True
47

class as the feature for pattern recognition. The PRC performance can improve with
better feature extraction using principal component analysis [2.5]. The two best muscles
for the command source and the type of the classifier were selected with post hoc
analysis using the critical values found from Scheffes S procedure after two-way
ANOVA of the Discriminability Index (DI). left ES with mean DI=0.87 for left step PRC
and right ES with mean DI=0.83 for the right step PRC were the best command sources
for iSCI-1. left ES with mean DI=0.93 for left step PRC and right MG with mean
DI=0.88 for the right step PRC were the best command sources for iSCI-2. It was found
that the distal muscle like MG was more susceptible to muscle spasms in iSCI-1.
Conclusion
The goal was to define a procedure to select EMG command sources from partially
paralyzed muscles and evaluate the classifier performance prior to surgical installation of
an implanted stimulator-telemeter that acquire and transmit EMG information from
implanted EMG electrodes. The new family of implantable stimulator-telemeter (IST-12)
has only 2 implanted EMG channels and the capability to perform the signal processing
required by the classifier [2.6]. Partially paralyzed muscles showed controllability similar
(p<0.01) to able-bodied muscles in visual pursuit tasks involving contraction of the
muscle in a controlled fashion during the Test of Controllability. Test of discriminability
was used to select two best muscles for classification to identify the intent to step.
Bilateral ES were the best command sources for iSCI-1 and left ES & right MG were the
best command sources for iSCI-2. Ipsilateral ES and MG performed the best in the Test
of Discriminability for able-bodied as well as iSCI subjects.
48

References
2.1. Graupe, D. and K. Kohn, Functional Electrical Stimulation for Ambulation by
Paraplegics. 1994: Krieger.
2.2. Kralj, A. and T. Bajd, Functional Electrical Stimulation: Standing and Walking
After Spinal Cord Injury. 1989: CRC Press.
2.3. R. Kobetic, R. J. Triolo, J. P. Uhlir, C. Bieri, M. Wibowo, G. Polando, E. B.
Marsolais, J. A. Davis Jr., K. A. Ferguson, and M. Sharma, Implanted Functional
Electrical Stimulation System for Mobility in Paraplegia: A Follow-Up Case
Report, IEEE Trans. Rehabil. Eng., vol. 7, no. 4, Dec. 1999, pp. 390398.
2.4. B. Smith, Z. Tang, M.W. Johnson, S. Pourmehdi, M.M. Gazdik, J.R. Buckett, and
P.H. Peckham , An externally powered, multichannel, implantable stimulator-
telemeter for control of paralyzed muscle, IEEE Trans Biomed Eng., vol. 45, no.
4, 1998, pp. 463-475.
2.5. A. Dutta, R. Kobetic, and R. Triolo, Ambulation after incomplete spinal cord
injury with EMG-triggered Functional Electrical Stimulation, IEEE Transactions
on Biomedical Engineering, 55:2, February 2008.
2.6. N. Bhadra, K.L. Kilgore, and P.H. Peckham, Implanted stimulators for
restoration of function in spinal cord injury, Med. Eng. Phys., vol. 23, 2001, pp.
19-28.
2.7. I. P. Pappas, M. R. Popovic, T. Keller, V. Dietz, and M. Morari, A reliable gait
phase detection system, IEEE Trans. Neural Syst. Rehabil. Eng., vol. 9, no. 2,
Jun. 2001, pp. 113-125.
2.8. A. Mansfield, and G. M. Lyons, The use of accelerometry to detect heel contact
events for use as a sensor in FES assisted walking, Med. Eng. Phys., vol. 25, no.
10, Dec. 2003, pp. 879-885.
2.9. T. Sinkjaer, M. Haugland, A. Inman, M. Hansen, and K. D. Nielsen,
Biopotentials as command and feedback signals in functional electrical
stimulation systems, Med. Eng. Phys., vol 25, no. 1, Jan. 2003, pp. 29-40.
2.10. R. T. Lauer, R. T. Smith, and R. R. Betz, Application of a neuro-fuzzy network
for gait event detection using electromyography in the child with cerebral palsy,
IEEE Trans. Rehabil. Eng., vol. 52, no. 9, Sep. 2005, pp. 15321540.
2.11. D. Graupe, and H. Kordylewski, Artificial neural network control of FES in
paraplegics for patient responsive ambulation, IEEE Trans. Biomed Eng., vol.
42, no. 7, Jul. 1995, pp. 699-707.
49

2.12. H. Kordylewski, and D. Graupe, Control of Neuromuscular Stimulation for
Ambulation by Complete Paraplegics via Artificial Neural Networks, Neurol.
Research, vol. 23, July 2001, pp.472-481.
2.13. R. Thorsen, R. Spadone, and M. Ferrarin, A pilot study of myoelectrically
controlled FES of upper extremity, IEEE Trans. Rehabil. Eng., vol. 9, no. 2, June
2001, pp. 161167.
2.14. R.Futami, K.Seki, T.Kawanishi, T.Sugiyama, I.Cikajlo, and Y.Handa,
Application of local EMG-driven FES to incompletely paralyzed lower
extremities, presented at 10th Annual Conference of the International FES
Society, Montreal, Canada, July 2005.
2.15. E. Hardin, R. Kobetic, L. Murray, M. Corado-Ahmed, G. Pinnault, J. Sakai, S.
Nogan, C. Ho, and R. Triolo, Ambulation after incomplete spinal cord injury
with an implanted FES system: a case report, Jour. Rehab R&D, 44:3, 2007, pp.
333-346.
2.16. R. Kobetic, and E.B. Marsolais, Synthesis of paraplegic gait with multichannel
functional neuromuscular stimulation, IEEE Trans Rehab Eng., vol. 2, no. 2,
1994, pp. 66-79.
2.17. R. Kobetic, R. J. Triolo, and E. B. Marsolais, Muscle selection and walking
performance of multichannel FES systems for ambulation in paraplegia, IEEE
Trans. Rehabil. Eng., vol. 5, no. 1, Mar. 1997, pp. 2329.
2.18. H. J. Hermens, B. Freriks, R. Merletti, D. Stegeman, J. Blok, G. Rau, C.
Disselhorst-Klug, and G. Hagg, SENIAM 8 European Recommendations for
Surface ElectroMyoGraphy. Enschede, Netherlands: Roessingh Research and
Development, 1999.
2.19. A. E. Hines, P. E. Crago, G. J. Chapman, and C. Billian, Stimulus artifact
removal in EMG from muscles adjacent to stimulated muscles, J. Neurosci.
Methods, vol. 64, no. 1, Jan. 1996, pp. 55-62.
2.20. T. D. Dickens, Elementary Signal Detection Theory. US: Oxford University
Press, 2001, pp. 66, 121.
2.21. A. P. Bradley, "The use of the area under the ROC curve in the evaluation of
machine learning algorithms," Pattern Recognition, vol. 30, no. 7, 1997, pp.
1145-1159.
2.22. J. A. Hanley and B. J. McNeil, "The meaning and use of the area under a receiver
operating characteristic (ROC) curve," Radiology, vol. 143, 1982, pp. 29-36.
2.23. R. E. Walpole and R. H. Myers, Probability and Statistic for Engineers and
Scientists. Macmillan, New York, 1990
50


Figures


Figure 2.1: Experimental setup for the Test of Controllability of the surface EMG from
Rectus Femoris using visual pursuit tasks while the knee was fixed in a
dynamometer.

51


Figure 2.2: Experimental setup for surface EMG data collection with switch-triggered
FES-assisted overground walking.

52


Figure 2.3: Experimental protocol for surface EMG data collection during overground
walking, where the subject had to start from standing and achieve a self-
selected gait speed within 5m.
53






Figure 2.4: The left column shows the cumulative distribution function for the three
cases, 1 , 1 5 . 0 , 5 . 0 0 = < s s < DI DI DI and the right column shows the
corresponding Receiver Operating Characteristics curve.
54




Figure 2.5: TRACKING (broken black line) and TARGET (solid black line) signals
during visual pursuit task for the Test of Controllability. The boxes at each
data point show the lower quartile and upper quartile values of the
TRACKING signal. Whiskers extending at the top and bottom of the boxes
show the range of the TRACKING signal. The top panel presents the results
for iSCI-1 and the bottom panel for iSCI-2. The left panel presents the results
for the left Rectus Femoris and the right panel presents the results for the right
Rectus Femoris.


55




Figure 2.6: TRACKING (broken black line) and TARGET (solid black line) signals
during visual pursuit task for the Test of Controllability with able-bodied
subjects. The boxes at each data point show the lower quartile and upper
quartile values of the TRACKING signal. Whiskers extending at the top and
bottom of the boxes show the range of the TRACKING signal.

56




Figure 2.7: Top panel shows the results from the post hoc analysis of the Discriminability
Index with their critical values from Scheffes S procedure for the muscles
Gluteus Medius (GM), Biceps Femoris (BF), Medial Gastrocnemius (MG),
Rectus Femoris (RF), Tibialis Anterior (TA), and Erector Spinae (ES at T9)
obtained from the Test of Discriminability with able-bodied subjects. The
bottom panel shows the results from the post hoc analysis of the
Discriminability Index with their critical values from Scheffes S procedure
for different classifiers Pattern Recognition Classifier (PRC) and Threshold-
based Classifier (TC) obtained from the Test of Discriminability with able-
bodied subjects.

57




Figure 2.8: Top panel shows the results from the post hoc analysis of the Discriminability
Index with their critical values from Scheffes S procedure for the muscles
Gluteus Medius (GM), Biceps Femoris (BF), Medial Gastrocnemius (MG),
Rectus Femoris (RF), Tibialis Anterior (TA), and Erector Spinae (ES at T9)
obtained from the Test of Discriminability of the left and right step classifiers
of iSCI-1. The bottom panel shows the results from the post hoc analysis of
the Discriminability Index with their critical values from Scheffes S
procedure for different classifiers Pattern Recognition Classifier (PRC) and
Threshold-based Classifier (TC) obtained from the Test of Discriminability of
the left and the right step classifiers of iSCI-1.
58




Figure 2.9: Top panel shows the results from the post hoc analysis of the Discriminability
Index with their critical values from Scheffes S procedure for the muscles
Gluteus Medius (GM), Biceps Femoris (BF), Medial Gastrocnemius (MG),
Rectus Femoris (RF), Tibialis Anterior (TA), and Erector Spinae (ES at T9)
obtained from the Test of Discriminability of the left and right step classifiers
of iSCI-2. The bottom panel shows the results from the post hoc analysis of
the Discriminability Index with their critical values from Scheffes S
procedure for different classifiers Pattern Recognition Classifier (PRC) and
Threshold-based Classifier (TC) obtained from the Test of Discriminability of
the left and the right step classifiers of iSCI-2.
59

Tables
Table 2.1: The mean, the minimum, and the maximum average absolute tracking error in
%MVC during the four parts (0-25 sec, 25-50 sec, 50-75 sec, 75-100 sec) of
the Test for Controllability. The p-value from the one-way two-tailed
ANOVA test for the average tracking error over the whole trial (100 sec) was
not statistically significant ( 0.01). >

%MVC
Part 1
(0-25 sec)
Part 2
(25-50 sec)
Part 3
(50-75 sec)
Part 4
(75-100 sec)
Mean Min Max Mean Min Max Mean Min Max Mean Min Max
iSCI-1 left RF 5.34 0.01 11.6 10.68 1.24 25.8 8.98 0.16 21.39 16.05 1.02 26.97
iSCI-1 right RF 6.57 0.57 15.02 9.4 1.44 20.61 8.49 0.44 20.97 9.58 0.59 21.04
iSCI-2 left RF 7.18 0.45 16.42 9.84 0.14 32.31 9.75 0.33 33.1 9.23 0.28 26.18
iSCI-2 right RF 2.81 0.02 5.77 6.52 0.34 16.9 4.63 0.05 9.4 6.23 0.66 15.55
Able-1 right RF 4.05 0.29 9.5 2.42 0.02 7.86 3.29 0.42 10.92 3.26 0.02 10.77
Able-2 right RF 8.98 5.28 13.19 4.99 0.09 14.49 7.75 0.07 23.11 13.19 0.06 26.8
Able-3 right RF 4.79 0.11 9.49 5.11 0.02 13.63 3.51 0.18 10.37 2.46 0.02 8.11
Able-4 right RF 12.89 4.56 18.71 6.66 0.32 15.76 5.93 0.2 13.71 6.66 0.81 11.72

60

Table 2.2: The results from the Test of Discriminability for the muscles Gluteus Medius
(GM), Biceps Femoris (BF), Medial Gastrocnemius (MG), Rectus Femoris
(RF), Tibialis Anterior (TA), and Erector Spinae (ES at T9) are presented for
the able-bodied subjects. The Wilcoxon statistic (W) was similar in magnitude
to the corresponding Discriminability Index (DI). Similarly the Standard
Deviation (SD) of the DI over 10 random partitions (i.e., 10-fold cross-
validation) was similar in magnitude to the Standard Error (SE) found for the
Wilcoxon statistic (W). There were statistically significant (p 0.05)
differences in the means of DI due to the muscle type as well as the classifier
type.
>

Muscles for right step
classifier for able-bodied
subjects
DI
PRC
SD
(DI
PRC
)
W
PRC

SE
(W
PRC
)
DI
TC

SD
(DI
TC
)
W
TC

SE
(W
TC
)
Ipsilateral GM 0.42 0 0.43 0 0 0 0 0
Ipsilateral BF 0.29 0 0.3 0 0 0 0 0
Ipsilateral MG 1 0 1 0 1 0 1 0
Ipsilateral RF 0.74 0.01 0.75 0.01 0.59 0.05 0.59 0.05
Ipsilateral TA 0.52 0 0.54 0 0 0 0 0
Ipsilateral ES 1 0 1 0 1 0 1 0
Contralateral GM 1 0 1 0 1 0 1 0
Contralateral BF 1 0 1 0 1 0 1 0
Contralateral MG 0.26 0 0.28 0 0 0 0 0
Contralateral RF 1 0 1 0 0.42 0.04 0.42 0.04
Contralateral TA 1 0 1 0 1 0 1 0
Contralateral ES 0.49 0.02 0.49 0.01 0 0 0 0

61

Table 2.3a: The results from the Test of Discriminability of iSCI-1 for the left step
classifier. The Wilcoxon statistic (W) was similar in magnitude to the
corresponding value of the Discriminability Index (DI). Similarly the Standard
Deviation (SD) of the DI was similar in magnitude to the Standard Error (SE)
found for the Wilcoxon statistic (W). There were statistically significant
(p>0.05) differences in the means of DI due to the muscle type as well as the
classifier type.
Muscles for left step
classifier of iSCI-1 DI
PRC

SD
(DI
PRC
) W
PRC

SE
(W
PRC
) DI
TC

SD
(DI
TC
) W
TC

SE
(W
TC
)
left GM 0.77 0.06 0.78 0.06 0.66 0.06 0.67 0.06
left BF 0.56 0.03 0.56 0.03 0.57 0.05 0.58 0.05
left MG 0.81 0.02 0.81 0.02 0.77 0.06 0.77 0.06
left RF 0.72 0.04 0.73 0.04 0.57 0.05 0.57 0.05
left TA 0.63 0.08 0.64 0.08 0.58 0.06 0.58 0.06
left ES 0.96 0.04 0.96 0.038 0.78 0.06 0.79 0.06
right GM 0.5 0.04 0.5 0.039 0.53 0.03 0.55 0.03
right BF 0.56 0.04 0.57 0.036 0.56 0.05 0.56 0.05
right MG 0.58 0.04 0.59 0.039 0.56 0.06 0.56 0.06
right RF 0.65 0.08 0.67 0.075 0.53 0.06 0.54 0.05
right TA 0.56 0.05 0.56 0.045 0.55 0.06 0.56 0.06
right ES 0.51 0.06 0.51 0.057 0.60 0.05 0.61 0.05

62

Table 2.3b: The results from the Test of Discriminability of iSCI-1 for the right step. The
Wilcoxon statistic (W) was similar in magnitude to the corresponding value of
the Discriminability Index (DI). Similarly the Standard Deviation (SD) of the
DI was similar in magnitude to the Standard Error (SE) found for the
Wilcoxon statistic (W). There were statistically significant (p 0.05)
differences in the means of DI due to the muscle type as well as the classifier
type.
>

Muscles for right
step classifier of
iSCI-1 DI
PRC

SD
(DI
PRC
) W
PRC

SE
(W
PRC
) DI
TC

SD
(DI
TC
) W
TC

SE
(W
TC
)
left GM 0.48 0.07 0.49 0.07 0.57 0.06 0.57 0.059
left BF 0.55 0.07 0.56 0.07 0.58 0.04 0.59 0.04
left MG 0.68 0.06 0.68 0.06 0.59 0.04 0.6 0.04
left RF 0.66 0.05 0.67 0.05 0.55 0.05 0.55 0.05
left TA 0.53 0.05 0.53 0.05 0.56 0.07 0.57 0.07
left ES 0.57 0.05 0.57 0.05 0.55 0.05 0.56 0.04
right GM 0.77 0.04 0.78 0.04 0.53 0.03 0.53 0.03
right BF 0.52 0.04 0.53 0.04 0.52 0.06 0.53 0.06
right MG 0.85 0.05 0.86 0.05 0.75 0.05 0.75 0.05
right RF 0.69 0.05 0.7 0.05 0.53 0.05 0.54 0.05
right TA 0.68 0.04 0.68 0.04 0.56 0.05 0.57 0.06
right ES 0.89 0.06 0.89 0.06 0.77 0.04 0.77 0.05

63


Table 2.4a: The results from the Test of Discriminability of iSCI-2 for the left step. The
Wilcoxon statistic (W) and the corresponding value of the Discriminability
Index (DI) were similar. The Standard Deviation (SD) of the DI and the
Standard Error (SE) found for the Wilcoxon statistic (W) were similar. There
were statistically significant (p 0.05) differences in the means of DI due to
the muscle type as well as the classifier type.
>

Muscles for left step
classifier of iSCi-2 DI
PRC

SD
(DI
PRC
) W
PRC

SE
(W
TC
) DI
TC

SD
(DI
TC
) W
TC

SE
(W
TC
)
left GM 0.49 0.07 0.49 0.062 0 0 0 0
left BF 0.47 0.026 0.47 0.026 0 0 0 0
left MG 0.99 0 0.99 0 0.743 0.06 0.74 0.06
left RF 0.46 0.041 0.46 0.04 0.68 0.028 0.68 0.024
left TA 0.47 0.0042 0.48 0.004 0 0 0 0
left ES 0.99 0 0.99 0 0.87 0.034 0.87 0.04
right GM 0.83 0.002 0.83 0.002 0.71 0.027 0.70 0.027
right BF 0.87 0.003 0.89 0.003 0.6 0.02 0.59 0.02
right MG 0.83 0.008 0.84 0.008 0.69 0.022 0.69 0.02
right RF 0.99 0 0.99 0 0.71 0.02 0.70 0.01
right TA 0.82 0.013 0.82 0.012 0.48 0.02 0.48 0.02
right ES 0.41 0.075 0.41 0.075 0 0 0 0


64

Table 2.4 b: The results from the Test of Discriminability of iSCI-2 for the right step
classifier. The Wilcoxon statistic (W) and the corresponding value of the
Discriminability Index (DI) were similar. The Standard Deviation (SD) of the
DI and the Standard Error (SE) found for the Wilcoxon statistic (W) were
similar. There were statistically significant (p>0.05) differences in the
means of DI due to the muscle type as well as the classifier type.

Muscles for right
step classifier of
iSCI-2 DI
PRC

SD
(DI
PRC
) W
PRC

SE
(W
PRC
) DI
TC

SD
(DI
TC
) W
TC

SE
(W
TC
)
left GM 0.74 0.003 0.74 0.003 0.69 0.017 0.698 0.017
left BF 0.88 0.012 0.87 0.012 0.59 0.029 0.598 0.028
left MG 0.68 0.007 0.69 0.007 0.66 0.016 0.67 0.016
left RF 0.99 0.003 0.99 0.003 0.69 0.020 0.698 0.02
left TA 0.68 0.019 0.69 0.016 0.7 0.019 0.699 0.016
left ES 0.49 0.014 0.51 0.014 0.57 0.018 0.57 0.017
right GM 0.40 0.017 0.47 0.015 0 0 0 0
right BF 0.37 0.018 0.37 0.018 0 0 0 0
right MG 0.99 0 0.99 0.001 0.75 0.056 0.75 0.055
right RF 0.59 0.007 0.61 0.006 0.56 0.037 0.57 0.037
right TA 0.41 0.019 0.41 0.017 0.58 0.019 0.59 0.017
right ES 0.99 0.001 0.99 0.001 0.71 0.045 0.71 0.46

65

66
CHAPTER 3
FEASIBILITY ANALYSIS OF SURFACE EMG-TRIGGERED FES-ASSISTED
AMBULATION AFTER INCOMPLETE SPINAL CORD INJURY
A part of this chapter was published in IEEE Trans Biomed Eng. 2008 Feb; 55(2).
Abstract
Ambulation after spinal cord injury is possible with the aid of functional electrical
stimulation (FES). Individuals with incomplete spinal cord injury (iSCI) retain partial
volitional control of muscles below the level of injury, necessitating careful integration of
FES with intact voluntary motor function for efficient walking. In this study, the surface
electromyogram (EMG) of the volitionally controlled erector spinae was used to detect
the intent to step and trigger FES-assisted walking in a volunteer with iSCI via an 8-
channel implanted stimulation system. The classifier was able to trigger the FES-assisted
swing-phase of gait with a false positive rate less than 1% and true positive rate greater
than 82% during over-ground ambulation on a level surface. The performance of the
EMG classifier highlights its potential as a natural command interface to better
coordinate stimulated and volitional muscle activities than conventional manual switches
and facilitate FES-assisted community ambulation.
Introduction
Functional electrical stimulation (FES) provides an opportunity for brace-free
ambulation to wheelchair dependent individuals with incomplete spinal cord injuries
(iSCI). The implanted FES systems can electrically activate a customized set of muscles
selected to address individual gait deficits with pre-programmed patterns of stimulation
to produce cyclic movement of the lower extremities for ambulation. Our 8-channel
implantable receiver-stimulator (IRS-8) delivers stimulation via implanted electrodes to
the targeted motor nerves activating the muscles required to produce stepping motions

[3.1]. Power and stimulus control information are transmitted to the implanted receiver
stimulator through the skin via an inductive link by a wearable external control unit
(ECU). Implant recipients normally use a ring-mounted thumb switch connected to the
ECU to manually trigger each step and progress through the customized pattern of
stimulation to achieve walking function. This study was undertaken to evaluate the
potential for better coordinating the actions of the stimulator with remaining volitional
movements through a more natural command interface than the manual switch.
The objective of this study was to evaluate the feasibility of detecting the intent to
take a step using the surface electromyogram (EMG) in an implant recipient with iSCI
and eliminate the need for manual triggering during FES-assisted ambulation. Our long-
term goal is to specify a new command and control interface that can be implemented
with two channels of implanted EMG recording electrodes with our next family of
multichannel implantable stimulator-telemeters (IST) [3.2-3.4]. This report summarizes
the development and testing of a new command structure for FES-assisted ambulation
that integrates stimulated and voluntary muscle activity in a method suitable for eventual
realization in a fully implantable neuroprosthesis for walking after iSCI. While gait event
detection is possible with physical sensors such as force sensitive resistors,
accelerometers, gyroscopes, as well as with biopotentials such as the electroneurogram
[3.5-3.7], the EMG can provide useful and reliable information prior to the gait events
during ambulation [3.8]. The electromyogram temporally precedes the generation of
force in a muscle (electromechanical delay) and resulting movement of a joint. This
makes the EMG an attractive signal for detection of intent and then the desired movement
can be assisted by FES.
67

Graupe et al. proposed EMG based control of FES with time-series model of EMG
[3.9]. Auto-regressive (AR) time-series models of EMG can give information related to
limb function [3.10] and can provide patient-responsive control of FES-assisted walking
[3.11]. The AR parameters determined offline from the time-series model of the above-
lesion upper-trunk EMG were used for function identification [3.11]. Recently, Graupe
and Kordylewski presented a neural network based classifier for complete paraplegics
with on-line learning capabilities [3.12, 3.13]. Our preliminary studies indicate that the
EMG from partially paralyzed muscles in incomplete paraplegics can also provide
significant information related to the volitional activity of the muscle and can be used for
gait-event detection [3.14, and 3.15]. Thorsen et al. have showed improved wrist
extension with stimulation controlled by EMG from partially paralyzed wrist extensor
[3.16]. Futami et al. showed the feasibility of proportional control of FES with the EMG
from the same muscle (partially paralyzed knee extensors) in incomplete hemiplegia
[3.17]. The ratio of the volitional EMG with the intended effort changes with the intensity
of the stimulation and the time since the stimulation pulse, when the EMG from the same
muscle is the control signal for stimulation [3.18].
This paper presents a linear binary classifier for foot-off intent detection with EMG
from two partially paralyzed muscles below the level of injury. The classifier detects the
intent to initiate swing-phase and integrates that information in the FES controller to
trigger FES-assisted swing of the limb.
Methods
Subjects
The subject iSCI-1 was a 23 years old male with C7 motor and C6 sensory
incomplete spinal cord injury (ASIA C) who could stand but could not initiate a step
68

without the assistance of FES. About eight months before the start of this study, he
received an IRS-8 and eight surgically implanted intramuscular electrodes in a related
study designed to facilitate household and community ambulation [3.19]. Electrodes
were implanted bilaterally at the lumbar spinal roots to activate iliopsoas for hip flexion,
in the tensor fasciae latae for hip flexion and abduction, vastus intermedius/lateralis for
knee extension, and tibialis anterior and peroneous longus for ankle dorsiflexion.
Temporal patterns of stimulation to activate those muscles were customized for his
particular gait deficits according to established tuning procedures [3.20, and 3.21] in
order to achieve forward stepping in a rolling walker. Each step was triggered by
depression of a manual switch to progress through the stimulation pattern and initiate
FES-assisted swing phase, as shown in Figure 3.1. The limited range of motion of his
fingers made it difficult to operate the standard manual ring-mounted thumb switch.
Switches were adapted and mounted to the frame of the walker to allow him to
independently trigger stimulation manually.
The subject completed 6 weeks of over-ground gait training (2 hour sessions 3
times per week) with a physical therapist using the implanted FES system. After
discharge from rehabilitation as an independent limited community ambulator with the
neuroprosthesis, the subject volunteered for studies related to the myoelectric control of
the FES system.
Informed consent was obtained from the subject before his participation and all
study related procedures were approved by the Institutional Review Board of the Louis
Stokes Cleveland Department of Veterans Affairs Medical Center.
69

Data Acquisition and Processing
The experimental set-up for EMG-triggered FES-assisted walking is shown in
Figure 3.2. Surface EMG signals were collected from gluteus medius, biceps femoris,
medial gastrocnemius, rectus femoris, tibialis anterior, and erector spinae (at T9)
bilaterally during manually-triggered FES-assisted gait. Surface EMG was collected
using Ag/AgCl electrodes with 2 cm. inter-electrode distance following the SENIAM
guidelines [3.22]. The EMG signals were amplified and low-pass (f
cutoff
=1000 Hz)
filtered by CED 1902 amplifiers (Cambridge Electronic Design, England) before being
sampled at 2400 Hz (AT-MIO-64F-5, National Instruments, USA) in the host personal
computer. The CED 1902 amplifier has a switching circuit (clamp) which is activated by
a pulse that disconnects the electrode inputs from the amplifier and connects it to the
common electrode to prevent stimulation artifact. The input channels of CED 1902 were
clamped when stimulation pulses were applied to the muscles to prevent stimulation
artifact as described below and illustrated in Figure 3.3. The gain of each channel was set
separately in the CED 1902 amplifiers to prevent saturation at the maximum muscle
activity during the gait-cycle. Baseline EMG data were collected during trials of quiet
standing for 3 seconds.
Retro-reflective markers were placed on the body segments according to the plug-
in gait marker set in the Vicon Workstation (Vicon Peak, USA) software to acquire
lower-body kinematics data using a seven camera Vicon (Vicon Peak, USA) motion
capture system. The fifteen markers were placed on the anterior superior iliac spine, thigh
(on a wand at 1/3
rd
distance between the greater trochanter and lateral femoral
epicondyle), lateral femoral epicondyle, shank (on a wand at 1/3
rd
distance between the
lateral femoral epicondyle and lateral malleolus), lateral malleolus, toe (dorsum of the
70

foot over second metatarsal head), heel (inline with the toe marker on the long axis of the
foot) bilaterally, and at the sacrum (midway between the posterior superior iliac spines).
The measurement volume of the motion capture system was approximately 5m from the
starting position on the walkway, ensuring collection of steady state walking data. The
marker trajectories were captured at 60 Hz for the computation of the joint angles. Gait
events (foot-strike and foot-off) were derived from foot-floor contact patterns obtained
from insole-mounted foot switches placed bilaterally at medial and lateral heel, first and
fifth metatarsal, and big toe, and confirmed with the kinematics data acquired.
The subject was asked to make multiple passes across the straight level walkway.
Each pass constituted one trial and multiple trials were collected during a session. The
EMG data collection was evenly spread over multiple sessions over a month to capture
the day-to-day variability. 150 steps for each side (total 300 steps) were captured over
multiple sessions during this period. The sampled EMG and joint kinematics were
processed in Matlab

R14 (The MathWorks, Inc., USA).
The implanted FES system delivered electrical pulses at a frequency of 20 Hz, so
the sampled EMG was divided into bins of 50ms duration in the host personal computer.
In each bin, 30ms following the start of the stimulation pulse was blanked to remove
residual stimulation artifact and M-wave. The remaining 20 ms of data in each bin was
detrended, band-pass filtered (5
th
order zero-lag Butterworth, 20-500 Hz), and rectified.
The blanked portion of the EMG was reconstructed with the average value of the EMG in
the pre- and post- blocks [3.23] as shown in Figure 3.3a. Then the whole EMG pattern
was low pass filtered (5th order zero-lag Butterworth, f
cutoff
=3 Hz) to get the linear
envelope (Figure 3.3b). The EMG linear envelopes during a gait cycle were then divided
71

into double-support and swing phases of left and the right side based on the occurrence of
foot-strike and foot-off as determined from the insole foot switch data. The EMG pattern
for each muscle was normalized by the maximum value of its linear envelope.
Muscle Selection
The next family of implantable stimulator-telemeter (IST) developed and being
tested clinically at our center has two channels of implanted EMG signal acquisition
[3.4]. Therefore, the number of muscles was limited to two for this feasibility study. The
muscles were selected based on the difference between their EMG linear envelopes
during double-support phase when compared with that during terminal stance, as
described below.
The processed linear envelopes (LE) for the EMG from each muscle pair were
divided into two classes: the class True was comprised of LEs during double-support
prior to foot-off (150 EMG patterns) and the class False consisted of the LE during
terminal stance (150 EMG patterns). The muscle selection was performed separately,
prior to classifier development to limit the size of the data (each muscle has two classes
and each class has 150 EMG patterns). The characteristic pattern of activation for each
class was found by ensemble averaging the LE, shown in Figures 3.4a, b. The
characteristic pattern found for class True was cross-correlated with the LE patterns for
classes True and False. The cross-correlation coefficients for both the classes had a
normal distribution and passed the Lilliefors test for normality (o=0.05; Matlab function
lillietest) [3.24]. A normal distribution function was estimated for each class using
minimum variance unbiased estimator (Matlab normfit function). The Receiver
Operating Characteristics (ROC) curve shows the trade-off between selectivity (i.e. false
72

positive rate) and sensitivity (i.e. true positive rate) as the threshold is varied from one
extreme to the other to cover the probability density function of both (True and False)
the classes [3.25]. A statistic, the Discriminability Index (DI), was computed from the
area under the ROC curve [3.25]. DI equal to 1 (maximum) is the best case when the
probability density function for the two classes has no overlap. The bilateral Erector
Spinae (ES) exhibited the highest DI (=0.875) and were selected as the command sources
for the classifier.
Classifier Development and Offline Testing
The LE of EMG from bilateral ES was selected as inputs to the classifiers to
identify the intent to initiate swing-phase of the ipsilateral limb during FES-assisted gait.
The LE of EMG from each ES for the classes True (150 patterns) and False (150
patterns) were pooled together in a single dataset. The first step was to find a minimum
set of uncorrelated patterns (vectors) such that their linear combinations accounted for
most of the variance in the mean-adjusted dataset. This was achieved by principal
component analysis which seeks such orthonormal vectors (principal components) and
their associated eigen-values from the covariance matrix of the mean-adjusted data
[3.26]. The first 4 principal components (PCs) ranked by their eigen-values accounted for
more than 90% of the variance in the data. The orthogonal rotation (Matlab

varimax)
was applied to minimize the number of factors (i.e. PCs after rotation) and increase the
loading on fewer factors for the classes True and False [3.26]. Loadings found for
each LE of EMG represent a point in the space defined by the four factors (feature
space),
73

th
,
4
,
1
e.g. for the i Linear Envelope,
(j=1,2,3, and 4) serve as the coordinates of the (i=1,2,3 ... 300)
in the feature space defined by the vectors, (j
,
i j i
j
i i j j
j
loading LE
factor
LE loading factor
=
=

=1,2,3, and 4)

The loadings on the factors after the varimax rotation created separate clusters of
points for the classes in the feature space. The loadings found for each LE of EMG were
normalized by the square-root of the sum of the squared loadings to define a unit vector
from the origin to each point. The mean of all the points in the cluster was computed for
each class and called the centroid of that class. The classifier estimated the factor
loadings for LE of a candidate EMG to detect the intent (i.e. case True). The factor
loading was estimated for each feature from the dot product between the factor (i.e.
feature) and the mean-adjusted LE of the candidate EMG. The Euclidean distance
between the normalized loading and the centroid of the case True was used to detect the
intent. An appropriate threshold was selected for this distance measure based on the ROC
plot shown in Figure 3.5. The classification threshold was specified such that the false
positive rate was below a reasonable value of 2% found based on our preliminary study
[3.14]. The true positive rate was around 82% for the same threshold, as seen in Figure
3.5.
The classifier was implemented in Simulink (The MathWorks, Inc., USA) and
incorporated into the real-time FES control system. The ECU was controlled in real-time
by a dedicated personal computer running xPC-target (The MathWorks, Inc., USA) that
executed the control algorithm to deliver pre-programmed stimulation patterns to the
muscles via the IRS-8. The classifier started scanning the LE of EMG from ES after the
end of the stimulation pattern (swing-phase) of the contralateral limb to detect the intent
(foot-off) to initiate swing of the ipsilateral limb. The classifier was first evaluated offline
74

using test data to find the error in timing of the FES-assisted foot-off with EMG control
compared to that found from the insole foot switches during manual switch-triggering.
For safety, the classifier was allowed to trigger the FES-assisted swing-phase of the
ipsilateral limb 1.5 sec after the end of the swing-phase of the contralateral limb. A
minimum duration of 1.5 seconds for the double-support phase was found necessary for
the subject to maintain balance The duration of swing phase was determined by the pre-
programmed temporal pattern of the stimulation and therefore was highly repeatable
while the duration of the double-support phase was determined by the subject with the
manual switch triggering and therefore exhibited increased variability.
Classifier Testing During FES-assisted Ambulation
The EMG classifier was integrated into the FES controller to trigger pre-
programmed stimulation patterns during FES-assisted walker-aided ambulation. The
subject was first asked to walk a few steps using the manual switch-triggered FES system
for calibration purposes. During calibration the classifier found the maximum muscle
activity in ES, which was used to normalize the EMG for the remaining trials of the
session.
The subject practiced with the EMG-based FES-controller for about nine days (two
hours each day) over three weeks to get accustomed to the classifier before initial testing.
During testing, the subject was asked to walk across a straight walkway with the EMG-
triggered FES-controller. Multiple passes were made across the walkway, each pass
constituted a trial. The subject triggered the first step manually from the stand state
using a start switch after which the subsequent steps were triggered by the EMG
classifier. The FES controller returned to the stand state when the classifier failed to
trigger the next step within 3 seconds of entering the double support phase. The subject
75

used a switch to manually stop the FES controller if it triggered a step when none was
intended (false positive). If the FES controller stopped and failed to trigger an intended
step (false negative) then the subject was able to over ride the controller to manually
trigger the step, after which the EMG classifier would resume operation. The state
transition diagram of the EMG-based FES-controller is shown in Figure 3.6
During each trial the subject tried to reach a self-selected steady gait from stand
position. The subject maintained a double-support phase after reaching the end of the
walkway and waited for 3 sec. to return the FES controller to the stand state. The
performance of the classifier was evaluated over 60 steps (each side) on level ground in a
single session (one day) of data collection. The repeatability of system performance was
evaluated with randomized trials of EMG-triggered and switch-triggered FES systems
performed over two more sessions distributed over two additional days of testing.
Results
Classifier Performance
Off-line timing analysis indicated that with the selected threshold, the classifier
output preceded actual foot-off (a negative timing difference) when predicting both left
and right swing as shown in Figure 3.7a. The duration of the double-support (DS) and
swing (SW) gait phases is shown in Figure 3.7b. The classifier successfully minimized
the possibility of triggering a step unexpectedly. During the first session of testing, the
false positive rate was limited to 1.66% while the true positive rate was close to 80%. The
one false positive observed for the right leg over 60 steps was during terminal stance. The
false negatives were mostly observed during the first three steps (each side) when the gait
is transitioning from stand position to a steady state. The user learned to convert the last
step of the walking pattern into a short step to decelerate, by not moving his body
76

forward with the walker and then stop the classifier by delaying the shift of the body
weight to the contralateral support limb by three seconds after the end of its swing phase.
This helped to prevent false positives during terminal stance in the subsequent trials.
Repeatability of the Classifier Performance
Repeatability of system performance was assessed with data collected during the
two additional sessions in which switch- and EMG-triggered controllers were presented
randomly to the subject. No false positives were reported by the subject during more
than 50 steps taken at these two sessions. When combined with data from the initial
testing day, the system exhibited overall false positive rate of less than 1% and true
positive rate of 82% for left foot-off and 83% for right foot-off over total of 110 steps
taken (total three sessions over three days).
Discussion
The EMG-triggered FES-assisted ambulation was successfully implemented and
evaluated in the laboratory. The classifier developed during current study detected
unloading of the limb and shift of body-weight to the contralateral limb that took place
during double-support phase preceding the swing-phase of the ipsilateral side. The user
of the EMG-triggered FES system exercised the voluntary muscles in conjunction with
the stimulated muscles. The EMG-triggered implanted FES system reduced the need to
manipulate manual switches which triggered each step with current FES systems, or
make special adaptations to them for the specific motor deficits of individuals with
cervical level injuries. The subject easily learned to use the system and their practice with
EMG-triggered system improved the switch-triggered walking. This interesting result
associated with learning was a reduction in the duration of the double-support phase with
switch-triggered walking from around four seconds (Figure 3.6b) during training data
77

collection to around two seconds during online testing sessions when the switch-triggered
system was presented in a random order with the EMG-triggered system. The gait speed
was limited by the ability to move the body forward using upper-body support while
maintaining balance. The gait-speed was similar for EMG-triggered and switch-triggered
walking. The gait speed that was close to 0.1 m/sec was significantly lower than able-
bodied slow-cadence gait, in part due to the subjects cervical level injury which limited
his ability to move the body forward with his upper extremities. This necessitated a
minimum duration of 1.5 sec for double-support phase to prepare for the next step.
Proximal muscles were found to be more suitable as command sources than the
distal muscles. Proximal muscles were also less susceptible to muscle spasms. The
classifier was considered to be more robust to muscle spasms and fatigue since it was
based on pattern recognition instead of EMG amplitude threshold-based. The
characteristic EMG pattern from the ES that was used by the classifier for event detection
was similar to normative EMG pattern during late stance and early swing of the
ipsilateral limb [3.27].
The classifier was not tested specifically for robustness to muscle spasms and
fatigue. The number of trials during a session was decided by the subject. The erector
spinae was free from muscle spasms during all the trials. In case of muscle spasms and
fatigue, the user could manually actuate the stop switch to return the controller to the
stand state. This would switch-off the classifier and prevent false triggers. The
potential exists to make the classifier adaptive by updating it during operation (online
training) using the EMG patterns related to false positives and false negatives, thus
78

having it learn to accommodate for fatigue or other time varying factors that may
influence long-term performance.
The classifier needed to be customized which involved individualized muscle
selection and feature extraction from EMG training data of the main muscle groups
(extensors and flexors) involved with gait. Training data was collected during switch-
triggered FES-assisted walking in the laboratory utilizing surface stimulation and EMG
recording, or with the EMG added to the systems of other recipients of our older 8-
channel stimulation-only implanted neuroprostheses. The processes of muscle selection
and feature extraction also lend themselves to automation, thus eliminating much of the
clinical decision making currently required. One limitation of selecting muscles based on
the EMG and surface stimulation is that the optimal set of command sources and motor
targets will be determined only from the most superficial muscles accessible from the
skins surface. Deeper muscles can be accessed with intramuscular stimulating or
recording electrodes temporarily implanted for acute testing.
Conclusion
The feasibility of using EMG for triggering FES-assisted ambulation on level
ground for individuals with iSCI was demonstrated. An EMG-based trigger for swing-
phase significantly reduced the need to rely on manual switch during FES-assisted iSCI
gait, which was the typical command source in the currently available implanted
neuroprostheses for ambulation. The classifier did not completely obviate the need for the
manual trigger, since about 18% of the false negatives produced by the classifier still
needed to be over-ridden with the manual switch during testing sessions. The false
positives were successfully reduced to 1% minimizing the likelihood of potentially more
disruptive event of initiating a step unexpectedly. Two channels of surface EMG were
79

shown to be sufficient for triggering steps during FES-assisted walking. The subject
learned to effectively command the EMG-based FES-controller within about 18 hours of
use over 9 days. The FES system used by the subject for this feasibility study was a
laboratory based tethered system. The new family of implantable stimulator-telemeters
(IST-12) has two EMG channels and the capability to perform the signal processing
required by the classifier. This study provided the basis for the development of a fully
portable FES system based on IST-12. The next phase of this study will focus on the
development of a classifier and the FEScontroller that could be implemented in the
current ECU with the IST family of implants for a fully portable FES system for outdoor
use. It is postulated that incomplete SCI subjects with reduced hand and finger function
will prefer the reduced dependence on manual switch and accept automatic FES-assisted
stepping that is synchronized with unloading of that limb.

References
3.1. R. Kobetic, R. J. Triolo, J. P. Uhlir, C. Bieri, M. Wibowo, G. Polando, E. B.
Marsolais, J. A. Davis Jr., K. A. Ferguson, and M. Sharma, Implanted Functional
Electrical Stimulation System for Mobility in Paraplegia: A Follow-Up Case
Report, IEEE Trans. Rehabil. Eng., vol. 7, no. 4, Dec. 1999, pp. 390398.
3.2. B. Smith, Z. Tang, M.W. Johnson, S. Pourmehdi, M.M. Gazdik, J.R. Buckett, and
P.H. Peckham , An externally powered, multichannel, implantable stimulator-
telemeter for control of paralyzed muscle, IEEE Trans Biomed Eng., vol. 45, no.
4, 1998, pp. 463-475.
3.3. Z. Tang, B. Smith, J.H. Schild, and P.H. Peckham, Data transmission from an
implantable biotelemeter by load-shift keying using circuit configuration
modulator, IEEE Trans Biomed Eng., vol. 42, no. 5, 1995, pp. 525-528.
3.4. N. Bhadra, K.L. Kilgore, and P.H. Peckham, Implanted stimulators for
restoration of function in spinal cord injury, Med. Eng. Phys., vol. 23, 2001, pp.
19-28.
80

3.5. I. P. Pappas, M. R. Popovic, T. Keller, V. Dietz, and M. Morari, A reliable gait
phase detection system, IEEE Trans. Neural Syst. Rehabil. Eng., vol. 9, no. 2,
Jun. 2001, pp. 113-125.
3.6. A. Mansfield, and G. M. Lyons, The use of accelerometry to detect heel contact
events for use as a sensor in FES assisted walking, Med. Eng. Phys., vol. 25, no.
10, Dec. 2003, pp. 879-885.
3.7. T. Sinkjaer, M. Haugland, A. Inman, M. Hansen, and K. D. Nielsen,
Biopotentials as command and feedback signals in functional electrical
stimulation systems, Med. Eng. Phys., vol 25, no. 1, Jan. 2003, pp. 29-40.
3.8. R. T. Lauer, R. T. Smith, and R. R. Betz, Application of a neuro-fuzzy network
for gait event detection using electromyography in the child with cerebral palsy,
IEEE Trans. Rehabil. Eng., vol. 52, no. 9, Sep. 2005, pp. 15321540.
3.9. D. Graupe, K. H. Kohn, S. Basseas, and E. Naccarato, Patient controlled
electrical stimulation via EMG signature discrimination for providing certain
paraplegics with primitive walking functions, J. Biomed. Eng., vol. 5, 1983, pp.
220-226.
3.10. R. J. Triolo, and G. D. Moskowitz, The theoretical development of a
multichannel time-series myoprocessor for simultaneous limb function detection
and muscle force estimation, IEEE Trans. Biomed Eng., vol. 36, no. 10, Oct.
1989, pp. 1004-1017.
3.11. D. Graupe, EMG pattern analysis for patient-responsive control of FES in
paraplegics for walker-supported walking, IEEE Trans. Biomed. Eng., vol. 36,
no. 7, July 1989, pp. 711-719.
3.12. D. Graupe, and H. Kordylewski, Artificial neural network control of FES in
paraplegics for patient responsive ambulation, IEEE Trans. Biomed Eng., vol.
42, no. 7, Jul. 1995, pp. 699-707.
3.13. H. Kordylewski, and D. Graupe, Control of Neuromuscular Stimulation for
Ambulation by Complete Paraplegics via Artificial Neural Networks, Neurol.
Research, vol. 23, July 2001, pp.472-481.
3.14. A. Dutta, R. Kobetic, and R. J. Triolo, EMG based triggering and modulation of
stimulation patterns for FES assisted ambulation a conceptual study, presented
at XXth Congress of the International Society of Biomechanics, Cleveland, OH,
Aug. 2005.
3.15. A. Dutta, and R. J. Triolo, Volitional surface EMG based control of FES-assisted
gait after incomplete spinal cord injury a single case feasibility study,
presented at NIH Neural Interfaces Workshop, Bethesda, MD, Sep. 2005.
81

3.16. R. Thorsen, R. Spadone, and M. Ferrarin, A pilot study of myoelectrically
controlled FES of upper extremity, IEEE Trans. Rehabil. Eng., vol. 9, no. 2, June
2001, pp. 161167.
3.17. R.Futami, K.Seki, T.Kawanishi, T.Sugiyama, I.Cikajlo, and Y.Handa,
Application of local EMG-driven FES to incompletely paralyzed lower
extremities, presented at 10th Annual Conference of the International FES
Society, Montreal, Canada, July 2005.
3.18. P. N. Taylor, and P. H. Chappell, Variation in system gain when using voluntary
EMG to control electrical stimulation of the same muscle, presented at 9th
Annual Conference of the International FES Society, Bournemouth, U.K., 2004.
3.19. R. Kobetic, R. J. Triolo, G. Pinnault, L. Murray, M. Corado-Ahmed, E. Hardin, J.
Sakai, S. Nogan, M. Marsolais, and C. Ho, Facilitating Ambulation after
Incomplete Spinal Cord Injury with Implanted FES System, presented at 10th
Annual Conference of the International FES Society, Montreal, Canada, July
2005.
3.20. R. Kobetic, and E.B. Marsolais, Synthesis of paraplegic gait with multichannel
functional neuromuscular stimulation, IEEE Trans Rehab Eng., vol. 2, no. 2,
1994, pp. 66-79.
3.21. R. Kobetic, R. J. Triolo, and E. B. Marsolais, Muscle selection and walking
performance of multichannel FES systems for ambulation in paraplegia, IEEE
Trans. Rehabil. Eng., vol. 5, no. 1, Mar. 1997, pp. 2329.
3.22. H. J. Hermens, B. Freriks, R. Merletti, D. Stegeman, J. Blok, G. Rau, C.
Disselhorst-Klug, and G. Hagg, SENIAM 8 European Recommendations for
Surface ElectroMyoGraphy. Enschede, Netherlands: Roessingh Research and
Development, 1999.
3.23. A. E. Hines, P. E. Crago, G. J. Chapman, and C. Billian, Stimulus artifact
removal in EMG from muscles adjacent to stimulated muscles, J. Neurosci.
Methods, vol. 64, no. 1, Jan. 1996, pp. 55-62.
3.24. H. W. Lilliefors, On the Kolmogorov-Smirnov test for normality with mean and
variance unknown, J. of Am. Stat. Assoc., vol. 62, 1967, pp. 339-402.
3.25. T. D. Dickens, Elementary Signal Detection Theory. US: Oxford University
Press, 2001, pp. 66, 121.
3.26. I. T. Jolliffe, Principal Component Analysis, New York: Springer, 1986, pp. 44-
48, 269-296.
3.27. D. A. Winter, Biomechanics and Motor Control of Human Gait: Normal, Elderly
and Pathological. Waterloo Biomechanics, 1991, ch.1.
82

3.28. J. B. Dingwell, B. L. Davis, and D. M. Frazier, Use of an instrumented treadmill
for real-time gait symmetry evaluation and feedback, Prosthet. Orthot. Int., vol.
20, no. 2, Aug. 1996, pp. 101-110.
83

Figures

a b
Figure 3.1: a) X-ray of the iSCI subject implanted with implantable receiver-stimulator
(IRS-8) b) iSCI subject stepping with the switch-triggered FES system.
84


Figure 3.2: Experimental setup for testing EMG-triggered FES-assisted walking with the
block-diagram for the EMG-triggered FES system (ECU: external control
unit, LE: linear envelope).
85


a


b

Figure 3.3: Processing of the sampled EMG from Erector Spinae for training the
classifier a) rectified and reconstructed EMG signal b) linear envelope found
from processed EMG signal.
86


a


b

Figure 3.4: Muscle selection for the classifier using receiver operating characteristics
curve from switch-triggered FES-assisted gait data (FS: Foot-Strike, FO:
Foot-Off) a) linear envelope (LE) indicating class True b) linear envelope
(LE) indicating class False.
87



Figure 3.5: Receiver operating characteristics curve of the classifiers using the test data.
88


Estimate feature loadings
via correlation analysis
Find the distance from centroid
of case T in feature space
Distance
<
threshold
Trigger
swing-
phase
Double-
support
> 3 sec?
Get next
EMG sample
Euclidean distance
Y
Loadings
N
Y
N
EMG during
double-support
Feature Set
& Threshold
STOP
Wait for
manual
trigger


Figure 3.6: State transition diagram of the EMG-based FES-controller.
89


a


b

Figure 3.7: Offline testing of the classifier using receiver operating characteristics curve
a) time-error (negative means prediction) in detection of foot-off by the
classifier b) duration of the gait phases (left DS: double support phase
following left swing phase, right DS: double support phase following right
swing phase, SW: swing phase).
90


CHAPTER 4
SURFACE EMG-TRIGGERED FES-ASSISTED GAIT PARAMETERS DURING
OVER-GROUND WALKING IN THE LABORATORY
A manuscript based on this chapter was submitted for publication in Gait & Posture.
Abstract
Functional Electrical Stimulation (FES) facilitates ambulatory function after
paralysis by activating the muscles of the lower extremities. The FES-assisted stepping
can either be triggered by a manual switch (switch-trigger), or by an electromyogram-
based gait event detector (EMG-trigger). The two command sources were presented in
random order to two subjects with incomplete spinal cord injuries (iSCI) during ten trials
over two alternate days. Subject iSCI-1 (C6 ASIA C) was non-ambulatory without the
assistance of FES and could stand but not initiate a step volitionally. Subject iSCI-2 (T1
ASIA D) could walk only short distances with great difficulty without FES. Gait
kinematics were captured during FES-assisted over-ground walking with a rolling walker
under laboratory conditions. Basic parameters of gait like speed, left and right step
length, left and right double support duration, left and right swing phase duration were
extracted from the kinematics data. Mean, standard deviation, coefficient of variation,
and 95% confidence interval were computed for each gait parameter under each
triggering condition. Average body weight support provided by an instrumented walker
was also recorded for iSCI-2. One way analysis of variance (ANOVA) was performed on
each gait parameter to determine whether significant differences existed between
command sources. The left and right double support duration was significantly (p<0.05)
lower during EMG-triggered gait than switch-triggered for iSCI-1. The average body
91

weight support from the walker was significantly (p<0.05) higher during switch-triggered
gait than EMG-triggered one for iSCI-2
Introduction
Functional electrical stimulation (FES) provides an opportunity for wheelchair
dependent individuals with spinal cord injuries (SCI) to achieve brace-free ambulation.
Implanted FES systems have allowed individuals with either complete or partial paralysis
to stand and step via activation of a customized set of muscles selected to address
individual gait deficits with pre-programmed patterns of stimulation to produce cyclic
movement of the lower extremities [4.1], [4.2]. The 8-channel implantable receiver-
stimulator (IRS-8) utilized in these systems delivered stimulation via implanted
electrodes to the targeted motor nerves activating the muscles required for walking [4.3].
Implant recipients used a ring-mounted thumb switch connected to a wearable external
control unit to manually trigger each step and activate a customized pattern of stimulation
to achieve reciprocal walking. Our studies have indicated that surface EMG from
partially paralyzed muscles in people with paraplegia due to incomplete spinal cord
injuries (iSCI) can provide significant information related to the volitional activity of the
muscle and can be used for gait-event detection [4.4]. While the electromyogram showed
promise of being a feasible and more natural command source than manual switches for
triggering the FES-assisted stepping, its benefits for improving walking function
remained to be investigated [4.4].
The objective of the study was to evaluate the relative benefits of switch-triggered
and EMG-triggered FES-assisted walking based on their effects on basic spatio-temporal
gait parameters. The basic gait parameters that were investigated were gait speed, left and
right step length, left and right double support duration, left and right swing phase
92

duration [4.5]. In addition, upper extremity exertion in terms of the body weight placed
on the rolling walker was also measured in one subject. One way analysis of variance
(ANOVA) was performed on each gait parameter to find if significant differences exist
between the EMG-triggered and switch-triggered over-ground walking under indoor
laboratory conditions.
Methods
Subjects
Two male subjects with incomplete spinal cord injury volunteered for this study.
The subject iSCI-1 was a 23 years old male with C7 motor and C6 sensory incomplete
spinal cord injury (ASIA C) who could stand but could not initiate a step without the
assistance from FES. The subject iSCI-2 was a 34 years old male with T1 motor and C6
sensory incomplete spinal cord injury (ASIA grade D) who could walk only short
distances without the assistance from FES. They each received an eight channel
Implantable Receiver Stimulator (IRS-8) and eight surgically implanted intramuscular
electrodes in a related study designed to facilitate household and limited community
ambulation [4.3], [4.6].
The subject iSCI-1 presented with bilateral hip and ankle weakness and received
stimulating electrodes bilaterally to recruit iliopsoas, vastus intermedius/lateralis, tensor
fasciae latae, and tibialis anterior/peroneus longus muscles. FES assisted limb
advancement during swing phase and knee stability during single limb stance, while the
subject achieved forward progression through the voluntary contractions of his hip
extensor musculature. Subject iSCI-2 presented with unilateral weakness and received
stimulating electrodes only on his left side to recruit iliopsoas, vastus intermedius/
lateralis, tensor fasciae latae, gluteus medius, gluteus maximus, posterior portion of
93

adductor magnus, and tibialis anterior (two electrodes). Temporal patterns of stimulation
to activate the muscles were customized for each subjects individual gait deficits
according to established tuning procedures [4.7], [4.8] in order to achieve forward
stepping in a rolling walker. The subjects completed 6 weeks of over-ground gait
training (two hour sessions, three times per week) with a physical therapist using the
implanted FES system. After discharge from rehabilitation, they volunteered for the
studies using the myoelectric control of the FES system.
Informed consent was obtained from both the subjects before their participation and
the Institutional Review Board of the Louis Stokes Cleveland Department of Veterans
Affairs Medical Center approved the study related procedures.
Gait Data Acquisition
The laboratory set-up for EMG-triggered FES-assisted walking is shown in Figure
4.1. Surface electromyogram (EMG) was collected according to SENIAM guidelines
[4.10]. The EMG signals were pre-amplified (gain: 100), and low-pass (f
cutoff
=1000 Hz)
filtered by CED 1902 (Cambridge Electronic Design, England) amplifier (gain: 330 or
990) before being sampled at 2400 Hz (AT-MIO-64F-5, National Instruments, USA) in
the host personal computer. The sampled data were detrended, band-pass filtered (5th
order zero-lag Butterworth, 20-500 Hz), and rectified before being low pass filtered (5th
order zero-lag Butterworth, f
cutoff
=3 Hz) to get the linear envelope (LE) of the signal.
Surface EMG signals from bilateral erector spinae (at T9) were used by the gait event
detector (GED) for triggering FES-assisted left and right steps of iSCI-1. The GED for
iSCI-2 used EMG from left gastrocnemius and right tibialis anterior for triggering only
the FES-assisted left step during EMG-triggered walking. A pattern recognition
algorithm (i.e., the EMG-classifier) based on feature templates derived from the first
94

three principal components of the time course of the LEs during double support was
trained for each subject to detect the intention to take a step. Details of the development,
testing and technical performance of the EMG-classifier GED have been presented in
Chapter 3 [4.4]. A flow chart summarizing the algorithm is shown in Figure 4.2. The
EMG-classifier was trained to look for a set of features (templates found from the
training data) in the EMG LEs that indicated the intention to trigger the next step. The
features were detected using correlation analysis of the windowed EMG LE, which was
represented as a weighted (weights = correlation coefficients) mean of those features. If
the weights (or loadings) of those features fell within a certain Euclidean distance (a
threshold found from training data) of the centroid for the class associated with initiating
a step, then the next FES-assisted step was triggered. The EMG-classifier kept looking
for those features for a given time (typically 3 seconds or less) while the user was in the
double support phase of gait. If the EMG-classifier couldnt find those features in the
given time then it stopped scanning the EMG LEs and waited for the user to trigger the
next step with a manual switch. The EMG-classifier and stimulation control system
operated in real-time on xPC Target platform (The MathWorks, Inc., USA).
Retro-reflective markers were placed on the body segments according to the plug-
in gait marker set in the Vicon Workstation (Vicon Peak, USA) software to acquire
lower-body kinematics data using a seven camera Vicon 360 motion capture system. The
fifteen markers were placed on the anterior superior iliac spine (ASIS), thigh (on a wand
at 1/3
rd
the distance between the greater trochanter and lateral femoral epicondyle), lateral
femoral epicondyle, shank (on a wand at 1/3
rd
the distance between the lateral femoral
epicondyle and lateral malleolus), lateral malleolus, toe (dorsum of the foot over second
95

metatarsal head), and heel (in line with the toe marker on the long axis of the foot)
bilaterally. The final marker was placed at the sacrum (midway between the posterior
superior iliac spines). The measurement volume of the motion capture system was
approximately 5m from the position from where the subjects started walking on the
walkway. The marker trajectories were captured at 60 frames/sec. The optimum cut-off
frequency (5
th
order zero-lag Butterworth) for low-pass filtering the kinematic data was
found to balance the Root Mean Square Error (RMSE) due to noise and RMSE due to the
attenuation of the true signal [4.5]. Foot progression in the sagittal plane was selected to
find the optimum low pass cut-off frequency since it has the highest frequency content
[4.9]. The Figure 4.3 shows the RMSE with the optimum cut-off frequency, which was
found to be 3.5 Hz for the iSCI data. Gait events related to foot-floor contact (foot-strike
when any portion of the foot first touched the ground, and foot-off when the whole
foot was off the ground) were derived from foot insole-mounted foot switches (B&L
Engineering, USA) placed bilaterally at the medial and lateral heel, first and fifth
metatarsal, and big toe, and confirmed with the kinematics data acquired.
The FES-assisted stepping in the iSCI subjects was triggered with one of the two
command sources manually triggered with a switch (switch-trigger) or triggered with
the EMG-based GED (EMG-trigger). The two command sources were presented in a
random order to the subjects. The iSCI subjects initiated the gait with a switch-triggered
left step and then walked in a rolling walker with FES-assisted steps triggered by one of
the two command sources. All the subjects were asked to make multiple passes across the
straight level walkway with a period of 5-10 minutes of rest period in between the passes.
Each pass constituted one trial and 10 trials were collected during a session. Sessions
96

were repeated on two separate days for a total of 20 trials, representing 10 trials
consisting of two passes of the walkway for each command source. During each trial the
subjects were instructed to reach a self-selected steady-state gait at a comfortable velocity
from the standing position. The Vicon motion capture system recorded marker
trajectories for four or more strides starting after the first (switch initiated) step, as
illustrated in Figure 4.4. The joint kinematics data were analyzed using custom programs
developed in Matlab R14 (The MathWorks, Inc., USA). The trials were considered
independent for statistical analysis, to compute and compare the basic spatio-temporal
gait parameters.
Gait Parameters
The basic gait parameters were computed from the kinematics data where the
definitions for the gait events were modified to account for the gait characteristics of iSCI
subjects. It was often difficult to identify heel strike and toe off during iSCI walking with
FES, so these events were replaced with initial contact/foot-strike (when one or more of
the foot switches first registered contact with the ground) and foot-off (when all the foot
switches registered loss of contact). Gait speed was defined as the average velocity of
progression over a stride period which was computed from the velocity of the sacrum
marker and reported in meters per second (m/s). Left and right step lengths were
determined by the horizontal distance covered along the plane of progression during a
step, which were measured from the contact position of the contralateral foot to the
subsequent contact position of the ipsilateral foot and reported in meters (m). The step
period (left and right) was the duration of one step, which was measured from the contact
time of the contralateral foot to the subsequent contact time of the ipsilateral foot and
reported in seconds (sec). The double support period was the time in seconds (sec) when
97

both the feet were on the ground as measured from the foot-strike of the contralateral foot
to the ipsilateral foot-off. The swing period was the duration of time in seconds (sec)
when only one foot was in contact with the ground and was measured from ipsilateral
foot-off to subsequent ipsilateral foot-strike. During walking, swing period is exactly
equal to the single support period of the contralateral limb. The stance period in seconds
(sec) was defined as the time in seconds (sec) when the foot was in contact with the
ground, and was sum of the double support period and single support period of that limb.
The average body weight support provided by the rolling walker over a stride was
also measured for iSCI-2. For comparison, the average body weight supported during
switch and EMG triggered gait were each normalized by the mean of that observed
during EMG-triggered gait.
Statistical Analysis
One way analysis of variance (anova1 in Matlab R14, The MathWorks, Inc.,
USA) was performed on each gait parameter to determine if significant differences
existed between the EMG-triggered and switch-triggered spatio-temporal gait parameters.
All observations were considered to be mutually independent for the ANOVA test. The
p-value was computed for the null hypothesis that a particular EMG-triggered gait
parameter and switch-triggered gait parameter had the same mean. If the p-value was
close to zero (<0.05) then the null hypothesis was rejected and the difference between the
mean of that gait parameter for EMG-trigger and Switch-trigger was considered
statistically significant.
Results
Subject iSCI-1 could trigger FES-assisted steps with the EMG-based GED with a
false positive rate lower than 1% and a true positive rate higher than 82% for the left step
98

and 83% for the right step. Subject iSCI-2 could trigger a FES-assisted left step with the
EMG-based GED with a false positive rate lower than 1% and a true positive rate higher
than 96%. The mean, standard deviation (S.D. ), coefficient of variation (C.V. ), and 95%
confidence interval (C.I.) of the EMG-triggered and switch-triggered gait parameters over
10 trials (N=10) for subjects iSCI-1 and iSCI-2 are summarized in Table 4.1 and Table
4.2, respectively. The gait parameters that show statistically significant (p<0.05)
difference are shaded. The subject iSCI-1 had a statistically significant decrease in double
support duration bilaterally with the EMG-triggered FES system, indicating a more
dynamic walking pattern than with switch triggering. Gait speed increased slightly due to
the decrease in the double support duration, but failed to reach significance (p=0.092).
Boxplot of the normalized average body weight supported by the walker for iSCI-2
during EMG-triggered (N=10 trials) and switch-triggered (N=10 trials) gait is shown in
Figure 4.5. The average body weight support over a stride during the switch-triggered
gait was almost 1.4 times that of EMG-triggered gait, which was statistically significant
(p<0.05) and indicated a more erect posture and less upper extremity effort for stability
and forward propulsion.
Discussion
Gait performance with EMG-triggering was at least as good to standard switch-
triggering for most of the spatio-temporal parameters measured for both subjects in spite
of the differences in their injury levels, degree of preserved volitional motor control, and
muscle set chosen for stimulation. Due to individual variations in their FES systems and
levels of paralysis, EMG-triggering demonstrated significant benefits over standard
switch triggering for different aspects of gait in each individual subjects. Both subjects
could increase or decrease walking velocity by either advancing or delaying depressions
99

of the command switch between successive steps, or modifying the timing of the
voluntary contraction of the muscles used as inputs to the EMG classifier.
Because iSCI-1 could not initiate a step without FES-assistance and required
bilateral stimulation to advance his swing limb, the duration of swing phase was
determined by the timing of the pre-programmed pattern of stimulation for both switch-
and EMG-triggered systems. The spatiotemporal parameters of the swing phase were
therefore similar for both the command sources for this subject. The only method for
modulating gait speed available to iSCI-1, therefore, involved altering the time spent in
stance phase. He exhibited a statistically significant decrease in double support duration
bilaterally with automatic triggering of stimulation with the EMG-based GED, which
tended to increase his walking velocity. These results have functional implications and
indicate improved confidence and dynamic stability with EMG triggering.
Subject iSCI-2, in contrast, exhibited a thoracic level motor injury and could walk
short distances without FES-assistance, albeit with significant effort. Because his FES
system was implemented unilaterally, he was able to modulate his walking speed by
adjusting not only the time spent in double support, but also by the timing of his
volitional right step. He walked slightly faster with switch-trigger (0.215 0.112 m/s)
than with EMG-trigger (0.202 0.063 m/s) though this minor difference was not
statistically significant. In terms of all the spatio-temporal gait parameters measured,
iSCI-2 could walk as well with the EMG-trigger as with the switch-trigger. A significant
difference was found in the body weight placed on the rolling walker, which was
significantly higher for switch-triggered gait. EMG-triggering enabled the subject to
100

place more of his body weight on his lower extremities, better balance himself in swing
and stance, and be more effective in unloading and advancing his walker.
These results imply that EMG-triggering may have the potential to lower energy
expenditure due to reduced double support phase and decreased upper extremity exertion
on the walker during long distance walking. Because of the laboratory nature of this
preliminary feasibility study, the impact of EMG control on walking distance, energy
expenditure and community ambulation remain to be determined.
Subject iSCI-1 exhibited difficulty operating the standard manual finger switch
due to reduced hand and finger function. Customized reed switches were interfaced to the
external controller of the neuroprosthesis and mounted on his walker to allow him to
manually trigger the system via gross extension movements of his wrist or metacarpal
joints. Such specialized adaptations were not necessary with EMG triggering. Other
individuals with incomplete SCI with reduced hand and finger function may benefit from
the reduced dependence on manual switches possible with EMG-based systems for
assisted ambulation.
The goal of this work is to facilitate limited community ambulation by giving the
FES system users command sources that are natural, intuitive and easily incorporated into
their walking patterns. It demonstrates the initial feasibility of one method of
automatically triggering FES-assisted stepping to reduce dependence on the manual
switch and better integrate stimulation with the preserved voluntary movements
associated with walking. The EMG-based GED used in this feasibility study was
implemented in a PC which was tethered to the subject, and is therefore obviously
unsuitable for community use. The new family of implantable stimulator-telemeters (IST)
101

developed at Case Western Reserve University and the Louis Stokes Cleveland
Department of Veterans Affairs Medical Center is capable of processing two channels of
EMG signals from implanted recording electrodes and deriving the commands required
to control 12 channels of stimulation [4.3]. The next step in the development of EMG-
controlled neuroprostheses to facilitate ambulation after incomplete SCI is to implement
EMG-controlled assisted ambulation with a completely implantable technology.
Implanting the control and activation sources in a single system will enable the
evaluation of the benefits of EMG control in the home and community environments,
during activities of daily living and over long, functionally relevant distances.
Conclusion
The gait performances of individuals with partial paralysis due to incomplete SCI
with EMG-triggered functional electrical stimulation were equivalent or superior to
standard switch-triggered command sources. The spatio-temporal characteristics of
EMG-triggered FES-assisted gait were found to be at least as good as those exhibited by
switch-triggered FES systems FES-assisted stepping with EMG-triggering can reduce the
duration of double support and thus improve dynamic stability. Stepping with EMG-
triggered stimulation also reduced the body weight exerted on the rolling walker or other
assistive device when compared to switch-triggered gait. Specialized adaptive equipment
and customizations for individuals with upper extremity impairments were minimized or
eliminated through application of EMG control. The benefits derived from EMG
triggering depend on the extent of paralysis, level of impairment and individual
configuration of the FES system. This study presented the results from indoor walking
under laboratory conditions. It is hypothesized that EMG-triggered FES system will have
more significant benefit during gait transitions and dynamic stability during that period
102

than that during steady state gait since it allows the user to transition more fluidly and
stably from one speed to another by possible seamless modulation of the step frequency.
References
4.1. R. Kobetic, R. J. Triolo, J. P. Uhlir, C. Bieri, M. Wibowo, G. Polando, E. B.
Marsolais, J. A. Davis Jr., K. A. Ferguson, and M. Sharma, Implanted Functional
Electrical Stimulation System for Mobility in Paraplegia: A Follow-Up Case
Report, IEEE Trans. Rehabil. Eng., vol. 7, no. 4, Dec. 1999, pp. 390398.
4.2. B. Smith, Z. Tang, M.W. Johnson, S. Pourmehdi, M.M. Gazdik, J.R. Buckett, and
P.H. Peckham , An externally powered, multichannel, implantable stimulator-
telemeter for control of paralyzed muscle, IEEE Trans Biomed Eng., vol. 45, no.
4, 1998, pp. 463-475.
4.3. N. Bhadra, K.L. Kilgore, and P.H. Peckham, Implanted stimulators for
restoration of function in spinal cord injury, Med. Eng. Phys., vol. 23, 2001, pp.
19-28.
4.4. A. Dutta, R. Kobetic, and R. Triolo, Ambulation after incomplete spinal cord
injury with EMG-triggered Functional Electrical Stimulation, IEEE Transactions
on Biomedical Engineering, 55:2, February 2008.
4.5. D. A. Winter, The Biomechanics and Motor Control of Human Movement, 2
nd

edition, New York: Wiley, 1991.
4.6. E. Hardin, R. Kobetic, L. Murray, M. Corado-Ahmed, G. Pinnault, J. Sakai, S.
Nogan, C. Ho, and R. Triolo, Ambulation after incomplete spinal cord injury
with an implanted FES system: a case report, Jour. Rehab R&D, 44:3, 2007, pp.
333-346.
4.7. R. Kobetic, and E.B. Marsolais, Synthesis of paraplegic gait with multichannel
functional neuromuscular stimulation, IEEE Trans Rehab Eng., vol. 2, no. 2,
1994, pp. 66-79.
4.8. R. Kobetic, R. J. Triolo, and E. B. Marsolais, Muscle selection and walking
performance of multichannel FES systems for ambulation in paraplegia, IEEE
Trans. Rehabil. Eng., vol. 5, no. 1, Mar. 1997, pp. 2329.
4.9. C. Angeloni, P. O. Riley, and E. D. Krebs, Frequency Content of Whole Body
Gait Kinematic Data, IEEE Trans. Rehabilitation Engineering, vol. 2, no. 1,
1994, pp. 40-46.
4.10. H. J. Hermens, B. Freriks, R. Merletti, D. Stegeman, J. Blok, G. Rau, C.
Disselhorst-Klug, and G. Hagg, SENIAM 8 European Recommendations for
Surface ElectroMyoGraphy. Enschede, Netherlands: Roessingh Research and
Development, 1999.
103

Figures

Figure 4.1: Experimental setup for testing EMG-triggered FES-assisted walking with the
block-diagram for the EMG-triggered FES system (ECU: external control
unit).
104


Estimate feature loadings
via correlation analysis
Find the distance from centroid
of case T in feature space
Distance
<
threshold
Trigger
swing-
phase
Double-
support
> 3 sec?
Get next
EMG sample
Euclidean distance
Y
Loadings
N
Y
N
EMG during
double-support
Feature Set
& Threshold
STOP
Wait for
manual
trigger

Figure 4.2: EMG-based gait event detector for triggering FES-assisted steps.
105


Figure 4.3: Plot of the Root Mean Square Error (RMSE) between the low-pass filtered
and unfiltered foot progression in sagittal plane with cut-off frequencies to
find the optimum cut-off frequency for low-pass filtering the gait kinematics
data. Optimum cut-off frequency was found to be 3.5 Hz for iSCI data.
106


Figure 4.4: Gait data collection protocol in laboratory conditions where the subject had to
start from standing and achieve a self-selected gait speed within motion
analysis systems volume of data capture (~5m).
107


Figure 4.5: Boxplot of average body weight support provided by the walker during EMG-
triggered (N=10 trials) and switch-triggered (N=10 trials) gait normalized by
the mean of that during EMG-triggered trials of iSCI-2. The box shows the
lower quartile, median, and upper quartile with whiskers extending at each
end showing the range of the data. The notches around the median show the
estimate of the uncertainty. The boxes whose notches dont overlap indicate
that their medians differ at 5% significance level.
108

Tables
Table 4.1: The Mean, Standard Deviation (S.D), coefficient of variation (C.V.), 95%
confidence interval (95% C.I.) over 10 trials (N=10) of the EMG-triggered
and switch-triggered gait parameters gait speed (m/s), left step length (m),
right step length (m), left double support duration (s), right double support
duration (s), left swing phase duration (s), right swing phase duration (s) for
the subject iSCI-1. [ statistically significant (p<0.05) difference between the
command sources are shaded]


Command
Source Mean S.D. C.V. 95% C.I.
EMG-trigger 0.124 0.037 0.298 0.101 - 0.147
Gait Speed (m/s)

Switch-trigger 0.105 0.035 0.332 0.083 - 0.126
EMG-trigger 0.381 0.107 0.280 0.315 - 0.447
left Step Length (m)
Switch-trigger 0.337 0.066 0.194 0.297 - 0.378
EMG-trigger 0.422 0.167 0.395 0.319 - 0.526
right Step Length (m)
Switch-trigger 0.428 0.075 0.174 0.382 - 0.475
EMG-trigger 3.271 0.095 0.029 3.212 - 3.330
left Double Support Duration (s)
*


Switch-trigger 4.488 0.094 0.021 4.430 - 4.546
EMG-trigger 3.164 0.077 0.024 3.116 - 3.212
right Double Support Duration
(s)
*


Switch-trigger 4.005 0.067 0.017 3.964 - 4.046
EMG-trigger 0.697 0.123 0.176 0.621 - 0.773
left Swing Phase Duration (s)
Switch-trigger 0.642 0.128 0.199 0.563 - 0.721
EMG-trigger 0.635 0.133 0.209 0.553 - 0.717
right Swing Phase Duration (s)
Switch-trigger 0.635 0.120 0.189 0.560 - 0.709

109

Table 4.2: The Mean, Standard Deviation (S.D), coefficient of variation (C.V.), 95%
confidence interval (95% C.I.) over 10 trials (N=10) of the EMG-triggered
and switch-triggered gait parameters gait speed (m/s), left step length (m),
right step length (m), left double support duration (s), right double support
duration (s), left swing phase duration (s), right swing phase duration (s) for
the subject iSCI-2. [ statistically significant (p<0.05) difference between the
command sources are shaded]


Command
Source Mean S.D. C.V. 95% C.I.
EMG-trigger 0.202 0.063 0.310 0.163 - 0.241
Gait Speed (m/s)

Switch-trigger 0.215 0.112 0.520 0.146 - 0.284
EMG-trigger 0.359 0.009 0.026 0.353 - 0.364
left Step Length (m)
Switch-trigger 0.346 0.069 0.199 0.304 - 0.389
EMG-trigger 0.450 0.138 0.307 0.365 - 0.536
right Step Length (m)
Switch-trigger 0.521 0.176 0.338 0.412 - 0.630
EMG-trigger 1.192 0.171 0.144 1.086 - 1.299
left Double Support Duration
(s)
Switch-trigger 1.060 0.294 0.278 0.878 - 1.243
EMG-trigger 1.165 0.059 0.051 1.128 - 1.201
right Double Support Duration
(s)
Switch-trigger 1.148 0.076 0.066 1.101 - 1.196
EMG-trigger 1.255 0.062 0.050 1.216 - 1.293
left Swing Phase Duration (s)
Switch-trigger 1.271 0.093 0.073 1.213 - 1.328
EMG-trigger 1.043 0.058 0.056 1.007 - 1.079
right Swing Phase Duration (s)
Switch-trigger 1.054 0.065 0.062 1.013 - 1.094


110

CHAPTER 5
COORDINATION AND STABILITY OF SURFACE EMG-TRIGGERED FES-
ASSISTED OVERGROUND WALKING IN THE LABORATORY
A manuscript based on this chapter was accepted for publication in ASME Journal of
Biomechanical Engineering.
Abstract
Functional Electrical Stimulation (FES) facilitates ambulatory function after
paralysis by activating the muscles of the lower extremities. Individuals with incomplete
spinal cord injury (iSCI) retain partial volitional control of muscles below the level of
injury, necessitating careful integration of FES with intact voluntary motor function for
efficient walking. The FES-assisted stepping can be triggered automatically at a fixed
rate (auto-trigger), by a manual switch (switch-trigger), or by an electromyogram-based
gait event detector (EMG-trigger). It has been postulated that EMG being a more natural
command source than manual switches will enable better coordination of stimulated and
volitional motor function necessary during gait. In this study, the above stated hypothesis
was investigated in two volunteers with iSCI during the over-ground FES-assisted gait
initiation. Four able-bodied volunteers provided the normative data for comparison. The
EMG-triggered FES-assisted gait initiation was found to be more coordinated and
dynamically more stable than auto-triggered and switch-triggered cases. This highlighted
the potential of surface EMG as a natural command interface to better coordinate
stimulated and volitional muscle activities during gait transitions.
Introduction
Functional electrical stimulation (FES) provides an opportunity for brace-free
ambulation to wheelchair dependent individuals with spinal cord injuries. Implanted FES
systems have allowed individuals with either complete or partial paralysis to stand and
111

step via activation of a customized set of muscles selected to address individual gait
deficits with pre-programmed patterns of stimulation to produce cyclic movement of the
lower extremities [5.1][5.2]. The 8-channel implantable receiver-stimulator (IRS-8)
utilized in these systems delivers stimulation via implanted electrodes to the targeted
motor nerves activating the muscles required for walking. Implant recipients have used a
ring-mounted thumb switch connected to a wearable external control unit (ECU) to
manually trigger each step activated by the customized pattern of stimulation to achieve
walking. This pattern of stimulation can also be cycled automatically at a fixed rate with
the user initiating and terminating the cyclic pattern with the manual switch. Graupe et al.
proposed an alternative EMG-based control of FES based on time-series models of the
surface electromyogram (EMG) [5.3]. Auto-regressive (AR) time-series models of EMG
from the intact musculature above the level of lesion can give information related to limb
function [5.4] and can provide patient-responsive control of FES-assisted walking [5.5].
Recently, Graupe and Kordylewski presented a neural network based classifier that has
online learning capabilities for individuals with complete paraplegia due to spinal cord
injuries [5.6], [5.7]. Our studies indicate that EMG from partially paralyzed muscles in
people with paraplegia due to incomplete spinal cord injuries can provide significant
information related to the volitional activity of the muscle and can be used for gait-event
detection [5.8], [5.9]. While the electromyogram showed promise of being a more natural
command signal than manual switches but the postulated improvement in function in
terms of better coordination and dynamic stability of gait remained to be determined.
Gait initiation refers to the transient state between standing and steady state
walking. Analysis of gait initiation is an important diagnostic tool to study pathologic gait
112

[5.22]. In steady state normal gait, the net mechanical work over one stride is close to
zero [5.23]. So enough momentum is generated during gait initiation for the body to
reach a steady state velocity [5.22]. The first step is used to propel the body into a
dynamic state, and then in the next step a major energy input takes place to raise the
energy level of the body [5.22]. This energy input is a disturbance to the locomotor
system to propel the body forward. In the subsequent steps (3rd step and onwards), this
disturbance decays and the body readjusts to attain a steady gait speed [5.22]. Hurmuzlu
and Basdogan presented a method to investigate orbital dynamic stability of human gait
in terms of its response to disturbances [5.10]. Based on their methods, Hurmuzlu et al.
found that gait in post-polio patients is less stable than able-bodied controls [5.11].
Recently Dingwell et al. found that neuropathic patients do not improve their orbital
dynamic gait stability by lowering their gait speed and are also not less stable than able-
bodied controls in spite of their sensory deficits [5.12].
The current study used the method of gait analysis introduced by Hurmuzlu and
Basdogan to evaluate dynamic stability of walking with FES under a variety of control
schemes [5.10]. It is desirable that the user with incomplete spinal cord injury (iSCI)
fluidly and stably transition from a static stand state to a dynamic walk state during
the FES-assisted gait initiation. The goal of this study was to determine the effects of the
command input to the FES system on dynamic stability and convergence to a normal gait
pattern. The working hypothesis of the investigation was that coordinating the actions of
the stimulator with the remaining volitional movements with a more natural command
interface like EMG would result in improvements in gait transitions from standing to
walking. An EMG-based gait event detector (GED) was used to trigger the FES-assisted
113

stepping [5.9]. The linear classifier in the GED detected the intent to initiate swing-phase
from the EMG of two partially paralyzed muscles and used that information to trigger
FES-assisted swing of the limb.
Methods
Subjects
Two subjects with incomplete spinal cord injury (iSCI) volunteered for this study.
The first subject (iSCI-1) was a 23 years old male with C7 motor and C6 sensory
incomplete spinal cord injury (ASIA C) who could stand but could not initiate a step
without the assistance from FES. The second subject (ISCI-2) was a 34 years old male
with T1 motor and C6 sensory incomplete spinal cord injury (ASIA D) that resulted in
left hemiplegia (unilateral paralysis) who could walk only short distances with great
difficulty without the assistance from FES. Each subject received an IRS-8 and eight
surgically implanted intramuscular electrodes in a related study designed to facilitate
household and community ambulation [5.1], [5.2]. Temporal patterns of stimulation to
activate the muscles were customized for their particular gait deficits according to
established tuning procedures [5.13], [5.14] in order to achieve forward stepping in a
rolling walker. The subjects completed 6 weeks of over-ground gait training (2 hour
sessions 3 times per week) with a physical therapist using the implanted FES system.
After discharge from rehabilitation, they volunteered for the studies related to the
myoelectric control of the FES system. Four able-bodied volunteers (Able1: 25 years,
Able2: 52 years, Able3: 26 years, Able4: 54 years), who had no known injury or
pathology during the study, provided the normative gait data.
114

Informed consent was obtained from the subjects before their participation and the
Institutional Review Board of the Louis Stokes Cleveland Department of Veterans
Affairs Medical Center approved the study related procedures.
Gait Data Acquisition
The laboratory set-up for EMG-triggered FES-assisted walking is shown in Figure
5.1a. Two channels of surface EMG (EMG) from bilateral Erector Spinae (at T9) for
iSCI-1 and from left gastrocnemius & right tibialis anterior for iSCI-2 were used by the
gait event detector (GED) for EMG-triggered FES-assisted gait. Details of the
development, testing and technical performance of the EMG-classifier GED have been
published elsewhere [5.9]. A flow chart summarizing the algorithm is shown in Figure
5.1b. The EMG-classifier was trained to look for a set of features (or pattern of muscle
activity) in the EMG linear envelopes (LEs) that indicated the intention to trigger the next
step. The features were detected using correlation analysis of the windowed EMG LE,
which was represented as a weighted (weights = correlation coefficients) mean of those
features. If the weights (or loadings) of those features lie within a certain Euclidean
distance (i.e. a threshold) of the centroid for the class associated with initiating a step
found from the training data, then the next FES-assisted step was triggered. The EMG-
classifier kept looking for those features for a given time while the user was in the double
support phase of gait. If the EMG-classifier couldnt find those features in the given time
then it stopped scanning the EMG LEs and waited for the user to trigger the next step
with a manual switch. The EMG-classifier and stimulation control system was
implemented in a real-time using xPC Target (The MathWorks Inc., USA).
Retro-reflective markers were placed on the body segments according to the plug-
in gait marker set in the Vicon Workstation (Vicon Peak, USA) software to acquire
115

lower-body kinematic data using a seven camera Vicon (Vicon Peak, USA) motion
capture system. The fifteen markers were placed on the anterior superior iliac spine
(ASIS), thigh (on a wand at 1/3
rd
distance between the greater trochanter and lateral
femoral epicondyle), lateral femoral epicondyle, shank (on a wand at 1/3
rd
distance
between the lateral femoral epicondyle and lateral malleolus), lateral malleolus, toe
(dorsum of the foot over second metatarsal head), heel (inline with the toe marker on the
long axis of the foot) bilaterally, and at the sacrum (midway between the posterior
superior iliac spines). The measurement volume of the motion capture system was
approximately 5m from the position from where the subjects started walking on the
walkway. The marker trajectories were captured at 60 Hz for the computation of the joint
angles.
The joint angles were low-pass filtered before Euler differentiation to compute the
joint velocity. Numerical differentiation amplifies the noise so the noise in the joint
angles data was reduced with low pass filtering. The optimum cut-off frequency (5
th

order zero-lag Butterworth) for the able-bodied and iSCI data was found to balance the
Root Mean Square Error (RMSE) due to noise and RMSE due to the attenuation of the
true signal [5.24]. The foot kinematic data were selected to find the optimum low pass
cut-off frequency since the high frequency noise induced by the foot-strike (i.e. collision)
during walking affects the foot kinematic data the most (highest frequency noise
expected) and then the physiological damping of high-frequency content occurs caudal to
the head [5.25]. The Figure 5.2a shows the RMSE with the optimum cut-off frequencies,
which were 6 Hz for the able-bodied and 3.5 Hz for the iSCI kinematic data. The RMSE
value was similar for the able-bodied and iSCI data after low-pass filtering (Figure 5.2a).
116

The Figure 5.2b shows that most of the power-content of the signal was below their
respective optimum cut-off frequency for low pass filtering. Gait events (foot-strike and
foot-off) were derived from foot-floor contact patterns obtained from insole-mounted foot
switches (B&L Engineering, USA) placed bilaterally at the medial and lateral heel, first
and fifth metatarsal, and big toe, and confirmed with the kinematic data acquired.
The FES-assisted swing-phase in iSCI subjects could be triggered with three
command interfaces manually triggered with a switch that is mounted on the walker
(switch-trigger), triggered with EMG-based GED (EMG-trigger), triggered automatically
at a user-selected rate without user-intervention (auto-trigger). The three trigger modes
were presented randomly to the iSCI subjects during a trial and the iSCI subjects initiated
the gait with their left leg (i.e. the initiator limb). All the subjects were asked to make ten
passes across the straight level walkway. Each pass constituted one trial and 10 trials
were collected during a session of data capture. During each trial the subjects tried to
reach a self-selected steady gait from standing. Vicon (Vicon Peak, USA) motion capture
system recorded marker trajectories for four or more strides starting after the first
(initiator) step, as illustrated in Figure 5.3. Able-bodied subjects usually reach steady
state gait within three to four steps from standing [5.22], [5.11].
The time-series analysis used to evaluate the stand-to-walk transition required that
the subjects complete the transition from standing to a walking state. The time-series
model evaluated how well this transition happened based on a linear model. Hence, the
time-series analysis was performed only on the trials in which the pelvis position
estimated from the centroid of the ASIS markers and the sacrum marker had a positive
progression velocity after the first step from standing during the whole trial, as shown in
117

Figure 5.4 The time-series analysis was performed to compare the stability and
coordination of the FES-assisted iSCI gait initiation (with the three trigger modes) with
the able-body normative data, as discussed below. The joint kinematic data were
analyzed using custom programs developed in Matlab R14 (The MathWorks, Inc., USA).
Coordination and Stability Analysis of Gait initiation
The 18 joint angles (bilateral extension-flexion, abduction-adduction, and internal-
external rotations at the ankle, knee, and hip) and the corresponding 18 joint velocities
(for a total of 36 states) represented the human locomotor system during gait initiation.
The swing and stance phases were identified from the foot-floor contact patterns recorded
with insole-mounted foot switches. The time-series analysis was primarily based on the
method presented by Hurmuzlu and Basdogan [5.10]. The asymptotic behavior of the
dynamical locomotor system during the gait initiation was assumed to be a bounded set
which would be called the steady-state gait. The convergence of the gait during the gait
initiation towards a nearly periodic cyclic steady state was investigated [5.22]. The cyclic
time-series of the joint kinematics was probed at a particular gait event from gait cycle to
cycle. Any gait event can be selected for this analysis. Theoretically the measure should
be invariant to the selection of the gait event although this invariance property may not
hold for the simplified model of the gait dynamics [5.11]. To test this invariance, we
selected six gait-events to do the same analysis. The gait events were bilateral foot-strike,
foot-off, and maximum-knee-flexion (during the swing-phase).
A mapping function was then found that returns the cross-section of the flow (or
trajectory) to itself (called a return map) from gait cycle to cycle at the gait event. If the
disturbance is not large enough then a linear return map can be found which can then be
subjected to further analysis for stability using methods for linear systems analysis [5.10].
118

Our preliminary studies showed that this mapping function during gait initiation was
mostly linear for able-bodied subjects [5.15]. A more rigorous analysis of this linearity
was performed for pathological gait. The degree of linearity was postulated to be a
measure of fluidity or coordination of gait initiation. A linearized mapping function was
approximated from the joint kinematic data with linear regression techniques. The
Jacobian of the linear model provided an estimate of the rate of convergence during the
first few steps taken from standing even if the gait did not reach a steady state in the
volume of motion capture. The shorter the gait initiation phase, the more stable the gait.
A rate parameter found from the Jacobian gave a measure of stability, as discussed
below.
Let X
n
be the 36 x 1 dimensional vector of the 36 states at the n
th
gait event i.e. at
the n
th
gait cycle (GC) during the gait initiation ( 1 n m = ) of a trial. The last GC (i.e.
the m
th
gait event) of the trial was considered to have reached a steady state. Let a 36 x
1 dimensional vector X
*
represent the 36 states at the m
th
(i.e. the last) gait event of the
trial. The discrete mapping of the states of the system at the n
th
gait event to the (n+1)
th

gait event (called the returns) was represented by an equation, X
n+1
=f (X
n
), where f is
the (return) mapping function. The mapping function, f was linearized in the vicinity of
X
*

( ) ( )
( )
( )
( )
*
* *
1
1
36 36
36 1 36 1
n n
x X
n n
df
X X X
dx
o o
+
=
+


=
= - X J X
X
Equation 1
A multivariate linear regression model of the gait kinematics over p gait
initiations (i.e. p trials) gave an estimate of the Jacobian . The 36 perturbations at the
first (m-1) gait events (
J
. . 1 1 i e n m = ) served as the predictor variables
n
o X . The
119

average of the magnitude of the eigenvalues of the transposed estimated Jacobian matrix
has been proposed to be an overall stability measure (o-measure of stability) by
Hurmuzlu and Basdogan [5.10]. (1-o) gives an estimate of the rate of convergence during
the gait initiation and smaller values of o-measure will denote a faster gait initiation and
a gait more resilient to disturbances.
T
J
For multivariate linear regression analysis, the 36-predictor variables at (m-1) gait
events during a trial were stacked by trials in a ( ) ( ) 1 36 m p dimensional design matrix
. The response variables were the corresponding returns of the 36 perturbations
( ) during gait initiation, stacked by trials in a
n
X
. . i e 2 n m = ( ) ( ) 1 36 m p dimensional
response matrix . The multivariate linear regression model was
n+1
X
( ) ( ) ( ) ( )
( ) ( ) ( ) 36 36 1 36
1 36 1 36
m p
m p m p


= + -
n+1 n
X X J Equation 2
The residuals , and the parameter matrix , were the unknowns [5.16]. The 36
columns of the residuals are expected to have zero mean since the perturbations should
ideally decay to zero. The least squares estimate of was given by
J
J
( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
1
36 36
36 1 1 36 36 1 1 36
T T
m p m p m p m p


=
| |
- - -
|
\ .
n n n n
J X X X X
+1
)
n
Equation 3
The data collected from 4 able-bodied subjects showed multi-colinearity for the ill-
conditioned matrix , which was expected since joint angles co-vary during
human gait [5.17]. Principal Component Analysis (PCA) was performed to address the
problem of multi-colinearity (redundancy) of the predictor variables and to improve the
condition number [5.18]. PCA determines fewer linear combinations of the 36 predictor
variables that can explain most of the variance-covariance structure. Principal
(
T
-
n
X X
120

Components (PCs) being orthogonal to each other will solve the problem of multi-
colinearity of the predictor variables. The dimension reduction with PCA was performed
on the 36 standardized perturbation states, which were stacked in a dimensional
matrix . The weight matrix from PCA was used to project the 36 standardized
response ( and predictor variables
( 36 mp )
)
Z W
n+1
Z ( )
n
Z on to new basis vectors [5.18].
( )
( )
m p
m p


n+
P
P

( ) m p
n+
P
( )
( )
1 36
1 36
1

n
P
( ) 1 36
1

( ) ( )
(
( ) ( )
( )
1
36 36
1 36
36 36
1 36
m p
m p
+


= -
= -
n
n n
Z W
Z W
)

Equation 4
The multivariate linear regression model in terms of the new response and
predictor variables was
n+1
P
( ) ( )
( ) ( ) 36 36
1 36 m p


= -
* *
n
P J
( ) 1 36 m p
+
Equation 5
The adequate number of principal components (q ) was determined from the
cumulative percent variance accounted for (%VAF) by the PCs such that % .
If
VAF 90% >
q is less than 36 (dimension of the original model) then there is a reduction in the
dimension of the model, which will improve the confidence on the elements of for the
same number of observations
*
J
( ) 1 m p . For a multivariate linear regression model with
the firstq PCs as the predictor and response variables, we will define a quality of fit
(
QoF
)
q
for the reduced dimension linear regression model:
121

( )
( ) ( )
( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
1 1 1
tot
pred
SS = total sum of the squares
SS = predicted sum of the squares
and cross-products
and
.,1 .,1
also .,1 .,1 .,1 .,1
m p m p m p
T
T
q q
q q q q q
q q
q
q
q q
q q q q

| |
|
\ .
= +
=
-
- - - -
* *
n+1 n
* *
n+1 n+1 n n
P P J
P P P J P J


( )
( )
( )
( )
( )
( )
tot pred res
tot pred res
res
SS = residual sum of the squares
and cross-products
cross-products
or
or
1
T
trace trace trace
t
QoF
q q
q q q
q q q q
q q
q q q
q q q q
q q
q
q

| | | |
| |
|
\ .
\ .
+
= +
= +
=
-
| |
| | | |
|
| |
\ . \ .
\ .
* *

SS SS SS
SS SS SS
( )
( )
tot
pred tot
Since the columns of and are linearly independent so and will be diagonal
Also ( ) is the sum of all the diagonal elements of the matrix

X X
res
race
trace
trace
q
q
q q
n+1 n
SS
SS
P P SS SS
Equation 6
TheQoF
q
, which should lie between 0 and 1 gives a measure of the quality of the
linear regression model for cycle-to-cycle coordination during the gait initiation whiles
the eigenvalues of
T
q
*
J provide a measure of rate of convergence to a steady state. The
measures, QoF
q
and the average eigenvalue of
T
q
*
J (called Av. Eig.) were used to
compare between able-bodied and iSCI gait initiation.
Results
Linear regression model for gait initiation
The Euclidean distance of the perturbation of 36 states to the origin (18 joint angles
and 18 joint velocities) at a gait event (maximum left knee flexion) during gait initiation
is shown in Figure 5.5. Among all the gait events, the knee flexion was found to give
results with lowest variance especially with pathological data [5.11]. The multivariate
linear regression model fitted the convergence in a 36-D space while the Figure 5.5
shows the convergence lumped in Euclidean distance for ease of illustration. The
perturbation as seen from the Euclidean distance converged towards zero for able-bodied
gait initiation, as shown in Figure 5.5a. The iSCI subjects made, on an average five
122

strides within the volume of motion capture due to their shorter stride length while the
able-bodied could take only four strides.
This convergence of 36-dimensional perturbation during gait initiation was
analyzed with a linear regression model (Equation 2, 3). The condition number for
(in Equation 3) was found to be very high (~10
20
) which indicated numerical
instability during the computation of its inverse.
T
-
n
X X
n
Principal component analysis (PCA) was performed to reduce the dimensionality of the
linear regression model and to improve the condition number. Five principal components
(PCs) accounted for greater than 90% variance in the data, as shown in Figure 5.6. Thus
the number of principal components (denoted byq ) selected for the reduced dimension
linear regression model (Equation 6) was 5 (i.e. 5 q = ). The rest of the variance (<10%
VAF) was accounted for by the PCs from 6 36. These small amplitude movements were
not included in the overall coordination and stability analysis. The condition number of
improved after PCA, which was of the order of 10. The first three principal
components accounted for greater than 70% variance in the data, as shown in Figure 5.6.
In Figure 5.7, the sagittal plane angles (suffix x) have the highest loading for the first
two principal components (PCs) while the 3
rd
PC also accounted for the
pronation/supination at the ankle. The first three PCs mostly accounted for the kinematic
coupling in the sagittal plane where most of the limb movements occur during gait.
T
-
n
X X
n
Lilliefors test for goodness of fit to a normal distribution (lillietest Matlab) couldnt
reject the hypothesis that each of those error vectors
q
*
in the reduced dimension linear
regression model (Equation 6, 5 q = ) had a normal distribution with significance level of
5%. The perturbation of 5 Principal Components (PC) to the origin as seen from the
123

Euclidean distance for the ease of illustration is shown in Figure 5.8. After dimension
reduction of the linear regression model, the perturbation as seen from the Euclidean
distance still converged towards zero for able-bodied normative gait. The convergence of
the perturbation during EMG-triggered iSCI gait initiation as seen with the Euclidean
distance was more similar to normative gait for the iSCI subjects, iSCI-1 and iSCI-C2.
The multivariate linear regression model will provide the quantitative measure of this
convergence in 5-D, as discussed in the next section.
Coordination and stability during FES-assisted gait initiation
The scatter plot of and average eigenvalue magnitude (Av. Eig.) at the six
gait events is shown in Figure 5.9a for each of the able-bodied and iSCI subjects with
different trigger modes. There are six data points corresponding to 6 gait events for each
group in Figure 5.9a. The QoF and Av. Eig. varied substantially based on the selection of
the gait event, as shown in Figure 5.9a. Three clusters shown with ellipses on Figure 5.9a
correspond to the able-bodied data, EMG and switch triggered iSCI data, and the auto-
triggered iSCI data. One-way Multivariate Analysis Of Variance (MANOVA, manova1
in Matlab) was performed to find if there is a significant difference in the entire set of
means (of and Av. Eig.) from group to group. It was found that the means differ
and the difference lies on a plane (dimensionality=2, p=0.0002). Figure 5.9b shows the
dendogram plot (manovacluster Matlab), which is the hierarchical binary cluster tree
formed using the average distance between all pairs of data-points in the two clusters.
The height of each of the U-shaped lines connecting the two objects in the binary tree
shows the average distance between them. Closest are Able1 and Able3, Able2 and
Able4, EMG1 and EMG2, SW1 and SW2, Auto1 and Auto2. Then at the next level, all
5
QoF
5
QoF
124

the groups with able-bodied data are close, and so are the groups with EMG-triggered
and switch-triggered data. Then farthest are the groups with iSCI data and those with the
able-bodied data. The able-bodied gait initiation (based on QoF and Av. Eig.) was found
to be significantly (p=0.0002) different from the pathological iSCI gait initiation. Figure
5.10 shows the Mahalanobis distance between each pair of group means, which is a
dissimilarity measure (higher the distance, more is the dissimilarity). Unlike the
Euclidean distance, the Mahalanobis distance takes into account the covariance and it is
scale-invariant. In spite of the statistically significant difference between the able-bodied
and iSCI gait initiation, the EMG-triggered FES-assisted iSCI gait initiation was closest
to the able-bodied normative clusters with lowest Mahalanobis distance (darker on the
color scale) when compared to other trigger modes, as shown in Figure 5.10.
Discussion
The EMG-triggered FES-assisted ambulation was successfully implemented by
many researchers in past but the resulting improvement in the gait dynamics was never
investigated in depth. Gait parameters like gait-speed, step length and time, stride length
and time, and duration of single and double support phases averaged over multiple gait
cycles provide a static picture of the gait dynamics, ignoring the gait time-series. EMG-
triggered FES was postulated to provide better coordination between the stimulated and
volitional motor activity and the resulting functional gain should be seen in terms of
kinematic coordination [5.9]. A time-series model is required to investigate kinematic
coordination and stability of a dynamic task like gait. Carletti et al. presented a
univariate linear regression model using stride-to-stride interval for non-invasive
diagnosis of neurodegenerative diseases [5.19]. They could differentiate between the
gaits of individuals with Parkinson s disease, Huntingtons disease, Amyotropic Lateral
125

Sclerosis, and healthy controls with a rate parameter and the variance of the error term of
the linear regression model. Our pathological gait analysis is based on a similar idea but
with a multivariate linear regression model using the kinematic data. We also looked at a
rate parameter (i.e. Av. Eig.) computed from the Jacobian of the linear model and a
normalized stochastic amplitude parameter (i.e., ) computed from the sum of the
squares of the error or residuals.
QoF
The EMG classifier detected the unloading of the limb and shift of body-weight to
the contralateral limb that takes place during double-support phase preceding the swing-
phase of the ipsilateral side [5.9]. It then triggered the FES-assisted stepping of the
ipsilateral limb. It is necessary that FES-assisted gait initiation be coordinated and stable.
It should be noted that push-off during iSCI gait wasnt assisted by FES so the energy
input during FES-assisted gait initiation mostly came from the upper-body support on the
walker. The upper-body movements necessary to push the rolling walker and then pull
the body forward, needed to be coordinated with the FES-assisted lower limb movements
during gait initiation. Faster transition and better coordination during this transition phase
will mean a gait more resilient to disturbances, which should make the EMG-trigger a
better and preferred command source for outdoor ambulation.
The Euclidean distance of the perturbation to the origin computed from the 36
states (as shown in Figure 5.5) for iSCI subjects didnt converge steadily towards zero,
except for the subject iSCI-1 walking with EMG-trigger. Subject iSCI-2 had unilateral
FES-assistance to his left side only and his right side movements were completely
volitional which might have affected the results. Most of the frontal plane movements
during walker-supported iSCI gait didnt converge to a steady state. The FES-assisted
126

movements during iSCI gait were mostly in the sagittal plane and the frontal plane
movements were mostly volitional as a result of upper extremity interactions with the
walker. More prominent frontal plane movements of the partially paralyzed right limb of
the subject iSCI-2 were due to weak hip abductors since only his left limb musculature
were activated by FES.
The condition number of for the full-state 36-dimensional linear
regression model (Equation 3) was too high (~10
20
) for reliable computation of its
inverse. This was due to synergistic movement of the joints, which make joint angles
covary during gait [5.17]. Principal component analysis decreased the dimension of the
linear regression model to five, which accounted for greater than 90% of the variance in
the original model (Figure 5.6). Mah et al. has showed that gait kinematics has much
lower dimensionality because of these movement synergies. The dimension reduction to
five improved the condition number (~10) of by several orders of magnitude
from 10
20
to 10. The first three principal components accounted for more than 70% of the
variance observed, and primarily represented the movements in the sagittal plane during
able-bodied gait initiation (Figure 5.6 and 5.7). The goal of the reduced-dimension model
was to capture the convergence of the major joint trajectories to a steady state during gait
initiation. The convergence of the Euclidean distance of the perturbations towards the
origin computed from the first five principal components for EMG-triggered iSCI gait
initiation looked more similar to able-bodied data in both the iSCI subjects (Figure 5.8).
It should be noted that Figure 5.5 and 5.8 give a marginal view of the convergence since
it only shows the Euclidean distance of the perturbations from origin whereas the
T
-
n
X X
n
n
T
-
n
X X
127

multivariate linear regression model captures the convergence across all the
states/predictor variables.
The linearity of the reduced-dimension model was chosen as one of the features of
normative gait initiation. The Quality of Fit ( QoF ) of the reduced-dimension linear
regression model was used to measure the linearity of the return-map data. The rate of
convergence was determined from the Jacobian of the linear model, which gave an
estimate of the stability since faster convergence from disturbances means a more stable
gait. A linear return-map model with high rate of convergence is desirable since that will
ensure a stable gait initiation.
Able-bodied gait initiation was found to be more stable than FES-assisted iSCI gait
initiation (Figure 5.9). Interestingly, the dendrogram plot of Figure 5.9b showed that the
cluster for Able1 (age: 25 years) was closer to Able3 (age: 26 years) and the cluster for
Able2 (age: 52 years) was closer to Able4 (age: 54 years) possibly showing the effect of
age on those parameters. Also the iSCI data clusters of same trigger mode were closer to
each other. The average steady-state gait speed reached by the four able-bodied subjects
was much higher (1.12 m/sec) as compared to 0.16 m/sec for the two iSCI subjects.
Based on the results from Dingwell et al. it was assumed that the orbital gait stability was
not greatly mediated by gait speed [5.12]. Nevertheless, gait speed is one of the main
predictors of independent community ambulation and the improvement in gait speed is
necessary along with better coordination and stability [5.20].
Both the EMG-triggered and switch-triggered iSCI gait initiations were more
similar to the able-bodied data in terms of coordination and stability than auto-triggered
iSCI data (Figure 5.9). This is because auto-triggered iSCI gait had a fixed step frequency
128

that could not be modulated as needed during the gait initiation. Both the switch and the
EMG trigger gave an opportunity to modulate the step frequency that was necessary to
fluidly transition from stationary standing to a steady gait. Overall, EMG-triggered FES-
assisted gait initiation was found to be closest to the able-bodied data based on
Mahalonobis distance between the clusters (Figure 5.10). This proximity can also be seen
in Figure 5.9 where EMG-triggered and switch-triggered iSCI data have
comparable but the EMG-triggered iSCI data has lower Av. Eig than switch-
triggered iSCI data. This means faster convergence to steady state and better stability for
EMG-triggered FES-assisted iSCI gait. Also, the user of the EMG-triggered FES system
had to exercise the voluntary muscles in conjunction with the stimulated muscles to
trigger the steps which may have long-term therapeutic benefits [5.21].
5
QoF
Conclusions
The EMG-triggered FES-assisted iSCI gait was shown to be more normative in
terms of coordination and rate of convergence during gait transition from standing to
walking. This paper developed a method based on prior work on time-series analysis of
dynamical systems and applied that to evaluate gait transitions using a well accepted tool
called return-map analysis. The results presented in this paper indicated that the user of
the EMG-triggered FES system successfully exercised the voluntary muscles in
conjunction with the stimulated muscles to synergistically generate the volitional EMG to
trigger the FES-assisted steps. This enhanced the coordination between the voluntary and
stimulated muscles, as presented in the results. The EMG-triggered FES-assisted iSCI
gait was therefore more normative than switch- and auto-triggered iSCI gait during gait
transitions which is needed for outdoor walking. The feasibility study and gait evaluation
129

were performed with a tethered system in the laboratory which needs to be translated to a
portable system for outdoor use. The newer family of implantable stimulator-telemeters
(IST-12) has 2 EMG channels and the capability to perform the signal processing
required by the GED. The GED and the FEScontroller can be implemented in the
current portable External Control Unit (ECU) with the IST family of implants. Based on
the results presented in this paper from a laboratory based evaluation, it is hypothesized
that EMG-triggered portable FES system will allow the user to transition more fluidly
and stably from one speed to another by modulating the step frequency, which is required
for better outdoor ambulation.
References
5.1. R. Kobetic, R. J. Triolo, J. P. Uhlir, C. Bieri, M. Wibowo, G. Polando, E. B.
Marsolais, J. A. Davis Jr., K. A. Ferguson, and M. Sharma, Implanted Functional
Electrical Stimulation System for Mobility in Paraplegia: A Follow-Up Case
Report, IEEE Trans. Rehabil. Eng., vol. 7, no. 4, Dec. 1999, pp. 390398.
5.2. E. Hardin, R. Kobetic, L. Murray, M. Corado-Ahmed, G. Pinnault, J. Sakai, S.
Nogan, C. Ho, and R. Triolo, Walking after incomplete spinal cord injury using
an implanted FES system: A case report., Jour. Rehabil. Res. Dev., vol. 44, no.
3, 2007, pp. 333346.
5.3. D. Graupe, K. H. Kohn, S. Basseas, and E. Naccarato, Patient controlled
electrical stimulation via EMG signature discrimination for providing certain
paraplegics with primitive walking functions, J. Biomed. Eng., vol. 5, 1983, pp.
220-226.
5.4. R. J. Triolo, and G. D. Moskowitz, The theoretical development of a
multichannel time-series myoprocessor for simultaneous limb function detection
and muscle force estimation, IEEE Trans. Biomed Eng., vol. 36, no. 10, Oct.
1989, pp. 1004-1017.
5.5. D. Graupe, EMG pattern analysis for patient-responsive control of FES in
paraplegics for walker-supported walking, IEEE Trans. Biomed. Eng., vol. 36,
no. 7, July 1989, pp. 711-719.
5.6. D. Graupe, and H. Kordylewski, Artificial neural network control of FES in
paraplegics for patient responsive ambulation, IEEE Trans. Biomed Eng., vol.
42, no. 7, Jul. 1995, pp. 699-707.
130

5.7. H. Kordylewski, and D. Graupe, Control of Neuromuscular Stimulation for
Ambulation by Complete Paraplegics via Artificial Neural Networks, Neurol.
Research, vol. 23, July 2001, pp.472-481.
5.8. A. Dutta, R. Kobetic, and R. J. Triolo, EMG based triggering and modulation of
stimulation patterns for FES assisted ambulation a conceptual study, presented
at XXth Congress of the International Society of Biomechanics, Cleveland, OH,
Aug. 2005.
5.9. A. Dutta, R. Kobetic, and R. Triolo, Ambulation after incomplete spinal cord
injury with EMG-triggered Functional Electrical Stimulation, IEEE Transactions
on Biomedical Engineering, 55:2, February 2008.
5.10. Y. Hurmuzlu, and C. Basdogan, On the measurement of dynamic stability of
human locomotion, Journal of Biomechanical Engineering, vol. 116, 1994, pp.
30-36.
5.11. Y. Hurmuzlu, C. Basdogan, and D. Stoianovici, Kinematics dynamic stability of
the locomotion of post-polio patients, Journal of Biomechanical Engineering,
vol. 118, no. 3, 1996, pp. 405411.
5.12. J. B. Dingwell, K. H. Gu, and L. C. Marin, The effects of sensory loss and
walking speed on the orbital dynamic stability of human walking, Journal of
Biomechanics, vol. 40, 2007, pp. 1723-1730.
5.13. R. Kobetic, and E.B. Marsolais, Synthesis of paraplegic gait with multichannel
functional neuromuscular stimulation, IEEE Trans Rehab Eng., vol. 2, no. 2,
1994, pp. 66-79.
5.14. R. Kobetic, R. J. Triolo, and E. B. Marsolais, Muscle selection and walking
performance of multichannel FES systems for ambulation in paraplegia, IEEE
Trans. Rehabil. Eng., vol. 5, no. 1, Mar. 1997, pp. 2329.
5.15. A. Dutta, and R. Triolo, Stability analysis of Functional Electrical Stimulation
(FES)-assisted overground gait in an incomplete spinal cord injured subject,
Journal of Biomechanics, vol. 39, 2006, pp. S113.
5.16. R. A. Johnson, and D. W. Wichern, Applied Multivariate Statistical Analysis.
Prentice Hall, 2002.
5.17. L. Bianchi, D. Angelini, G. P. Orani, and F. Lacquaniti, Kinematic Coordination
in Human Gait: Relation to Mechanical Energy Cost, The Journal of
Neurophysiology, vol. 79, no. 4, April 1998, pp. 2155-2170.
5.18. I. T. Jolliffe, Principal Component Analysis, New York: Springer, 1986, pp. 44-
48, 269-296.
131

5.19. T. Carletti, D. Fanelli, and A. Guarino, A new route to non invasive diagnosis in
neurodegenerative diseases, Neuroscience Letters, vol. 394, 2006, pp. 252-255.
5.20. P. J. Friedman, D. E. Richmond, and J. J. Baskett, A prospective trial of serial
gait speed as a measure of rehabilitation in the elderly, Age and Aging, vol. 17,
no. 4, 1988, pp. 227-235.
5.21. M. R. Popovic, T. A. Thrasher, M. E. Adams, V. Takes, V. Zivanovic, and M. I.
Tonack, Functional electrical therapy: retraining grasping in spinal cord injury,
Spinal Cord, vol. 44, 2006, pp. 143151.
5.22. C. A. Miller, and M. C. Verstraete, Determination of the step duration of gait
initiation using mechanical energy analysis, Journal of Biomechanics, vol. 29,
no. 9, 1996, pp. 1195-1199.
5.23. D. A. Winter, A. O. Quantbury, and G. D. Reimer, Analysis of the instantaneous
energy of normal gait, Journal of Biomechanics, vol. 9, 1976, pp. 253-257.
5.24. D. A. Winter, The Biomechanics and Motor Control of Human Movement, 2
nd

edition, New York: Wiley, 1991.
5.25. C. Angeloni, P. O. Riley, and E. D. Krebs, Frequency Content of Whole Body
Gait Kinematic Data, IEEE Trans. Rehabilitation Engineering, vol. 2, no. 1,
1994, pp. 40-46.
5.26. C. D. Mah, M. Hulliger, R. G. Lee, I. S. OCallaghan, Quantitative analysis of
human movement synergies: constructive pattern analysis for gait, Journal of
Motor Behavior, vol. 26, 1994, pp. 83-102.
5.27. E. H. Melis, R. Torres-Moreno, H. Barbeau, E. D. Lemaire, Analysis of assisted-
gait characteristics in persons with incomplete spinal cord injury, Spinal Cord,
vol. 37, no. 6, June 1999, pp. 430-439.

132

Figures


Estimate feature loadings
via correlation analysis
Find the distance from centroid
of case T in feature space
Distance
<
threshold
Trigger
swing-
phase
Double-
support
> 3 sec?
Get next
EMG sample
Euclidean distance
Y
Loadings
N
Y
N
EMG during
double-support
Feature Set
& Threshold
STOP
Wait for
manual
trigger

Figure 5.1: Laboratory setup for EMG-triggered FES-assisted walking shown with a
flowchart for the EMG-based gait event detector for triggering FES-assisted
steps.

133



Figure 5.2: Top panel: Selection of optimum cut-off frequencies for low-pass filtering the
kinematic data. Bottom panel: Most of power content in the signals was below
the optimum cut-off frequency, which were 6 Hz for able-bodied and 3.5 Hz
for iSCI data.
134


volume of marker data capture (~4-5 steps)
time series for stability analysis
last gait cycle for
gait parameters
first step from
stand position
catch a self-selected
gait speed
reached steady
state
return to stand
position
volume of marker data capture (~4-5 steps)
time series for stability analysis
last gait cycle for
gait parameters
first step from
stand position
catch a self-selected
gait speed
reached steady
state
return to stand
position
time series for stability analysis time series for stability analysis
last gait cycle for
gait parameters
first step from
stand position
catch a self-selected
gait speed
reached steady
state
return to stand
position
last gait cycle for
gait parameters
last gait cycle for
gait parameters
first step from
stand position
catch a self-selected
gait speed
reached steady
state
return to stand
position
first step from
stand position
catch a self-selected
gait speed
reached steady
state
return to stand
position

Figure 5.3: Gait initiation protocol during the data collection.
135



Figure 5.4: Typical pelvis motion in the direction of progression during gait initiation.



136





Figure 5.5: Euclidean distance from the origin of the perturbation of the 36 states during
gait initiation at the maximum left knee flexion. left panel: able-bodied data (4
subjects). Middle panel: iSCI data (subject C1). right panel: iSCI data (subject
C2). [Normative: 4 subjects, 10 trials each; iSCI EMG-trigger: 2 subjects, 10
trials each; iSCI Switch-trigger: 2 subjects, 10 trials each; iSCI Auto-trigger: 2
subjects, 10 trials each].


137



Figure 5.6: Percent Variance Accounted For (%VAF) by the Principal Components (PC).
Top panel: able-bodied data. Middle panel: iSCI-1 walking with EMG,
switch, and auto triggered FES. Bottom panel: iSCI-2 walking with EMG,
switch, and auto triggered FES. All the plots show the data averaged over 6
gait events.
138



Figure 5.7: Typical loading of the first 3 Principal Components (PCs) on the joint angles
(HA: Hip Angle, KA: Knee Angle, AA: Ankle Angle) found from the weight
matrix of the subject Able1. The prefix l indicates the left side and r
indicates the right side. The suffix x denotes sagittal plane, y denotes
frontal plane, and z denotes transverse plane for the joint angles.
W



139





Figure 5.8: Euclidean distance from the origin of the perturbation of the 5 principal
components at maximum left knee flexion left panel: able-bodied (4 subjects).
Middle panel: iSCI-1 subject C1. right panel: iSCI-2 subject C2. [Normative:
4 subjects, 10 trials each; iSCI EMG-trigger: 2 subjects, 10 trials each; iSCI
Switch-trigger: 2 subjects, 10 trials each; iSCI Auto-trigger: 2 subjects, 10
trials each].

140



Figure 5.9: Top panel: Scatter plot of QoF and Av. Eig. at 6 gait events for the groups;
the 4 able-bodied subjects: Able1, Able2, Able3, Able4, and the 2 iSCI
subjects with different trigger modes: EMG1, EMG2, SW1, SW2, Auto1,
Auto2. Bottom panel: MANOVA cluster dendrogram plot of the groups.
141


Figure 5.10: Mahalanobis distances matrix between each pair of group means.











142

CHAPTER 6
DEVELOPMENT OF AN IMPLANTED INTRAMUSCULAR EMG-TRIGGERED FES
SYSTEM FOR AMBULATION AFTER INCOMPLETE SPINAL CORD INJURY
Abstract
Ambulation after spinal cord injury is possible with the aid of neuroprosthesis
employing functional electrical stimulation (FES). Individuals with incomplete spinal
cord injury (iSCI) retain partial volitional control of muscles below the level of injury,
necessitating careful integration of FES with intact voluntary motor function for efficient
walking. In this study, the intramuscular electromyogram (iEMG) was used to detect the
intent to step and trigger FES-assisted walking in two volunteers with iSCI via an
implanted neuroprosthesis consisting of two channels of bipolar iEMG signal acquisition
and 12 independent channels of stimulation. The detection was performed with two types
of classifiers a threshold-based classifier that compared the running mean of the iEMG
with a discrimination threshold to generate the trigger and a pattern recognition classifier
that compared the time-history of the iEMG with a specified template of activity to
generate the trigger whenever the cross-correlation coefficient exceeded a discrimination
threshold. The two classifiers were presented in a random order to one of the iSCI
volunteers for evaluation under indoor laboratory conditions. The pattern recognition
classifier generally outperformed the threshold-based classifier, particularly with respect
to minimizing False Positive triggers. The overall True Positive rates for the threshold-
based classifier were 61.6% and 87.2% for the right and left steps with overall False
Positive rates of 38.4% and 33.3%. The overall True Positive rates for the left and right
step with the pattern recognition classifier were 57.2% and 93.3% and the overall False
Positive rates were 11.9% and 24.4%. Subjects showed no preference for either the
threshold- or pattern recognition-based classifier as determined by the Usability Rating
143

Scale (URS) score collected after each trial. The average URS score was 2 out of a 7
point scale for both the classifiers, indicating that both the classifiers were perceived as
moderately easy to use.
Introduction
Motor system neuroprostheses utilizing functional electrical stimulation (FES) can
improve or restore walking function in individuals paralyzed by spinal cord injuries by
electrically activating a customized set of muscles selected to address individual gait
deficits with pre-programmed patterns of stimulation to augment or produce cyclic
movements of the lower extremities [6.1]. Users can trigger each step with a manual
switch and progress through the customized pattern of stimulation to achieve walking
function. The potential for triggering FES from the electromyographic (EMG) activity of
muscles which remain under volitional control after partial paralysis to coordinate the
actions of the stimulated muscles with voluntary movement has previously been
evaluated with signals acquired from the surface of the skin [6.2]. The main objective of
this study was to develop a method to identify optimal command sources and evaluate the
feasibility of detecting the intent to take a step using the intramuscular electromyogram
(iEMG) acquired from recording electrodes implanted permanently in the partially
paralyzed muscles in two implant recipients with incomplete spinal cord injury (iSCI).
The overall aim was to specify the development of a new command and control interface
to trigger FES-assisted stepping that can be implemented with two channels of
intramuscular EMG electrodes with a multichannel implantable stimulator-telemeter
(IST) [6.3], [6.4]. This report summarizes the development of the iEMG-based command
interface for FES-assisted ambulation that integrated stimulated and voluntary muscle
activity in a fully implantable neuroprosthesis.
144

Prior work has shown that gait event detection for the control of electrical
stimulation is possible with physical sensors such as force sensitive resistors,
accelerometers, gyroscopes, as well as with biopotentials such as the electroneurogram
and electromyogram [6.5-6.8]. The movement-based sensors need volitional movement
to work whereas electromyogram temporally precedes the generation of force in the
muscle and resulting movement of a joint. This makes the EMG an attractive signal for
detection of intent so that the desired movement can then be assisted with FES. Graupe et
al. proposed EMG based control of FES with time-series model of surface EMG (sEMG)
[6.9]. Auto-regressive (AR) time-series models of four channels of sEMG has been
shown to give information related to limb function [6.10] and can provide patient-
responsive control of FES-assisted walking [6.11]. The AR parameters determined offline
from the time-series model of the above-lesion upper-trunk surface EMG were used to
identify standing and walking functions [6.11]. Recently, Graupe and Kordylewski
presented a neural network based EMG classifier with on-line learning capabilities to
control stimulation for achieving stepping motions in individuals with complete
paraplegia [6.12, 6.13]. Our preliminary studies indicate that the surface EMG from
partially paralyzed muscles of individuals with incomplete paraplegia can provide
significant information related to the volitional activity of the muscle and can be used for
gait-event detection [6.14, and 6.15]. Thorsen et al. have showed improved wrist
extension with stimulation controlled by surface EMG from partially paralyzed wrist
extensors [6.16]. Futami et al. showed the feasibility of proportional control of FES with
the sEMG from the same muscle (partially paralyzed knee extensors) in incomplete
hemiplegia [6.17].
145

This chapter outlines the development of a binary classifier as a command interface
for foot-off intent detection with iEMG from partially paralyzed muscles via implanted
recording electrodes in two subjects with iSCI. The classifier detected the intent to
initiate stepping and integrated that information in the FES controller to trigger FES-
assisted stepping with that limb. The real-time operation of the iEMGbased classifier
was evaluated by one iSCI volunteer for FES-assisted walking under laboratory
conditions. The technical challenges and preliminary results from initial attempts to
implement iEMG-based control systems in real-time with available implanted
neuroprostheses are discussed at the end of the chapter.
Methods
Subjects
Two male subjects with incomplete spinal cord injury volunteered for this study.
Subject iSCI-1 was a male volunteer with C6 incomplete spinal cord injury (ASIA C).
Subject iSCI-2 was a male volunteer with T1 motor and C6 sensory incomplete spinal
cord injury (ASIA D) who could walk only short distances with great difficulty without
the assistance from FES. They each received a 12 channel stimulator-telemeter (IST-12),
12 surgically implanted intramuscular stimulating electrodes [6.3] and two implanted
intramuscular recording electrodes as part of a neuroprosthesis designed to facilitate
household and limited community ambulation.
Subject iSCI-1 presented with more extensive paralysis on his right side. In a
single surgical procedure, he received stimulating electrodes to recruit iliopsoas, vastus
intermedius/lateralis, erector spinae, and gluteus maximus bilaterally, as well as
hamstrings, posterior adductor magnus, tensor fasciae latae, and tibialis anterior muscles
on the right side only. Subject iSCI-2 presented with more extensive weakness primarily
146

on his left side. He had previously received a neuroprosthesis to assist with ambulation
based on an eight-channel implanted receiver-stimulator (IRS-8). His original eight-
channel system included intramuscular stimulating electrodes only on his left side to
recruit iliopsoas, vastus intermedius/lateralis, tensor fasciae latae, gluteus medius, gluteus
maximus, posterior portion of adductor magnus, and tibialis anterior (2 electrodes). He
was re-evaluated for the 12-channel EMG-controlled system and upgraded to the IST-12
for iEMG triggered walking. The original IRS-8 was disconnected from the stimulating
electrodes and replaced with the IST-12. At the time of his revision surgery, additional
intramuscular stimulating electrodes were inserted into the bilateral erector spinae, right
iliopsoas, right gluteus maximus, and right tibialis anterior to complete the 12-channel
system. Temporal patterns of stimulation to activate the muscles were customized for
each subjects individual gait deficits according to established tuning procedures [6.7],
[6.8] in order to achieve forward stepping in a rolling walker.
Informed consent was obtained from both the subjects before their participation and
the Institutional Review Board of the Louis Stokes Cleveland Department of Veterans
Affairs Medical Center approved the study related procedures.
Command source selection
Two recording channels were available in the implantable stimulator-telemeters for
intramuscular EMG recording electrodes [6.2-6.4]. Therefore two muscles and the best
location within those muscles had to be selected for implanting intramuscular recording
electrode based on surface EMG (sEMG) data. Subjects were asked to walk either
volitionally or with surface FES for the pre-surgery data collection. The experimental
setup for collecting sEMG data during walking is shown in Figure 6.1. Surface EMG
signals were collected from gluteus medius (GM), biceps femoris (BF), medial
147

gastrocnemius (MG), rectus femoris (RF), tibialis anterior (TA), and erector spinae (ES)
bilaterally.
The sEMG was collected using Ag/AgCl electrodes with 2 cm. inter-electrode
distance following the SENIAM guidelines [6.22]. The sEMG signals were amplified and
low-pass (f
cutoff
=1000 Hz) filtered by CED 1902 amplifiers (Cambridge Electronic
Design, England) before being sampled at 2400 Hz (AT-MIO-64F-5, National
Instruments, USA) in the host personal computer. The CED 1902 amplifier has a
switching circuit (clamp) which was activated by a square pulse that disconnected the
electrode inputs from the amplifier and connected it to the common electrode to prevent
stimulation artifact. The input channels of CED 1902 were clamped when the stimulation
pulses were applied to the muscles to prevent stimulation artifact. The blanked portion of
the sEMG was reconstructed with the average value of the sEMG in the pre- and post-
blanking periods [6.23] as shown in Figure 6.2a. Then the whole sEMG pattern was low
pass filtered (5th order zero-lag Butterworth, f
cutoff
=3 Hz) to get the linear envelope
(Figure 6.2b). The gain of each channel was set separately in the CED 1902 amplifiers to
prevent saturation at the maximum muscle activity during the gait-cycle.
Baseline sEMG data were collected during 3 seconds of initial standing before the
start of each trial. During each trial, the subjects were asked to reach a self selected speed
within ~5m of the start position and then decelerate to come to rest at the end of the
walkway. They had to wait in the terminal stance for 3 seconds at the end of every trial.
The experimental protocol is shown in Figure 6.3. The subjects made multiple passes
across the straight level walkway. Gait events (foot-strike and foot-off) were derived
from foot-floor contact patterns obtained from insole-mounted foot switches placed
148

bilaterally at medial and lateral heel, first and fifth metatarsal, and big toe, and confirmed
with the kinematic data that were acquired simultaneously.
Each pass constituted one trial and multiple trials were collected during a session.
The sEMG data were sampled and processed in Matlab R14 (The MathWorks, Inc.,
USA). The sEMG linear envelopes (LEs) during a gait cycle were then divided into
double-support (DS) phase when both the feet were in contact with the ground, and
swing (SW) phase when the foot was not in contact with the ground [6.27]. The sEMG
LE during each trial was normalized by its maximum magnitude during that trial.
The normalized LEs of each muscle were divided into two classes: the class True
was comprised of LEs during double-support phase prior to foot-off and the class False
consisted of the LEs during terminal stance and initial standing. Half of the data were
randomly allocated to training and used to find a characteristic pattern of activation by
ensemble averaging the LEs. The characteristic pattern found for the class True was
cross-correlated with the LEs from the other half of the data (test data) for the classes
True and False. A Receiver Operating Characteristics (ROC) curve showed the
tradeoff between sensitivity (i.e. True Positive rate) and 1 specificity (i.e. False Positive
rate) of the binary classifier [6.24]. A Discriminability Index (DI) was defined as the area
under the ROC curve (AUC) which gave a measure of performance for the binary
classifier [6.25]. The data were randomly partitioned ten times into training and test data-
sets for a 10-fold cross-validation. Therefore, 10 ROC curves for the pattern recognition
classifier were generated by randomly pooling the LEs into training and test data-sets.
The DI was computed for each ROC curve and then averaged to find the mean DI and
standard deviation (SD(DI)) for the pattern recognition classifier [6.25]. This identified
149

the muscles yielding the best separation of classes, and hence the primary targets for the
implanted recording electrodes.
The best location for implantation of the intramuscular recording electrode was
estimated based on a similar analysis of the DI from the sEMG acquired from different
locations on the bellies of the target muscles. A matrix of sEMG electrodes was placed to
cover the whole muscle belly, as shown in Figure 6.4. Multiple bipolar sEMG recordings
were made along the length of the muscle. The sEMG data were collected with the same
experimental protocol and analyzed similarly to find the best location on the muscle belly
that had the highest DI. The best location was noted with respect to the anatomical
landmarks for identification during surgery when the subject was under general
anesthesia.
Implantation of intramuscular EMG electrode
The implantation procedure for the iEMG electrode is shown in Figure 6.5. First a
stimulation probe was inserted subcutaneously to the best location that was identified
based on anatomical landmarks, as shown in Figure 6.5a. Stimulation was applied by
clipping a cable to the probe to ensure that the tip of the probe is at the desired site with
viable muscle fibers. A peelable polymer sheath was then inserted on the top of the probe
with the help of the markings such that its tip approximately coincided with the probe tip,
as shown in Figure 6.5b. The probe was then removed and the intramuscular EMG
electrode was inserted in the place of the probe with the help of the lead carrier. The
cannula-like lead carrier held the iEMG electrode lead in place during insertion through
the sheath. The lead carrier was then removed which left the iEMG electrode lead in the
peelable sheath, as shown in Figure 6.5c. The polymer sheath was then gently peeled off
leaving the iEMG electrode at the selected location, as shown in Figure 6.5d.
150

Classifier development for iEMG-triggered FES-assisted stepping
Temporal patterns of pulse-width modulated stimulation for bilateral stepping were
customized for each subject [6.20, and 6.21] in order to achieve forward stepping in a
rolling walker, as shown in Figure 6.6. The stimulation current was fixed at 20 mA and
the stimulation frequency was fixed at 20 Hz (50 ms inter-pulse-interval). Each step
could be triggered either by the depression of a manual switch or with an iEMG-based
classifier to progress through the stimulation pattern.
Two kinds of iEMG-based classifier one based on thresholding and the other
based on a pattern recognition algorithm [6.2] were developed. The left foot-off (i.e., the
intent to initiate left swing) and right foot-off (i.e., the intent to initiate right swing) were
detected sequentially and independently by the classifiers to trigger FES-assisted left and
right steps respectively. The 20 Hz sampling rate for the iEMG signal corresponded with
the stimulation frequency. The sampling period was divided between the two iEMG
channels which were multiplexed in the IST-12 to use the same gain and integration
circuitry. The iEMG from each channel was pre-amplified, rectified, and blanked in the
hardware during the electrical stimulation before being integrated for 10 ms. The iEMG
of the each channel was sampled and integrated for 10ms sequentially one after the other
every 100 ms. The IST-12 therefore telemetered back to the External Control Unit (ECU)
the integrated iEMG of each channel at 10 Hz.
The real-time operation cycle in the IST is illustrated in Figure 6.7. The real-time
cycle of operation was 50 ms (corresponding to the inter-pulse-interval between stimulus
pulses). The iEMG channel (i.e., 1 or 2) to be sampled was set after 4ms into the real-
time cycle with the gain set to zero to minimize switching transients. After 6ms into the
real-time cycle, the gain was then set to an appropriate level such that it did not cause
151

saturation. After 13ms into the real-time cycle, the integrator started integrating the
iEMG for 10ms. The integrated iEMG was read after 23ms into the real-time cycle. After
25ms into the real-time cycle, the iEMG channel gain was reset back to zero so that 12-
channels of stimulation can be applied to the muscles from 28ms onwards. About 10ms
of time was needed at the end of the real-time cycle to update the events and do
housekeeping tasks. The data from each iEMG channel were reconstructed during the
next 50ms time step and held at that value when the other channel was sampled. A 10-
point moving-average smoothing filter was applied to the iEMG signal in the ECU to
reduce random noise.
The threshold-based binary classifier started computing the running mean of the
relevant iEMG signal after waiting a fixed duration (t
wait
) from the start of the stimulation
pattern of a step. The t
wait
was found from the training data. The wait duration was long
enough such that the iEMG activity processed by the classifier represented the unloading
of the contralateral limb in preparation for the swing phase of that side. When the running
mean exceeded a selected threshold (thr
TC
), the stimulation pattern advanced and
stepping of the contralateral limb was triggered. The pattern recognition classifier started
processing the iEMG time history at the same time as the threshold-based classifier
started processing the iEMG level. The pattern recognition classifier cross-correlated a
windowed portion (of length t
win
) of the relevant iEMG signals to detect feature templates
required for triggering the contralateral step. A trigger was then generated when the
cross-correlation coefficient exceeded a discrimination threshold (thr
PRC
). Classifier
parameters such as t
wait
, thr
TC
, t
win
are illustrated in Figure 6.8. The start of the stimulation
is shown to coincide with foot-off in Figure 6.8 to coincide just for illustration purposes,
152

and such timing may not necessarily be true in reality. The foot-off may precede the start
of stimulation pattern for stepping in subjects who have enough volitional strength or
there may be a delay in case of more affected subjects.
Figure 6.8 also shows trig
delay
which is the delay in generating the trigger by the
threshold-based classifier primarily due to the 10-point moving average FIR filter. The
group delay of the 10-point moving average FIR filter is (10-1)/2=4.5 samples long for
each channel of iEMG (i.e. 225 msec for a nominal stimulating and sampling rate of 20
Hz). By definition, it takes 9 samples i.e. 450 msec to reach the unit amplitude after the
unit step is applied to the 10-point moving average filter. These delays were largely
unavoidable due to the processing embedded in the implanted system.
Most of the parameters for the pattern recognition and the threshold-based
classifiers were found from the training data collected with the IST-12 during FES-
assisted switch-triggered walking in the laboratory. Training data collection followed the
same experimental protocol explained earlier in Chapter 4 and shown in Figure 6.3. The
iEMG patterns during walking were normalized by the average of the baseline iEMG
data collected during three seconds standing. The iEMG patterns during steps taken while
walking constituted the class True and the iEMG patterns during initial standing and
terminal step constituted the class False of the binary classifier for that side. All the
iEMG patterns in both the classes were time normalized such that they each contained 50
data points. This allowed comparison of the iEMG patterns and iEMG levels at different
time points to be selected for classification by the Discriminability Index (DI).
All patterns were randomly partitioned 10 times into training and test data-sets for a
10-fold cross-validation. The data sets were used to generate separate ROC curves for
153

each of the classifiers. Ten ROC curves for each point in the gait cycle were generated
for the threshold-based classifier by randomly pooling data from different iEMG patterns
in the training and test data-sets. The pattern recognition classifier works with a pattern of
iEMG activity. Therefore, 10 ROC curves for each phase of the gait cycle, such as left
and right swing (SW) and double support (DS), were generated from the same training
and test data-sets as used to quantify the performance of the threshold-based classifier.
The DI was computed from each ROC curve and then averaged to find the mean DI and
standard deviation [6.25]. The classification region was defined as the largest set of
contiguous data points with a high (>0.65) mean DI where the decision has to be made
whether to trigger the FES-assisted contralateral step or not. The classification regions
were identified from the results from the threshold-based classifier and used to define the
wait time (t
wait
), which was equal to the elapsed time from the start of the FES-assisted
step until the beginning of the classification region.
For the pattern recognition classifier, the iEMG patterns from the class True in
the classification region were ensemble averaged and served as the feature for
classification. One feature served as the template for one muscle for identifying left foot-
off and another feature served as the template for another muscle for right foot-off. The
window-size parameter t
win
was equal to the average duration of that classification region
for all the steps in the training data. The feature was cross-correlated with all the iEMG
patterns in the class True and the average cross-correlation coefficient served as the
thr
PRC
. The parameter thr
TC
was equal to the average running mean of the iEMG signal
over the classification region for all the iEMG patterns in the class True.
154

The pattern recognition and threshold-based classifiers were tested separately during
online operation in the gait laboratory, as explained in the following section.
Online testing of the classifier in the laboratory
The two classifiers were developed as separate models in the Simulink (The
MathWorks, Inc., USA) and compiled via C-code to run standalone in the portable ECU
that also executed the control algorithm to deliver pre-programmed stimulation patterns
to the muscles via the IST-12. The IST-12 telemetered back the iEMG signal that was
used by the classifier to trigger the stimulation pulses for the subsequent steps.
The standalone FES controller occasionally experienced overrun errors which
occurred when the ECU couldnt finish all the required tasks in the 50ms time window
for real-time operation. The stack size for the FES controller running in ECU was set at
4096 which was the space needed for the arguments, the stack variables, and all the
variables. The computational demand of the classification algorithm alone was
investigated with a Matlab (The MathWorks, Inc., USA) utility called XPCBENCH.
The Simulink model for the classification algorithm consisting only of the pattern
recognition or the threshold-based components was made to run in a PC environment
with synthesized EMG signals as the inputs and a binary output as the trigger signal. The
pattern recognition algorithm mostly experienced overrun error and was simplified from
the one published earlier [6.2] such that only one feature was cross-correlated with iEMG
from one muscle for classification. The minimum achievable sample time for running
only the simplified pattern recognition classifier model (i.e., no FES stimulation) was
3800 s on an Intel 486DX 40 MHz. The 50ms real-time window was sufficient for
running the pattern recognition classification algorithm in isolation. The overrun error
155

issue during online operation even with the simplified pattern recognition classifier was
possibly due to the hardware events which were required to integrate the iEMG signal
with implanted stimulation (like changing the stimulus, the iEMG gain, the iEMG
channel, etc), which took up most of the cycle time. Figure 6.7 shows the hardware
events taking place in the 50 ms sampling window, which provided only about 9 ms of
free cycle time prior to the initiation of the next cycle, which was probably insufficient
for robust operation under all conditions.
The stimulation pattern for the first step was triggered with a manual switch. The
classifier started scanning the iEMG after waiting t
wait
duration from the start of
stimulation pattern of that step to detect the intent to initiate stepping with the
contralateral limb. For safety, the classifier was allowed to trigger the stimulation pattern
for stepping of the contralateral limb within 1 sec after entering the double support phase.
If the user was unable to trigger the stimulation pattern with iEMG (i.e., a false
negative) within 1 sec after entering the double support phase then the manual switch
could be used as a trigger, and the classifier then resumed processing the iEMG to
determine the intent to trigger subsequent steps. When the user was unable to stop with
the classifier (i.e., false positive) then a manual switch could be used to stop the
classifier from triggering subsequent steps.
Subject iSCI-2 evaluated walking and stopping with both the classifiers while the
true positive (1-false negative) and false positive rates were recorded as measures of
performance. The subject walked with the iEMG triggered FES assisted stepping on a
straight walkway across the gait laboratory. The iEMG classifier was started with a
manual switch during standing to trigger the first step. After that the iEMG triggered the
156

steps during ambulation across approximately 8m before stopping with the iEMG
classifier. The delay (trig
delay
) in triggering the FES-assisted step from the instant the
desired muscle activity was detected was also recorded to further compare the technical
performance of the classifiers. The pattern recognition and the threshold-based classifiers
were presented in a random order during two days of evaluation. Total eight trials (39 left
steps and 39 right steps) for the threshold-based classifier and nine trials for the pattern
recognition classifier (45 left steps and 42 right steps) were captured.
After each trial, the subjective assessments of perceived ease of use of each
classifier during FES-assisted stepping in real-time were evaluated with Usability Rating
Scale (URS) [6.29]. The URS, depicted in Figure 6.10 is a 7 point scale developed to
determine differences in the perceived ease of use. After each walking trial, the subject
was asked to rate the EMG-triggered system as Difficult, Moderate or Easy to use.
After selecting one of those three choices, the subject was asked to refine his selection as
Very, Moderately or Barely. Each final subjective rating was assigned a numerical
value from -3 (very difficult) to +3 (very easy). Each walking trial was evaluated
independently so the subject only rated his most recent walking experience and was not
required to compare his current perception to a prior walking trial.
Results
Muscles and location selection for intramuscular EMG
The left medial gastrocnemius (MG) and the right erector spinae (ES) were selected
as the command sources for iSCI-1. The best location for intramuscular EMG was
estimated based on the DI from the surface EMG from the left MG and right ES of iSCI-
1, which are shown with color scale in Figure 6.11a. The best location on left MG was 6
cm medial and 18 cm distal from the popliteal crease line. The best location found on
157

right ES was 2.75 cm lateral to the spinous process of L2 and 2 cm superior to the L2
level. The right MG and left MG were selected as the command sources for iSCI-2. The
best location for intramuscular EMG that was estimated based on the DI from the surface
EMG from the left MG and right MG of iSCI-2 are shown with color scale in Figure
6.11b. The best location found on the left and right MG was 6 cm medial and 13 cm
distal from the popliteal crease line.
Classifier development and online performance
The iEMG was collected and processed to determine the parameters for each
classifier. The iEMG pattern during walking was divided into swing phase (SW) and
double support (DS) phases of gait based on the foot-floor contact patterns obtained from
the foot switches. Figure 6.12a and Figure 6.12b show the Discriminability Index (DI) at
each time normalized data point from the ROCs obtained with the threshold-based
classifier during the gait cycle that was used to identify the classification region. Figure
6.12a shows that the iEMG pattern of the left medial gastrocnemius had DI close to 0.5 at
the end of left SW phase, a DI close to 0.8 at the end of left DS phase, a DI close to 0.95
at the end of right SW phase, and a DI close to 1 which means very good discriminability
during the right DS phase. Figure 6.12b shows that the iEMG pattern of right ES had low
DI at the end of the left SW phase of gait which was close to 0.5, a poor discriminability
with DI less than 0.5 during left DS, a good discriminability with DI close to 1 during
right SW and again a good discriminability with DI close to 0.9 during right DS.
The gait phases of interest for the classifier are the left and right DS phases, which
should be a subset of the classification region when the decision has to be made to trigger
the FES-assisted SW phase of the contralateral limb. For the right ES, left DS was not
good for classification since the DI was less than 0.5. Figure 6.12b shows that the right
158

ES had a classification region that started at data point 25 in the right swing phase (SW)
and covered the whole right double support phase (DS) of the gait.
The iEMG training data were collected in absence of right ES stimulation;
however the electrical stimulation of the right ES during FES-assisted walking created
inhibition of the iEMG from right ES during the right SW that is shown in Figure 6.13.
Taylor and Chappel have shown that the ratio of the volitional EMG with the intended
effort changes with the intensity of the stimulation and the time since the stimulation
pulse as in this case when the EMG from the same muscle is the control signal for
stimulation [6.18]. Because of this inhibitory action of the stimulation on the iEMG from
the same muscle during right SW (right ES was only stimulated during right SW), the
classification region was started after the end of electrical stimulation to assist right ES
i.e., at the data point 1 in the right DS. right ES was used by the classifier to trigger the
left step in this classification region which started at 1.8 seconds into the right step and
was 0.8 seconds long, as found from the foot switch data. The right step determined from
the foot switch data started on an average 0.2 seconds before the start of its stimulation
pattern so t
wait
=1.6 seconds and t
win
=0.6 seconds for the left step classifier. The thr
TC
in
the classification region was about 1.1 times the baseline level of the iEMG during quiet
standing.
Since right ES was found suitable only to trigger the left step, left MG was selected
to trigger the right step. The classification region started at data point 2 in the left DS and
covered the whole left DS of the gait. left MG was used to trigger the right step during
this classification region which started 1.45 seconds after the start of the left step and was
0.9 seconds long, as found from the foot switch data. The left step found from the foot
159

switch data started 0.15 seconds before the start of the stimulation pattern so t
wait
=1.3
seconds and t
win
=0.75 seconds for the right step classifier. The thr
TC
during the
classification region was equal to 0.45 times the baseline level of iEMG during quiet
standing. The pattern recognition classifier used a monotonically increasing feature
[0.2418 0.3406 0.3984 0.5056 0.5231] with a cross-correlation threshold,
thr
PRC
=0.6. The monotonically increasing nature of the feature is necessary since the
iEMG pattern in that case will cross the threshold only once in the classification region.
The subject iSCI-1 is currently using the iEMG classifier in the laboratory during his
rehabilitation phase. No performance data have been collected yet for the subject iSCI-1
since he is currently learning to use the iEMG-based FES system.
Figure 6.14a and Figure 6.14b show the Discriminability Index (DI) at each time
normalized data point during the gait cycle that was used to identify the classification
region of iSCI-2. The Figure 6.14a shows that the iEMG pattern of right MG had
moderate DI at the end of the left SW phase of gait (~0.8), a good DI (~0.8) as the
beginning of left DS and a poor DI at the end (~0.5), a poor discriminability with DI
close to 0.5 during right SW and a poor discriminability during the right DS phase with
DI close to 0.6. The Figure 6.14b shows a moderate DI at the start which deteriorated to a
low DI by the end of left SW phase of gait (~0.5), a low DI close to 0.5 during left DS, a
moderate discriminability with DI close to 0.7 at the end of right SW, a moderate
discriminability during the right DS phase with DI close to 0.7.
Figure 6.14a shows that the right MG had a classification region starting at data
point 35 in the left SW and extended till data point 2 in the left DS of the gait. right MG
was used by the classifier to trigger the right step during this classification region which
160

started at 1.5 seconds into the left step and was 0.85 seconds long, as found from the foot
switch data. The left step found from the foot switch data started 0.3 seconds before the
start of its stimulation pattern so t
wait
=1.2 seconds and t
win
=0.55 seconds for the right step
classifier. The thr
TC
was equal to 1 times the baseline magnitude of iEMG during quiet
standing. The pattern recognition classifier used a monotonically increasing feature
[1.0436 1.0651 1.0900 1.1423 1.2358] with a cross-correlation threshold,
thr
PRC
=0.65.
Figure 6.14b shows that the left MG had a classification region starting at data
point 30 in the right SW and extended till the end of the right DS of the gait. left MG was
used by the classifier to trigger the left step in this classification region which started at
1.55 seconds into the right step and was 0.85 seconds long, as found from the foot switch
data. The right step determined from the foot switch data started 0.5 seconds before the
start of the stimulation pattern so t
wait
=1.05 seconds and t
win
=0.35 seconds for the left step
classifier. The thr
TC
was equal to 1.1 times the baseline magnitude of iEMG during quiet
standing. The pattern recognition classifier used a monotonically increasing feature
[0.9480 0.9876 1.0415 1.1109 1.1991] with cross-correlation threshold,
thr
PRC
=0.65.
Both the the pattern recognition and the threshold-based classifier incurred similar
delays (trig
delay
) in triggering the FES-assisted step. The elapsed time from the instant of
the desired muscle activity to initiation of stimulation was 0.53 0.12 seconds. Table 6.1
shows the performance of the threshold-based classifier for iSCI-2. The threshold-based
classifier for triggering the right step had a false positive rate of 38.4% and a true positive
rate of 61.6%. The threshold-based classifier for triggering the left step had a false
161

positive rate of 33.3% and a true positive rate of 87.2%. Table 6.2 shows the performance
of the pattern recognition classifier for iSCI-2. The pattern recognition classifier for
triggering the right step had a false positive rate of 11.9% and a true positive rate of
57.2%. The pattern recognition classifier for triggering the left step had a false positive
rate of 24.4% and a true positive rate of 93.3%. The standard deviation of the false
positives and false negatives from trial-to-trial as seen in Tables 6.1and 6.2 indicated that
the threshold-based classifier was more sensitive to natural variations in the EMG activity
from the left side of iSCI-2 which had more extensive weaknesses.
The average Usability Rating Scale (URS) score was found to be 2 in a 7 point
scale for both the classifiers, indicating that both the classifiers were moderately easy to
use. The subject didnt show any preference for a particular classifier as determined from
URS score after each trial.
The threshold-based classifier was found to be susceptible to false positives while
the pattern recognition classifier was found to be susceptible to false negatives. Therefore
after testing each classifier separately in the gait laboratory, the final implementation in
the ECU for use by the subject had the two classifiers integrated in to a two-stage
classifier to reduce the overall false positives, as illustrated in Figure 6.9. Moreover, it
was found during the testing that the classification threshold (thr
TC
) for the threshold-
based subsystem was sensitive to natural variation in the EMG activity over time.
Therefore a provision was made in the final implementation in ECU to retrain only the
classification threshold (thr
TC
) for the threshold-based subsystem which could be adjusted
during online operation using binary search. In the two-stage implementation, the
threshold-based subsystem served as the primary classifier while the pattern recognition
162

subsystem could be turned on or off for a given subject as needed. False positives (i.e.,
unintended initiations of swing) were considered to be more disruptive and potentially
unsafe during walking than false negatives (i.e. failure to initiate an intended swing)
because of the risk of falling during unanticipated unloading of one of the limbs during
double support. The iEMG-based two-stage classifier triggered the stimulation pattern of
the contralateral step when both the threshold-based and pattern recognition subsystems
agreed on initiating swing. The two-stage classifier was computationally more
demanding and so worsened the failure rate of the ECU hardware.
Discussion
This work presented a method for selecting command sources for iEMG-triggered
FES-assisted ambulation, and evaluated two kinds of classifiers based on either the
pattern recognition or simple thresholding during online operation under laboratory
conditions. Two muscles and the location for implantation of intramuscular EMG
electrode in those two muscles determined prior to implantation, and two kinds of iEMG-
based classifiers were implemented in the external control unit (ECU) that works with the
current family of ISTs.
The two classifiers were made computationally simple to work with the limited
resources available with the portable ECU based on Motorola HC12 16-bit family of
microcontrollers. Only 10 ms of integrated iEMG data sampled every 100 ms from each
iEMG channel was available to the classifiers. In order to limit the computational load on
the ECU that was causing overrun errors when the ECU was not able to finish all the
computations in the allocated 50ms real-time cycle time, the pattern recognition classifier
used only one feature template to identify the iEMG pattern as compared to three that
were presented in our prior work in Chapter 4 [6.2]. The iEMG-triggered FES-assisted
163

ambulation with both the classifiers was evaluated in the laboratory during the
rehabilitation phase of the subject.
The inhibition of the iEMG due to electrical stimulation of the same muscle was
observed with right erector spinae of the subject iSCI-1 (Figure 6.13). The electrical
stimulation of the same muscle inhibited the EMG activity in the right erector spinae
muscle. This has previously been observed by other researchers as well [6.18]. Therefore
the electrical stimulation of the same muscle during EMG recording was avoided in this
study.
The performance of the threshold-based classifier that was based on the iEMG from
the left side with more extensive weaknesses of the subject iSCI-2 varied from trial-to-
trial. This variation was due to the sensitivity of the threshold-based classifier to spasms
and other natural variation of EMG activity like fatigue. In the final implementation of
the classifier as a two-stage system with a threshold-based and a pattern recognition
subsystems, the threshold of the threshold-based subsystem (thr
TC
) was made adaptive by
updating it during operation (online training) with a binary-search using the iEMG levels
related to false positives and false negatives, thus having it learn to accommodate for
fatigue or other day-to-day time varying factors. In view of the online training that was
needed during real-time operation of the classifiers, the extensiveness of the offline
training to find the threshold (thr
TC
) and other parameters could be reduced significantly.
The two-stage classifier (Figure 6.9) was computationally more demanding and so
worsened the failure rate of the ECU hardware.
The processing power of the ECU limited the performance since the amount of
computations required for pattern recognition algorithm that was developed in prior work
164

presented in Chapter 4 could not be implemented [6.2]. The pattern recognition algorithm
presented in this study was based on pattern matching of the iEMG activity with just one
feature as compared to three in the prior work. Moreover, a sampling frequency of only
10 Hz was possible with IST as compared to 2400 Hz in an xPC Target (The Mathworks,
Inc., USA) that was presented in the prior work which reduced the SNR of the iEMG
signal. Most of the time in the 50ms real-time cycle was taken up by the hardware events.
The classifier algorithm had limited time to process the iEMG data which caused
frequent overrun errors, especially with the two-stage classifier. A faster processing unit
will decrease the processing time for a more complex classifier algorithm like the one
presented in Chapter 4 and should help in eliminating overrun errors.
The processing power needed by the FES-controller algorithm can be provided by
implementing the controller on a more powerful but compact PC/104 (size 3.6 by 3.8
inches) single board computer (SBC) running xPC target (The MathWorks, Inc., USA)
[6.31]. The xPC target SBC can serve as the main processor for implementing the
classifier and other software control algorithms while ECU can handle the RF power and
command link with the IST for stimulus control, stimulus current regulation, iEMG data
control, stimulus blanking control, and system control. The compact PC/104 SBC can be
made to fit inside the enclosure of ECU and the PC/104 architecture supports self
stacking of different modules like data acquisition board that can provide extra analog
and digital input/output channels for interfacing with more sensors.
The quality of the iEMG signal can be significantly affected by the location of the
intramuscular electrode in the partially paralyzed muscle. The optimal set of command
sources and motor targets was determined only from the superficial muscles accessible
165

from the skins surface. It was challenging to find the optimal location for implanting the
intramuscular electrode in a partially paralyzed muscle based on EMG recordings from
the surface of the skin. Deeper muscles can be accessed with intramuscular stimulating or
recording electrodes temporarily implanted for acute testing. Advanced source
localization techniques can be applied to multi-electrode surface EMG recordings to
determine an optimal command sources. It was not possible to record from the muscle
during implantation of the iEMG electrode since the subject was under general anesthesia
so the best location had to be found before the surgery.
Conclusions
This study presented a selection criterion to identify the command sources for an
iEMG-based classifier to trigger FES-assisted gait. The selection is based on surface
EMG recordings from multiple muscles that are associated with ambulation to identify
two best muscles to trigger FES-assisted left and right step. The location for implanting
the intramuscular electrode in those two muscles were also found using the same
selection criteria that was then applied on multi-electrode surface EMG recordings from
the muscle belly.
The feasibility of a simplified threshold-based classifier and a pattern recognition
classifier based on iEMG for triggering FES-assisted steps was demonstrated during real-
time operation in one subject. The pattern recognition classifier generally outperformed
the threshold-based classifier, particularly with respect to minimizing false triggers.
Subject showed no preference for either the threshold- or pattern-recognition based
classifier as determined by the Usability Rating Scale (URS) score collected after each
trial.
166

The performance of the threshold-based classifier was sensitive to day-to-day
variability in the iEMG from the side with more extensive weakness. In the final
implementation of the classifier as a two-stage system with a threshold-based and a
pattern recognition subsystem, a provision was made to retrain the threshold of the
threshold-based subsystem with binary search during online operation.
The pattern recognition classifier algorithm was simplified significantly to run with
the limited processing power available in ECU. This significantly deteriorated the
performance when compared to the results presented in Chapter 4. The reliability of the
final implementation of the classifier as a two-stage adaptive system was compromised
because of hardware instability due to limited computational power.
More research needs to be done in evaluating the optimality of the implantation site
for the intramuscular EMG electrode found from non-invasive surface EMG recordings
from the muscle belly. The location of the implantation site is critical in order to record
good iEMG from a partially paralyzed muscle. Additional sensors should also be
explored in conjunction to two channels of iEMG to reduce false positives and negatives
of the classifier.
References
6.1. R. Kobetic, R. J. Triolo, J. P. Uhlir, C. Bieri, M. Wibowo, G. Polando, E. B.
Marsolais, J. A. Davis Jr., K. A. Ferguson, and M. Sharma, Implanted Functional
Electrical Stimulation System for Mobility in Paraplegia: A Follow-Up Case
Report, IEEE Trans. Rehabil. Eng., vol. 7, no. 4, Dec. 1999, pp. 390398.
6.2. A. Dutta, R. Kobetic, and R. Triolo, Ambulation after incomplete spinal cord
injury with EMG-triggered Functional Electrical Stimulation, IEEE Transactions
on Biomedical Engineering, 55:2, February 2008.
6.3. B. Smith, Z. Tang, M.W. Johnson, S. Pourmehdi, M.M. Gazdik, J.R. Buckett, and
P.H. Peckham , An externally powered, multichannel, implantable stimulator-
telemeter for control of paralyzed muscle, IEEE Trans Biomed Eng., vol. 45, no.
4, 1998, pp. 463-475.
167

6.4. N. Bhadra, K.L. Kilgore, and P.H. Peckham, Implanted stimulators for
restoration of function in spinal cord injury, Med. Eng. Phys., vol. 23, 2001, pp.
19-28.
6.5. I. P. Pappas, M. R. Popovic, T. Keller, V. Dietz, and M. Morari, A reliable gait
phase detection system, IEEE Trans. Neural Syst. Rehabil. Eng., vol. 9, no. 2,
Jun. 2001, pp. 113-125.
6.6. A. Mansfield, and G. M. Lyons, The use of accelerometry to detect heel contact
events for use as a sensor in FES assisted walking, Med. Eng. Phys., vol. 25, no.
10, Dec. 2003, pp. 879-885.
6.7. T. Sinkjaer, M. Haugland, A. Inman, M. Hansen, and K. D. Nielsen,
Biopotentials as command and feedback signals in functional electrical
stimulation systems, Med. Eng. Phys., vol 25, no. 1, Jan. 2003, pp. 29-40.
6.8. R. T. Lauer, R. T. Smith, and R. R. Betz, Application of a neuro-fuzzy network
for gait event detection using electromyography in the child with cerebral palsy,
IEEE Trans. Rehabil. Eng., vol. 52, no. 9, Sep. 2005, pp. 15321540.
6.9. D. Graupe, K. H. Kohn, S. Basseas, and E. Naccarato, Patient controlled
electrical stimulation via EMG signature discrimination for providing certain
paraplegics with primitive walking functions, J. Biomed. Eng., vol. 5, 1983, pp.
220-226.
6.10. R. J. Triolo, and G. D. Moskowitz, The theoretical development of a
multichannel time-series myoprocessor for simultaneous limb function detection
and muscle force estimation, IEEE Trans. Biomed Eng., vol. 36, no. 10, Oct.
1989, pp. 1004-1017.
6.11. D. Graupe, EMG pattern analysis for patient-responsive control of FES in
paraplegics for walker-supported walking, IEEE Trans. Biomed. Eng., vol. 36,
no. 7, July 1989, pp. 711-719.
6.12. D. Graupe, and H. Kordylewski, Artificial neural network control of FES in
paraplegics for patient responsive ambulation, IEEE Trans. Biomed Eng., vol.
42, no. 7, Jul. 1995, pp. 699-707.
6.13. H. Kordylewski, and D. Graupe, Control of Neuromuscular Stimulation for
Ambulation by Complete Paraplegics via Artificial Neural Networks, Neurol.
Research, vol. 23, July 2001, pp.472-481.
6.14. A. Dutta, R. Kobetic, and R. J. Triolo, EMG based triggering and modulation of
stimulation patterns for FES assisted ambulation a conceptual study, presented
at XXth Congress of the International Society of Biomechanics, Cleveland, OH,
Aug. 2005.
168

6.15. A. Dutta, and R. J. Triolo, Volitional surface EMG based control of FES-assisted
gait after incomplete spinal cord injury a single case feasibility study,
presented at NIH Neural Interfaces Workshop, Bethesda, MD, Sep. 2005.
6.16. R. Thorsen, R. Spadone, and M. Ferrarin, A pilot study of myoelectrically
controlled FES of upper extremity, IEEE Trans. Rehabil. Eng., vol. 9, no. 2, June
2001, pp. 161167.
6.17. R.Futami, K.Seki, T.Kawanishi, T.Sugiyama, I.Cikajlo, and Y.Handa,
Application of local EMG-driven FES to incompletely paralyzed lower
extremities, presented at 10th Annual Conference of the International FES
Society, Montreal, Canada, July 2005.
6.18. P. N. Taylor, and P. H. Chappell, Variation in system gain when using voluntary
EMG to control electrical stimulation of the same muscle, presented at 9th
Annual Conference of the International FES Society, Bournemouth, U.K., 2004.
6.19. R. Kobetic, R. J. Triolo, G. Pinnault, L. Murray, M. Corado-Ahmed, E. Hardin, J.
Sakai, S. Nogan, M. Marsolais, and C. Ho, Facilitating Ambulation after
Incomplete Spinal Cord Injury with Implanted FES System, presented at 10th
Annual Conference of the International FES Society, Montreal, Canada, July
2005.
6.20. R. Kobetic, and E.B. Marsolais, Synthesis of paraplegic gait with multichannel
functional neuromuscular stimulation, IEEE Trans Rehab Eng., vol. 2, no. 2,
1994, pp. 66-79.
6.21. R. Kobetic, R. J. Triolo, and E. B. Marsolais, Muscle selection and walking
performance of multichannel FES systems for ambulation in paraplegia, IEEE
Trans. Rehabil. Eng., vol. 5, no. 1, Mar. 1997, pp. 2329.
6.22. H. J. Hermens, B. Freriks, R. Merletti, D. Stegeman, J. Blok, G. Rau, C.
Disselhorst-Klug, and G. Hagg, SENIAM 8 European Recommendations for
Surface ElectroMyoGraphy. Enschede, Netherlands: Roessingh Research and
Development, 1999.
6.23. A. E. Hines, P. E. Crago, G. J. Chapman, and C. Billian, Stimulus artifact
removal in EMG from muscles adjacent to stimulated muscles, J. Neurosci.
Methods, vol. 64, no. 1, Jan. 1996, pp. 55-62.
6.24. T. D. Dickens, Elementary Signal Detection Theory. US: Oxford University
Press, 2001, pp. 66, 121.
6.25. A. P. Bradley, "The use of the area under the ROC curve in the evaluation of
machine learning algorithms," Pattern Recognition, vol. 30, no. 7, 1997, pp.
1145-1159.
169

6.26. I. T. Jolliffe, Principal Component Analysis, New York: Springer, 1986, pp. 44-
48, 269-296.
6.27. D. A. Winter, Biomechanics and Motor Control of Human Gait: Normal, Elderly
and Pathological, Waterloo Biomechanics, 1991, ch.1.
6.28. E. Hardin, R. Kobetic, L. Murray, M. Corado-Ahmed, G. Pinnault, J. Sakai, S.
Nogan, C. Ho, and R. Triolo, Ambulation after incomplete spinal cord injury
with an implanted FES system: a case report, Jour. Rehabil. Res. Dev., vol. 44,
no. 3, 2007, pp. 333-346.
6.29. E. Steinfeld, G. Danford, Eds. Enabling Environments: Measuring the Impact of
Environment on Disability and Rehabilitation. Kluwer/Plenum, 1999.
6.30. J. M. Jasiewicz, J. H. J. Allum, J. W. Middleton, A. Barriskill, P. Condie, B.
Purcell, and R. C. T. Li, Gait event detection using linear accelerometers or
angular velocity transducers in able-bodied and spinal-cord injured individuals.
Gait and Posture, vol 24, no. 4, 2006, pp. 502-509.
6.31. http://www.pc104.org/pc104_specs.php
170

Figures


Figure 6.1: Experimental setup for data collection during FES-assisted walking with the
block-diagram for the FES system (ECU: external control unit, LE: linear
envelope).

171






a
b

Figure 6.2: Processing of the sampled surface EMG a) rectified and reconstructed sEMG
signal b) linear envelope found from processed sEMG signal.

172




Figure 6.3: Experimental protocol for the collection of EMG data during over-ground
walking in the laboratory.

173







L2 level
T9 level
crease line
Figure 6.4: Examples of the multi-electrode matrix for simultaneous collection of the
surface EMG from multiple locations on the muscle belly.

174



a b

c d
Figure 6.5: The steps during the implantation of intramuscular EMG electrode a)
insertion of probe, b) deployment of peelable sheath over probe, c) insertion
of the iEMG electrode through the peelable sheath, d) peeling off of the
polymer sheath leaving the iEMG electrode in place.
175




Figure 6.6: Pulse-width map of iSCI-1 i.e., the stimulation patterns with time as x-axis
and pulse-width in s as the y-axis that was used for FES-assisted walking
(Implanted muscles LIL: left iliopsoas, LES: left erector spinae, LGM: left
gluteus maximus, LQU: left vastus intermedius/lateralis, RIL: right iliopsoas,
RTFL: right tensor fasciae latae, RTA: right tibialis anterior, RES: right
erector spinae, RGM: right gluteus maximus, RQU: right vastus
intermedius/lateralis, RHS: right hamstring, RPA: posterior portion of the
right adductor magnus).
176



Figure 6.7: The real-time cycle in IST-12 with 50 ms time period for stimulation
frequency of 20 Hz.

177




Figure 6.8: Parameters for the iEMG classifier computed from the training data that was
collected with the switch-triggered FES system.

178



Figure 6.9: The flow chart of the iEMG-based two-stage classifier for triggering FES for
walking.
179


Figure 6.10: Usability Rating Scale to find the user perspective on ease/difficulty of using
the classifier [6.29].


180


a

b
Figure 6.11: Best location found from the surface EMG for implanting intramuscular
EMG electrodes a) left gastrocnemius and right erector spinae b) left and right
gastrocnemius.
181


a) left MG

b) right ES

Figure 6.12: a) Discriminability Index (DI) of left medial gastrocnemius (MG) for the
swing phase (SW) and double support phase (DS) during over-ground walking
for the subject iSCI-1 at each data point of the gait cycle b) Discriminability
Index (DI) of right erector spinae (ES) for the swing phase (SW) and double
support phase (DS) during over-ground walking for the subject iSCI-1 at each
data point of the gait cycle. [Shaded portion is the classification region used
by the classifiers]
182



Figure 6.13: Inhibition of iEMG from right erector spinae during right swing phase (SW)
as shown in the left panel due to electrical stimulation (shaded portion) of the
same muscle when compared to that in absence of electrical stimulation
shown in the right panel of the subject iSCI-1.
183


a) right MG


b) left MG


Figure 6.14b: a) Discriminability Index (DI) of right medial gastrocnemius (MG) for the
swing phase (SW) and double support phase (DS) during over-ground walking
for the subject iSCI-2 at each data point of the gait cycle b) Discriminability
Index (DI) of left medial gastrocnemius (MG) for the swing phase (SW) and
double support phase (DS) during over-ground walking for the subject iSCI-2
at each data point of the gait cycle. [Shaded portion is the classification region
used by the classifiers]


184

Tables

Trial
#
# left
steps
# right
steps
False
Negative
(FN)
right Side
False
Negative
(FN)
left Side
False
Positive
(FP)
right
Side
False
Positive
(FP)
left Side
Remarks
1 5 5 1 0 2 0
2 6 5 0 0 3 3
couldn't stop with EMG-
trigger
3 5 4 2 2 2 2
4 5 5 0 0 3 3
couldn't stop with EMG-
trigger
5 4 5 3 0 1 0
6 5 5 5 0 3 3
couldn't stop with EMG-
trigger
7 5 5 1 0 0 1
8 4 5 3 3 1 1
Total 39 39 15 5 15 13
Mean 1.875 0.625 1.875 1.625
SD 1.73 1.19 1.13 1.3

FP &
FN
rates
0.384 0.128 0.384 0.333
Table 6.1: The performance of the threshold-based classifier for iSCI-2.
185



Trial
#
# left
steps
# right
steps
False
Negative
(FN)
right Side
False
Negative
(FN)
left Side
False
Positive
(FP)
right Side
False
Positive
(FP)
left Side
Remarks
1 5 4 1 0 0 1
2 6 5 3 0 0 1
3 5 5 1 0 0 1
4 5 5 0 3 0 1
5 5 4 3 0 0 0
6 5 6 6 0 0 1
7 5 4 1 0 3 3
couldn't stop with EMG-
trigger
8 4 4 1 0 2 2
9 5 5 2 0 0 1
Total 45 42 18 3 5 11
Mean 2 0.33 0.56 1.22
SD 1.8 1 1.13 0.83

FP &
FN
rates
0.428 0.067 0.119 0.244
Table 6.2: The performance of the pattern recognition classifier for iSCI-2.
186


Intel PIII 600MHz 97
Intel PII 400MHz 135
AMD K6-2 400MHz 159
Intel PI 166MHz 567
Intel PI 90MHz 1400
Intel 486DX 40MHz 3800

Table 6.3: The minimum achievable sample time in s for the classifier algorithm in
different hardware that can serve as single board computer.

187

CHAPTER 7
CURRENT CHALLENGES AND RECOMMENDATIONS FOR FUTURE WORK
Introduction
This chapter compiles the challenges presented in the earlier chapters and suggests
a roadmap for future work. Chapter 2 showed that the ability to modulate the surface
electromyogram (EMG) from partially paralyzed muscles in incomplete spinal cord
injured subjects was similar to able-bodied subjects during visual pursuit tasks. Chapter 2
also presented a metric called the Discriminability Index to evaluate the performance of
an EMG-based binary classifier which was used in the following chapters to identify
suitable command sources. Chapter 3 presented a novel pattern recognition classifier that
executed in a PC running xPC-target (The Mathworks, Inc., USA) to trigger FES-assisted
steps for ambulation in laboratory. The feasibility of using surface electromyogram from
two partially paralyzed muscles for triggering Functional Electrical Stimulation during
ambulation with less than 1% false positive rate and more than 80% true positive rate was
demonstrated in Chapter 3. In a case study presented in Chapter 3, the gait parameters
during surface EMG-triggered FES-assisted ambulation were shown to be at least as good
as the switch-triggered ambulation in laboratory setting. The data obtained from the same
case study also showed that the stand-to-walk transition was more normative during
EMG-triggered FES-assisted ambulation than switch-triggered walking, as summarized
in Chapter 5. These results indicated that the EMG-based trigger for FES-assisted
stepping offers several potential advantages over other command inputs such as:
- Reducing the need for manipulating external switches, may especially
benefit individuals with upper extremity motor deficits who have difficulty
in manual triggering stimulation with a switch during walking
188

- Forcing user to synergistically activate the muscles still under voluntary
control involved with walking in conjunction with the FES during
ambulation in order to generate the volitional EMG signals required, which
may have therapeutic benefits and facilitate recovery or motor relearning
- Providing a natural and easy way to modulate walking speed during gait
transitions involving slowing down or speeding up when avoiding obstacles
or maneuvering in complicated environments requiring patterns other than
repetitive cycling through the stimulation pattern
The surface EMG-based FES system was evaluated in a laboratory environment
while it was tethered to a PC containing the data acquisition hardware that was running
the classification algorithm. A portable realization of the EMG-based FES system was
necessary for its use during activities of daily living. Chapter 6 presented a fully
implantable neuroprosthesis with external power source and an implementation of the
EMG-based classifier in an external control unit (UECU). The performance of the
classifier in the UECU was affected by the limited computational resources and the
limited information available in the unblanked portion of the intramuscular EMG
recordings that were telemetered back by the implanted neuroprosthesis. In the following
sections we will discuss the technical challenges to implementing an EMG-controlled
system for assisting ambulation in a real-time portable platform in terms of:
- The required information content in EMG pattern as seen by the pattern
recognition classifier in terms of the number of features, the number of
channels (or muscles), and the duration of unblanked EMG
189

- The computational requirements for signal acquisition and processing in the
portable external control unit
- Selection and evaluation of EMG signal sources (i.e. partially paralyzed
muscles) prior to implantation of recording electrodes as part of the
implantable intramuscular EMG (iEMG)-triggered FES system
- Location and optimization of the implanted iEMG recording electrode during
surgery and transferability of the pre-surgical evaluation of performance of the
iEMG based classifier to the ultimate post-implantation clinical results

Evaluating the information content in EMG
The information content in the EMG as seen by the binary classifier is evaluated
based on the Discriminability Index. Every subject is different in terms of the level of
injury and the corresponding disability which manifests in a high degree of inter-subject
variability. In a single-subject case study, the surface EMG gait data presented in Chapter
2 for subject iSCI-2 was re-analyzed to evaluate the following:
- Discriminability Index versus number of features in the EMG
- Discriminability Index versus number of muscles or channels of EMG
- Discriminability Index versus duration of unblanked EMG included in the
processing bins (i.e., 50ms for 20Hz stimulation frequency)
The data acquisition and processing of the EMG signals was explained in detail in the
Test of Discriminability section of Chapter 2. The implanted FES system (i.e., IRS-8)
delivered electrical pulses at a frequency of 20 Hz, so the sampled EMG was divided into
bins of 50ms duration. In each bin, 30ms following the start of the stimulation pulse was
190

blanked to remove the residual stimulation artifact and M-wave, thus leaving signal
related to voluntary muscle activity. The remaining 20 ms of data in each bin were
detrended, band-pass filtered (5th order zero-lag Butterworth, 20-500 Hz), and rectified.
The blanked portion of the EMG was reconstructed with the average value of the EMG in
the pre- and post- bins [7.2]. This processing was applied to the surface EMG signals
collected from gluteus medius (GM), biceps femoris (BF), medial gastrocnemius (MG),
rectus femoris (RF), tibialis anterior (TA), and erector spinae (ES at T9) during
ambulation with switch-triggered FES assistance. The resulting EMG pattern for each
muscle was then low pass filtered (5
th
order zero-lag Butterworth, frequency
cutoff
=3 Hz) to
extract linear envelope (LE). The LE (or EMG pattern) for each muscle was normalized
by its maximum value during a gait cycle. The resulting data were divided into two
classes: the class True was comprised of LEs (~ 150) during double-support phase prior
to foot-off and the class False consisted of the LEs (~150) during terminal stance and
initial standing.. Half of the data collected were separated into each of the True and
False classes and randomly assigned to training the pattern-recognition classifier while
the other half was assigned to testing. The performance of the EMG classifier based on
the data not included in the training set were then used to find the Discriminability Index
under various conditions as explained in the following sections.
Optimal number of features in the EMG
In this section, the performance of the pattern-recognition classifier explained in
detail in the section entitled Classifier Development and Offline Testing of Chapter 3
was re-evaluated based on the effect of the number of features used for classification on
the Discriminability Index [7.1].
191

In Chapter 3, it was found that the first 4 principal components (or features) of the
EMG patterns in the True class of the training data accounted for more than 90% of the
variance in the data. Loadings found for each LE of EMG represent a point in feature
space defined by the four principal components:
th
,
4
,
1
e.g. for the i Linear Envelope,
(j=1,2,3, and 4) serve as the coordinates of the (i=1,2,3 ... 300)
in the feature space defined by the vectors, (j
,
i j i
j
i i j j
j
loading LE
factor
LE loading factor
=
=

=1,2,3, and 4)

The loadings on the factors after the varimax rotation created separate clusters
of points for the classes in the feature space. The loadings found for each LE of EMG
were normalized by the square-root of the sum of the squared loadings to define a unit
vector from the origin to each point. The mean of all the points in the cluster was
computed for each class and called the centroid of that class. The classifier estimated the
factor loadings for the LE of a candidate EMG from the True class in the test data to
detect the intent to initiate a step. The factor loading was estimated for each feature from
the dot product between the factor (i.e. the feature or principal component) and the mean-
adjusted LE of the candidate EMG. The Euclidean distance between the normalized
loading and the centroid of the True class was used to define the ROC plot. The area
under the ROC plot is the Discrimination Index. We found the Discriminability Index
from the ROC plot for each case where the feature space was defined by features taken 1,
2, 3, or 4 at a time to explore the interactions between feature vector dimension an the
classifier performance.
Figure 7.1 shows an example of the classes True and False, clustered in the
feature space defined by only 3 features from the LE of left and right Erector Spinae.
Figure 7.2a shows the variation of the Discriminability Index of left step classifier and
192

Figure 7.2b shows the variation of the Discriminability Index of right step classifier with
the number of features for all the muscles. It can be observed in the Figure 7.2 that
muscles can be ranked according to their individual Discriminability Index just for the
first feature. left and the right medial gastrocnemius ranked highest for the left and the
right classifier respectively. Figure 7.3a shows the variation of the Discriminability Index
of left step classifier and Figure 7.3b shows the variation of the Discriminability Index of
right step classifier for left and right medial gastrocnemius muscles respectively which
were selected as the command sources. Classifier performance plateaued after the
inclusion of three features, so the processing required to extract and include the fourth
feature would be unnecessary in a real-time system. From this single-subject study it
appears that, if only one signal source (muscle) for each function (left or right step) is
utilized by the classifier, then a maximum of three features would be required to
maximize performance.
The incremental improvement by adding additional features is relatively small,
however. It is clearly evident from Figures 7.2 and 7.3 that for the best target muscles
(i.e., bilateral medial gastrocnemius), the first feature by itself provided a
Discriminability Index > 0.9, which is very good and generally sufficient for accurate
classification. The fully implantable FES system presented in Chapter 6 for the same
subject from whom these data were collected (i.e., iSCI-2 in Chapter 6) used just one
feature of the iEMG from bilateral medial gastrocnemius for classification due to limited
computational resources available in UECU. From the results presented in this section,
reduction of feature space to just one feature might not be the main reason for the much
poorer performance of the real-time implanted system when compared to the results
193

utilizing multiple features from the surface EMG of the same muscles as presented in
Chapter 3.
Optimal number of muscles or channels of EMG
In this section, the performance of the pattern-recognition classifier presented in
Chapter 3 was re-evaluated based on and the effects of the number of muscles or
channels of surface EMG on the Discriminability Index. In Chapter 3, one muscle was
allocated to each classifier such that two channels of surface EMG could trigger FES-
assisted left and right steps. In the last section, it was shown that just one feature can
provide a Discriminability Index > 0.9 and the muscles can be ranked according to their
individual Discriminability Index for that feature. The classifier implemented for this off-
line evaluation used just the first feature from each muscle and clustered the classes,
True and False in the muscle space, instead of feature space as previously described.
The improvement in the Discriminability Index was computed from the ROC plot for the
True and False clusters as the dimension of the muscles space was increased by
adding muscles in the decreasing order of their individual Discriminability Index for the
first feature.
Figure 7.4a and 7.4b show the improvement in the Discriminability Index as a
function of the number of signal sources, or muscles, added to the left step and right step
classifier respectively. A muscle space defined by the left MG, left ES, right RF, and
right BF completely separated the True and False clusters for the left step classifier
with Discriminability Index = 1. Similarly a muscle space defined by the right MG, right
ES, and left RF completely separated the True and False clusters for the right step
classifier with Discriminability Index = 1. These results are from a single case study and
will vary from subject to subject based on the viability of the musculature after
194

incomplete spinal cord injury, making it difficult to generalize. However, it appears that
at least three signal sources for each function (left and right step) would be required to
maximize performance if classification is based on only one feature.
In a separate analysis, the surface EMG patterns from able-bodied subjects during
gait from the lateral gastrocnemius (GL), medial gastrocnemius (GM), peroneus longus
(PL), biceps femoris (BF), rectus femoris (RF), tibialis anterior (TA), gluteus medius
(GD), vastus lateralis (VL), vastus medialis (VM), and adductor longus (AD) were
clustered into four distinctly separate groups or synergies (GL+PL+GM; BF+TA;
GD+RF+VL; AD) based on their cross correlation coefficients as shown by the
dendogram plot in the top panel of Figure 7.5. It is interesting to note that three (i.e.,
medial gastrocnemius, rectus femoris, and biceps femoris) out of the four muscles that
together gave Discriminability Index = 1 for iSCI-2 came from functionally different
groups as shown in the top panel of Figure 7.5. This suggests a generalizability which
needs to be studied in future work. That is, that just one muscle from each of the four
muscle groups is all that is required to maximize classifier performance and insure a
Discriminability Index = 1. The bottom panel of Figure 7.5 shows the three principal
components (or synergies Syn1, Syn2, and Syn3) found from those able-bodied surface
EMG patterns during gait which accounted for more that 90% variance in the data. Figure
7.6 shows that for able-bodied subjects, the gait events such as heel strike, contralateral
foot off, mid stance, contralateral heel strike, ipsilateral foot off, maximum knee flexion,
mid swing are clearly clustered (green dots) in the feature space defined by only first
three muscle groups (principal components or synergies).
195

These analyses suggest that there might be a trade off between the number of
signal sources and the number of features included in the classifier. When only one
feature is extracted, three judiciously selected muscles are required to maximize
discriminability, and when only one signal source is included three features are required
for a similar level of performance.
Effects of EMG sampling window
In this section, the pattern-recognition classifier presented in Chapter 3 was re-
evaluated based on the duration of the unblanked portion of the surface EMG from
bilateral medial gastrocnemius included in each of the 50ms processing bins. The
unblanked duration of the signal was varied in 5ms steps from 0 to 20ms which was the
maximum unblanked data available in the 50ms inter-pulse-interval for 20Hz stimulation
frequency. The unblanked portion of the surface EMG data in each bin was detrended,
band-pass filtered (5th order zero-lag Butterworth, 20-500 Hz), and rectified. The
blanked portion of the EMG was reconstructed with the average value of the EMG in the
pre- and post- bins as previously described [7.2]. Then the whole EMG pattern was low
pass filtered (5
th
order zero-lag Butterworth, frequency
cutoff
=3 Hz) to get the linear
envelope (LE). The processed linear envelopes (LE) for the EMG from each muscle pair
were divided into two classes: the class True was comprised of LEs during double-
support prior to foot-off (150 EMG patterns) and the class False consisted of the LE
during terminal stance (150 EMG patterns). The Discriminability Index from the ROC
plot was computed for the left and right pattern-recognition classifier with just the first
feature of LE.
196

The improvement in the Discriminability Index with the increase in the duration of
unblanked EMG in the 50ms bins is shown in Figure 7.7 for the left (black line) and right
(red line) classifier. In Chapter 6, the pattern recognition classifier worked with 10ms of
iEMG every 100ms. It can be seen in Figure 7.7 that for 5ms of unblanked EMG every
50ms, the Discriminability Index is close to 0.5 which is very poor. This indicated that
the main reason for poorer performance of the real-time pattern recognition classifier
based on the implanted iEMG presented in Chapter 6 relative to the performance of the
surface EMG-based FES system presented in Chapter 3 was smaller amount of data
(10ms of iEMG every 100ms as compared to 20ms of surface EMG every 50ms)
available for classification. Future systems for controlling ambulation with EMG derived
from implanted recording electrodes should be designed to include as much of the signal
as possible, but at least 20ms per stimulation period.
Computational requirements for the external controller
Overload errors presented a major challenge in Chapter 6 because the processing
unit in the communications module of UECU was unable to finish all the required
computations in the 50ms real-time cycle. A more complex pattern recognition algorithm
presented in Chapter 3 executed in real-time in an xPC target PC without any difficulty,
while the communications module in UECU just relayed stimulation parameters to the
implanted pulse generator (IRS-8). A portable PC/104+ or similar single board computer
(SBC) running xPC target could be interfaced with the UECU as shown in Figure 7.8 to
improve available memory and processing speed, thus insuring equivalent performance to
the tethered PC-based laboratory system in future studies [7.3].
Port B (RS-422/RS-485) of the lab isolator for the UECU was used to read the
iEMG data that was telemetered back by the implanted neuroprosthesis (IST-12) [7.4]. A
197

multifunction input/output card for PC/104+ can similarly acquire the iEMG data from
UECU and can also provide extra input/output capabilities like data acquisition from
extra channels of surface EMG. The more powerful processing unit available on PC/104+
SBC would be able to easily classify the acquired iEMG data and relay stimulation
commands to the implant via the communication module in UECU. The small form
factor (3.6 x 3.8 inches) of PC/104+ SBC board would allow it to be packed inside the
UECU enclosure for portability [7.3].
Surface EMG gait data collection for selecting iEMG command sources
In Chapter 3, the EMG data to select the command sources for EMG-triggered FES
system was acquired while the subject walked in the laboratory with a switch-triggered
FES system. A large percentage of individuals with incomplete spinal cord injuries
cannot walk volitionally, necessitating the pre-existence of a preliminary switch-triggered
FES system for the realization of an EMG-triggered system. A driven gait orthosis
(DGO) like the Lokomat (Hocoma AG, Switzerland) could be used to make an
incomplete spinal cord injured subject walk on a treadmill while the volitional EMG
signals are collected for the purposes of selecting the command sources for EMG-
triggered FES system. Lokomat is shown in Figure 7.8 and is fitted with force transducers
to monitor the joint moments generated by the user while walking in the DGO [7.5]. A
force feedback impedance controller can be developed such that the user drives the limbs
and the actuators on the DGO while minimizing the interaction torques between the user
and the Lokomat. This would only assist the user to achieve normative leg trajectories
when necessary and promote increased voluntary activity [7.5]. Target muscles for FES
could also be selected based on the joint torque requirements found from Lokomat to
assist normative leg trajectories with allowed deviations in the sagittal plane.
198

The stimulation parameters for a preliminary surface stimulation system could be
optimized on the Lokomat by minimizing the actuation required by DGO to drive the leg
trajectories. Surface EMG data could be collected while the user drove the DGO in a
cyclic gait pattern. The target command sources would then be selected from those data,
and a surface EMG-based classifier could be developed and its real-time performance to
trigger FES-assisted steps verified on Lokomat prior to overground testing in preparation
for implantation surgery.
Optimizing and verifying the iEMG electrode location prior to surgery
In Chapter 6, the implantation sites for the intramuscular EMG electrodes in the
partially paralyzed targeted muscles were found based on multi-electrode surface EMG
recordings. The multi-electrode grid for surface EMG recording from the belly of the
medial gastrocnemius was rather coarse (2 x 4). A high-density multi-electrode grid for
surface EMG recordings that was developed by Lapatki et al. may provide better spatial
resolution [7.6]. A spatial decomposition algorithm could also be applied to the multi-
electrode surface EMG recordings to find the viable motor units in the partially paralyzed
muscle [7.7].
One disadvantage with surface EMG recordings is that only the superficial muscles
can be accessed. To verify the viability of the ultimate location of an implanted recording
electrode, percutaneous fine-wire EMG electrodes can be implanted prior to surgery and
the iEMG recordings can be verified during DGO assisted walking as described above.
Preferably, the implanted iEMG recording electrodes could be inserted into the target
muscles at their suspected final locations and connected to temporary percutaneous leads.
Poorly functioning recording electrodes could easily be removed and replaced to
optimize performance. Once the performances of the implanted electrodes are verified,
199

the temporary percutaneous leads could be disconnected and removed. The implanted
electrodes could then be re-connected to the implanted neuroprosthesis (IST-12) during
surgery to install the stimulating electrodes for the final fully implanted FES system.
Summary
- In a single case study of iSCI-2, it was found that for the best target muscles (i.e.,
bilateral medial gastrocnemius in this case), just the first feature was enough to get
Discriminability Index > 0.9. When the information from one signal source (target
muscle) was utilized, classifier performance was maximized by including three
features, although the incremental improvement with each additional feature after
the first was marginal.
- In a single case study of iSCI-2, it was found that a muscle space defined by the left
MG, left ES, right RF, and right BF completely separated the True and False
clusters for the left step classifier with Discriminability Index = 1 when only a
single feature was extracted. Similarly a muscle space defined by the right MG,
right ES, and left RF completely separated the True and False clusters for the
right step classifier with Discriminability Index = 1. Three (i.e., gastrocnemius
medial, rectus femoris, and biceps femoris) out of the four muscles that defined the
muscle space that gave a Discriminability Index = 1 for iSCI-2 came from different
muscle synergy groups which were found from able-bodied gait EMG data. This
indicates a generalizability which needs to be studied in future.
- The main reason for poorer performance of the real-time pattern recognition
classifier based on the implanted iEMG presented in Chapter 6 relative to the
surface EMG system described in Chapter 3 was smaller amount of data (10ms of
200

iEMG every 100ms as compared to 20ms of surface EMG every 50ms) available
for classification.
- A driven gait orthosis (DGO) like Lokomat (Hocoma AG, Switzerland) can be used
to help an individual with an incomplete spinal cord injury walk on a treadmill
while the volitional EMG-data are collected for selecting the command sources for
an EMG-triggered FES system.
- A spatial decomposition algorithm can be applied to high density multi-electrode
surface EMG recordings to find the viable motor units in the partially paralyzed
muscle and help optimize location of the implanted recording electrodes, or
electrodes can be connected to temporary percutaneous leads to insure signal
integrity and recording performance prior to implantation of the entire
neuroprosthesis.
- In future, the same EMG-based pattern recognition classifier can be trained to
detect other events like sit-to-stand transition, turning, side stepping, and stair
climbing so that they can also be assisted with EMG-triggered FES.
- The results presented in this document were based on studies done in a gait
laboratory. Future studies with a fully implanted portable EMG-triggered FES
system should also evaluate the impact on walking distance, energy expenditure and
community ambulation.
References
7.1. A. Dutta, R. Kobetic, and R. Triolo, Ambulation after incomplete spinal cord
injury with EMG-triggered Functional Electrical Stimulation, IEEE Transactions
on Biomedical Engineering, vol. 55, no. 2, Feb. 2008.
201

7.2. A. E. Hines, P. E. Crago, G. J. Chapman, and C. Billian, Stimulus artifact removal
in EMG from muscles adjacent to stimulated muscles, J. Neurosci. Methods, vol.
64, no. 1, Jan. 1996, pp. 55-62.
7.3. http://www.pc104.org/pc104_plus_specs.php.
7.4. Stephen Trier, UECU Toolkit Manual, Version 1.9, 2004.
7.5. S. Jezernik, G. Colombo, and M. Morari, Automatic gait-pattern adaptation
algorithms for rehabilitation with a 4-DOF robotic orthosis, IEEE Transactions on
Robotics and Automation, vol. 20, no. 3, June 2004.
7.6. B. G. Lapatki, J. P. van Dijk, I. E. Jonas, M. J. Zwarts, and D. F. Stegeman, A thin,
flexible multielectrode grid for high-density surface EMG, J. Appl. Physiol., vol.
96 2004, pp. 327-336.
7.7. T. Sun, T. Lin, J. Chen, Multielectrode surface EMG for noninvasive estimation of
motor unit size, Muscle & Nerve, vol. 22, no. 8, July 1999, pp. 1063 1070.
202


Figures


Figure 7.1: An example of the classes True and False clustered in the feature space
defined by only three features found from the linear envelope of left Erector
Spinae (shown in left panel) and right Erector Spinae (shown in right panel).

203



a

b

Figure 7.2: a) Discriminability Index for the left step classifier with the ROC plot from a
feature space with 1, 2, 3 or 4 features and based on the surface EMG from
gluteus medius (GM), biceps femoris (BF), medial gastrocnemius (MG),
rectus femoris (RF), tibialis anterior (TA), and erector spinae (ES at T9). b)
Discriminability Index for the right step classifier with the ROC plot from a
feature space with 1, 2, 3 or 4 features and based on the surface EMG from
gluteus medius (GM), biceps femoris (BF), medial gastrocnemius (MG),
rectus femoris (RF), tibialis anterior (TA), and erector spinae (ES at T9).
204



a


b

Figure 7.3: a) Discriminability Index for the left step classifier with the ROC plot from a
feature space with 1, 2, 3 or 4 features and based on the surface EMG from
left medial gastrocnemius (MG). b) Discriminability Index for the right step
classifier with the ROC plot from a feature space with 1, 2, 3 or 4 features and
based on the surface EMG from right medial gastrocnemius (MG).
205



a


b

Figure 7.4: a) Discriminability Index (DI) for the left step classifier versus the number of
muscles added in the increasing order of their individual DI. b)
Discriminability Index (DI) for the right step classifier versus the number of
muscles added in the increasing order of their individual DI.
206


a

b
Figure 7.5: a) Surface EMG patterns during gait from able-bodied subjects from muscles
lateral gastrocnemius (GL), medial gastrocnemius (GM), peroneus longus
(PL), biceps femoris (BF), rectus femoris (RF), tibialis anterior (TA), gluteus
medius (GD), vastus lateralis (VL), vastus medialis (VM), and adductor
longus (AD) are clustered in 4 groups based on their cross correlation
207

coefficients, shown by the dendogram plot. b) Three principal components (or
synergies Syn1, Syn2, and Syn3) found from those surface EMG patterns
which accounted for more that 90% variance in the data.
208



Figure 7.6: For able-bodied subjects, the gait events such as heel strike, contralateral foot
off, mid stance, contralateral heel strike, ipsilateral foot off, maximum knee
flexion, mid swing are clustered (green dots) in the feature space defined by
only first 3 principal components (or synergies).
209


Figure 7.7: Discriminability Index (DI) for the left (black) and right (red) step classifier
versus the duration of unblanked surface EMG from left (for left classifier)
and right (for right classifier) medial gastrocnemius muscle.







210


Figure 7.8: Schematic representation of a PC/104+ single board computer running xPC
target (The Mathworks Inc., USA) interfaced with UECU to supplement its
computational resources.
211


Figure 7.9: Driven gait orthosis (DGO) like Lokomat shown here to control the patients
leg trajectories in sagittal plane during walking [photo taken from 7.5].


212


APPENDIX
The Matlab (.m) graphical user interface (GUI) for EMG-based visual pursuit
study:

function varargout = EMGControl(varargin)
% EMGCONTROL M-file for EMGControl.fig
% EMGCONTROL, by itself, creates a new EMGCONTROL or raises the existing
% singleton*.
%
% H = EMGCONTROL returns the handle to a new EMGCONTROL or the handle to
% the existing singleton*.
%
% EMGCONTROL('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in EMGCONTROL.M with the given input arguments.
%
% EMGCONTROL('Property','Value',...) creates a new EMGCONTROL or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before EMGControl_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to EMGControl_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Last Modified by Anirban Dutta 24-May-2004 13:48:49

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
213

'gui_OpeningFcn', @EMGControl_OpeningFcn, ...
'gui_OutputFcn', @EMGControl_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && isstr(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT



% --- Executes just before EMGControl is made visible.
function EMGControl_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to EMGControl (see VARARGIN)

% Choose default command line output for EMGControl
handles.output = hObject;

% Add analog channels
ai = analoginput('nidaq');
handles.ai=ai; % same the handle
set(handles.ai, 'InputType', 'Differential');
handles.chan=addchannel(handles.ai,[0 1]);
handles.ai.channel.InputRange = [-10 10];

% Update handles structure (SAVE the handles)
guidata(hObject, handles);

% UIWAIT makes EMGControl wait for user response (see UIRESUME)
uiwait(handles.EMGControl);


% --- Outputs from this function are returned to the command line.
function varargout = EMGControl_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes during object creation, after setting all properties.
function ModeList_CreateFcn(hObject, eventdata, handles)
% hObject handle to ModeList (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
% Hints: contents = get(hObject,'String') returns ModeList contents as cell array
% contents{get(hObject,'Value')} returns selected item from ModeList


% --- Executes on button press in StartButton.
214

function StartButton_Callback(hObject, eventdata, handles)
% hObject handle to StartButton (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

global YCont Index

% Get the mode of operation, i.e. Calibration or Control
Mode=get(handles.ModeList,'String');
handles.Mode=Mode{get(handles.ModeList,'Value')};
set(handles.StartButton, 'Enable', 'Off'); %Disable the start button

% Based on mode, decide the action
switch lower(handles.Mode)
case 'calibration (mvc, ch01)'
channel=1;
handles=CalibGUI(handles, channel);
handles.mvc.ch1=handles.data(:,1);
handles.mvc.ch1.maxMag=handles.maxMag;
handles.mvc.ch1.stdMag=handles.stdMag; %Hz
guidata(hObject, handles);
set(handles.StartButton, 'Enable', 'on'); % Enable the Start Button
case 'calibration (mvc, ch02)'
channel=2;
handles=CalibGUI(handles, channel);
handles.mvc.ch2=handles.data(:,2);
handles.mvc.ch2.maxMag=handles.maxMag;
handles.mvc.ch2.stdMag=handles.stdMag; %Hz
guidata(hObject, handles);
set(handles.StartButton, 'Enable', 'on'); % Enable the Start Button
case 'calibration (noise, ch01)'
channel=1;
handles=CalibGUI(handles, channel);
handles.noise.ch1=handles.data(:,1);
handles.noise.ch1.maxMag=handles.maxMag;
handles.noise.ch1.stdMag=handles.stdMag; %Hz
guidata(hObject, handles);
set(handles.StartButton, 'Enable', 'on'); % Enable the Start Button
case 'calibration (noise, ch02)'
channel=2;
handles=CalibGUI(handles, channel);
handles.noise.ch2=handles.data(:,2);
handles.noise.ch2.maxMag=handles.maxMag;
handles.noise.ch2.stdMag=handles.stdMag; %Hz
guidata(hObject, handles);
set(handles.StartButton, 'Enable', 'on'); % Enable the Start Button
case 'control'
set(handles.StartButton, 'Callback',
'EMGControl(''StopButton'',gcbo,[],guidata(gcbo))');
set(handles.StartButton, 'Enable', 'on'); % Enable the Start Button
set(handles.StartButton, 'String', 'Stop'); % Change the text to 'Stop'
set(handles.Capture, 'Enable', 'on'); % Enable the Capture button

handles.hLine=line('Parent', handles.ControlPlot, 'Visible', 'off');
handles.hPlot=rectangle('Parent', handles.ControlPlot, 'Visible', 'off');
handles.hEMG1=line('Parent', handles.EMGPlot, 'Visible', 'off');
handles.hEMG2=line('Parent', handles.EMGPlot, 'Visible', 'off');
Index=1;
YCont(Index)=10^-5;
guidata(hObject, handles);

set(handles.ai,...
'TriggerRepeat', inf,...
'TriggerType', 'Immediate',...
'SampleRate', str2double(get(handles.SampFreq, 'String')),...
'SamplesPerTrigger', floor(str2double(get(handles.SampFreq,
'String'))*str2double(get(handles.Timer, 'String'))),...
'TimerPeriod', str2double(get(handles.Timer, 'String')),...
'Timerfcn', {@ControlGUI, handles});

% log the data in the file00.daq
215

handles.ai.LogFileName='file00.daq';
handles.ai.LogToDiskMode='Index';
handles.ai.LoggingMode='Disk&Memory';

tic
start(handles.ai);
end

% --- Executes during object creation, after setting all properties.
function UpChanBox_CreateFcn(hObject, eventdata, handles)
% hObject handle to UpChanBox (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end

% --- Executes during object creation, after setting all properties.
function DownChanBox_CreateFcn(hObject, eventdata, handles)
% hObject handle to DownChanBox (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


% --- Executes during object creation, after setting all properties.
function Window_CreateFcn(hObject, eventdata, handles)
% hObject handle to Window (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
set(hObject,'String', 256);
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end

% --- Executes during object creation, after setting all properties.
function TrackFreq_CreateFcn(hObject, eventdata, handles)
% hObject handle to TrackFreq (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
set(hObject,'String', 0);
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end

% --- Executes during object creation, after setting all properties.
function SampFreq_CreateFcn(hObject, eventdata, handles)
% hObject handle to SampFreq (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
216

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
set(hObject,'String', 2200);
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end

% This function updates the GUI during calibration
function handles = ControlGUI(obj, event, handles)

global YCont Index YTrack YContFilt

if (get(handles.UpBox,'Value') == get(handles.UpBox,'Min'))
set(handles.Message,'String', 'Select atleast the Up Control or both Up & Down
Controls');
return;
end

handles.data=[];
handles.data=peekdata(obj, obj.SamplesPerTrigger);
Fsamp=obj.SampleRate;
handles.dt = 1/Fsamp;

if (get(handles.UpBox,'Value') == get(handles.UpBox,'Max') ...
&& get(handles.DownBox,'Value') == get(handles.DownBox,'Min')) % if only the Up
channel is used
chanUp=get(handles.UpChanBox, 'Value');
chanDown=0;
eval(['thUp=',get(handles.Threshold,
'String'),'*handles.mvc.ch',int2str(chanUp),'.stdMag;']); % the threshold from the
maximum value of the mvc
thDown=0.5*thUp; %multiplied by 0.5 for hysteresis effect
eval(['thUpNoise=handles.noise.ch',int2str(chanUp),
'.maxMag+2*handles.noise.ch',int2str(chanUp),'.stdMag;']); % the threshold from the
maximum value of the noise
eval(['maxUp=handles.mvc.ch',int2str(chanUp),'.maxMag;']); % MVC
xUp=handles.data(:,chanUp);
set(handles.Message,'String', 'Up Controller Running ....');
elseif (get(handles.UpBox,'Value') == get(handles.UpBox,'Max') ...
&& get(handles.DownBox,'Value') == get(handles.DownBox,'Max')) % if both the
channels are used
chanUp=get(handles.UpChanBox, 'Value');
chanDown=get(handles.DownChanBox, 'Value');
eval(['thUp=',get(handles.Threshold,
'String'),'*handles.mvc.ch',int2str(chanUp),'.stdMag;']);
eval(['thUpNoise=handles.noise.ch',int2str(chanUp),
'.maxMag+2*handles.noise.ch',int2str(chanUp),'.stdMag;']); % the threshold from the
maximum value of the noise
eval(['thDown=',get(handles.Threshold,
'String'),'*handles.mvc.ch',int2str(chanDown),'.stdMag;']);
eval(['thDownNoise=handles.noise.ch',int2str(chanUp),
'.maxMag+2*handles.noise.ch',int2str(chanDown),'.stdMag;']); % the threshold from the
maximum value of the noise
eval(['maxUp=handles.mvc.ch',int2str(chanUp),'.maxMag;']); % Pmax=maximum power at
MVC
eval(['maxDown=handles.mvc.ch',int2str(chanDown),'.maxMag;']); % Pmax=maximum power
at MVC
xUp=handles.data(:,chanUp);
xDown=handles.data(:,chanDown);
set(handles.Message,'String', 'Up and Down Controller Running ....');
else
set(handles.Message,'String', 'Select atleast the Up-Control or both Up and Down
Control');
return;
end

if (maxUp==0)
217

set(handles.Message,'String', 'Stop now, No signal in the Up Channel');
return;
end

xUp = xUp - mean(xUp);

% bandpass butterworth filter the data 20-500 Hz
Wn=[20*2/Fsamp 500*2/Fsamp];
[b,a]=butter(3, Wn);
xUp = filtfilt(b, a, xUp);

absxUp = abs(xUp);

% Integrated EMG signal for Up
%handles.maxMagUp=sum(absxUp);
handles.maxMagUp=mean(absxUp);

if (chanDown>0)

xDown = xDown - mean(xDown);

% bandpass butterworth filter the data 20-500 Hz
Wn=[20*2/Fsamp 500*2/Fsamp];
[b,a]=butter(3, Wn);
xDown = filtfilt(b, a, xDown);

absxDown = abs(xDown);
% the part of the signal belows noise threshold is set to zero
absxDown(absxDown<=thDownNoise)=0;

% Integrated EMG signal for Down
% handles.maxMagDown=sum(absxDown);
handles.maxMagDown=mean(absxDown);
end

set(handles.Message,'String', ['maxPxxUp->', num2str(handles.maxPxxUp),' maxFUp->',
num2str(handles.maxFUp),...
'maxPxxDown->', num2str(handles.maxPxxDown),' maxFDown->',
num2str(handles.maxFDown)]);

TrackSignal=0.7*abs(sin(2*pi*str2double(get(handles.TrackFreq, 'String'))*toc)); %incase
of tracking, get(handles.TrackFreq, 'String')>0

if (chanUp>0 && chanDown>0)
if (handles.maxMagUp/maxUp-handles.maxMagDown/maxDown - YCont(length(YCont)) > thUp)
YCont(Index)=handles.maxMagUp/maxUp-handles.maxMagDown/maxDown;
Index=Index+1;
elseif (handles.maxMagDown/maxDown-handles.maxMagUp/maxUp - YCont(length(YCont)) >
thDown)
YCont(Index)=1-(handles.maxMagDown/maxDown-handles.maxMagUp/maxUp);
Index=Index+1;
end
elseif (chanUp>0 && chanDown==0)

% auto-thresholding, if applicable
if (get(handles.UpBox,'Value') == get(handles.UpBox,'Max'))
if (handles.maxMagUp-YCont(length(YCont)) > 0)
thUp=(exp(handles.maxMagUp/maxUp)-1)*thUp;
elseif (handles.maxMagUp-YCont(length(YCont)) <= 0)
thDown=(exp(handles.maxMagUp/maxUp)-1)*thDown;
end
end

% checking the signal against the threshold
if (handles.maxMagUp>thUpNoise && (handles.maxMagUp-YCont(length(YCont))*maxUp>thUp
|| YCont(length(YCont))*maxUp-handles.maxMagUp>thDown))
YCont(Index)=handles.maxMagUp/maxUp;
else
if Index>1
YCont(Index)=YCont(Index-1);
end
218

end
end
YTrack(Index)=TrackSignal;
Index=Index+1;

guidata(handles.EMGControl, handles);

% moving average smoothing
MAWindow=str2double(get(handles.MAWindow, 'String'));

if length(YCont)>MAWindow
b=ones(MAWindow,1)/MAWindow;
YContFilt = filter(b,1, YCont);
else
YContFilt=YCont;
end

position=[0.0001, 0.0001, 1, abs(YContFilt(length(YContFilt)))];
set(handles.ControlPlot,'xLim', [0, 1], 'yLim', [0, 1.5]);
set(get(handles.ControlPlot,'XLabel'),'String',' ');
set(get(handles.ControlPlot,'YLabel'),'String','Command Level');
set(handles.hPlot,'position', position, 'HandleVisibility', 'off',...
'FaceColor', [0 1 1], 'Visible', 'on', 'EraseMode', 'xor');

set(handles.hLine, 'XData',[0, 1], 'YData', [position(1,2)+TrackSignal,
position(1,2)+TrackSignal],...
'LineStyle', '-', 'LineWidth',5, 'HandleVisibility', 'off',...
'Visible', 'on', 'EraseMode', 'xor', 'Color', 'k');

% the EMG plot implementation
if (chanDown>0)
ymin = min([absxUp(:);absxDown(:)]);
ymax = max([absxUp(:);absxDown(:)]);
else
ymin = min(absxUp(:));
ymax = max(absxUp(:));
end

% If NaNs are returned base the limit off the other.
if isnan(ymin) && isnan(ymax)
ymin = -0.01;
ymax = 0.01;
elseif isnan(ymin)
ymin = ymax - (abs(ymax)/2);
elseif isnan(ymax)
ymax = ymin + (abs(ymin)/2);
end

% Handle the case when the limits are equal.
if ymin == ymax
ymin = ymin - (abs(ymin)/2);
ymax = ymax + (abs(ymax)/2);
end

% If they are still equal (if they both were zero).
if ymin == ymax
ymin = -0.01;
ymax = 0.01;
end

set(handles.EMGPlot, 'YLim', [ymin-0.01, ymax+0.01],...
'YTick', linspace(ymin, ymax, 11),...
'YTickLabel', {num2str(ymin,4), '','','', '','',...
'','','','',num2str(ymax,4)});

set(handles.hEMG1, 'XData', 1:length(absxUp), 'YData', absxUp, 'Color',[0 1
0],'LineWidth',1,...
'LineStyle','-', 'HandleVisibility', 'off', 'EraseMode', 'xor', 'Visible', 'on');

if (chanDown>0)
219

set(handles.hEMG2, 'XData', 1:length(absxDown) , 'YData', absxDown, 'Color',[1 0
0],'LineWidth',1,...
'LineStyle','-', 'HandleVisibility', 'off', 'EraseMode', 'xor', 'Visible', 'on');
end

drawnow;


% This function updates the GUI during calibration every one-tenth of a second
function handles = CalibGUI(handles, channel)
ensembles=10; %for ensemble averaging
period = ensembles*str2double(get(handles.Timer, 'String')); % time for calibration =
ensembles x the user given value (sec)
set(handles.ai,'TriggerRepeat', 1, 'TriggerType', 'Immediate',...
'SampleRate', str2double(get(handles.SampFreq, 'String')),...
'SamplesPerTrigger', period*floor(str2double(get(handles.SampFreq, 'String'))));
Fsamp=get(handles.ai, 'SampleRate');
handles.dt = 1/Fsamp;

handles.data=[];
handles.time=[];
start(handles.ai);
[handles.data, handles.time]=getdata(handles.ai, period*Fsamp);
stop(handles.ai);

if (channel==1)
data=handles.data(:,1);
elseif (channel==2)
data=handles.data(:,2);
end

data = data - mean(data);

% bandpass filter the data 20-500 Hz
Wn=[20*2/Fsamp 500*2/Fsamp];
[b,a]=butter(3, Wn);
data = filtfilt(b, a, data);

absData = abs(data);

% Power spectrum
[Pxx, f]=psd(data,[],Fsamp);

% divide the data into 10 parts and do an ensemble averaging
% assuming a stationary signal (may not be true!!)
ensembleLen=floor(length(absData)/ensembles);
count=1;
for i = 1:ensembleLen:(ensembles-1)*ensembleLen;
maxMag(count)=sum(absData(i:i+ensembleLen-1));
count=count+1;
end

handles.maxMag=mean(maxMag);
handles.stdMag=std(maxMag);

guidata(handles.EMGControl, handles);

set(handles.Message,'String', ['Mean of Integrated EMG (IEMG)->',
num2str(handles.maxMag),', Std. Dev. of IEMG->', num2str(handles.stdMag)]);

axes(handles.ControlPlot);
psdplot(Pxx, f, 'Hz', 'linear');
drawnow;

axes(handles.EMGPlot);
set(handles.EMGPlot, 'yLim', [0, max(absData)]);
% plot(handles.time(:,1), absData, 'g-', handles.time(:,1), absDataFilt, 'r-');
plot(handles.time(:,1), absData, 'g-');
xlabel('Time (sec)');
ylabel('Voltage (volt)');
legend('EMG');
220


drawnow;

% --- Executes on selection change in ModeList.
function ModeList_Callback(hObject, eventdata, handles)
% hObject handle to ModeList (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns ModeList contents as cell array
% contents{get(hObject,'Value')} returns selected item from ModeList


% --- Executes during object creation, after setting all properties.
function Timer_CreateFcn(hObject, eventdata, handles)
% hObject handle to Timer (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
set(hObject,'String', 0.15);
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


% --- Executes on button press in UpBox.
function UpBox_Callback(hObject, eventdata, handles)
% hObject handle to UpBox (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of UpBox


% --- Executes on button press in DownBox.
function DownBox_Callback(hObject, eventdata, handles)
% hObject handle to DownBox (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of DownBox


% --- Executes on selection change in UpChanBox.
function UpChanBox_Callback(hObject, eventdata, handles)
% hObject handle to UpChanBox (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns UpChanBox contents as cell array
% contents{get(hObject,'Value')} returns selected item from UpChanBox


% --- Executes on selection change in DownChanBox.
function DownChanBox_Callback(hObject, eventdata, handles)
% hObject handle to DownChanBox (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns DownChanBox contents as cell array
% contents{get(hObject,'Value')} returns selected item from DownChanBox

% % % --- Executes on button press in StopButton.
function StopButton(hObject, eventdata, handles)

global YCont YTrack YContFilt
221

set(handles.StartButton, 'Callback',
'EMGControl(''StartButton_Callback'',gcbo,[],guidata(gcbo))');
set(handles.StartButton, 'String', 'Start');
set(handles.Capture, 'Enable', 'off'); % Disable the capture button
stop(handles.ai);
set(handles.Message,'String', 'Messages');

if (get(handles.UpBox,'Value') == get(handles.UpBox,'Max'))
filename=['data/',date, get(handles.savefile, 'String'), '.mat'];
save(filename, 'YCont', 'YTrack', 'YContFilt', 'arma');
end

h=figure(1);
subplot(2,1,1);
plot(1:length(YTrack), YTrack, 'r-', 1:length(YCont), YCont, 'k-.', 1:length(YContFilt),
YContFilt, 'k-');
grid on
legend('Tracking Signal', 'Raw Command Signal', 'Smoothed Command Signal', 0)
subplot(2,1,2);
mean_err(1:length(YTrack))=mean(abs(YTrack-YContFilt));
plot(1:length(YTrack), YTrack-YContFilt, 'r-', 1:length(YTrack), mean_err, 'k-');
grid on
legend('Error signal', 'Mean absolute error',0)
saveas(h, ['data/',date, get(handles.savefile, 'String'), '.fig']);

YCont=[];
YTrack=[];
delete(handles.hLine);
delete(handles.hPlot);
delete(handles.hEMG1);
delete(handles.hEMG2);


% --- Executes during object creation, after setting all properties.
function Threshold_CreateFcn(hObject, eventdata, handles)
% hObject handle to Threshold (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
set(hObject,'String', 1);
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end

function Threshold_Callback(hObject, eventdata, handles)
% hObject handle to Threshold (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of Threshold as text
% str2double(get(hObject,'String')) returns contents of Threshold as a double


function Timer_Callback(hObject, eventdata, handles)
% hObject handle to Timer (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of Timer as text
% str2double(get(hObject,'String')) returns contents of Timer as a double



function TrackFreq_Callback(hObject, eventdata, handles)
% hObject handle to TrackFreq (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)
222


% Hints: get(hObject,'String') returns contents of TrackFreq as text
% str2double(get(hObject,'String')) returns contents of TrackFreq as a double


% --- Executes on button press in Capture.
function Capture_Callback(hObject, eventdata, handles)
% hObject handle to Capture (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

global YContFilt YTrack

set(handles.Level,'String', num2str(YContFilt(length(YContFilt))));

if str2double(get(handles.TrackFreq, 'String'))>0
set(handles.Error,'String', num2str(YTrack(length(YTrack))-
YContFilt(length(YContFilt))));
else
set(handles.Error,'String', 'nontracking');
end

% --- Executes on button press in savebutton.
function savebutton_Callback(hObject, eventdata, handles)
% hObject handle to savebutton (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of savebutton


% --- Executes during object creation, after setting all properties.
function savefile_CreateFcn(hObject, eventdata, handles)
% hObject handle to savefile (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


function savefile_Callback(hObject, eventdata, handles)
% hObject handle to savefile (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of savefile as text
% str2double(get(hObject,'String')) returns contents of savefile as a double


% --- Executes on button press in autothreshold.
function autothreshold_Callback(hObject, eventdata, handles)
% hObject handle to autothreshold (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of autothreshold


% --- Executes during object creation, after setting all properties.
function MAWindow_CreateFcn(hObject, eventdata, handles)
% hObject handle to MAWindow (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
223

% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
set(hObject,'String', 5);
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function MAWindow_Callback(hObject, eventdata, handles)
% hObject handle to MAWindow (see GCBO)
% eventdata reserved - to be defined in a future version of Matlab
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of MAWindow as text
% str2double(get(hObject,'String')) returns contents of MAWindow as a double



224


An example of the Matlab (.m) parameter files for the EMG-triggered FES system:
%% parameters based on parameters_aiw01_0805301519.m.
%% created by - Anirban Dutta, June 13, 2008

%% sample time (=IPI)
Ts=0.05;

%%%%%%%%%%%%%%EMG TRIGGER PARAMETERS START%%%%%%%%%%%%%%%%%%%%
PortB=0; %write data to PortB?
MES_gain=3; %Gain: 0, 1, 2, 3

side=0; %the side to start the walk, left=0 and right=1
TrigType=2; %SW(=0) or Auto(=1) or bilateral-EMG(=2)or semi-EMG trigger(=3)
or semi-automatic (=4) trigger?
TrainON=1; %Adaptive training of threshold ON(1) OFF(0)
readParam=0; %Read old parameter data from memory? ON(1) OFF(0)
StandTrainDel=10; %wait before the start of baseline training = time it takes to
get set in quiet standing
StandTrainPer=90; %duration of running mean to find baseline MES
LThrTrainPer=0.35; %duration for runnning mean for training the left Step Trigger
Threshold
RThrTrainPer=0.55; %duration for runnning mean for training the right Step Trigger
Threshold
Ldelay=1; %wait in secs in LDS before turning off the EMG classifier
Rdelay=1; %wait in secs in RDS before turning off the EMG classifier
RSWper = 1.25; %~RSW phase duration
LSWper = 1.25; %~LSW phase duration
LTrigWait=1.05; %wait to start thresholding the right Step Trigger
RTrigWait=1.2; %wait to start thresholding the left Step Trigger
PC_classifier=0; %0=OFF and 1=ON

MESLtrig_baseline=468*MES_gain; %% left Step Trigger baseline estimate
MESRtrig_baseline=460*MES_gain; %% right Step Trigger baseline estimate
MESLtrig_thr=1.1; %% left Step Trigger Threshold estimate
MESRtrig_thr=1; %% right Step Trigger Threshold estimate

%% the duration of the patterns for the EMGs
%% for triggering left and right steps with PRC
period_left=0.56; %% must be <=LSEnd and ~LDSper
period_right=0.35; %% must be <=RSEnd and ~RDSper

%% 5-point features
LstepTrig_feat1=[0.9480 0.9876 1.0415 1.1109 1.1991]; %% left Step
Trigger feature
RstepTrig_feat1=[1.0436 1.0651 1.0900 1.1423 1.2358]; %% right Step
Trigger feature
%% correlation coefficients thresholds
LstepTrig_Xcorr1=0.65; %% Xcorr threshold of left Step Trigger pattern
RstepTrig_Xcorr1=0.65; %% Xcorr threshold of right Step Trigger pattern

%%%%%%%%%%%%%%EMG TRIGGER PARAMETERS END%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%STIMULATION PATTERNS PARAMETERS START%%%%%%%%%%%%%%%%%%%%
PortNumber = 0;
PowerOffHold = 1;
RF = 60; % RF power level
Delta = 0.025;
pitch = 50;
volume = 250;
duration = 200;

% channel 4 = left erector spinae % channel 8 = right erector spinae
LESthr = 23; RESthr = 35;
LESsat = 25; RESsat = 40;
LESamp = 7; RESamp = 8;

225

% channel 0 = left iliopsoas % channel 9 = right iliopsoas
LILthr = 22; RILthr = 8;
LILsat = 200; RILsat = 50;
LILamp = 8; RILamp = 8;

% channel 6 = left gluteus maximus % channel 10 = right gluteus maximus
LGMthr = 1; RGMthr = 1;
LGMsat = 70; RGMsat = 30;
LGMamp = 8; RGMamp = 8;

% channel 7 = left tibialis anterior % channel 11 = right tibialis anterior
LTAthr = 27; RTAthr = 75;
LTAsat = 200; RTAsat = 250;
LTAamp = 8; RTAamp = 0;


% channel 5 = left gluteus medius % channel 1 = left tensor fasciae latae
LMEthr = 12; LTFLthr = 12;
LMEsat = 200; LTFLsat = 200;
LMEamp = 8; LTFLamp = 8;

% channel 2 = left quadriceps % channel 3 = left posterior portion
% of the adductor magnus
LQUthr = 22; LPAthr = 12;
LQUsat = 200; LPAsat = 200;
LQUamp = 8; LPAamp = 8;

%standing and walking
StandPer1 = 50; %(msec) = 1 / 20Hz
StandPer2 = 33; %(msec) = 1 / 30Hz
StandDelay = 0.1;
StandDelayLo = StandDelay - Delta;
StandDelayHi = StandDelay + Delta;
StandRamp = 1.1;
StandRampLo = StandRamp - Delta;
StandRampHi = StandRamp + Delta;

StandPeriod = StandPer1;
StandPWSatVal = [0 0 LQUsat-LQUthr LPAsat-LPAthr LESsat-LESthr LMEsat-LMEthr ...
LGMsat-LGMthr 0 RESsat-RESthr 0 RGMsat-RGMthr 0];
StandPWSatRampin = [0 StandDelay StandRamp StandRampHi];
StandPWSatRampout = [0 0 1 1];
StandPWThrVal = [0 0 LQUthr LPAthr LESthr LMEthr LGMthr 0 RESthr 0 RGMthr 0];
StandPWThrRampin = [0 StandDelayLo StandDelay StandRamp];
StandPWThrRampout = [0 0 1 1];
StandAmpA = [0 0 LQUamp LPAamp 0 LMEamp LGMamp 0 0 0 RGMamp 0];

LSEnd = 1.55;
LSch0in = [0 0.018 0.276 0.72 1.08 LSEnd];
LSch0out = [0 0 LILsat LILsat 0 0];
LSch1in = [0 0.018 0.132 0.984 1.064 1.08 LSEnd];
LSch1out = [0 0 LTFLsat LTFLsat 65 0 0];
LSch7in = [0 0.018 0.74 1.064 1.08 LSEnd];
LSch7out = [0 250 250 150 0 0];
LSch2in = [0 0.018 0.576 0.92 1.048 1.08 LSEnd];
LSch2out = [LQUsat 0 0 250 250 LQUsat LQUsat];
LSch3in = [0 0.018 1.22 1.229 LSEnd];
LSch3out = [LPAsat 0 0 LPAsat LPAsat];
LSch4in = [0 0.018 1.22 1.229 LSEnd];
LSch4out = [LESsat 0 0 LESsat LESsat];
LSch5in = [0 0.252 0.952 1.08 1.22 1.229 LSEnd];
LSch5out = [LMEsat 0 0 120 120 LMEsat LMEsat];
LSch6in = [0 0.018 1.22 1.229 LSEnd];
LSch6out = [LGMsat 0 0 LGMsat LGMsat];
LSch8in = [0 LSEnd];
LSch8out = [RESsat RESsat];
LSch9in = [0 LSEnd];
LSch9out = [0 0];
LSch10in = [0 LSEnd];
LSch10out = [RGMsat RGMsat];
LSch11in = [0 LSEnd];
226

LSch11out = [0 0];
LSAmpA=[LILamp LTFLamp LQUamp LPAamp LESamp LMEamp LGMamp LTAamp RESamp 0 RGMamp 0];

RSEnd = 1.55;
RSch0in = [0 RSEnd];
RSch0out = [0 0];
RSch1in = [0 RSEnd];
RSch1out = [0 0];
RSch7in = [0 RSEnd];
RSch7out = [0 0];
RSch2in = [0 RSEnd];
RSch2out = [LQUsat LQUsat];
RSch3in = [0 RSEnd];
RSch3out = [LPAsat LPAsat];
RSch4in = [0 RSEnd];
RSch4out = [LESsat LESsat];
RSch5in = [0 RSEnd];
RSch5out = [LMEsat LMEsat];
RSch6in = [0 RSEnd];
RSch6out = [LGMsat LGMsat];
RSch9in = [0 0.018 0.132 0.72 1.08 RSEnd];
RSch9out = [0 0 RILsat RILsat 0 0];
RSch11in = [0 0.018 0.74 1.064 1.08 RSEnd];
RSch11out = [0 250 250 150 0 0];
RSch8in = [0 0.018 1.22 1.23 RSEnd];
RSch8out = [RESsat 0 0 RESsat RESsat];
RSch10in = [0 0.018 1.22 1.23 RSEnd];
RSch10out = [RGMsat 0 0 RGMsat RGMsat];
RSAmpA=[0 0 LQUamp LPAamp LESamp LMEamp LGMamp 0 RESamp RILamp RGMamp RTAamp];

%%%%%%%%%%%%%%STIMULATION PATTERNS PARAMETERS END %%%%%%%%%%%%%%%%%%%%

subplot('Position',[0.11 0.87 0.42 0.05]); area(LSch9in,LSch9out); axis([0 LSEnd 0 250])
text(0.75, 500, 'AIW-01 pulse width (usec) vs. time (sec) during walking ...
v0805301519', 'FontSize', 12)
text(-0.3, 100, '9) LIL'); title('left Step'); set(gca,'XTick',(0:15)*.1);
set(gca,'YTick',[0 125 250]); set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.87 0.42 0.05]); area(RSch9in,RSch9out); axis([0 RSEnd 0 250])
title('right Step'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'YTickLabel',[]); set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.798 0.42 0.05]); area(LSch8in,LSch8out); axis([0 LSEnd 0 250])
text(-0.3, 100, '8) LES'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.798 0.42 0.05]); area(RSch8in,RSch8out); axis([0 RSEnd 0 250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.726 0.42 0.05]); area(LSch7in,LSch7out); axis([0 LSEnd 0 250])
text(-0.3, 100, '7) LGM'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.726 0.42 0.05]); area(RSch7in,RSch7out); axis([0 RSEnd 0 250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.654 0.42 0.05]); area(LSch6in,LSch6out); axis([0 LSEnd 0 250])
text(-0.3, 100, '6) LQU'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.654 0.42 0.05]); area(RSch6in,RSch6out); axis([0 RSEnd 0 250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.583 0.42 0.05]); area(LSch11in,LSch11out); axis([0 LSEnd 0
250])
text(-0.3, 100, '11) RIL'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.583 0.42 0.05]); area(RSch11in,RSch11out); axis([0 RSEnd 0
250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

227

subplot('Position',[0.11 0.511 0.42 0.05]); area(LSch0in,LSch0out); axis([0 LSEnd 0 250])
text(-0.3, 100, '0) RTFL'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.511 0.42 0.05]); area(RSch0in,RSch0out); axis([0 RSEnd 0 250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.439 0.42 0.05]); area(LSch3in,LSch3out); axis([0 LSEnd 0 250])
text(-0.3, 100, '3) RTA'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.439 0.42 0.05]); area(RSch3in,RSch3out); axis([0 RSEnd 0 250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.367 0.42 0.05]); area(LSch10in,LSch10out); axis([0 LSEnd 0
250])
text(-0.3, 100, '10) RES'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.367 0.42 0.05]); area(RSch10in,RSch10out); axis([0 RSEnd 0
250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.295 0.42 0.05]); area(LSch5in,LSch5out); axis([0 LSEnd 0 250])
text(-0.3, 100, '5) RGM'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.295 0.42 0.05]); area(RSch5in,RSch5out); axis([0 RSEnd 0 250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.224 0.42 0.05]); area(LSch4in,LSch4out); axis([0 LSEnd 0 250])
text(-0.3, 100, '4) RQU'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.224 0.42 0.05]); area(RSch4in,RSch4out); axis([0 RSEnd 0 250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.152 0.42 0.05]); area(LSch1in,LSch1out); axis([0 LSEnd 0 250])
text(-0.3, 100, '1) RHS'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
set(gca,'XTickLabel',[])
subplot('Position',[0.55 0.152 0.42 0.05]); area(RSch1in,RSch1out); axis([0 RSEnd 0 250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[])

subplot('Position',[0.11 0.08 0.42 0.05]); area(LSch2in,LSch2out); axis([0 LSEnd 0 250])
text(-0.3, 100, '2) RPA'); set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]);
xlabel('Time (s)')
subplot('Position',[0.55 0.08 0.42 0.05]); area(RSch2in,RSch2out); axis([0 RSEnd 0 250])
set(gca,'XTick',(0:15)*.1); set(gca,'YTick',[0 125 250]); set(gca,'YTickLabel',[]);
xlabel('Time (s)')

%%%%%%%%%%%%%%STIMULATION PATTERNS PARAMETERS END%%%%%%%%%%%%%%%%%%%%
228

An example of the Matlab (.m) program to filter and clean the raw EMG data of
stimulation artifacts:
%% function to clean the EMG trials files
function runcleanEMG

%% path of the files (folders)
foldpath{1}='D:\adutta\Shared Files\DW_EMG_TRAINING_DATA\Session 5\';
foldpath{2}='D:\adutta\Shared Files\DW_EMG_TRAINING_DATA\Session 6\';
foldpath{3}='D:\adutta\Shared Files\DW_EMG_TRAINING_DATA\Session 7\';
foldpath{4}='D:\adutta\Shared Files\DW_EMG_TRAINING_DATA\Session 8\';
foldpath{5}='D:\adutta\Shared Files\DW_EMG_TRAINING_DATA\Session 9\';
foldpath{6}='D:\adutta\Shared Files\DW_EMG_TRAINING_DATA\Session 10\';

%% files to process
file{1,1}='8';
file{1,2}='9';
file{1,3}='03';
file{1,4}='9';
file{1,5}='10';
file{1,6}='11';
file{1,7}='12';
file{1,8}='13';
file{1,9}='14';
file{1,10}='15';
file{1,11}='16';
file{1,12}='17';

file{2,1}='1';
file{2,2}='2';
file{2,3}='3';
file{2,4}='4';
file{2,5}='5';
file{2,6}='6';
file{2,7}='7';
file{2,8}='8';
file{2,9}='9';
file{2,10}='10';
file{2,11}='11';
file{2,12}='12';

file{3,1}='1';
file{3,2}='2';
file{3,3}='3';
file{3,4}='4';
file{3,5}='5';
file{3,6}='6';
file{3,7}='7';
file{3,8}='8';
file{3,9}='9';
file{3,10}='10';
file{3,11}='11';
file{3,12}='12';

file{4,1}='1';
file{4,2}='2';
file{4,3}='3';
file{4,4}='4';
file{4,5}='5';
file{4,6}='6';
file{4,7}='7';
file{4,8}='8';
file{4,9}='9';
file{4,10}='10';
file{4,11}='11';
file{4,12}='12';
file{4,13}='13';
file{4,14}='14';
229


file{5,1}='1';
file{5,2}='2';
file{5,3}='3';
file{5,4}='4';
file{5,5}='5';
file{5,6}='6';
file{5,7}='7';
file{5,8}='8';
file{5,9}='9';
file{5,10}='10';
file{5,11}='11';
file{5,12}='12';

file{6,1}='1';
file{6,2}='2';
file{6,3}='3';
file{6,4}='4';
file{6,5}='5';
file{6,6}='6';
file{6,7}='7';
file{6,8}='8';
file{6,9}='9';
file{6,10}='10';
file{6,11}='11';
file{6,12}='12';
file{6,13}='13';
file{6,14}='14';


%% open the trials data files for processing
for j=1:size(file,1)
for i=1:size(file,2)
if (~isempty(file{j,i}))

%% Set the prefix of the filename
filename=[foldpath{j},'MAtrain',file{j,i}];

% columns with EMG
colsEMG=1:10;

% Labels?
FSW.labels=['LH';'RH';'LT';'RT'];
sEMG.labels={'m01'; 'm02'; 'm03'; 'm04'; 'm05'; 'm06'; 'm07'; 'm08'; 'm09';
'm10'};

% columns with heel FSW
colsLH=12;
colsRH=11;

% columns with toe FSW
colsLT=12;
colsRT=11;

% save? yes(1) or no(0)
saveY=1;

cleanEMG(filename, colsLH, colsRH, colsLT, colsRT, colsEMG, FSW, sEMG,
saveY);
end
end
end


% colsEMG is a vector with the desired cols # for EMG data (0 means
% no EMG data), colsLH is a vector with the desired cols # for
% left heel foot-SW data, colsRH is a vector with the desired cols # for
% right heel foot-SW data, colsLT is a vector with the desired cols # for
% left toe foot-SW data, colsRT is a vector with the desired cols # for
% right toe foot-SW data, save = 1(yes) or 0(no)
function cleanEMG(filename, colsLH, colsRH, colsLT, colsRT, colsEMG, FSW, sEMG, saveY)
230


close all

%% load the file first
filename
load([filename,'.mat'])

%% Sampling freqeuncy
Fsamp=20;

%% Lowpass filter (2 Hz) to clean the FSW data
fcutoff=2;
[b,a]=butter(3, fcutoff*2/Fsamp,'low');
LH=data(:,colsLH);
RH=data(:,colsRH);
LT=data(:,colsLT);
RT=data(:,colsRT);
FSW.data=filter(b,a,[LH,RH,LT,RT]);

%% find the range of data to clean
figure(1)
plot([FSW.data])
legend(FSW.labels)
xlabel('# data points');
title('MESSAGE: With LEFT-CLICK, PICK 2 POINTS for the GOOD data RANGE OR MIDDLE-CLICK to
select ALL OR RIGHT-CLICK to CANCEL process!)')
hold on
ymax=ylim;
for click=1:2
[x(click),y(click),button]=ginput(1);
if (button==2 | button==3)
break
end
line([x(click),x(click)], ymax, 'Color', 'k', 'LineWidth', 2)
end
close(figure(1))

if (button==2)
x(1)=1;
x(2)=size(data,1);
end
sEMG.lSW=[];
FSW.lSW=[];

sEMG.lST=[];
FSW.lST=[];

sEMG.lDS=[];
FSW.lDS=[];

sEMG.rSW=[];
FSW.rSW=[];

sEMG.rST=[];
FSW.rST=[];

sEMG.rDS=[];
FSW.rDS=[];

%% Clean the EMG data
if (button==1 | button==2) %% if gait then find the gait phase
scale=1;
sEMG.data=data(ceil(scale*x(1)):floor(scale*x(2)),colsEMG);
FSW.data=FSW.data(ceil(scale*x(1)):floor(scale*x(2)),:);

% 3-Hz Lowpass filter to get the outer shape
[b,a]=butter(5, 3*2/Fsamp);
sEMG_shape = filtfilt(b,a, sEMG.data);

%% normalize with the maximum during trial
sEMG_max=max(sEMG_shape); %% maximum EMG magnitude during the trial
231

sEMG_shape=sEMG_shape./repmat(sEMG_max,size(sEMG_shape,1),1); %% this one is
normalized

figure(3)
plot(sEMG_shape,'LineWidth',2);

%% find gait cycles from heel FSW
%% find the range of data
figure(4)
plot(FSW.data,'LineWidth',2)
legend(FSW.labels(1:4,:))
xlabel('# data points');
hold on
ymax=ylim;
xmax=xlim;
title('MESSAGE: With LEFT-CLICK, PICK 2 POINTS for the WALK data RANGE OR RIGHT-CLICK
to CANCEL (i.e. no WALK data)!)')
for click=1:2
[x(click),y(click),button]=ginput(1);
if (button==3)
x(1)=1;
x(2)=size(FSW.data,1);
break
end
line([x(click),x(click)], ymax, 'Color', 'k', 'LineWidth', 2)
end

sta=floor(x(1));
sto=ceil(x(2));
pause(1)
close(4)
figure(4)
plot(sta:sto,FSW.data(sta:sto,:),'LineWidth',2)
legend(FSW.labels(1:4,:))
xlabel('# data points');
hold on
ymax=ylim;
xmax=xlim;
title('MESSAGE: With LEFT-CLICK, PICK 1 point for THRESHOLD')
click=3;
[x(click),y(click),butt]=ginput(1);
line(xmax, [y(click),y(click)], 'Color', 'k', 'LineWidth', 2)

Lheel=FSW.data(:,1);
Rheel=FSW.data(:,2);
Ltoe=FSW.data(:,3);
Rtoe=FSW.data(:,4);
th=y(3); %% that's the threshold

if (button==1)
st=ceil(x(1)); %% that's the start of the WALK data
en=floor(x(2)); %% that's the end of the WALK data

lSWind=st+find(Lheel(st:en)<th & Ltoe(st:en)<th)-1;
lSTind=st+find(Lheel(st:en)>th | Ltoe(st:en)>th)-1;
rSWind=st+find(Rheel(st:en)<th & Rtoe(st:en)<th)-1;
rSTind=st+find(Rheel(st:en)>th | Rtoe(st:en)>th)-1;

%% group the indices in GC
dlSWind=diff(lSWind);
dlSTind=diff(lSTind);
drSWind=diff(rSWind);
drSTind=diff(rSTind);

%% find ends point indices
lSWen=[lSWind(find(dlSWind>5)); lSWind(length(lSWind))];
lSWst=[lSWind(1); lSWind(find(dlSWind>5)+1)];
lSTen=[lSTind(find(dlSTind>5)); lSTind(length(lSTind))];
lSTst=[lSTind(1); lSTind(find(dlSTind>5)+1)];
rSWen=[rSWind(find(drSWind>5)); rSWind(length(rSWind))];
rSWst=[rSWind(1); rSWind(find(drSWind>5)+1)];
232

rSTen=[rSTind(find(drSTind>5)); rSTind(length(rSTind))];
rSTst=[rSTind(1); rSTind(find(drSTind>5)+1)];

%% get the EMGs in Gait Phases
%% left Swing Phase
temp=[];
if length(lSWst)>2
for i=2:length(lSWst)-1
% temp=sort(lSWen(find(lSWen>lSWst(i))),'ascend');
if ~isempty(lSWen(i))
sEMG.lSW{i}=sEMG_shape(lSWst(i):lSWen(i),:);
FSW.lSW{i}=FSW.data(lSWst(i):lSWen(i),:);
figure(4)
plot(lSWst(i),Lheel(lSWst(i)),'go','MarkerSize',10)
hold on
plot(lSWen(i),Lheel(lSWen(i)),'ro','MarkerSize',10)
end
end
sEMG.lSW(1)=[];
FSW.lSW(1)=[];
end

%% left Stance Phase
temp=[];
if length(lSTst)>2
for i=2:length(lSTst)-1
if ~isempty(lSTen(i))
sEMG.lST{i}=sEMG_shape(lSTst(i):lSTen(i),:);
FSW.lST{i}=FSW.data(lSTst(i):lSTen(i),:);
figure(4)
plot(lSTst(i),Lheel(lSTst(i)),'gx','MarkerSize',10)
plot(lSTen(i),Lheel(lSTen(i)),'rx','MarkerSize',10)
temp1=find(rSWst<lSTen(i) & rSWst>lSTst(i));
if ~isempty(temp1)
sEMG.lDS{i}=sEMG_shape(lSTst(i):rSWst(temp1(1)),:);
FSW.lDS{i}=FSW.data(lSTst(i):rSWst(temp1(1)),:);
figure(4)
plot(lSTst(i),Lheel(lSTst(i)),'g<','MarkerSize',10)
plot(rSWst(temp1(1)),Lheel(rSWst(temp1(1))),'r<','MarkerSize',10)
end
end
end
sEMG.lST(1)=[];
FSW.lST(1)=[];
sEMG.lDS(1)=[];
FSW.lDS(1)=[];
end

%% right Swing Phase
temp=[];
if length(rSWst)>2
for i=2:length(rSWst)-1
if ~isempty(rSWen(i))
sEMG.rSW{i}=sEMG_shape(rSWst(i):rSWen(i),:);
FSW.rSW{i}=FSW.data(rSWst(i):rSWen(i),:);
figure(4)
plot(rSWst(i),Rheel(rSWst(i)),'g.','MarkerSize',15)
plot(rSWen(i),Rheel(rSWen(i)),'r.','MarkerSize',15)
end
end
sEMG.rSW(1)=[];
FSW.rSW(1)=[];
end

%% right Stance Phase
temp=[];
if length(rSTst)>2
for i=2:length(rSTst)-1
if ~isempty(rSTen(i))
sEMG.rST{i}=sEMG_shape(rSTst(i):rSTen(i),:);
FSW.rST{i}=FSW.data(rSTst(i):rSTen(i),:);
233

figure(4)
plot(rSTst(i),Rheel(rSTst(i)),'g>','MarkerSize',10)
plot(rSTen(i),Rheel(rSTen(i)),'r>','MarkerSize',10)
temp1=find(lSWst<rSTen(i) & lSWst>rSTst(i));
if ~isempty(temp1)
sEMG.rDS{i}=sEMG_shape(rSTst(i):lSWst(temp1(1)),:);
FSW.rDS{i}=FSW.data(rSTst(i):lSWst(temp1(1)),:);
figure(4)
plot(rSTst(i),Rheel(rSTst(i)),'g^','MarkerSize',10)
plot(lSWst(temp1(1)),Rheel(lSWst(temp1(1))),'r^','MarkerSize',10)
end
end
end
sEMG.rST(1)=[];
FSW.rST(1)=[];
sEMG.rDS(1)=[];
FSW.rDS(1)=[];
end

%% Initial Stand Phase
standIni=find(Lheel(1:st)>th & Rheel(1:st)>th & Ltoe(1:st)>th & Rtoe(1:st)>th);
if ~isempty(standIni)
sEMG.standIni=sEMG_shape(standIni,:);
FSW.standIni=FSW.data(standIni,:);
else
sEMG.standIni=[];
FSW.standIni=[];
end

%% Terminal Stand Phase
standTerm=en+find(Lheel(en:length(Lheel))>th & Rheel(en:length(Rheel))>th &
Ltoe(en:length(Lheel))>th & Rtoe(en:length(Rheel))>th)-1;
if ~isempty(standTerm)
sEMG.standTerm=sEMG_shape(intersect(standTerm,[1:size(sEMG_shape,1)]),:);
FSW.standTerm=FSW.data(intersect(standTerm,[1:size(sEMG_shape,1)]),:);
else
sEMG.standTerm=[];
FSW.standTerm=[];
end

%% Initial Sit Phase
sitIni=find(Lheel(1:st)<th & Rheel(1:st)<th & Ltoe(1:st)<th & Rtoe(1:st)<th);
if ~isempty(sitIni)
sEMG.sitIni=sEMG_shape(sitIni,:);
FSW.sitIni=FSW.data(sitIni,:);
else
sEMG.sitIni=[];
FSW.sitIni=[];
end

%% Terminal Sit Phase
sitTerm=en+find(Lheel(en:length(Lheel))<th & Rheel(en:length(Rheel))<th &
Ltoe(en:length(Lheel))<th & Rtoe(en:length(Rheel))<th)-1;
if ~isempty(sitTerm)
sEMG.sitTerm=sEMG_shape(intersect(sitTerm,[1:size(sEMG_shape,1)]),:);
FSW.sitTerm=FSW.data(intersect(sitTerm,[1:size(sEMG_shape,1)]),:);
else
sEMG.sitTerm=[];
FSW.sitTerm=[];
end

elseif (button==3) %% if no gait then just find stand and sit states
%% Initial Stand Phase
standIni=find(Lheel>th & Rheel>th & Ltoe>th & Rtoe>th);
if ~isempty(standIni)
sEMG.standIni=sEMG_shape(intersect(standIni,[1:size(sEMG_shape,1)]),:);
FSW.standIni=FSW.data(intersect(standIni,[1:size(sEMG_shape,1)]),:);
figure(4)

plot(intersect(standIni,[1:size(sEMG_shape,1)]),Lheel(intersect(standIni,[1:size(sEMG_sha
pe,1)])),'ro','MarkerSize',10)
234


plot(intersect(standIni,[1:size(sEMG_shape,1)]),Rheel(intersect(standIni,[1:size(sEMG_sha
pe,1)])),'ko','MarkerSize',10)
else
sEMG.standIni=[];
FSW.standIni=[];
end

%% Terminal Stand Phase
standTerm=find(Lheel>th & Rheel>th & Ltoe>th & Rtoe>th);
if ~isempty(standTerm)
sEMG.standTerm=sEMG_shape(intersect(standTerm,[1:size(sEMG_shape,1)]),:);
FSW.standTerm=FSW.data(intersect(standTerm,[1:size(sEMG_shape,1)]),:);
else
sEMG.standTerm=[];
FSW.standTerm=[];
end

%% Initial Sit Phase
sitIni=find(Lheel<th & Rheel<th & Ltoe<th & Rtoe<th);
if ~isempty(sitIni)
sEMG.sitIni=sEMG_shape(intersect(sitIni,[1:size(sEMG_shape,1)]),:);
FSW.sitIni=FSW.data(intersect(sitIni,[1:size(sEMG_shape,1)]),:);
figure(4)

plot(intersect(sitIni,[1:size(sEMG_shape,1)]),Lheel(intersect(sitIni,[1:size(sEMG_shape,1
)])),'r+','MarkerSize',10)

plot(intersect(sitIni,[1:size(sEMG_shape,1)]),Rheel(intersect(sitIni,[1:size(sEMG_shape,1
)])),'k+','MarkerSize',10)
else
sEMG.sitIni=[];
FSW.sitIni=[];
end

%% Terminal Sit Phase
sitTerm=find(Lheel<th & Rheel<th & Ltoe<th & Rtoe<th);
if ~isempty(sitTerm)
sEMG.sitTerm=sEMG_shape(intersect(sitTerm,[1:size(sEMG_shape,1)]),:);
FSW.sitTerm=FSW.data(intersect(sitTerm,[1:size(sEMG_shape,1)]),:);
else
sEMG.sitTerm=[];
FSW.sitTerm=[];
end
end

if saveY==1
save([filename,'proc.mat'],'FSW','sEMG','sEMG_max',...
'sEMG_shape','Fsamp');
end
end

%%
input('Hit ENTER for the next file')

235

An example of the Matlab (.m) program to process the cleaned EMG data to divide
it into gait cycles:
%% function to divide the trials into gait cycles from the trials files

function runprocEMG

clear all
clc

%% path of the files (folders)
foldpath{1}='D:\adutta\Backup\DW Walk\DW Walk\3-24-2007\';
foldpath{2}='D:\adutta\Backup\DW Walk\DW Walk\3-22-2007\';
foldpath{3}='D:\adutta\Backup\DW Walk\DW Walk\3-20-2007\';
foldpath{4}='D:\adutta\Backup\DW Walk\DW Walk\3-19-2007\';
foldpath{5}='D:\adutta\Backup\DW Walk\DW Walk\3-13-2007\';
foldpath{6}='D:\adutta\Backup\DW Walk\DW Walk\3-12-2007\';
foldpath{7}='D:\adutta\Backup\DW Walk\DW Walk\3-8-2007\';
foldpath{8}='D:\adutta\Backup\DW Walk\DW Walk\3-6-2007\';
foldpath{9}='D:\adutta\Backup\DW Walk\DW Walk\3-5-2007\';
foldpath{10}='D:\adutta\Backup\DW Walk\DW Walk\2-26-2007\';

%% files to process
file{1,1}='1';
file{1,2}='2';
file{1,3}='3';
file{1,4}='9';
file{1,5}='10';
file{1,6}='11';
file{1,7}='12';
file{1,8}='13';
file{1,9}='14';
file{1,10}='15';
file{1,11}='16';
file{1,12}='17';
%
file{2,1}='1';
file{2,2}='2';
file{2,3}='3';
file{2,4}='4';
file{2,5}='5';
file{2,6}='6';
file{2,7}='8';
file{2,8}='9';
file{2,9}='10';
file{2,10}='11';
file{2,11}='12';
%
file{3,1}='3';
file{3,2}='4';
file{3,3}='5';
file{3,4}='6';
file{3,5}='7';
file{3,6}='8';
file{3,7}='9';
file{3,8}='10';
file{3,9}='11';
file{3,10}='13';
file{3,11}='14';
%
file{4,1}='1';
file{4,2}='3';
file{4,3}='4';
file{4,4}='5';
file{4,5}='6';
file{4,6}='7';
file{4,7}='9';
file{4,8}='10';
236

file{4,9}='11';
file{4,10}='12';
%
file{5,1}='1';
file{5,2}='2';
file{5,3}='3';
file{5,4}='4';
file{5,5}='5';
file{5,6}='6';
file{5,7}='8';
file{5,8}='9';
file{5,9}='10';
file{5,10}='11';
file{5,11}='12';
%
file{6,1}='2';
file{6,2}='3';
file{6,3}='5';
file{6,4}='5';
file{6,5}='6';
file{6,6}='7';
file{6,7}='8';
file{6,8}='9';
file{6,9}='10';
file{6,10}='11';
file{6,11}='12';
%
file{7,1}='1';
file{7,2}='2';
file{7,3}='3';
file{7,4}='4';
file{7,5}='5';
file{7,6}='6';
file{7,7}='7';
file{7,8}='8';
file{7,9}='9';
file{7,10}='10';
%
file{8,1}='1';
file{8,2}='2';
file{8,3}='3';
file{8,4}='4';
file{8,5}='5';
file{8,6}='6';
file{8,7}='7';
file{8,8}='8';
file{8,9}='9';
file{8,10}='10';
file{8,11}='11';
file{8,12}='12';
%
file{9,1}='1';
file{9,2}='2';
file{9,3}='4';
file{9,4}='5';
file{9,5}='6';
file{9,6}='7';
file{9,7}='8';
file{9,8}='10';
file{9,9}='11';
file{9,10}='12';
file{9,11}='14';
%
file{10,1}='3';
file{10,2}='4';
file{10,3}='5';
file{10,4}='6';
file{10,5}='7';
file{10,6}='8';
file{10,7}='9';

237

%% open the trials data files for processing
for j=1:size(file,1)
for i=1:size(file,2)
if (~isempty(file{j,i}))
%% Set the prefix of the filename
filename=[foldpath{j},'MAtrain',file{j,i}];

%% How may data points in gait phases for re-sampling EMG?
%% Default: nST=60, nSW=40, nDS=10, nStand=100, nSit=100
nST=60; %stance phase
nSW=40; %swing phase
nDS=10; %double support phase
nstandIni=100; %initial stand phase
nstandTerm=100; %terminal stand phase
nsitIni=100; %initial sit phase
nsitTerm=100; %terminal sit phase

% save? yes(1) or no(0)
saveY=1;

procEMG(filename, nST-1, nSW-1, nDS-1, nstandIni-1, nstandTerm-1, nsitIni-1,
nsitTerm-1, saveY);
end
end
end

%% This function is for processing EMG data for gait into GCs and gait
%% phases; nST, nSW, nDS, nStand, and nSit are the number of points for each phase
%% Default: nST=60, nSW=40, nDS=10, nStand=100, nSit=100

%% function procEMG
function procEMG(filename1, nST, nSW, nDS, nstandIni, nstandTerm, nsitIni,
nsitTerm,saveY1)

load([filename1,'proc.mat'])
wkspc=who;
saveY=saveY1;
filename=filename1
MAXsEMG=sEMG_max; %% sEMG_shape is normalized by this value

%% interpolate to divide the data into gait phases
for j=1:size(sEMG_shape,2) %% over all the EMG channels
%%lSW
if ~isempty(sEMG.lSW)
for i=1:size(sEMG.lSW,2) %% over all the steps
if ~isempty(sEMG.lSW{i})
tlSW(i)=length(sEMG.lSW{i})/Fsamp;

eval([sEMG.labels{j},'.lSW(',num2str(i),',:)=spline(1:size(sEMG.lSW{i},1),sEMG.lSW{1,i}(:
,j)'...
',1:(size(sEMG.lSW{i},1)-1)/nSW:size(sEMG.lSW{i},1));'])
else
eval([sEMG.labels{j},'.lSW(',num2str(i),',1:nSW+1)=NaN;'])

end
end
end
%%lST
if ~isempty(sEMG.lST)
for i=1:size(sEMG.lST,2)
if ~isempty(sEMG.lST{i})
tlST(i)=length(sEMG.lST{i})/Fsamp;

eval([sEMG.labels{j},'.lST(',num2str(i),',:)=spline(1:size(sEMG.lST{i},1),sEMG.lST{1,i}(:
,j)'...
',1:(size(sEMG.lST{i},1)-1)/nST:size(sEMG.lST{i},1));'])
else
eval([sEMG.labels{j},'.lST(',num2str(i),',1:nST+1)=NaN;'])
end
end
238

end
%%lDS
if ~isempty(sEMG.lDS)
for i=1:size(sEMG.lDS,2)
if ~isempty(sEMG.lDS{i})
tlDS(i)=length(sEMG.lDS{i})/Fsamp;

eval([sEMG.labels{j},'.lDS(',num2str(i),',:)=spline(1:size(sEMG.lDS{i},1),sEMG.lDS{1,i}(:
,j)'...
',1:(size(sEMG.lDS{i},1)-1)/nDS:size(sEMG.lDS{i},1));'])
else
eval([sEMG.labels{j},'.lDS(',num2str(i),',1:nDS+1)=NaN;'])
end
end
end
%%rSW
if ~isempty(sEMG.rSW)
for i=1:size(sEMG.rSW,2)
if ~isempty(sEMG.rSW{i})
trSW(i)=length(sEMG.rSW{i})/Fsamp;

eval([sEMG.labels{j},'.rSW(',num2str(i),',:)=spline(1:size(sEMG.rSW{i},1),sEMG.rSW{1,i}(:
,j)'...
',1:(size(sEMG.rSW{i},1)-1)/nSW:size(sEMG.rSW{i},1));'])
else
eval([sEMG.labels{j},'.rSW(',num2str(i),',1:nSW+1)=NaN;'])
end
end
end
%%rST
if ~isempty(sEMG.rST)
for i=1:size(sEMG.rST,2)
if ~isempty(sEMG.rST{i})
trST(i)=length(sEMG.rST{i})/Fsamp;

eval([sEMG.labels{j},'.rST(',num2str(i),',:)=spline(1:size(sEMG.rST{i},1),sEMG.rST{1,i}(:
,j)'...
',1:(size(sEMG.rST{i},1)-1)/nST:size(sEMG.rST{i},1));'])
else
% eval([cell2mat(sEMG.labels{j}),'.rST(',num2str(i),',1:nST+1)=NaN;'])
eval([sEMG.labels{j},'.rST(',num2str(i),',1:nST+1)=NaN;'])
end
end
end
%%rDS
if ~isempty(sEMG.rDS)
for i=1:size(sEMG.rDS,2)
if ~isempty(sEMG.rDS{i})
trDS(i)=length(sEMG.rDS{i})/Fsamp;

eval([sEMG.labels{j},'.rDS(',num2str(i),',:)=spline(1:size(sEMG.rDS{i},1),sEMG.rDS{1,i}(:
,j)'...
',1:(size(sEMG.rDS{i},1)-1)/nDS:size(sEMG.rDS{i},1));'])
else
eval([sEMG.labels{j},'.rDS(',num2str(i),',1:nDS+1)=NaN;'])
end
end
end
%%standIni
if ~isempty(sEMG.standIni)

eval([sEMG.labels{j},'.standIni=spline(1:size(sEMG.standIni(:,j),1),sEMG.standIni(:,j)'..
.
',1:(size(sEMG.standIni(:,j),1)-1)/nstandIni:size(sEMG.standIni(:,j),1));'])
else
eval([sEMG.labels{j},'.standIni(1:nstandIni+1)=NaN;'])
end
%%standTerm
if ~isempty(sEMG.standTerm)
239


eval([sEMG.labels{j},'.standTerm=spline(1:size(sEMG.standTerm(:,j),1),sEMG.standTerm(:,j)
'...
',1:(size(sEMG.standTerm(:,j),1)-
1)/nstandTerm:size(sEMG.standTerm(:,j),1));'])
else
eval([sEMG.labels{j},'.standTerm(1:nstandTerm+1)=NaN;'])
end
%%sitIni
if ~isempty(sEMG.sitIni)

eval([sEMG.labels{j},'.sitIni=spline(1:size(sEMG.sitIni(:,j),1),sEMG.sitIni(:,j)'...
',1:(size(sEMG.sitIni(:,j),1)-1)/nsitIni:size(sEMG.sitIni(:,j),1));'])
else
eval([sEMG.labels{j},'.sitIni(1:nsitIni+1)=NaN;'])
end
%%sitTerm
if ~isempty(sEMG.sitTerm)

eval([sEMG.labels{j},'.sitTerm=spline(1:size(sEMG.sitTerm(:,j),1),sEMG.sitTerm(:,j)'...
',1:(size(sEMG.sitTerm(:,j),1)-1)/nsitTerm:size(sEMG.sitTerm(:,j),1));'])
else
eval([sEMG.labels{j},'.sitTerm(1:nsitTerm+1)=NaN;'])
end
end

for j=1:size(FSW.labels,1)
%%lSW
if ~isempty(FSW.lSW)
for i=1:size(FSW.lSW,2)
if ~isempty(FSW.lSW{i})

eval([FSW.labels(j,:),'.lSW(',num2str(i),',:)=spline(1:size(FSW.lSW{i},1),FSW.lSW{1,i}(:,
j)'...
',1:(size(FSW.lSW{i},1)-1)/nSW:size(FSW.lSW{i},1));'])
else
eval([FSW.labels(j,:),'.lSW(',num2str(i),',1:nSW+1)=NaN;'])
end
end
end
%%lST
if ~isempty(FSW.lST)
for i=1:size(FSW.lST,2)
if ~isempty(FSW.lST{i})

eval([FSW.labels(j,:),'.lST(',num2str(i),',:)=spline(1:size(FSW.lST{i},1),FSW.lST{1,i}(:,
j)'...
',1:(size(FSW.lST{i},1)-1)/nST:size(FSW.lST{i},1));'])
else
eval([FSW.labels(j,:),'.lST(',num2str(i),',1:nST+1)=NaN;'])
end
end
end
%%lDS
if ~isempty(FSW.lDS)
for i=1:size(FSW.lDS,2)
if ~isempty(FSW.lDS{i})

eval([FSW.labels(j,:),'.lDS(',num2str(i),',:)=spline(1:size(FSW.lDS{i},1),FSW.lDS{1,i}(:,
j)'...
',1:(size(FSW.lDS{i},1)-1)/nDS:size(FSW.lDS{i},1));'])
else
eval([FSW.labels(j,:),'.lDS(',num2str(i),',1:nDS+1)=NaN;'])
end
end
end
%%rSW
if ~isempty(FSW.rSW)
for i=1:size(FSW.rSW,2)
if ~isempty(FSW.rSW{i})
240


eval([FSW.labels(j,:),'.rSW(',num2str(i),',:)=spline(1:size(FSW.rSW{i},1),FSW.rSW{1,i}(:,
j)'...
',1:(size(FSW.rSW{i},1)-1)/nSW:size(FSW.rSW{i},1));'])
else
eval([FSW.labels(j,:),'.rSW(',num2str(i),',1:nSW+1)=NaN;'])
end
end
end
%%rST
if ~isempty(FSW.rST)
for i=1:size(FSW.rST,2)
if ~isempty(FSW.rST{i})

eval([FSW.labels(j,:),'.rST(',num2str(i),',:)=spline(1:size(FSW.rST{i},1),FSW.rST{1,i}(:,
j)'...
',1:(size(FSW.rST{i},1)-1)/nST:size(FSW.rST{i},1));'])
else
eval([FSW.labels(j,:),'.rST(',num2str(i),',1:nST+1)=NaN;'])
end
end
end
%%rDS
if ~isempty(FSW.rDS)
for i=1:size(FSW.rDS,2)
if ~isempty(FSW.rDS{i})

eval([FSW.labels(j,:),'.rDS(',num2str(i),',:)=spline(1:size(FSW.rDS{i},1),FSW.rDS{1,i}(:,
j)'...
',1:(size(FSW.rDS{i},1)-1)/nDS:size(FSW.rDS{i},1));'])
else
eval([FSW.labels(j,:),'.rDS(',num2str(i),',1:nDS+1)=NaN;'])
end
end
end
%%standIni
if ~isempty(FSW.standIni)

eval([FSW.labels(j,:),'.standIni=spline(1:size(FSW.standIni(:,j),1),FSW.standIni(:,j)'...
',1:(size(FSW.standIni(:,j),1)-1)/nstandIni:size(FSW.standIni(:,j),1));'])
else
eval([FSW.labels(j,:),'.standIni(1:nstandIni+1)=NaN;'])
end
%%standTerm
if ~isempty(FSW.standTerm)

eval([FSW.labels(j,:),'.standTerm=spline(1:size(FSW.standTerm(:,j),1),FSW.standTerm(:,j)'
...
',1:(size(FSW.standTerm(:,j),1)-1)/nstandTerm:size(FSW.standTerm(:,j),1));'])
else
eval([FSW.labels(j,:),'.standTerm(1:nstandTerm+1)=NaN;'])
end
%%sitIni
if ~isempty(FSW.sitIni)

eval([FSW.labels(j,:),'.sitIni=spline(1:size(FSW.sitIni(:,j),1),FSW.sitIni(:,j)'...
',1:(size(FSW.sitIni(:,j),1)-1)/nsitIni:size(FSW.sitIni(:,j),1));'])
else
eval([FSW.labels(j,:),'.sitIni(1:nsitIni+1)=NaN;'])
end
%%sitTerm
if ~isempty(FSW.sitTerm)

eval([FSW.labels(j,:),'.sitTerm=spline(1:size(FSW.sitTerm(:,j),1),FSW.sitTerm(:,j)'...
',1:(size(FSW.sitTerm(:,j),1)-1)/nsitTerm:size(FSW.sitTerm(:,j),1));'])
else
eval([FSW.labels(j,:),'.sitTerm(1:nsitTerm+1)=NaN;'])
end
end

for i=1:size(wkspc,1)
241

eval(['clear ',wkspc{i}])
end

%% save if needed
if (saveY==1)
save([filename,'GC.mat']);
end


242

An example of the Matlab (.m) program to plot the processed EMG data:
%% function to plot the EMG data trials

function runplotEMG

clear all
clc

%% Save ALL the data? Give save folder path
saveY=1;
savepath='C:\Documents and Settings\sbailey\Desktop\EMG dataprocess Progs\';

%% path of the files (folders)
foldpath{1}='D:\adutta\Backup\DW Walk\DW Walk\3-24-2007\';
foldpath{2}='D:\adutta\Backup\DW Walk\DW Walk\3-22-2007\';
foldpath{3}='D:\adutta\Backup\DW Walk\DW Walk\3-20-2007\';
foldpath{4}='D:\adutta\Backup\DW Walk\DW Walk\3-19-2007\';
foldpath{5}='D:\adutta\Backup\DW Walk\DW Walk\3-13-2007\';
foldpath{6}='D:\adutta\Backup\DW Walk\DW Walk\3-12-2007\';
foldpath{7}='D:\adutta\Backup\DW Walk\DW Walk\3-8-2007\';
foldpath{8}='D:\adutta\Backup\DW Walk\DW Walk\3-6-2007\';
foldpath{9}='D:\adutta\Backup\DW Walk\DW Walk\3-5-2007\';
foldpath{10}='D:\adutta\Backup\DW Walk\DW Walk\2-26-2007\';

%% files to process
file{1,1}='1';
file{1,2}='2';
file{1,3}='3';
file{1,3}='8';
file{1,4}='9';
file{1,5}='10';
file{1,6}='11';
file{1,7}='12';
file{1,8}='13';
file{1,9}='14';
file{1,10}='15';
file{1,11}='16';
file{1,12}='17';
%
file{2,1}='1';
file{2,2}='2';
file{2,3}='3';
file{2,4}='4';
file{2,5}='5';
file{2,6}='6';
file{2,7}='8';
file{2,8}='9';
file{2,9}='10';
file{2,10}='11';
file{2,11}='12';
%
file{3,1}='3';
file{3,2}='4';
file{3,3}='5';
file{3,4}='6';
file{3,5}='7';
file{3,6}='8';
file{3,7}='9';
file{3,8}='10';
file{3,9}='11';
file{3,10}='13';
file{3,11}='14';
%
file{4,1}='1';
file{4,2}='3';
file{4,3}='4';
file{4,4}='5';
file{4,5}='6';
file{4,6}='7';
243

file{4,7}='9';
file{4,8}='10';
file{4,9}='11';
file{4,10}='12';
%
file{5,1}='1';
file{5,2}='2';
file{5,3}='3';
file{5,4}='4';
file{5,5}='5';
file{5,6}='6';
file{5,7}='8';
file{5,8}='9';
file{5,9}='10';
file{5,10}='11';
file{5,11}='12';
%
file{6,1}='2';
file{6,2}='3';
file{6,3}='5';
file{6,4}='5';
file{6,5}='6';
file{6,6}='7';
file{6,7}='8';
file{6,8}='9';
file{6,9}='10';
%
file{7,1}='1';
file{7,2}='2';
file{7,3}='3';
file{7,4}='4';
file{7,5}='5';
file{7,6}='6';
file{7,7}='7';
file{7,8}='8';
file{7,9}='9';
file{7,10}='10';
%
file{8,1}='1';
file{8,2}='2';
file{8,3}='3';
file{8,4}='4';
file{8,5}='5';
file{8,6}='6';
file{8,7}='7';
file{8,8}='8';
file{8,9}='9';
file{8,10}='10';
file{8,11}='11';
file{8,12}='12';
%
file{9,1}='1';
file{9,2}='2';
file{9,3}='4';
file{9,4}='5';
file{9,5}='6';
file{9,6}='7';
file{9,7}='8';
file{9,8}='10';
file{9,9}='11';
file{9,10}='12';
file{9,11}='14';
%
file{10,1}='3';
file{10,2}='4';
file{10,3}='5';
file{10,4}='6';
file{10,5}='7';
file{10,6}='8';
file{10,7}='9';

244

%% open the trials data files for processing
flag=0;
count=0;
for jj=1:size(file,1)
for ii=1:size(file,2)
if (~isempty(file{jj,ii}))
filename=[foldpath{jj},'MAtrain',file{jj,ii}]

if (flag==0)
close all
load([filename,'GC.mat'])

%% aggregate the footSW data
sw=['LH';'LT';'RH';'RT'];
phases1=['lSW';'lST';'lDS';'rSW';'rST';'rDS'];
phases2=['standIni ';'standTerm';'sitIni ';'sitTerm '];

for i=1:size(sw,1)
for j=1:size(phases1,1)

eval(['footSW.',sw(i,:),'.',phases1(j,:),'=[',sw(i,:),'.',phases1(j,:),'];']);
end
for j=1:size(phases2,1)

eval(['footSW.',sw(i,:),'.',phases2(j,:),'=[',sw(i,:),'.',phases2(j,:),'];']);
end
end

%% aggregate the EMG data
musc=['m01'; 'm02'; 'm03'; 'm04'; 'm05'; 'm06'; 'm07'; 'm08'; 'm09';
'm10'];
phases1=['lSW';'lST';'lDS';'rSW';'rST';'rDS'];
phases2=['standIni ';'standTerm';'sitIni ';'sitTerm '];

for i=1:size(musc,1)
for j=1:size(phases1,1)

eval(['EMG.',musc(i,:),'.',phases1(j,:),'=[',musc(i,:),'.',phases1(j,:),'];']);
end
for j=1:size(phases2,1)

eval(['EMG.',musc(i,:),'.',phases2(j,:),'=[',musc(i,:),'.',phases2(j,:),'];']);
end
end

%% aggregate the duration data
dur=['tlDS';'tlST';'tlSW';'trDS';'trST';'trSW'];

for i=1:size(dur,1)
eval(['tGC.',dur(i,:),'=[',dur(i,:),'];']);
end
flag=1;
else
[footSW, EMG, tGC]=plotEMG(filename, footSW, EMG, tGC);
end

end
end
end

for i=1:size(musc,1)
eval(['EMG.leftThrMF',musc(i,:),'=(avgRMS(EMG.',musc(i,:),'.rDS)-
avgRMS(EMG.',musc(i,:),'.sitIni))',...
'./(avgRMS(EMG.',musc(i,:),'.standTerm));']);
eval(['EMG.rightThrMF',musc(i,:),'=(avgRMS(EMG.',musc(i,:),'.lDS)-
avgRMS(EMG.',musc(i,:),'.sitIni))',...
'./(avgRMS(EMG.',musc(i,:),'.standTerm));']);
end

if saveY==1
save([savepath,'ALLdata.mat'],'footSW', 'EMG', 'tGC');
245

end

%% Plot the muscle selection data
figure(11)
for i=1:size(musc,1)
eval(['plot(i,EMG.leftThrMF',musc(i,:),',''k.'')']);
hold on
eval(['plot(i,mean(EMG.leftThrMF',musc(i,:),'),''rs'')']);
end
title(' left Trigger ');
figure(22)
for i=1:size(musc,1)
eval(['plot(i,EMG.rightThrMF',musc(i,:),',''k.'')']);
hold on
eval(['plot(i,mean(EMG.rightThrMF',musc(i,:),'),''rs'')']);
end
title(' right Trigger ');

% %% Plot the EMG data
% musc=['m01'; 'm02'; 'm03'; 'm04'; 'm05'; 'm06'; 'm07'; 'm08'; 'm09'; 'm10'];
% phases=['lSW';'lST';'lDS';'rSW';'rST';'rDS'];
% for i=1:size(musc,1)
% for j=1:size(phases,1)
% eval(['figure(2',num2str(i),num2str(j),')']);
% eval(['boxplot(EMG.',musc(i,:),'.',phases(j,:),')']);
% title([musc(i,:),'.',phases(j,:)]);
% end
% end
%
% %% Plot the duration data
% dur=['tlDS';'tlST';'tlSW';'trDS';'trST';'trSW'];
% for i=1:size(dur,1)
% eval(['figure(3',num2str(i),')']);
% eval(['boxplot(tGC.',dur(i,:),')']);
% title(dur(i,:));
% end

function MF=avgRMS(dataMat)
MF=(sqrt(sum((dataMat.^2)')./size(dataMat,2)));

%% This function is for plotting EMG data from gait

%% function plotEMG
function [footSW, EMG, tGC]=plotEMG(filename, footSW, EMG, tGC)

close all
load([filename,'GC.mat'])

%% aggregate the footSW data
sw=['LH';'LT';'RH';'RT'];
phases=['lSW';'lST';'lDS';'rSW';'rST';'rDS'];

for i=1:size(sw,1)
for j=1:size(phases,1)
eval(['isvar = isfield(',sw(i,:),',''',phases(j,:),''');']);
if isvar==1

eval(['footSW.',sw(i,:),'.',phases(j,:),'=[footSW.',sw(i,:),'.',phases(j,:),';',sw(i,:),'
.',phases(j,:),'];']);
end
end
end

%% aggregate the EMG data
musc=['m01'; 'm02'; 'm03'; 'm04'; 'm05'; 'm06'; 'm07'; 'm08'; 'm09'; 'm10'];
phases=['lSW';'lST';'lDS';'rSW';'rST';'rDS'];

for i=1:size(musc,1)
for j=1:size(phases,1)
eval(['isvar = isfield(',musc(i,:),',''',phases(j,:),''');']);
if isvar==1
246


eval(['EMG.',musc(i,:),'.',phases(j,:),'=[EMG.',musc(i,:),'.',phases(j,:),';',musc(i,:),'
.',phases(j,:),'];']);
end
end
end

%% aggregate the duration data
dur=['tlDS';'tlST';'tlSW';'trDS';'trST';'trSW'];

for i=1:size(dur,1)
eval(['isvar = exist(''',dur(i,:),''');']);
if isvar==1
eval(['tGC.',dur(i,:),'=[tGC.',dur(i,:),',',dur(i,:),'];']);
end
end

247

An example of the Matlab (.m) program to find the Discrimination Index from the
Receiver Operating Characteristics plots:
%%% function to find the discrimination index from ROC plots
function [EMGnumTP, EMGnumFP, EMGpctTP, EMGpctFP, EMG_DI, EMGxcorrFalse, EMGxcorrTrue,
thres, W, SE, sep]=DiscrimInd(trueData, falseData, pattern, numIter)

%find the cross correlation for the class FALSE with the pattern template
for i=1:size(falseData,1)
temp=corrcoef(falseData(i,:),pattern);
EMGxcorrFalseAll(i)=temp(1,2);
end

%find the cross correlation for the class TRUE with the pattern template
for i=1:size(trueData,1)
temp=corrcoef(trueData(i,:),pattern);
EMGxcorrTrueAll(i)=temp(1,2);
end

%find the ROC plot by random sampling of the classed TRUE and FALSE and then find the
%Discrimination Index from the ROC plots
for iter=1:numIter
count=1;
rand('state', sum(100*clock));
indT = ceil(rand(floor(length(EMGxcorrTrueAll)/2),1)*(length(EMGxcorrTrueAll)-1))+1
indF = ceil(rand(floor(length(EMGxcorrFalseAll)/2),1)*(length(EMGxcorrFalseAll)-1))+1
EMGxcorrTrue=EMGxcorrTrueAll(indT);
EMGxcorrFalse=EMGxcorrFalseAll(indF);

%find TRUE POSITIVE RATE and FALSE POSITIVE RATE by varying the threshold
for threshold=1:-0.01:-1
thres(iter,count)=threshold;
EMGnumTP(iter,count)=length(find(EMGxcorrTrue>=threshold));
EMGnumFP(iter,count)=length(find(EMGxcorrFalse>=threshold));
EMGpctTP(iter,count)=EMGnumTP(iter,count)/length(EMGxcorrTrue);
EMGpctFP(iter,count)=EMGnumFP(iter,count)/length(EMGxcorrFalse);
count=count+1;
end

%find the ROC plot and the Discrimination Index
EMGroc=[EMGpctFP(iter,:)',EMGpctTP(iter,:)']
EMG_DI(iter)=trapz(EMGroc(:,1),EMGroc(:,2))

%find the statistics for the ROC plot from the Area Under the Curve
count=1;
nT=length(EMGxcorrTrue);
nF=length(EMGxcorrFalse);
for i=1:nT
for j=1:nF
if EMGxcorrTrue(i)>EMGxcorrFalse(j)
S(count)=1;
elseif EMGxcorrTrue(i)==EMGxcorrFalse(j)
S(count)=0.5;
elseif EMGxcorrTrue(i)<EMGxcorrFalse(j)
S(count)=0;
end
xT(count)=EMGxcorrTrue(i);
xF(count)=EMGxcorrFalse(j);
count=count+1;
end
end

W(iter)=sum(S)/(nT*nF)
Q1=W(iter)/(2-W(iter));
Q2=2*W(iter)^2/(1+W(iter));
SE(iter)=sqrt((W(iter)*(1-W(iter))+(nT-1)*(Q1-W(iter)^2)+(nF-1)*(Q2-
W(iter)^2))/(nT*nF))

248

%find the separation between the cluster
sep(iter)=mean(EMGxcorrTrue)-mean(EMGxcorrFalse)

figure(1)
plot(EMGroc(:,1),EMGroc(:,2),'r.-');
hold on
end
hold off

An example of the Simulink model (.mdl) for the EMG-triggered FES system is
provided in the CD that is attached.
249

BIBLIOGRAPHY
A. P. Bradley, "The use of the area under the ROC curve in the evaluation of
machine learning algorithms,"Pattern Recognition, vol. 30, no. 7, 1997, pp. 1145-1159.
A. Dutta, R. Kobetic, and R. J. Triolo, EMG based triggering and modulation of
stimulation patterns for FES assisted ambulation a conceptual study, presented at
XXth Congress of the International Society of Biomechanics, Cleveland, OH, Aug. 2005.
A. Dutta, and R. J. Triolo, Volitional surface EMG based control of FES-assisted
gait after incomplete spinal cord injury a single case feasibility study, presented at
NIH Neural Interfaces Workshop, Bethesda, MD, Sep. 2005.
A. Dutta, and R. Triolo, Stability analysis of Functional Electrical Stimulation
(FES)-assisted overground gait in an incomplete spinal cord injured subject, Journal of
Biomechanics, vol. 39, 2006, pp. S113.
A. Dutta, R. Kobetic, and R. Triolo, Ambulation after incomplete spinal cord
injury with EMG-triggered Functional Electrical Stimulation, IEEE Transactions on
Biomedical Engineering, 55:2, February 2008.
A. E. Hines, P. E. Crago, G. J. Chapman, and C. Billian, Stimulus artifact removal
in EMG from muscles adjacent to stimulated muscles, J. Neurosci. Methods, vol. 64, no.
1, Jan. 1996, pp. 55-62.
A. Hof, H. Elzinga, W. Grimmius, and J. Halbertsma, Speed dependence of
averaged EMG pro-files in walking, Gait and Posture, vol. 16, 2002, pp. 7886.
A. Mansfield, and G. M. Lyons, The use of accelerometry to detect heel contact
events for use as a sensor in FES assisted walking, Med. Eng. Phys., vol. 25, no. 10,
Dec. 2003, pp. 879-885.
250

A. Kralj, and T. Bajd, Functional Electrical Stimulation: Standing and Walking
After Spinal Cord Injury. 1989: CRC Press.
B. G. Lapatki, J. P. van Dijk, I. E. Jonas, M. J. Zwarts, and D. F. Stegeman, A
thin, flexible multielectrode grid for high-density surface EMG, J. Appl. Physiol., vol.
96 2004, pp. 327-336.
B. Smith, Z. Tang, M.W. Johnson, S. Pourmehdi, M.M. Gazdik, J.R. Buckett, and
P.H. Peckham, An externally powered, multichannel, implantable stimulator-telemeter
for control of paralyzed muscle, IEEE Trans Biomed Eng., vol. 45, no. 4, 1998, pp. 463-
475.
C. Angeloni, P. O. Riley, and E. D. Krebs, Frequency Content of Whole Body
Gait Kinematic Data, IEEE Trans. Rehabilitation Engineering, vol. 2, no. 1, 1994, pp.
40-46.
C. D. Mah, M. Hulliger, R. G. Lee, I. S. OCallaghan, Quantitative analysis of
human movement synergies: constructive pattern analysis for gait, Journal of Motor
Behavior, vol. 26, 1994, pp. 83-102.
C. A. Miller, and M. C. Verstraete, Determination of the step duration of gait
initiation using mechanical energy analysis, Journal of Biomechanics, vol. 29, no. 9,
1996, pp. 1195-1199.
C. Ho, Facilitating Ambulation after Incomplete Spinal Cord Injury with
Implanted FES System, presented at 10th Annual Conference of the International FES
Society, Montreal, Canada, July 2005.
251

D. Graupe, and H. Kordylewski, Artificial neural network control of FES in
paraplegics for patient responsive ambulation, IEEE Trans. Biomed Eng., vol. 42, no. 7,
Jul. 1995, pp. 699-707.
D. Graupe, and K. Kohn, Functional Electrical Stimulation for Ambulation by
Paraplegics. 1994: Krieger.
D. Graupe, K. H. Kohn, S. Basseas, and E. Naccarato, Patient controlled electrical
stimulation via EMG signature discrimination for providing certain paraplegics with
primitive walking functions, J. Biomed. Eng., vol. 5, 1983, pp. 220-226.
D. Graupe, EMG pattern analysis for patient-responsive control of FES in
paraplegics for walker-supported walking, IEEE Trans. Biomed. Eng., vol. 36, no. 7,
July 1989, pp. 711-719.
D. A. Winter, Biomechanics and Motor Control of Human Gait: Normal, Elderly
and Pathological. Waterloo Biomechanics, 1991, ch.1.
D. A. Winter, A. O. Quantbury, and G. D. Reimer, Analysis of the instantaneous
energy of normal gait, Journal of Biomechanics, vol. 9, 1976, pp. 253-257.
E. Hardin, R. Kobetic, L. Murray, M. Corado-Ahmed, G. Pinnault, J. Sakai, S.
Nogan, C. Ho, and R. Triolo, Ambulation after incomplete spinal cord injury with an
implanted FES system: a case report, Jour. Rehab R&D, 44:3, 2007, pp. 333-346.
E. H. Melis, R. Torres-Moreno, H. Barbeau, E. D. Lemaire, Analysis of assisted-
gait characteristics in persons with incomplete spinal cord injury, Spinal Cord, vol. 37,
no. 6, June 1999, pp. 430-439.
E. Steinfeld, G. Danford, Eds. Enabling Environments: Measuring the Impact of
Environment on Disability and Rehabilitation. Kluwer/Plenum, 1999.
252

H. J. Hermens, B. Freriks, R. Merletti, D. Stegeman, J. Blok, G. Rau, C.
Disselhorst-Klug, and G. Hagg, SENIAM 8 European Recommendations for Surface
ElectroMyoGraphy. Enschede, Netherlands: Roessingh Research and Development,
1999.
H. Kordylewski, and D. Graupe, Control of Neuromuscular Stimulation for
Ambulation by Complete Paraplegics via Artificial Neural Networks, Neurol. Research,
vol. 23, July 2001, pp.472-481.
H. W. Lilliefors, On the Kolmogorov-Smirnov test for normality with mean and
variance unknown, J. of Am. Stat. Assoc., vol. 62, 1967, pp. 339-402.
I. T. Jolliffe, Principal Component Analysis, New York: Springer, 1986, pp. 44-48,
269-296.
I. P. Pappas, M. R. Popovic, T. Keller, V. Dietz, and M. Morari, A reliable gait
phase detection system, IEEE Trans. Neural Syst. Rehabil. Eng., vol. 9, no. 2, Jun. 2001,
pp. 113-125.
J. B. Dingwell, B. L. Davis, and D. M. Frazier, Use of an instrumented treadmill
for real-time gait symmetry evaluation and feedback, Prosthet. Orthot. Int., vol. 20, no.
2, Aug. 1996, pp. 101-110.
J. B. Dingwell, K. H. Gu, and L. C. Marin, The effects of sensory loss and
walking speed on the orbital dynamic stability of human walking, Journal of
Biomechanics, vol. 40, 2007, pp. 1723-1730.
J. A. Hanley and B. J. McNeil, "The meaning and use of the area under a receiver
operating characteristic (ROC) curve," Radiology, vol. 143, 1982, pp. 29-36.
253

J. M. Jasiewicz, J. H. J. Allum, J. W. Middleton, A. Barriskill, P. Condie, B.
Purcell, and R. C. T. Li, Gait event detection using linear accelerometers or angular
velocity transducers in able-bodied and spinal-cord injured individuals. Gait and
Posture, vol 24, no. 4, 2006, pp. 502-509.
J. Knutson, M. Audu, and R. Triolo, Interventions for mobility and manipulation
after spinal cord injury: a review of orthotic and neuroprosthetic options, Topics in
Spinal Cord Rehab, in press.
L. Bianchi, D. Angelini, G. P. Orani, and F. Lacquaniti, Kinematic Coordination
in Human Gait: Relation to Mechanical Energy Cost, The Journal of Neurophysiology,
vol. 79, no. 4, April 1998, pp. 2155-2170.
M. R. Popovic, T. A. Thrasher, M. E. Adams, V. Takes, V. Zivanovic, and M. I.
Tonack, Functional electrical therapy: retraining grasping in spinal cord injury, Spinal
Cord, vol. 44, 2006, pp. 143151.
N. Bhadra, K.L. Kilgore, and P.H. Peckham, Implanted stimulators for restoration
of function in spinal cord injury, Med. Eng. Phys., vol. 23, 2001, pp. 19-28.
P. J. Friedman, D. E. Richmond, and J. J. Baskett, A prospective trial of serial gait
speed as a measure of rehabilitation in the elderly, Age and Aging, vol. 17, no. 4, 1988,
pp. 227-235.
P. N. Taylor, and P. H. Chappell, Variation in system gain when using voluntary
EMG to control electrical stimulation of the same muscle, presented at 9th Annual
Conference of the International FES Society, Bournemouth, U.K., 2004.
R. Futami, K. Seki, T. Kawanishi, T. Sugiyama, I. Cikajlo, and Y. Handa,
Application of local EMG-driven FES to incompletely paralyzed lower extremities,
254

presented at 10th Annual Conference of the International FES Society, Montreal, Canada,
July 2005.
R. A. Johnson, and D. W. Wichern, Applied Multivariate Statistical Analysis.
Prentice Hall, 2002.
R. Kobetic, and E.B. Marsolais, Synthesis of paraplegic gait with multichannel
functional neuromuscular stimulation, IEEE Trans Rehab Eng., vol. 2, no. 2, 1994, pp.
66-79.
R. Kobetic, R. J. Triolo, and E. B. Marsolais, Muscle selection and walking
performance of multichannel FES systems for ambulation in paraplegia, IEEE Trans.
Rehabil. Eng., vol. 5, no. 1, Mar. 1997, pp. 2329.
R. Kobetic, R. J. Triolo, J. P. Uhlir, C. Bieri, M. Wibowo, G. Polando, E. B.
Marsolais, J. A. Davis Jr., K. A. Ferguson, and M. Sharma, Implanted Functional
Electrical Stimulation System for Mobility in Paraplegia: A Follow-Up Case Report,
IEEE Trans. Rehabil. Eng., vol. 7, no. 4, Dec. 1999, pp. 390398.
R. Kobetic, R. J. Triolo, G. Pinnault, L. Murray, M. Corado-Ahmed, E. Hardin, J.
Sakai, S. Nogan, M. Marsolais, and
R. T. Lauer, R. T. Smith, and R. R. Betz, Application of a neuro-fuzzy network
for gait event detection using electromyography in the child with cerebral palsy, IEEE
Trans. Rehabil. Eng., vol. 52, no. 9, Sep. 2005, pp. 15321540.
R. W. Morris, Accelerometry a technique for the measurement of human body
movements, J Biomech., vol. 6, 1973, pp. 72936.
255

R. Thorsen, R. Spadone, and M. Ferrarin, A pilot study of myoelectrically
controlled FES of upper extremity, IEEE Trans. Rehabil. Eng., vol. 9, no. 2, June 2001,
pp. 161167.
R. J. Triolo, and G. D. Moskowitz, The theoretical development of a multichannel
time-series myoprocessor for simultaneous limb function detection and muscle force
estimation, IEEE Trans. Biomed Eng., vol. 36, no. 10, Oct. 1989, pp. 1004-1017.
R. E. Walpole and R. H. Myers, Probability and Statistic for Engineers and
Scientists. Macmillan, New York, 1990.
R. Williamson, and B. J. Andrews, Gait event detection for FES using
accelerometers and supervised machine learning, IEEE Transactions on Rehabilitation
Engineering, vol. 8, 2000, pp. 312319.
S. Jezernik, G. Colombo, and M. Morari, Automatic gait-pattern adaptation
algorithms for rehabilitation with a 4-DOF robotic orthosis, IEEE Transactions on
Robotics and Automation, vol. 20, no. 3, June 2004.
S. Zhou, M. F. Carey, R. J. Snow, D. L. Lawson, and W. E. Morrison, Effects of
muscle fatigue and temperature on electromechanical delay, Electromyogr Clin
Neurophysiol., vol 38, no. 2, Mar. 1998, pp. 67-73.
SCIIN, Spinal cord injury: facts and figures at a glance - June 2005. 2005, Spinal
Cord Injury Information Network.
T. Carletti, D. Fanelli, and A. Guarino, A new route to non invasive diagnosis in
neurodegenerative diseases, Neuroscience Letters, vol. 394, 2006, pp. 252-255.
T. D. Dickens, Elementary Signal Detection Theory. US: Oxford University Press,
2001, pp. 66, 121.
256

257
T. Sinkjaer, M. Haugland, A. Inman, M. Hansen, and K. D. Nielsen, Biopotentials
as command and feedback signals in functional electrical stimulation systems, Med.
Eng. Phys., vol 25, no. 1, Jan. 2003, pp. 29-40.
T. Sun, T. Lin, J. Chen, Multielectrode surface EMG for noninvasive estimation
of motor unit size, Muscle & Nerve, vol. 22, no. 8, July 1999, pp. 1063 1070.
W. T. Liberson, H. J. Holmquest, D. Scott, M.Dow, Functional electrotherapy:
stimulation of the peroneal nerve synchronized with the swing phase of the gait of
hemiplegic patients, Arch Phys Med Rehabil, vol. 42, 1961, pp. 101-105.
Y. Hurmuzlu, and C. Basdogan, On the measurement of stability in human
locomotion, ASME Journal of Biomechanical Engineering, vol. 116, 1994, pp. 30-36.
Y. Hurmuzlu, C. Basdogan, and D. Stoianovici, Kinematics dynamic stability of
the locomotion of post-polio patients, Journal of Biomechanical Engineering, vol. 118,
no. 3, 1996, pp. 405411.
Z. Tang, B. Smith, J.H. Schild, and P.H. Peckham, Data transmission from an
implantable biotelemeter by load-shift keying using circuit configuration modulator,
IEEE Trans Biomed Eng., vol. 42, no. 5, 1995, pp. 525-528.