b6 laboratory in medical instrumentationgari/teaching/b18/labs/labsheet jan 2013.pdf · the lab the...

26
1 B18/BME1 MEDICAL INSTRUMENTATION LABORATORY AIMS OF THE SESSION Your aims in this laboratory are as follows: to gain hands on experience in the acquisition of ECG and EEG signals to understand and describe how they relate to relevant physiology and electrode placement to understand the role of signal conditioning (amplifiers, filters) in their measurement and to choose suitable parameters (e.g. gain, cut off frequency, sampling rate) to understand and describe the main sources of error introduced in measurement PREPARATORY WORK Before coming into the lab, complete the preparation (Section 1) and read through the handout, including the Lab record. Preparation should be completed in your logbook and brought to the lab with you. Expect to spend about one hour. You will lose marks if you do not do the preparation Safety. Any equipment attached to the body is battery operated or electrically isolated. Standard risks for using computers apply LOCATION AND TIME Location: Medical Instrumentation laboratory, off the Electrical lab, 5 th floor Time: 11.00 am to 17.00 pm (with break for lunch 13.00-14.00 pm)

Upload: lamthien

Post on 05-Feb-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

1

B18 /BME1 MEDI CA L

I NS TRU MEN TA TION LA BO RA TO RY

AIMS OF THE SESSION

Your aims in this laboratory are as follows:

to gain hands on experience in the acquisition of ECG and EEG signals

to understand and describe how they relate to relevant physiology and electrode

placement

to understand the role of signal conditioning (amplifiers, filters) in their

measurement and to choose suitable parameters (e.g. gain, cut off frequency,

sampling rate)

to understand and describe the main sources of error introduced in measurement

PREPARATORY WORK

Before coming into the lab, complete the preparation (Section 1) and read through the

handout, including the Lab record. Preparation should be completed in your logbook and

brought to the lab with you.

Expect to spend about one hour. You will lose marks if you do not do the preparation

Safety. Any equipment attached to the body is battery operated or electrically isolated.

Standard risks for using computers apply

LOCATION AND TIME

Location: Medical Instrumentation laboratory, off the Electrical lab, 5th

floor

Time: 11.00 am to 17.00 pm (with break for lunch – 13.00-14.00 pm)

Page 2: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

2

INTRODUCTION

There are three exercises to complete. You need to share the equipment for Exercise B

and will be assigned a time to do this at the start of the full laboratory session

Exercise A: ECG acquisition and processing

Exercise B: Frequency and signal analysis using Matlab; Einthoven’s triangle

Exercise C: EEG acquisition and processing

You will work in groups of two. We will need volunteers for the ECG and EEG signal

acquisition. If you are prepared to volunteer please wear loose clothing.

USING THE EQUIPMENT

The electrodes and connectors are delicate. Be careful how you connect them to the

amplifiers and bio-radio kit.

It is important to establish good connection between the electrodes and skin. The

demonstrators will help you attach electrodes, but you may also want to watch the videos

in B18lab/SetupVideos.

All the software works off windows and is reasonably intuitive. The demonstrators will

give you an introduction in the lab.

The quality of the data you get will be much lower than the data which would be acquired

in a proper clinical setting. However, if you see anything that concerns you in the data

you acquire, then please arrange a check up with your own doctor. No-one in the session

is qualified to give any diagnostic advice.

ASSESSMENT

B18: same as A-labs. Fill in the sections in the Lab record attached. You should get a

demonstrator to sign off your work after each exercise.

MSc: Long write up (see section at back). During the lab you should fill in the in the Lab

record.

Page 3: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

3

SECTION 1: PREPARATION

Write your answers in the first section (Preparation) of the Lab record before coming in

to the lab. MSc students – do as much as you can. You may not have had all the relevant

lectures yet.

P1: THE ECG AND THE CARDIAC CYCLE

Read through the section of your B18 physiology notes on the ECG and electrical activity

of the heart.

ECG signals are gathered to monitor heart activity. Normal commercial systems

have 12 leads, but we shall use just four (using one as an earth). The voltage gathered can

vary depending on the position of the electrodes on the body. If they are placed on the

heart muscle itself the potential may be as high as 110mV. On the skin close to the heart

they are typically around 5mV. However on the wrists and ankles, as in this experiment,

they may be as low as 1mV.

Fig 1.a and 1.2 below (from the B18/BME1 notes) show a simple model of the

heart and the three lead ECG placement. Until contact electrodes had been developed,

people had to place their limbs in buckets of salt water to form the connections!

Figure 1.1: heart electrical activity and

ECG leads

Fig 1.2: A typical trace

http://cvphysiology.com/Arrhythmias/A013a.htm

Page 4: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

4

Fig 1.3 shows and labels typical traces from a single cycle of ECG acquisition, together

with the typical time duration of significant regions. of each wave. Note the sign

convention for ECG:

‘A wave of depolarization travelling toward a particular electrode on the chest surface

will elicit a positive deflection’.

P-wave: 0.08-0.10 sec

QRS: 0.06-0.10 sec

P-R interval: 0.12-0.20 sec

Fig 1.3: A single cycle of ECG activity (from http://cvphysiology.com/Arrhythmias/A009.htm)

The following description of electrical activity is taken from the ADinstruments

LabTutor:

‘Cardiac contractions are not dependent upon a nerve supply. A group of weak muscle

cells (sinoatrial or sinuatrial node, SA node) acts as the pacemaker for the heart (Figure

1). These cells rhythmically produce action potentials that spread through the fibers of

the atria. The resulting contraction pushes blood into the ventricles. The only electrical

connection between the atria and the ventricles is via the atrioventricular (AV) node. The

action potential spreads slowly through the AV node (thus giving a time delay for

ventricular filling) and then rapidly through the AV bundle and Purkinje fibers to excite

both ventricles. The large muscle mass of the ventricles allows powerful contractions.’

Exercise: See Lab record P1

P2: EINTHOVEN’S TRIANGLE .

Read the section in your B18 physiology notes on Einthoven’s triangle. This

construction may in theory be used to reduce the number of leads required, or, with all

three leads, to estimate the electrical axis of the heart. Deviation of the electrical axis

Page 5: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

5

from the norm may be indicative of cardiac irregularities (although in the lab it is more

likely to be to do with the way you gather data!).

Fig 1.4 shows an idealised measurement of the three potentials on the heart. These

connections allow us to construct a vector sum, called Einthoven’s triangle.

Lead I + Lead III = Lead II.

Each channel is interpreted as a vector potential (remember that electric field, the basis of

voltage, has direction as well as magnitude).

LA, RA –left, right arm; LL = left leg

Fig 1.4: electrode placement for the standard 3-lead configuration and Einthoven’s

triangle construction

Exercise: See Lab record P2

P3: INSTRUMENTATION

This section relates to your A2 course on instrumentation (MSc students – you may not

be able to complete all this section).

Figure 1.5: Bio amplifier configuration

Page 6: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

6

Figure 1.5 shows a typical amplifier for acquiring bio-signals. In the system you use in

the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

be set using a software interface (as you will find out in the lab). Identify the purpose of

the various components.

Exercise: See Lab record P3

P4: SIGNAL PROCESSING REVISION – FOURIER ANALYSIS AND

SAMPLING

Finally, refresh your memory on

(i) the Nyquist sampling criterion and

(ii) Decomposition of a periodic signal into the sum of harmonics (Fourier series –

you don’t need any detail)

Exercise: See Lab record P4

Page 7: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

7

SECTION 2: LABORATORY WORK

PRELIMINARIES

Computing:

You will be told in the session how to login and which directories to use. Use the official

lab username not your own so you get access to the right files.

Electrode Attachment

You will be given instructions during the lab session. The quality of your results is

highly dependent on how well you apply the electrodes. Apply them carefully and please

do not waste them. Please also keep the ECG electrodes on over lunch so that you can

reuse them in the afternoon.

SESSION A: ECG DATA ACQUISITION

In this session you will acquire ECG data from medical acquisition kit. You will:

Examine the effect of filters on ECG signals

Relate the signals to physiological changes

Investigate the use of the FFT in finding power spectra

Examine the effects of artefacts such as movement

The powerlab system consists of a bioamplifier, configured as two differential amplifiers,

and supporting Windows driven data acquisition and software. A schematic for a single

differential input is given in Fig 1.3.

Time for this session: about 1.5 hours

Page 8: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

8

SECTION A1 ECG SIGNALS

You will use disposable snap electrodes. As there are only two differential inputs in the

Biomed system you cannot acquire all three signals. Select one of your group to be the

subject, and put electrodes at the wrists (left: LA and right: RA) and the ankles (LL, RL).

You will need two electrodes on the right arm; put them next to each other. In theory it

does not matter if the electrode is at the top or bottom of a limb; the limb simply acts as a

conductor.

Connect them to the bioamp inputs as

follows:

Channel 1: +LA to –RA (black to white)

Channel 2: +LL to –RA (brown to red)

Earth: RL (green)

Make sure the polarities are correct

The subject should now sit quietly (but is expected to join in the analysis at the same

time!). Start the LabChart software to acquire the signals. If the signals are very noisy it

is probably because the electrodes are not making good contact.

Move the toggle button at the bottom right of the screen to ‘monitor’ to stop the software

recording.

EXERCISE A1: SET UP THE DISPLAY PARAMETERS

If the experiments gallery box pops up; close it.

You want to display just two waveforms (see Fig A1 below). If more are showing then do

the following:

Page 9: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

9

Go to Setup – Channel settings.

(i) Set the number of channels box (bottom left) to 2.

(ii) Check that the computed input is set to the right raw data inputs (look at the

bioamp inputs on the hardware; on some sets they are inputs 1, 2 and others

they are 3, 4.). If not, set them up correctly.

Now set up the other channel parameters

i. Set sampling frequency to 400Hz (top right button).

ii. Determine a suitable time scale for the horizontal axis on the screen – probably

you want a ratio of about 5:1 to display a few cycles.

iii. Determine a suitable vertical scale for each channel so the whole trace is

displayed (click the channel number to the right of the display; select input

amplifier)

Note your settings: Lab record Exercise A1

Fig A1

Page 10: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

10

EXERCISE A2: FILTERING – TIME AND FREQUENCY

(i) Remove all filters. Set the system to record and take a section of data (Start ..

stop). Make sure the PQRST complexes are visible in each trace (this checks

your connections).

(ii) Now apply a bandpass filter (bandpass, 0.3Hz – 30Hz) - see ‘set up input’ button,

Fig A.2. Use the default frequency transition band (frequency range over

which signal is attenuated from 1% to 99% attenuation), and a value of 20%

fc. The system uses a type of filter called a Kaiser window – a more flexible

type of filter to the one in the introduction. It allows sidebands to be

controlled as well as the attenuation. You may find too that there is a

significant delay until the trace appears. This is because the filter is

implemented as a digital filter and uses a number of input samples to create

each output – hence it needs to acquire a complete before it can start (after

that it only needs to acquire the new sample each time).

Lab record: Exercise A2.1 Note how the signal changes when the filter is applied

(iii) Now examine the frequency content of the signal through applying the FFT.

With the mouse, highlight a portion of the ECG trace on the screen which you

consider to be of good quality (take as many cycles as possible). Go to the

spectrum window. Select channel 1 or 2. The spectrum should be displayed.

Fig A2

Select

channel

Page 11: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

11

Use the set parameters button to alter the view mode to ‘display as connected

points’ (as in the diagram), and set the number of points to 16k. Use the zoom tool

(+/- buttons) to magnify the useful part of the display; select one of the frequency

scale markings and move it with the mouse). Ask for help if necessary.

Identify the main frequency components and observe the effect of changing the

number of samples you use in the FFT (use the Settings parameters button to

change the number of samples in the FFT, from 1k to 32k)..

** See Lab record: Exercise A2.2

EXERCISE A3 THE ECG TRACE

Select a suitable portion of data of one channel on the screen using the mouse. To select

two channels go to Commands and Selection; select the channels you want. Check the

print preview (under the File menu) to make sure that you are only printing out that

data - and print.

Measure the R-R cycle time of a few cycles and fill in the Table in Exercise A3.

Repeat this while you breathe regularly and deeply – does it alter?

** See Lab record: Exercise A3.

EXERCISE A4 ARTEFACTS

A number of patients are monitored continuously over 24hours using an ECG harness, to

measure the heart activity in daily life. In this section you look at the effects of two

artefacts which affect the signal. In each case record the signal over several seconds and

examine the spectrum over a few cycles.

1. Movement. Vibrate the hand at a few Hz (eg 5Hz simulates the tremor in

Parkinson’s disease). Make it as regular as you can so you will see it as a spike in

the spectrum. Note the effects in the time domain and the spectrum

2. Breathing. Can you observe a breathing frequency in the spectrum?

** See Lab record: Exercise A4.

Page 12: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

12

EXERCISE A5: EFFECT OF EXERCISE

1. Get the subject to jump up and down a few times to get the heart rate up (hold the leads

steady!) and examine the ECG signal as soon as he stops.

2. Use the Marker and Waveform Cursor to make the following time measurements from

the displayed waveform, as shown in Figure 3.

a) P-R time interval

b) QRS duration

c) S-T time interval

d) T-P time interval

e) Whole cycle time interval (R-R)

** See Lab record: Exercise A5.

Page 13: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

13

SESSION B (OPTIONAL FOR MSC STUDENTS)

In this session you will acquire data from a 3 lead ECG recording and then use it to

construct Einthoven’s triangle to estimate the angle of the electrical axis. A time to do

this will be assigned to you at the start of the laboratory session as you need to share

equipment.

Time for this session: about 1 hour

EXERCISE B1: DATA ACQUISITION

For this you use the bioradio kit. It is noisier than the other systems but it has more

channels. Use electrodes at each wrist and at each ankle (see B18_lab/videos).

ECG data collection

Page 14: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

14

(i) Set up the connections on the Bioradio using the black jumper leads as required shown

in the diagram above. Channels 1-3 record leads I – III.

(ii) Run the program PClab/B18/Capturelite. Press the green ‘START’ button (towards

top left of screen). Three channels of ECG activity should scroll across the screen.

(iii) Start the Capturelite software (Raw Data mode) to acquire the signals. You should

see 3 traces roll across the screen.

(iv) You may want to filter the data. To set filters use the button DSP settings (on the

right underneath DSP settings). Specify low pass filter, 4th

order, 30Hz for each channel.

Go back to the raw data screen and toggle the filter to on (click in the shadow area just

below the switch icon below the DSP settings).

See Lab record., Exercise B.1

EXERCISE B.1. ACQUIRE DATA:

Select save data.

Enter a filename. Save the data in a directory with your initials in the B18 Medical

Common Area

(i) The subject should sit down with arms apart.

Press Start. The data should roll across the screen. When you have enough, press Stop.

Check the file you created using Windows Explorer to make sure that it exists!

Collect data for about 20 secs. sitting quietly and still. Save in a file in your home

directory: filename. To save the data stop the trace. Press ‘save data’ and type in a

filename. Then press ‘start’ and saving will begin. To stop saving press ‘stop’

(ii) If time permits repeat with the subject lying down.

Page 15: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

15

EXERCISE B.2 EINTHOVEN’S TRIANGLE

(i) First load in the data you saved. In the main Matlab window change the directory

to Matlab/Mfiles, and import the file you saved (File – import data).

(ii) Plot the data: plot(filename) and identify a region containing about 3-4 spikes,

which looks of good quality. Transfer this region into a new variable:

ecg = filename(N1:N2,1:3);

where N1 and N2 are the sample numbers at the start and end of the region you

identified. .

Depending on the filters you used, the signal may be very messy still. The main sources

of contamination in the signal are likely to be close to d.c. and at 50Hz. It may be worth

doing some more filtering in Matlab.

(iii)To remove d.c. it is simplest to use the Matlab command detrend:

ecg0=detrend(ecg);

(iv) To remove the 50Hz signal, run a low pass filter for cut off frequency, fc, = 20Hz.

I suggest you use a fourth order filter and run the following Matlab code:.

norder =4;

fc=20;

ecg20=lpfilter(ecg0, norder, fs, fc);

(v) Plot leads I, II and III of one set of filtered data, using a new figure for each trace:

figure; plot(ecg20(:,1)); figure; plot(ecg20(:,2)); figure; plot(ecg20(:,3));

(vi) Determine the maximum value of the PQRS complex in each signal using the

Matlab data cursor in the figure window. To use the data cursor: click on the

figure and then on ‘Tools’. Choose ‘data cursor’. Move the cursor (with the

mouse) until you are over the point selected, then left click. The X and Y

values should be given; if not you are probably not over a point on the trace)

(vii) Now for each one determine the corresponding value of using the equation

in the introduction. You may want to use Matlab, for example

R1=[ value1, value2, value]; etc %values from lead 1; same for R2, R3

for i=1:3

Page 16: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

16

theta(i)=acos((R1(i)*R1(i)+R2(i)*R2(i)-R3(i)*R3(i))/(2*R1(i)*R2(i)))*180/pi

end;

mean_theta=average(theta)

var_theta=sqrt(var(theta));

See Lab record., Exercise B.2

(viii) If time permits gather data with the subject lying down and do the same

analysis.

See Lab record., Exercise B.3

Page 17: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

17

SESSION C: EEG DATA ACQUISITION

In this session you will acquire EEG data from the PowerLab kit as in the first

experiment. You will:

(i) Find the spectrum of EEG signals and relate the signals to physiological changes

(ii) Identify alpha waves on pre-recorded data

(iii) Identify alpha and possibly beta waves acquired in the session

(iv) Examine the effects of artefacts such as eye movement

Time for this session: about 1.5 hours

If you haven’t done so already, create a directory for yourselves in the common disk area

to save temporary data.

BACKGROUND

Figure C.1

Fig C.1 shows the structure of the cerebral cortex. Various types of information in the

form of nerve impulses are transmitted and processed. More details are given in the

handout: EEG-1 available in the lab. The EEG signal can be broken down into different

rhythms. The two frequency ranges you are hoping to observe are identified as primary

components as in the table below.

Page 18: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

18

Rhythm When it occurs Typical

frequency

Amplitude Where on brain

Alpha

Quiet, resting,

eyes closed

8-13Hz 2-100V Originate in

occipital lobe

Beta Mental activity;

alert to external

stimulus

13-22Hz 5-10V Parietal, frontal

lobes

THE 10-20 SYSTEM FOR EEG PLACEMENT

Data collection needs to be done carefully if good results are to be obtained; EEG signals

are much smaller than ECG signals. A method called the 10-20 system has been

developed for placement of electrodes on the scalp. The 10 and 20 refer to the percent

distances between the electrodes in proportion to the size of the head.

Fig C.2: electrode placement

Page 19: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

19

EXERCISE C1: PROCESSING AND EXAMINATION OF PRE-

STORED DATA

Start Matlab, Make sure you are in directory MATLAB/Mfiles. Load the files:

eyesopen_b18 and eyesclosed_b18 (ask a demonstrator if you don’t know how to).

These have been taken with electrodes across the occipital area of the brain (O1-Cz) with

sampling frequency fs=256Hz.

C1.1 EXAMINING THE DATA

Plot the first 128 samples of each file:

plot(eyesopen(1:128)); figure; plot(eyesclosed(1:128))

Find the spectrum through taking the FFT of each:

feopen=fft(eyesopen); feclosed=fft(eyesclosed);

Plot the spectrum up to 100Hz (note that fs=256Hz) using a routine plotf that picks out

the region from 0 to fmax Hz:

fmax=100;

plotf(feopen,fs,fmax); figure; plotf(feclosed,fs,fmax)

See Lab record., Exercise C.1.1

C.1.2 FILTERING – EYESCLOSED DATA

Although you may just see a spike at 10Hz in the eyesclosed file (corresponding to alpha

wave production) both signals are heavily contaminated by (simulated) 50Hz mains

signal and other artefacts. In this section you will use low pass filters to reduce this

effect. You also use the function detrend to remove any d.c. level.

Page 20: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

20

You are provided with the Matlab function lpfilter which implements a low pass

Butterworth filter with cut off frequency fc. Set the cut off frequency to 30Hz.

Experiment with different low pass filters on the eyesclosed signal. For example:

aclosed2=lpfilter(detrend(eyesclosed),2,fs,30); % second order filter

aclosed4=lpfilter(detrend(eyesclosed),4,fs,30); % 4th order

aclosed6=lpfilter(detrend(eyesclosed),6,fs,30); % 6th order

Plot the results of the filters

close all % closes all figures so far – up to you!

figure

subplot(3,1,1); plot(aclosed2(1:128))

subplot(3,1,2); plot(aclosed4(1:128));

subplot(3,1,3) ; plot(aclosed6(1:128));

and their spectra:

figure

subplot(3,1,1); plotf(fft(aclosed2),fs,100);

subplot(3,1,2) ; plotf(fft(aclosed4),fs,100);

subplot(3,1,3) ; plotf(fft(aclosed6),fs,100);

Print out the two sets of graphs and label each graph.

See Lab record., Exercise C.1.2

C.1.3 EYES OPEN DATA

There is no obvious structure in the eyesopen spectrum. It needs more rigorous filtering

to see any spectral information.

Use the 6th order low pass filter, and plot the result:

aopen6=lpfilter(detrend(eyesopen),6,fs,30); plotf(fft(aopen6),fs,100)

See Lab record., Exercise C.1.3

Page 21: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

21

EXERCISE C2: COLLECTING YOUR OWN DATA

See Fig C2. To collect EEG data you will place electrodes in positions FPz (centre

forehead), FP1 (left forehead), O1 (see diagram – about 10% above the inion, the

occipital bone) and A2 (mastoid on opposite side to FP1). Talk to a demonstrator and/or

watch the video EEG to see how to place the electrodes. Connect them to the bioamp

inputs as below.

Channel 1: O1-A2

Channel 2: FP1-A2

Earth: FPz

(connect a jumper lead

between the connectors for

A2)

Now run LabChart Powerlab software to display and acquire signals. If the experiments

gallery box pops up; close it.

Set up the channel parameters

i. Set sampling frequency to 200Hz (top right button).

ii. Determine a suitable time scale for the horizontal axis on the screen – probably

you want a ratio of about 5:1 to display a few cycles.

iii. Determine a suitable vertical scale for each channel so the whole trace is

displayed (click the channel number to the right of the display; select input

amplifier)

iv. Check the filters for each channel (button by ‘Low pass’ below). Add a bandpass

filter with low cut off frequency 1 Hz and high cut off frequency 20 Hz.

Note down your settings: See Lab record., Exercise C2

Page 22: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

22

EXERCISE C3: ARTEFACTS

You have already seen some causes of distortion in the signal. Because they are so small,

EEG signals are especially prone to artefact. Note the effects on the signal when the

subject does the following movements:

C.3.1 Blinking. The subject should do three quick blinks in succession.

C.3.2 Eye movement. (Electro-ocular effect) Eye movements cause a potential between

the cornea and the retina which you may be able to observe from the electrodes. The

subject should move their eyes rapidly from side to side, and up and down keeping their

head still.

C.3.3 Muscular movement. The subject should clench their teeth on and off

C.3.4 Deep breathing: The subject should breathe deeply and regularly. To see any

breathing effect you need to change the filter to a low pass filter with cut off 20Hz.

See Lab record., Exercise C3

EXERCISE C4.1: EYES CLOSED: ALPHA ACTIVITY

Give the subject a rest. He/she should relax and try to go to sleep (but must not actually

drop off!). Set the filter back to band pass, cutoff 20Hz and 1Hz.

Some tips:

close eyes, relax

lotus-type hand position (cross fingers, thumbs and small finger touching)

nobody behind the subject

lower head if necessary

concentrate on breathing

The other in the group should monitor the screen and subject. You should see a small

periodic pattern on the screen when the subject is producing alpha waves. Most people

Page 23: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

23

can produce alpha waves like this but a few just aren’t very good at it doing it on

demand!

Observe the signals in chart mode. Select a portion and find the spectrum. Alpha waves

normally give a clear peak around 10-12 Hz in this exercise. Alpha waves are the resting

state of the brain.

EXERCISE C4.2: IF TIME PERMITS: BETA ACTIVITY

If time permits you may want to see if you can observe changes beta activity. This is

harder: beta activity is the normal mode of the brain when you are awake. Try one of the

following to stimulate his intellectual activity:

Ask the subject to perform mental arithmetic tasks

Give a sequence of letters and ask him to count how many are repeated two letters on

(e.g. OIDRTRSCS – the second R and second S should be counted

In each case take a trace of the signal before and during the exercise and see if oyu cna

see any differences (beta waves are in the region 13-30Hz)

See Lab record. Exercise C.4

Page 24: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

24

For MSc BME1: LONG WRITEUP

An excellent write up need not be more than 6 pages (excluding printouts and the work in

the lab) as follows (the length of each section is provided as a guideline). In any case it

must not be more than 8 pages long. It should not include Appendices – you need to

decide which results to include in the main text (you will hand in your lab sheet at the

same time). Do not copy information from the sheet; summarise in your own words.

We are looking for

an understanding of how the ECG and EEG signals (in time and spectrum) depend on the

underlying physiology. You need not discuss EMG signals.

an understanding of the issues involved in collecting, processing and interpreting data

a description of signal artefacts (electrical and physiological)

Introduction: short description of how you can use ECG and EEG measurements to

monitor heart activity and brain waves, and the aim of the lab

Approx 0.5 pages

Methods. Practical issues on placement of electrodes, data monitoring (including

requirements from amplifiers, filter settings. Do not just repeat the lab sheet; use your

own words

Approx 1 pages

Results

For ECG: results and discussion of signals and spectra, relating them to physiology.

Effects of artefacts and movement (exercises B1.4,5), results from Einthoven’s triangle

(A1.4 and A1.5)

Page 25: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

25

For EEG: results and discussion of signals and spectra, relating them to physiology. The

effect of artefacts (eg blinking)

For both: discussion and results on the effects of filtering

Approx 3-4 pages

Sources of error

Approx 0.5-1 page

Discussion –Relate results and conclusions to the aims of the experiment. How useful is

this technique performed outside a clinic (eg for home monitoring)?

Approx 0.5-1page

References (see below)

The long write up should be handed in to the faculty office by the end of term. Include

the completed Lab record with your lab results.

References (should be in Engineering department library):

You should be able to complete the write up largely from notes and the handout for this

lab. For further information you may like to look at some of the following:

Physiology notes

Webster: Medical Instrumentation: Application and Design Sections on ECG (4.6),

EEG(4.8). Parts of chapter 5 on electrodes

From Biomedical Engineering Handbook (Vol 1):

- Principles of Electrocardiography, E.J. Berbari

- Principles of Electroencephalography, J.D. Bronzino

- Biomedical Signal Analysis, Banu Onaral, Section Editor

Page 26: B6 laboratory in Medical Instrumentationgari/teaching/b18/labs/Labsheet Jan 2013.pdf · the lab the microprocessor couples to a PC and allows amplifier properties such as gain to

26

Introduction, B. Onaral

Biomedical Signals: Origin and Dynamic Characteristics;

Frequency-Domain Analysis, A. Cohen