Internationalof Computational
Intelligence
Systems
Journal ofJournal
Robotics,
Networking andArtificial Life
Vol. XX(Z);Month(Year),xx–yy6(4); March(2020),
pp.pp.
250–253
DOI: 10.1080/XXXXXXXXXXXXXX; ISSN
online
DOI: https://doi.org/10.2991/jrnal.k.200221.006;
ISSNXXXX–XXXX
2405-9021; eISSN
2352-6386
https://www.atlantis-press.com/journals/ijndc
https://www.atlantis-press.com/journals/jrnal

Research Article

Design and Development of a Virtual System for Measurements
and Analysis of the Respiratory Sounds for Diagnosis of
Respiratory System
Ali S. AlMejrad*
Biomedical Technology Department, Applied Medical Sciences College, King Saud University, P.O. Box 10219, Riyadh 11433, Kingdom of Saudi Arabia

ARTICLE INFOABSTRACT

Article History

Respiratory problem is one of the most common health problems occurring in Saudi Arabia due to the continuous changes of
the weather in addition to surface winds that cause dust during all seasons yearly. The most affected people especially children
and elderly in addition to the adults with respiratory problems such as asthma. Such problem needs emergency care as soon as
it occurred. The goal of our research is to develop a compact respiratory diagnostic system using advanced signal processingthat can be used remotely via the virtual instrumentation technology to help accurately diagnosis at early stages of respiratory
diseases. It can also overcome the lack of expert physicians in rural regions and some urban clinics or health centers. The
proposed system will be implemented using Virtual Instrumentation (VI) that consists of computer, microphone with simple
analog circuit, digitizer and LabVIEW software. VI has been designed for easy measurement and analysis. In addition to that, it
has features and ability to control the whole system of acquisition, play, display, processing and advanced analysis of the different
acquired respiratory signals. Respiratory signals obtained from our system are analyzed for diagnosis purposes using advanced
signal processing techniques to the analysis of respiratory parameters using time and frequency domains. The obtained results
can be displayed and printed in a report format including acquired respiratory signal, filtered signal, extracted segment for
selection of phase, power spectral density, and analyzed respiratory parameters for diagnosis purpose. The developed system issuccessful and achieved its purpose based on the tests performed with real respiratory signals of normal and abnormal cases thatproved to be efficient system while dealing with many respiratory problems conditions.

Received 20 November 2019
Accepted 15 December 2019
Keywords
Respiratory diseasevirtual instrument
signal processing
power spectrum© 2020 The Authors. Published by Atlantis Press SARL.
This is an open access article distributed under the CC BY-NC 4.0 license (http://creativecommons.org/licenses/by-nc/4.0/).

1. INTRODUCTION
Respiratory problem is one of the most common health problems
occurring in Saudi Arabia due to the continuous changes of theweather in addition to surface winds that cause dust during all
seasons in the year. The most affected people especially children
and elderly in addition to the adults with respiratory problems
such as asthma [1,2]. Such problem needs emergency care as soon
as it occurred.
To diagnose these problems affecting the respiratory system, different methods and devices have been used. One of the widely usedmethods is auscultation of lung sound using stethoscope invented
in 1816. It is cheap, easy to use and noninvasive but it is less accurate due to limitation of human ear which cannot distinguish thecontents of mixed respiratory signal in addition to low signal tonoise ratio due to deficiency in analyzing such signal [3,4]. Manytechnologies of other methods and devices based on computer
technology have been developed for improving the monitoring andquantitative analysis of respiratory sounds [5].
Corresponding author. Email: amejrad@ksu.edu.sa*

Analysis of one cycle of respiratory sounds consisting of threephases, inspiration, respiration pause, and expiration quantitatively depends on the recording site of the respiratory system.
The common three recording sites are the mouth, trachea andchest wall. The respiratory sounds are classiﬁed as normal or
abnormal called adventitious. The respiratory sound heard on
the chest wall of a healthy person is called normal respiratory
sounds. The adventitious sounds are classified as two classes
continuous and discontinuous. Continuous sounds are wheezes
and rhonchi [6].
The spectral analysis is one of the important techniques used [7].
This method will help in displaying quantitative respiratory information that is of great importance to help in the clinical assessmentof respiratory system for distinguishing between healthy and diseased respiratory system [8].
Today, most of the physicians already have computers whichconnected to the network and Internet that allow them to work
remotely. For most physicians, a system dedicated to one task andlocal use is not practical. The goal of our research is to develop a
compact diagnostic respiratory system using advanced signal processing that can be used remotely via the virtual instrumentation

A.S. AlMejrad / Journal of Robotics, Networking and Artificial Life 6(4) 250–253

technology to support diagnosis at early stages of respiratory diseases. It can also overcome the lack of expert physicians in rural
regions and some urban clinics or health centers.

2. MATERIALS AND METHODS
2.1. Hardware
The system hardware is composed of dedicated microphone,
Analog to Digital Converter (ADC) interface card and a Personal
Computer (PC) containing a VI which is implemented based on
LabVIEW software (National Instruments Inc.) (Figure 1).
The respiratory signals were recorded from subjects using dedicated microphone. To minimize the background noise, theampliﬁcation gain was set to obtain a clean spectrum on the spectral display. The audio output of analog circuit unit is sampled at
11,025 Hz with 12-bit resolution and then transferred to a PC via
the interface card [9].

2.2. Software
A compact program, Virtual Respiratory Measurements andAnalysis System (VRMAS) is designed and developed basedon the hardware described above using the graphical programming language. To develop VRMAS software a state diagram isused which consists of self-produced four modules without theneed for any external add-ons. The main modules of VRMAS
are acquisition of the audio respiratory signal, advanced signal
processing of acquired or simulated respiratory data, analysis ofrespiratory data and finally the printing and help tools as shownin Figure 2. Using the main module of VRMAS, the user will beable to control the whole system of acquisition, play, display, processing and advanced analysis of the different acquired in vivo
clinical real data.

2.3. Respiratory Signal Processing
Techniques
Many spectral methods have been used for signal analysis. Thesemethods are classified as nonparametric such as Fast Fourier
Transform (FFT) and parametric such as Autoregressive (AR) [10].
For their specific features, both methods will be applied in oursystem to investigate the influence of spectral analyses of respiratory signals in normal and abnormal cases.
Fast Fourier transform spectrum is calculated using usually either
the Blackman Tukey or periodogram method. While AR spectrum is calculated by fitting the selected order of AR model into
our respiratory signal data. The AR spectrum is obtained from theestimated AR model parameters which are solved using a forward–
backward least squares method. To choose the appropriate modelorder, a compensation for the over-parameterizing is required.
Akaike Information Criterion (AIC) is considered for model order
estimation used is with order of 5 based on the literature and studies of Respiratory signals [11].

3. RESULTS OF SOFTWARE APPLICATION
AND DISCUSSION
Virtual respiratory measurements and analysis system software isdesigned as shown in the flowchart in Figure 3. Acquired respiratory data can be recorded and saved in files in different format fordata analysis. All modules are called from VRMAS main module as
described in the following sections.

3.1. Acquisition and Recording of
Respiratory Signals
Acquisition and recording of respiratory signals from normal andabnormal cases, as digitized by DAQ card are displayed and also
can be saved if required. The sampling frequency and recording
interval can be adjusted using acquisition setup. In the system control module, the Respiratory signal can be recorded both in txt andwav file formats. In Figure 4, shows GUI of VRMAS showing a case

Figure 1 | Block diagram of computer-based respiratory system.

Figure 2 | Graphical user interface (GUI) and front panel of developed
virtual respiratory measurements and analysis system.

251

Figure 3 | Flow chart of VRMAS software.

252

A.S. AlMejrad / Journal of Robotics, Networking and Artificial Life 6(4) 250–253

3.5. Spectrum Analysis

Figure 4 | GUI and front panel of developed system.

In this module, linear or log spectrum output with unit for the spectrum can be selected either as amplitude spectral density or power
spectral density. To eliminate the spectral leakage during computing
power spectrum, any window type can be selected from the list of
many well-known window types. In this case shown a 1024 point FFT
is applied with window function. In the other hand AR is designed
to be used for comparison to search the best method for diagnosis of
diseases. AR modelling requires some parameters to select based on
the model chosen. To select the best order, one tool of our system formodel order selection has been built using AIC technique as shownin Figure 7 for example of acquired crackle respiratory signal.
The results of spectral analysis using FFT and AR obtained using
the selected order are shown in Figure 8. It is clear the best smooth
performance using AR method of Figure 8b compared with FFT
method of Figure 8a.

3.6. Spectrogram Analysis
Figure 5 | Filtered normal vesicular respiratory signal acquired from
respiratory system.

A spectrogram is a visual representation of sound as shown in
Figure 9 which represents respiratory spectrogram of a crackle finerespiratory signal. When it is shown higher on the display means
higher sound. The colors of the spectrogram at any point corresponds
to relative intensity of the sound at particular time and frequency
at that point. Spectrogram provides more information because it is

Figure 6 | Analysis of respiratory signals window’s setup.

study of one cycle of inspiration and expiration of normal vesicularrespiratory signal.
Figure 7 | Model order selection using AIC of crackle fine respiratory signal.

3.2. Reading of Respiratory Data from a File
Recorded respiratory signal data is loaded for time or frequency
analysis. The reading of respiratory data from file VRMAS module
after filtering is shown in Figure 5.

3.3. Displaying and Playing of
Respiratory Signals
As respiratory audio date is read from the file, respiratory signal isplaying using computer sound card.

3.4. Analysis of Respiratory Signals
Virtual respiratory measurements and analysis system has three
analysis modules, spectrum analysis, spectrogram analysis andrespiratory parameters analysis that can be set up as shown in
Figure 6. They will be discussed in the following subsections below.

Figure 8 | (a) Spectrum analysis of a crackle respiratory signal using FFT
and (b) AR using model order of 4.

A.S. AlMejrad / Journal of Robotics, Networking and Artificial Life 6(4) 250–253

253

CONFLICTS OF INTEREST
The author declares they have no conflicts of interest.

ACKNOWLEDGMENT
This work is supported with my great appreciation to the Deanshipof Scientific Research and the Research center of College of Applied
Medical Sciences at King Saud University.
Figure 9 | Spectrogram of a crackle respiratory signal.

based on actual measurements of the changing frequency content ofa sound over time. As shown in Figure 8 below the color table on theright side that can be changed from many options if desired.

3.7. Report Printing
The obtained results can be printed in a report format to be used byclinician as a reference for diagnosis purposes.

4. CONCLUSION
In this development work, a simple respiratory measurement withsignal conditioning and ADC interfacing in addition to advanced
digital signal processing software tools are used to develop our
virtual respiratory system on computer which can work remotely.
The hardware used was as standard as possible. This compositionof components reduced the cost and minimized specialized andexpensive hardware. The digital signal processing algorithms weredeveloped to build virtual implementation of instrument that will
enable us easily to modernize and upgrade our system by changing
simply the software algorithms. Hence, clinician will get the up-todate system to work with, taking in consideration capital and time
resources. Our main features of our developed system discussed inthis paper are flexibility, low cost and future improvement.
The developed system has been tested with real normal and abnormal respiratory signals and proved to be efficient system while
dealing with many different conditions.

AUTHOR INTRODUCTION
Ali S. AlMejrad
He received the B.Sc. with first honour inElectrical Engineering from King Saud
University, Kingdom of Saudi Arabia,
M.Sc. in Bioengineering from Strathclyde
University, UK in 1987 and 1990, respectively; and the PhD in Medical engineeringfrom Edinburgh University, UK, in 1996.
He is currently an Associative Professorof Medical Engineering and Instrumentation in Biomedical
Technology in Applied Medical Sciences College, KSU, KSA.
His research interest includes Development of Biomedical
Instrumentation and Intelligent Systems for Health Care using
advanced Technologies. He is a member of IEEE and IPEM.

REFERENCES[1] https://www.moh.gov.sa/en/HealthAwareness/EducationalContent/
Diseases/Chest/Pages/001.aspx.
[2] https://www.pme.gov.sa/ar/Pages/default.aspx.
[3] N. Gavriely, M. Nissan, A.H. Rubin, D.W. Cugell, Spectral characteristics of chest wall breath sounds in normal subjects, Thorax
50 (1995), 1292–1300.
[4] F. Dalmay, M.T. Antonini, P. Marquet, R. Menier, Acoustic properties of the normal chest, Eur. Respir. J. 8 (1995), 1761–1769.
[5] A.R.A. Sovijarvi, J. Vanderschoot, J.E. Earis, Standardization ofcomputerized respiratory sound analysis, Eur. Respir. Rev. 10(2000), 585–598.
[6] A.R. Sovijarvi, L.P. Malmberg, G. Charbonneau, J. Vandershoot,Characteristics of breath sounds and adventitious respiratory
sounds, Eur. Respir. Rev. 10 (2000), 591–596.
[7] S.M. Kay, Modern spectral estimation: theory and application,
Prentice Hall, 1988.
[8] L.P. Malmberg, A.R.A. Sovijärvi, E. Paajanen, P. Piirilä, T.
Haahtela, T. Katila, Changes in frequency spectra of breath soundduring histamine challenge test in adult asthmatics and healthy
control subjects, Chest 105 (1994), 122–131.
[9] L. Vannuccini, J.E. Earis, P. Helisto, B.M.G. Cheetham, M. Rossi,
A.R.A. Sovijarvi, et al., Capturing and preprocessing of respiratory sounds, Eur. Respir. Rev. 10 (2000), 616–620.
[10] F. Castanié, Spectral analysis: parametric and non-parametricdigital methods, John Wiley & Sons, 2006.
[11] J. Vanderschoot, N.G.J. Kappeyne van de Coppello, H.J.W. Schreur,
AR model orders of lung sounds, Proceedings of the 1992 14th Annual
International Conference of the IEEE Engineering in Medicine andBiology Society, IEEE, Paris, France, 1992, pp. 2531–2532.