Automated analysis of prerecorded evoked electromyographic activity from rat muscle

Automated analysis of prerecorded evoked electromyographic activity from rat muscle

Automated analysis of prerecorded evoked electromyographic activity from rat muscle I. Basarab-Horwath, Department Shefield of Electrical City Rece...

518KB Sizes 2 Downloads 85 Views

Automated analysis of prerecorded evoked electromyographic activity from rat muscle I. Basarab-Horwath, Department Shefield

of Electrical

City

Received July

D.G. Dewhurst*, and Electronic

Polytechnic,

Pond

1988, accepted July

Street,

R. Dixon, A.S. Meehan*,

Engineering Sheffield

Sl

and *Department IWB,

and S. Odusanya

of Biological

Sciences,

UK

1988

ABSTRACT An automated microprocessor-based data acquisition and analysis system has been deueloped speciJically to quantiJ electromyographic (EMG) activity induced by the convulsant agent catechol in the anaesthetized rat. The stimulus and EMG response are recorded on magnetic tape. On playback, the stimulus triggers a digital oscilloscope and, via interface circuitry, a BBC B microcomputer. The myoelectric activity is digitized by the oscilloscope before being transferred under computer control via a RX232 link to the microcomputer. This system overcomes the problems of dealing with signals of variable latency and allows quantification of latency, amplitude, area and frequency of occurrence of spe$ic components within the signal. The captured data can be used to generate either signal or superimposed high resolution graphic reproductions of the original waveforms. Although this system has been designed for a speciJic application, it could easily be mod$ed to allow analysis of any complex waveform. Keywords:

Electromyographic

activity,

evoked response, automated

INTRODUCTION An automated data acquisition and analysis system has been developed in order to quantify the sensory-evoked electromyographic (EMG) activity induced by administration of the convulsant agent catechol in urethane-anaesthetized rats. Electromyographic activity, evoked by electrical stimulation of cutaneous afferents at the wrist, is recorded from forelimb muscles (flexor carpii). Records are amplified, displayed on an oscilloscope and simultaneously recorded on magnetic tape. Typically each record consists of three temporally distinct components (M 1, M2, M3), each the result of the activation of a different reflex pathway’. Several superimposed waveforms are shown in Figure I. Catechol-induced, sensory evoked convulsions may be of particular value as an animal model in the study of tonic-clonic seizures, since the two longer-latency components (M2 and M3) have been shown to be inhibited by anticonvulsants known to be effective against such seizures, but to be unaffected by anticonvulsants effective against absence seizures’. These longer-latency components, as shown in Figure I, have variable latencies and are thus impossible to analyse using conventional averaging techniques. In order to evaluate test drugs, e.g. anticonvulsants, against the catechol-induced seizures, it is necessary to analyse at least three waveform parameters: frequency of occurrence (i.e. the number of times each component of the evoked electromyographic response occurs per 20 stimuli applied at the wrist), latency (the time from the stimulus to the peak of each component), and the amplitude of each component.

Correspondence

and reprint

requests

to Dr I. Basarab-Horwath

0 1989 Butterworth & Co (Publishers) 0141-5425/89/020103~4 $03.00

data analysis, microprocessor

In keeping with common practice amongst physiologists, all (electrical) events were recorded on magnetic tape; this acts as an inexpensive and effective long term store. The bandwidth of such a recording system (DC to 20 kHz) presents no problems when used to record physiological signals. Previously, the entire operation of replaying the prerecorded EMG activity to the oscilloscope and performing the (visual) data analysis was carried out manually, with the attendant problems of operator fatigue and boredom, the possibility of measurement error and the need for a skilled operator. Ml

M2

M3

1mV

1

I

10msec. Figure 1 Photographic record of a typical evoked EMG recorded from flexor carpii, during infusion of the convulsant agent catechol to the anaesthetized rat. The record is of 20 superimposed responses and illustrates the three temporally distinct components of the response (Ml, M2, M3), each the motor expression ofcatechol-induced activation ofdifferent reflex pathways. Ml is a propriospinal reflex; M2 a long-loop reflex involving the sensorimotor cortex; and M3 a cerebellar reflex. Note the variable latency of the M2 and particularly the M3 component, which makes analysis by conventional averaging techniques impossible

Ltd J. Biomed.

Enp. 1989, Vol. 11, March

103

Automated analysis

of evoked EMG

activity: I. Basarab-Horwath et al.

Cost was an overriding consideration when seeking a solution to the problem of automating the process of data replay and analysis. One possible solution would be to use a dedicated microcomputer system with an analogue-to-digital interface card. A hard disk is also necessary - the use of a floppy disk based system was quickly dismissed. The number of events to be recorded, approximately 500 for each experiment, implied that a significant amount ofdata would need to be stored if the data were to be taken directly from the experimental animal. A correct (and expensive) choice ofADC card should enable a signal ‘live’ and, suitably conditioned, to be captured transferred to a hard disk. This is obviously an attractive solution but was seen as high cost. A less expensive alternative solution was to use available equipment. In the first instance, a decision was taken to continue to record data on magnetic tape. This entailed no change to the experimental equipment and allowed a method for long term backup data storage. The analysis system developed to analyse prerecorded evoked response was built around a BBC model B microcomputer. Apart from availability, the main reason for choosing this computer was the wide variety of interfaces incorporated into the computer system and the ease with which these interfaces can be used. Similarly, availability was a key reason for using a Nicolet 309 1 digital storage oscilloscope. This instrument has a built-in ADC, obviously; as well as a remote control and an RS232C port. The remote control port enables the oscilloscope to be controlled by a microprocessor; data can be transferred from the oscilloscope memory to an external device using the RS232C serial port. The analysis program is menu driven and allows latency windows, appropriate to each component of the evoked EMG, and voltage thresholds to be set up for individual experiments. For each response, the peak-to-peak amplitude and latency of the largest component within each window is measured and for batch analysis the frequency of occurrence of each

component within the set window is also calculated. Values are output for each calculated parameter. The program menu also allows the display of individual waveforms on a monitor, with the facility to superimpose waveforms, the production of a hard copy of the monitor display and the storage of the displayed waveform on disk. Figure 2 shows a single waveform produced as a hardcopy of the monitor display. DATA COLLECTION SYSTEM

AND

ANALYSIS

A block diagram of the data collection and analysis system is shown in Figure 3. During each experiment an electrical stimulus, lasting for 20 ~LS,is applied to the rat forelimb at a frequency of 0.17 Hz. The stimulus also triggers a pulse generator which is set to produce a + 5 V pulse of 1 ms duration. This output pulse is recorded on one channel of a twin channel magnetic tape recorded. The forelimb EMGs are recorded on the other channel of the cassette recorder. Each experiment lasts 40-50 min (400-500 responses). On replay, the recorded pulse is used to trigger a Nicolet 3091 digital storage oscilloscope which then stores and displays the recorded EMG data. The oscilloscpe time base is set so that each sweep of the trace takes 80 ms, thus allowing an entire single event to be captured. Since there are 4000 points in each trace, the sampling rate of the oscilloscope ADC system is 50 000 samples s-‘. This is more than adequate for our present application. The recorded pulse is also processed by the input trigger detection circuit and the user port i/o buffer circuit. The detection of the pulse at the user port causes the tape recorder to be switched off after a program determined time delay. The oscilloscope is then immediately put into the ‘store’ or data hold mode, and the stored data is transferred from the oscilloscope along the RS232C-RS423 link into the microcomputer memory. After data analysis is completed, the oscilloscope is returned to the ‘live’ Data Tape Recorder I

J

Trigger ,

i

r

,

Interface

+

,

Oscilloscope

Cards

I/O Lines

J

t

RS 232C

t Remote Control

I/O Port Cassette Drive

Figure 2 Print out of a single EMG waveform as produced by thedata capture and analysis system. Each horizontal division represents 8 ms. The vertical scale is set to be f 1 V; each vertical division represents 250 mV

104

J. Biomed. Eng. 1989, Vol. 1 I, March

1 Figure system

BBC Microprocessor

I

I 3

Block diagram

RS432 (

1 of the data

L collection

J and analysis

rlutomated analysis

on

v Read user-port

t Turn cassette off after time delay.

I in STORE

Put ‘scope

Initiate

I

I RS-2323 transfer

I Analyse

I.

Hasarab-Horwath et al.

This circuit provides the necessary signal conditioning for the trigger signal stored on one channel of the cassette tape. A circuit diagram is shown in Figure 5. As well as producing a positive going pulse to the i/o buffer circuit, it also provides very good noise immunity because of the variable-time latch incorporated in the circuit. The recorded trigger pulse is applied to an input buffer circuit, ICI, via a DPDT swich. This switch is used to ensure that the output of the buffer circuit is always positive and hence its position is set according to the polarity of the recorded trigger stimulus. The output of the buffer circuit feeds a Schmitt trigger, built around IC2. An adjustable reference voltage is applied to the in-verting input of IC2 to cater for variations in recorded pulse amplitude. The output of the Schmitt trigger is held at 0 V (negative saturation) until + Vrer is exceeded, at which time the output switches state to + 5 V. However, it was found that crosstalk from the other channel, due to the (recorded) response, produced false triggering of this circuit and hence an unwanted output. To overcome this additional noise problem IC3, a 74121 monostable chip with a Schmitt trigger input3, was used at the output of the variable Schmitt trigger. A 0 to + 5 V transition at pin 5 causes the putput at pin 6 to switch to + 5 V (positive saturation) for a set time period T, determined by timing components R9 and C2, where:

Confirm I/D circuit on. Clear RS-232 Buffers. Put scope in LIVE mode.

L

activity..

INPUT TRIGGER DETECTION CIRCUIT

or data capture mode and the tape recorder is turned on in order to enable the process to be repeated. The control program structure is shown in Figure 4. It can be seen that the program detects the occurrence of a trigger pulse before turning the cassette recorder off after a fixed (programmable) time delay. The duration of the waveform captured by the oscilloscope depends on the oscilloscope sweep time and the oscilloscope sampling frequency. This will determine the optimum program delay time.

i Turn cassette

ofevokedEMG

mode

T = 0.69 CR s For this application, T= 5.8 s, since the stimulus pulse repetition rate is 10 pulses per minute, i.e. one pulse every 6 s. A voltage follower (unity-gain) buffer circuit is used to connect the output of this chip to the user port i/o interface circuit.

data

data

USER PORT I/O BUFFER CIRCUIT L

This circuit was originally constructed in accordance with that described by Adams and Feather4. The function of the circuit is to provide signal conincluding isolation, for the incoming ditioning, trigger signal and the (outgoing) signals to the remote

I

Figure 4 Control program structure. The flowchart shows that after an initial set-up routine, the software controls the flow of information around the system. Analysis of data is performed with a user-defined algorithm

I

10k

10k

I

c2

_470/~F

DPDT switch

Figure channel

5 Input trigger detection circuit. of the cassette tape recorder. The

I

I

This 74121

provides

the

necessary

is a variable-time

latch,

signal with

conditioning a latch

for

time

the

determined

trigger

signal

by the

stored

on one

18 kQ resistor

and

1I, March

105

the 470 PF capacitor

J. Biomed. Eng. 1989. Vol.

Automated analysis of evoked EMG activity:

I. Basarab-Honvath et al.

control circuit of the oscilloscope. The paper by Adams and Feather provides full details of circuit construction, including a PCB pattern, as well as a description of the software commands needed to read from and write to the user port. However, Adams and Feather use relays as outputs for their circuit, these were found to be giving rise to false inputs to the Nicolet oscilloscope because of contact bounce. The relays and their driver circuits were replaced by BC109 transistors, with the base of each transistor connected to an output of the i/o port via a 10 kR resistor. Three transistors are used, each controlling oneofthe threeoscilloscopefunctions ‘RS232’, ‘Live’ and ‘Store’. The collector of each transistor is connected to its respective optocoupler LED within the remote control circuit of the Nicolet oscilloscope. A logic 1 (+ 5 V) at the output of the i/o port puts that particular transistor into the ‘on’ state and hence, via the optocoupler LED and phototransistor within the remote control circuit of the Nicolet oscilloscope, operates the corresponding function in the oscilloscope. BBC USER

PORT

AND RS423

CONNECTIONS

The user port is configured so that PB1 and PB, are used as inputs and PBs to PBs inclusive are set as outputs, the remaining pins being, in effect, undefined. PB2 is connected to + 5 V on the i/o buffer circuit and this can be used to confirm that the hardware and software are both functioning correctly. PBs is interfaced to pin 4 of the Nicolet control port and switches the oscilloscope into the ‘store’ mode in readiness for transmission. PB, detects the occurrence of a signal from the input trigger detection circuit. PB4 is interfaced to pin 1 ofthe Nicolet control port and initiates data transfer from the oscilloscope to the BBC computer via the RS232/RS423 link; this link is set at 9600 baud (switch selectable within the digital storage oscilloscope). PBS is interfaced to pin 3 of the oscilloscope control port and a + 5 V signal on this pin returns the oscilloscope to the ‘live’ mode. The oscilloscope is then ready to acquire fresh data from the tape recorder. DISCUSSION The program offers the user the option of selecting specific areas of interest within the time span of the sweep made by the oscilloscope after each trigger pulse. In the application described, this ‘latency window’ facility is used to analyse the signal features of interest which occur within windows spanning 4-8 ms, 10-20 ms and 30-50 ms. Program users set up these windows in an ‘initializing’ program which precedes the execution of the data capture program. The initializing program is also used to specify the number of recorded signals to be analysed; in batches should this be desired. This means that many prerecorded events can be analysed without the need for operator intervention. At present the maximum number of windows allowed is three but this can be increased if desired. Different voltage thresholds can be set for each window allowing the frequency of occurrence of voltages greater than this threshold to

106

J. Biomed.

Eng. 1989, Vol. 11, March

No.

BATCH No.1

of TRACES HI

LATENCY

n2 110-2015.I

O-815.)

frs.)

AnPLlTUM

2

4.00

(IV.

il.60

190.00

1

bREb

224.00 60.44

32.03

LATENCY

hs.

AHPLITUDE bREA

36.00 40.00 14.42

1

5.66

to.08

30.00

(IV.)

677.00 &On09

147.50 11.72

46.00 l4.65

)I? flo-?oB5.)

83 (30-501s.

10.84 1.08

33.00 4.24

1%. 75 54.09

43.00 4.24

46.06

36. oa

14.54

IP.BS

34.45

STbTlSTICS

FDR BATCH

I HI

HERN

fl3 (30~50rs. I

LbliNCY

HEAN AlPLITUDE

(as.) S.D. (IV. 5.D.

MEAN AREb S.D.

tN=21 (4-k.. 4.83 1.17

i

433.50 344.36

b

I

0.16

Figure 6

Printed output from the analysis package. In the first part each EMG signal is analysed for latency, amplitude and area within the latency windows Ml, M2 and M3. The second part displays results of statistical analysis of the data. The values for threshold voltages and the percentage occurrence of each component in excess of these thresholds are displayed. The size of the latency windows, voltage gates and the number of batches and batch size are determined by the user

be measured. A typical printed output from the analysis package is shown in Figure 6. Program listings are available on request from the authors. The system as described is used specifically to analyse sensory evoked EMG activity induced by administration of catechol. The system can be used with an alternative digital storage oscilloscope with minimum modification; most digital oscilloscopes have an RS232 interface and are capable of being controlled remotely. A system as described in this paper makes full use of the storage oscilloscope, which acts essentially as a high frequency twin channel analogue to digital converter with a data buffer. This system has enabled an essentially tedious task to be automated and has made the analysis much more objective; allowing far more sophisticated data analysis to be carried out than can be performed by inspection of the screen display. ACKNOWLEDGEMENT We would like to thank Mr A Goude of the Department of Electrical and Electronic Engineering for his discussions regarding the input trigger detection circuit. REFERENCES Angel A, Lemon RN. An analysis of the myoclonic jerks produced by 1,2_dihydroxybenzene in the rat. Electroenceph Clin Neurophysiol 1973 ; 35 : 589-60 1. Dewhurst DG. Comparitive sensitivity of catechol-induced sensory evoked convulsions to different anticonvulsants. B7il J Pharmac Proc Sup@ 1986; 88: 325P. Texas Instruments. TTL Logic Designers Handbook. Adams J, Feather GM. Microcomputer interfacing techniques, part one: the microprocessor and user ports. Everyday Electronics 1983 ; 4 1O-2 1.