COMPUTER PROGRAMS IN BIOMEDICINE 2 (1971) 24-35. NORTH-HOLLAND PUBLISHING COMPANY
EVOKED
RESPONSE
AUDIOMETRY
USING AN IBM 1800 TIMESHARING
FROM THE VERTEX
SYSTEM IN CLINICAL USE *
S. SKOGSTAD NIELSEN, Gerhard SALOMON and Claus ELBERLING Department for Data Processingin Medicine, Audiology Clinic and Department for Technology, Copenhagen County Hospital, Gentofte, Denmark
A program using acoustically evoked neurophysiological responses recorded by signal averaging is presented. The system, also using an adaptive digital filtering, is now used in the audiology clinic for investigation of the auditory system without active cooperation of the patient. The present paper will first give the outline of the hospital computer's time sharing system, and next a detailed description of the audiometry system. In adddition to on-line generated displays, the system, in batch, can produce "hardcopy" documentation of all data contained in a session. Electric response audiometry EEG-averaging
Adaptive filter Timesharing
1. Time-sharing (IBM 1800) The system is implemented on an IBM 1800 with a configuration as shown in fig. 1. In addition to the audiology clinic (clin KAS), the machine serves the central biochemical lab (C-lab) as well as 6 other minor users. The time-sharing is performed under control of the IBM's MPX VI-L3 monitor for the 1800 series. In connection with this monitor, KAS has developed a submonitor system assigning the various on-line users time on the machine according to a "first in first served principle". Only the C-lab is an exception. All day long, at every 1.5 seconds, 6 autoanalyzer channels are logged. In parallel with the autoanalyzers a photometer, an enzyme analyzer and an electrophoresis analyzer are monitored at irregular intervals. By use o f incore interrupt routines it is possible for these analyzers to stop any program during the few milliseconds requested for service.
Total main storage Monitor (Exdir) Interrupt routines (spar) Communication routines (area 1) on line, batch (vcore)
24K 16 bit words 13K 1.5K 1.5K 8.0K
IBM 1800 Display Data retrieval
As shown above the main storage of the 1800 is divided into 3 partitions leaving only 8K in the vcore for the audiometry system. Furthermore, two of the three disc drives are connected to IBM's and K A S ' , monitor system leaving only the third disc pack free to contain the audiometry system program. This third disc is divided into a program area containing the programs in core image form and a data area divided into system files and the raw data area. The queue system contained in the MPX monitor is used to administrate the vcore programs. The C-lab compression and transcription programs are of relative short duration, but they wilt not admit delays exceeding 30 minutes. Therefore, it is necessary that all programs exceeding 30 minutes at intervals leave access to the vcore so that programs of a higher priority in the queue can be processed. The program that is going to be withdrawn enters the b o t t o m of the queue after having disc-stored its status and leaves control to the monitor. The program now placed at the b o t t o m of the queue will process again after the other entries in the queue have been processed; o f course, it will process immediately if it is the only entry present. * This work was supported by the Danish Medical Research Council.
EVOKEDRESPONSEAUDIOMETRY
25
ANALOGUE I NPUT
CARD JEADI ~
Pi
e e °e J :
,
MULTI- "\x ~IANALOGTOI PLEXER ", J DIGITAL I \ ~ | CONVERTERL
1 " . . . . . . . . . ---3I
t
"-"-CgA. [ ELcECTTRAOc~IC[ _F~
~ ~
PROCESS I INTERRUPTI
PROCESSOR / -I CONTROLLER ~
x-y PLOTTER
/ ~
I@ ~
512.000W.
DIAGITAALLT~
TYPEWRITER
Fig. 1. Configurationof the 1800computersystemused. 2. Communication with users In KAS, the laboratories found it necessary to communicate with the computer by means of numerical keyboards and standard oscilloscopes. A 16 bit digital register in the keyboard reads the information from the laboratory worker into the 1800 digital input line by a computer served electronic contact operation (ECO). On the keyboard a special key can give an external interrupt informing the KAS submonitor, showing that the keyboard is ready to send information. The display unit of the terminals is an XY D52 Telequipment oscilloscope. The display is controlled by the 1800 analog output which in turn is controlled by a table in the core memory. Both alphanumerical and graphical displays with suitable adaptation of the table values are obtained. Special I/O routines serving the terminals are developed and incorporated in our program library.
3. Communication with laboratory equipment In the hospital, the laboratory equipment produces analog as well as digital outputs, and a part of the equipment is controlled by ECO's and external in-
terrupts. As the C-lab is surveyed all day, it has been necessary to develop a special I/O routine which can interface the AD converter between the analog channels of the C-lab and the other labs. The drawback of this is a smaller maximal sampling frequency, at the moment only 1000 samples per second, but up till now this has been sufficient for the signal types monitored. If higher sampling frequencies are required, it can be obtained during sampling intervals not exceeding 1.5 sec, and the maximal frequency thus obtained is 20000 samplings per second.
4. Electrical response audiometry (ERA) In audiology, paediatrics, and psychiatry there has always been a demand to judge the auditory ability without cooperation from the patient, and in otology the highest degree of objectivity in differential diagnostic judgements has always been desirable. For many years it has been possible, in experimental animals,to check step by step the acending acoustic neural pathway by registration of bio potentials via local electrodes in the nervous system. In intact patients similar recordings could not be obtained due to the fact that the neuro-electrical pick
S. SKOGSTAD NIELSEN, G. SALOMON and C. ELBERLING
26
up in the patient was recorded from electrodes on the skin surface, and here the signal is very weak and mixed with a variety of irrelevant electrical phenomena which simultaneously reach the electrodes and mask the expected signal with noise. In 1950 Dawson [ 1 ] found that a sufficient signal to noise ratio improvement could be obtained by summing a sequence of time-locked answers, and he developed an analog computer for clinical use. About 10 years later, digital computers became dominating in the form of small fixed program average computers. Signal averaging is the method of choice to remove noise from a series of repeated events containing timelocked signals, presuming that the noise is symmetrically distributed with a mean value of zero. The signal to noise ratio S/N is a measure of how much noise is present in a message. With the above mentioned distribution assuming signal averaging will increase the S/N for the average signal, (S/N),, compared to (S/N),% for the original message as follows:
(S/N), = (S/N)eegN-s, in which N indicates the number of summated messages in the averaged signal. In (ERA) the messages are repeated recordings of EF.G intervals from the cortex. During each recording a time-locked tone burst is applied to the patient thus stimulating the patient with a defined frequency, amplitude, and duration. If the tone is perceived, a specific activity appearing with a fixed delay can be extracted from the patient’s EEG. This activity represents the evoked response from the brain, and whereas this response can be recorded directly from electrodes in the brain, only the signal averaging will extract it from the neuroelectrical background obtained via surface electrodes, see fig. 2.
rejection, is placed in the shielded room. The amplified EEG signal is connected as well to the analog input of the computer terminal as to a monitor oscilloscope. Synchronized with the generated sound impulse, it is possible to generate a 5 /JV square wave pulse which is delivered in parallel with the electrodes and used for calibration of the set-up. A pulse controlled step-attenuator in connection with a power am-. plifier permits control of the following parameters: frequency, intensity, rise and decay time and finally duration of the stimulus. The parameters are entered via the keyboard to the system.
6. The synchronization The actual synchronization of both the EEG recordings and the tone burst is performed by the online program, fig. 3. When the synchronizing impulse has been given, a timer is started and after “timer run out” the sampling of the EEG is initiated. The highest frequency components of the electroencephalogram are in the order of 20 Hz. Thus the use of sampling times of 4,8, or 16 msec permits a distortionfree digital representation of the EEG. We use 150 sampling points, and with the above sampling time they can be chosen to represent 600, 1200, or 2400 msec. The sound generator in the clinic is equipped with a device, delaying the synchronizing impulse 300 msec. By varying the initiation of the timer, the position of the sound stimulus will vary. After each recording the displayed average is updated. Some of the computations take place during the sampling and by means of EEG
f
5. The EEG The patient is placed in an electrically and acoustically shielded room in the clin KAS. The patient is stimulated with tane bursts from a computer controlled gate oscillator [2] . The EEG activity is picked up via chlorided silver needles subcutaneously placed on the vertex, the mastoid and grounded anteriorly on the scalp, and amplified 10000 times. The low noise biological amplifier having 110 dB common mode
Fig. 2. The EEG and the evoked response.
EVOKED RESPONSE AUDIOMETRY
27
SAMPLED EEG SLICE (Array of 150 words) ( one sweep)
pulse
pulse
- "0-300M~ ~
600,1200, 2400 MS.
- ~)0-500M~ - 0 - 2 0 0 - s e c : "
Sampling s~arts "
",,,
T , m,
- l Evaked respans. starts
Delay in generator
/
Sound is given
generator
J Sound is
given
Sound
generator I TIME/ACTION DIAGRAM Fig. 3. Interaction betwen the computer and the equipment located in the clinic, see text.
a second timer function it is possible to delay the next sync. pulse given to the sound generator. All the mentioned delays are computer controlled and set up via the keyboard in the clinic. A survey of the system is shown in fig. 4.
7. The adaptive filter, reproducibility Amplitude histograms of all EEG measurements with a given delay from the sound stimulus showed that the numerical values very often were far from the requested distribution assumption for averaging. As an example, fig. 5 shows the amplitude histograms from two different patients. The sketched average curve on the top shows where the histograms are taken. The distribution in the left series makes it reasonable to use the average method while in the right the method is nearly ineffective. Therefore, it was desirable to improve the distribution by a method of excluding the excessive EEG recording. Fig. 6 shows how the exclusion of the EEG sweeps with excessive amplitudes is carried out. After the EEG has been sampled the EEG peak to peak value is compared with an aperture and the sweep is only rejected if the value exceeds that of the aperture. During all the EEG recordings one counter is updating the total number of sweeps and another
the number of accepted sweeps. The recently accepted percentage of sweeps is compared with a keyboardentered percentage and the aperture is diminished if the actual processed percentage exceeds that of the keyboard-entered and vice versa. If the amplitude of the aperture is changed too rapidly, the aperture will begin to oscillate, indicating that the gain constant in the digital feed-back loop is too high. On the other hand, the aperture will adjust too slowly if the gain is too small. Using trial and error we found an acceptable compromise. In small, restless and especially in brain injured children EEG audiometry must be performed in anaesthesia. The narcotic drugs will change the latency and the shape of the vertex potentials according to the anaesthesia depth. This depth can be evaluated only by means of the EEG and inspection of single EEG sweeps would help us to evaluate whether the anaesthesia depth has been kept constant during the test. A preservation of each sweep will also give us the possibility of clustering the sweeps in groups with the same anaesthesia level. The similarity of the sweeps thus achieved would enhance the average process. A separation similar to the one mentioned above is presently in use. The batch part of the system is plotting separate average curves for the first, the second, and the last third of the total amount of sweeps.
28
S. SKOGSTAD NIELSEN, G. SALOMON and C. ELBERLING EEG
SIGNAL
FLOW
IBM 1800SYSTEM EEG
Amplifier _
I ~
Digit izcd EEG
MAIN I STORAGE I
o,sK )
J f
STORAGE
"BQtch"
Sound GeneratorI
I
I I
Oscilloscope
,I
I
t
, I
L "BATCH": RMS STD Average
"ON LINE':
EEG digitizing and storage Display of EEG or average
Statistics
Fig. 4. Inside the dotted lines the equipment located at the computing center. The rest is located in the audiology clinic (400 meters away).
This method has been introduced by Burian [3] and is used to avoid the influence of peaks that manage to squeeze through the digital filter which in our system may happen if the EEG has been dominated by severe noise for some time. At the same time, the tri-section permits control of reproducibility of deflection before they are judged to be responses. The root mean square values as well as the standard deviations of all measurements with the same distance from the sound stimulus are plotted as two separate curves by the batch part of the system. These two curves have been of clinical value to indicate changes in the encephalogram after stimulation [4]. The batch part on request can write out all raw data on the printer and punch out the raw data in 8 bit precision in a packed binary form.
8. Program logic and formulas 8.1. Initialization of on-line system (FOIl) The program starts by requesting the patient's identification and whether a calibration run is desired. A calibration run consists of 5 sweeps containing a time-locked square pulse of 5 #V delivered to the EEG amplifier. This pulse serves as a check of all the equipment involved in the recording and represents documentation of the frequency response and amplification of the transmission line. During the batch plotting the pulse is used for amplitude calibration. After the calibration run, the program continues with initialization and generates a status dump to the status file of the on-line system according to the described queue technique, see flow chart P1.
EVOKED RESPONSE AUDIOMETRY
&.,~
~2A.
_
AJI-
h. I4
i•
[7
,
29
! s~'T
,
mseC.
A
__._./%
r
r
Fig. 5. Amplitude histograms. On the top is shown a schematic evoked response after averaging: left histograms from a normal adult, right from an restless child: 1, 2, 3, ... indicates where the histograms have been calculated.
8.2. Collection of raw data (FOIOR) FO10R either starts the calibration run if requested or starts up an interview with the clinic operator about the values of the run parameters for the first EEG run and checks the validity of the entered values (requesting new values to be entered if invalid ones have been entered). Also an error exit is available. Then FOIOR is entered in the queue and after a status dump FO1 OR finally leaves control to the monitor, see flow chart P2. When FOIOR again comes in control, the status is fetched and after a check whether it is possible to put more raw data to the file, the EEG without stimulation is sampled to set up the initial value of the aperture. If the synchronization flag is set showing that a pulse is needed the ECO sync. is given to the sound generator. This sync. pulse is delivered with the computer system in a totally masked
EEGpp EEG~:~
/...~..II
sweep is rejected
analysedpiece EEGpp.....,..~I I sweep is accepted of
EEG "one s w e e p " EEGpp
aperture
,
aperture
and ~ apertureJ
- -
EEGpp --
i
no.of accepted sweep total no. of sweep
no. of sweep constant
Fig 6 The aperture The upper part shows how the EEG__ value is compared with the aperture size, the curves show Wow the aperture adapts to the running EEG. On the bottom is shown the ratio determining the size of the aperture, see text. •
.
.
[~
30
S. SKOGSTAD NIELSEN, G. SALOMON and C. ELBERLING
FORMULAS
FOR THE FIRST POINT
n= N
MON=~-n--~l°1'"'"also'n(150. n N ~.sweepsjAt[ ~
[ Eoch M O = al'n ...... 150 a150"n ~,$weep/
0 r~N (Ohn - MDN ) =n=/_.f N
M1
n'~3tal,n - MDN
I
n=N'7"/3
n=N
MZ, r,__/_~. S (aln 1 ,~UON)
M, :~--t°"° N MD) n=l
3 ~J~L(°I n - MDN) M1 n = ~ 3 . 1 ' N/3
n=N
o.no \ / ~ - - r o ~ o,~,=V~~J-'"' PLOTTER
traction of the mean deviation a zero adjustment of every sweep is obtained and thereby the on-line average is kept stabile in spite of big changes of the electrical dc level of the EEG. Raw data are not influenced by this computation. After updating the display, the next sync. pulse is delivered and delayed if requested. When a run has come to an end, the on-line average display is stored on the raw data file for on-line retrieval.
'
uo .Mo , OSCI LLOSCOPE
Fig. 7. Formulae used, left column used in batch computation, right column used for the on-line display, see text. state so that a servicing of an interrupt by the monitor cannot disturb the time-lock between the sound peep and the data collection. After the data collection has started the system is again unmasked. At that point no disturbance can appear in the time-locking because the ADC is connected to a data channel. Upon a check for ADC overloads the size of the aperture is updated as follows:
AP = AP + 1.6" (ACC-NACCN--T-~)' where AP is aperture size, ACC is the chosen run parameter, NACC is the number of accepted sweeps, NTOT is the total number of sweeps. If the sweep is not accepted, the next sync. impulse is suppressed, and it is checked whether the laboratory assistant wants to give a message, if not, the collection of the next sweep is started immediately. If the sweep has been accepted, raw data are filed on the disc, and the display tables for the on-line display are updated according to the lowest formula in the right column of fig. 7. MD is the average value of the just now recorded sweep, and is calculated in accordance to the uppermost right formula. By this sub-
8.3. Retrieve recorded data (FO13, FO13F) Is used for on-line display of the recorded sweeps on the oscilloscope and for later display of the average calculated in FO10R. The program starts asking for the record number to be displayed and gives a warning if this number has indicated a single sweep. After it has tabulated the values of the run parameters, the display is retrieved, and the operator can then request another display or an exit from the program. See flow chart P6. 8.4. The batch system The batch system is split up in a main program communicating via data switches and punch cards, and several subprograms covering the various functions. In fig. 7 the formulae used to calculate the plotted curves are shown. MDN is the average value for all sweeps. M~I is similar to M 1 in the right column of fig. 7 except MDN is substituting MD. M~, M 2, M 3 are the averages computed for the first point of each of the three averages. In the same manner, the RMS 0 represents the root mean square value and STD 0, the standard deviation. Thus the formulae, except for MD and MDN, are describing how the first of the total 150 sampling points of one sweep are treated.
9. Sample run
The plotted curves on A show the RMS and the standard deviation curves labelled R and S, the horizontal line indicates the mean of the S curve. On B the 4 average curves are shown, the main curve is unlabelled, the three subaverages are labelled 1,2, and 3 . 7 0 stimuli have been delivered (50 dB inten-
F011
INITh
INITIALIZE
ON-LI NE SYSTEM
FOIOR
HU) \
I
COLLECT
RUN PARAMETERS
AMPL
STIMI
ENTER
RAW DATA
P2
O
>
O Z
< O
FOIOR
J
I
~b
SWEEP COUNTER
i u,0,..i
I
SPECIFIED DELAY TIME
i w., i
t
STOP DISPLAY. MASK SYSTEM. GiVE SYNC. PULSE. START DISPLAY
ES
YES
NEXT
~
DING
COLLECT
SYSTEM
I
ANALOG INPUT
@
NEW AVERAGE.
t [%'°°'R°TE I ,~v":
APERTURE
il....
RAW DATA P3
WA NTS MORE /
FOIOR
t.
,
~
k .k ~ , i :~
EVOKED RESPONSE
RECORDED l RESET I RAWDATA ANDDISRAWDATA I PLAVS COUNTER I
......
l L'_ _ _ ~
NUMBER OF SWEEPS
i~o..... ]
MESSAGE
SWEEPS BEE SAMPLED
COLLECT RAW DATA
P4
D
e~
g
O © Z
z
z
0 0
EVOKED
RESPONSE
AUDIOMETRY
33
CD
<+
o
IM
o
K:
p.IM
4
h ¢O O
9
la.
r
¢O O la.
0..
t'~
t~
o
I-(..) i.1.1 .-I ....I O t.)
o," O O I.t.
f'l
o
34
S. SKOGSTAD NIELSEN, G. SALOMON and C. ELBERLING ~rl'~_ SIIEB=
I.B4R, _'4,HINTENSITET
4 50. fiB.
t000, I"~,
ilW
b,
70-- ~.8
1.5,0
10,0
5,0
M~t -300
100
9Q0
-l.0,0
Sample run A. RMS curve (R) displaced 290 mm upwards. sity of 1000 Hz tone during 100 msec). Note that all averages show a downwards deflection from approx. 100 msec to approx. 150 msec. Throughout the rest of the plotting the averages do not indicate a systematic trend. Note the signal to noise ratio on the main average curve is approx. 2:1. Note too, that a distinct change in both the RMS and the standard deviation curve takes place time-locked with the deflection in the average curves.
10. Programming notes The system is programmed in ASA basic FORTRAN for the IBM 1800 compiler. The on-line part consists of around 1500 statements. The batch part consists of around 2000 statements. The I/O routines handling the communication with the terminals are programmed mostly in assembler, requiring around 1500 machine words in total. The DMP monitor's *localoverlay feature is largely utilized.
EVOKED RESPONSE AUDIOMETRY
Li~.
.'~4-
35
4
II~13~TL't 50. n~. I,IYv E~
t5.o
'[o,o
~
- 5.0
-tO°O
-LS.0 Sample run B. Upward deflections indicate vertex electrode negative with regard to mastoid electrode.
11. Timings
References
An on-line session including 10 minutes communication consists o f 8 - 1 0 runs, and normally lasts one hour. The documentations of a standard run requires 1½-2 hours, to produce a binary dump of the raw data from one session requires 2 0 - 3 0 minutes.
[1] G.D. Dawson, Brit. Med. Bull. 6 (1950) 326. [2] G. Salomon and C. Elberling, Nord. Med. 14 (1968) 1559. [3] K. Burian and G.S. Gestring, Lecture given at the first Intern. ERA Symp. Freiburg, Germany (1970); Archiv Kiln. Exp. Ohren-Nasen- und Kehlkopfheilkunde 198 (1971) No. 1. [4] G. Salomon, Acta Oto-LaryngoL SuppL 273 (1970) 238.
12. Program availability
Contact: Department for Data Processing in Medicine.