to set the patient’s body potential was deemed unnec-
essary. Proper biasing of the input stage is provided
directly to the main electrodes by means of a resistive
network connected to the internal reference potential.
Despite all these precautions, it is still possible
that the detected signal presents a DC component, or
an input bias, high enough to cause saturation of some
amplifier. To avert this possibility the circuit employs
an active bias control, fed between the two amplifying
stages by means of a PWM signal, that is able to can-
cel both amplifier bias and (small) DC components
that can arise when the patient moves other parts of
their body.
This active offset compensation technique was
deemed to be superior to simple AC coupling, for it
can use more complex filters. Moreover, since the
communication channel between the node and the
base station is bidirectional, these filters can be run
on the PC side and thus there are potentially no lim-
its to their complexity. For instance, we made use of
fourth-order elliptical digital filters running on the PC
side, with their group delay properly compensated in
the reported plots. Such a solution proved to be very
good at removing the spikes, usually due to patient’s
motion, commonly found in EMG traces, but would
have been much more costly to implement in hard-
ware.
3.2 AGC Algorithm
AGC poses a different problem than offset and bias
compensation, since the latter are usually slowly
time-varying phenomena for which the round-trip de-
lay, due to the communication with the base station
system, does not cause harmful degradation of the
control loop stability and performance. On the con-
trary, the EMG signal can have quite abrupt transis-
tions. As a consequence, a simple but yet effective
AGC algorithm was devised, so that it could be run
on the wireless node to offer the quickest possible re-
sponse time.
As previously stated, the purpose of the AGC is
to keep the input MAV level to the quantizer as close
as possible to 0.1L, where L is the ADC saturation
level. To this end, an estimation
e
b(t) of the MAV is
computed with a first-order recursive digital filter,
e
b(t) = (1− α)
e
b(t − 1) + α|z(t)/g(t)| (6)
with z(t) being the ADC output, g(t) the amplifier
gain, and α controls the filter bandwidth. Good re-
sults have been obtained with α ≃ 1/64, which corre-
sponds to a cut-off frequency of about 5Hz.
The optimum gain is then calculated as
eg(t + 1) =
0.1L
e
b(t)
(7)
from which the actual gain g(t + 1) to be used next
is chosen among the available gains, in steps of ap-
proximately 2 dB, with the help of a 22-entry look-up
table.
3.3 Wireless Data Transmission
LR-WPAN are emerging technologies for medium
distance low data rate communications. A protocol
to manage this kind of networks has been defined by
IEEE 802.15.4, which describes both a MAC layer
and a PHY layer. The operating frequencies of the
wireless link can be 868MHz, 915MHz or 2.4 GHz,
for an available data rate respectively of 20 kbps,
40 kbps and 250kbps. Our active sensor operates
at 2.45 GHz in the ISM band to achieve maximum
throughput. In this band there are 16 channels, each
5MHz wide. Typical distances covered by this tech-
nology ranges from 30m to 70 m in open spaces. It
can be easily extended by the use of an RF power am-
plifier joined to an LNA. Typically they are the same
as for other ISM wireless technologies such as Blue-
tooth and Wi-Fi. In customized applications IEEE
802.15.4 could imply difficulties in respecting timing
constraints posed by real-time streaming of data, such
as the one we need to perform in this context. We
hence decided to only use the capabilities of the PHY
layer of IEEE 802.15.4, customizing the MAC layer
to our purposes. A number of active SEMG sensors,
depending on how many data channels each uses, can
comunicate to the base station (BS) in a star topology
on the same RF channel, using a custom beaconed
time-division multiple access (TDMA) MAC scheme.
The BS is itself composed by an IEEE 802.15.4 com-
pliant transceiver and its task is to make data available
to the PC by the use of an USB link. For stream-
ing data from multiple sensors and for achieving full-
duplex operation it is necessary to assign time slots
to each sensor and to transmit/receive transactions.
Transmission and reception has to be scheduled by
devising an adequate timing of the active sensor con-
sidering the strict requirements of the ADC sampling
time. The adopted transceivers have particular tim-
ings regarding the transmission over the air of a data
packet. There is a warmup period t
warmup
= 144µs be-
fore the effective bitstream can be relayed, followed
by a t
cooldown
= 10 µs cooldown period. Timings are
then coherent with those reported in Figures 8 and 10:
t
pkt
(B) = t
warmup
+ t
header
+ B·t
byte
+ t
trailer
+ t
cooldown
(8)
t
tx
≈ t
pkt
(B)
B=B
tx
(9)
with t
byte
= 32 µs as per IEEE 802.15.4 specifications,
and where the payload length B
tx
is comprised of the
EMG data bytes B
EMG
and of the acceleration data
2.4GHZ WIRELESS ELECTROMYOGRAPH SYSTEM WITH STATISTICALLY OPTIMAL AUTOMATIC GAIN
CONTROL - Design and Performance Analysis
43