Keywords

1 Introduction

The development observed in technology and science leads to the creation of new applications, such as telemedicine aimed at medical data sharing to improve health care (see [1]). The urge for improvement and digitization of existing diagnostic methods constantly arises. Not only individual fields of science have been undergoing noticeable progress but also new, cross-disciplinary sciences such as biomechanics or bioelectronics have evolved. What should be noted is that proceeding digitalization of information made some of the commonly used methods of medical diagnosis insufficient in specific situations. This, in turn, imposed the improvement of existing passive medical devices in order to either amend the quality of diagnosis or use the aforementioned devices in new situations.

Sound plays an important role in diagnosing numerous disorders occurring in human body (see for example [2]). Sound waves used in medical examination are either generated by external source (e.g., ultrasounds) or created by organs such as the heart, lungs or bowel as well as by movement of bones in joints. Listening to the sound generated by a human body is called an auscultation and most commonly is conducted with the aid of devices called stethoscopes.

  1. A.

    The heart

One of the most frequently examined and most crucial organs that can be subjected to an auscultation is the heart.

The importance of proper diagnosis of heart (cardiovascular) diseases can be explained by taking into consideration the data of the World Health Organization (WHO). According to Global Health Observatory (GHO) being a part of the WHO (see [3]), cardiovascular diseases are the major cause of about half of all deaths in Poland, considering noncommunicable diseases (NCDs)––chronic diseases that cannot be passed to other person. It gives about 180,000 deaths annually. Taking the problem globally––3 in 10 deaths, this is ca. 17.5 million (in 2012), result from CVDs.

The heart has four chambers––two atria located in its upper part and two ventricles in the lower one (see Fig. 1). The main task of the atria is to receive the blood delivered to the heart by large veins and then pass it to the ventricles. Ventricles are the heart’s pumps that keep the blood flowing around the body by means of ejecting the blood to the arteries (see for example [4]).

Fig. 1
figure 1

Internal anatomy of the heart (anterior view) (from Texas Heart Institute website)

At each atrium–ventricle as well as ventricle–artery interface a two or three-leaflet fibrous valve can be found which is responsible for ensuring the one-way flow of blood and preventing its reflux.

Heartbeat is triggered by heart’s conduction system consisting of nodes and fibers propagating electrical impulse. The electric shock causes contraction of the heart at the average pace of 70–90 beats per minute. The condition when the heartbeat exceeds 100 bpm is referred to as ‘tachycardia’, and when the heart beats at the pace lower than 60 bpm, ‘brachycardia’ is said to occur (see for example [4]).

During heart contraction (referred to as ‘systole’) and relaxation (diastole) the closure of the valves accompanied by contraction of particular areas of the heart leads to turbulent flow of blood that during auscultation corresponds to a specific ‘lub-dub’ sound. The first of these two major heart tones (see Fig. 2), termed S1 (‘lub’), is caused by the closure of mitral and tricuspid valves while the second, S2 (‘dub’), by the closure of pulmonary and aortic valves (see for example [4, 5]). The aforementioned tones are easily distinguishable since they differ in frequency and duration: S1 lasts for 140 ms and its frequency equals to 35–50 Hz while S2 lasts for 110 ms and has higher frequency––50–70 Hz. In children and adolescents, the third tone, S3, is also present. What is also worth mentioning is that heart sounds usually fall within the range of 20–650 Hz; however, it has been proved that the most diagnostically crucial are those between 70 and 120 Hz [6].

Fig. 2
figure 2

Normal and abnormal heart sounds (related to different disorders) with S1–3 sounds during heart cycle [7]

Abnormalities in the functioning of the valves can be noticed by the analysis of the heart tones. If some dysfunction is present, the amplitude of the sound changes as well as extension or splitting of the tone can be observed. What is more, also heart murmurs of the amplitude often comparable to the one of S1 and S2 tones are noticeable [5].

  1. B.

    Stethoscope history

The first stethoscope was created in 1816 by a French physician, René Théophile Hyacinth Laennec (see for example [811]) and revolutionized the auscultation by introducing its mediate form, this is by eliminating the need of placing one’s ear directly on the chest of a patient. Employing an auscultation instrument improved also the quality of the sound coming to the doctor’s ears. The device presented by Laennec was a wooden hollow tube with detachable brass-based chest piece and differed significantly in form from the stethoscopes used nowadays.

The design of Laennec’s stethoscope has undergone a number of modifications initiated in 1828 by Pierre Piorry, who changed the shape of this medical device to trumpet-like. One of the most revolutionizing redesigns––changing the instrument from mono to binaural was introduced in 1840s. The new device was made of two bent pipes connected to the wooden chest piece. Elastic rubber tubing was presented in 1851 by Arthur Leared, however, the first commercially useable stethoscope was created a year later, in 1852, by George Camman.

Apart from the aforementioned, modifications covered various improvements of the chest piece, including introduction of the diaphragm (1851, Marsh), combined bell-diaphragm (1925, Sprague) as well as dual-frequency chest pieces (late 1970s, Littmann).

Nowadays, two major types of stethoscopes are used by physicians. In the so-called Y-tube stethoscope a single tube is connected to the chest piece and then branched into two, where each of the branches is ended with an earpiece. In the second type of the stethoscope, Sprague Rappaport-type, each earpiece is connected to the chest piece by means of separate tubes. The tubes are held together by metal clips.

The present development of the auscultation instruments is mostly based on finding better materials and improvement of the acoustics which follows better understanding of sound conduction. Apart from this, electronic stethoscopes have been developed which allowed for recording the sound and its further processing and analysis. Features of electronic stethoscopes facilitate training of new doctors as well as expand telemedicine abilities by possible saving and sharing auscultation results (see for example [1214]).

The main objective of this article is to present the proposition of practical solution of the stethoscope characterized with the function of recording and play back the sound of, among others, the heart or lungs accompanied by the proposition of analysis and interpretation methods of acquired recordings.

2 Construction of the Electronic Stethoscope

An ordinary Sprague Rappaport type stethoscope was employed for the purpose of developing the electronic stethoscope and was dedicated for redesign. Both of the tubes were cut off at the distance that enables comfortable grip and use of the chest piece (approximately 6 cm from the chest piece) (see Fig. 3).

Fig. 3
figure 3

Prototype of the electronic stethoscope

In order to reuse the binaural of the stethoscope the Y-connector was used. One of its branches was put into one of the elastic tubes connected to the chest piece. The other two branches of the Y-connector were connected to the tubes of stethoscope’s headset. The second tube of those permanently linked with the chest piece was supplemented with the electret microphone. The microphone followed by a shielded cable and a mini jack connector enables connecting the stethoscope to the computer by means of sound card’s microphone input. Such a redesign gives a possibility to easily implement a microphone in commonly used classical stethoscopes.

3 Advantages of the Construction

Presented solution has an important advantage: it allows auscultating and, at the same instance, observing recorded signals on the computer by means of time–amplitude plot or spectrogram (see Fig. 4). For this purpose, a dedicated program developed in LabVIEW environment is used. Alternatively free (GNU license) software––Thinklabs Phonocardiography can be also employed. In both of the programs it is possible to record and analyze the signal after auscultation. Observation of plots during blood pressure test based on the Korotkoff method (see Fig. 5) allows to obtain more precise results comparing to ordinary auscultation. Thus, such a construction has also a didactic purpose––it is possible to record signals and play them back in the class in the real time or post process them after auscultation. In addition, as it was mentioned in Sect. 2, each type of stethoscope can be supplemented with an electret microphone.

Fig. 4
figure 4

Filtered signal acquired from the stethoscope during heart auscultation, time–amplitude plot, spectrogram

Fig. 5
figure 5

Raw signal acquired from the stethoscope during blood pressure test (Korotkoff sounds), time–amplitude plot, spectrogram

4 Professional Electronic Stethoscope

To verify the recording’s quality, a professional middle-class electronic stethoscope was used. It provides audio recording feature and also (not real-time) transferring the audio file to dedicated software through PCs IrDA (infrared) communication port.

Two reference sounds were prepared. Sound of silent to check the noise level and professional 150 Hz reference source (RTF Elektrodynamischer Eichtisch 11032). This frequency is in the range of real heartbeat sounds. Mentioned sounds were recorded using both stethoscopes. The recordings were then analyzed using Audacity audio software (GNU license), including waveform, offset, and FFT analysis.

Basic waveform analysis showed that the professional stethoscope records sound with low sampling frequency (only 8 kHz) while the construction proposed in this paper can record the sound with sampling frequency up to 96 kHz. In typical medical practice, high sampling frequency is not important. It matters in some hiss detection in lungs, detailed heart valves analysis and also in accuracy of automatic heartbeat parameters detection algorithms.

Figure 6 presents FFT plots of silence recordings using both stethoscopes. The noise level of about −50 to −80 dB for both microphones is acceptable as for nonprofessional audio recordings. This level depends on the place where the sound is recorded as well as on the environment sounds. Some frequencies can be selected as louder in both stethoscopes, but it will not stand out stronger than in other one.

Fig. 6
figure 6

Comparison of FFT analysis of silence recordings

Figure 7 shows similar FFT analysis but of 150 Hz reference sound recordings. Both stethoscopes record this frequency perfectly, but the professional one records 78 Hz at maximal dB level and 157 Hz in a set of higher harmonics. It should be emphasized that this inaccuracy is negligible in same basic analysis but plays an important role in more advance measurements when high frequency sounds should be detectable correctly.

Fig. 7
figure 7

Comparison of FFT analysis of recorded reference 150 Hz sound (marked by vertical dashed line)

5 Acquisition and Analysis Software

Originally developed software was created in National Instruments LabVIEW package to record and analyze the signal from the stethoscope or previously recorded audio files. The key implemented features include: acquisition of the sound with simultaneous monitoring; replay mode; amplitude normalization; signal filtering; graphical representation of the signal; automatic peak detection; and heartbeat frequency analysis.

Additionally, it is also possible to simultaneously measure and analyze other biological signals, e.g., blood pressure level, using dedicated sensor and acquisition hardware, not presented in this paper.

Acquisition algorithm is based on the standard LabVIEW Sound Input/Output Vis (Visual Instruments) that uses Microsoft DirectX system libraries. Sound card driver sends raw data to the LabVIEW where the signal is properly conditioned, filtered, and stored in chosen audio file (in WAV format). This part of the program shows Fig. 8.

Fig. 8
figure 8

LabVIEW acquisition, filtering and recording algorithm

Similar procedure is followed in record and monitor mode. Audio data is stored in the file and simultaneously sent to the sound card driver.

Replay mode reads WAV audio file from the hard drive. Recorded signal is played back and also showed as a waveform plot.

  1. A.

    Filtering modes

A user can chose between several filtering modes:

  1. (i)

    original mode—no filtering is applied, the user hears exactly what the microphone collects,

  2. (ii)

    heart 1 mode—applies band-pass filter with cut off frequencies equal to 20 Hz and 650 Hz which determine the range of heart sounds frequency,

  3. (iii)

    heart 2 mode—applies band-pass filter with cut off frequencies equal to 70 and 120 Hz; the passband is equal to the frequency range of the most crucial heart sounds,

  4. (iv)

    lungs 1 mode—band-pass filter applied in this mode passes the frequencies lying in the range 70–2000 Hz corresponding to the literature frequency range of lung sounds,

  5. (v)

    lungs 2 mode—band-pass filter passes the frequencies from 200 to 600 Hz range––this is from the range carrying the most of diagnostically important information,

  6. (vi)

    Korotkoff mode—20–50 Hz frequencies are passed by the band-pass filter.

What is more, the amplification of the signal can be set by rotating the knob. Change of parameters results in immediate change of the output.

  1. B.

    Automatic heartbeat analysis

Created software analyses recorded mono audio material with standard parameters of sampling frequency 44,100 Hz but it can be adapted to different sound qualities. Additionally, recording with proper SNR (signal-to-noise) parameter is required. If the noise amplitude is too high, there is no guarantee that the analysis will be correct. Good quality of the microphone, preamplifier, and sound card is in this case significant. The automatic analysis of heartbeat sound signal is realized in six steps

  1. (a)

    selecting part of the signal to be analyzed;

  2. (b)

    selecting peak detection minimal value and minimal peak width;

  3. (c)

    automatic peak detection using LabVIEW Peak Detector VI, that finds S1 and S2 peaks in whole selected sample;

  4. (d)

    separating proper S1 and S2 peaks;

  5. (e)

    calculating period between each successive S1 and also S2 peaks;

  6. (f)

    calculating mean values, standard deviations, and drawing plots of the period versus time.

Parts of the program (steps of calculation) are presented in Fig. 9. The first part (a) depicts automatic peak detection VI, which creates an array of time positions and values of each found peak. This data is filtered (b) to delete some noise peaks between S1 and S2. Two consecutive peaks are treated as correct if time gap between them is greater than delta variable. This step creates three arrays: numbers of correct peaks, correct peaks values, and its time position. Assuming that only S1 and S2 peaks passed the filtering algorithm, odd and even data are separated (c) to two arrays containing S1 and S2 peaks time positions. Periods are also calculated in this step. After that the mean value and standard deviation are calculated.

Fig. 9
figure 9

a Peak detector VI and its configuration, b cleaning-up unwanted noise peaks, c selecting proper S1 and S2 peaks

  1. C.

    Graphical User Interface

The user interface of created program consists of (see Fig. 10):

Fig. 10
figure 10

Graphical user interface of the LabVIEW analysis software

  1. (i)

    text field with file open dialog box to select WAV audio file from the computer memory;

  2. (ii)

    normalized waveform plot of loaded WAV file, amplitude versus time;

  3. (iii)

    two sliders to select starting and ending time position of the analysis sample. This feature is helpful if the loaded audio material contains irrelevant data at the start or at the end;

  4. (iv)

    the similar plot after trimming and automatic peak detection procedure, amplitude versus time. A red horizontal line is used to trigger minimal amplitude level to be detected during analysis;

  5. (v)

    two plots showing peaks S1 and S2 periods versus period number to present stability of the heartbeat period during each heartbeat;

  6. (vi)

    the user can also trigger minimal time interval between peaks to omit irrelevant noise peaks placed between S1 and S2, etc.;

  7. (vii)

    the results, mean value and standard deviation are shown for each S1 and S2 and mean value for whole heartbeat period.

6 Algorithm Verification

To verify if the S1 and S2 peaks are detected correctly, simultaneous sound acquisition and ECG measurements were performed. According to Wiggers diagram presented in Fig. 11, the first audio peak should be detectable at the same time instant as the beginning of the first peak in ECG. S2 peak starts nearby (i.e., right after) the second maximum on the ECG plot. The third peak is not detectable.

Fig. 11
figure 11

Wiggers diagram. (part of Wiggers_Diagram.svg from Wikimedia, CC 2.5 licence)

Presented comparison (in Fig. 12) shows the correspondence of the obtained results to the aforementioned theoretical assumptions and positively verifies the measurement method.

Fig. 12
figure 12

Comparison of ECG (electrocardiograph) electrical signal and recorded stethoscope audio signal

7 Results

An exemplary analysis and results were performed on typical, normal heartbeat signal recorded for one person, using presented stethoscope supplemented with electret microphone and is showed in Fig. 13. One can see S1 (lower amplitude), S2 (higher amplitude) peaks, and barely visible S3 in several periods.

Fig. 13
figure 13

Recorded heartbeat signal

Figure 14 depicts waveform signal after processing. Horizontal line (just above zero) shows minimal amplitude value that is used for the detection of each peak. Additionally, peak detector width variable sets precise limit to the width of every peaks to be detected. Each qualified peak is marked with small dot above its time position.

Fig. 14
figure 14

Recorded heartbeat signal, peak minimal detected value (horizontal line just above zero) and detected peaks (points just before each peak)

For this paper seven volunteers were examined by stethoscope auscultation and, in addition, one was examined by simultaneous measurement with professional ECG system. ECG comparison results were presented in sixth section. Resulting duration of the recording, detected heart beats, mean values of intervals between them, and its standard deviations for all analyzed audio signals are presented in Table 1. Mean values are repetitive, which is correct as for the recording of persons with no diagnosed heart diseases. Generally, in healthy adults the heartbeat range covers 60–90 beats per minute [15] which correspond to about 0.66–1.0 s-long periods. Relatively high value of the standard deviations can suggest an arrhythmia.

Table 1 Results of automatic heartbeat analysis

During construction and testing of the electronic stethoscope the following observations were made:

  1. (i)

    It is very important to use high quality microphone capable of low frequencies recording. Furthermore, both mechanical and electronic parts should be also of good quality.

  2. (ii)

    For the purpose of automatic peak detection algorithm higher (more than standard 44,100 Hz) sampling frequency of the recording gives better results. If the frequency is too low, detected peaks positions can increase standard deviation value.

  3. (iii)

    The system should be resistant to different types of interferences (including electrical ex. net signal and mechanical ex. noise from the environment). This requirement can be met by proper grounding and shielding of the electrical circuits.

  4. (iv)

    Computer power supply type as well as its general condition influences the output by means of generating electrical noise.

  5. (v)

    The user should avoid positive feedback during simultaneous auscultation and play back of the sound through speakers.

  6. (vi)

    S3 sound peaks were sometimes visible on the plot but were barely audible.

  7. (vii)

    Playback of the recordings requires a speaker set including subwoofer due to low frequencies that usually are not transmitted through computer’s built-in speakers. Headphones can be also used.

  8. (viii)

    LabVIEW package is powerful software for this type of application. Additional specialized hardware and plugins for sound recording and analysis are also available.

8 Concluding Remarks

Taking all the results into consideration, several conclusions can be drawn. First of all, electret microphones connected to computer sound cards can be used for biological sounds acquisition. It has been shown that the electronic stethoscope can be successfully used for acquisition of heart, lung, and Korotkoff sounds. It can be also stated that an electronic stethoscope can be used in telemedicine to record, analyze, and share medical data or for educational purpose to record, play back (in real time), and real-time presentation of the graphical results during normal auscultation during a class. What is more, real-time filtration of the signal improves the ability of recognizing sounds. Commercial electronic stethoscopes are available on the market but their advantages over presented simply modified normal stethoscope are significant only when the expensive dedicated software is used. In general, the comparison of the presented device with a commercial one showed that the noise level in both devices is comparable and both of them properly detect the reference frequency. However, the commercial stethoscope detects the reference frequency in a set of higher harmonics while the device being the subject of this paper records this frequency at maximal dB level. Last but not least, the system enables to record the sound with much higher sampling frequency than the used commercial product and this fact can be meaningful in detailed heart and lungs analysis.

Additionally following modifications are planned:

  1. (i)

    Redesign of the stethoscope in such a manner that it will be possible to operate with or without the cable.

  2. (ii)

    Adding a preamplifier to minimize the interferences on the way microphone–computer and filter out unwanted frequencies before post processing.

  3. (iii)

    Testing the system with physicians and patients with already diagnosed disorders resulting in change of sound waveform.

  4. (iv)

    Testing better preamplifiers and microphones with higher audio quality to eliminate more noises from the recording process.