Virtual Artificial Sensor Technique For Functional Electrical Stimulation
Virtual Artificial Sensor Technique For Functional Electrical Stimulation
Abstract
In the control of Functional Electrical Stimulation (FES) gait systems artificial sensors are used to provide the controller with
feedback information. The sensors used range in complexity from simple heel or hand switches to tri-axial accelerometers. There
are three basic problems connected with the selection of sensors: the type(s) of sensor(s) to be used, the number of sensors required
and the optimum location of the sensor set. In general the choice of the sensor sets has been based on the availability of actual
sensors and the experts understanding of where these sensors should be located. Using motion analysis data it is possible to construct
an almost unlimited number of virtual sensors on any location of the body surface. Our aim was to develop this technique for
construction of virtual sensors and compare these virtual sensors with their physical counterparts. Virtual goniometers, inclinometers,
accelerometers and foot switches were constructed and compared with their physical counterparts. In addition visualisation tools
were developed to aid in the choice of sensor location. There was a very good correlation between all the virtual and physical
sensors. This technique gives flexibility to place virtual sensors almost anywhere on the body surface and also allows the construction
of novel sensors. 1998 IPEM. Published by Elsevier Science Ltd. All rights reserved.
1350-4533/98/$19.00 1998 IPEM. Published by Elsevier Science Ltd. All rights reserved.
PII: S 1 3 5 0 - 4 5 3 3 ( 9 8 ) 0 0 0 3 8 - 1
K. Tong, M. Granat / Medical Engineering & Physics 20 (1998) 458–468 459
with this choice. Firstly, which set of options should be workstation, was used to generate the virtual sensor sig-
evaluated and secondly how can these options reliably nals. This program used the marker data from the motion
be compared. Using physical sensors there is a limit to analysis system to calculate the positions of the lower
the number of sensors that can be applied on a test sub- limb body segments. The program could then calculate
ject due to their physical size and there is also a limit to the virtual sensor data for any position and orientation on
the amount of data that can be synchronously recorded. the surface of the lower limb model. Options for colour
Heller [23] showed that artificial sensors could be shading were included to help visualise sensor signal
‘simulated’ from motion analysis data. It is proposed that magnitude. A Windows type interface was developed to
using ‘simulated’ sensors, a virtually unlimited number enable easy and rapid manipulation of the recon-
of sensors and sensor sets can be placed on the body structed gait.
for a single subject test. This Virtual Artificial Sensor
Technique (VAST) would be able to simulate any num- 2.1.3. Lower-limb segment models
ber of sensors (e.g. uni-axial accelerometer, goniometer, A static test was performed to determine the size of
inclinometer, foot switch). Using these sensor signals, each body segment. For the shank and thigh a 3D model
optimum control rules and sensor sets could be deduced was constructed using an axis curve, a profile curve and
by using either an expert’s knowledge or artificial intelli- a cross section curve. Each curve was calculated using
gence techniques. By using VAST, all data from all B-spine curve fitting with 10 control points with interp-
sensor sets would be synchronised and a direct compari- olation between the points. A 3D model was formed with
son between sensor sets would be possible. In addition a mesh wire frame and with a second degree of conti-
it would be possible to construct virtual sensors that have nuity (Fig. 1a). Position and orientation of the limb seg-
not yet had a physical counterpart. ments was calculated from the dynamic tests.
Before employing VAST for developing FES control Simple cylindrical models for shank and thigh were
rules, the technique needs to be verified using physical used to verify VAST (Fig. 1b). Parameters r1, r2 (radius
sensors. This paper describes the construction of virtual of proximal and distal ends of the body segment) and d
sensors and compares these virtual sensors with their (length of segment) were calculated from the static
physical counterparts. marker. The whole body segment model with shank and
thigh segments, pelvis, foot and crutches could then be
displayed and manipulated (Fig. 1c).
2. Methods
2.2. Mathematical models
Motion analysis data, from unimpaired and spinal cord VAST was used to simulate foot switches, knee and
injured persons, were collected in order to reconstruct hip joint angles, inclinometers and accelerometers.
the movements of the lower-limb body segments and this Mathematical models for each of these sensors were
data was used to calculate the virtual sensor data. The made and these are described below.
signals from these virtual sensors were compared with
the signals from their physical counterparts. 2.2.1. Foot switches
Data, for a toe and heel switch, were generated from
2.1. Equipment the attitude of the foot model. Thresholds for vertical
height of the toe and heel markers were set to determine
2.1.1. Hardware when the toe switch or heel switch would be activated.
To collect the motion analysis data, a six infra-red
camera system (VICON; Oxford Metrics Ltd.) was used 2.2.2. Joint angle
to capture marker positions placed on anatomical land- 2.2.2.1. Knee and ankle angles Fig. 2, shows the joint
marks. Lower-limb body segments were then recon- angles that were calculated using the body segment
structed and virtual sensors (foot switches, joint angles, model. The knee joint angle was calculated by using two
inclinations and uni-axial accelerations) constructed. The points on the thigh segment surface, T3 and T4 (in line
virtual sensors were located on the surface of the lower- with the axis of the thigh and along the midline of the
limb body segment. The physical sensors used were lateral aspect of the thigh), and two points on shank seg-
flexible electro-goniometers [Penny and Giles, Conduc- ment surface, S5 and S6 (in line with the axis of the shank
tive Plastics Ltd.], foot switches [Force Sensor Resistors, and along the midline of the lateral axis of the shank).
Interlink] and uni-axial accelerometers [EuroSensor The angle between these two lines was calculated using
Models 3021]. the dot-product Eq. (1) as follows:
→ → → →
2.1.2. Software (S 5 − S 6)•(T 3 − T 4)
A program, written in C language and using the = cos −1
(1)
→ → → →
Graphical Library (GL) running on a Silicon Graphics 兩(S 5 − S 6)储(T 3 − T 4)兩
460 K. Tong, M. Granat / Medical Engineering & Physics 20 (1998) 458–468
Fig. 1. (a) The left three windows show the axis curve, profile curve and cross section curve which have been used for constructing the leg model.
The middle window and the right window show the lighting model and the wire-frame leg model respectively. (b) Simple cylindrical model of
the shank and thigh with radius r1 and r2 and height d. (c) The whole lower-limb body model with pelvis, thighs, shanks, feet and crutches
constructed from motion analysis data.
→
vx = →
vy × →
vz (4)
(→
c1 − →
c 2)•(→
v x)
= cos−1 (5)
兩(→
c1 − →
c 2)储(→
v x)兩
→
p (t) = [→
x (t),→
y (t),→
z (t)] 3D position
¨
→ ¨
→ ¨
→ ¨
→
p = [ x (t), y (t), z (t)] 3D acceleration
Fig. 3. Calculation of crutch inclination. Two points, C1 and C2, were
selected on the crutch for calculating the inclination with the vertical ¨
→
axis of floor, Vz, the forward progressing vector Vx was generated The acceleration vector (p ) was generated using five
from the forward axis vector of the pelvis Px. data points with time interval (⌬t).
462 K. Tong, M. Granat / Medical Engineering & Physics 20 (1998) 458–468
→ →
[a ankle]local = [M]global→local[a ankle]global (10)
→
acceleration difference vector (d s) and then dividing this perpendicular distance was found by using the dot-pro-
by the distance between the knee joint centre and the duct (âm 쐌 →
p x).
ankle joint centre (dknee-ankle).
→
→
m = (âm•p x)␣s (18)
␣s = (r̂a•d s)/dknee − ankle (15)
→
The total 3D acceleration vector (a x) contained the
→ →
2.2.4.3. Calculation of the uni-axial acceleration ( a u) linear acceleration (a o) and the angular acceleration
→ →
on any point (p x) on the segment surface By selecting component (ma d):
a location on the body segment the position vector of
any point on the shank surface in the local co-ordinate →
system was → p x (Fig. 6). The acceleration of this point ax = → →
a o + ma d (19)
was a combination of the linear acceleration vector
→ By using the normal vector on the model surface at
(a o) and rotational acceleration vector (r̂, ␣s) given →
below. this point (n̂), the uni-axial acceleration (a u) was gener-
To generate the acceleration component for rotation, ated directly by using dot-product with the total 3D
the angular acceleration axis of a point on the surface acceleration vector.
of the body segment (âd) was calculated from the cross-
→
product of the rotational axis (r̂) and the position vector
→
au = →
a x•n̂ (20)
(p x).
The magnitude of the angular acceleration (m) of the 2.4. Subject test
→
position vector (p x) was generated from the angular
acceleration (␣s) multiplied by the perpendicular dis- Walking trials were considered to be good models to
→
tance from the rotational axis (r̂) to the point (p x). The test the performance of VAST and trials from a non-
impaired subject and a subject with an incomplete spinal
cord lesion were used to test this system. The analogue
data from physical sensors were collected using 12 bit
A-to-D converter and the VICON motion analysis sys-
tem synchronously captured the marker co-ordinates.
The physical sensors were placed on different locations
on lower limb for comparison with the virtual sensors.
Goniometers were placed on the hip and knee joint, force
sensitive resistors acting as switches were placed under-
neath the heel and big toe and accelerometers were
placed on the tibial tuberosity, 20 cm below the tibial
tuberosity on the anterior aspect of shank and 10 cm
above the patella on the anterior aspect of thigh.
2.5. Analysis
→
Fig. 6. Calculation of uni-acceleration on a point (p x) on the shank
surface with normal vector (n̂). The shank is considered to be rotating Virtual sensors were generated at corresponding
along the rotational axis (r̂), and the angular acceleration axis (âd) is locations to the physical sensors and their positions. The
generated to determine the rotational acceleration of this point. power spectrum density (PSD) of both virtual and physi-
464 K. Tong, M. Granat / Medical Engineering & Physics 20 (1998) 458–468
cal sensor signals were calculated to determine low-pass (Fig. 9). The pattern of the graph showed the repetitive
filter characteristics. The main frequency band of physi- nature of the gait.
cal sensor was below 4 Hz for the walking trials. The
coherence function was used to compare the PSD of the 3.3. Signal graph in time domain
virtual and physical sensors. Both physical and virtual
data were filtered using an anti-alias 4th order but- The signals in the time domain showed a very good
terworth filter with 4 Hz cutoff frequency. Cross-corre- correlation. The correlation coefficient of accelerometers
lation between the physical and virtual sensor was used was 0.9131 and goniometers was 0.9258 (Fig. 10).
to detect any time shift after filtering.
3.4. Switch signals
3. Results Foot switch signals are on and off signals and the
mean square error (MSE) and maximum time delay were
Three criteria were used for assessing the performance used to determine the accuracy of the virtual switches.
of the virtual sensors. These were: The virtual heel switches and physical switches are
shown on Fig. 11. The MSE of heel switches signal was
1. The signals must have the same frequency content
0.063 and the maximum time delay was 0.14 s.
and therefore the power spectral density must be
identical and the frequency coherence must be close
3.5. Inclinometer
to one.
2. There should be no time shift between two signals
A virtual tilt sensor (inclinometer) on the lateral aspect
and therefore the peak of the cross-correlation should
of the shank was constructed and this was compared with
lie on the zero line.
an actual tilt sensor data taken from the literature [24]
3. The signals must be identical in the time domain and
(Fig. 12).
therefore the correlation coefficient should be close
to one.
3.6. Colour map for the virtual uni-axial
accelerometer
3.1. Power spectral density frequency coherence
In order to help visualise the acceleration distribution
For all the sensors most of the power spectrum was during walking, uni-axial accelerometers over the whole
under 4 Hz. (Fig. 7). Below 4 Hz, the frequency coher- surface of the lower limb were calculated the acceler-
ence was near to 1 showing that the power spectral den- ometers being placed about 2.5 mm apart. A colour map
sity is nearly identical between the virtual and physical was produced to show this distribution and is presented
signals prior to any filtering (Fig. 8). here as white for acceleration and black for deceleration
(Fig. 13). The mesh limb segment model was coloured
3.2. Cross-correlation with Gouraud shading (intensity interpolation) to make
a continuous colour distribution on the model surface.
The peak of cross-correlation was located on zero axis This could help the user to determine where to place the
showing that there was no phase shift between signals accelerometers in order to obtain the best signal.
Fig. 7. Power Spectrum Density (PSD) of accelerometer and goniometer data. PSD of raw physical uni-axial accelerometer data on shank and
raw physical goniometer data for knee angle are shown in (a) and (b) respectively. Both show that the main frequency band of the signals is
below 4 Hz.
K. Tong, M. Granat / Medical Engineering & Physics 20 (1998) 458–468 465
Fig. 8. Coherence function of virtual and physical accelerometer and goniometer data. Coherence function between the raw virtual and physical
accelerometer data on the shank are shown in (a). Coherence function between the raw virtual and physical goniometer data on the shank are
shown in (b). The coherence function values are close to 1 below 4 Hz.
Fig. 9. Cross-correlation function between virtual and physical accelerometer and goniometer. Cross-correlation function between virtual and
physical accelerometer data on shank is shown in (a). Cross-correlation function between virtual and physical knee angle data on shank is shown
in (b). In both cases the peak of the function is located on zero axis and there is no phase shift between signals.
Fig. 10. Time domain signals for virtual and physical accelerometer and goniometer. Signals from virtual accelerometer (-) and physical acceler-
ometer (+) on the shank are shown in (a). Goniometer signals for virtual sensor (-) and physical sensor (+) are shown in (b).
466 K. Tong, M. Granat / Medical Engineering & Physics 20 (1998) 458–468
Fig. 11. Comparison of heel switch signals. Physical and virtual heel switch signals on right foot are shown in (a). The difference between virtual
and physical signals by using subtraction is shown in (b).
Fig. 12. Comparison of tilt sensors. Signals from physical tilt sensors on non-impaired subject on Dai’s paper is shown in (a). Virtual tilt sensor
signal from a gait trial of a non-impaired subjects is shown in (b).
Fig. 13. Colour mapping of uni-axial acceleration data on the lower-body model. Uni-axial acceleration data on shank and thigh are shown on
the surface of the segment model using a grey scale. Lighter colour means higher acceleration, darker means higher deceleration. A clear change
on colour distribution on shank during swing phase on right leg is shown on these pictures.
all data from sensors are always synchronised. It is there- In recent years artificial intelligence techniques have
fore possible to go back to a gait trial in which virtual been used to detect subject intention for automatic FES
sensors have been constructed and construct additional control. Subject intention has been identified by artificial
virtual sensors for direct comparison. intelligence, such as Inductive Learning [14,15] and
The colour map, 3-D display and the interactive gait Artificial Logic Networks [16]. As VAST can generated
analysis program can aid visualisation of the acceleration almost unlimited number of sensors on the lower-limb
distribution over the body segments at different phases body surface, artificial intelligence would be able to sel-
during walking. This can aid placement of the uni- ect a better combination of sensors for FES-control from
axial accelerometers. this large number of virtual sensors, rather than limiting
There are two main limitations to the implementation the power of artificial intelligence techniques by
of VAST. Firstly the measurement volume is fixed by restricting the number of sensors.
motion analysis setup and therefore virtual sensors for The comparison between virtual and physical sensors
only a few steps of a walk can be constructed. Secondly signals showed that VAST could simulate inclinometers,
there are some sensors that are difficult or almost accelerometers, goniometers and foot switches accu-
impossible to construct using VAST such as sensors rately. With the body segment model, new sensor
measuring forces. However these physical sensors can locations and novel sensors could be generated to
be integrated with the VAST system. develop and test new FES controllers.
Although we did not use a physical inclinometer we
were able to construct a virtual inclinometer and com-
pare this with data from the literature [24]. Two key fea- References
tures identified by Dai et al were two oscillations, the
first one was caused by shank acceleration after mid- [1] Yarkony GM, Roth EJ, Cybulski G, Jaeger RJ. Neuromuscular
stance and second was the swing phase. These oscil- Stimulation in Spinal Cord Injury: I: Restoration of Functional
Movement of the Extremities. Arch Phys Med Rehabil
lations were present in the signal from our virtual sensor. 1992;73(1):78–86.
One other feature that was present in Dai’s paper was [2] Granat MH, Ferguson ACB, Andrews BJ, Delargy M. The role
an oscillation for the pull-off after heel off, this was not of functional electrical stimulation in the rehabilitation of patients
present in our virtual sensor signal. The walking gait of with incomplete spinal cord injury-observed benefits during gait
our subject (1.5 s per cycle) was faster and smoother studies. Paraplegia 1993;31:207–15.
[3] Heller BW, Granat MH, Andrews BJ. Swing-through gait with
than the subject in Dai’s paper (2 s per cycle). This illus- free-knees produced by surface functional electrical stimulation.
trates how VAST can help understand the gait from dif- Paraplegia 1996;34:8–15.
ferent subjects and test different control algorithms [4] Bajd T, Munih M, Kralj A, Savrin R, Benko H. Voluntary com-
before hardware implementation. mands for FES-assisted walking in incomplete SCI subjects. Med
Sensors are necessary for deriving improved FES con- and Biol Eng and Comput 1995;33:334–7.
[5] Kralj A, Bajd T, Turk R, Benko H, Sega J. The use of a four-
trollers to provide the controller with more feedback channel electrical stimulator as an ambulatory aid for paraplegic
information. A range of sensors have been used in such patients. Physical Therapy 1983;63(7):1116–20.
controllers and have included goniometers, acceler- [6] Ferguson ACB, Granat MH. Evaluation of functional electrical
ometers, inclinometers, rate gyroscopes, foot switches stimulation for an incomplete spinal cord injured patient. Physio-
and strain gauges on crutches [22,25]. Ideally, in order to therapy 1992;78(4):253–6.
[7] Granat MH, Keating JF, Smith ACB, Delargy M, Andrews BJ.
select an optimum sensor set a large number of sensors The use of functional electrical stimulation to assist gait in
(different sensor types and different sensor positions) patients with incomplete spinal cord injury. Disability and
should be used at the same time. However in practice Rehabilitation 1992;14(2):93–7.
using a large number of physical sensors would restrict [8] Crago PE, Lan N, Veltink PH, Abbas JJ, Kantor C. New Control
normal movement, and would be impossible to Strategies for neuroprosthetic systems. Journal of Rehabilitation
Research and Development 1996;33(2):158–72.
implement due to space restrictions and hardware restric- [9] Abbas JJ, Chizeck HJ. Neural Network Control of Functional
tion and also would make any experiment set-up cum- Neuromuscular Stimulation Systems: Computer Simulation Stud-
bersome. There is work going on at present in ies. IEEE Transactions on Biomedical Engineering
developing more complex sensors and sensor sets for 1995;42(11):1117–27.
FES control, like an integrated system using two acceler- [10] Shue G, Crago PE, Chizeck HJ. Muscle-joint models incorporat-
ing activation dynamics, moment-angle, and moment-velocity
ometers and a rate gyroscope [22]. This provides more properties. IEEE Transactions on Biomedical Engineering
feedback information for the control system. However 1995;42(2):212–23.
before development of this complex system, which costs [11] Iguchi Y, Kubo K, Fujita K, Itakura N, Minamitani H. On the
much time and effort, it would be useful to know multi-joint of lower extremity using functional electrical stimu-
whether this integrated sensor set is capable of giving lation. Electrophysiological Kinesiology 1988:117–20.
[12] Fujita K, Kubo K, Itakura N, Minamitani H. Joint angle control
appropriate feedback to the control system. Using with command filter for human ankle movement using functional
VAST, any proposed sensor combination can be tested electrical stimulation. IEEE Ninth Annual Conference for the
prior to implementation. Engineering in Medicine and Biology Society, 1987:1719–20.
468 K. Tong, M. Granat / Medical Engineering & Physics 20 (1998) 458–468
[13] Durfee WK. Control of standing and gait using electrical stimu- [19] Willemsen ARM, Bloemhof F, Boom HBK. Automatic Stance-
lation: influence of muscle model complexity on control strategy. swing Phase Detection from Accelerometer Data for Peroneal
Progress in Brain Research 1993;97:369–81. Nerve Stimulation. IEEE Transactions on Biomedical Engineer-
[14] Kirkwood CA, Andrews BJ, Mowforth P. Automatic detection ing 1990;37(12):1201–8.
of gait events: a case using inductive learning techniques. J [20] Morris JRW. Accelerometry-A technique for the measurement of
Biomed Eng 1989;11:511–6. human body movements. J Biomechanics 1973;6:729–36.
[15] Heller BW, Veltink PH, Rijkhoff NJM, Rutten WLC, Andrews [21] Lafortune MA. Three-dimensional acceleration of the tibia during
BJ. Reconstructing muscle activation during normal walking: a walking and running. J Biomechanics 1991;24:877–86.
comparison of symbolic and connectionist machine leaning tech- [22] Williamson R, Andrews B. Sensors for FES Control Proceedings
niques. Biological Cybernetics 1993;69:327–35. of the 2nd IFESS Conference and NP97’, 1997:213–5.
[16] Kostov A, Stein RB, Armstrong WW, Thomas M. Evaluation of [23] Heller BW. The production and control of functional electrical
adaptive logic networks for control of walking in paralysed stimulation swing-through gait. PhD thesis. Strathclyde Univer-
patients. IEEE EMBS 1992:1332–4. sity, 1992.
[17] Keller T, Curt A, Dietz V, Morari M. EMG Controlled Grasping [24] Dai R, Stein RB, Andrews BJ, James KB, Wieler M. Application
Neuroprosthesis for High Lesioned Tetraplegic Patients. Proceed- of Tilt Sensors in Functional Electrical Stimulation. IEEE Trans
ings of the 2nd IFESS conference and NP97’, 1997:129–30. On Rehabilitation Engineering 1996;4(2):63–71.
[18] Crago PE, Chizeck HJ, Neuman MR, Hambrecht FT. Sensors for [25] Bahrami F, Riener R, Schmidt G. Arm-supported Standing-up:
use with functional neuromuscular stimulation. IEEE Trans- A Comparative Study Proceedings of the 2nd IFESS Conference
actions on Biomedical Engineering 1986;33(2):256–68. and NP97’, 1997:197–8.