Professional Documents
Culture Documents
Contractions
by
Cheryl L. Lynch
Copyright
c 2011 by Cheryl L. Lynch
Abstract
Cheryl L. Lynch
Doctor of Philosophy
University of Toronto
2011
More than one million people are living with spinal cord injury (SCI) in North America alone.
Restoring lost motor function can alleviate SCI-related health problems, as well as markedly
increase the quality of life enjoyed by individuals with SCI. Functional electrical stimulation
(FES) can replace motor function in individuals with SCI by using short electrical pulses to gen-
erate contractions in paralyzed muscles. A wide range of FES applications have been proposed,
but few application are actually available for community use by SCI consumers. A major factor
contributing to this shortage of real-world FES applications is the lack of a feasible closed-loop
control algorithm. The purpose of this thesis is to develop a closed-loop control algorithm that
This thesis consists of three separate studies. The first study examined existing closed-loop
control algorithms for FES applications, and showed that a method of testing FES control
algorithms under realistic conditions is needed to evaluate their likely real-world performance.
The second study provided such a testing method by developing a non-idealities block that can
be used to modify the nominal response of electrically stimulated muscle in simulations of FES
applications. Fatigue, muscle spasm, and tremor non-idealities are included in the block, which
allows the user to specify the severity level for each type of non-ideal behaviour. This non-
idealities block was tested in a simulation of electrically induced knee extension against gravity,
and showed that the nominal performance of the controllers was substantially better than
their performance in the realistic case that included the non-idealities model. The third study
concerned the development and testing of a novel observer-based sliding mode control (SMC)
algorithm that is suitable for use in real-world FES applications. This algorithm incorporated
ii
a fatigue minimization objective as well as co-contraction of the antagonist muscle group to
cause the joint stiffness to track a desired value. The SMC algorithm was tested in a simulation
of FES-based quiet standing, and the non-idealities block was used to determine the probable
performance of the controller in the real world. This novel controller performed very well in
simulation, and would be suitable for use in selected practical FES applications.
The work contained in this thesis can easily be extended to a wide range of FES applications.
This work represents a significant step forward in closed-loop control for FES applications, and
will facilitate the development of sophisticated new electrical stimulation systems for use by
iii
Dedication
This thesis is dedicated to my grandfather, Charlie Card, who first instilled in me a love of
Acknowledgements
I would like to thank my supervisor, Dr. Milos Popovic, for his invaluable guidance and constant
support throughout the ups and downs of my degree. I would also like to thank the members of
the Rehabilitation Engineering Laboratory for their camaraderie and willingness to collaborate,
in particular Dr. Kei Masani, Dr. Dimitry Sayenko, and Zina Bezruk.
Thank you to my parents for believing that microscopes and math games were appropriate
toys for little girls, and for showing me that learning is a lifelong endeavour. Thank you for
playing such a large part in the life of my own daughters, which gave me the time I needed to
complete my degree. It has been a great comfort to know that they are in such good hands.
To my husband, thank you for your unconditional love, support, and patience, and for always
Lastly, thank you to all those individuals with spinal cord injuries who participated in my
experiments. This thesis would not have been possible without your generous help. I hope that
this work will quickly become obsolete due to a cure for spinal cord injury.
iv
Contents
1 Introduction 1
1.2 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Literature Review 9
v
3.3.2 Observer-Based Sliding Mode Control . . . . . . . . . . . . . . . . . . . . 30
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Fatigue Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
vi
6 Observer-Based Sliding Mode Control of Quiet Standing 71
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
7 Discussion 94
8 Conclusions 101
Bibliography 104
Index 120
vii
List of Tables
viii
List of Figures
ix
6.1 Inverted pendulum model of quiet standing . . . . . . . . . . . . . . . . . . . . . 74
6.4 Step and sinusoidal response of PID and SMC for nominal model . . . . . . . . . 87
x
Chapter 1
Introduction
More than one million people are living with spinal cord injury (SCI) in North America [1].
SCI can be caused by diseases that destroy the neurological tissues of the spinal cord or by
trauma that compresses, stretches, or severs this tissue. SCI is often irreversible, and can result
in partial or total loss of sensory or motor function, or both, to the parts of the body below the
level of the injury. For example, an injury to the spinal cord at the lower back usually affects
SCI can cause secondary complications including decubitis ulcers (i.e. pressure ulcers),
muscle spasms, loss of muscle strength and volume, cardiovascular disease, osteoporosis, incon-
tinence, sexual dysfunction, pain, and psychiatric illnesses such as depression and adjustment
disorders. SCI can also result in a reduced level of independence in activities of daily living such
as bathing, dressing, and toilet use, as well as a reduced ability to participate in the community
The restoration of lost motor functions such as grasping, balance during sitting, standing,
and walking may help to alleviate some SCI-related health problems [2]. Restoring lost mo-
tor function can also markedly increase the quality of life enjoyed by individuals with SCI,
as well as their ability to be involved in the community and their employability. For these
reasons, improving motor function in individuals with SCI has been an active research topic in
1
Chapter 1. Introduction 2
The most commonly used technology for restoring or replacing motor function in individuals
with SCI is functional electrical stimulation (FES), which uses short electrical pulses to generate
joints by stimulating one or more muscles that exert torques about the joint. The resulting joint
angle or joint torque can be controlled by modulating the intensity of stimulation delivered to
the flexor and extensor muscles, which actuate the joint in opposite directions.
FES can be used for a wide range of applications in individuals with SCI. FES-based SCI
rehabilitation modalities include muscle strengthening [3,4], gait training [5,6], and grasp reha-
bilitation programmes [7–9]. FES has also been used for neuroprostheses that replace lost motor
function in individuals with SCI, such as systems for grasping [10–12], elbow extension [13, 14],
standing [15–19], walking [20–23], cycling [24], rowing [25], and trunk stabilization [26, 27], and
sitting down from a standing position [28]. New neuroprostheses for improving orthostatic tol-
erance [29–32], relieving pressure on the ischial tuberosities of the hips during sitting [33–35],
and respiratory pacing in an acute health care setting [36, 37] have also been proposed. Figure
Despite the wide range of FES applications that have been reported in the literature, few
FES systems are available for wide-spread use in the community. Commercial FES cycling
systems that are available for individuals with SCI include the RT300 (Restorative Therapies,
Inc.) and the Ergys 2 (Therapeutic Alliances, Inc.). Commercial FES grasping systems include
the NESS H200 (Bioness, Inc.). Commercial FES systems for correcting foot drop include
the ODFS Pace (Odstock Medical, Ltd.), the WalkAide foot drop stimulator (Innovative Neu-
rotronics, Inc.), and the L300 (Bioness, Inc.) Many commercial FES systems for providing
The real-world use of FES neuroprostheses presents many implementation challenges. The
system must be able to run in real-time, which may limit the complexity of the control algorithm
that can be used. An algorithm that requires a lengthy daily tuning process may not be accepted
by potential neuroprosthesis users. The FES system must also be designed to fail safely, so that
Figure 1.1: An FES system in use. An individual with a quadriplegic spinal cord injury practices
grasping and releasing objects using an FES system. Without the FES system, this individual
cannot grasp or release objects. However, by pressing a button located on the wheelchair arm
rest with his left hand, he can trigger the stimulator (not shown) to electrically stimulate the
forearm muscles. The stimulation causes the muscles to contract in a grasping pattern, allowing
him to pick up the toothbrush. The neuroprosthesis is incorporated into the brace that the
Sensors such as electrogoniometers and force transducers are used by closed-loop FES control
systems to gain feedback information on the behaviour of the controlled system. This feedback
data is used by the control system to modulate the control action, and allows the control system
to compensate for changes in the stimulated muscle response and exogenous disturbances.
However, external sensors often provide poor cosmesis, and may also be difficult for users to
don and doff without the assistance of an attendant. In the future, it may be possible to use
implanted sensors to transduce physiological feedback signals from the body, thereby avoiding
Neuroprosthesis systems that use surface electrodes also present a cosmetic problem for some
FES users, since some people prefer not to use obviously visible assistive devices. Moreover, the
repeatability of the electrode placement may be low, and the user may require the assistance
of an attendant for donning and doffing the system. Implanted neuroprosthesis systems avoid
The shortage of practical FES applications is frustrating to SCI consumers and their advo-
cates. One of the major factors contributing to this situation is the lack of feasible closed-loop
FES control algorithms. Closed-loop control is of vital importance to the development of many
types of practical FES applications, because this technique allows the controller to adjust the
and changes in the response dynamics of the stimulated muscles, based on feedback data from
sensors. The aim of the work described in this thesis is to address this issue by developing a
closed-loop FES control algorithm that is suitable for use in real-world FES applications by
1.2 Objective
The objective of the work described in this thesis is to develop a closed-loop control algorithm
that is suitable for implementation in a practical FES system, and is capable of regulating elec-
trically stimulated muscle contractions despite the complex behaviour exhibited by stimulated
The approach that was taken to develop a suitable closed-loop control algorithm for real-world
FES applications consisted of three studies, each of which is represented by a thesis chapter.
In the first study, a systematic analysis of the existing closed-loop control algorithms that have
been proposed for FES applications was conducted. The performance of several representative
control algorithms was evaluated in a simulation of FES-based knee extension against gravity.
The purpose of this analysis was to determine the technical and algorithm design factors con-
tributing to the shortage of practical FES applications that use closed-loop control. Particular
attention was paid to the ways in which the design and testing of these existing controllers
The hypothesis for this study was that the discrepancy between the favourable performance
reported for most controllers in the literature and the paucity of practical applications of these
controllers could be traced to unrealistic testing conditions that were used to determine the
performance of the control algorithms. Moreover, it was anticipated that this study would
suggest that controlling electrically stimulated muscle contractions in the closed-loop would
require a nonlinear control algorithm due to the complex, nonlinear nature of the contractile
In the second study, a new method of testing FES control algorithms in simulation was devel-
oped that allowed a realistic examination of the probable real-world performance of closed-loop
control algorithms for FES applications. A “non-idealities” block for use in FES simulations
was designed and implemented in Simulink (The Mathworks, USA). This block permitted ac-
tual experimentally observed muscle fatigue, spasm, and tremor behaviour to be incorporated
into the nominal simulated response of the electrically stimulated muscles. The experimental
data that were used to develop this block were recorded from individuals who have complete
Chapter 1. Introduction 6
SCI (AIS A) during seated electrically stimulated knee extension against gravity and isometric
The non-idealities block implements fatigue as a modifier between 0 and 1 that scales the
to complete fatigue. The muscle spasm and tremor data is normalized with respect to the
amplitude of the knee movement from which the data was extracted, so that these non-idealities
can be generalized to movements of different amplitudes than the original data. The particular
waveform for each non-ideality type that is used in a simulation run is chosen randomly at
run-time by the non-idealities block from the pool of available non-ideality waveforms. The
non-ideality block also allows the user to specify the desired severity level for the fatigue,
This non-idealities block allowed the performance of closed-loop FES control systems to be
analyzed under conditions that accurately reflect the real-world non-ideal behaviour that can
be expected of electrically stimulated muscle in individuals with SCI. The block also facilitated
the assessment of control performance for the nominal case as well as for the “worst” cases that
can be expected from stimulated muscle in individuals with SCI, such as severe muscle spasms
The hypothesis for this study was that including the non-idealities block in a FES simulation
would result in significantly degraded control performance as compared to the performance with
In the third study, a novel nonlinear closed-loop control algorithm was developed that was
suitable for use in real-world FES applications. This algorithm was an observer-based sliding
mode controller (SMC) that was designed to be robust to the disturbances and model parameter
changes that are inherent in controlling electrically stimulated muscle contractions. This design
also reflected the insights that were obtained from the analysis of existing FES control strate-
gies in study one. The observer-based SMC was tested in a simulation of FES-induced quiet
standing in an individual with complete SCI, and used the non-idealities block to determine
Chapter 1. Introduction 7
the probable real-world performance of this controller in the presence of non-ideal stimulated
muscle responses.
The hypothesis for this study was that the observer-based SMC would control the quiet
standing application more accurately than a standard FES control algorithm such as proportional-
integral-derivative (PID) control. Moreover, it was expected that this algorithm would be ca-
pable of regulating a wider range of non-ideal stimulated muscle behaviour than a standard
PID controller while still guaranteeing the stability of the controlled system.
1.4 Applications
The novel observer-based SMC algorithm presented in this thesis could be readily applied to
other FES systems. Moreover, this technology was developed using data from complete SCI
subjects, but could be applied equally well to other populations with a neurological disability
such as incomplete SCI or stroke. The availability of reliable closed-loop algorithms for FES
applications, such as the algorithm presented in this thesis, will facilitate the development of
practical FES applications such as systems for walking, dynamic grasping, and balance while
standing, sitting, or wheeling that can be used by neurologically impaired individuals in their
everyday lives.
This work represents a significant step forward in the state of the art for FES control
algorithms. In fact, the portion of this work that was presented at a prestigious international
conference was very well received by the FES research community, and won a best-paper award
for its contribution to the field [38]. The results contained in the papers that comprise this
thesis can be immediately applied by the FES community to other FES systems, potentially
improving the performance of many different types of FES applications. Moreover, this work
shows that nonlinear control methods can be feasible and simple to use for FES systems. It is
the author’s hope that this work will allow the end users of FES systems to benefit from the
sophisticated applications that can be developed using modern control technologies, instead of
being forced to settle for unsuitable and outdated control techniques that are not adequate for
This thesis is based on a series of three individual studies. Each study is presented in a separate
chapter that has its own introduction, methods, results, and discussion sections. The author’s
publications that are related to each chapter are cited after the description of the chapter below.
Chapter 2 provides background material on muscle physiology, SCI, FES and its applica-
tions, and models of electrically stimulated muscle behaviour. This chapter also reviews the
closed-loop control algorithms that have been used for FES applications. [39]
Chapter 3 presents the theory behind the closed-loop control algorithms that are used in
this thesis.
Chapter 4 contains an analysis of existing closed-loop control algorithms for FES appli-
cations, and presents the performance of several representative controllers while regulating a
simulation of knee extension against gravity. This chapter also discusses some of the reasons
behind the relative scarcity of practical controllers for FES applications for use in the commu-
Chapter 5 presents the design of the non-idealities block that was developed to provide
a way of testing FES controllers in the presence of real-world non-ideal behaviour, and also
Chapter 6 discusses the design and implementation of a novel observer-based SMC algorithm
for use in real-world FES applications. This chapter also compares the performance of this novel
controller and a standard PID controller for regulating electrically induced quiet standing in
the presence of non-ideal behaviour from the stimulated muscles [47, 48]
Chapter 7 discusses the results of these studies taken together, and Chapter 8 presents the
Literature Review
The principal functions of skeletal muscle are to maintain body posture and produce movement.
Muscle cells are long, thin cells called muscle fibres. The muscle fibres are grouped to form
muscle fascicles. The fascicles are interspersed with blood vessels and nerves, and are bundled
together to form skeletal muscle. Collagen fibres hold the muscle fascicles together, and unite at
the ends of the muscle to form tendons. Tendons attach to the bones, providing a link between
the muscles and bones by which muscles can exert forces on the bones and torques about the
joints of the body. Figure 2.1 shows the anatomy of skeletal muscle.
The muscle cell membrane, or sarcolemma, both surrounds each muscle cell and extends into
the interior of the cell in the form of transverse tubules. This structure ensures that the diffusion
of products into the muscle cell can happen rapidly and nearly simultaneously throughout the
cell. When a contraction stimulus (i.e., action potential) arrives at a muscle cell, calcium ions
(Ca2+ ) are released into the muscle cell, triggering the muscle fibre to contract via a series of
chemical reactions. The cell contracts uniformly along its length because the Ca2+ ions are able
to reach all parts of the cell at nearly the same time, due to the network of transverse tubules
The main classes of muscle fibres are fast-twitch and slow-twitch fibres. Fast-twitch fibres
respond quickly to a contractile impulse but also fatigue quickly. Slow-twitch fibres are more
9
Chapter 2. Literature Review 10
fatigue resistant than fast-twitch fibres, but respond more slowly to a contractile impulse than
fast-twitch fibres. The ratio between fast-twitch and slow-twitch fibres in a muscle depends on
the function of the muscle. Also, the composition of a muscle can change over time depending
on the type of contractions to which it is subjected [50]. For example, sprinters develop a higher
proportion of fast-twitch fibres in their leg muscles than distance runners. This difference in
muscle composition occurs because sprinters need muscles that respond quickly, but don’t need
the muscles to work for an extended period of time, whereas distance runners need muscles
Skeletal muscle activity is controlled by the nervous system in neurologically intact individ-
uals. Voluntary skeletal muscle contractions are initiated by electrochemical signals from the
brain, which propagate through the nervous system to a motor neuron. Each motor neuron,
together with the muscle fibres innervated by the motor neuron, form a motor unit. Muscles
that are involved in gross movements, such as leg muscles, have few motor units, each of which
includes a large number of muscle fibres. Muscles that are involved in fine movements, such as
facial muscles, have many motor units, each of which includes a small number of muscle fibres.
When an action potential arrives at the junction between the motor neuron and the muscle
fibre, molecules of the neurotransmitter acetylcholine are released into the junction gap. The
acetylcholine binds to receptors on the muscle fibre, causing Ca2+ ions to be released into the
the action potential arriving at the motor junction and the onset of the muscle fibre contraction,
due to the chain reaction of chemical events that must take place [51]. The acetylcholine in
the junction gap is broken down very quickly by the enzyme acetylcholinesterase, meaning that
each nerve impulse results in a very short contraction of the innervated muscle fibres.
The energy required to contract muscles is stored in the muscle cells in the form of adenosine
triphosphate (ATP) and creatine phosphate. These products are rapidly exhausted when the
muscle fibre contracts, resulting in muscle fatigue. Eventually, the muscle cell runs out of
energy, and must rebuild its stores of ATP or creatine phosphate, or both, in order to contract
again.
Tension is produced in skeletal muscle by contracting muscle fibres. However, many fibres
Chapter 2. Literature Review 12
must work together in order to produce enough tension to do useful work. The body achieves
gradations of muscular effort by recruiting varying numbers of motor units. For example, a task
requiring maximum muscular effort uses almost all of the motor units in the muscle, resulting
A single impulse in a motor neuron results in a fast, transient contraction of a single motor
unit. Therefore, a motor neuron must deliver a train of impulses to its associated muscle fibres
to maintain a constant contraction in the portion of the muscle innervated by the motor unit.
Typically, voluntary muscle contractions involve sustained, constant tension. The body achieves
this constant tension, known as a tetanic contraction, by activating adjacent motor units at a
impulse to its muscle fibres before the adjacent motor unit relaxes from the previous contractile
impulse [52], as shown in Figure 2.2. This method of sustaining a muscle contraction, known
as asynchronous recruitment, allows the various motor units to share the work of maintaining
a muscle contraction. Asynchronous recruitment ensures that the muscle fatigues slowly, since
each motor unit is active only part of the time. Moreover, each motor unit has an opportunity
to re-build its energy stores while it is resting, slowing the rate of fatigue exhibited by the
muscle as a whole.
SCI is caused by diseases that destroy the neurological tissue of the spinal cord, or by trauma
that compresses, stretches, or severs this tissue. Traditionally, a large proportion of those
affected by SCI have been young males who sustained a traumatic SCI while engaged in risk-
taking behaviour. In recent years, the incidence of SCI in older adults has increased to the
point where this population forms a large proportion of those who sustain a SCI. These injuries
are frequently due to non-traumatic causes such as tumors or surgical side-effects, but can also
SCI is often irreversible, and usually results in partial or total loss of sensory or motor
function (i.e., paralysis), or both, to the parts of the body below the level of the injury. In
Chapter 2. Literature Review 13
Total Tension
in Muscle
Tension
MU #3
Tension Tension
MU #1 MU #2
Time (ms)
Figure 2.2: Production of tetanic contraction (adapted from [53]). The production of tension in
“MU” in the figure. The stimulation is timed by the intact neurological system so that each
motor unit contracts before the previously stimulated motor unit relaxes completely. The
tension in the overall muscle is the sum of the tensions in the individual motor units.
Chapter 2. Literature Review 14
many cases, SCI also disrupts the autonomic nervous system, which regulates visceral functions
such as blood pressure, heart rate, body temperature, and digestive processes.
A SCI that results in total loss of sensory and motor function to the affected parts of the
body is referred to as a complete SCI, and is classified as an AIS A injury, where AIS is an
acronym for the American Spinal Injury Association (ASIA) Impairment Scale [54]. Other types
of SCI are referred to as incomplete SCI, and are classified as AIS B through D, depending on
As mentioned in Section 1.1, SCI can also cause secondary complications such as decubitis
ulcers (i.e., pressure ulcers), muscle spasms, loss of muscle strength and volume, cardiovascular
and psychiatric conditions such as depression and adjustment disorders. These SCI-related
health problems can sometimes be improved by restoring motor functions such as grasping,
standing, and walking. Restoring lost motor function can also markedly increase the quality of
SCI is also associated with several phenomena that affect control system design for FES
applications, including spasticity, spinal reflexes, muscle tremors, and disuse atrophy of the
affected muscles.
degrees of increased muscle tone [55]. In the absence of supra-spinal signals, muscles can develop
A paralyzed muscle does not exhibit voluntary contractions because it receives no signals from
the brain. However, the muscle can still contract in response to other stimuli, such as electrical
stimulation or pain. Spasticity can be treated to some extent by physiotherapy or drug therapy,
but is often conservatively treated [56], and may be present in some FES users.
Spinal reflexes are feedback loops in the central nervous system (CNS) [52]. Some spinal
reflexes involve only a single synapse between two motor neurons, whereas others are complex,
multi-synaptic reflexes. An example of a simple reflex is a stretch reflex, where a rapid stretch
perturbation applied to a muscle results in a rapid and immediate contraction of the muscle.
An example of a complex reflex is the flexion withdrawal reflex, which causes a limb to rapidly
Chapter 2. Literature Review 15
recoil toward the body in response to a pain stimulus in an extremity. Complex CNS feedback
loops can involve neural circuits and oscillators formed by connections between neurons in the
spinal cord, and sometimes involve the brain stem and other phylogenetically primitive parts
of the brain.
Spinal reflexes that originate in the spinal cord below the level of injury are often present in
individuals who have SCI, although these reflexes may be significantly altered (i.e., heightened
or depressed) as a result of the injury [57]. These reflexes may be activated during FES-
induced muscle contractions, causing exogenous contractile signals to be sent to the paralyzed
muscles in parallel with the FES control signal. For example, walking is controlled in part by a
neuronal circuit located in the spinal cord called a central pattern generator (CPG) [52]. When
an individual with SCI uses FES for walking, a CPG might generate a walking pattern that
conflicts with the pattern of muscle contractions induced by the FES walking system [58].
Muscle tremors are typically due to incomplete tetanus of the stimulated muscle contrac-
tion. Tremors can occur when the stimulation intensity is slightly too low to elicit a tetanic
contraction, but also commonly occur when the stimulated muscle becomes so fatigued that it
can no longer produce the tension required to create a tetanic contraction, even at the maximum
stimulation intensity.
Muscle that does not receive regular exercise undergoes disuse atrophy and converts to a
higher proportion of fast-twitch fibres than is present in active muscle [50]. Many people with
SCI have extensive disuse atrophy in their affected muscles [55]. Consequently, the affected
muscles are weak and fatigue quickly, and have become mostly composed of fast-twitch fibres.
However, disuse atrophy is often a fully or partially reversible process since the affected muscles
can be re-trained with electrically stimulated weight-bearing exercise to increase their strength
and fatigue resistance [55]. This re-training process can also occur as a beneficial side effect of
The most commonly used technology for replacing lost motor function in individuals with
SCI is functional electrical stimulation (FES), which involves artificially inducing a current in a
specific motor nerve to generate a skeletal muscle contraction. This is accomplished by applying
a series of short electrical pulses to the nerve using electrodes [59]. These electrodes can be
transcutaneous (i.e., temporarily affixed to the skin surface), epimysial (i.e., surgically affixed
to the surface of the muscle), percutaneous (i.e., surgically placed within the muscle), cuff (i.e.,
surgically wrapped around the nerve that innervates the muscle of interest), or intraneural (i.e.,
surgically inserted into the nerve that innervates the muscle of interest) [55].
waveform, the frequency of stimulation, and the stimulation intensity. The stimulation intensity
is a function of the total charge transferred to the muscle, which depends on the amplitude and
pulse width of stimulation. In Figure 2.3, the two waveforms shown result in the same charge
transfer to the muscle even though their amplitudes and pulse widths are different. A biphasic
stimulation waveform is typically used in FES applications to prevent tissue damage; biphasic
pulses induce charge transfer into the tissue and then immediately remove the charge from the
tissue to prevent galvanic processes that may cause tissue damage [59].
amplitude amplitude
time time
FES can be used to induce joint movement by stimulating the flexor and/or extensor muscles
of the joint. The angle of the joint, or, alternatively, the torque about a joint, can be regulated
by varying the tension produced in the flexor and extensor muscles of the joint. Consequently,
the joint angle or joint torque can be controlled by modulating the stimulation pulse duration,
Chapter 2. Literature Review 17
amplitude, or frequency. Typically, either the pulse duration or amplitude is regulated. Also,
the resistance of the stimulated tissue can vary day to day. Therefore, to ensure that a pre-
dictable amount of charge is transferred to the stimulated tissue despite this variable resistance,
current regulated stimulation is typically used for FES applications instead of voltage regulated
stimulation.
As discussed in Section 2.1, muscles show increasing signs of fatigue as they progressively
expend their available energy resources. If muscles are artificially stimulated to the point of
fatigue, their response changes nonlinearly as their energy stores are depleted. Eventually, the
muscle will no longer be able to produce tension. Figure 2.4 shows four fatigue patterns that
50 50
40 40
Force (N)
Force (N)
30 30
20 20
10 10
0 0
0 5 10 15 20 25 0 5 10 15 20 25
Time (s) Time (s)
50 50
40 40
Force (N)
Force (N)
30 30
20 20
10 10
0 0
0 5 10 15 20 25 0 5 10 15 20 25
Time (s) Time (s)
Figure 2.4: Force exerted by quadriceps versus time. These plots show the force exerted by the
quadriceps muscle group when subjected to electrical stimulation. The data were collected on
different days from an individual who had sustained a SCI resulting in complete paralysis of
the lower extremities [60]. Four different force decay profiles are shown, representing the wide
range of force profiles that can be seen as the muscle fatigues in response to stimulation.
FES recruits motor units in a synchronous manner, unlike the asynchronous recruitment
Chapter 2. Literature Review 18
of motor units that occurs in the intact nervous system. Synchronous recruitment means that
FES stimulates all of the motor units at the same time, instead of rotating through the motor
units as is done by the nervous system. For this reason, achieving tetanic contractions with
FES stimulation requires a much higher stimulation frequency (i.e., frequencies greater than
16 Hz, with typical values being 20 to 40 Hz) than the frequency required to achieve tetanic
contractions with the asynchronous recruitment used by the intact nervous system (i.e., 6 to
8 Hz). This higher stimulation frequency is the main cause of the increased rate of fatigue
Furthermore, FES has a tendency to recruit the fast-twitch muscle fibres before the slow-
twitch muscle fibres. This order of fibre recruitment, known as non-physiological recruitment,
is the opposite of natural muscle fibre recruitment order, in which the slow-twitch fibres are
recruited first. Non-physiological recruitment happens because the fast-twitch fibres are in-
nervated by axons with a larger diameter than the diameter of the axons that innervate the
slow-twitch fibres. Since fast-twitch fibres fatigue more quickly than slow-twitch fibres, the non-
physiological order of recruitment that occurs with FES also contributes to the increased rate of
fatigue seen with artificial stimulation as compared to natural stimulation. Currently, there is
no way to avoid the synchronous motor unit stimulation or non-physiological recruitment that
occurs with FES when transcutaneous electrodes are used. Several selective nerve-block stimu-
lation techniques that aim to provide more natural motor unit stimulation are available [61,62].
However, these techniques require nerve cuff electrodes, which must be surgically implanted in
the user.
Regardless of the type of electrode used, it is possible to increase the fatigue resistance of
electrically stimulated muscle by intensive muscle training using FES [9]. This training causes
an increase in the strength and volume of the muscles, which increase the fatigue resistance of
the muscle. Regular stimulation with FES causes the composition of muscle to change; over
time, some of the fast-twitch fibres change to slow-twitch fibres. This change in composition
increases the fatigue resistance of the muscle, and introduces another time-varying factor that
Many real-world FES applications require the ability to modulate the pulse-to-pulse electrical
stimulation in real-time to compensate for fatigue, muscle spasms and tremors, muscle re-
training effects, and day-to-day changes in the stimulated muscle response, as well as modeling
errors and exogenous disturbances. Closed-loop control can be used to address these challenges.
The most common test beds for evaluating control of FES-based muscle contractions are
unsupported quiet standing and knee extension against gravity. Control algorithms for regula-
tion of cyclic movements such as gait patterns, and regulation of wrist and elbow movements
have also been reported. The important work in each of these areas is discussed below, and is
Riess and Abbas developed an adaptive neural network controller for regulating cyclic move-
ments of the electrically stimulated quadriceps muscle [63, 64]. The authors reported good re-
sults with this approach, but noted that it required 10 minutes of data collection and a lengthy
training process each time it was used. The extended calibration time required makes this
Lemay and Crago used PID control to regulate wrist movements using FES in quadriplegic
individuals [65]. Micera, Sabatini, and Dario studied fuzzy logic control of electrically stimulated
co-contracting elbow flexion and extension muscles [66]. Adamczyk and Crago investigated the
use of a neural network to control co-contraction of electrically stimulated hand and wrist
muscles [67].
Davoodi and Andrews developed a fuzzy logic system for controlling a FES rowing ap-
plication [25], and reported that the fuzzy logic controller resulted in less fatigue and longer
rowing duration than PID control. However, the success of this control strategy was achieved
by manually tuning the rules of the fuzzy logic controller to obtain the desired response. This
Abbas and Chizeck used a PID controller to regulate quiet standing in SCI subjects [68].
Jaime, Matjacic, and Hunt [69] and Matjacic, Hunt, Gollee, and Sinkjaer also implemented PID
controllers for quiet standing [70], although Matjacic et al. noted that the derivative action of
Chapter 2. Literature Review 20
Table 2.1: Closed-loop FES control algorithms. NN denotes neural network, FL denotes fuzzy
logic, ∗ denotes success in laboratory testing, ∗∗ denotes success in real-world applications, and
† denotes that PID control is used, which is unsuitable for practical FES applications.
Authors Year Application Controller Advantages Disadvantages
PID controllers can amplify high-frequency system dynamics and lead to system instability.
Hunt, Jaime, and Gollee [71] and Holderbaum, Hunt, and Gollee [72] used robust H∞
control for regulating quiet standing in able-bodied and SCI subjects, respectively. Gollee,
Hunt, and Wood compared H∞ and linear quadratic Gaussian (LQG) control for regulating
quiet standing [16]. The results of this work showed that the subject was able to maintain
standing balance and to reject a perturbation of approximately 1◦ of sway angle in the anterior
direction using a strategy of combined FES stimulation and voluntary bracing using his arms.
Matjacic and Bajd also successfully controlled FES-based quiet standing [18]. This work
showed that it is possible for an individual with SCI to use FES to stabilize his or her legs
in an extended position and provide ankle stiffness, while using voluntary control of trunk
movements to maintain standing balance. The work done by Hunt and colleagues [16, 71, 72]
and Matjacic and Bajd [18] relied on voluntary torso movements to oppose the effects of the
plantarflexor muscles, however it should be possible to achieve the same result by co-contracting
Hatwell, Oderkerk, Sacher, and Inbar developed a model reference adaptive controller for
regulating knee movement in SCI subjects [73]. The controller tracked angles at the ends of
the range of motion quite well, but exhibited poor control of mid-range angles. The authors
also noted that the nonlinear recruitment characteristics of muscle and the disturbances arising
from spastic reflexes would cause problems with the adaptive control algorithm that they chose,
Vette, Masani, and Popovic demonstrated that the intact neurological system may employ
a PD-like control strategy to maintain quiet standing using plantarflexor contractions only [19].
However, Vette et al.’s colleague Tan noted that paralysis of the plantarflexor and dorsiflexor
muscles results in reduced ankle stiffness in individuals with SCI, leading to oscillation of the
Chang et al. reported a combined neural network/PID control system for FES-based knee
joint control [75]. The neural network was trained to obtain the inverse dynamics of the knee
joint, and was then used for feedforward control. A fixed-parameter PID controller was used
as a feedback controller in parallel with the feedforward controller to compensate for residual
Chapter 2. Literature Review 22
tracking errors caused by disturbances and modeling errors. This system was tested on one
able-bodied subject and one paraplegic subject. The authors found that the combined neuro-
PID controller performed better than classic fixed-parameter PID control. However, the neural
network may have to be re-trained each time the system was used in order to generate a
Ferrarin, Palazzo, Riener, and Quintern compared an adaptive control algorithm with a
algorithms were tested with SCI subjects, and showed that the adaptive controller provided
the best performance in the presence of muscle fatigue. However, the authors noted that
the adaptive controller was only applicable to periodic movements, due to the nature of the
algorithm.
Previdi and Carpanzano used a gain scheduling controller to regulate FES-induced knee
movement [77]. This controller interpolated between local linear quadratic regulators. The
regulators were defined using a nonlinear model of the knee dynamics that was linearized at a
Jezernik, Wassink, and Keller used sliding mode control to regulate knee angle [78]. Jezernik
et al. used a continuous sliding control law to avoid the problem of chattering in the control,
and tested the controller using both able-bodied and SCI subjects. Good tracking of the desired
Ajoudani and Erfanian show that a sliding mode controller, in combination with a neural
network controller, can be used to regulate FES-induced knee movements [79]. Kobravi and
Erfanian present an adaptive sliding mode controller for regulating ankle angle with FES that
Several models of electrically stimulated knee extension against gravity are available in the
literature [73, 81–87]. These models describe knee angle as a function of quadriceps muscle
stimulation in the seated position, and are summarized in Table 2.2. Hatwell et al. [73] proposed
Chapter 2. Literature Review 23
a deterministic, autoregressive moving average (DARMA) model of the leg dynamics during
knee movement. Previdi presented a nonlinear autoregressive exogenous (NARX) model of knee
movement that resulted from FES induced quadriceps muscle contractions [81]. Ferrarin and
Pedotti used a nonlinear second-order system to model the dynamics of the knee and lower leg,
and a one-pole transfer function to model the relationship between stimulation pulse width and
quadriceps torque [82]. Ferrarin and Pedotti tested their model with both able-bodied and SCI
subjects. Perumal, Wexler, and Binder-MacLeod proposed a model of knee angle in response
to various quadriceps stimulation parameters and different inertial loads at the ankle, and
tested the model with healthy subjects [83]. All of these models provide detailed, deterministic
information, but are not designed to capture the large amount of day-to-day and fatigue-related
variation in electrically stimulated knee angle that is seen in individuals with SCI.
Table 2.2: Models of seated knee extension against gravity. NL denotes nonlinear characteris-
istics.
Authors Year Advantages Disadvantages
Ferrarin & Pedotti 2000 Simple model Doesn’t capture NLTV char.
include some sources of variation. Schauer et al. proposed a model that uses a time-varying
component to describe day-to-day variation in the stimulated knee angle [84]. Marion et al.
presented a series of models that predicted fatigue as a function of knee angle for electrically
stimulated quadriceps contractions in able-bodied individuals [85, 86]. Riener, Quintern, and
Schmidt proposed a knee model that included intra-session variation due to fatigue [87]. Reiner’s
Chapter 2. Literature Review 24
model described the dynamics of the knee in response to electrically stimulated contractions of
13 muscles and also accounted for tendon tissues. The nonlinear dynamics of the body segments,
muscle fatigue, and passive muscle velocity were included in this model. Riener’s model was
based on experimentally obtained data, and was tested with five untrained paraplegic subjects.
Chapter 3
Used in Thesis
simple, reliable, and has well-established tuning methods [88]. A standard PID controller can
be described by
d
Z
P WQU ADS (t) = KP e(t) + KI e(t)dt + KD e(t),
dt
where KP is the proportional gain, KI is the integral gain, KD is the derivative gain, and e(t) is
the tracking error between the reference signal and the actual system behaviour. Several tuning
algorithms are available for PID controllers, such as the well-known Zeigler-Nichols method [88].
PID is by far the most commonly used control algorithm in industrial applications [89], and
has also been applied to several FES systems [65,68,69]. However, PID controllers are designed
to regulate linear time-invariant (LTI) systems, and commonly exhibit degraded performance
if the system model changes or there are unmodeled or external disturbances. Since FES
applications are nonlinear and time-varying (NLTV), and are subject to both variation in
the model parameters and exogenous disturbances, PID control may not be the best choice
for real-world FES applications. PID control is included in the simulations described in this
thesis despite its obvious drawbacks because of the high level of comfort most neuromodulation
25
Chapter 3. Closed-Loop Control Algorithms Used in Thesis 26
accumulation of the integral term when the control exceeds the saturation limit of the actuator.
Figure 3.1: Block diagram of anti-windup PID controller. θ denotes feedback signal and u
Gain scheduling control (GSC) involves linearizing a nonlinear system model at a series of
operating points that represent the operating region of the system. Consider a nonlinear system
of the form
Σ: ẋ = f (x, u)
y = g(x, u).
Let an operating point be denoted (x0 , u0 ). Therefore, the linearization of Σ about (x0 , u0 ) is
given by
d ∂f (x, u) ∂f (x, u)
Σlin : (x0 + δx) = f (x0 , u0 ) + · δx + · δu + h.o.t.
dt ∂x (x0 ,u0 ) ∂u (x0 ,u0 )
∂g(x, u) ∂g(x, u)
y0 + δy = g(x0 , u0 ) + · δx + · δu + h.o.t.,
∂x (x0 ,u0 ) ∂u (x0 ,u0 )
A local linear controller is designed at each operating point. Next, a scheduling variable is
chosen that, ideally, captures the nonlinearity of the system and also varies slowly in comparison
to the system dynamics [90]. The scheduling variable is used to interpolate between the local
Gain scheduling control algorithms can be used very successfully when the operating points
and scheduling variable are chosen appropriately. However, the performance of the controller
may be reduced if the system goes outside the span of the operating points, or if the system
model is not sufficiently accurate. Also, gain scheduling controllers can involve a lengthy tuning
It is particularly difficult to select a scheduling variable for FES applications that captures
the nonlinearity of the system in real-time. Typically, knee angle is used as the scheduling
variable for knee control implementations of gain scheduling control, since knee angle varies
relatively slowly and also captures nonlinearities related to knee angle and varying muscle
length. However, knee angle does not capture other nonlinearities including fatigue, muscle
Sliding mode control (SMC) involves defining a control law that causes the state of the system
to converge toward a chosen sliding manifold in finite time, and then evolve along that manifold
toward a goal state in possibly infinite time [91–93]. In the context of this thesis, the manifold is
the n-dimensional analogue of a line in R2 −space. SMC provides good tracking performance, is
inherently adaptive, and requires that a relatively small number of parameters be tuned. This
controller also guarantees stability, provided that an accurate plant model is used to develop
The sliding manifold is designed to ensure that, once the system state has reached the
manifold, the state will remain on the manifold. This behaviour is referred to as the “sliding
mode” of the controller. Moreover, the manifold is also designed to guarantee that the state
will converge asymptotically toward the goal state in possibly infinite time. The SMC control
Chapter 3. Closed-Loop Control Algorithms Used in Thesis 28
law is designed force the system state to converge to the sliding manifold in finite time.
ẋ = f (x) + B(x)u
y = h(x)
where the state vector x ∈ Rn , the input vector u ∈ Rm , the output vector y ∈ Rp , and
f (x), B(x), and h(x) are smooth vector fields on Rn . The sliding manifold is defined to be
m(x, w) = 0, where w ∈ Rn is the state reference vector. Since this thesis is concerned with
designing an output-feedback control law to drive the tracking error between w and x toward
zero, the manifold is defined on the error space e ∈ Rn , where e = w − x. Assuming that n = 2
where ẋ1 = x2 , ẇ1 = w2 , e1 = w1 − x1 , e2 = ė1 = w2 − x2 , and λ > 0. Notice that this manifold
guarantees the stability of the sliding mode, since the definition of the sliding manifold m(e) = 0
implies that ṁ(e) = 0 as well. Moreover, once m(e) = 0, e2 = ė1 = −λe1 , which guarantees the
This implies that ė2 = −λe2 , which guarantees the asymptotic convergence of e2 → 0, as well.
Therefore, this choice of manifold guarantees that the error state will remain on the manifold
once it has reached the manifold, and will then converge asymptotically toward the goal state
e = 0.
The sliding mode control law must guarantee the reachability of the sliding manifold by
forcing the system state to reach the manifold in finite time. For example, if the control law is
chosen to be
u = −κ sgn[m],
where sgn denotes the signum function, then the error state will be driven toward the sliding
manifold, since u > 0 when m < 0 and u < 0 when m > 0. When m = 0, u = 0, since the error
The major disadvantage of SMC is its susceptibility to “chattering” – switching rapidly back
and forth between different control actions as the system approaches the sliding manifold [93].
Chattering is due to the presence of parasitic actuator and sensor dynamics as well as delay in
the switching control action. Chattering is undesirable because it can result in unstable high-
frequency oscillation about the sliding manifold, which can lead to poor controller performance
or controller failure. Many approaches have been proposed to solve the chattering problem
in SMC. Two of these proposed solutions are used in this thesis: boundary layer SMC and
observer-based SMC.
Boundary layer SMC involves defining a modified control law that replaces the switching element
of the SMC control law with a smooth approximation of the switching element within a small
boundary region that encompasses the manifold. Slotine and Li were the first to propose this
solution to the chattering problem, and suggested replacing the switching function with high-
gain proportional feedback [94]. Continuing the example in the preceding section, a boundary
layer SMC could be implemented by substituting the modified control law u = −κ m for the
SMC control law u = −κ sgn[m] within a boundary layer of the manifold of thickness ψ.
−κ1 sgn[m] ∀ d > ψ
u=
−κ2 m
∀d≤ψ
where κ1 > 0, κ2 > 0, ψ > 0, and d is the distance from the error state to the manifold.
The disadvantage of boundary layer control is that, unless the parasitic dynamics of the
system are accurately known, a relatively large boundary region must be implemented to avoid
chattering. Since the finite-time convergence of SMC is not guaranteed by the proportional
feedback control law implemented inside the boundary region, the attractive features of SMC
Observer-based SMC uses an asymptotic observer to estimate the system state and to close
a high-frequency by-pass loop around the controlled plant. Provided that the observer error
(i.e., the error between the actual system state and the estimated state) is less than the plant
error (i.e., the error between the actual plant dynamics and the nominal plant dynamics), and
that the control is discontinuous with respect to the observer variables only, then all of the
chattering will be located inside the by-pass loop. In this configuration, chattering will exist in
the observer, but will not excite any high-frequency dynamics in the plant [93, 95].
If the system can be represented in linear time-invariant form, then a Luenberger observer
[88] can be used to provide asymptotic convergence of the observer error x̃ = x − x̂ to zero. Let
ẋ = Ax + Bu
y = Cx.
Let the observer state be x̂ = [x̂1 x̂2 ]T , and let the observer state dynamics be
ŷ = C x̂,
where xs is the output feedback, and L is the observer gain. Choosing L such that (A − LC) is
Hurwitz guarantees asymptotic convergence of the observer error x̃ toward zero [88]. Note that
a matrix is Hurwitz if all of its eigenvalues have a strictly negative real part. The observer-based
SMC can then be constructed by defining the sliding manifold mOBS (x̂, w) = 0 on the observer
where λ > 0. Therefore, the observer-based SMC control law can be chosen to be
where κ > 0.
Chapter 4
4.1 Introduction
Despite the wide range of FES applications that have been reported in the literature [3–27, 29–
37], few electrical stimulation systems that can generate meaningful functional outcomes are
currently available for use outside research laboratories. This relative scarcity of widely available
advanced FES systems that are capable of generating complex motor tasks such as walking,
standing, reaching, and grasping may be partly due to a limited ability to accurately control
FES-induced muscle contractions and compensate for disturbances that affect the controlled
neuromuscular system.
A large body of work on closed-loop control of FES is available [16, 18, 19, 25, 63–73, 75,
76, 78–80, 82], however most commercially available FES systems use open-loop control or very
simple closed-loop control strategies, such as rule-based state control, which severely limits the
flexibility of these systems. The purpose of this study was to elucidate the behaviour of several
closed-loop control systems, which regulate electrical stimulation from pulse to pulse in response
to feedback from the controlled system, and to identify some ways in which closed-loop control
systems for FES applications could be improved and applied to real-world FES systems.
In this study, the performance of several promising closed-loop FES controllers was com-
31
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 32
pared in simulation to determine how these algorithms perform under conditions that mimic
real-world applications. The simulated FES system was subjected to muscle fatigue, muscle
spasms, and the effects of muscle re-training. Standard control performance metrics were used
to compare the performance of the different controllers. These simulations were conducted to
inform the design of future control systems for FES applications by illuminating the ways in
The challenges inherent in controlling electrically stimulated muscle contractions are sum-
marized in Section 4.2. In Section 4.3, the design of the three closed-loop control algorithms
that are evaluated in this study is described. The design and implementation of the FES system
that was used for controller testing, as well as the testing methodology, are also discussed. The
results are presented in Section 4.4 and discussed in Section 4.5. Section 4.6 contains the con-
clusions of this study, including an assessment of the implications of these results for designing
4.2 Background
The response of muscles to electrical stimulation is nonlinear and time-varying, and is also
subject to unpredictable reflexes that can generate strong perturbations [59]. Spasticity must
also be taken into account when designing FES control systems, since the controller should
ideally be able to reject disturbances and counteract the increased torque resulting from spastic
muscles. Muscle fatigue is a significant factor in the short-term time-varying nature of the
stimulated muscle response, and muscle re-training effects contribute to long-term changes in
Real-world FES applications require the ability to modulate the pulse-to-pulse electrical
stimulation in real-time to compensate for fatigue, spasticity, and re-training effects, as well as
modeling errors and exogenous disturbances. Closed-loop control can be used to address these
challenges.
of the quadriceps muscle group was implemented. This simulation was based on the knee model
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 33
developed by Ferrarin and Pedotti [82], which is a simple and physiologically accurate model
of the stimulated knee response that was characterized using data from complete SCI subjects.
The muscle recruitment dynamics are represented using a one-pole transfer function, given a
The model in [82] was extended in this study to include fatigue, spasticity and muscle re-
training effects. This simulation was then used to test three closed-loop FES control algorithms:
boundary-layer sliding mode control (SMC). These algorithms were chosen to represent the
range of controllers that have been reported to be successful in the literature, namely a simple
linear controller (PID), a sophisticated linear controller (GSC), and a sophisticated nonlinear
controller (SMC).
4.3 Methods
The FES control simulation was based on the model of stimulated knee extension that Ferrarin
and Pedotti proposed in [82]. This model assumes that the individual is seated and the lower
leg is free to swing. Knee extension is provided by electrical stimulation of the quadriceps
muscle group, and knee flexion is provided by gravity. The model is physiologically accurate,
and accounts for the gravitational and inertial characteristics of the lower leg and foot, as well
as the damping and stiffness characteristics of the knee. The input is the pulse width of the
stimulation waveform delivered to the quadriceps muscle, and the output is knee angle. The
parameters of the controller are specific to a particular stimulation waveform; in this study, a
square wave pulse train with constant frequency and amplitude was used, and the pulse width
was allowed to vary. The knee model in [82] was characterized using data collected from several
subjects with complete SCI who had not undergone any muscle strengthening regime prior to
data collection.
JSHAN K φ̈(t) = τGRAV IT Y (t) + τST IF F (t) + τDAM P (t) + τQU ADS (t),
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 34
where φ(t) is the knee angle, φ̈(t) is the angular acceleration of the knee joint, and JSHAN K
is the moment of inertia of the leg below the knee. Positive torque is defined to be in the
direction of knee extension, that is, straightening the knee. φ(t) is defined to be the angle
between vertical (that is, the gravitational vector) and the longitudinal axis of the shank, as
where m is the mass of the shank and foot, g is the gravitational constant, and ℓ is the distance
from the centre of mass of the shank and foot to the pivot point of the knee. The stiffness
torque is
π
π
τST IF F (t) = −λe−E (φ(t)+ 2 ) φ(t) + − ω ,
2
where λ and E are coefficients of the exponential term, and ω is the resting elastic knee angle.
τDAM P = −B φ̇(t),
where B is the viscous damping coefficient of the knee and φ̇(t) is the angular velocity of the
knee. The relationship between the stimulation pulse width delivered to the quadriceps muscle
group and the resulting torque exerted about the knee is expressed in the frequency domain as
τQU ADS (s) G
= ,
P WQU ADS (s) 1 + ηs
where P WQU ADS (t) is the time domain pulse width of the stimulation train delivered to the
quadriceps, G is the transfer function gain for a particular stimulation frequency, and η is the
time constant of the transfer function pole for a particular stimulation pattern. A one-pole
transfer function was sufficient to describe the muscle recruitment dynamics for this study,
because the extremes of the range of motion of the knee were avoided by limiting the knee
The values of the model coefficients were specific to each subject, and are given in [82].
The base knee model described in [82] was extended in this study to include fatigue, spasticity
and the effects of muscle re-training. These extensions allowed the likely real-world performance
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 35
Figure 4.1: Diagram of knee extension. Approximate position of hamstrings muscle group is
indicated by heavy line, showing insertion point on shank. Angle between axis of shank and
vertical is denoted φ, and angle between axis of thigh and hamstrings is denoted ϕ.
Fatigue was implemented as a multiplier that modified the electrically stimulated quadriceps
torque. The fatigue function described by the author in [44] was used, which represents the
typical reduction in electrically stimulated quadriceps torque seen in individuals with SCI as the
muscles fatigue. The value of the fatigue function ranges between 0 and 1, with 1 corresponding
Only intrinsic tonic spasticity was implemented, as defined by Adams and Hicks in [96],
which causes muscle tension to increase proportionally to the velocity of muscle stretch. In
the simulation presented in this study, the hamstrings muscle group stretches when the knee
extends. Therefore, including spasticity in this model resulted in the hamstrings exerting a
torque about the knee in opposition to the electrically stimulated quadriceps torque.
Several simplifying assumptions were made in the description of spasticity. The velocity
of the hamstrings stretch was assumed to be proportional to the angular velocity of the knee.
Moreover, it was assumed that there was no minimum stretch velocity required to elicit spastic
behaviour, and that there was no minimum threshold of muscle tension required to generate the
spastic torque. It was also assumed that the angle ϕ between the longitudinal axis of the thigh
and longitudinal axis of the hamstrings muscle group, as shown in Figure 4.1, was constant.
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 36
where TSP ASM (t) is the hamstrings tension resulting from the spasm. The distance between
the centre of rotation of the knee and the insertion point of the hamstrings tendons on the
fibula (i.e. the long bone of the lower leg) was assumed to be ℓ̄ = 5 cm. The angle between the
longitudinal axis of the hamstrings and the axis of the shank can be expressed as
π
ρ(t) = π − ϕ(t) − + φ(t) .
2
The hamstrings tension is given by
0 ∀ φ̇(t) < 0
TSP ASM (t) = 0 ∀ φ̇(t) ≥ 0 and t < Td
γ φ̇(t) otherwise,
where Td = 40 ms is the delay between the stretch and the onset of the resulting contrac-
tion [96], and γ is such that the maximum spastic torque is elicited at the maximum knee
angular velocity. The maximum spastic torque was set to 4 Nm, which is a typical maximum
electrically stimulated hamstrings torque seen in the trained SCI subjects who were participants
in the author’s experiments. 360 deg/s was used as the maximum angular velocity of the knee,
which corresponded to the angular velocity of the knee during normal walking in able-bodied
individuals [97]. Based on the author’s experimental work with SCI subjects and currently
available surface stimulation technology, it was assumed that the knee angular velocity of the
typical individual with SCI would not exceed 360 deg/s, even after re-conditioning the muscles.
The effects of muscle re-training were implemented by assuming that, in the best case, a
SCI user of FES would have a stimulated muscle response equivalent to that of an able-bodied
The enhanced knee model was implemented in Simulink (The Mathworks, Inc., Natick,
USA).
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 37
A standard PID control algorithm was used to implement the PID controller, as discussed in
Since standard PID tuning algorithms such as the Zeigler-Nichols method are not applicable to
such systems [88], trial and error was used to tune the controller.
The gain scheduling controller (GSC) was developed using the method of Previdi and Carpan-
zano, who used GSC to regulate electrically stimulated knee movement with a different knee
model [77]. The operating points were selected to be {15◦ , 30◦ , 45◦ , 60◦ , 75◦ , 90◦ }. The be-
haviour of the enhanced knee model is not well-defined at the extremes of the knee’s range of
motion, so these regions were not included in the operating points [82]. For this reason, the
GSC was expected to suffer a decline in performance if the knee angle went outside the span
The base knee model was then linearized at each of the operating points. The base model
was used for controller development instead of the enhanced knee model to assess the affect of
using a simple model on controller performance. The state variables of the model were defined
to be x(t) = [x1 (t) x2 (t)]T = [φ(t) φ̇(t)]T , the input variable to be u(t) = P WQU ADS (t), and
the output variable to be y(t) = φ(t). The state space knee model is given by
Σ: ẋ(t) = f (t, x, u)
y(t) = g(t, x, u)
1 π
π
∴Σ: ẋ(t) = −mgℓ sin x1 (t) − λe−E (x1 (t)+ 2 ) x1 (t) + − ω
JSHAN K 2
G −t/η
−Bx2 (t) + e ∗ u(t)µ(t)
η
y(t) = x1 (t),
where µ(t) is the Heaviside function. The operating point was denoted x0 = [x01 x02 ]T , where
x1 (0) = x01 , and x02 = 0 for all operating points since knee velocity was zero at a fixed operating
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 38
point. The input u(t) could vary at each operating point, so the linearization of Σ about x0
was
d ∂f (t, x, u)
Σlin : (x0 + δx(t)) = f (t, x0 , u) + · δx(t) + higher order terms
dt ∂x
(t,x0 ,u(t))
∂g(t, x, u)
y0 + δy(t) = g(t, x0 , u) + · δx(t) + higher order terms
∂x
(t,x0 ,u(t))
d
x01 x01
dt + δx1 (t) 0 1 + δx1 (t) G
∼
= +b+ e−t/η ∗ u(t)µ(t)
∴
J η
d
x02 + δx2 (t) x02 + δx2 (t) SHAN K
dt a21 a22
x 0 + δx (t)
1 1
y0 + δy(t) ∼= ,,
1 0
x02 + δx2 (t)
where
0 π
π
a21 = −mgℓ cos x01 − λe−E (x1 + 2 ) 1 − E x01 + − ω /JSHAN K
2
a22 = −B/JSHAN K
0 π
π π
−mgℓ sin x01 − x01 cos x01 − λe−E (x1 + 2 ) − ω + E x01 + − ω x01 /JSHAN K .
b =
2 2
The values of a21 , a22 , and b were calculated for each of the six operating points.
Integral control was used to ensure zero steady-state error for the knee angle tracking
The linearized knee dynamics were then augmented with the error dynamics. The augmented
˙ T , input v(t) = b+
system had state vector w(t) = [x01 +δx1 (t) x02 +δx2 (t) ξ(t) ξ(t)] G
JSHAN K η e
−t/η ∗
Linear quadratic regulators (LQR) were used as the local control algorithm. The LQR
The MatLab (The Mathworks, Natick, USA) function K0 = lqr (A0 , B0 , Q0 , R0 ) was used to
find the gain matrix K0 at each operating point x0 . The local regulators were tuned by choosing
the weighting matrices Q0 and R0 of the Riccati equation to provide good unit step response
behaviour, that is, minimal overshoot and fast rise and settling times, with small steady-state
where the Heaviside function µ(t − 1) generated a small step at t = 1 s. The tuning pro-
cess yielded six gain matrices corresponding to the six operating points. A clamped spline
interpolation was used to find the appropriate controller gains at points between the operating
points.
The control signal u(t) at time ti was determined in real time by solving the approximate
deconvolution
G −t/η
v̄(t) = e ∗ u(t)µ(t) ∀ 0 ≤ t < ti
Jη
for u(t), where
v(t) − b ∀ 0 ≤ t < ti
v̄(t) =
0
∀ ti ≤ t ≤ 2ti .
Under the test conditions described in Section 4.4, this approximate deconvolution resulted in
very close agreement between the actual and estimated control signals.
For the sliding mode controller (SMC), the position error was defined to be e1 (t) = φREF (t) −
φ(t), and the velocity error to be e2 (t) = φ̇REF (t) − φ̇(t). The goal state was defined to be
the origin of the error plane, that is, zero position error and zero velocity error. The sliding
manifold was defined to be a line in R2 -space that passed through the origin of the error plane.
The control law caused the system error to converge toward the sliding manifold, and then
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 40
travel along this line toward zero position and zero velocity errors. The sliding manifold was
denoted by
caused the error dynamics to approach the manifold in finite time [91]. Once the error dynamics
Since this control law will cause chattering as the error dynamics near the manifold, a second
control law
was defined and applied within a boundary region of the sliding manifold. Therefore, the overall
for some κ > 0, where d was the shortest distance between the current error (e1 (t), e2 (t)) and
the manifold. Equating the overall control law and the derivative of the sliding manifold
ṁ(t) = ė2 (t) + Λė1 (t) = φ̈2,REF (t) − φ̈(t) + Λ φ̇2,REF (t) − φ̇(t) ,
As defined in Section 4.3.2, the state space model of the knee system was given by
Substituting the expression for φ̈(t) into the above equation, and changing variables such that
φ(t) = x1 (t), φREF (t) = x1,REF (t), φ̇(t) = x2 (t), and φ̇REF (t) = x2,REF (t), an expression for
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 41
The pulse width required to generative the desired τQU ADS (t) was found by approximately
deconvolving the exponential term in the muscle recruitment function from τQU ADS (t), using
where P WQU ADS (t) was the time domain pulse width of the stimulation train delivered to the
The values of parameters k1 , k2 , Λ, and κ we tuned by trial and error so that the evolution
of the errors in the error plane followed the sliding mode ideal of converging towards and then
The control algorithms were tested with four simulated subjects, designated H4, P1, P2, and
P3 in [82]. Subject H4 was an able-bodied subject, and the other three subjects were spinal
cord injured. Subject H4 was used as an example of the optimal case, that is, how well the
controllers might perform if the end user had paralyzed muscles that had undergone extensive
re-training. The controllers were simulated using a 50 Hz square wave stimulation pulse train
with an amplitude of 80 mA. The pulse width was regulated by the control algorithm between
0 µs and 250 µs. Two reference trajectories were used to evaluate the performance of the
control algorithms. The first was a step trajectory that had an initial value of 5 degrees of knee
extension (i.e., the approximate resting elastic knee angle), and a final value of 45 degrees of
knee extension. The second trajectory was based on the knee’s movements during walking, as
Each of the three control algorithms was tested both with and without fatigue, spasticity,
and training effects. The tracking performance of the control algorithms was quantified using
standard control systems metrics [88]. For the step trajectory, these metrics were 10%-90% rise
time, 2% settling time, percent overshoot past the steady-state knee angle, and steady-state
error between the actual and desired knee angles. For the walking trajectory, these metrics
were the lag between the desired and actual knee angles, and the root-mean-squared (RMS)
In addition, the sensitivity of the control algorithms to model mismatch error was assessed
by recording the RMS error for ±20% and ±50% mismatch in parameters ℓ, m, B, λ, E, G,
and η.
4.4 Results
The unit step and walking trajectory response metrics for subject P1 for each controller are
reported in Table 4.1, which compares the ideal case to the non-ideal case that includes mild
fatigue, spasticity, and training effects. The steady-state error is not given for the non-ideal
case, because the knee angle did not reach steady-state in the presence of fatigue.
Table 4.1: Response metrics for unit step and walking trajectories for subject P1. Non-ideal
case includes mild fatigue, spasticity, and training effects. Settling time and overshoot for non-
ideal case are referred to steady-state values from ideal case, since fatigue prevents non-ideal
In Figure 4.2, the tracking performance of each controller for the step trajectory is shown,
for the ideal case with subject P1. In Figure 4.3, the tracking performance of each controller
for the walking trajectory is shown. In this instance, the results for subject P2 for the non-ideal
case that includes mild fatigue, spasticity, and training effects are shown. The final 15 seconds
of the trajectory are shown to illustrate the effects of fatigue. In Figure 4.4, the same results
are shown as in Figure 4.3 but with severe fatigue instead of mild fatigue, as defined in [44]. In
Figure 4.5 and 4.6, the sensitivity of the three controllers to model mismatch errors is reported,
for the ideal case with subject P1. Figure 4.5 contains the results for a ±20% mismatch, and
60
50
40
Knee Angle (deg)
30
20
10 Reference Trajectory
PID Control
Sliding Mode Control
Gain Scheduling Control
0
0 5 10 15
Time (s)
Figure 4.2: Step trajectory tracking for subject P1 under ideal simulation conditions.
4.5 Discussion
The PID controller generated large overshoot, slow rise and settling times, was most sensitive to
model mismatch errors and generally exhibited the poorest performance of the three controllers.
The GSC generated a slow response with very little overshoot and zero steady-state error
due to the use of integral control. This controller exhibited the largest lag, but was also least
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 44
80
Reference Trajectory
PID Control
70 Sliding Mode Control
Gain Scheduling Control
60
Knee Angle (deg)
50
40
30
20
10
0
5 10 15 20
Time (s)
Figure 4.3: Tracking of the walking trajectory for subject P2 under non-ideal simulation con-
ditions, including mild fatigue, spasticity, and training effects. Thick solid line is reference
trajectory, thin solid line is PID control, dashed line is sliding mode control, and dotted line is
80
Reference Trajectory
PID Control
70 Sliding Mode Control
Gain Scheduling Control
60
Knee Angle (deg)
50
40
30
20
10
0
5 10 15 20
Time (s)
Figure 4.4: Tracking of the walking trajectory for subject P2 under non-ideal simulation con-
ditions including severe fatigue. Thick solid line is reference trajectory, thin solid line is PID
control, dashed line is sliding mode control, and dotted line is gain scheduling control.
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 46
Figure 4.5: Sensitivity analysis for subject P1 under ideal simulation conditions for ±20%
parameter mismatch. Markers represent ratio of RMS error with mismatch in a single parameter
to RMS error with nominal parameter values. Heavy solid line represents unit circle. Thin solid
line represents results obtained with PID controller, dashed line corresponds to sliding mode
controller results, and dotted line corresponds to gain scheduling controller results. Y represents
λ, and Z represents η. The unlabelled chord is a place holder to provide convenient spacing of
Figure 4.6: Sensitivity analysis for subject P1 under ideal simulation conditions for ±50%
parameter mismatch. Markers represent ratio of RMS error with mismatch in a single parameter
to RMS error with nominal parameter values. Heavy solid line represents unit circle. Thin solid
line represents results obtained with PID controller, dashed line corresponds to sliding mode
controller results, and dotted line corresponds to gain scheduling controller results. Y represents
λ, and Z represents η. The unlabelled chord is a place holder to provide convenient spacing of
sensitive to parameter variation. Overall, this controller performed quite well. However, the
GSC required a lengthy tuning process due to the multiple local controllers, and also ran slowly
in simulation due to the spline interpolation that must be performed at each time step.
The SMC exhibited a fast response with little overshoot and a short lag. This controller
provided fast tuning, and also exhibited the best sinusoidal tracking performance, as illustrated
in Figure 4.3. However, this controller also yielded the largest steady-state error. This error
could be due to the use of a boundary layer to reduce chattering. The classic SMC behaviour is
suppressed within the boundary layer, so the error is not guaranteed to converge toward zero.
The SMC was also fairly sensitive to parameter mismatch, which is somewhat surprising given
the relatively robust nature of SMC. This discrepancy could also be due to the use of boundary
layer control, which compromises the convergence properties of the SMC. The performance
of this controller might be improved by using a more accurate model of the stimulated muscle
response that includes non-linearities, or by using a different method to overcome the chattering
problem.
The inclusion of fatigue in the simulations dampened the response of each controller, and
also increased the RMS error in each case. This effect is likely to be even more pronounced
for instances of stronger fatigue. The inclusion of spasticity also dampened the response of
each controller, but spasticity decreased the RMS error, unlike fatigue. This is an interesting
result, since intrinsic tonic spasticity effectively increases the joint stiffness for the duration of
the spasm. Including training effects in the simulation resulted in larger overshoot but also
less lag and decreased RMS error. These changes were likely due to the stronger contractions
When fatigue, spasticity, and training effects were applied at the same time, the effects
seemed to cancel each other, resulting in performance that was comparable to the base case
with no non-linearities, as shown in Table 4.1. However, this effect is not seen with stronger
fatigue, as shown in Figure 4.4; while the GSC was the least susceptible to the effects of fatigue,
all the controllers showed a rapid drop-off in the simulated knee angle. Moreover, other types
of spasticity may have a less benign effect of the response of the controllers than intrinsic tonic
spasticity.
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 49
The fatigue model is based on empirical data collected from SCI subjects, and corresponds
to the fatigue profile most commonly seen in the author’s experimental work with trained,
complete SCI subjects. However, this fatigue model may not represent the FES user population
at large. Moreover, this model was not validated against an independent data set. The spasticity
model is based on published data and was also not validated by the author against independent
experimental data. Therefore, these models could be a source of error in the results reported
in this chapter.
It is also worthwhile to note that, although the GSC was able to provide zero steady-state
error through the use of integral control, it may be advantageous for real-world FES applications
for individuals with SCI to avoid a steady state so that the controller has both position and
velocity feedback information at all times. Moreover, this approach would result in continuous,
or at least frequent, muscle stimulation, thereby taking advantage of potentiation effects and
avoiding waiting for “cold” muscles to respond to stimulation when a control action is needed.
Most importantly, none of the controllers tracked the walking trajectory well enough for
real-world use, despite this trajectory representing a very slow walking pattern. The SMC per-
formed well at this task when no non-linearities were included in the simulation. However, the
performance of all of the controllers was wholly inadequate when the non-linearities were intro-
duced, as shown in Figure 4.4. Also, the sensitivity analysis showed that all of the controllers
were sensitive to errors in the anatomical model parameters m and ℓ as well as errors in the
muscle recruitment function, particularly the gain parameter G. These results suggest that an
4.6 Conclusions
Three representative closed-loop control algorithms for FES applications were tested in simu-
lation to uncover some of the reasons why these methods are not being used in real-world FES
systems. None of the three algorithms were found to be suitable for real-world use in the forms
presented in this study. All of the controllers exhibited significantly degraded performance when
real-world nonlinear effects (that is, fatigue, spasticity, and training effects) were included in
Chapter 4. Analysis of Existing Closed-Loop FES Control Algorithms 50
the simulation. Moreover, all of the controllers were sensitive to variation in the parameters of
the muscle recruitment function, which are subject to change during real-world FES use.
The results of this study suggest several ways to improve the performance of closed-loop
control algorithms for use in real-world FES systems. First, the user’s muscles should be
extensively trained with electrical stimulation to strengthen the muscles and minimize the
accurate system model for controller development, including the nonlinearities that are present
in the electrically stimulated system. However, the resulting complex system model will likely
require a sophisticated control technique that can accommodate nonlinear time-varying systems.
Third, co-contracting opposing muscle groups to introduce stiffness to the joint behaviour
should be considered, as suggested by Kobravi and Erfanian in [80]. This strategy is supported
by the improvements in controller performance that were observed in those simulations that
included spasticity, since intrinsic tonic spasticity results in co-contraction through increased
Closed-loop control algorithms can theoretically improve upon the performance of open-
loop control algorithms for FES applications. However, this study showed that the actual
performance of three representative closed-loop controllers was inadequate for real-world use in
FES systems. Closed-loop controllers have an important place in future FES applications, but
the performance of these algorithms must be greatly improved before they can be implemented
in real-world systems.
Chapter 5
Construction of Non-Idealities
Model
5.1 Introduction
Each new FES application must be thoroughly tested prior to wide-spread use. This testing
should be conducted with individuals who have complete SCI to ensure that all the control
effort is being generated by the FES system alone. If FES systems are tested using able-bodied
occurring at the same time as the FES induced contractions, thereby clouding the results of the
testing process. Moreover, test subjects should undergo a period of electrical stimulation-based
muscle re-conditioning prior to exposing them to FES. This process is necessary because many
individuals with SCI have severely atrophied muscles, and this muscle conditioning will ensure
that they have sufficient muscle strength and endurance to take part in FES-based therapies
Additionally, in individuals with SCI, the FES induced muscle contractions are subject
to undesirable effects such as day-to-day and fatigue-related variation, muscle spasms, and
tremors due to incomplete tetanus [43, 55]. Therefore, testing of FES systems should be done
51
Chapter 5. Construction of Non-Idealities Model 52
It can be time-consuming and expensive to recruit suitable subjects, re-condition the sub-
jects’ muscles using electrical stimulation, and then conduct exhaustive testing to verify the
performance of a particular FES system. For this reason, FES applications are typically re-
fined in simulation prior to testing with human subjects. However, such simulations of FES
applications are usually based on models of the typical or ideal response of the muscle to FES,
which frequently results in an overly optimistic assessment of the FES system’s performance in
real-world applications. Consequently, it is not unusual that FES applications that were tested
This study proposed an improved method of simulating FES applications that provides a
more realistic estimate of real-world performance by including actual non-ideal stimulated mus-
cle behaviour in the FES simulation. A “non-idealities” block was implemented in Simulink
(The Mathworks, USA) that modifies the nominal stimulated muscle response (i.e., the re-
sponse described by a model of the average or typical stimulated muscle response) to include
undesirable behaviour such as fatigue, muscle spasms and tremors that are commonly present
during FES-induced muscle contractions. This non-idealities block was based on actual data
collected from complete SCI subjects during electrically stimulated muscle contractions. These
data represent the range of responses to electrical stimulation that have been seen in the Re-
habilitation Engineering Laboratory at the Toronto Rehabilitation Institute and the University
This block can be incorporated into existing FES simulations to analyze the potential per-
formance of these systems under realistic conditions. The non-idealities block also allows the
user to specify the severity of the different facets of undesirable behaviour that are implemented
in the block. For example, in some muscles the spasms are minimal while fatigue is very pro-
nounced, and in other muscles tremors are prevalent while fatigue occurs slowly and is fairly
moderate.
tion of closed-loop regulation of electrically stimulated knee extension against gravity. Both
this example.
Chapter 5. Construction of Non-Idealities Model 53
No model of the electrically stimulated muscle response is available that includes all sources
of day-to-day and intra-session variation. The non-idealities block proposed in this study ad-
dresses this deficiency in the literature by providing information about the worst-case scenarios
that can occur during electrically stimulated contractions. This study also illustrated how to
incorporate the non-idealities block into simulations of FES applications, and used this example
to show that the performance of the closed-loop controlled FES system degraded in the presence
The pilot work for this project was reported at the 2010 International Functional Electrical
Stimulation Society Conference [38]. The work reported in this chapter is an expanded version
of that pilot work based on a larger amount of experimental data, and includes additional
information on how to implement the non-idealities block for testing FES systems.
Section 5.2 discusses the data analysis methods used to extract the non-ideal behaviour from
the experimental data as well as the design of the non-idealities block. This section also describes
how the non-idealities block was implemented in a simulation of electrically stimulated knee
angle regulation. Section 5.3 contains the simulated performance of the knee angle regulation
example both with and without the non-idealities block. Section 5.4 discusses these results,
5.2 Methods
The local research ethics board approved this study, and all experimental subjects provided
informed consent. All subjects had complete thoracic or low cervical SCI (AIS A classification)
and were neurologically stable. The non-idealities block was developed using data collected
Fatigue Data
The fatigue waveforms were extracted from data collected from seven untrained subjects [99].
Each subject was seated with the knee and hip fixed in the flexed position. Adhesive reusable
Chapter 5. Construction of Non-Idealities Model 54
electrodes were affixed to the skin above the quadriceps muscle group. A 5 cm square electrode
was placed at the distal end of the quadriceps as the reference electrode, and a 5 cm by 10
cm electrode was placed at the proximal position to stimulate the motor points of the rectus
femoris and vastus lateralis heads of the quadriceps muscle group. The quadriceps muscle group
A Compex Motion stimulator (Compex SA, Switzerland) delivered a biphasic bipolar pulse
train (pulse width 250 µs, frequency 40 Hz) to the muscles. The amplitude of stimulation was
individually set for each subject’s right and left legs to generate a sustained, maximum force
contraction. Stimulation was applied to one leg for 90 seconds, during which time the generated
isometric force was sampled at 1 kHz using a pancake load cell (Honeywell Sensotec, USA).
Following 10 minutes of rest, the other leg was stimulated in the same manner. A polynomial
fitting procedure was used to approximate each force curve. Each curve was then normalized
The muscle spasm and tremor waveforms were extracted from a different data set that was
collected from one subject. This subject underwent three one-hour electrical stimulation-based
muscle strengthening sessions per week for eight weeks prior to data collection, to increase the
fatigue resistance of the muscles. During data collection, the subject was seated with the hip
flexed and the knee free to swing. The quadriceps muscle group was electrically stimulated
in the same manner as the fatigue experiment described above, however isotonic contractions
were generated to elicit knee extension against gravity. In this experiment, the stimulation
amplitude was randomized for each trial between 0 mA and 95 mA, which elicited full knee
extension in the participant. Stimulation was applied to the quadriceps muscle group of one
leg for 5 seconds, by which time the knee angle had reached its steady state behaviour in each
trial. The stimulation was followed by 5 seconds of rest, during which time the knee returned
The knee angle was sampled at 100 Hz during stimulation using a goniometer (TDS130A,
Biopac Systems Inc., USA), and the data were processed using a three-point moving average
Chapter 5. Construction of Non-Idealities Model 55
filter. The data were further processed to remove spurious data points, which were defined to
be any data points for which the knee angular velocity exceeded 360 deg/s. This threshold
corresponded to the average velocity of the knee during normal walking in able-bodied indi-
viduals [97]. Since the experimental subject exhibited significant muscle atrophy even after
extensive muscle strengthening, it is unlikely that the subject’s knee velocity would exceed this
threshold. After identifying those trials that exhibited muscle spasms or tremors, the spasm or
tremor behaviour was extracted from the affected trials. The resulting spasm waveforms were
zero except where spasms were present, and the tremor waveforms were centred about zero
There is no standard metric for describing the severity of undesirable behaviour in the stim-
ulated muscle response. Therefore, each non-ideality waveform was classified as mild, moderate,
or severe. The classification was done by two independent raters based on a set of classification
criteria for each type of non-ideality. These criteria were established by an expert who had
extensive experience working with electrically induced muscle contractions in SCI subjects, and
are described in Appendix A. The raters were presented with all the fatigue waveforms, followed
by the spasm waveforms, and then the tremor waveforms. The order of the waveforms within
each type of non-linearity was initially randomized, but was then held constant for each rating
session. The rating process was repeated one week later by the first rater to assess intra-rater
reliability. The order of the waveforms was randomized again before the second set of ratings.
The classification for each non-ideality waveform was taken to be the classification assigned by
the first rater in the first rating session. Examples of fatigue, spasm, and tremor non-ideality
The non-idealities block was programmed into a Simulink S-function (The Mathworks,
vQU ADS (t) = (1 + s(t) + r(t)) τQU ADS (t) f at(t), (5.1)
where vQU ADS (t) is the output of the non-idealities block. τQU ADS (t), the torque generated
by the stimulated quadriceps contractions about the knee, is the input to the non-idealities
block. s(t) represents the scaled torque resulting from a muscle spasm, r(t) represents the
Chapter 5. Construction of Non-Idealities Model 56
0 0 0
0 10 20 30 0 10 20 30 0 10 20 30
Time (s) Time (s) Time (s)
Mild Spasms Moderate Spasms Severe Spasms
Knee Angle (deg)
0 0 0
−5 −5 −5
scaled torque resulting from a muscle tremor, and f at(t) represents a fatigue waveform. The
user can separately specify the severity of the fatigue, spasm, and tremor non-idealities that
are included in the block. The non-idealities block algorithm randomly selects the actual
constituent non-ideality waveforms at run-time from the pool of available waveforms having
the desired severity level for each type of non-ideality. The algorithm also provides the ability
to set the randomization seed prior to running the simulation, so that the results generated
An implementation example was included in this study to illustrate how the non-idealities
block can be used in simulations of FES applications. The example is seated knee extension
against gravity via electrically stimulated quadriceps contractions, and is based on the model of
stimulated knee angle proposed by Ferrarin and Pedotti in [82]. In this model, the knee angular
Chapter 5. Construction of Non-Idealities Model 57
1 π
φ̈(t) = −mgℓ sin φ(t) − λe−E(φ(t)+π/2) φ(t) + − ω − B φ̇(t) + τQU ADS (t) ,
JSHAN K 2
(5.2)
where φ(t) is the knee angle, φ̇(t) is the knee angular velocity, and τQU ADS (t), the electrically
elicited quadriceps torque about the knee, is the input to the model. JSHAN K is the moment
of inertia of the shank and foot, m is the mass of the shank and foot, ℓ is the distance from the
centre of rotation of the knee to the centre of mass of the shank and foot, λ and E are coefficients
of the exponential term, ω is the resting knee angle, and B is the damping coefficient. The
relationship between the pulse width of stimulation P WQU ADS (t) and the resulting quadriceps
G
τQU ADS (s) = P WQU ADS (s), (5.3)
1 + ηs
When the non-idealities block is incorporated into the model of stimulated knee movement
1 π
φ̈(t) = −mgℓ sin φ(t) − λe−E(φ(t)+π/2) φ(t) + − ω − B φ̇(t) + vSHAN K (t) ,
JSHAN K 2
where the non-idealities block modifies the nominal stimulated knee torque in Equation 5.3 to
reflect real-world undesirable behaviour including fatigue, muscle spasms, and tremors as shown
in Equation 5.1.
Two different control algorithms were applied to this simulated FES system. Figure 5.2 shows
The first controller was a PID controller with an anti-windup feature to prevent accu-
mulation of the integral term, as described in Section 3.1. PID control was included in this
implementation example despite its drawbacks because many researchers are familiar with this
method, and some in the FES community have been exploring its potential applications. The
Chapter 5. Construction of Non-Idealities Model 58
PID controller was tuned using trial and error to yield the most favourable unit step response
for the nominal muscle response, that is, with no non-idealities included in the simulation.
The second controller was a sliding mode controller (SMC) with a boundary layer to prevent
chattering in the control. SMC involves defining a control law that causes the state of the
system to converge toward a chosen sliding manifold in finite time, and then evolve along the
sliding manifold toward a goal state in possibly infinite time [92, 93]. This algorithm provides
good tracking performance, is inherently adaptive, requires that a relatively small number of
parameters be tuned, and guarantees stability, provided that an accurate plant model is used
to develop the control algorithm. SMC has also been used for regulating stimulation in FES
However, SMC is susceptible to “chattering”, that is, switching rapidly back and forth
between different control actions. Chattering can excite high frequency system dynamics and
result in controller failure [93]. To address this problem, a boundary layer was introduced into
the SMC. Within a small region encompassing the manifold, the sliding mode control law was
modified to a law that was not susceptible to chattering. The drawback to boundary layer
control is that the convergent behaviour of the standard SMC is no longer guaranteed.
The goal state was defined to be to be origin of the error plane, that is, zero position error
and zero velocity error. The position error is e1 (t) = φREF (t) − φ(t) and the velocity error is
e2 (t) = φ̇REF (t) − φ̇(t), where φREF (t) and φ̇REF (t) are the knee angle reference trajectory and
the knee angular velocity reference trajectory, respectively. The sliding manifold is defined to
be a line in R2 -space that passes through the origin of the error plane, denoted
causes the error dynamics to approach the manifold in finite time [91]. Once the error dynamics
Since this control law can cause chattering as the error dynamics near the manifold, the
for some κ > 0, where d is the shortest distance between the current error (e1 (t), e2 (t)) and the
manifold. Equating the overall control law and the derivative of the sliding manifold
ṁ(t) = ė2 (t) + Λė1 (t) = φ̈REF (t) − φ̈(t) + Λ φ̇REF (t) − φ̇(t) ,
An expression for the stimulated quadriceps torque τQU ADS (t) can be found by substituting
φ̈(t) into the state space equation of the knee model, yielding
−E(φ(t)+π/2) φ(t) + π − ω + B φ̇(t)
mgℓ sin φ(t) + λe
2
+JSHAN K φ̈REF (t) + Λ φ̇REF (t) − φ̇(t) + k1 sgn [m(t)] ∀d>κ
τQU ADS (t) =
mgℓ sin φ(t) + λe−E(φ(t)+π/2) φ(t) + π2 − ω + B φ̇(t)
+JSHAN K φ̈REF (t) + Λ φ̇REF (t) − φ̇(t) + k2 m(t) ∀d≤κ
The values of parameters k1 , k2 , Λ, and κ were tuned by trial and error so that the evolution
of the errors in the error plane followed the sliding mode ideal of converging towards and then
The performance of the controllers was assessed through two tracking tasks. The first reference
trajectory was a 60 degree unit step knee extension beginning from the rest position (i.e.,
approximately 5 degrees knee extension). The second reference trajectory was a sinusoid that
mimicked the knee’s movements during normal walking in able-bodied individuals [98]. Figure
For each simulation run, unit step response metrics were collected: 10%-90% rise time,
2% settling time, steady-state error, percent overshoot, and disturbance rejection time for a
10 degree disturbance lasting 0.3 s. RMS error and lag for the walking trajectory were also
collected. Simulations were run for the nominal response case as well as for every combination
of severity of the fatigue, muscle spasm, and tremor non-idealities. Both control algorithms
5.3 Results
Table 5.1 lists the inter- and intra-rater reliability for the classification of the fatigue, muscle
spasm, and tremor non-linearity waveforms. Table 5.2 lists the performance metrics for the
knee control example for the PID controller. The nominal case with no non-idealities included
is listed first, followed by the fatigue only, spasm only, and tremor only cases. Last, selected
cases with fatigue, spasm, and tremor non-idealities are listed. Table 5.3 lists the same results
Table 5.1: Intra- and inter-rater reliability for rating of non-ideality waveforms.
Fatigue Spasms Tremors
Figure 5.3(a) shows an excerpt of the step response of the SMC for the nominal case. Figure
5.3(b) shows the evolution of the error trajectory in R2 -space toward the goal state (i.e., zero
position error and zero velocity error) for the same excerpt. Figure 5.4(a) shows the step
Chapter 5. Construction of Non-Idealities Model 61
Table 5.2: Performance metrics for PID control of knee angle. Blank spaces indicate the metric
Table 5.3: Performance metrics for sliding mode control of knee angle. Blank spaces indicate
response of the PID controller for the nominal case as well as the case with mild fatigue, mild
spasm, and mild tremor non-idealities included. Figure 5.4(b) shows the same results for the
SMC. Figure 5.5 shows the performance of the SMC for the walking trajectory for the same
cases that are shown in Figure 5.4. The decrease in knee angle shown in Figure 5.5 at t = 4.5
s is due to the slight buckling of the knee that occurs when the body weight is transferred to
the leg.
(a)
60
Knee Angle (deg)
40
20
0
0 5 10 15
Time (s)
(b)
0.4
Velocity Error (deg/s)
0.2
t = 15 s t = 3.5 s t=2s
0
−0.2
−0.4
−10 0 10 20 30 40 50 60
Position Error (deg)
Figure 5.3: Evolution of error trajectory in R2 -space, for step response of SMC tested with
Figure 5.6 illustrates the relative magnitudes of the RMS error for the SMC, where the
diameter of each marker is proportional to the magnitude of the RMS error. The corners of the
solution space are shown, that is, (fatigue severity, spasm severity, tremor severity) = {(0,0,0),
to severe non-ideality included. The cases for mild fatigue, moderate fatigue, severe fatigue,
mild spasms, moderate spasms, severe spasms, mild tremors, moderate tremors, and severe
tremors are also shown. Figure 5.7 shows a two-dimensional version of the data in Figure 5.6.
Chapter 5. Construction of Non-Idealities Model 64
(a)
80
Knee Angle (deg)
60
40
20
0
0 5 10 15 20 25
Time (s)
(b)
80
Knee Angle (deg)
60
40
20
0
0 5 10 15 20 25
Time (s)
Figure 5.4: Step response of (a) PID and (b) sliding mode controllers. Thin solid line represents
reference trajectory, dashed line represents response for nominal knee model, and thick solid
line represents response for knee model with mild fatigue, mild spasm, and mild tremor non-
5.2.4.
Chapter 5. Construction of Non-Idealities Model 65
70
60
50
Knee Angle (deg)
40
30
20
10
0
0 1 2 3 4 5 6 7 8 9 10
Time (s)
Figure 5.5: Response of SMC for walking trajectory. Thin solid line represents reference tra-
jectory, dashed line represents response for nominal knee model, and thick solid line represents
response for knee model with mild fatigue, mild spasm, and mild tremor non-idealities included.
Chapter 5. Construction of Non-Idealities Model 66
3
0.75
2.5
1.5
0.5
1
0.5
0 0.25
3
3
2 2.5
2
1 1.5
1
0.5 0
0 0
Spasm Severity Fatigue Severity
Figure 5.6: RMS error of SMC for knee model with various non-ideality combinations. RMS
error values at corners of non-ideality space are shown, as well as at intermediate positions along
axes of non-ideality space. Mild non-ideality is represented by 1 on the fatigue, spasm, and
The case where no non-idealities are included is represented by 0 on each axis. Diameter of
2.5 2.5
Tremor Severity
Tremor Severity
2 2
1.5 1.5
1 1
0.5 0.5
0 0
3 2 1 0 3 2 1 0
Spasm Severity Spasm Severity
2.5 2.5
Tremor Severity
Tremor Severity
2 2
1.5 1.5
1 1
0.5 0.5
0 0
3 2 1 0 3 2 1 0
Spasm Severity Spasm Severity
5.4 Discussion
The inter-rater reliability was greater than 0.8 for all types of non-ideality waveform, as shown
in Table 5.1, indicating that there was a high degree of agreement between the raters [100]. The
intra-rater reliability also showed good agreement for the fatigue and spasm non-idealities, but
not for the tremor non-ideality. This discrepancy was likely due to the nature of the tremors,
which can be difficult to differentiate from the underlying knee movement for large extension
movements. Overall, the rating method appears to have been reliable and repeatable.
The data in Table 5.2 show that the PID controller did not perform well at regulating the
electrically stimulated knee movements. The performance metrics are acceptable for the nomi-
nal non-idealities model, and those models with only muscle spasms included yield acceptable
results as well. In fact, the muscle spasms do not appear to have a large effect on the perfor-
mance of the PID controller. However, the cases that include tremor or fatigue non-idealities
in the simulation show degraded performance in Table 5.2, including many cases for which
performance metrics could not be calculated. For example, settling time cannot be calculated
if the response does not settle to within 2% of reference trajectory. The inclusion of tremors in
Chapter 5. Construction of Non-Idealities Model 68
the simulation prevented the system from settling and also greatly increased the disturbance
rejection time. Including fatigue in the simulation had the strongest negative effect on PID
controller performance, and resulted in large undershoot and an inability to settle or reject
disturbances. The last three cases in Table 5.2, which list the results for cases that include
all three types of non-ideality, show that the effects of fatigue dominated the performance, as
The performance of the SMC for the nominal case was fairly good, with a small overshoot,
steady-state error, lag, and RMS error, as shown in Table 5.3. Figure 5.3(b) shows how the
error trajectory converges toward the goal state (that is, zero position error and zero velocity
error). However, the error state does not actually reach the goal state, resulting in a non-zero
steady-state error, as reflected in Table 5.3. This result was not expected for a SMC, but may
have been due to the boundary layer compromising the typically convergent behaviour of SMC.
The SMC cases that include non-idealities in the knee model exhibited poorer performance
than the nominal case, including cases for which the values of the performance metrics could not
be determined. Again, muscle spasms did not have a strong effect on the SMC performance.
Tremors degraded the SMC performance slightly, and increased both the steady-state and
RMS errors. Fatigue also degraded the SMC performance, although this effect was not strong
except for the case that included severe fatigue. The responses shown in Figures 5.4(b) and 5.5
support the results shown in Table 5.3, with a reasonably good nominal response and a poorer
response for the case with mild fatigue, mild spasms, and mild tremors. It is possible that
the performance of the SMC in the non-ideal cases was compromised because the SMC was
based on the nominal non-idealities model, which was inaccurate for the cases that do include
non-linearities.
The performance of the PID and SMC for the nominal case could lead an investigator to
conclude that these FES controllers are ready to be tested with human subjects. However,
the performance of the controllers in the non-ideal cases indicates that human subject testing
would likely be unsuccessful. This difference illustrates the value of the non-idealities block for
refining control designs in simulation, thereby preventing premature testing in human subjects.
Figure 5.6 shows how the non-idealities model can be used to examine the effects of different
Chapter 5. Construction of Non-Idealities Model 69
parameters on the behaviour of the controlled system, and to elucidate potential sources of
performance problems. For example, Figure 5.6 shows graphically that RMS error increases
more quickly with increasing fatigue severity than with increasing tremor severity, in the absence
of other non-linearities. This insight suggests that further investigation into the behaviour of
Interestingly, the inclusion of severe spasticity seemed to slightly improve the performance of
both controllers, in the absence of other non-linearities. This phenomenon was likely due to the
spasticity effectively increasing the stiffness of the knee joint, thereby making the knee dynamics
more similar to those of an able-bodied individual’s knee. This behaviour suggests that methods
of increasing the joint stiffness toward those values found in able-bodied individuals is a potential
strategy that may improve control of FES systems. This observation is supported by Vette et
al. [19], who stated that up to 90% of the torque needed to regulate quiet standing in able-bodied
No recovery was implemented in the non-idealities block, even though stimulated muscles
do exhibit some recovery from fatigue during periods of no stimulation. This choice was made
because there is little information in the literature concerning rates of short-term recovery for
muscle contraction induced using electrical stimulation. The lack of recovery means that the
non-idealities block predicts a worst-case scenario. Additionally, this model uses fatigue data
recorded from isometric muscle contractions in untrained subjects, and applies that fatigue
substituting fatigue data collected during isotonic muscle contractions in trained subjects. The
non-idealities model could also be expanded to other joints by augmenting the model with
additional data.
5.5 Conclusions
The non-idealities block presented in this paper allows actual undesirable behaviour observed
tions of FES applications. The resulting realistic simulations provide a more accurate assess-
Chapter 5. Construction of Non-Idealities Model 70
ment of how the controller might perform in the presence of these non-ideal behaviours than
is possible with currently used FES simulations methods. The non-idealities block provides
subject testing, thereby saving time and money. The implementation example shows how the
movement, and illustrates that the real-world performance of such a system may be vastly dif-
ferent from the nominal performance. The MatLab code for this project will be made freely
available for the use of others in the FES community in early 2011 at http://www.toronto-fes.ca
6.1 Introduction
Few FES systems are currently available for community-based use by individuals who have SCI.
One factor contributing to this scarcity of available systems is the general inability of currently
available closed-loop FES control systems to adequately regulate electrically stimulated muscle
contractions in the presence of real-world undesirable behaviour such as fatigue, muscle spasms,
and tremors.
In this study, a novel observer-based sliding mode control (SMC) algorithm for FES ap-
plications was proposed that addresses three challenges that complicate the use of current
closed-loop control algorithms in real-world FES applications. First, the response of muscle to
electrical stimulation is inherently nonlinear and time-varying. Despite this fact, many FES ap-
plications use linear closed-loop control strategies [19, 65, 68, 69, 101]. This approach may result
in sub-optimal control performance, even when the nonlinear system is linearized about some
operating point, because the parameters of the system are constantly changing [39,41,44]. This
study demonstrates that a nonlinear algorithm such as SMC can generate superior performance
Second, current FES technology results in rapid muscle fatigue due to the high stimulation
71
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 72
frequency that is necessary to induce artificial muscle contractions [55]. Despite this fact, most
control algorithms for FES applications do not explicitly address fatigue minimization. This
study included a fatigue minimization objective in the control algorithm, and showed that the
Third, individuals with SCI commonly exhibit reduced muscle bulk due to disuse atro-
phy in the paralyzed muscles, which results in reduced joint stiffness compared to able-bodied
individuals. This reduction in joint stiffness results in an under-damped system in which elec-
trically stimulated contractions can be difficult to control. The control strategy described in
this study used co-contraction of opposing muscle groups to artificially increase joint stiffness,
The test bed used to examine the behaviour of the SMC was a simulation of electrically
induced quiet standing in individuals with SCI. Quiet standing in SCI individuals is a commonly
used test bed for evaluating closed-loop control algorithms for FES applications [2, 16, 18, 68,
69, 101]. The non-idealities block [44, 46] described in Chapter 5 was included in the simulation
to evaluate the potential real-world performance of the SMC. This non-idealities block modifies
the behaviour of the simulated system to include actual muscle fatigue, spasms, and tremors
individuals with SCI. The methods used to design and implement the sliding mode and PID
control algorithms, as well as the quiet standing test bed are described in Section 6.3. This
section also describes the testing methodology that was used to assess the performance of
the controllers in simulation. The results of this study are presented in Section 6.4, and are
discussed in Section 6.5. Section 6.6 contains the conclusions of this study.
6.2 Background
During quiet standing in able-bodied individuals, the body is maintained at a slight anterior
lean of approximately 3 degrees [102]. This stance results in a gravitational force acting on
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 73
the body, and requires that the body exerts a torque about the ankles in opposition to gravity
to maintain stable standing. This torque is provided by the soleus and gastrocnemius muscles
of the calf, which contract to cause plantarflexion of the ankle. The resulting ground reaction
force opposes the force of gravity on the body. The tibialis anterior muscles of the calf are used
to oppose any disturbances that act in the posterior direction and return the body to a slight
Quiet standing can be induced in SCI individuals by electrically stimulating the plantarflexor
and dorsiflexor muscles to exert torques about the ankle. This strategy requires that the knees,
hips, and trunk are fixed in an extended position using voluntary effort, bracing, electrical
stimulation, or some combination of these methods. In this configuration, quiet standing can
be modeled as a single-link inverted pendulum, assuming that the two legs are lumped as one,
as shown in Figure 6.1. If the mass of the body is assumed to be concentrated in a point mass
at the end of the pendulum, the sway angle of the body as a function of the plantarflexor and
J θ̈(t) = τP LAN T AR (t) − τDORSI (t) + τST IF F (t) + τDAM P (t) − τGRAV IT Y (t),
where θ(t) is the sway angle of the body, θ̈(t) is the angular acceleration of the body about the
ankle, J is the moment of inertia of the body about the ankle joint, τP LAN T AR (t) is the total
torque exerted about the ankle by the plantarflexor muscles, and τDORSI (t) is the total torque
exerted about the ankle by the dorsiflexor muscles. τST IF F (t) and τDAM P (t) are the torques
about the ankle due to the stiffness and damping properties of the ankle, respectively, and can
be expressed as
where θ̇(t) is the angular velocity of the body about the ankle, and k and B are the coefficients
of stiffness and damping, respectively. τGRAV IT Y (t) is the gravitational torque about the ankle,
which is given by
where m is the point mass of the body, g is the gravitational constant, and ℓ is the length of
the pendulum (that is, the distance from the ground to the centre of mass of the body). If
the sway angle of the body is assumed to be between -5 and +10 degrees at all times, which
encompasses the range of angles for which stable standing can be maintained in able-bodied
τGRAV IT Y (t) ∼
= mgℓ θ(t).
1
θ̈(t) = (τP LAN T AR (t) − τDORSI (t) − k θ(t) − mgℓ θ(t)) . (6.1)
J
Figure 6.1: Inverted pendulum model of quiet standing. m is the point mass of the body, ℓ is
the length of the pendulum, and θ is the sway angle of the body. The reference direction for
SMC has shown promise in previous FES applications. Schauer, Holderbaum, and Hunt used
SMC to regulate electrically stimulated knee angle tracking in a seated subject [84]. Schauer
et al. tested their controller with one able-bodied subject, and used boundary layer control to
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 75
reduce chattering, replacing the switching function by a saturation function within the boundary
layer.
Jezernik, Wassink, and Keller also successfully used SMC for knee angle tracking in a
seated subject, but used a continuous control law instead of a discontinuous control law over
the entire error state space to avoid the issue of chattering [78]. Other authors have raised
concerns that this choice of control law compromises the finite time convergence to the manifold
that is guaranteed by traditional sliding mode control [79]. Mohammed et al. examined the
performance of a higher-order SMC for the same system in simulation [103], but did not propose
a solution to the chattering problem. Mohammed et al. also used static co-contraction of the
Ajoudani and Erfanian proposed a neuro-sliding mode controller for knee angle tracking,
which they tested in both able-bodied and trained, complete SCI subjects [79]. This imple-
mentation used boundary layer control that replaced the switching function with a neural
network controller inside the boundary layer. This controller was very successful, but the au-
thors acknowledged in [80] that this approach was too computationally intensive for real-world
in [80], which used a SMC to regulate unloaded ankle movements in a seated subject and was
tested in able-bodied and trained, complete SCI subjects. In this case, an adaptive strategy
was used to avoid chattering. Kobravi and Erfanian also used a co-activation strategy in which
the activity of the antagonist muscle group was decreased as the activity of the agonist group
increased.
These controllers showed good performance, but most relied upon boundary layer control
to solve the chattering problem. The major drawback of boundary layer control is that the
advantageous features of SMC are lost, especially if the boundary layer is wide. Unfortunately,
the boundary region must often be relatively large when a system subject to large disturbances,
may suffer a degradation in performance if they are implemented in real-world FES applications.
In this study, a novel controller for FES applications is proposed that uses an observer-based
SMC to address the chattering problem without the need for a boundary layer control strategy.
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 76
6.3 Methods
The inverted pendulum model of quiet standing described in Section 6.2.1 was incorporated into
a simulation of electrically induced quiet standing in an individual with SCI. The plantarflexor
and dorsiflexor torques, τP LAN T AR and τDORSI , were generated by electrically stimulated mus-
cle contractions. The stimulation pattern was assumed to be fixed, and only the amplitude of
stimulation was varied. The stimulated response of the two muscle groups is normally coupled,
since the action of the plantarflexor muscles can affect the length of the dorsiflexor muscles by
changing the joint angle, and vice versa. However, the sway angle of the body was assumed to be
limited to the small range of angles for which stable standing can be maintained in able-bodied
individuals. It was also assumed that the length of the plantarflexor and dorsiflexor muscles
would not change significantly over this small sway range, which allowed the coupling between
the stimulated response of the plantarflexor and dorsiflexor muscle groups to be neglected.
Under these assumptions, the stimulated torque about the ankle is a nonlinear function of
stimulation amplitude and is also time-varying due to the effects of muscle fatigue and day-
to-day variation in the stimulated response. There is also a fixed delay between the onset of
stimulation and the onset of the resulting muscle contraction [55]. Additionally, the system is
subject to perturbations due to muscle spasms and tremors, as well as external disturbances.
Lastly, the voltage delivered to the stimulator unit by the controller must be limited to the
nominal input range of 0 to 5 V to ensure predictable behaviour from the stimulator (Compex
The quiet standing simulation was implemented in Simulink (The Mathworks, Natick, MA,
USA). The values of the system parameters are given in Table 6.1, and a block diagram of the
The input to the stimulator was limited between 0 and 5 V using a hyperbolic tangent
function instead of a pure saturation function so that the saturation function was invertible.
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 77
J 73.1 kg m2
k 235 Nm/rad
exp[2u] − 150
σ(u) = 2.5 + 2.5,
exp[2u] + 150
where u was the input signal to be limited. A balanced biphasic square wave stimulation pat-
tern with frequency 40 Hz and pulse width 250 µs was used; the stimulation amplitude was
varied by the controller. The torques produced by the electrically stimulated plantarflexor and
dorsiflexor muscles were described by muscle recruitment functions, which were implemented
as look-up tables. The experimental data contained in these tables was collected by the author
from a trained, complete SCI subject. The subject’s plantarflexor or dorsiflexor muscles were
stimulated with different constant stimulation amplitudes, and the resulting torque about the
ankle was recorded. This individual was also used to determine the values of the anatomical
parameters for the quiet standing model. ℓ was assumed to be 0.53 of height [104]. The activa-
tion delay for each muscle group was implemented by delaying the input into the recruitment
function look-up table by TACT IV AT ION = 40 ms [105]. The inverted pendulum dynamics are
given in Equation 6.1, and the sensor dynamics were implemented as a pure delay.
The control algorithms were developed using a simplified version of the simulated quiet
standing system that neglected the muscle activation delay. Moreover, the plantarflexor and
c1
ĥplantarf lexors (v) =
1 + exp [−c2 (v − c3 )]
c4
ĥdorsif lexors (v) = ,
1 + exp [−c5 (v − c6 )]
respectively. The coefficients of these approximate activation functions were determined empir-
ically to provide a best-fit to the experimental data in the recruitment function look-up tables.
The saturation nonlinearity and muscle recruitment dynamics were cancelled by pre-multiplying
The non-idealities block was used to evaluate the performance of the controllers in the presence
of real-world non-ideal muscle behaviour. This block was implemented using a Simulink S-
The control problem that was addressed in this study is output-feedback tracking of a reference
sway angle trajectory. The tracking error e = θREF − θ drives the action of the controller,
which regulates the stimulation intensity delivered to the agonist muscle group. When e ≤ 0,
the plantarflexor muscle group is the agonist group and the dorsiflexor group is the antagonist
group. When e > 0, the dorsiflexor group is the agonist group and the plantarflexor muscle
The quiet standing dynamics given in Equation 6.1 can be expressed in the state space. Let
the system state be x = [x1 x2 ]T = [θ θ̇]T , the system input be u = τAGON IST , and the system
output be y = x1 = θ, where θ is the sway angle during standing and θ̇ is the angular velocity
ẋ1 = x2
1
ẋ2 = (−kx1 − mgℓx1 − Bx2 + u − d) (6.2)
J
y = x1 ,
where the system parameters k, m, ℓ, B, and J are defined in Section 6.2.1 and their values
are given in Table 6.1. d = τAN T AGON IST is the torque due to the antagonist muscle group.
Since the muscle activation delay and time-varying effects due to fatigue, muscle spasms, and
tremors were not included in the model that was used to develop the controllers, the system in
Equation 6.2 was linear time-invariant and could be expressed in block form as
y = C̄x,
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 80
where
0 1 0 0
Ā = , B̄ = , Ē = , C̄ = .
1 0
(−k − mgℓ) /J −B/J 1/J −1/J
The antagonist torque d was treated as a disturbance in this formulation of the problem.
The stimulation intensity delivered to the antagonist muscle group was determined by an
optimization algorithm that minimized a fatigue minimization objective function and a stiffness
regulation objective function, subject to the agonist torque value determined by the controller
and the constraint sgn[d] = −sgn[u], where sgn denotes the signum function. The fatigue
where I was the identity matrix, and the stiffness regulation objective function was
2
J ẋ2 2
1 τT OT AL 1
gstif f ness (x, u, dstif f ness ) = kREF − = kREF −
2 x1 2 x1
2
1 1
= kREF − (−kx1 − mgℓx1 − Bx2 + u − dstif f ness ) ,
2 x1
where kREF is the desired ankle stiffness, as given in Table 6.1 and τT OT AL is the total torque
Minimizing the fatigue objective function for any value of u will result in df atigue = 0.
However, minimizing the stiffness function for a particular value of x and u may result in
a non-zero value of dstif f ness . To resolve this problem, d was taken to be a weighted linear
combination of the antagonist torque values yielded by the two objective functions, such that
A PID controller and an observer-based SMC were implemented in this study. PID is a
commonly used control algorithm that is simple and reliable, but commonly exhibits degraded
performance in the presence of unmodeled disturbances or plant dynamics. The PID algorithm
in this quiet standing simulation was implemented using an anti-windup design to prevent
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 81
accumulation of the integral term, as described in Section 3.1, and the controller was tuned
using trial and error. The PID controller parameter values are given in Table 6.2.
The observer-based SMC algorithm used a simple asymptotic observer to provide the state
estimate, since the nominal plant model that was used for control design was linear time-
invariant. The use of the observer avoided introducing chattering into the agonist torque
control signal, as described in Section 3.3.2, which could otherwise have been a serious problem
Let the observer state be x̂ = [x̂1 x̂2 ]T , such that the state-space equation of the observer is
L1
x̂˙ = Āx + B̄u + (x1 − x̂1 ) ,
L2
where y = xs and L1 , L2 > 0 are the observer gains. The disturbance d due to the antagonist
muscle torque was not included in the observer equation, since the observer was unaware of
Next, a SMC was designed for which the sliding manifold was defined on the observer state-
where w = [θREF θ̇REF ]T . The sliding mode control law was then designed to be
where κ > 0, λ > 0. The observer-based SMC was tuned using trial and error. The parameter
values for the observer and controller are given in Table 6.2.
The performance of the PID and sliding mode controllers was assessed while tracking two
reference trajectories. The first trajectory was a step from an initial sway angle of 0 degrees
(i.e., the vertical position) to a final sway angle of 2.5 degrees in the anterior direction, with
the step occurring at 0.01 s. The step trajectory also included a disturbance at the 15 second
mark that consisted of a 1 degree anterior sway with a duration of 0.1 s. The total duration of
The second reference trajectory was a sinusoidal trajectory that represented the small oscil-
lations in sway angle that are exhibited during quiet standing in able-bodied individuals [106].
The controllers were tested both with and without co-contraction of the antagonist muscle
group. In each case, the performance of the controllers was evaluated for the nominal case
with no non-idealities included, as well as for various combinations of non-ideal fatigue, muscle
spasm, and muscle tremor behaviour. Standard step response metrics (i.e., 10%-90% rise time,
2% settling time, percent overshoot, steady-state error, and disturbance rejection time) and
sinusoidal response metrics (i.e., lag and root-mean-squared error) were calculated for each
simulation case [88]. In addition, the sensitivity of the SMC controller to ±20% and ±50%
error in the parameters of the quiet standing dynamics (i.e., m, k, ℓ, B, and J) was assessed.
The value of each parameter was varied separately while the other parameters were held at
6.4 Results
Table 6.3 lists the performance metrics for the PID and sliding mode controllers for the nominal
quiet standing model with no non-idealities included, both with and without co-contraction of
the antagonist muscle group. Table 6.4 lists the step response metrics for the SMC for the
quiet standing model including mild, moderate, and severe fatigue non-idealities, both with
and without co-contraction of the antagonist muscle group. Table 6.5 lists the step response
metrics for the SMC with spasm non-idealities, and Table 6.6 lists the same metrics for the
SMC with tremor non-idealities. Table 6.7 lists the step response metrics for the SMC for the
quiet standing model with fatigue, spasm, and tremor non-idealities included, both with and
without co-contraction. Blank spaces in Tables 6.3 through 6.7 indicate that the metric could
not be calculated. For example, the settling time can only be calculated if the response settles
to within 2% of the desired steady-state value during the trial. If the response does not reach
±2% of the desired steady-state value during the trial, then the corresponding entry in the
Table 6.3: PID and SMC performance metrics for nominal quiet standing model with no non-
idealities included, where trise is 10%-90% rise time, tsettling is 2% settling time, tdr is distur-
bance rejection time, % OS is percent overshoot, ess is steady-state error, and eRMS is RMS
error.
trise tsettling tdr % ess lag eRMS
Controller
(s) (s) (s) OS (deg) (s) (deg)
PID with co-contraction 1.71 3.15 0.15 0.00 0.00 0.35 0.458
SMC with co-contraction 0.32 0.98 0.71 1.89 -0.06 0.04 0.286
Figure 6.3(a) shows an excerpt of the step response of the PID and sliding mode controllers
tested with the nominal quiet standing model (i.e., with no non-idealities included), and with
co-contraction of the antagonist muscle group. Figure 6.3(b) compares the evolution of the
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 84
Table 6.4: SMC step response metrics for quiet standing model with fatigue non-idealities.
Without co-contraction With co-contraction
Fatigue trise tset tdr % ess eRMS trise tset tdr % ess eRMS
(s) (s) (s) OS (deg) (deg) (s) (s) (s) OS (deg) (deg)
None 0.33 0.78 0.60 0.00 -0.093 0.315 0.32 0.98 0.71 1.89 -0.034 0.275
Table 6.5: SMC step response metrics for quiet standing model with spasm non-idealities.
Without co-contraction With co-contraction
Spasm trise tset tdr % ess eRMS trise tset tdr % ess eRMS
(s) (s) (s) OS (deg) (deg) (s) (s) (s) OS (deg) (deg)
None 0.33 0.78 0.60 0.00 -0.093 0.315 0.32 0.98 0.71 1.89 -0.034 0.275
Mild 0.32 0.90 0.60 0.00 -0.092 0.321 0.33 1.70 0.71 -0.046 0.275
Moderate 0.33 0.75 0.30 0.00 -0.092 0.315 0.32 1.10 0.71 -0.029 0.281
Severe 0.32 0.78 0.56 0.00 -0.092 0.315 0.33 1.10 0.80 -0.006 0.275
Table 6.6: SMC step response metrics for quiet standing model with tremor non-idealities.
Without co-contraction With co-contraction
Tremor trise tset tdr % ess eRMS trise tset tdr % ess eRMS
(s) (s) (s) OS (deg) (deg) (s) (s) (s) OS (deg) (deg)
None 0.33 0.78 0.60 0.00 -0.093 0.315 0.32 0.98 0.71 1.89 -0.034 0.275
Mild 0.30 0.00 -0.092 0.315 0.28 0.60 0.70 4.05 -0.080 0.281
Table 6.7: SMC step response metrics for quiet standing model with fatigue, spasm, and tremor
non-idealities.
Without co-contraction With co-contraction
Severity trise tset tdr % ess eRMS trise tset tdr % ess eRMS
(s) (s) (s) OS (deg) (deg) (s) (s) (s) OS (deg) (deg)
None 0.33 0.78 0.60 0.00 -0.093 0.315 0.32 0.98 0.71 1.89 -0.034 0.275
error trajectories in R2 -space toward the sliding manifold for the same excerpt.
Figure 6.4 shows excerpts of the step and sinusoidal responses of the PID and sliding mode
controllers for the nominal quiet standing model, both with and without co-contraction. Figure
6.5 shows excerpts of the step and sinusoidal responses of the SMC for the nominal quiet
standing model, as well as the case with mild fatigue non-ideality included in the quiet standing
model. The results both with and without co-contraction are shown.
Figure 6.6 shows the sensitivity of the SMC to a ±20% and ±50% mismatch in the model
parameters m, ℓ, k, B, and J for the nominal quiet standing model (i.e., with no non-idealities
included in the model) and with co-contraction of the antagonist muscle group.
6.5 Discussion
Figure 6.3(b) shows the convergence of the error trajectories of the PID and sliding mode
controllers toward the sliding manifold. Clearly, the SMC reaches steady-state behaviour more
quickly than the PID controller, as shown in Figure 6.3(a). Typically, the error trajectory of
SMC is expected to converge to the sliding manifold in finite time, which is not the case in this
example. The atypical steady-state oscillation displayed by the SMC is likely due to the large
The results shown in Table 6.3 and Figure 6.4(a) and (b) show that the SMC performance is
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 86
(a)
3
Knee Angle (deg)
2.5
2
1.5
1 Ref.
0.5 PID
SMC
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time (s)
(b)
0.01
Velocity Error (deg/s)
PID
0 SMC
t = 0.05 s
t = 3.5 s
−0.01
−0.02
Figure 6.3: Evolution of error trajectory in R2 -space, for step response of PID and sliding mode
controllers tested with nominal quiet standing model (i.e., no non-idealities) and co-contraction
of antagonist muscle group. (a) Step response. (b) Corresponding error trajectory, showing
starting and ending points. Sliding manifold is shown by heavy vertical solid line.
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 87
(a) (b)
3.5 3.5
3 3
Sway Angle (deg)
2.5 2.5
2 2
1.5 1.5
1 Ref. 1 Ref.
0.5 PID 0.5 PID
SMC SMC
0 0
0 2 4 6 8 10 0 1 2 3 4 5 6 7
Time (s) Time (s)
Figure 6.4: Step and sinusoidal response of PID and sliding mode controllers for nominal quiet
standing model (i.e., no non-idealities). (a) Step response without co-contraction. (b) Sinusoidal
response without co-contraction. (c) Step response with co-contraction. (d) Sinusoidal response
with co-contraction.
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 88
(a) (b)
3.5 3.5
3 3
Sway Angle (deg)
2.5 2.5
2 2
1.5 1.5
1 Ref. 1 Ref.
0.5 Nominal 0.5 Nominal
Fatigue Fatigue
0 0
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (s) Time (s)
Figure 6.5: Step and sinusoidal response of SMC. (a) Step response without co-contraction.
(b) Sinusoidal response without co-contraction. (c) Step response with co-contraction. (d)
1.5
+B +k
1
+l
+J
0.5
+m
0
−m
−0.5
−J
−l
−1 −B
−k
−1.5
−1.5 −1 −0.5 0 0.5 1 1.5
Figure 6.6: Sensitivity of SMC with co-contraction to model parameter mismatch for nominal
quiet standing model (i.e., no non-idealities). Markers represent normalized RMS error, i.e. the
ratio of RMS error with mismatch in the parameter associated with a particular chord to the
RMS error with nominal parameter values. Heavy solid line represents unit circle. Solid line
shows normalized RMS error for ±20% parameter mismatch. Dashed line shows normalized
better than the PID performance for the nominal quiet standing model with no co-contraction
included. The SMC exhibits a faster response and less lag when tracking the sinusoidal tra-
jectory than the PID controller does. Moreover, the PID controller exhibits poor sinusoidal
tracking, and its response is too slow to be suitable for real-world use, even without the inclu-
When co-contraction was added, the SMC controller performed even better, exhibiting fast
rise, settling, and disturbance rejection times, no overshoot or appreciable steady-state error
aside from a small steady-state ripple, and low RMS error. Figures 6.4(c) and (d) confirm
the numerical results listed in Table 6.3 for the co-contraction cases. The PID performance
improved slightly with co-contraction but is still unacceptable for use in practical FES applica-
tions. These results suggest that the SMC is a more suitable choice for real-world FES control
algorithms than PID control, despite the popularity of the latter technique among some FES
Rehabilitation Institute.
Figures 6.4(b), 6.4(d), 6.5(b), and 6.5(d) show that the SMC exhibits less RMS error with
co-contraction than without. The results in Table 6.4 and Figure 6.5 show that including fatigue
non-idealities in the quiet standing model resulted in significantly slower rise and settling times
than the nominal case, even for mild fatigue. Moreover, co-contraction did not significantly
improve the SMC performance under fatigue conditions. The spasm non-linearities had minimal
effect of the SMC performance as compared to the nominal case, as shown in Table 6.5. This
result is logical, since SMC is known to be able to reject small disturbances such as those
associated with muscle spasms [31]. Table 6.6 illustrates that including severe tremor non-
idealities in the quiet standing model adversely affected SMC performance, but that mild and
moderate tremors were handled well by the SMC. Co-contraction of the antagonist muscle group
improved the rise time for the severe tremor case, but exacerbated the overshoot. This behaviour
indicates that the implementation of SMC that was used in this study is not able to reject large
steady-state model errors such as strong tremor non-idealities. Also, all combinations of non-
ideal behaviour resulted in fairly good performance both with and without co-contraction, as
shown in Table 6.7. However, it was not possible to calculate many of the metric values, most
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 91
The most beneficial effect of the co-contraction strategy was its ability to reduce RMS error.
Tables 6.4 through 6.7 show that co-contraction causes a marked improvement in RMS error
in every case.
Figure 6.6 shows that ±20% variation in the model parameters had little effect on the RMS
error of the SMC when co-contraction was included. This result confirms that the SMC is fairly
robust to parameter mismatch. This behaviour is expected, since SMC is known to be robust to
parameter mismatch [93]. The SMC was sensitive to large (i.e., −50%) mismatch in parameters
m and ℓ. This result suggested that particular attention should be paid to accurately identifying
these parameters.
This simulation work yielded exciting results, despite its limitations. Specifically, the single-
link inverted pendulum model of quiet standing is a simplification of actual standing. Quiet
standing involves two independently actuated legs, as well as contributions from head, arm,
torso, and foot movements. Moreover, the hips and knees are not locked during quiet standing,
and the torso and foot have many degrees of freedom, whereas the model assumes that they
are monolithic body parts. Also, the plant model that was used for controller development
neglected coupling between the agonist and antagonist muscle groups. Additionally, the non-
idealities block was developed using electrically stimulated seated knee extension against gravity
The work reported in this study makes three significant contributions to the state of the art
in FES control. First, it shows how including actual real-world non-ideal behaviour in the quiet
standing simulation permits a realistic analysis of the system’s likely real-world performance
in the presence of fatigue, muscle spasm, and tremor non-idealities. Second, the practicality of
observer-based SMC for FES applications is demonstrated, which is a more powerful technique
for handling SMC chattering than the standard boundary layer method. Third, the study
demonstrates the feasibility of dynamically adjusting the co-contraction torque of the antagonist
muscle group to minimize fatigue and track a desired joint stiffness value. Moreover, it is shown
that the performance of the SMC under this co-contraction algorithm is improved over the case
This work also represents a significant step forward in the use of nonlinear control tech-
niques for real-world FES systems, since the techniques that were developed in this study for
quiet standing could easily be applied to other FES applications. In fact, the observer-based
SMC implementation with co-contraction that is reported in this study is suitable for certain
real-world FES applications, provided that the small steady-state oscillation exhibited by this
controller could be tolerated, and that severe non-ideal behaviour is not expected of the FES
system.
The applicability of this observer-based SMC to real-world FES systems could be further
improved by incorporating both the antagonist torque input d and a muscle fatigue model into
the quiet standing system model used for controller development. This change would likely
remove the steady-state oscillation that was observed in the SMC behaviour by allowing the
observer to provide a more accurate state estimate to the SMC. Also, FES systems in the
real-world are subject to disturbances due to non-idealities such as muscle spasms and tremors.
These disturbances are unknown bounded disturbances with bounded time derivatives, which
can be compensated by introducing a high-gain loop around the observer itself to reject this
disturbance [93]. This approach would likely improve the performance of the observer-based
6.6 Conclusions
A novel observer-based SMC algorithm for real-world FES applications was developed in this
study. This algorithm included a fatigue minimization strategy and used co-contraction of
the antagonist muscle group to artificially increase the ankle stiffness, thereby improving the
induced quiet standing, and the performance of the SMC was tested in the presence of actual
non-ideal muscle fatigue, spasm, and tremor behaviour. The observer-based SMC performed
very well, even in the presence of non-ideal muscle behaviour, and was also fairly insensitive to
Future work on this project will include refining the design of the observer-based SMC to
Chapter 6. Observer-Based Sliding Mode Control of Quiet Standing 93
include the antagonist torque and a model of muscle fatigue in the quiet standing model, and
implementing a high-gain loop around the observer to reject steady-state disturbances due to
muscle tremors. Experimental testing of this control algorithm is also planned, to confirm its
simulated performance. These enhancements will further improve the utility of this controller
Discussion
There are few commercial FES applications currently available for individuals who have a
neurological disability such as stroke or SCI. Those FES systems that are available use open-
loop or simple state-based control strategies, and cannot adjust the electrical stimulation on
a pulse-by-pulse basis to compensate for the nonlinear, time-varying nature of the response of
One of the major reasons for this dearth of sophisticated FES applications is the lack of
feasible closed-loop FES control algorithms. Closed-loop control is necessary for many innova-
tive applications of FES technology, such as walking over uneven ground, dynamic grasp, and
balance while standing, sitting, or wheeling. Closed-loop control allows the electrical stimula-
tion delivered to the muscles to be modulated in real-time to compensate for disturbances and
changes in the response of the stimulated muscles. The purpose of the work described in this
thesis was to develop a closed-loop control algorithm for practical FES applications.
gorithms
Chapter 4 described how three existing closed-loop control algorithms for FES applications were
analyzed to examine how closed-loop FES controllers could be improved. These representative
controllers were tested in a simulation of seated knee extension against gravity, which was
94
Chapter 7. Discussion 95
based on the model of electrically stimulated knee extension proposed by Ferrarin and Pedotti.
This knee model was extended in Chapter 4 to include estimated muscle fatigue, spasm, and
re-training effects.
This simulation showed that the PID controller yielded the poorest performance of the three
controllers when nonlinear time-varying effects were included. The GSC performed relatively
well, but required extensive tuning due to its use of multiple local controllers. The SMC
exhibited acceptable performance, but suffered from non-zero steady-state error due to the
use of a boundary layer to avoid chattering in the control. All of the control algorithms were
sensitive to model mismatch error, and none of them performed well enough to be implemented
in a practical FES application. Overall, the results presented in Chapter 4 illustrated the need
to test control algorithms under realistic conditions to evaluate their potential performance in
An interesting observation that resulted from the analysis of the existing closed-loop control
algorithms was that the inclusion of intrinsic tonic spasticity in the knee simulation improved
controller performance. Since the type of spasticity implemented in Chapter 4 caused co-
contraction of the antagonist muscle group, resulting in increased knee stiffness, this observation
suggested that deliberate co-contraction of the agonist and antagonist muscle groups could be
Chapter 5 described a new method of testing closed-loop FES control algorithms under realistic
conditions to assess their likely performance in the real world. A non-idealities block was de-
veloped that modified the nominal stimulated muscle response to include actual muscle fatigue,
spasm, and tremor behaviour observed during electrically stimulated muscle contractions in
SCI subjects.
This non-idealities block was tested in a simulation of electrically stimulated knee extension
against gravity with both a PID controller and a boundary-layer SMC. The results showed that
the PID controller and SMC yielded comparable performance for the nominal case. However,
Chapter 7. Discussion 96
when the non-idealities block was included in the simulation, the PID controller yielded terrible
performance, indicating that it would perform poorly in an actual FES application. The SMC
performed better than the PID controller when the non-idealities block was used, but not as
The results presented in Chapter 5 showed that neither controller was appropriate for use in
real world FES applications, despite their misleadingly good performance in the nominal case.
These results illustrated the value of the non-idealities block for demonstrating the probable
performance of FES control algorithms in the presence of real-world muscle fatigue, spasms,
and tremors.
rithm
Chapter 6 discussed the development of a novel observer-based sliding mode control algorithm
that is suitable for use in real-world FES applications. This closed-loop control algorithm incor-
muscle group to cause the joint stiffness to track a desired value. This controller was designed
to modulate the stimulation in real-time to compensate for changes in the stimulated mus-
cle response, to be robust to parameter variation (i.e., model mismatch error), and to reject
The observer-based SMC was tested in a simulation of electrically induced quiet standing
in an individual with SCI, and the non-idealities block was used to determine the probable
performance of the controller in the presence of actual non-ideal behaviour from the stimulated
muscles. The SMC performed relatively well for the non-ideal case, but showed markedly
improved performance when the fatigue minimization and stiffness tracking objectives were
On the basis of these result, the observer-based sliding mode controller proposed in Chapter
6 was deemed to be suitable for certain practical FES applications, provided that the small
steady-state ripple in the response could be tolerated, and that severe non-ideal behaviour was
Chapter 7. Discussion 97
Many research groups have pursued PID control for use in FES applications. The main reasons
for the FES community’s interest in PID control is its simplicity, ease of implementation and
tuning, and the high degree of familiarity that most researchers have with this type of con-
troller. However, the results presented in this thesis clearly demonstrate that PID control is an
unsuitable technique for practical FES applications. Until FES technology improves markedly
(i.e., new methods of muscle stimulation and muscle stimulation delivery are developed that will
allow asynchronous and single muscle motor unit control), PID control should not be considered
suitable for FES applications, because the probability of it successfully regulating electrically
Modern control techniques such as GSC, SMC, neural networks, and fuzzy logic have shown
more promise for FES applications. GSC works acceptably well for FES systems, but it is
difficult to choose a suitable scheduling variable that captures the nonlinear behaviour of the
system. Moreover, GSC involves a lengthy tuning process due to its use of multiple local
controllers, and this tuning process may have to be repeated on a daily basis to accommodate
variation in the response of the stimulated muscles. Overall, GSC is not the best choice for
Neural networks and fuzzy logic are attractive control techniques for FES applications be-
cause they can mimic how the brain is assumed to regulate muscle contractions. However, these
techniques typically do not guarantee stability, which should be considered a mandatory control
requirement for a system that interfaces with human users, such as FES applications. Moreover,
attempting to replicate the control strategy used by the brain is a misguided approach, because
the artificial controller will not have access to the same range and fidelity of feedback data as
SMC is a simple, reliable technique that guarantees stability under certain conditions. This
algorithm is also able to successfully regulate electrically stimulated muscle contractions in the
Chapter 7. Discussion 98
presence of non-ideal behaviour from the stimulated muscles, as demonstrated in this thesis. In
particular, the observer-based SMC implementation proposed in this thesis works well under
realistic test conditions, especially when the fatigue minimization and antagonist co-contraction
facets of the controller are included. For these reasons, SMC should be considered the first choice
It should also be noted that it may be prudent to use a constant reference trajectory for
FES applications, such as a small amplitude sinusoid, instead of a static reference value. The
resulting dynamic steady-state behaviour would ensure that both position and velocity feed-
back are available to the control algorithm at all times, thereby improving control performance.
Moreover, this approach would result in continuous, or at least frequent, muscle stimulation,
which would take advantage of muscle potentiation effects and avoid waiting for “cold” mus-
cles to respond to stimulation when a control action is needed. In fact, the brain may use
this dynamic steady-state approach by maintaining a slow, small amplitude sway during quiet
Interestingly, increasing joint stiffness may not necessarily increase the fatigue experienced
by the agonist and antagonist muscles; if increasing joint stiffness improves joint damping, then
the muscles may in fact expend less effort, since they will not have to take large corrective
The work presented in this thesis has several limitations. The non-idealities block was based
on fatigue data that was collected from untrained SCI subjects during isometric contractions
(i.e., contractions in which the joint angle does not change). Applying this data to isotonic
contractions in trained SCI subjects may overestimate the fatigue that would be seen in the
real world. Moreover, the non-idealities block does not implement muscle recovery. Since some
small amount of recovery will occur in the stimulated muscles during periods of no stimulation,
the actual fatigue exhibited by muscles in the real world will be somewhat less than the fatigue
indicated by the non-idealities block. The non-idealities block could be improved by extending
Chapter 7. Discussion 99
it to include data on fatigue during isotonic muscle contractions as well as muscle recovery,
should this data become available. Moreover, data from other electrically actuated joints could
be added to make the block more generally applicable. The non-idealities block could also
be extended to take additional inputs, such as degree of muscle fatigue as reflected in EMG
Also, the observer-based SMC discussed in Chapter 6 was based on a model of the stimulated
muscle response that neglected muscle activation delay and muscle fatigue. The performance
of this controller could likely be improved by removing these simplifications from the plant
model. This control algorithm could also be improved by providing the antagonist torque to
the observer, thereby generating a more accurate state estimate and reducing the steady-state
error. A high-gain loop could also be added around the observer to reject bounded unknown
The work contained in this thesis represents a significant step forward in closed-loop control for
practical FES applications. The important contributions of this work are as follows:
1. PID control was shown to be an unsuitable control strategy for practical FES applications.
This result can be immediately used by members of the FES community, who can start
2. The non-idealities block can be used to simulate the probable performance of FES appli-
cations in the presence of actual non-ideal stimulated muscle behaviour. Using this block
will provide FES researchers with a clearer picture of the likely performance of their con-
trol algorithms in the real world, and will save time and money by avoiding human testing
3. The success of the antagonist co-contraction strategy described in Chapter 6 should en-
courage other FES researchers to use this approach in their own FES systems. Since
muscle atrophy in individuals with SCI and other neurological disabilities leads to a re-
Chapter 7. Discussion 100
duction in joint stiffness, the resulting under-damped joints may be a factor in the poor
4. The novel observer-based SMC approach was shown to be very successful in regulating
such as muscle fatigue. This result should encourage the FES community to seriously
consider nonlinear control strategies such as SMC for use in FES applications.
In addition to these specific contributions, the work in this thesis can be easily extended
to other stimulated joints and FES applications such as walking and grasping, as well as other
neurological diagnoses such as stroke and incomplete SCI. Also, the work in this thesis was de-
veloped using surface stimulation technology, but could be applied equally well to systems that
use implanted electrodes. The general nature of these results will allow many FES consumers
Conclusions
The objective of this thesis was to develop a closed-loop control algorithm that would be suitable
for use in practical FES applications. This overall objective was approached using three studies,
that were reported in the literature to be successful for FES applications. This study showed
that fatigue was a significant factor in the failure of existing closed-loop control algorithms.
Moreover, the results showed that using realistic testing methods is essential to determining
the probable performance of FES control algorithms in the real world, and that this testing
issue was neglected by much of the work on closed-loop FES control algorithms. This study
also suggested that co-contraction of the antagonist muscle group should be considered as a
means of increasing the stiffness of the electrically actuated joint, thereby improving controller
performance.
Chapter 5 described the construction of a non-idealities block that allowed actual undesirable
lations of FES applications. The non-idealities block was tested in a simulation of knee exten-
sion against gravity, and showed that including non-ideal stimulated muscle behaviour greatly
comprehensively testing FES systems in simulation prior to human testing, which will save
time and money, and speed the development of new FES systems for individuals with SCI and
101
Chapter 8. Conclusions 102
Chapter 6 detailed the development of a novel closed-loop observer-based SMC for use
in real-world FES applications. This algorithm was designed to be stable as well as robust to
model parameter variations, and to reject disturbances due to factors such as muscle spasms and
tremors. Moreover, this algorithm included a fatigue minimization objective and used dynamic
co-contraction of the antagonist muscle group to cause joint stiffness to track a desired value.
The observer-based SMC was tested in a simulation of FES-induced quiet standing, and the
non-idealities block was used to evaluate the probable performance of this controller in a real
FES standing scenario. The observer-based SMC performed very well, even in the presence of
non-ideal behaviour such as muscle fatigue, and is suitable for implementation in certain FES
applications, provided that a small steady-state oscillation could be tolerated and no severe
Overall, it can be concluded that implementing closed-loop control in real-world FES ap-
plications is a very achievable goal, provided that several factors are taken into account by the
1. FES users must be trained to increase their muscle strength, thereby minimizing the
2. Accurate models of the stimulated muscle response must be used when developing control
algorithms, including the non-ideal behaviour that is seen from stimulated muscle in the
real world. Moreover, closed-loop control algorithms for FES systems must be robust
to model mismatch error and disturbances, and should be able to handle the nonlinear
3. PID control is unsuitable for FES applications, and should be abandoned by the FES
Nonlinear control can be successfully used for FES applications, and can provide excellent
performance despite the challenging nature of controlling electrically stimulated muscle con-
tractions. The FES research community should strongly consider becoming familiar with these
Chapter 8. Conclusions 103
powerful techniques so that sophisticated FES systems can be made available to FES consumers.
Following the completion of this PhD thesis, the author intends to test the observer-based
SMC in SCI subjects in collaboration with Dr. Kei Masani and Dr. Dimitry Sayenko of
Toronto Rehabilitation Institute. Initially, the controller will be tested in a quiet standing test
bed, but will then be extended to a knee extension test bed in which coupled actuators must
be considered. This control algorithm will then be ready for implementation in practical FES
systems. The author will also continue to lobby the FES community to use rigorous control
testing methods, and to encourage the adoption of modern control methods by showing how
these methods can be used in practical FES applications. It is the author’s hope that these
efforts will speed the development of sophisticated new FES applications that can be used by
individuals who have SCI and stroke in their homes and communities.
Bibliography
[1] Christopher and Dana Reeve Foundation. One degree of separation: Paralysis and spinal
[2] J. J. Abbas and J. C. Gillette. Using electrical stimulation to control standing posture.
Effects of functional electric stimulation cycle ergometry training on lower limb muscu-
lature in acute SCI individuals. Journal of Sports Science and Medicine, 4(3):263–271,
2005.
may promote recovery of leg function after incomplete spinal cord injury. Spinal Cord,
38(11):680–682, 2000.
[5] A. Kralj, T. Bajd, and R. Turk. Enhancement of gait restoration in spinal injured patients
43, 1988.
[6] T. A. Thrasher, H. M. Flett, and M. R. Popovic. Gait training regimen for incomplete
spinal cord injury using functional electrical stimulation. Spinal Cord, 44:357–361, 2006.
[7] J. Perdan, R. Kamnik, P. Obreza, G. Kurillo, T. Bajd, and M. Munih. Design and eval-
104
Bibliography 105
D. Vulovic. Clinical evaluation of the bionic glove. Archives of Physical Medicine and
Functional electrical therapy: retraining grasping in spinal cord injury. Spinal Cord,
44(3):143–151, 2006.
[11] S. Mangold, T. Keller, A. Curt, and V. Dietz. Transcutaneous functional electrical stim-
ulation for grasping in subjects with cervical spinal cord injury. Spinal Cord, 43(1):1–13,
2004.
FES of upper extremity. IEEE Transactions on Neural Systems and Rehabilitation Engi-
and R. J. Triolo. Standing after spinal cord injury with four-contact nerve-cuff electrodes
[16] H. Gollee, K. J Hunt, and D. E Wood. New results in feedback control of unsupported
10(3):275–284, 2004.
[18] Z. Matjacic and T. Bajd. Arm-free paraplegic standing - Part I: Control model synthesis
[20] I. Cikajlo, Z. Matjacic, T. Bajd, R. Futami, and N. Hoshimiya. Sensory supported FES
control in gait training of incomplete SCI persons. Artificial Organs, 29(6):459–461, 2005.
[21] T. Fuhr, J. Quintern, R. Riener, and G. Schmidt. Walking with WALK! A coopera-
8(4):221–231, 1998.
ley, C. Ho, and R. J. Triolo. Walking after incomplete spinal cord injury using an im-
planted FES system: A case report. Journal of Rehabilitation Research and Development,
44(3):333–346, 2007.
leg-powered paraplegic cycling using stimulation of the lumbo-sacral anterior spinal nerve
Bibliography 107
164, 2002.
[25] R. Davoodi and B. J. Andrews. Fuzzy logic control of FES rowing exercise in paraplegia.
electrical stimulation of the trunk for seated postural stability and function after cervical
spinal cord injury: A single case study. Archives of Physical Medicine and Rehabilitation,
90(2):340–347, 2009.
cation of a biomechanical model of the trunk for functional electrical stimulation control
10(4):9–16, 2010.
[29] C. Y. Chao and G. L. Cheing. The effects of lower-extremity functional electric stimulation
on the orthostatic responses of people with tetraplegia. Archives of Physical Medicine and
electrical stimulation and dynamic tilt table therapy to improve orthostatic tolerance.
stimulation on postural related orthostatic stress in individuals with acute spinal cord
effect on orthostatic hypotension after spinal cord injury. Archives of Physical Medicine
[33] K. M. Bogie and R. J. Triolo. Effects of regular use of neuromuscular electrical stimulation
2003.
pressure using FES in patients with spinal cord injury: A preliminary report. Paraplegia,
30(7):474–478, 1992.
[35] S. J. Hwang, H. Kaplan, G. E. Loeb, and Y. H. Kim. Weight shifts by the electrical
stimulation in seating for the prevention of pressure ulcer. In Proceedings of the World
Congress on Medical Physics and Biomedical Engineering, volume 14, pages 1–6, Seoul,
[36] J. A. Hoffer. Transvascular nerve stimulation apparatus and methods [Patent Applica-
pacing with endovascular electrodes. In Proc. 15th Ann. Conf. of the Int. Functional
[40] C. L. Lynch and M. R. Popovic. Closed-loop control of FES: Past work and future
directions. In Proc. 10th Ann. Conf. of the Int. Functional Electrical Stimulation Society,
regulating electrically stimulated knee movements in individuals with spinal cord injury.
[42] C. L. Lynch and M. R. Popovic. A model of the knee’s response to electrical stimulation
for use in FES applications. In Proc. of the National Spinal Cord Injury Conference,
[43] C. L. Lynch and M. R. Popovic. A stochastic model of knee joint response to electrical
2011.
269, 2011.
simulations of functional electrical stimulation. In Proc. 5th Int. IEEE EMBS Conf. on
[47] C. L. Lynch and M. R. Popovic. Sliding mode control of electrically induced quiet standing
in individuals with spinal cord injury. Submitted to IEEE Transactions on Neural Systems
an inverted pendulum apparatus for the study of closed-loop FES control of the ankle
Bibliography 110
joints during quiet standing. In Proc. 15th Ann. Conf. of the Int. Functional Electrical
[49] W. Kapit and L. M. Elson. The Anatomy Coloring Book. Benjamin Cummings, USA,
2002.
[50] J. T. Mortimer. Motor prostheses. In Handbook of Physiology - The Nervous System II.
potential in normal and diseased nerve muscle. IEEE Engineering in Medicine and Biology
[52] A. C. Guyton and J. E. Hall. Textbook of Medical Physiology. Elsevier Saunders, Philadel-
[54] American Spinal Injury Association. Standard neurological classification of spinal cord
injury, 2006.
[55] D. B. Popovic and T. Sinkjaer. Control of Movement for the Physically Disabled: Control
[57] K. M. Deutsch, T. G. Hornby, and B. D. Schmit. The intralimb coordination of the flexor
reflex response is altered in chronic human spinal cord injury. Neuroscience Letters,
380(3):305–310, 2005.
[58] N. Kawashima, D. Taguchi, K. Nakazawa, and M. Akai. Effect of lesion level on the
orthotic gait performance in individuals with spinal cord injuries. Spinal Cord, 44:487–
494, 2006.
Bibliography 111
[63] J. A. Riess and J. J. Abbas. Adaptive neural network control of cyclic movements us-
[64] J. A. Riess and J. J. Abbas. Adaptive control of cyclic movements as muscles fatigue
[66] S. Micera, A. M. Sabatini, and P. Dario. Adaptive fuzzy control of electrically stimu-
lated muscles for arm movements. Medical and Biological Engineering and Computing,
37(1):680–685, 1999.
[68] J. J. Abbas and H. J. Chizeck. Feedback control of coronal plane hip angle in paraplegic
controlled ankle stiffness. IEEE Transactions on Neural Systems and Rehabilitation En-
[70] Z. Matjacic, K. Hunt, H. Gollee, and T. Sinkjaer. Control of posture with FES systems.
[72] W. Holderbaum, K. J. Hunt, and H. Gollee. H-infinity robust control design for un-
10(11):1211–1222, 2002.
reference adaptive controller to control the knee joint of paraplegics. IEEE Transactions
[74] J. F. Tan. Closed-Loop Control of the Ankle Joint Using Functional Electrical Stimulation.
A neuro-control system for the knee joint position control with quadriceps stimulation.
single joint movements. IEEE Transactions on Neural Systems and Rehabilitation Engi-
[77] F. Previdi and E. Carpanzano. Design of a gain scheduling controller for knee-joint angle
uncertainty for control of movement in paralyzed limbs using functional electrical stimu-
[80] H. R. Kobravi and A. Erfanian. Decentralized adaptive robust control based on sliding
mode and nonlinear compensator for the control of ankle movement using functional
2009.
[81] F. Previdi. Identification of black-box nonlinear models for lower limb movement control
[82] M. Ferrarin and A. Pedotti. The relationship between electrical stimulus and joint torque:
39(15):2826–2836, 2006.
Experimental results. In Proc. 7th Annual Conf. Int. Functional Electrical Stimulation
muscle length on fatigue during electrical stimulation. Muscle and Nerve, 40(4):573–581,
2009.
Bibliography 114
[86] M. S. Marion, A. S. Wexler, and M. L. Hull. Predicting fatigue during electrically stim-
[87] R. Riener, J. Quintern, and G. Schmidt. Biomechanical model of the human knee evalu-
[88] J. V. D. Vegte. Feedback Control Systems. Prentice Hall, Upper Saddle River, NJ, USA,
[89] C. Knospe. PID control. IEEE Control Systems Magazine, 26(1):30–31, 2006.
[90] J. S. Shamma and M. Athans. Gain scheduling: Potential hazards and possible remedies.
[91] H. Khalil. Nonlinear Systems. Prentice Hall, Upper Saddle River, NJ, USA, 3rd edition,
2002.
[92] V. I. Utkin. Sliding Modes in Control and Optimization. Springer Verlag, Berlin, Germany,
1992.
[93] K. D. Young, V. I. Utkin, and U. Ozguner. A control engineer’s guide to sliding mode
252, 1987.
systems with asymptotic observers. Automation and Remote Control, pages 679–684,
1985.
[96] M. M. Adams and A. L. Hicks. Spasticity after spinal cord injury. Spinal cord, 43(10):577–
586, 2005.
[97] J. R. Brinkmann and J. Perry. Rate and range of knee motion during ambulation in
[98] J. Perry. Gait Analysis: Normal and Pathological Function. McGraw-Hill, Inc., New
[100] K. S. Bordens and B. B. Abbott. Research Design and Methods: A Process Approach.
Mayfield Publishing Company, Mountain View, CA, USA, 3rd edition, 1996.
[102] D. A. Winter, A. E. Patla, S. Rietdyk, and M. G. Ishac. Ankle muscle stiffness in the
2001.
law strategy based on high order sliding mode: Towards a muscle control. In Proc. of the
[104] I. D. Loram and M. Lakie. Direct measurement of human ankle stiffness during quiet
standing: The intrinsic mechanical stiffness is insufficient for stability. Journal of Physi-
[105] B. A. Lavoie, F. W. J. Cody, and C. Capaday. Cortical control of human soleus muscle
during volitional and postural activities studied using focal magnetic stimulation. Exper-
[106] T. Kiemel, K. S. Oie, and J. J. Jeka. Slow dynamics of postural sway are in the feedback
116
Appendix A. Non-Ideality Classification Criteria 117
Table A.1: Classification criteria for non-ideality waveforms. f at(t) represents normalized
fatigue as described in Section 5.2.1. θ(t) represents de-noised knee angle as described in
Section 5.2.1.
Non-ideality
Classification Criteria
Type
Spasm mild Absolute amplitude of all spikes in θ(t) is less than 10◦
OR
OR
List of Abbreviations
118
Appendix B. List of Abbreviations 119
H∞ H-infinity
% OS percent overshoot
PD proportional-derivative
PID proportional-integral-derivative
RMS root-mean-squared
acetylcholinesterase, 11
electrode
action potential, 11
cuff, 16
adenosine triphosphate, 11
epimysial, 16
anti-windup, 57
intraneural, 16
asynchronous recruitment, 12
percutaneous, 16
ATP, 11
transcutaneous, 16
atrophy, 15
epimysial electrode, 16
120
INDEX 121
asynchronous, 12
manifold, sliding, 27
non-physiological, 18
motor neuron, 11
synchronous, 18
motor unit, 11
reflex, spinal, 14
muscle
atrophy, 15 sarcolemma, 9
isometric, 69 SCI
isotonic, 69 complete, 14
fascicle, 9 incomplete, 14
slow-twitch, 9 spasm, 14
re-training, 15 spasticity, 14
spasm, 14
tetanic contraction, 12
tremor, 15
tetanus
muscle re-training, 15
complete, 12
muscle tremor, 15
incomplete, 15
transverse tubules, 9
observer, Luenburger, 30
tubules, transverse, 9
percutaneous electrode, 16
potential, 11
re-training, 15