Modification of the EEG Time Constant by Digital Filtering

advertisement
Vol. 19, No. 2
Printed in U.S.A.
PSrCHOPHYSIOLOGY
Published 1982 byThe Society for Psythophysiological Research. Inc.
Modification of the EEG Time Constant
by Digital Filtering
THEO GASSER, ALOIS KNEIP, AND ROLE VERLEGER
Zentralinsiitut fur SeelLsche Gesundheil. Mannheim. Federal Republic of Germany
ABSTRACT
A method is proposed for modifying the time constant of an EEG amplifier after the recording. It is
based on digital filtering and works for single sweeps, averaged potentials, and other neurophysiological
data, e.g. spontaneous EEG. The validation is based on calibration signals and data from a study on eventrelated potentials.
DESCRIPTORS: Time constant. Slow potentials, Digital filtering.
We present here a computer algorithm for the
modification of the time constant of an EEG
amplifier to any desired vaiue. This possibility is of
interest in particular for researeh on slow potentials
and to a somewhat lesser degree for the spontaneous EEG: as has been pointed out by DuncanJohnson and Donchin (1979), there is a great variability in the time constant used which may lead to
spurious differences between studies. Furthermore, EEG amplifiers in clinical laboratories often
have time constants ranging from 0.1 to 1.0 see
only, preventing those laboratories from doing research on slow potentials, where much higher time
constants are needed. Especially with behaviorally
disturbed subjects it may even be advantageous to
record the EEG with a time constant as low as 0.1
sec; this can alleviate problems with the dynamic
range of the equipment which oceur more frequently with higher time constants.
Our method applies to single sweeps, averaged
potentials, and also to the continuously recorded
EEG. It is based on digital filtering using the Fast
FourierTransform(FFT)(Cooley&Tukey, 1965).
That it works will be shown by filtering calibration
signals, a single sweep, and an averaged potential.
A comparison is made with a different approach by
Elbert and Roekstroh (1980).
Method
Digital Filtering
In an EEG laboratory data is recorded via an
amplifier with the time constant T set at some value. In a
more general and more formal way we can say that the
EEG signal is passed through an analog filter which is
characterized by its transfer function H^(v) {v = frequency in radians). The function H (i-) tells us by what
amount an incoming sine-wave of frequency v is attenuated or amplified ("gain"), and how much it is shifted in
time ("phase"). The transfer function of the analog filter
of the EEG amplifier is such that the amplitude of slow
components is attenuated and shifted in time, and this to
an increasing degree for slower frequencies v and smaller
time constants T (compare e.g. Cooper, Osselton, &
Shaw, 1974). Assume that these properties are undesirable and that some "virtual" amplifier with transfer function H^ (v) is wanted instead. This is accomplished on the
computer by digital filtering in the frequency domain
rather than the time domain both for speed of computation and ease of programming (compare e.g. Oppenheim
& Schafer, 1975). Figure 1 illustrates this modification.
original omplider
signal
A,IU
with tronster
output signoi o( H]
function Hj I
" yirluol" nrnplifjer
This work has been performed as part of the research program of the Sonderforschungsbereich 123 (project BI) and
the Sonderforschungsbereich 116 (project M2}. both at the
University of Heidelberg, and was made possible by financial
support from the Deutsche Forschungsgemeinschaft.
Address requests for reprints to: Theo Gasser, Zcntralinstitut fur Scclischc Gesundheit, Postfach 5970, 68(.X) Mannheim 1, Federal Republic of Germany.
with desired
Iranslef function
H2 1^1
output signal
•
ot H2 = '-, Itl
Figure I. Diagram showing the relationship of the ohtainod signal lo the calculated signal with the desired time
constant.
237
0048-5772/82/020237-04$0,4(}/0
1982 Tbe Society for Psychophysiological Research, Inc.
238
Gasser, Kneip, and Verleger
In order to obtain x,(t), when in fact x(t) is recorded,
the following steps have to be performed:
(i) Forward Fourier-transformation of data recorded to
obtain the frequency domain representation:
x(t)->X(v)
(ii) Application of a compensating filter H ^ to obtain an
estimate for the input signal X|(t) in the frequency domain:
X,(v) = X(v)/H,(v)
(iii) Filtering forward with a transfer function H^ of your
choice:
(iv) Inverse Fourier-transformation to obtain the digitally filtered data in the time domain:
Whenfilteringmass data (e.g. the ongoing EEG), the
data has to be segtnented because of limited computer
memory: in order to avoid boundary effects, we implemented an overlapping algorithm. The programs can be
obtained from the authors on request. By using the Fast
Fourier Transform (FFT) (Cooley & Tukey, 1965), we
assume the number of data points to be a power of two.
This requirement can always be met by taking more
points than absolutely necessary. This is advisable also in
order to improve the frequency resolution and in order to
reduce end effects due to filtering.
A word of caution is appropriate at this point: It is not
possible to filter any signal in an arbitrary way without
loss of accuracy. Whenever the original transfer function
H|(y) has attenuated the signal by a high proportion in
some frequency range, its restoration by digital filtering
tends to become inaccurate. It may, therefore, become
illusory to filter EHG data recorded at very low time constants to very high time constants with high accuracy.
Characterization ofthe EEG Amplifier
In a first step a digital method has to compensate for
the amplitude and phase distortion introduced by the analog devices of the EEG amplifier. The step response
( = the calibration signal) SR^ is usually modeled by an
exponential (or equivalently by its transfer function H, ^
which has to be substituted for H, in relation (ii) given
above):
Vol. 19. No. 2
that our amplifier (Schwarzer Encephysioscript 1630) has
a cascade of two such elements—one fixed at T, = 4.2
sec—which is better modeled in the following way:
SR(t)= J c - ( — ' — e " ^ '
^^—e "
(3)
t<0
(4)
Based on non-linear regression analysis T in relation (3)
could be identified and thefitwas good as judged from
the residuals. {For values of T = 0.1 and 1.0 sec given by
the manufacturer we determined values of 0.1084 and
1.088 sec respectively.) A FORTRAN routine described
inDeuflhardand Apostolescu(Note 1) was used, but any
other stable non-linear least-squares program should do
as well. It is essential to subtract the average of the baseline prior to the calibration signal.
As to the transfer function H, in (iii) we are free to
specify it according to our goals. We usually define H, by
relation (4) for desired time constants below 4.2 sec and
by relation (3) for those above 4.2 sec. In many instances
it may be worthwhile to take the absolute value of H, ^.
thereby eliminating any phase distortion; our limited
number of runs clearly demonstrated a rather gross distortion of waveforms due to the running phase for time
constants as low as 0.1 sec.
Tests ofthe Method
Calibration Signals
Calibration signals recorded frotn the EEG
amplifier, with time cotistants set at 0.1 and 1.0 sec,
were filtered, and the time constant of the filtered
signals was estimated as described above. Table 1
demonstrates that a time constant of 1.0 sec can be
reliably reduced or enhanced in a range from 0.05
to 10.0 sec. For a time constant as low as 0.1 sec, it
is possible to come as far as about 7 sec with
filtering which should be sufficient for most purposes. Figure 2 shows graphically the effect of
filtering a calibration signal.
EEG Data
SR^(t)
c e"
t<U
0
2'rrivT-l
(1)
(2)
where: T = time constant of EEG amplifier
X.v = time respectively frequency variable
c - amplitude of step response
i = imaginary unit of a complex number
Based on (1), we tried to estimate the time constants by
regression analysis, using calibration signals as data. Due
to an undershoot, not compatible with (I), thefitwas
rather poor.
Further information from the manufacturer showed
To check the method further, it was applied to
event-related potentials recorded with a time constant of 1.0 at C^, while meaningful pictures were
presented to the subject (see Verleger, Gasser, Bacher, & Weingartner, 1981, for a preliminary report). We first took a single sweep: Figure 3 shows
the original curve together with filtered versions
with (desired) time constants 0.1, 4.0 and 10.0 sec.
To bring out the effects of filtering more clearly, we
computed differences in the following way {compare Figure 4): the signal filtered to 10.0 sec was
considered to be the true curve; then differences
were successively formed to a filtered version with
239
Modification of Time Constant
March, 1982
TABLE I
Time constants determined from gauge
signals and filtered gauge signals
Time Constant
of EEG
Amplifier
Time
Constant
Desired
Constant
Reached
O.i084
0.U5
0.3
1.0
2.0
4.0
6.0
10.0
0.048
0.2%
1.026
2.127
4.242
5.888
7.439
1.088
0.05
0.1
0.3
2.0
4.0
6.0
10.0
(1.049
Q.im
0.303
1.819
4.112
6.357
10.37(1
TIME 15EC1
Figure 3. Single sweep of event-related potential, from
bottom to top; 0.l-sec filtered, l.()88-sec original. 4.()-sec
tiltered, 10.0-sec filtered.
TIME
3.
4.
S.
TIME 15EC)
Figure 2. Calibration signals, from top to bottom: 1 .DHHsec original, filtered to 0.1 sec. 0.1084-sec original (for
graphic representation a time scale different from the EEG
trace was chosen).
(SECJ
Figure 4. Differences of traces 1, 2, and 3 with respect to
the uppermost trace 4 (10.0-sec time constant) in Eigure 3.
when using different time constants. This holds in
particular for research on slow potentials of the
brain. We proposed a versatile method, based on
digital filtering, to solve this problem, and proved it
T = 0.! sec. The loss of structure is drastic for II.1 to work properly. Its implementation on a laboraand 1.0 sec. but already tnild for 4.0 sec. Similar tory computer is feasible both regarding core and
speed of computation. To achieve high accuracy
results were obtained for averaged potentials.
results, a closer look at the characteristics of the
Numerical A ccuracy
EEG amplifier is appropriate; any deviations from
The followitig test for the nutnerical accuracy of the situation we encountered can be treated in a
the tnethod is adtnittedly an incomplete one but similar way, following the recotnmendations of this
could nevertheless serve as a guideline. A sweep article. Judging from our work with mentally handrecorded with a time constant of 1 sec was filtered icapped children, it is advantageous to record with
to 10.0, 4.0. and 0.1 sec and afterwards filtered low time constants even if a higher one is available,
and filter later to higher time constants: as Table 1
back to 1 sec. The differences from the original
shows, a time constant as low as 0.1 sec is feasible
curve were in all cases of the order of 10 ' ^lV
for recording.
which is completely negligible.
The approach by Elbert and Rockstroh (1980) is
Discussion
simpler but less versatile. It allows only for the corIn the past much controversy has arisen out of rection of the time constant to d.c. level (time conthe technical question of comparability of results stant equal to infinity).
240
Gasser, Kneip, and Verleger
We have applied both methods to an averaged
potential with a time constant of O.I sec. From our
resultsweconcludethat both methods brought out
the slow components; however, Elbert and Rockstroh's method introduced a falling time trend for
which there was no evidence in the original data.
(A comparison with data recorded with a time constant of 1.0 sec leads to less drastic differences.) It
has to be conceded that the method suggested by
Elbert and Rockstroh is designed for filter charac-
Vol. 19. No. 2
teristics(l)and(2),andthatamodificationrelating
it to (3) and (4) would probably improve the
results. We consider it an advantage that two
methods are now available to solve problems associated with recordings of different or inadequate
time constants; the one introduced by Elbert and
Rockstroh is highly specific and restricted, but simpie, the one suggested by us is more complex, but
highlyfiexibleand easy to generalize to other needs
and different equipment.
REFERENCES
Cooley, J.W., & Tukey, J.W. An algorithm for the machine
calculation of complex Fourier series. Mathematics of
Computation, 1965,29,297-301.
Cooper, R., Osselton, J. W., & Shaw, J. C. EEG techno!ogy. London; Butterworths, 1974.
Duncan-Johnson,C. C.,& Donchin, E.Thetimeconstantin
P300 recording. Psychophysiology. 1979,16. 53-53.
Elbert, T., & Rockstroh, B. Some remarks on the developmeni of a standardized time constant. Psychophysiology,
1980,/7,504-505.
Oppenheim, A. V.,& Schafer, R. W. Digital signal process//j^. Englewood Cliffs, New Jersey: Prenlice Hiill, 1975.
Verleger, R.. Gasser. T., Bacher P., & Weingartner. O.
Analysing poor performance by recording event related
potentials of the EEG. In P. Mittler (Ed.), Frontiers of
knowledge in mental retardation: Biomeirical aspects.
Baltimore, Maryland: University Park Press, 1981. Pp.
187-196.
REFERENCE NOTE
1. Deufihard, P., & Apostolescu, V. A study of ihe GaussNewton merhod for the solution of nonlinear least sqtiares
problems (Tech. Rep. Nr. 51, SFB 123). Heidelberg:
Universitat Heidelberg, 1980.
(Manuscript received February 19, I981;acceptedforpublication July 29, 1981)
Announcements
Research Associate Position
In Clinical Psychophysiology and Behavioral Medicine
Duke University has a position open as of January 1,1982, for a new Ph.D. with training
in psychophysiology and/or experimental clinical psychology and a strong interest in autonomic nervous system physiology. This is an opportunity to work with a strong interdisciplinary team actively engaged in research in the area of behavioral medicine. Interested applicants should send curriculum vita to: Richard S, Surwit, Ph.D., Box 3926, Duke University
Medical Center, Durham, NC 27710.
Postdoctoral Fellowships
At Duke University
The Duke University Center for the Study of Aging and Human Development is offering postdoctoral fellowships in adult development and/or aging. Research training is available in many biomedical, behavioral, and social science disciplines.
To request application materials, reply with vita and brief description of proposed research area. Completed applications should be received by April 26, 1982 for positions
starting in June 1982 and positions for the 1982-1983 academic year. Contact: Dr. Ilene C.
Siegler, Box 3003. Duke University Medical Center, Durham, NC 27710. An equal
opportunity/affirmative action employer.
Download