You are on page 1of 95

Analysis of Heart Sounds and Murmurs

by Digital Signal Manipulation

by David Theodor Kerr Gretzinger


A thesis submitted in confomity with the requirements of the Degree of Master of Health

Sciences, Institute of Biomedical Engineering, niversity of Toronto.

@ Copyright by David T.K. Gretzinger, 1996.

National I c Library J l ofmnaa I


Acquisitions and BibEographic Services
39s Wetiington Street ttawaON K1A C 4 M Canada

Bibliothque nationale du Canada Acquisitions et services bibliographiques


395, rue Wellington

ttawa ON K1A ON4


Canada

The author has granted a nonexclusive licence aliowing the National Library of Canada to reproduce, ioan, distribute or seil copies of this thesis in microfonn, paper or electronic formats.

L'auteur a accord une Licence non exclusive permettant a la Bibliothque nationale du Canada de reproduire, prter, distribuer ou vendre des copies de cette thse sous la forme de microfiche/film, de reproduction sur papier ou sur format lectronique. L'auteur conserve la proprit du droit d'auteur qui protge cette thse. Ni la thse ni des extraits substantiels de celle-ci ne doivent tre imprims ou autrement reproduits sans son autorisation.

The author retains ownership of the copyright in this thesis. Neither the thesis nor substantial extracts fiom it may be printed or otherwise reproduced without the author's permission.

Abstract
This thesis involves the development and preliminary testing of a device for the collection and analysis of heart sounds, with a specific focus on heart murmurs. The device was based on a PC and was programmed using the National Instruments LabWEW programming language. Modularity and ease of development and distribution were facilitated through this choice of
apparatus.

The first instrument which was prograrnmed was the Heart Sound Simulator. This was
originally developed as a signal source for the testing of the subsequent modules of the program. However, the opportunity to use it as a teaching tool was also recognized, giving this instrument a dual purpose.

The heart sound analysis routines begin with data acquisition, for which an existing module was
adapted. A Selective Auscultation instrument was programmed to add flexibility to the standard
ph ysician's auscultation process. Frequency content estimation of heart sounds and murmurs

was facilitated through a Spectral Analysis module.

Finally, reseatch into murmur sound

isolation was made in the ptograrnming of the Signal Subtraction module. Program validation was done using the Heart Sound Simulator, normal, non-pathologic data and pathological data. Results were encouraging, especially with the data manipulation modules. Further developments may be done to improve -the peifonnance of the spectral analysis module. Finally, the murmur isolation routine gave some positive indications, but hirther work is necessary for producing a robust instrument.

Acknowledgments
The writing of this page signifies the end of an exciting two years which coincided with my t h e in the Clinical Engineering rm program. This phase in my life included impact f o many people. Academically, 1 acknowledge the contributions of my two thesis advisors, Dr. John Doyle and Prof. Alf Dolan. Aiso, 1 would like to thank Munay Rice for helping me to get started in the area of heart sounds as well as in the field of Clinical Engineering in general. Practically, 1 owe heartfelt thanks to many in the Medicai Engineering Department at the Toronto Hospital (Tony, Joe, Jack, Miranda, et. al.), as fine a source of biomedical engineering expertise as can be found. Spirituaily, 1 have been fortunate to have the challenge and support of Brian Lim as well as Rob Knetsch, who has been my close fiiend and colleague though courses, thesis and intemships. Also, my life has been deeply afTected by the man who knew what life and death are about, Pastor Hero - he will always be remembered. The unwavering caring presence of my mother, father and sister Michelle have equipped me in so many ways; their influence is written al1 over my life.
1 use the very last words to th&, though she asks for none, my best fiiend and wife Sharon. She has accepted al1 of me, the good and the bad, and is rny cornpanion for this increasingly interesthg adventure.

Glossary
Auscult.tion

- listening to the sounds of the heart, usually done using a stethoscope.

Determioistic an event whose properties are determined by preset conditions at the time of

event generation.

D U Dynamic Link Library this is a set of hinctions which are used by MS Windows programs to perfom various low level cornputer hinctions.
ECC - see electrocardiograrn.
Eiectrocardiogram(ECG) the graphical dispiay of the eleceical activity of the heart. Jitter the variability of the tirne elapsed between the trigger and the target sound.

LibVIEW

- Laborato~ Vinual Instrument Engineering Workbench - Graphical progtmm ing language for instrumentation data acquisition, control and analysis.

Murmur the "whooshing" heart sound caused by turbulent blood flow in the heart.
is a programming method which uses the data-flow concept rather than linear flow through code as in traditional programming.
Object-oriented prognmming

- This

PCG - see phonocardiogram.


Phonocardiogram (PCG) the graphical display of the heart vibrations. Rnndom an event whose properties are not determined by prevailing conditions at the time of event generation.

SI- first heart sound ("lub"); caused by vibrations set up by the closing of the mitral and tricuspid valves.
S2 - second heart sound ("dubb"); caused by vibrations set up by the closing of the aonic and pulmonary valves. Satioaary a sipal whose statistical properties Vary with time only.

VI - see Virtual Instrument.


Virtual Instrument - program in LabVIEW, may contain other programs within it which are then called sub-VI's.

Table of Contents
1. INTRODUCTION
1.1 Background
1.1.1 The World Wide Web

8
8
9

1 Hypothesis 3
1.3 Objectives

9
10 10 12
16

1.4 Limitations of Auscultation


1.5 Physiology of the Heart
1 S. 1 Sound Characteristics
*

1.6 Origias of Heart Souads and Murmurs

16
17

1.7 Types o f Murmurs


1.7.1 Systolic Munnun 1.72 Diastolic Murrnurs

17
19

1-7.3 Other Murmurs

20

2. LABVlEW PROGRAMMING LANGUAGE

21

23 Pmgromming Environment
2.3 Data AcquisitiodCoatrol
2.4 Applications

22
26

26

3. THE HEART SOUND SIMULATOR

28

4. SIGNAL PROCESSING TECHNIQUES


4.1 Signal Averaging 4.2 Frequency Analysis
4.2.1 Fourier Analysis

37
37
38

38
39

4.2.2 Spectral Analysis


4.2.3 Stationary vs. Non-Stationary

39
40

4.2.4 Filtering 4.3 Other Feature Identification Methods

41

5. THE MURMUR ANALYZER


5.1 Data Acquisition 5.2 Computer Program
5 3 Selective Auscultation

42
42

43 45
45

5.3.1 Description

5.3.2 Program Designfoperation 5.3.3 Speed Change


5.4 Signal Subtrnction
5.4.1 Description

46

48

50

51
52

5.4.2 Program DesigdOperation

5.5 Spectral Analysb


5 S. 1 Description
5 S.2 Program Design/Operation

56
56

58

6. RESULTS DISCUSSION

61

6.1 Sources of Raw Data 6.2 Processing of Raw Data

61

63
63
66 69

6.2.1 Heart Sound Simulator Data


6.2.2 Non-Pathological Patient Data

6.2.3 Pathological Patient Data

6.2.4 Recent Pathological Patient Data

72

7. CONCLUSIONS AND FUTURE DIRECTIONS


7.1 Conclusions

74
74 75

7.2 Future Research

7.2.1 Program

75

7.2.2 Analysis
72.3 New Areas

76 76

9.REFERENCES
10, ADDITIONAL READING 1 . APPENDICES

77
80
82

List of Figures and Tables


--

F i g w 2. Fletcher-Munson curves of equal luuhess Figure 2. Diagram #the human h e m F i p e 3. The Cardiac Cycle Figure 4. Heurt sound charocteristics Figure 5. Front Panel of an example VIfur temperature monitoring Figure 6. Block diagramfor Exampie VI Figure 7. Heort Sound Simulator front panei Figure 8. Change Heart Rate VI Figure 9. Sig& Assembly Figure 10. Bufer Siorage Figure l 1. Preser pathoiogy list Figure 12. Spectral Analysis Windows Figure 13. Hardware Apparat us Figure 14. Murmur Anaber Panel Figure 15. Seleetive A uscuItation VI Figure 16. Speed Change VI block diagram Figure 1 7. Speed change withoutfrequency drop block diagram Figure 18. Signa2 Subtractionpanel Figure 19. Murmur Generutor panel Figure 20. Spectral Anuiysis VIpanel Figure 21. Speed change effects on waveform Figure 22. Signal Subtraction resdts for sirnulated data Figure 2 . Signal Subtraction resultsfor sirnulated data 3 Figure 24. Signal Subtmction used with normal patients

II
14 15
16

23
24

29

31 33
31 36
JI
43

44

47
49

49

53
51
59
64

65

66

67

Fijpre 25. Signal Subfmcfionused with nontalpafients


Figure 26. Signal Subtruction used with normal patients

68 68
70

Figure 2 7. Spectrai Anabsis resultsfor pathological data Figure 28. Spectral Analyss resultsfor pathological data Figure 29. Spectrai Analysis resultsfor patho logkal data
Figure 30. Signaf Subiraction with recent patho logical data

70

72

73

1. Introduction
1.1 Background
The functions of the human body may be transduced in many ways to give signals which may then be interpreted to help form an assessment of the human condition. Historically,

transduction methods started with the more obvious parameters, those which could be seen, heard or felt. Developments in technology have allowed enhancement of these basic methods through electronic and computer processing. Therefore, the historical number of modalities of transduction rnay be high. but a select few have suwived the erosion of the measurement scientists' selection process. This selection is based on many factors, including the degree to which a particular rnodality was stressed during the education process. the state of technology relating to that measurement item and the availability of the tool. Technological advances have been facilitating the research into both the creation of new areas and the development of existing rnethods of monitoring of physiological signals. The

application of engineering to this biomedical problern is appropriate, as scientific measurement theory is well in advance of technology used in clinical situations. The specific area which this thesis addresses is the sound signals produced by the heart. In particular, pathological conditions of the heart produce sounds which are different fiom those of the "normal" heart. As such, the transduction of these sound vibrations rnay be used for the detection and classification of heart pathologies. Previous efforts in the area of heart sound processing have k e n pursued which provided a background for this work. The UltraMonitor is a development project of the Advanced Clinical Instrumentation G~OUP, working under the supervision of Dr. John Doyle at the Institute of Biomedical Engineering, University of Toronto and the Toronto Hospital. Previous work done

as a part of the UltraMonitor has been published as a study of a non-invasive measure of the contractility of the heart using the fint heart s~und.'~ a cornparison of phonocardiographic and techniqued3. These will be discussed hirther. Each portion of research for the UltraMonitor has been divided into computer program modules which branch out fiom the main Control Panel; this research stands alone or may form one of those modules.

1.1.1 The World Wide Web


The use of the Intemet, specifically the World Wide Web, is growing as mearch information and communication tool. In this project, it was used as a source of background information on physiology and pathology', as well as a source of clinicai for testing the program designed

as a part of this project. As a natural reaction to having benefited fiom the Internet, the results of this research will also be made freely available there. This will be done in the form of excerpts from this document, a visual and audible display of collected waveforms and the ability to download sound t'les and LabVIEW program files for personal use. The site of interest may be accessed through the Advanced C linical Instrumentation Group Web Site, wh ich is
http://auryn.rose.utoronto.ca/acig/ acig.htm 1.

1.2 Hypothesis
The heart sound signal contains much useful information which may help the clinician in diagnoses and the researcher in learning more of the heads function. This information may be gleaned using the human ear, but often may not. On the premise that then is such useful infomation, the hypothesis that the hem mumur contains useful information as to the condition of the heart is proposed. Specifically, it is proposed that much infomation is to be gleaned by processing techniques borrowed fiom the signal processing and sound processing areas of engineering. A powerful, yet flexible and easy to use method of utilizing these methods may be

found.

1.3 Objectives
The basic goal of this research is to develop a tool which will provide a usefil analysis of the unique data which is contained in heart sounds and mumiun. It may then be applied to actual signals to gain information which is directly evaluated. The placement of this tool on a platforni which allows wide use by clinicians and researchea is a subsequent objective.

1.4 Limitations of Auscultation


An informal survey held by observing the devices hanging around the necks of many physicians will reveal that the stethoscope is still a very commonly used device. However, its use in patient diagnoses is in decline. Modem medicine is moving towards a more evidence-based practice, wh ich necessitates quantitative and recordable results, neither of which are satisfied by card iac auscultation. The hesitance to use it for diagnoses also exists because the human ear is poorly suited for this task in a number of ways which will be discussed. The automatic and subconscious interpretation of signals makes the stethoscope a very subjective measurement device4. Also, many of the cardiohemic vibrations lie outside of the audible range4, and many sounds within the range are severely damped by the signal processing of the human ear. Fletcher-Munson curves of equal loudness, s h o w in Figure 1, show the fact that low frequency sounds need to have a much higher amplitude to be perceived at the sarne loudness as those in the middle frequency range of about 1000 Hz. The very high frequency sounds also have similar damping, though there are few physiological sounds which reach these high Requencies.

Figure 1. Fletcher-Munson curves of equal loudness. Sounds of lower frequency are aaenuated greatly by the ear, making cardiac auscultation more difficult for some vibrations originating at the heart (fiorn Fletcher (5) page 1 88).

The perception of sound events to the human brain are influenced by preceding sounds in three ways4 . Fatigue occun when a sound is not detected afier a sound of higher volume is given to the ear. It is difficult to hear a sound which is quiet when louder sounds are present; this is called masking. This quietness may be in actual terrns or the frequency may simple lie in a range

of the spectrum for which the ear is less sensitive (see Figure 1). These factors contribute to
obscure the faint murmur which is often not heard well in the presence of the louder SIand s

~ ~ .

Finally, splitting occun when sounds are too close together to be distinguished by the ear. This varies according to frequency, but the minimum split detectable by humans is about 30 ms7. Sound characteristics including timing instants, frequency components and envelope shapes of

murmua are best done using quantitative analysis methods4; these will be discussed more later in Section 4, Signal Processing Techniques and Section 5, The Murmur Analyzer . The phonocardiogram (PCG)improves some of these limitations, as it provides a quantitative and graphical record of the hem sounds. This simple graphical display has limitations as well, since analysis must be done manually. The pattern recognition ability of the eye is not well suited to this modality of information display, especially in ienns of extracting details such as frequency content which are important for characterization of the heart sound8. The

manipulation of these PCG signals is not convenient on traditional platfoms. Finally, the advantages of cardiac auscultation are no longer available after the PCG is the only temaining record of the heart sounds. When analyzing human heart sounds, there is information which may be gained by simply listening to the heart sounds as in cardiac auscultation, and by seeing the heart sound waveform as in phonocardiography. However, more extensive analysis using some basic signal processing methods may provide further insight into the state of the heart. This project attempts to take advantage of the strengths which each of these three areas add to the field of heart sound analysis.

1.5 Physiology of the Heart


The heart is made up of four chambers: the right and lefi ventricles, and the right and lefi atria. The right and left sides of the heart are separated by the septum. Circulatory blood flow proceeds through the following seqwnce: body circulation, vena cava, right atrium, right ventricle, pulmonary artery, lungs, pulmonary vein, Iefi atrium, left ventricle, aorta, body circulation (see Figure 2). In order for this flow to occur, the heart muscle contracts and relaxes in a repeated cycle, with the b l d king forced to follow the correct pattern with the help of hem valves.

Initially, the atria collect the blood fiom the circulation or lungs, depending on the side of the hem, in a passive way. This is the filling stage of the cardiac cycle, and is called the diastole.

Dunng this period, the valves separating the atria and the ventricles are open; these are the right (mitral) and left (tricuspid) atrioventncular (AV) valves. The valves between the right ventricle and pulmonary artery (pulmonary valve) and the lefk ventricle and aorta (aortic valve) remain closed during the diastole. At the very end of the diastole, the atria contract, forcing more blood into the ventricles. The depolarization of the cardiac cells which caused the contraction of the atria then reaches to the ventricles. When the ventricles contract, the AV valves close due to the pressure difference, and the blood is ejected through the aorta or pulmonary artery. Upon completion of ventricular contraction, the ventricles begin to relax and the dropping pressure quickly goes below that of the aorta and pulmonary artery, at which time the aortic and pulmonary valves close. The cardiac valves are an important feature in this project since they are the primary source of heart murmun, the other main source being holes in the cardiac septum (see Section 1.6, Origins of Cleart Sounds and Murmurs, page 16 ). Hem valves operate passively, acting as check valves to prevent back flow and take no active role in controlling the direction of flow. This design allows the timing of the cardiac cycle to be controlled by a single source which under normal conditions is the depolarization of the sinoatrial (SA) node. The SA node has its own timing sequence, and although the brain may modify its action, it is not under the direct control of the brain. This makes the heart a very independent organ.

The final discussion point regarding the physiology of the heart relates to the nature of
pathological dysfunction. The heart valves may become calcified with deposits related to blood contents. Due to the passive nature of their operation, the resulting stiffening is clearly

detrimental to the fiinction of the valves and is therefore the factor of most concem when

diagnosing the heart. The cardiac valves may become weakened by other factors, causing them to be unable to function appropriately in the high-pressure environment of the heart. The physical manifestation of these and other pathological conditions will be described later in Section 1.7, Types of Mumurs, page 17.

Figure 2. Diagram of the human heart (fiom King and Showers (9) page 248).

The comlation of the sounds of the heart and the electrical activity of the heart to the physiology
described above is given in Figure 3. The fint hem sound, SI, associated with the closing of is the mitral and tricuspid valves. The second heart sound (S3 is associated with the closing of the aortic and pulmonary valves. This is fnher subdivided into the aortic valve (Az) and pulmonary

valve (Pz)closures. The sounds are actually slightly separated since the pulmonary valve closes

slightly after the aortic valvet8; may become more pronounced in pathological situations. this

Figure 3. The Cardiac Cycle. The timing of the various cardiac events are displayed hue along with physiological signals attained by various meth&. The PCG C'PHONO") will be the focus of the project (fiom Tavel (1 7) inside cover).

1.5.1 Sound Characteristics


The identification of heart sounds and murmun is made primarily by the relative temporal location in the cardiac cycle. However, the different sounds comprising the hem cycle also have different spectral characteristics which assists in characterizing hem6. Figure 4 surnmarizes

some of the basic sounds and their relative locations and fiequency content. Relative locations may also be observed graphically in Figure 3.
Sound

Location (ms)
3-5 ms from ECG i wave 12-18 ms after S2 12-18 ms after ECG P wave between Sp and S, between S, and SP between Sqand S,

S1
s 2

Duntion (ms) 10-16 8-14


4-8 3-6 varies varies varies

s3

s,

diastolic murmur (DM) systolic murmur (SM) aortic/pulmonary insufficiency (DM) varies snaps, clicks varies 150-1O O O+ Figure 4. Hem sound characteristics. Heart sounds are described in tems of temporal location and .common frequency ranges1'.
1

Approxirnrte ~mquency Range (Hz) 30-150 225-400 t 0-1 00 10-50 10-60 60-1 50 150-1O00

1
,

1.6 Origins of Heart Sounds and Mutmurs


There is wide agreement that normal hean sounds (SI and S2) as heard by cardiac auscultation are not caused directly by the closing of the valves", but by vibrations set up in cardiac blood vessels by the sudden pressure change caused by the closing of the heart valvef. As such, the amplitude of the heart sounds are expected to correspond with the size of pressure drop which in
Nni

corresponds to the amount of fluid flow before valves closure. Also, the fiequency

characteristics correlate with the size of the valves, with lower fiequency characteristics corresponding to larger valves.

There has been much more debate regarding the origins of heart mumurs, likely as a result of
the wide variety of physiological causes for the murmun themselves. However, studies have

demonstrated that the origins of heart murmurs are the vibrations associated with turbulent
f10w12.13

. nie sound energy density

was also found to be proportional to the level of

turbulencei2. Since larninar flow is the normal state of bloo flow in human circulation, audible rnurmua are usually associated with some pathological state. They are normally characterized by a higher fkequency content than any other heart sounds4. Often heart mumurs do not indicate a pathological state. Any movernent of fluid in a distensible chamber of vesse1 will cause vibrations of some sort, so everyone has some murmur if the recording instrument is sensitive enough '4115.

7.7 Types of Murmurs


There are a nurnber of different murmurs which may be detected by cardiac auscultation, PCG or advanced heart =und processing. While there exist both pathological and normal mumun, both are of interest to the cardiologist and researcher. A general review of causes of murmurs which rnay be encountered is given here. Refer to Figure 2 for locations of the various physiological components discussed.

Systolic Murmun
Systolic murmurs are divided into two categories, systolic ejection murmurs and pan-systolic mumurs. Systolic ejection murmurs occur immediately following SI. Aortic or pulmonary valve stenosis between SI and ? s :

This systoiic ejection murmur occun temporally

The valve becomes defective afier losing some of its suppleness due

to the formation of calcific deposits. Therefore, the valve does not open fully and this results in interference to the ffow of blood, manifested as turbulence.

The PCG of aortic stenosis is characterized by a syrnmetric diamond shape, and is lacated
near the rniddlc of the systole'!
This shape rnay be explained by the fact that murmurs are

caused by turbulent blwd flow, as discussed above in Section 1.6 Origins of Heart Sounds and Mumurs. In ejection rnurmurs, the velocity of blood increases then decreases as the pressure ramps up and down as the heart muscle contraction goes through its cycle. In turn, since the turbulence of blood is dependent on the Reynolds Number, which is proportional to

the velocity, the sound caused by this turbulence goes through the sarne incrpase and
decrease, giving the diamond shape12. Major causes of aortic stenosis are congenital disease, rheumatic fever, or calcific degeneration of the valve leaflets. Pulmonic valve stenosis is manifested in similar ways as the aortic valve stenosis described above, with the exception that it is not symmetric, but peaks closer to the end of the systole 17. Mitral or tricuspid valve insufficiency - Regurgitation of blood into the atria occun during ventricular contraction as the valves do not hoid up to the pressure applied against them4. Since only a small gap is opened, turbulent flow results through the gap, causing this deficiency to be made apparent by systolic murmur. The shape of this murmur of the PCG is flat and it extends from SI to s

~ ~ ~ ?

The ongin of the common mitral insufficiency munnur is usually mitral prolapse syndrome, which is an overly floppy mitral valve. The valves cusps become thickened. Another less common cause is rheumatic fever. Tricuspid valve disease is caused primanly by rheumatic fever, infective carditis or right ventricular dilation". Innocent Murmurs

- These murmun are common, especially in

children, and have no

pathological origin. They always occur during the systole, as al1 diastolic murmun are pathologic. They are caused by a hyper-dynarnic state, which is a results in a high flow rate dirough the valve.

This condition may also occur during normal pregnancy or during pathological situations not related to the heart such as anemia, chronic renal failure and liver disease'

'.

The second type of systolic mumurs, pan-systolic, occur through the systole and often continue into the second heart sound. These are described below. Atrial septal defect - This defect results in a shunt between ventricles due to a hole in the lower part of the septum which divides the heart chambers. It results in a systolic murmur, though some diastolic munnur is also usually present. This defect nonnally has congenital roots and is caused when the septum, which is open when the child is in the womb, does not completely close afier birth'"1'8. Ventricular septal defect - This defect is similar to the atrial septal defect, except that the location of the defect is lower in the heart, in between the ventricles'*'.

1.72 Diastolic Murmurs


Mitrai or tricuspid valve stenosis

- Sirnilar to aortic valve stenosis described above in

Section 1 .Tl above, the valve, becoming calcified, dces not allow the larninar passage of blood. Interruptions cause the flow to be turbulent, resulting in vibrations which are heard as diastolic murmurs. Mitral valve stenosis is much more cornmon than tricuspid, with the major cause of both being rheumatic fever". This mumur occun at the middle to the end of the diastole, and is of decrescendingcrescending shape. In a heavily calcified valve, the murmur appears as a plateau, from S2 through to sI4*I8. Aonic or pulmonary valve insuffciency

- These munnun are dificult to distinguish by

timing, but may be identified with help of the recording location. Aortic insuficiency is

caused by three principle factors, the destruction of the aortic cusps by rheumatic fever, trauma or infective endocarditis, the dilation of the aortic valve ring preventing the cusps from meeting properly, and the loss of structural support4*". Infective endocarditis heart disease caused by bacterial infection and is the second most common source of illness originated heart damage next to theumatic fever. Occumng early in the diastole, the murmur starts with high amplitude and fades out, forming a decrescending pattern on the PCG". Coronary Arterial Stenosis - The nanowing of the coronary artery causes turbulent flow which may set up audible vibrations at the onset of diastole. However, there is often not sufficient flow to create a clearly audible mumur''.

1.7.3 Other Murmurs


O

Patent ductus arteriosus, coronary arterio-venous fistulas, pulmonary atresia

- These are

continuous murmurs which begin in systole and continue through S2 into diastole4.

2. LabVlEW Programming Language


The National Instruments (Austin, TX) LabWEW graphical programming language was used for
the implementation of this project. A background explanation of LabMEW will serve to

illustrate some of the reasons for its use. This section gives only a bief overview; more detail for interested readen will be found in related books" and the prograrn rnanua~s'~.

2.1 Description
LabVIEW is an ideal tool for biological signal processing projects. The function of the prograrn is to allow the user to create a '%irtual instrumenty' for the lab environrnent using graphical Windows programrning techniques. The development of advanced hardware instrumentation designs is nonnally a lengthy and expensive procedure, but this is cut significantly by replacing most of the hardware requirements with sofnvare. The MS Windows-based graphical programming environment is another asset for such applications as program development time is reduced by virtue of program modularity. Many functions are included with the basic LabVIEW package and there are numerous add-on packages such as the Analysis Toolkit and the Joint Tirne-Frequency Analysis Toolkit. These items, as well as the ability to re-use self-written code, enhances the sophistication of the final product. User acceptance of LabViEW prograrns is high due to the familiarity of the conttols used. The implementation under Microsoft Windows allows the inclusion of other Windows functions; this feature is used in this project by including the multi-media system DLL for the audio playback of sounds (see Section 3, The Heart Sound Simulator, page 28). LabVIEW is an object-oriented language which uses graphical techniques for both programming
and final user interface.

The underlying language ( ' G , which stands for Graphical

programming language) tuns at a comparable speed to compiled C code.

The graphical

programs formed are called virtual instruments (VI) and are essentially equivalent to a function in a text-based language. These VIS rnay be used within other VIS, which in tum rnay be used in others, creating a hierarchical program environment By virtue of this hienuchy, nodes depend on the lower nodes to be completed before higher nodes receive the results of their calculations. The VI concept greatly eases the modularity of programming, making it easy to recycle code within the program and between users. In fact, the VIS may also be used across platfoms, with most VIS capable of being transportecl unhindered between PC, Macintosh and Sun computer applications. There are some Vls which interact with the hardware which m u t be specific to platforms; the Murmur Analyzer and Heart Sound Simulator has one such hinction, which is the use of the MS Windows multi-media system library.

Programming Environment
Programming of a LabViEW VI is done in the "block diagram" display window, where functions interface with one another by connectors, equivalent to arguments, by virtual wires. A VI rnay also be implemented as a function, thus becoming a "sub-VI". The input and output of the

program to and from the user is perfomed on the "front panel" display window, where various controls and indicators are placed to supply the appropriate information in a suitable format. This is the view which is visible during the execution of the program. The graphical controls and indicaton correspond to terminais programmed into the block diagram. Figure 5 shows the front panel of a simple working VI created to assist in gaining a general understanding of LabVIEW programs. This VI waits for a prompt fiom the user and then takes a temperature reading and displays it on the graph. If the temperature is over the limit set, the

LED indicator lights up. The current data point pictured here is over the set limit, so the light is
on. The program is teminated by pressing the "stop" button.

Figure 5, Front Panel of an exampie VI for temperature monitoring. The front panel consists of the buttons, sliders and other controis needed to control the vittual instrument. Also the charts, lights and other indicators are used to display feedback results to the user.

pub-Virtual Instrument]

Figure 6. Block diagram for Example VI. The diagram contains the programming for the VI, and consists o f the fiont panel terminais and functions which manipulate data to form some output.

The biock diagram for this VI, shown in Figure 6, is the underlying program and is more
complicated than the simple front panel. The data flow may be traced through the 'kires" which connect the control terminals, functions and indicator terminals. In this exarnple, the outer loop structure is a "while lmp", which means that the code within it continues to execute until the loop continuation terminal is given the Boolean input "false". This false condition coincides

with pressing the STOP button on the front panel. This button is a Boolean control, meaning it must have one of two values, ue or false. In addition to the STOP button, there are two other control teminals. "Take Temperature Reading" is the first, and has Boolean control of the case structure, which allows the code to be executed when a TRUE value is returned. When the button is pressed, a TRUE condition ensues, and the code which is displayed in Figure 6 is run. Otherwise, the FALSE condition ensues; the code for this is not shown, but in this case it is empty, so nothing happens. "Maximum Temperature" is the other control terminal displayed. and corresponds to the slider on the panel. lnside the case structure, the "Voltage Read" sub-VI is m. In an actual application, this type of VI would access the data acquisition card analogue-to-digital board and return the voltage given there. In this case it is simulated data, but the result is the same: a digital voltage reading is returned. It is then calibrated to degrees Celsius by using the "multiply" function and the constant 100. It is assumed hen that the voltage reading is 11100 of the Celsius value; actual applications would likely require more sophisticated calibration techniques. displayed as a data point on the "Temperature Data" chart. Continuing to follow the wires from the fumions and tenninals, the current temperature data point is compared with the "Maximum Temperature" value chosen by the user. The "greater than?" function is used for this comparison; this hinction has a Boolean output which controls the LED indicator. In an actual application, it may be imagined that radier than just lighting a This value is

panel LED, this result could control a thermostat as part of a feedback loop controlling some process meant to maintain an environmental temperature. This example VI describes the LabVIEW prograrnming environment in a very basic way. However, the complexity of the actual program is only limited by the fnctionality of the hardware; any conceivable fbnction may be implemented and nin. Prograrns created outside LabVlEW may be accessed as well, increasing greatly the flexibility of LabVIEW. This is done using Code Interface Nodes or Cal1 Library Function Nodes, which allow extemal code to be used as LabVIEW functions.

Data Acquisitiorz/Confrol
There are three basic methods of data acquisition in LabVIEW. The fird is using data acquisition boards, such as those created by National Instruments which are specificaily meant for use with LabVIEW. GPlB and other hardware interface applications are used to interact with extemal instruments and take advantage of such things as the existing interfaces, controls and hardware while providing automation and data collection using the flexible software of LabVIEW. Finally, the existing computer ports such as the serial port may be controlled directly from LabVlEW to make custom applications without the use of purpose-made data acquisition boards. The programs dixussed in this project use a National Instruments board for data acquisition (see Section 5.1, Data Acquisition, page 42). Data output is done using another computer card, the sound card.

2.4 Applications
nie test laboratory environment is one of the most popular LabVlEW applications, due to the
flexibility that the program provides in collecting and analyzing a limitless variety of signals.

An example found in recent literature is a genetic algorithm (artificial intelligence) for instrument contro12'. In this program, a robotic ami was controlled, and the AI algorithm was used in optimizing the voltage required to make the deskd movements In another example, evaluation of rat diastolic heart fnction was perfonned22. Various pressures were obtained by data acquisition by the cornputer through pressure tramducen hooked up to a National Instruments Lab-PC+ data acquisition board. LabVlEW was then used to analyze the data to obtain Lusitropic properiies of the heart. Others cite the LabVlEW environment as an excellent example and place to stait in teaching data acquisition and control with cornputers? This was cited by both researchen as being due to

the flexibility and highly modular programming which aid in development as well as in quickly

gaining an undentanding of this advanceci use of cornputers.

3. The Heart Sound Simulator


-

lnitially created to facilitate the testing of the Mumur Analyzer functions (se+ Section 5). the Heart Sound Simulator program foms a powerfl tool in its own right. As a teaching tool, heart sounds may be simulated for demonstration to medical snuients and othen. The user-friendly interface made possible using LabVIEW facilitates its use by anyone fiom expert to novice. Along with the Heart Sound Simulator software, al1 that is required in ternis of hardware is a suficientiy powerful computer equipped with a sound card. The minimum requirements for LabVIEW on the PC are a 486 processor and 8 megabytes of RAM. The Heart Sound Simulator program uses idealized data to imitate typical data which rnay be collected from a monitored patient. This data was collected from the PhonoCardioSimulator (Humetrics Corporation, CA) and modified digitally to form appropriate signals for the Simulator. Both ECG and PCG signals are included, with variables including heart rate, sound amplitude of each component and the addition of different types of murmun including control of their shape, length and amplitude. The resulting sounds, assembled graphically on the screen,
rnay then be heard thmugh speakers connected through the output channel of the sound card.

3.1 Program Design/Operation


A detailed description of the nature and operation of the Heart Sound Simulator is given next.

Figure 7 on page 28 wifl be an important reference source, as it displays the main control panel for the Heart Sound Simulator, and in turn, the user fiinctions. For further details of this program, see Appendix C, Cornputer Program Details, H a t Sound Simulator W. er

The ECG is a method of cardiac monitoring which is familiar to those in the cardiac field, and it
has been developed further than other modalities of cardiac monitoring. As such, it is also

important to display this simultaneously with any other form of time-based physioiogical signals.

When the program is smted, the display begins to scroll immediately with an ECG signal. This is a standard signal and modification is not available, excepting the heart rate (see Figure 8). It is used as a reference point for the PCG cycle, both for the program itself in the timing of the cardiac cycle, and for the user, who may observe the relationship between the audible vibrations
and the electrical activity of the heart. The basic data was recorded at 60 beats per minute.

and The addition of the PCG also occun upon program startup. Both the first (SI) second (S2) hem sounds may be individually adjusted in ternis of amplitude. This amplitude is merely a relative amplitude for graphical display purposes and does not pertain to any particular physical units. The sound output volume is a separate control and is adjusted using a slider on the front panel. The heart murmurs have more controls associated with them (see Figure 7). They may be modified in shape (crescending, decrescending, diamond and plateau), which is important for simulating different pathological situations associated with heart murmun (see Section 1.7, Types of Murmurs, page 17). The length (short, medium and long) and amplitude (not discretized) of the murmur may also be adjusted; these parameters generally Vary according to the severity of the dysfunction or the recording location. Finally, the offset (not discretized) may
be adjusted relative to the rniddle of the span between SIand S?; the location also gives clues as

to the nature of the dysfunction. Heart sounds are divided into two categories: systolic rnunnurs, which occur between SIand S?, which coincides with ventricular contraction, and diastolic rnunnurs, which occur after S2 and before the subsequent SIof the next cycle, which coincides with ventncular relaxation. Pansystolic murmurs and continuous murmurs are also indirectly available using the length and offset features of one of the two existing categories. The configuration of each mumur is done individually.

Figure 8. Change Heart Rate VI. This function allows the user to select the desired hem rate for the Simulator. Choice of heart rates is not limited to a few discrete choices, but is continuous.

The original signal source for both the ECG and PCG sipals is a clinical training device called
the PhonoCardioSimulator. High level output signals fiom the device were collected using the

analogue-CO-digitalconversion function of the Lab-PC+ data acquisition card (National Instruments, Austin, TX) in the computer. A LabVlEW program was written to collect and customize these sounds, called the Signal Modifier (see Appendix A for details). For the basic heart sounds (SIand Sz), this program was used to break up the signal into cardiac cycles using the ECG as a reference point. These portions are then used to fom the continuous signal which the Simulator generates (see Figure 9). Heart mumurs were implemented differently. Since there are so many different types, and their locations must be made variable through the cardiac cycle, a single file was made which includes all murmur segments. Another utility was consmicted for piecing together this file, called Create Mumur File (see Appendix C. Cornputer Prograrn Details). A continuous array containing al1 available combinations of murmur and the indices which separate them are stored in a single file.

The correct segment is extracted and displayed by the Heart Sound Simulator.
Amplitude, heart rate and offset changes are made by modifying source data files afier loading them into memory (see Figure 9). This allows continuous variability of these parameten, while the length and shape are available as a number ofdiscrete segments only.

Figure 9, Signal Assembly. (a) Each component of the heari sound is generated individually using the sequence structure, then (b) modifications are made to the standard signal. These segments are then combined togethcr into a single cycle (c).

1H iqhest Channel

Figure 10. Buffer Storage. A nurnber of cycles, as chosen on the front panel, are stored into global vari~blesfor outside use, along with other important parameters.

The constructed sarnple is displayed on the screen, with updates occumng automatically with al1 parameter changes (see Figure 9). Changes are made at the end of each cardiac cycle, as the computer reconstructs the phonocardiographic cycle. When running the Simulator as a signal source for the Murmur Analyzer, the number of cycles to be sent Corn the Sirnuiator is selected using the "Cycles to Retum" slider control. The count is started as the retum button is pressed in order to ensure that each cycle returned contains the sarne settings as described above. These cycles are stored in a buffer (a global variable) which is accessed by the various sub-VIS of the Murmur Analyzer (see Figure 10). Additional data regarding the signal buffer required by the

Murmur Analyzer are also stored in global variables and include the sampling fiequency, the
sampling interval, the channel labels, the number of cycles. the locations of the peaks of the QRS complexes from the ECG,and a description for information purposes. Since SI and S2 are generally deterministic in nature6,825, the same data are used for each cardiac cycle. This is consistent with the fact that the sounds are caused by the same physioiogical mechanisrn, part of which is the vibration set up by the closing valve. This wouid be the same

on each cycle given that no other physiological parameters are changing. Conversely, the sounds
for murmurs are caused by the turbulent flow of blood through a valve or septal defect6-13. Turbulent flow by definition is made up of random fluctuations, leading to different vibration patterns on each cardiac cycle. Therefore. in the implernentation of hem munnurs in the Simulator, a different set of data is used on each cycle to simulate this randomness.

In addition to the visual display of the waveform, the computer sound card may be used to listen
to the generated heart sounds. The sound volume is controlled by a slider on the fiont panel. When the "Hear Current Sound Data" switch is selected, the hem sound waveform is sent to the Hear Sound VI. This VI converts the LabVIEW array into a standard Microsoft wavefile format. The resulting tile is then played using a iibrary cal1 hnction, which uses the PlaySound hnction

of the MS Windows multi-media system dynamic link library (mmsystem.dl1). This function is the single VI which makes the program platform specific; otherwise al1 Vls may be used on PCs and Macintosh cornputers. However, the rnodularity of the program allows full functionality afier the Hear Sound sub-VI is replaced according to the platfonn used.

One additional feature was programmed into the Simuiator. In order to circumvent the necessity
of having a user who is knowledgeable about cardiac pathologies, a pathology list is available. This list contains a number of conditions which rnay be chosen, each one comsponding to a setting for each of the control knobs, sliders and selectors. Once the features are set, the user may make modifications in the event that a variation on the preset parameten is more appropriate, for example to imitate alternate recording locations or dysfunction severity. The list of pathologies is set simply by programming local variables to adjust the settings of the control panel; this list in given below in Figure 1 1.

1 1
1

Pathology
Normal Aortic Stenosis Pulmonary Stenosis Atrial Septal Defect Innocent (Functional) Systolic Ejection Murmur Dilated Aorta

1
1
1

Characteristics
regular Si, S2 systolic ejection murmur, diamond shape, from ECG R-wave to S2, reduced S, 1 systolic ejection munur, diamond shape, from S, through to S2, reduced P2, late S2 systolic murmur, decrescending, short length, starts immediately after S, but later than functional mumur, reduced S2 systolic murmur, decrescending, short length, small amplitude, starts immediately after S, , reduced S, systolic murmur, decrescending, medium amplitude, closely following
-

s,
Mitral lnsufficiency Tricuspid lnsuficiency Ventricular Septal Defect VSD & Pulmonary
. .t r -

--

, Aortic Valve lnsufficiency diastolic murmur, decrescending, start immed. after S high frequency pre-systolic (Le. late diastolic) mumur, diamond, medium amplitude, Mitral Stenosis ' gap between S, and mumur, large S, ai - -- - - . . - - - 1 click between S. and S, 1 -- - - -* Mitr-. Valve Ptolabie , J Figure 1 1. Preset pathology list. The settings on the Heart Sound Simuiator may also be controlled by choosing fiom a list of preset cardiac dysfunctions.

.
1

pan-systolic murmur, decrescending, '/t amplitude of S,, start at S, through to A2 diastolic mumur, decrescending, short length pan-systolic murmur, decrescending, start at Si through to mid-S, pan-systolic murmur, plateau, S,, split S2 same as VSD except diamond shape

., -

..

..

.-

4. Signal Processing Techniques


A number of signal processing techniques have been applied to the PCC with the aim of gaining

data usehl in the study of heart disease. Most methods pre-date the advent of the personal cornputer. As such, there is great opportunity to use the power of digital manipulation and processing of signals to gain information in a more expedient fashion.

The following sections describe a number of signal processing techniques which have k e n used
in with PCG signals, and more specifically with heart murmur analysis. A brief commentary as to the suitability of each method is also given.

Signal A veraging
Signal averaging has been used to raise the signal to noise ratio in hem wunds". This is a

useful method, as the contamination of heart sounds by ambient sound and random instrument noise reduces the quality of the signal. It may also be used to obtain a sound envelope, for use in feature identification4. Digital synchronous signal averaging of heart sounds is done by using a reference point to x ~ then segment the signal into cardiac cycles, such as the ECG QRS ~ o m ~ l e and ~ , adding together each point in time and dividing by the number of segments. This is a conceptually simple procedure, and reduces the variance of the noise by a factor equal to the number of segments used for averaging3'. One trouble which may be experienced when using signal averaging for heart sounds is due to variability between cycles. This is referred to as trigger jitter, where the point in time used as the reference changes with respect to other features in the cycle. This is less significant when the noise is of low fkquency, but becomes more significant as the fiequency increases2'. This is more likeiy to occur in high frequency signals due to the cancellation of peaks and valleys which

are in closer proximity. One source of trigger jitter in humans is the variation between cycles due to the subtle heart rate change with the degree of inflation of the lung2'. This is due to the pressure placed on the heart
by the lungs.

4.2 Frequency Analysis


4.2.1 Fourier Analysis
The most natural representation of signals is to display their amplitude against tirne. Signal
processing done using this signal is known as tirne-dornain analysis. However, signal

representation in the frequency domain is ofien useful in providing additional information. The Fourier Transform is the prime method used to transfer a temporal signal into the frequency domain3'. It allows the signal to be divided into frequency components and their intensities. It

ir represented by the following equation for continuous signais". Note that in the tirne domain,
the signal is real. but in the frequency domain. it is represented by complex values.

The inverse Fourier Transform is as follows:

For waveforms consisting of discrete points, as in a digital signal, the discrete Fourier transfomi is given by the following equation:

and the inverse is given by:

4.2.2 Spectral Analysis


Power specml analysis consists of a display of the signal power against the fiequency, rather

than the amplitude as in the Fourier Transfomi as described above. The energy spectrum density
is calculated using the magnitude complex Fourier transfonned signal, and is represented by:

When plotted for the discrete case, the energy spectium allows greater understanding of the signal through viewing of the energy corresponding to the frequencies contained in the signal.

4.2.3 Stationary vs. Non-Stationary


For most biological signals, strict analysis reveals them to be non-stationary signals. That is, their statistical properties Vary over time. These signals may not b processed using the FFT, e
due to the sirnultaneous variation in tirne and freqwncy which must be accounted for.

Therefore, the approach often used is to assume the signai to be stationary within a window of tirne. This does not require the assumption that the sounds be stationary or priodic". The

window must be chosen as long enough to detect the low-frequency components, but short enough to be considered stationary. Segment size may either be preset or changed through the signal based on the characteristics". There may be loss in the fiequency molution using this technique3'. There are a number of factors to take into account in order to obtain the ben results when using

the FFT for display of the frequency distribution. The sipal alias effect mua k avoided, in which the sampling rate is too low, such that a high fmluency signal appears as a lower fiequency signal when features are missed. Also, the biological signals are finite and made up of discrete points, necessitating the w of an approximation to the mathematical transfom. This leads to truncation enor. Finally, a window should be used to reduce the "leakage", or extra side lobes which appear due to the approximation mentioned above. This can be reduced by curtailing the ends of the signal by multiplying the data through a window filter, as described in the following section. With a11 of these factors accounted for, the FFT provides a reasonable method of converting the signal to the frequency domain2'.

Filtering methods rnay be used to reduce erron and artifacts. Problems arise in the transition from the continuous to the discrete fourier transfom. since the discrete is only an approximation. There is a misrepresentation from limitation of the discrete measurement between two finite points, in contrast with the continuous signal which is integrated from negative infinity to positive infinity. Windowing may be used to reduce these artifacts. The signal is multiplied by a shape which essentially reduces the input at the extreme ends of the signal spectnim, while enhancing those in the middle. This rnethod should not be used on signals which exhibit multiple spectrum peaks, but is effective in improving the information displayed by a single peak spectrum. Typical windows used are displayed below in Figure 12 and their mathematical representations are given below the charts. The p e n d for each plot i s unity (T=l). One result of using a filter window which m u a be recognized is the loss of data since some attenuation is applied to the signal. Specifically, this occurs in the fonn of loss of total spectral

Figure 12. Spectral Analysis Windows. Three examples of windows used in multiplication of specbum data to reduce artifact are shown here.

4.3 Other Feafure Idenfificafion Methods


The timing of events is ofien used in distinguishing the components of the hean sounds. The
most obvious example is that once SIand S2 are located, the systolic and diastolic portions of the

signal may be located". In one study. the timing of the peak of the systolic murrnur was used to assess the severity of aortic stenosis".
A timing level was established below which aortic

stenosis could be niled out, another above which severe stenosis was deemed to be present, and a small gap in between where there was some indication of stenosis.

5. The Murmur Analvzer


Heart sounds, including munnurs in the case of individuals who possess cardiac pathology, contain usehl information for the clinician and researcher. Unfortunately, much information may not be obtained through traditional methods, as was discussed in Section 1.4, Limitations of Auscultation. The alleviation of limitations given in that section was a goal for the programming of the Murmur Analyzer which is presented in this section. Further comrnents regarding the degree to which this objective was achieved will be given later, in Section 6, Results Discussion. The goal of some researchen in the field of cardiology is the detection and characterization of murmurs through automated analysis6. This is far from being accomplished at the present time, but the ability to process PCG signals to aid in such detection and characterization is obtainable
now.

Automated murmur detection is complicated by the variation which occurs between

patients. This is partially due to the biological variability which ordinarily exists between people. Also it is due to the variation of basic measurement parameters including intensity, frequency content and timing which are al1 affected by the recording site, the extent of cardiac defect and the ejectate blood velocity4. The following sections describe the combination of new applications of existing processing methods and the novel additions to the field attempted in this project.

5.1 Data Acquisition


A number of pieces of hardware instrumentation was used to obtain data for subsequent analysis.

The software used blends seamlessly into the analysis software as described suvting on page 43, Section 5.2, Computer Program. Since the system used was modified from one already

constructed by ~thers'"~~, not be described here in great detail. Some specifications of the it will system are given in Appendix B, Hardware Specifications. A diagram identifjing the main elements is shown in Figure 13.

r\ E,CG Leads
ECG Machine

m m m n

Subject

Am ....!plifier

: Data Acquisition 1

i Card
I

0 1
I

Personal Computer
Figure 13. Hardware Apparatus. The system is based on a high performance PC; other equipment is required for the complete data acquisition package.

The centre of the system is a persona1 computer. Though a desktop version was used for this particular study, the use of a notebook computer would facilitate portability. m i s is more appropriate for envisioned applications including clinic and instructional use.

5.2 Computer Program


One of the objectives for this project was to develop a PCG monitor on an accessible platform.
One method by which this was performed was to make the computer-based monitor for the

analysis of heart sounds and munnur a part of the larger UltraMonitor project k i n g conducted at the University of ~oronto'~. This project was implemented on a PC-based system, with LabVlEW graphical programrning language used for the interface. The Murmur Analyzer described below utilizes the full power of the modularity of LabVIEW. It may either nin on its own or as a sub-VI of the larger UltraMonitor program. Since the developmental work of this project was implemented using a computer program, the most appropriate method to describe results is to trace through each section of the program. The panels for the central virtual instruments which were prograrnmed are given in the main text; additional programs rnay be found in Appendix C, Computer Program Details.

Figure 14. Murmur Analyzer Panel, This is the main screen o f the program created as a part of this work. This central VI opens the data which is subsequently used in the analysis Vls which are started using the buttons along the bottom of the panel.

The panel of the Mumur Analyzer is shown in Figure 14. From this main screen, the test of the sub-programs may be accessed; this is the central data selection point. Al1 data are displayed on
the labeled graphs, and a row of buttons along the bottom of the panel allow the additional

analysis programs to be opened and nin using the data shown on this main screen. The block diagram for the program is simple; it is essentially a messenger which gathers data and sends it for analysis to the sub-programs. New data may be obtained dunng program execution to replace the existing data. Sources are the Heart Sound Simulator, new data acquisition and saved files containing trial data. The only other hnction of the Munur Analyzer is to allow for the current wavefon to be heard through the computer's sound card. Further details of the items described here, as well as descriptions and details of peripheral programs not included in the main text of the thesis paper may be found in Appendix C, Computer Program Details.

5.3 Selecve A usculfation


5.3.1 Description
On its own, traditional cardiac auscultation is not the most effective analysis method for heart
sounds. A number of its limitations may potentially be resolved by giving the operator full control of the sound playback. For example, audio fatigue involves the missed detection of a quiet sound after a sound which is loud in relative tenns. This is a signal processing property of the human ear which interferes with the detection of certain hem sound features by traditional auscultation alone. Selectively listening to specific segments of the heart sound using adjustable windows allows the quieter features to be heard more distinctly such that more data is included in the analysis of the patient pathology.

5.3.2 Program Design/Operation


Figure 15 shows the front panel of the Selective Auscultation VI. It provides a visual display of those inctions described in the text below. The Selective Auscultation VI displays the basic cardiac signals: the PCG and ECG. This standard display is adjustable in terms of x-axis and y-axis scales. When the 'Wear Sound" switch is selected, audio playback of the selected waveform is given. Only the displayed PCG segment is replayed; this allows the isolation and analysis of specific segments, aiding in the diagnosis of the cardiac state. The chosen PCG segment may also be made based on the cardiac cycle number within the current waveform data. This is added to facilitate cycle segmentation instead of relying solely on user selection. The segmentation is made based on the ECG signal, specifically the peak of the QRS complex which is used as the beginning of the cardiac cycle. The QRS detection technique used is an advanced rnethod based on mathematical morphological operators3' and has been described previously34. Changes to the display made as a result of cycle selector changes are based on the contents of the variable storing the sound information from its status in the previous while loop. This allows the modification of the waveform such as speed changes (see Section 5.3.3, Speed Change) to be displayed in the updated segment. Selective auscultation also allows the precise calculation of timing events. This is of interest in the identification and classification of some cardiac pathologies. For exarnple, the PR interval of the ECG may be shortened in the case of mitral valve stenosis". The graph displayed has an Xaxis given in milliseconds; this is calculated from the input frequency which is stored as a global variable along with other case information.

5.3.3 Speed Change


One of the key fnctions of this VI is the speed change option. Using this function, the rate of playback of the audio sound is adjusted. For example, the selection of 4 for the speed factor (see Figure 7) doubles the length of the signal, or reduces the rate of playback by 50%. This change of rate allows more careful analysis of details within the PCG waveform by giving

the ear more time to react to transient features. This may also help address the masking, fatigue
and splitting limitations of conventional auscultation.
As there is no ideal method available, there are two different computations presented. Each has

a compromise, so it is left up to the user at this point to determine the priority in terms of signal loss. The first computation of the new waveform is based on interpolation. The algorithm for this method of speed change is shown below in Figure 16. The appropriate number of additional points are interpolated between each existing point, according to the degree of speed change selected. Using this method, the frequency of the sound also changes, as the basic shape of the sound waveform is lengthened. The frequency of the sound playback decreases by one octave each time the signal doubles in number of points. This translates into a signal change through modification of pitch. Since the change is universal across the signal, the distortion is less severe than a pitch change to one segment of the heart sound. For example, the frequency of a murmur gives ches as to the underlying pathology, so the change in simply the murmur could result in incorrect diagnosis. The univenal change means that SIand S2 may be used as reference points for the analysis of other signal components.

Figure 16. Speed Change VI block diagram. Speed change made by point interpolation includes a corresponding frequency drop. Avoiding the frequency drop requires maintaining the main wavefonn shape &hile doubling segments.

e
ero cross-

Figure 17. Speed change without fiequency drop block diagram. The block diagram of a different algorithm involving reproducing segments of the waveform is shown.

The second computation maintains the fiequency while changing the speed of playback. To do

: this, the dominant hannonic is detected by using the zero crossing points of the M adjusted
wavefom. This adjustment refen to the centering of the signal over the correct zero amplitude level, such that zero crossings are more accurately afFecting the dominant fiequency. Enon in this offset could occur through transient DC drift or slight changes in the calibration of the amplifier. This is done simply by subtracting the mean of the signal fiom each point in the sound wavefonn.

The concept of using the zero-crossing for heart sound recording has k e n previously described;
however, a loss of frequencies outside of the dominant frequency was noted40. The segments created by dividing the waveform by the zero crossings were duplicated according to the new speed factor selected. Using this algorithm, there is some loss as the zero crossing does not necessarily indicate the beginning of a new frequency. Sound waves are cornplex, necessitating further work in order to obtain a better algorithm to perform this signal processing function. Since the corresponding ECG would no longer be accurate after changes have been made to the number of points in the PCG, it rnust be changed as well. However, at this point al1

segmentation and other functions for which the ECG was used have been completed; the ECG is used only for display purposes. nierefore the scaling of the ECG x-axis is changed

programmatically by multiplying the extremes of the PCG graph by the inverse of the scaling factor. The actual content of the ECG in memory remains unchanged.

5.4 Signal Subtracfion


In applications where it is desired to cancel elements which are common to two signals, signal
subtraction algorithms may be used. This is a novel technique in terms of application to the phonocardiographic signal. The preparation of segments suitable for subtraction is done in this pmgram using methods established in signal averaging. A repeated feanup, in this case the QRS

wave of the ECG,is used for synchronization. This method is susceptible to e m r fiom trigger jitter as described above in Section 4.1, Signal Averaging. AIso, the same-issue with high fkquency sipals king even more susceptible to errors caused by trigger jitter applies. Therefore, using this method for extnicting unique features fiom signal to signal is potentially fiaught with dificulty.

5.4.1 Description
The Signal Subtraction VI utilizes a novel technique For PCG analysis. The intent of this
program was to implement this new technique for the isolation of the heart murmur. The general concept is based on the fact that the first and second heart sounds are deterministic, while the rnumurs of the heart are random in nature6**.This may be dernonstrated by averaging many cycles using a synchronizing point such as the R wave of the QRS complex. The resultant waveform would reveal the heart sounds SI and Szt while any rnumurs would no longer be present6. Therefore, when properly aligned, the subtraction of subsequent first or second heart sounds should result in the canceling of both heart sound signals. However, due to the random nature of the heart murmurs caused by turbulent blood flow, any munnur portions in subsequent cardiac cycles will not undergo the same canceling effect. Instead, a new signal will be developed. This signal is a combination of the contributing cycles; M e r processing would be required to provide useful analysis results. Problems in tuming this conceptual idea into a practical analysis method were identified during program construction. The extent to which they were successflly overcome is described in Section 6, Results Discussion on page 61. Similar to problems experienced in signai averaging, the presence of high fkquency signals causes error to be magnified. In such a signal, a slight offset may result in the alignment of

points with widely diverging amplitude. This causes features to be canceled in the case of sipal averaging, or the reverse problem of features not king canceled in the case of signal subtraction. This is described more fully above in Section 4.1, Signal Averaging. This problem and the related one of "trigger jitter" also described above were explored in the Signal Subtraction VI. Trigger jiler refers to the shifiing in tirne of the features used as a temporal marker to establish a relationship between waveform segments. Two methods were used for synchronizing the cycles to be subtracted. These are described further below. One is based on the R-wave as a trigger and the other uses no trigger, but is based on cross-correlation between cornparison cycles. Another potential problem is the indication in some research that SI and S2 are not deterministic2'. This is a somewhat unanswered problem, and is discussed further in the Results Discussion below, where experimental data is used to analyze this issue.

5.4.2 Program DesignIOperation


This program is started from the main screen of the Murmur Analyzer program, which provides the data to be analyzed. The panel display, pictured in Figure 18, consists of a small chart containing the full PCG signal for reference purposes, a graph for each of the segments chosen for subtraction, and the results of the subtraction. A cycle switcher is prominent in the middle of the screen and allows the user to select cycles from the full PCG signal in memory. The length

and offset of the cycle may be selected in the event that a standard R-wave to R-wave segment is
not sufficient.

The addition of a "synthetic" murmur is also available by pressing a button at the bottom of the
panel. A new panel which enables the design of a murmur segment is opened. This panel is shown below in Figure 19, and either accesses the same data as that provided in the Heart Sound Simulator, or creates random Gaussian noise according to specifications of amplitude, duration and cycle location.

Figure 18. Signal Subuaction panel. Data from the Mumur Analyzer is delivered to the signal subtraction VI. The current cycle for graph A and B are selected and then subtraction is done after the selected synchronization method is performed.

There are two different methods avaiiable to select from in synchronizing the cycles before subtraftion. The first uses the R-wave of the ECG. This method of using a trigger is very reliable when other features of the wavefom occur at f w d points relative to the chosen trigger.
With the PCG,this is normally the case, as the QRS complex of the ECG is the electrical activity

corresponding to the depolarization of the ventricles leading to contraction and systole. When this contraction takes place, the AV valves (mitral and tricuspid) close, causing vibrations which contribute to SI.The rest of the cardiac cycle follows along in an automatic progression, making it predictable and therefore suited for trigger synchronization. In a resting situation, there is one exception to this regular pattern. During inspiration, the cycle changes slightly in length due to the additional pressure on the heart provided by the lungs8. As such, signals used during inspiration must be done with caution. In order to compare the trigger-synchronized subtraction with a method which uses no trigger, a second method is made available in the Signal Subtraction program. This program takes the segments divided by the same method as for the trigger method, but modifies their relative positions. The appropriate additional offset is determined by a cross-correlation technique. This
is done by multiplying the two segments together point by point then summing the result. This

value is calculated for many possible offset values, and the peak of these values plotted against the offset produces the optimal offset for signal cancellation. Mathematically, the crosscorrelation is as follows:

where xl artd x2 are the two segments to be correlated, and N is the total number of points in the

segment. The function C(n) is the cross-correlation function. The maximum point of the curve when this function is plotteci is identified using a peak detection algorithm; the value comsponding to this maximum point is the offset where the two segments are most similar. The two segments are adjusted by this offset before signal subtraction takes place. Results frorn the signal subtraction are displayed graphically. The option to play the resulting wavefom through the cornputer sound card is also available here. Either of the selected cycles for subtraction or the resultant subtracted waveform is available for audio review. Details of this
VI may be found in Appendix C, Computer Program Details.

5.5 Spectral Analysis


5.5.1 Description
Plotting the frequency against the amplitude for heart sounds produces important information about hean sounds and murmun, and so is used in many studies4,16,42 . In most cases, the fastFourier transform is used to obtain the frequency spectrum, both for the heart sounds and the
munnurs4.16.36.37 . However, some feel
it

is not a suitable method, citing that there is not enough

frequency resolution when dealing with heart soundsa, or that the hean sounds are not stationary (see Glossary), a requirement for using the FFT? The Fourier transform is a linear operator3'; this is what makes it potentially unsuitable for non-stationary signals. The use of parametric methods is recomrnended by the reason for its use cited as the

ability of this technique to characterize the non-linearity of the signal. Othen used a zerocrossing detectoPO,but this only captures the dominant fiequency; this is clearly inadequate in the case of heart sounds and murmun as there are many significant frequencies layered on top of
any dominant frequency. In older studies, moving band-pass filters were used to obtain the

fkquency spectrum as a number of discrete points of energy plotted against frequen~~'~; has this now been replaced by more advanced cornputer algorithms. Some of the evidence rnay then cause concem over the use of the Fourier transfom. However, the important factor to recognize is that the limitations of this method do not preclude its use entirely. Conversely, its use must be understood and the limitations taken into account. For example, though it was found that the Fourier transform could not be resolved closely enough to provide the time delay between the components of S2, their fiequency components could be distinguished4'. Also, even those who detract from the use of the Fourier transform

acknowledge its usefulness in giving a gocd first approximation for fiequency a n a ~ ~ s i s ~ ~ " .

The most important feature of the PCG with respect to the mumur has been cited as the
frequency content4. Therefore, it was considered important to include this processing feature into the Murmur Analyzer program. Fnquency domain analysis is especially important in the diagnosis of some pathological situations, as the source of sounds are often distinguished by their spectral content. For example, frequency analysis has been used in studies to distinguish aonic insufficiency from mitral valve s t e n ~ s i (see Section 1J.2, Diastolic Mumun) and changes in s~~ the spectrurn were observed after myocardial infar~tion~~. source of mitral regurgitant The murmurs may also be distinguished by frequency spectrum, with the rupnired chordae tendinae and mitral valve prolapse producing higher frequency mumun than those caused by papillary muscle dysfunction3'. Spectral analysis has also been used to evaluate the status of a

bioprosthetic valve non-invasivelyM. A relation between the peak transaonic pressure gradient and the fieqwncy content of the heari munnur has k e n estab~ished~~.more general terms, In signifiant energy between SIand S2 or between S2 and the subsequent SIhas been shown to indicate a rn~rmur*~.

The spectral analysis plot allows the user to detemine the dominant fiequencies of the signal. In

tum, this gives dues as to the nature of the sound heard. Thetefore, this fnction provides insight into the nature of the PCG signal through the approximation of the fkquency content.

5.53 Program DesignlOperation


This program accepts the PCG and ECG data fiom the Mumur Analyzer. The ECG data is used for segmentation purposes, while the PCG is analyzed using spectral analysis. Figure 20 shows
the front panel of the VI.

The actual signal portion for which the power spectrum is calculated is chosen by the user. The
segment as divided by the ECG is chosen first; the full PCG signal is shown at the top for reference purposes. The length and offset of this segment may also be specified. Further isolation of portions of the selected segment are often desired. For example, an artifact in the selected cycle or a munnur in the cycle could be of interest for detemination of the signal frequency content. For this purpose, the analysis is perfonned only on the chosen portion which is isolated using the cursor display controlled by the mouse selector. For comparison between cycles, the same lenph, offset and rnouse-selected portions remain during cycle selection. The power spectrum is the most important display of the sub-program. The theory behind the operations perfonned are discussed above in Section 4.2, Frequency Analysis, starting on page
38. The calculation made for the power spectrum is the square of the magnitude of the foufier

transforrn; in this case the Discrete Fourier Transforrn was used.

In order to tighten the resultant power spectrum, the use of a filtering window is available. There are a number of windows, al1 having the similar effect of smoothing the profile of the power spectrum by weighting the middle portion of the cuwe. The available windows displayed are as follows: a Triangular, Flat Top, Hamming, Hanning, Blackman and Blackman-Harris window.

Figure 20. Spectral Analysis VI panel. This program takes the PCG and displays the power specmm and various specmim parameten for the selected portion of the signal.

The fiequency domain signal is then sent on for further calculations. The results are show on the right side of the panel. Included in the display are the power spectrum and related

parameters obtained from it including the peak fiequency estimate and the signal power estimate. Assessing the peak kquency is done by two means; the first is by using the fiequency conesponding to the energy level determined by peak detection2' and the second is by using the frequency conesponding to the centroid of the spectnim region3'. The centroid is calculated by
the f o ~ l o w i n ~ ~ ~ :

Another calculated parameter is the 95% spectral edge, which is a calculation of the frequency below which 95% of the signal power occurs. This helps to give an impartial indication of the maximum frequency content in the signal3". A signal power estimate calculation is also made for the power spectrum. It is the total of al1 of the energy components around the peak as determined above by the peak detector, and reptesents the power estimate''. This program module is based on established signal processing techniques, so its functions are well known and accepted. This particular application has been explored but has not found much clinical acceptance. However, the evidence of research which demonstrates the usefulness of spectral analysis as a murmur analysis tool technique in the clinical setting.
4.1 8.28.36.42.44.55

supports the implementation of this

6. Results Discussion
. .

One of the objectives of this research was to produce a usefil tool for the analysis of heart sound and rnunnur data. Also, it was proposed that a flexible and easy to use method be utilized for this tool. This is accomplished in this project, with the assistance of appropriate facilities such as a powerfl PC and the LabVIEW programming software. The use of a PC provided the flexibility through the digital manipulation of data and continuously modifiable software. LabVIEW greatly enhanced this power through the speed and modularity of prognunming which it allows. The platform and software also combined to give accessibility, both in ternis of the user operation of the system and outside accessibility to the programmed results. LabVIEW is becoming a common package in research and development environments, so the code generated and avaiiable for use may be a practical feature.

The factors described above deal with the platfonn as well as the programming competence to
the extent that the modules described nquire a certain level of performance. However, the next objective which is to apply actual data to the constnicted system and gain useful results from them has yet to be addressed. The following sections enter this second area in more depth to arrive at a more objective conclusion for the results of the project.

6.1 Sources of Raw Dafa


Since this project entailed the development of a new cornputer tool, a full clinical trial was not
the goal in data testing. The goal of this section of work was to provide some data which

of enabled each p ~ t i o n the instrument to demonstrate its capabilities. Initial testing is nomally
done using simulated data, while final testing should include actual clinical data. This entire

spectrum was touched on in the collection of data with which to test this device. Heart sounds were gathered h m a number of sources, each at different levels in ternis of

resemblance immediate or "Iive" clinic sources. The fust source was the cornputer-based simulator which has k e n described at length above in Section 3, The Heart Sound Simulator on page 28. A large number of different pathologies may be programmed using this source, enabling the clinical appiication of the device to be visualized. Therefore, this was a successful attempt to provide easy access to heart sound information. Another source of data was actual patient data which was previously recorded for another projec$3*34.Data acquisition methods to obtain this data were very similar to those used in this project. However, subjects in this study were chosen for their lack of cardiac pathologies, and analogue filtering was used to rernove murmurs and other high fiequency soundsJ3, so the subsequent data contained no natural murmurs which could be used in teaing the murmur analysis functions of the program. This murmur data may be added using the Add Synthetic
M u n u r VI, which may be accessed from the Murmur Analysis main panel.

The third source of data was pathological heart sounds recorded by other researchers and made
This available over the Internet in the form of Microsoft wa~efiles~*~. was useful in the wide range of good quality recordings which were made available. However, only the sound file was provided, so processing which required the use of the ECG could not be done. An ECG signal was manually added to this data, but this was only used for reference purposes, and those functions which require a physiologically accurate ECG synchronization was used with caution. Finally, actual clinical data of patients who maqifest their pathology through their hem sounds were recorded from the cardiac c h i c . The PCG and ECG waveforms of a number of patients
was recorded and used for the last test of the program functions.

6.2 Processing of Raw Data


6.2.1 Heart Sound Simulator Data
The Heart Sound Simulator made an excellent source for the teaching of cardiac auscultation. It provided a visual representation of sounds in the form of the PCG and displayed the ECG which assisted in undentanding the relationship between the features of the two signals. It is important to also provide the relationship between these sipals and the audible manifestations of the signals; this was also available through sound playback. Since the data produced using the Heart Sound Simulator was physiologically accurate, it proved to be very useful in testing the other aspects of the program. The Selective Auscultation VI took this data quickly and performed the segmentation correctly. Further segmentation into portions
was also done successfully, as was the audio playback of the current selection. Only the display

segment was played, either one time or continuously, according to the selection. The playback speed change was applied to the selected segment; the horizontal axis was used to check accuracy, as with a slower speed, the time for the chosen segment rnust also be longer.

The length in time did double when the speed factor of 4 was chosen, and quadrupled when the
speed factor of 4 was chosen for either modality of speed change. Sound quality for the speed factor change with subsequent change in frequency was good, however there was a drop in frequency of one octave for each time the speed was halved. If the second speed change modality was used, that which did not incur a fiequency drop, the sound quality was diminished. The sound frequency is maintained with a loss of smoothness as the wavefom acquires sharp directional changes due to the algorithm used. See Figure 21 for a graphical example of the results of the speed change.

Figure 21. Speed change effects on waveform. The fvst fiorne shows the original sample sound source. The speed factor altered waveforms are the other huo frames. Sound quality is maintained if the drop in fiequency is allowed, as extra sharp transitions are not added.

The Simulator data was also used in the Signal Subtraction W. The results of this were excellent since SI and S2 were programmed to be deterministic and the murmurs were programmed to be random. When synchronized using the ECG or cross-correlation, the resultant waveform had no visible SI or S2, but the murmur remained in full amplitude as cornpared with the original samples. Clearly this was a factor of the ideal data which was generated, but it did provide testing for the concept and related algorithm. See Figure 22 and Figure 23 for graphical display of these results. The last program tested with the simulated data was the Spectral Analysis VI. Since the frequency distribution of the data were not known prior to testing, such a cornparison may not be used to analyze the results. However, general features such as the cycle selector, segment selection, offset and length change al1 functioned appropriately. Calculated spectrum data including peak detection levels were confirmed manually.

25000
15000

Cycle A - Cycle B

Figure 22. Signai Subtraction results for simulated data. This routine worked well for simulated data, eiiminating the heart sounds and leaving the heart murmurs. Here S, and S are seen in Cycle A and Cycle , B which contain murmurs of mitral insufficiency, but disappear in the subtracted results.

Figure 23. Signal Subtraction results for simulated data. Similar to the above figure, the heart sounds are eliminated fiom signals including the mumur of aortic stenosis.

6.2.2 Non-Pathologicai Patient Data


The next set of data used in testing was the normal patient data with the addition of simulated mumurs. Much of the existing data used was not appropriate due to smpling rate differences. The purpose for data collection in the original studies were different fiom this one, thus sampling rates of 500 Hz were used. Not only does this eliminate many of the murmurs and other sounds of possible interest, but the sound reproduction at such sampling levels is very poor. Therefore, this data was not as useful in testing the sound playback functions of the program, which is the focus of the Selective Auscultation VI. Signal Subtniction using this data gave mixed results. In some cases the subtraction worked very

well in eliminating the heart sounds. However, other samples proved to be less effective, possibly due to the non-deterministic characteristics which exist in the heart sound signal. The low sampling rate is another source of the error, as points which correspond to one another are less likely to match up due to the loss in detail which occurs when the analogue signal does not

have enough digital points to represent it. Figure 24 and Figure 25 show examples of effective
and poor elimination of h e m sounds. The Spectral Analysis VI diainguished the hem sounds from the murmurs based on their spectral content. The illustrations for this distinction is given below in Figure 27 for cardiac pathology data, though the manifestation for this normal case showed a similar result between the heart sounds and sirnulated murmurs.

0.15

Cycle A

Cycle B
0.15 a 0.1

2 0.05 u
O

Q)

O .1

-o.os
-0.1 -0-15 -0.2

0,o.os Po,:.
C,
H

-0.15

Samples

-0.2

Samples

Cycle A Cycle B

Figure 24. Signal Subtraction used with normal patients. The results ushg his data varied fram excellent hem sound elhination showed hem, to less reduction of heart sounds,show in the next figure.

Cycle A = Cycle B

Figure 25. Signal Subtraction used with normal patients. This example shows results which were not as favorable as those above.
0.15 T

Cycle A

0.15~

Cycle A

Cycle A = Cycle B

Figure 26. Signal Subtraction used with normal patientr. The results for some patients proved to show almost no reduction of the h a r t sounds.

6.2.3 Pathological Patient Data


The next set of data used was pathological data obtained fiom other researchen. Recording quality was very good, making it the best data in terms of hem sound and murmur samples. The only drawback came in that the ECG data could not be used for important signal synchronization tasks, as it was added in for nference purposes and was not actual physiological data. The Selective Auscultation VI operated very well with this data. The sounds were clear, and the ability to pick out specific portions of sounds was useful in hearing specific features of the waveform. Speed changes also worked well, as with data fiom the Simulator described above. This data could not be used reliably in the Signal Subtraction VI due to the excess trigger temporal location variability. This was a product of the manual placement of the ECG in a simulated fonn after the recordings. This data provided appropriate testing for the Spectral Analysis VI, as portions of the PCG were the main concem, and the ECG was used only for general navigation purposes. A comparison is shown in Figure 27 and Figure 28 which demonstrate the usefblness of this analysis tool. Based on choosing different segments of the sound file, the power spectmm showed different frequency distributions. Figure 27 results in a higher frequency distribution than Figure 28. This

demonstrates that different murmurs may be distinguished based on their unique frequency content17. The rnurmur of aortic insufficiency displays more energy higher fiequencies than that

of mitral stenosis; this is consistent with findings in the ~iterature'~. Although these m u n u n
occur at the same time in the cardiac cycle, this is an effective method of distinguishing them. The fim graph in Figure 29 contains a pathology which does not manifest a munnur. This is used to dernonstrate the distinction which may be found between heart sounds. Once again consistent with findings in liteniture", this figure demonstrates that S2 has more energy at higher frequencies than S].

Normalited Power Spectrum

Figure 27. Spectral Analysis results for pathological data. This plot demonstrates the higher fkquency mumur of aortic insufficiency.

20000,
1sooo

Full PCG Cycle


1

I l

l2

Nomalized Power Spectrum

Figure 28. Spectral Analysis results for pathological data. The distinction benveen the sounds of diflerent origins is made apparent through the variation in their corrcsponding fkquency specums, as seen in the lower fiequency content of the diastolic mumur of mitral stenosis as compared with the above figure.

lSOOO

PCG Cycle

tom
SOOO
O

ab

q p

Smples

*-

..
,.

. k

S I Normalized Power Specbvm

8 2 Nomalzed Power Spectrum

Figure 29. Spectral Analysis resul for pathological data. This VI also showed good results in identifjing the distinction in hequency components between the hem rounds. S2 normally contains higher fmluency components than S,; this is dernonstrated here.

6.2.4 Recent Pathological Patient Data


The final category of data used for testing was that gathered recently in the Cardiac Disorders Clinic. This allowed the testing of the final module of the program, the Collect Sipals VI, which performs the data acquisition. This hinction worked suitably, and gathered useful data for testing the other functions of the device. The storage of recorded data, with other patient information, is potentially useful, either as a contribution to patient records or for teaching purposes when a patient with the particular pathology is not present. The higher cutoff

fiequency configured in the filter and the higher sarnpling rate from the data described above in Section 6.2.2 provided more compete information as to the presence of rnurmurs and other high frequency noise. Unfortunately, there was also more noise from the environment which was not filtered due to the higher effective cutoff. Also, certain patients such as those with more hair of those who had heavier body types, had lower quality recordings. The Selective Auscultation VI perfoned well with this data, in a comparable sense to that of the above section, Pathological Patient Data. Additional description is not necessary. Signal Subtraction provided a number of good examples again, however not universally. The trigger jitter problem or the non-deterministic characteristics likely had their effect in interfering with the successful operation of this VI. An example result of a i s data is s h o w in Figure 30. Finally, the Spectral Anaiysis function was used with the recent pathological data. It perfonned in a similar manner as described above in Section 6.2.3, Pathological Patient Data.

Figure 30. Signal Subtraction with recent pathological data. The "click"fiom the aortic valve of this patient shows up well after subtraction, with the hem sounds canceling each other out after subtraction.

7. Conclusions and Future Directions


7.1 Conclusions
In this project, a set of virtual instruments was programmed to perform tasks related to the sounds of the heari. Modules were made to simulate heart sounds, to collect patient heart sound

and ECG data, to manipulate the heart sound signal, to perfonn spectral calculations on heart
sounds, and to perfom mumur isolation.

Use of the device with simulated and actual data revealed that the many huictions programmed
into the instrument worked well. Exposure to the clinical environment allowed further analysis of the details of program operation.
The results of these tests revealed satisfactory performance, especially in the area of

manipulation and display of transduced physiological data. Spectral analysis functions also proved to have value in the clinic, especially in objectively and quantitatively assisting with the assessment of the source and nature of heart murmurs. The routine which presently requires the most work is the mumur isolation instrument. Results were inconsistent, with the instrument perfonning well in some cases but pooriy in others. This
was only preliminary work in a novel processing method, and further work is expected to

improve upon these results. Finally, the simulation of heart sounds on a PC provided assistance to the leaming and demonstration of heart sounds and the underlying pathologies fiom which they anke. Enthusiasm for the use of this program was already expressed. The distribution of this module as well as the othen described will be facilitated through distribution by way of the Intemet. Work with this system is continuing at the time of publication. The addition of heart sounds to

teaching packages at the Toronto Hospital will be made using the hardware and cornputer program modules set up as a part of this research. This enables both the hirther testing of program modules, the refinement of programs used and the continuation of research efforts.

7.2 Future Reseamh


There are a nurnber of future directions which may be proposed for this research. They may be grouped into three areas, which are program expansion, new analysis and the application of these techniques to related areas.

7.2. l Program
When assembling a prototype or mearch device, the methods used are often chosen and applied for flexibility and economical factors rather than eficiency of function. In application to software, this ofien means that programs run more slowly than afier intense efforts are made to streamiine programming. Being a hierarchical graphical windows prograrnming environment, LabVIEW exposed itself to this kind of abuse, as layer upon layer of potentially inefficient code was created. This layering effectively multiplies error and ineficiency. Such things as careful choice of data types, creative use of pmgrm structure and elirnination of excess functions goes a long way to honing the program into a more streamlined tool. External code may also be used to reduce run time by replacing poorly perfonning LabVIEW functions. Another area directly related to the program is the more extensive use of standard PC hardware. The SoundBlaster card is a very common device, with which most other brands are fully compatible with. As such, it would be an excellent source of input data and the reliance on expensive National Instruments hardware would be eliminated. For the purposes of the work outlined in this thesis, the dual channel analogue input is suficient. This program addition would greatiy increase the potential distribution of the program.

Finally, the advanced methods of moving data fiom the time domain to the frequency domain which were touched upon in Section 5.5, Spectral Analysis, may be explored frther. If further processing of the resultant spectral plot is made, this will become more important for accuracy and resolution purposes.

7.2.2 Analysis
Automation in terms of mumur detection and characterization could be added to the program. There is currently a number of articles which attempt to classify munnun based on a number of different parameters such as timing, length, fiequency content, relative amplitude and recording location variation. A larger study and classification of murmurs would be required for this type of addition to take place. Envelope averaging is another processing feature which is used for feature detection2'. It is a potentially valuable tool for assisting in the automation described above. Recording from multiple sources and providing a cornparison would add information. This would provide a basis for evaluation of the location of the pathology. Multiple simultaneous recordings would also form another important step in the detection automation process, since a knowledge-based computer decision process could be added based on physiological studies.

7,2,3 New Areas


The results of heari sound recording and analysis are ansferable to other areas of study which
utilize biological vibrations for obtaining physiological data. One such area is

phonoangiography46r47, which is the use of recording of ~ u n d of vibration relating to blood s vessels. This would be a natural area to adapt the constnicted program.

1 2 .
3.
4.

Levinson MM (1996)'The s c ~ sink' http://www.hsfo~m,com. b Stewart T, site adminisator (1996) 'Heart http://synapse.uah.ualberta.calsynapse/OOb 10000,htrn. Sounds' Synapse hblishhg

'Atlas of heart sounds and murrnurs' (1996) Cardiology Sounds & Images, Kansas University Medical Center h t t p ~ / w w w . k u m c . e d u / u i s t n i c t i o n ~ m e d i c i n e ~ Rangayyan RM,Lehner RI (1988) 'Phonocardiogram signal analysis: a review' Critical Reviews in Biomedicul Engineering 15(3): 2 1 1 -236. Fletcher H ( 1973)'Speech and Hearing in Communication' Robert E. Krieger Publishing Huntington, NY: 188. Tickner EG, Boyers D, Sacks AH (1976) 'A rnethod for detecting and quantiQing faint cardiovascular rnunnurs' Angiology 2 ( ) 443-446. 77: Feigen LP ( 1971 ) 'Characteristics of sound and hearing' The American Journal of Cardiology 28:
130-133.

5.

6 .

7 .
8.

Beyar R, Levkovitz S, Braun S, Palti Y (1984)'Heart-sound processing by average and variance physiologic basis and clinical implications' IEEE Transactions on Biomedical calculation Engineering BME-319: 59 1 -596. ()

9 .

King B, Showen MJ (1963) 'Human Anatomy and Physiology, Philadelphia:248. Book Medical Publishers Inc., Chicago.

srn Edition' W.B. Saunders,

10. Wanak J (1972)'Phonocardiology: Integrated Study of Heart Sounds and Murmurs: 4" Edition' Year

I I . Luisada AA, McCanon DM (1965) 'Functional bais of heart sounds' The American Journal of Cardio/ogy l6(5): 63 1 -63 3.
12. Sabbah HN, Stein PD (1976) 'Turbulent blood flow in humans: Its primary role in the production of ejection mumurs' CirculationResearch 38(6): 5 13-525,

1 . Rushmer RF,Morgan C (1968)'Meaning of mumiun' The American Journal of Cardiology 21: 7223 730,
I , 1 . Chin JGJ,Vermarin H, Van Hollenhoven E, Wang .N Koops J (1990) 'The origins of innocent 4 murmurs detected by esophageal phonocardiography' Acta Cardiologia 45(3): 245-248.

15, Stein PD (198 1) 'A Physical and Physiological Basis for the Interpretation of Cardiac Auscultation: Evaluations Based Primarily on the Second Sound and Ejection Munnurs' Futura PublrShing Company,Mount Kisco, N m York. 1 . Johnson GR,Adolph RI, Campbell D (1983)'Estimation of the severity of aortic valve stcnosis by 6 J fiequency analysis of the mumur' Journal o the American College of Cardiology l(5): 13 1 5-1323. f

Tavel ME (1985) 'Clinical Phonoardiognphy & Extemal Pulse Recording, 4" Edition' Yem Book Medical Publishers, Chicago. Fowler NO (199 1) 'Diagnosis of Hat Disease' Springer-Veriug, New York. er Johnson G (1994) 'LabVIEW Graphical Rogramming: Graphical Rogrammhg and Application Development' McGruw-Hill, New York. National Instruments (1995) 'National Instruments LabVIEW Graphical Programming for Windows: User Manual, Data Acquisition Manual, Virtual Instruments Library' National Imtruments, Atrsrin,
T,Y.

Moore J (1995) 'Artificial intelligence programming with LabVIEW: genetic algorithms for H instrument control and optimization' Cornputer Metho& and Progrums in Biomedicine 47: 73-79, O'Grady KF. Doyle DJ (1995) 'Characterization & evaluation of diastolic heart function using the LabVlEW signal processing environment' Journal of Clinical Engineering 20(4): 3 1 1-3 3 1 . Gulotta M (1995) 'Teaching cornputer interfacing with virtual instmments in an object-orientrd language' Biophysical Journal 69: 2 168-2 173. Kalkman CJ (1995) 'LabVIEW: A software system for data acquisition, data analysis and instrument control' Journal of Clinical Monitoring 11: 51-58. Baranek HL, Lee HC,CIoutier Ci, Durand LG (1989) 'Automatic detection of sounds and murmurs in patients with Ionescu-Shiley aortic bioprostheses' Medkaf di Biologicaf Engineering & Cornpuring 27: 449-455. Lehner RI, Rangayyan RM (1987) 'A three-channel microcornputer system for segmentation and characterization of the phonocardiogram' IEEE Transucrions on Biomedical Engineering BM E34(6): 485-489. Karpman L, Cage J, Hill C, Forbes AD, Karpman V, Cohn K (1975) 'Sound envefope averaging and the differential diagnosis of systolic murmun' American &art Jownal90(5):600-606.

Wood JC, Barry DT (1994) 'Quantification of first heart sound fiequency dynamics across the human chest walI' Medical & Biological Engineering & Computation 32: s7 1-s78.

Yoganathan AP, Gupta R, Corcoran WH (1976) 'Fast Fourier transfonn in the analysis of biomedical data' Medical and Biological Engineering 14(4): 239-244. Cohen L (1989) 'Time-fiequency distributions a review ' Proceedings o the IEEE 77(7): 94 1-98 1. f Tohyama M, Suniki H, Ando Y (1995) 'The Nature and Technology of Acoustic Space* Academic Press, London. Bonner AJ, Sacks HN, Tavel ME (1973) 'Assessing the severity of aonic stenosis by phonocardiography and extemal carotid pulse recordings' Circulafion 158: 247-252. Rice ML (1 994) 'Cornparison of phonocardiographic ncording techniques ' M.H.Sc- Thesis, University of Toronto.

Lang P (1995) 'Signal processing of the fun heart sound for cardiac performance monitoringT M A. Sc. Thesis, Unversiy of Toronto. .

Trahanias PE (1993) 'An approach to QRS cornplex detection using mathematical morphology' IEEE Transactionson Biomedical Engineering 40(2): 20 l-2OS. Baracca E, Aggio S, Ansani L, Mele D, Aubert AE, Longhini C (1990) 'Indirect estimation of rnyocardial stif i e s by a non invasive rnethod' Acta Cmdiologia 45(3): 1 95- 198. Mori T, Ohnishi N, Sekioka KTNakano T,Takezawa H (1986) 'Power spectrum of heart murmurs: special reference to mitral regurgitant munnurs' Journal o Cardiogruphy 16(4): 977-986. f Cohen A (1986) 'Biomedicai Signal Ptocessing Vol. 1 Time and Frequency Analysis' CRC Press, Boca Raton, FL. Padmanabhan V , Sernmlow IL (1994) 'Dynamical analysis of diastolic heart sounds associated with coronary artery disease' Annds o Biomedical Engineering 22: 264-27 1 . f Abelson D, Bernbaum D (1971) 'A simple method of recording hem sounds and rnumurs' The American Journaf of Cardiology28: 191 196.

Obaidat MS (1993) 'Phonocardiogram signal analysis: techniques and performance cornparison' Journal o Medical Engineering & Technofogy 17(6): 22 1-227. f Van Vollenhoven E, Van Rotterdam A, Dorenbos T (1969) 'Frequency analysis of heart murmurs' Medical and Biological Engineering 7 :237-23 2. Adolph RJ, Stephens JF, Tanaka K (1970) 'The clinical value of fiequency analysis of the first heart sound in myocardial infarction' Circulation 41:lOO3-1016.

Durand LG, De Guise I, Cloutier G, Guardo R, Brais M (1986) 'Evaluation of FFT-based and modem parametric methods for the spectral analysis of bioprosthetic vaive sounds' IEEE Tramuctions on Biomedical Engineering BME-33(6): 572-578.
Johnson GR, Myes GS, Lees RS (1985) 'Evaluation of aortic stenosis by spectral analysis of the munnur' Journal of the American Colfegeof Cardiofqy6(1): 55-63. Miller A, Lees RS, Kistler P, Abbott WM (1980) 'Spectral analysis of acterial bruits (phonoangiography): experimental validation' Cimdation 61(3): 5 15-520. Akay YM, Akay M, Welkowitz W, Semmlow JL, Kostis JB (1993) 'Noninvasive acoustical detection of coronary anery disease: a comparative shidy of signal processing methods' IEEE 7'rusaction.s on Biomedical Engineering 40(6): 57 1-578.

10. Additional Reading


Akay M (1994) 'Biomedical Signal Rocessing' A c d m i c Press, Sm Diego. Amon PI, Tavel ME (1984) 'Spectral analysis of heart sounds: relationships b e ~ e e n some physical characteristics and fkquency spectra of fim and second hem souch in nomas and hypmensives* Journal of Biomedical Engineering 6: 12 1 128.

Bauer S (1992) 'Online Cardiac Performance Monitoring uing Digital Signal Rocessing Techniques to Analyze the Inn-Operative Phonwardiograrn' Mmer o HeaIth Skiences Thesis, Universiy of f Toronto. Collier IR (1993) 'Application of a The-Frequency Analysis Tool to the First H m Sound' Master of e Fieaith Science Thesis, University of Toronto. Groom D ( 1970) 'Standardization in phonocardiography: the microphone pickup' CardiologV 55: 129135.

Harris TN, Friedman S. Tuncali MT (1964) 'Cornparison of innocent cardiac murmur of childhood with cardiac murmurs in high output state' Pedianics 33: 341-355. Hinze JO (1975) 'Turbulence, P Edition' M c G r ~ ~ , H iNY. ll~ Hotta S ( 1967) 'The mechanism of transmission of the cardiovascular sound: An experimental study of the conduction velocity of sound on the chest walI' Japanese Heart Journal 8: 3 54-368, Humphries JO, McKusick VA (1962) 'The differentiation of organic and "innocent" systolic murmurs' Prog. Cardiovascular Disease5: 1 52- 17 1 .

Kim ED (1 992) 'Phonocardiogram Signai Estimation ushg Wiener F i i t e ~ g '4" Year Electrical Engineering Thesis, Universis, of Toronto.
Lang P (1992) 'A General Tool for Computsr Based PhonocardiographicAnalysis' Engineering Thesis, University of Toronto.

#' Year Electricai

Luisada AA (1973) 'The Sounds of the Normal Heart' Warren H. Green, St. Louis, MS.

M x DF (1 995) 'Random Signal Processing' Prentice Hall, Englewuod Cl@, NJ i


Padmanabharn V, Sernmlow JL, Welkowitz W (1993) 'Accelerometer-type cardiac transducer for detection of low-level hem sounds' IEEE Transactions on Biomedical Engineering 4( 1): 2 1-28. Reynolds AJ (1974) 'Turbulent Flow in Engineering' John Wiley& Som, NY.
Sakai A, Feigen LP. Luisada AA (1971) 'Frequency distribution of the heart sounds i normal man' n Cardiovascular Research 5: 558-363.
Sava HP. McDonnell(1996) 'Spectral composition of hart sounds before and afier mechanical heart valve implantation using a modified Foward-Backward Rony's method' IEEE Transactions on Biomedicol Engineering 43(7): 734.742.

Stein PD, Sabbah HN, Blick EF (1975) 'Contribution of crythrocytes to turbulent blood flow' Biorheology 12: 293-299. Tavel ME, Brown DD. Shander D (1994) 'Enhanced auscultation with a new graphic display system' Archives of Internai Medicine 154: 893-898.

20. Tortora GJ, Grabowski SR (1993) 'Principles of anatomy and Physiology, 7h Edition' Hmper C o l h College Publishers, W.

2 1. Yellin EL (1966) 'Hydraulic noise in submerged and bounded liquid jets' Biomedicul Fluid Mechanics Symposium, ASME:209-22 1 .

11. Appendices
A. Utility Programs

Obtain Samples VI
Create Murmur File VI Modify Existing Data VI B. Hardware Specifications
C. Cornputer Program Details (these and other Vls on floppy disk in pocket): Heart Sound Simulator VI

Mumur Analyzer VI SeIective Auscultation VI Speed Factor VI


Signal Subtraction VI

Spectral Analysis VI
Add Mumur to Data VI

Change Speed and Frequency VI Change Speed without Frequency VI

Hear Sound VI Play Sound (new sound) VI

Zero Crossings VI
Cross Correlate V I Murmur Generator VI Get Murmur Data VI
Change Heart Rate VI

Appendix A: Utility Programs


In the creation of the program which was described in the main sections of this work, a number of utiliiy prograrns were made. In order to provide a more complete representation of the Murmur AnaIyzer program, these will be outlined briefly here.

1. Data Acquisition
A module was constructed which collected physiological or simulated signals through the National

fnstruments Lab-PC+ data acquisition card. This card provides a number of digital input channels, a digital to analogue converter for analogue output, and analogue to digital converter for analogue input. Only the last feature was used in this project, though in the event of a lack of a sound card, the analogue output could
be configured for use. This module was adapted

c r previous on

work done in the Advanced Clinical

Instrumentation Laboratory which runs under the guidance of Dr. D. John Doyle at the Toronto Hospital and lnstitute of Biomedical Engineering, University of Toronto.

Figure A. Obtain Samples V . Data acquisition fat subsequent off-line analysis was done using this program. I

2. Create Murmur File


One of the requirements for the Heart Sound Simulator is to have a file which contains information for the synthetic murmur. This data is stored as a single file in order to save the processing t h e which multiple file locations would entail. As such, a software routine was constructed to put dl of the selected component murmurs together. This is the Create Murmur File VI, and is a simple routine which may be used in the future for the addition of new sounds or the implementation of new data. For example, one cardiologist's comment was that most sirnulators do not sound Jike real patients. One way to ensure that the match between simulator and patient is to extract real patient segments for the construction of simulator segments. The panel for this VI is pictured below in Figure B.

Figure B. Create Murmur File VI. This program may be used to piece togethet recorded file segments for the assembly of new simulator murrnur data.

3. Modlfy Existing Data


Actual patient data is stored in LabVIEW dam files, and are stored in a manner prescribed by the nroeramrner- While it is mssible to use standard formats. such as s~readsheet files. this is often not the most

efficient method in tems of file sin, retrieval speed or simply of programming convenience. Each of these factors were reasons for the decision to store data in the LabVIEW format, One result of this is that standard programs may not be used to modi@ data. For exarnple, it may be desired to modiS, sound files extemally using a commercial software package. This necessitated the export into the appropriate format fkom LabVIEW files, then the subsequent importation of those files so that they may be used in the program again. This transfer between formats is facilitated by the ModiQ Existing Data VI, which is another utility routine which may be used in conjunction with the Mwmur Analyzer,

Figure C. ModiQ Existing Data VI. This program allows the modification of standard LabVIEW tiles used in the Murmur Analyzer prognm.

Appendix B: Hardware Specifications

ogo

4 Channel Amdifier
~ h unit i a four chuuiel mpUw which wu deriqaed bv the Mediail e s aweenng kpartment ofthe Toronto Hospital to D .D John Doyle's rpeaSCIItions. It r . ; ( certGied to the LSA ~ 3 2 . 2 *; standard !Or dcctromedica devices to Clus 2. The particul~n.. AU four chuuids u M t aucily the same. The cbip which is urcd for .. t ~npiiiication Analog DMce's m d d 2B30 which u h& ptdo~llbllll~~,cost. is ti low compact signil conditionhg modules de9gned rpffitiully for bigh acamcy i n t d h e to stmin gage-type transducen. Tbtre chips c0nSst of thr miia d o n s : r high qwty instnunentation unpliner, i thrcx-pole low pur filter, and rn distable traducct excitation.
Settiy the Gaia

where:

Rg input nriffor (one cbooses see F i v ) = Variable 10 H &or (see Filpin) Z

For a gain of 1 the rquittd Rg is 88.763 Q, for wliich an 88.7 n(Grey, Gny, Ruple, B u Brown, Red.

The varirble adjustment Rp cm be rdjustd to h e nuit the gain to the deand value.

Output OMt Adjurtwot

The output of the 2B3 1 chip cm k immtiody o f f ! h m oao by rdj-8


potcntiomaer.

the 50 M

he three pole low pas f i l t r provides low-pas B d - t y p s churcteristiu ofmiaunurn overshoot response to s inputs and r hrt rire time ud has r 60 d B / d d e roll o E b m t q 2 l . Thc aitoKCtqtuq (-3 dB) is fictoiy set aZk&ait miy kincrased up to 5 k

kHz by the addition of zhrec uaad rrristoir. Fut conmm cutoff (-3dB) fiequencier the 1% b1 vaiues are givcn in the followuig uble.

For other desind cutoff fiequencies (Q, the mistor values u be caidud firom the n
foUowing equations:

whete hiis in ohms and 4 is in H . z

Appendix C: Cornputer Program Details


Refer to floppy disk in thesis cover pocket.

You might also like