A VERSATILE PHYSIOLOGICAL DATA ANALYSIS SYSTEM USING AN I N T E L 8080 MICROPROCESSOR
D. Hyde, E.G. Nice, P.J. Oakley Faculty of Science, Science Laboratories, South Road, Durham DHI 3LE, U.K. ABSTRACT A microprocessor based physiological data processor has been realised. The system controls the data flow from physiological experiments and performs on-line mean and variance calculations with an output in graphical form. The analyser accepts one data point every 0.5 ms and has a capacity of 128 records each containing 800 data points.
Post stimulus histogram and inter-
val histogram analysis programs have also been written and implemented. 1. Introduction Many physiological experiments require data averaging in order to obtain either an acceptable signal to noise ratio or the average response to an external stimulus.
At present two distinct but expensive solutions to this
problem are favoured.
On-line data processing has been performed with a
central computer in a time sharing mode.
Alternatively some research work-
ers have preferred to use dedicated on-line mini computers to undertake the tasks of data gathering and reduction.
A third possibility has emerged
with the availability of microprocessors and their ancillary components. This strategy allows, we believe, a cheap but flexible solution to the problem of signal averaging in the physiological domain.
A versatile data
processing system using an Intel 8080 microprocessor will now be described in which system storage is kept to a minimum. 2. Theoretical basis The normal expressions for the mean and the variance are shown in equaN (I) and (2) ~ xi(t ) (~) x(t) i=1
tion
L
and
o2t
(xlt i=!
x t)2 N
where N is the number of records and x(t) is the mean and a2(t) is the variance.
202
The second equation makes it necessary to calculate the m e a n before any calculation of the variance can be attempted.
This is an unacceptable
approach for a small system as it requires complete storage of the input data.
However,
alternative
for machine implementation.
forms of equation
(2) are much more suitable
Thus expanding and collecting terms e q u a t i o n
(3) emerges:
2 2 O
(t) .
~ .~.W. i= 1
x I (t) . . N
This e x p r e s s i o n o n l y r e q u i r e s the storage of
--2 x(t)
'running'
(3)
totals and is there-
fore ideal for'a low cost data p r o c e s s i n g system. 3. S y s t e m Structure and l]rogramminq Signal to noise p r o b l e m s are common in the p h y s i o l o g i c a l data p r o c e s s i n g field where small
(~V size)
signals are e n c o u n t e r e d in extra c e l l u l a r re-
cordings or, high noise levels are seen in i n t r a - c e l l u l a r records signals)
(mY size
made through high resistance microelectronics.
The input signal is p a s s e d through a p r e - f i l t e r to remove excess noise and then d i g i t i z e d to an accuracy of 0.4% of F.S.
(8 bits).
The input is
sampled regularly and 800 data points are taken on each record.
Internally
the p r o g r a m stores the running totals using 5 bytes per data point.
Thus
4000 b y t e s of read-write memory are required for data storage and the a d d i t i o n a l 96 bytes are available for temporary storage
(see Figure
I).
Y1
o Y2 P
cess
X
/]_ Start o
4 K byte Figure I
203
The program copes with DC drift by a digital level shift calculated from the first point on each record.
High frequency noise was reduced by pre-
filtering and is further reduced by the averaging process. The microprocessor program was written in 8080 assembler code using structured programming techniques where all major components of the program are written as separate modules
(see Figure 2).
The speed of the program
is predominantly determined by the time taken to calculate the "running" sum of squares as this proved to be the most complex operation. START
Zx
÷
¢
Zx 2 ÷
R÷
R + i I
t÷~
t÷¢
READ : N
i READ : DC Levell
Calc:
t
x(t)
i
2 (t)
÷ (7"x t)--2
x(t)
N
Correct : Drift t Calc. : ~- x(t) i :
~x(t) N
i
x(t) 2
NO
t : ~- x(t) 2 1
I I t÷t÷l
J
I Display
]
x(t), (~2(t) vs t
Figure 2
R:= No.of Records taken N:= No. to be taken
204
It was r e a l i s e d
that a r e l a t i v e l y
effort would greatly histogram
and interval
read o n l y memory. loscope
extend
analysis
In a d d i t i o n
and an X-Y p l o t t e r
routine.
Correlation
small
the useful
programs an o u t p u t
was d e v e l o p e d
and F o u r i e r
amount of a d d i t i o n a l
range of the system. were written display
and loaded
routine
into the
for b o t h an oscil-
and i n c o r p o r a t e d
analysis
programming
Post stimulus
are c o n s i d e r e d
as a common feasible
but are
n o t yet implemented. 4. S y s t e m p e r f o r m a n c e The o v e r a l l physiological
and a c c u r a c y
s y s t e m was
found to be very r e l i a b l e
data a v e r a g i n g
system was r e a l i s e d
in m a n y d i f f e r e n t
on a d e v e l o p m e n t
system
and p r o v i d e d
useful
types of experiment.
for d e b u g g i n g
The
and data valida-
tion purposes. The
system performance
and the m a x i m u m modifications maximum
to e a c h p r o g r a m
data rates w e r e
averaging
and
using
to remove
The a c c u r a c y
quite
used.
adequate
I data p o i n t
square wave
techniques
syncronisation.
in 0.55 ms for the
to function
is g o v e r n e d
hence
system will provide
were
functions,
at the p r e d i c t e d
by the input d a t a a n d the
is 8 b i t s or 0.4% w h i c h
for m o s t p h y s i o l o g i c a l
facilities
simple The
s y s t e m structure.
The input a c c u r a c y
128 records,
The d i s p l a y
but a d e d i c a t e d
external
p r o g r a m was not able
of the c a l c u l a t i o n s
is able to cope w i t h 11.3 times.
simple
in 152 ~s for b o t h the h i s t o g r a m
in 0.5 ms due to the d e v e l o p m e n t
n u m b e r of records believed
tested
found to be
I data p o i n t
the m e a n and v a r i a n c e i point
was
data rates of e a c h p r o g r a m w e r e m e a s u r e d by m a k i n g
applications.
decreasing
is
The p r o g r a m
the e r r o r by
~
or
limited b y the d e v e l o p m e n t
12 b i t a c c u r a c y
(0.025%)
system
on all o u t p u t s
5. C o n c l u s i o n It has b e e n shown physiological tent results cost pares
signals
that low cost m i c r o p r o c e s s o r s under a w i d e