High-Resolution Time-Frequency Spectrum-Based Lung Function Test from a Smartphone Microphone

In this paper, a smartphone-based lung function test, developed to estimate lung function parameters using a high-resolution time-frequency spectrum from a smartphone built-in microphone is presented. A method of estimation of the forced expiratory volume in 1 s divided by forced vital capacity (FEV1/FVC) based on the variable frequency complex demodulation method (VFCDM) is first proposed. We evaluated our proposed method on 26 subjects, including 13 healthy subjects and 13 chronic obstructive pulmonary disease (COPD) patients, by comparing with the parameters clinically obtained from pulmonary function tests (PFTs). For the healthy subjects, we found that an absolute error (AE) and a root mean squared error (RMSE) of the FEV1/FVC ratio were 4.49% ± 3.38% and 5.54%, respectively. For the COPD patients, we found that AE and RMSE from COPD patients were 10.30% ± 10.59% and 14.48%, respectively. For both groups, we compared the results using the continuous wavelet transform (CWT) and short-time Fourier transform (STFT), and found that VFCDM was superior to CWT and STFT. Further, to estimate other parameters, including forced vital capacity (FVC), forced expiratory volume in 1 s (FEV1), and peak expiratory flow (PEF), regression analysis was conducted to establish a linear transformation. However, the parameters FVC, FEV1, and PEF had correlation factor r values of 0.323, 0.275, and −0.257, respectively, while FEV1/FVC had an r value of 0.814. The results obtained suggest that only the FEV1/FVC ratio can be accurately estimated from a smartphone built-in microphone. The other parameters, including FVC, FEV1, and PEF, were subjective and dependent on the subject’s familiarization with the test and performance of forced exhalation toward the microphone.


Introduction
Lung diseases are some of the most common medical conditions [1]. Many people suffer from lung diseases stemming from smoking, infections, and genetics. The lungs are the primary organs expanding and relaxing thousands of times each day to bring in oxygen and push out carbon dioxide. As one inhales, the breath travels through the mouth or nose to the windpipe and lungs, and further moves through smaller tubes to deliver oxygen throughout the organ. A number of lung diseases Sensors 2016, 16 adversely affect lung function by affecting the airways. These include asthma, chronic obstructive pulmonary disease (COPD), chronic bronchitis, emphysema, acute bronchitis, and cystic fibrosis [2]. For lung function evaluation, pulmonary function tests (PFTs) have found widespread clinical use. PFTs can help diagnose asthma, allergies, chronic bronchitis, respiratory infections, lung fibrosis, bronchiectasis, and COPD by evaluating how well the lungs take in and release air. For basic PFTs, a spirometer is the main piece of equipment, and an important clinical diagnostic device that should be used by all primary care and most specialist physicians [3]. Indeed, it was reported that 66% of primary care offices owned and used their own spirometer at the primary contact point. This low amount should reflect, in part, the need for alternatives to the spirometer [4,5]. A standard spirometer measures forced expiratory flow and displays a volume-time curve and a flow-volume loop (or curve), as shown in Figure 1. From the measurements, the following parameters are quantized: the forced vital capacity (FVC); the forced expiratory volume in one second (FEV 1 ); the FEV 1 /FVC ratio; the peak expiratory flow (PEF); the forced expiratory flow at 25%, 50%, or 75% of FVC (FEF 25 , FEF 50 , and FEF 75 ); and the forced expiratory flow between 25% and 75% (FEF 25%-75% ) [6][7][8]. All of these parameters are clinically important in assessing lung function.
Sensors 2016, 16,1305 2 of 16 adversely affect lung function by affecting the airways. These include asthma, chronic obstructive pulmonary disease (COPD), chronic bronchitis, emphysema, acute bronchitis, and cystic fibrosis [2]. For lung function evaluation, pulmonary function tests (PFTs) have found widespread clinical use. PFTs can help diagnose asthma, allergies, chronic bronchitis, respiratory infections, lung fibrosis, bronchiectasis, and COPD by evaluating how well the lungs take in and release air. For basic PFTs, a spirometer is the main piece of equipment, and an important clinical diagnostic device that should be used by all primary care and most specialist physicians [3]. Indeed, it was reported that 66% of primary care offices owned and used their own spirometer at the primary contact point. This low amount should reflect, in part, the need for alternatives to the spirometer [4,5]. A standard spirometer measures forced expiratory flow and displays a volume-time curve and a flow-volume loop (or curve), as shown in Figure 1. From the measurements, the following parameters are quantized: the forced vital capacity (FVC); the forced expiratory volume in one second (FEV1); the FEV1/FVC ratio; the peak expiratory flow (PEF); the forced expiratory flow at 25%, 50%, or 75% of FVC (FEF25, FEF50, and FEF75); and the forced expiratory flow between 25% and 75% (FEF25%-75%) [6][7][8]. All of these parameters are clinically important in assessing lung function. Among these parameters, the most common clinical measures are FVC, FEV1, FEV1/FVC, and PEF, as they are used to quantify the degree of airflow limitation in chronic lung diseases, such as asthma, COPD, and cystic fibrosis. The FEV1/FVC ratio has been widely accepted, especially for assessing COPD, which obstructs the main airway. In 1983, the European Community for Coal and Steel (ECCS) initially defined airway obstruction with an FEV1/FVC ratio below the lower fifth percentile of a large healthy reference group, which is the statistically-defined lower limit of normal (LLN) [9]. The same definition was followed by the American Thoracic Society (ATS) in 1991 [10], the European Respiratory Society (ERS) in 1993 [11], and the National Lung Health Education Program (NLHEP) in 2000 [12]. Depending on the organization and year, the definition has occasionally been modified by using a fixed value instead of the LLN. In 1987, ATS defined airway obstruction with an FEV1/FVC ratio lower than the fixed value of 0.75 [13], followed by the British Thoracic Society (BTS) with 0.70 in 1997 [14], the National Institute for Health and Clinical Excellence (NICE) with 0.75 in 2004 [15], the ATS and ERS with 0.70 in 2004 [16], and the Global Initiative for Chronic Obstructive Lung Disease (GOLD) with 0.75 in 2007 [15]. In this way, the FEV1/FVC ratio has been a widely accepted standard for assessing COPD, as summarized in Table 1 [15].  Among these parameters, the most common clinical measures are FVC, FEV 1 , FEV 1 /FVC, and PEF, as they are used to quantify the degree of airflow limitation in chronic lung diseases, such as asthma, COPD, and cystic fibrosis. The FEV 1 /FVC ratio has been widely accepted, especially for assessing COPD, which obstructs the main airway. In 1983, the European Community for Coal and Steel (ECCS) initially defined airway obstruction with an FEV 1 /FVC ratio below the lower fifth percentile of a large healthy reference group, which is the statistically-defined lower limit of normal (LLN) [9]. The same definition was followed by the American Thoracic Society (ATS) in 1991 [10], the European Respiratory Society (ERS) in 1993 [11], and the National Lung Health Education Program (NLHEP) in 2000 [12]. Depending on the organization and year, the definition has occasionally been modified by using a fixed value instead of the LLN. In 1987, ATS defined airway obstruction with an FEV 1 /FVC ratio lower than the fixed value of 0.75 [13], followed by the British Thoracic Society (BTS) with 0.70 in 1997 [14], the National Institute for Health and Clinical Excellence (NICE) with 0.75 in 2004 [15], the ATS and ERS with 0.70 in 2004 [16], and the Global Initiative for Chronic Obstructive Lung Disease (GOLD) with 0.75 in 2007 [15]. In this way, the FEV 1 /FVC ratio has been a widely accepted standard for assessing COPD, as summarized in Table 1 [15].  [15] Home spirometry may provide the convenient way for patients who live great distances from their clinics and research facilities. It also allows patients to monitor more frequently for detecting changes in lung function, which results in in earlier treatment of exacerbations, more rapid recovery, reduced healthcare cost, and improved outcomes [17,18]. Even though there are portable spirometers available, they are expensive, which limits the popularity to many people. Since the smartphone is popular and capable for users to measure forced exhalation with its built-in microphone, it can be a cheap home spirometer available to smartphone users. In addition, since smartphone technology has the capacity for users to communicate with physicians (e.g., using cloud technology), smartphone-based home spirometry has the potential in providing early diagnosis of lung disease for those who may have breathing problems on a day-to-day basis [19][20][21][22][23]. Recently, a smartphone-based approach that measures lung function using the built-in microphone has been introduced [24]. In their pilot study, the researchers demonstrated the extraction of the FVC, FEV 1 , PEF, and FEV 1 /FVC parameters. However, the approach used the spectrogram of the signal based on the short-time Fourier transform (STFT) with 30 ms frames. The STFT has a limitation in its time-frequency resolution capability, which is due to the uncertainty principle. The Heisenberg-Gabor inequality states that the time-bandwidth product of a signal is the lower bound by some constant. This means that a signal cannot be simultaneously narrow in time and frequency domains. These limitations in resolution were one of the reasons for the invention of wavelet theory. Recently, the variable frequency complex demodulation method (VFCDM) has shown a higher resolution than any other time-frequency spectrum methods, such as the smoothed pseudo Wigner-Ville (SPWV), short-time Fourier transform (STFT), and the wavelet transform (WT) methods [25][26][27][28].
In this paper, VFCDM-based lung function parameter estimation is presented by using an audio signal recorded from a smartphone built-in microphone. The estimation method of the FEV 1 /FVC ratio is first presented, and the accuracy of the VFCDM is then compared with that of CWT and STFT. The main contribution is to introduce the smartphone built-in microphone-based FEV 1 /FVC ratio estimation by using the high-resolution time-frequency spectrum, VFCDM, which accurately detects the main time-varying resonance frequency. To evaluate our proposed method, we compared the estimated FEV 1 /FVC ratio with the parameters clinically obtained from PFTs. In addition, we evaluated the other parameter estimation of FVC, FEV 1 , and PEF.

Subjects
Twenty-six subjects took part in this study, including 13 healthy subjects and 13 COPD patients. The healthy subjects (10 males, three females), with ages ranging from 24-47 years (30.85 ± 7.74; mean ± STD), had an average weight of 68.15 ± 16.01 kg and an average height of 170.23 ± 9.18 cm. The COPD patients (10 males, three females), with ages ranging from 51-89 years (71.92 ± 10.49), had an average weight of 61.00 ± 10.54 kg and an average height of 163.00 ± 6.30 cm. They were all severe COPD. Table 2 lists the subject details including their average lung function parameters. The study protocol and data analysis were approved by the Institutional Review Board (IRB) at Wonkwang University Hospital (WKUH), and all subjects consented to participate in the experiment. Since the forced expiration could aggravate certain medical conditions, individuals with the following medical conditions were excluded: hemoptysis of unknown origin; pneumothorax; angina; recent myocardial infarction; thoracic, abdominal, and cerebral aneurysms; cataracts or recent eye surgery; recent thoracic or abdominal surgery; nausea; vomiting; acute illness; and recent viral infection. Values are means ± standard deviations.

Data Collection and Preprocessing
The participants were instructed to follow the rules before the spirometry test [ If on puffer (inhaler) medication, you may be asked to refrain from taking it for a few hours before the test.
The audio data was measured and collected using an iPhone 5S (manufactured by Apple Inc., Cupertino, CA, USA). The subjects' forced exhalation sounds were recorded using the built-in microphone and converted into digital audio signals at a sampling rate of 44,100 Hz. The subjects were required to breathe in their full lung capacity and then forcefully exhale as much air from the lungs as possible through the mouthpiece (normally taking over 6 s). The mouthpiece was attached to the iPhone microphone using a custom-made 3D-printed adapter (see Figure 2a,b). To achieve the spirometry measurement, much effort has been carried out on the vortex whistle [30][31][32][33]. We modified the vortex whistle available for the smartphone built-in microphone. The mouthpiece used in this experiment was VBMax PFT Filter 33 mm from A-M Systems (Sequim, WA, USA). The adapter was printed with polylactic acid (PLA) material. It is an end-opened device which allows the air to pass through to the microphone and exit freely at the end. Rubber material was inserted between the mouthpiece and an adapter to prevent air leakage. The mouthpiece plays an important role because it essentially helps to maintain lip posture, fixes the distance between the lips and the microphone, and reduces surrounding background noise by guiding the airflow directly towards the microphone. Furthermore, it attaches and detaches easily to an iPhone 5S for an older person, and enables the test to be performed in the same manner as that performed with clinical equipment at a hospital. The clinical test was performed at Wonkwang University Hospital and the smartphone-based test was performed in an open-space environment. Participants performed the clinical tests followed by smartphone-based test under two trained pulmonologists. Performing clinical test at first allows participants to familiarize with the smartphone-based test. Participants performed three trial tests with the smartphone, as shown in Figure 2c. Each test was completely effort-dependent, and each participant was instructed by a trained specialist using gestures. The original audio signals with a sampling rate of 44,100 Hz were down-sampled to 2450 Hz, and a seventh-order elliptic low-pass filter with a cutoff frequency of 800 Hz was applied to remove unwanted signal components. These parameters were found based on the prior-evaluation tests under a very quiet room without any noise interference. In addition, to reduce the computational complexity, we down-sampled the signal to 2450 Hz, which still preserved the recorded data. Among the three trials from the smartphone-based test, the parameter set was selected based on the Morris/Polgar standards [34][35][36][37] under the two trained pulmonologists. The participants also performed three trial tests with clinical equipment as a reference, with some times between tests to allow recovery to a rested condition. The pulmonary function test (PFT) data was captured using Vmax software version IVS-0101-21-2B (manufactured by CareFusion Corporation, San Diego, CA, USA), which automatically provided the PFT parameters. Each participant performing PFT was seated in the cabin of a Vmax Autobox (Body Plethysmography System, V62J) manufactured by CareFusion, and performed the test.

Resonance Frequency Estimation Using High Resolution Time-Frequency Spectrum
Using the audio signal, we analyzed the dominant frequency of the forced exhalation sound by using the variable frequency complex demodulation (VFCDM) method [26]. The VFCDM method has shown higher resolution than any other time-frequency spectrum methods, such as smoothed pseudo Wigner-Ville (SPWV), short-time Fourier transform (STFT) and wavelet transform (WT) methods [25][26][27][28]. Considering a sinusoidal signal x(t) to be a narrow band oscillation with an instantaneous amplitude A(t), a center frequency , a phase ϕ(t), and a direct current component dc(t): For a given center frequency, information on the instantaneous amplitude A(t) and phase ϕ(t) are extracted by multiplying Equation (1) by , providing the following formula: The shift by results in moving the center frequency, , to zero frequency in the spectrum of z(t). If z(t) in Equation (2) is subjected to an ideal low-pass filter (LPF) with a cutoff frequency < , the filtered signal ( ) contains only the component of interest, and the following formulae are obtained: The acoustic signal x(t) contains the modulating frequency, which changes according to time.

Resonance Frequency Estimation Using High Resolution Time-Frequency Spectrum
Using the audio signal, we analyzed the dominant frequency of the forced exhalation sound by using the variable frequency complex demodulation (VFCDM) method [26]. The VFCDM method has shown higher resolution than any other time-frequency spectrum methods, such as smoothed pseudo Wigner-Ville (SPWV), short-time Fourier transform (STFT) and wavelet transform (WT) methods [25][26][27][28]. Considering a sinusoidal signal x(t) to be a narrow band oscillation with an instantaneous amplitude A(t), a center frequency f 0 , a phase ϕ(t), and a direct current component dc(t): For a given center frequency, information on the instantaneous amplitude A(t) and phase ϕ(t) are extracted by multiplying Equation (1) by e −j2π f 0 t , providing the following formula: The shift by e −j2π f 0 t results in moving the center frequency, f 0 , to zero frequency in the spectrum of z(t). If z(t) in Equation (2) is subjected to an ideal low-pass filter (LPF) with a cutoff frequency f c < f 0 , the filtered signal z l p (t) contains only the component of interest, and the following formulae are obtained: The acoustic signal x(t) contains the modulating frequency, which changes according to time. Therefore, x(t) can be formulated as: Similarly, multiplying Equation (6) by e −j t 0 2π f (τ)dτ provides the instantaneous amplitude, A(t), and instantaneous phase, ϕ(t): From Equation (7), when z(t) is filtered with an ideal LPF with a cutoff frequency f c < f 0 , the filtered signal z l p (t) contains the same instantaneous amplitude A(t) and phase ϕ(t) as in Equations (4) and (5). Details regarding the VFCDM algorithm are described in [26]. Figure 3 shows an example of the main procedure to obtain the volume-flow curve and time-volume curve from the audio signal, as well as the comparison among the resultant time-frequency spectra of VFCDM, CWT, and STFT. Figure 3a shows the original audio signal with a sampling rate of 44,100 Hz from the built-in microphone. The original audio signal was then down-sampled to 2450 Hz, and the seventh-order elliptic LPF with a cutoff frequency of 800 Hz was applied. Figure 3b-d show the resultant time-frequency spectra using VFCDM, CWT, and STFT, respectively. The filter parameters of the VFCDM were with the bandwidth F w = 0.03 Hz (normalized frequency) and the length of the filter N ω = 64. For CWT, the Morlet wavelet scalogram was chosen with the lowest and highest normalized frequencies set to 0.01 Hz and 0.5 Hz. Morlet wavelet transform allows multi-resolution analysis in the time-frequency domain of a non-stationary, transient signal. For STFT, the data was buffered into 30 ms frames and shifted by every sample. Each frame is then windowed using a Hamming window and then computed the magnitude squared of the FFT to produce a spectrogram. In Figure 3b,d the frequencies providing the maximum power for each sample, with an interval of 1/2450 s, are also plotted. These show that VFCDM provides a higher resolution in both time and frequency than CWT and STFT. With the time-frequency spectrum from VFCDM, we plotted maximum power versus accumulated maximum power, as shown in Figure 3e, which shows a similar pattern to the flow-volume curve depicted in Figure 1b. In addition, we plotted the accumulated maximum power versus the sample (time), as shown in Figure 3f, which shows a similar pattern to the volume-time curve depicted in Figure 1a. time and frequency than CWT and STFT. With the time-frequency spectrum from VFCDM, we plotted maximum power versus accumulated maximum power, as shown in Figure 3e, which shows a similar pattern to the flow-volume curve depicted in Figure 1b. In addition, we plotted the accumulated maximum power versus the sample (time), as shown in Figure 3f, which shows a similar pattern to the volume-time curve depicted in Figure 1a.

Instantaneous Power and Performance Evaluation
VFCDM, CWT, and STFT were applied for the estimation of the FEV1/FVC ratio for healthy subjects (N = 13) and COPD patients (N = 13). To investigate the effect of instantaneous power, the summation of power values equal to or greater than a varying percentage THP of the maximum power at each sample was considered. THP was altered to 50%, 70%, 80%, 90%, and 100%, and the

Instantaneous Power and Performance Evaluation
VFCDM, CWT, and STFT were applied for the estimation of the FEV 1 /FVC ratio for healthy subjects (N = 13) and COPD patients (N = 13). To investigate the effect of instantaneous power, the summation of power values equal to or greater than a varying percentage TH P of the maximum power at each sample was considered. TH P was altered to 50%, 70%, 80%, 90%, and 100%, and the estimated FEV 1 /FVC ratio was evaluated. Using the power summation for each sample, power summation vs. accumulated power summation was plotted representing the flow-volume curve, and time vs. accumulated power summation was plotted representing the volume-time curve.
To further investigate the VFCDM based estimation of the other lung function parameters including FVC, FEV 1 , and PEF, the values of total power, total power in 1 s, and global maximum power were extracted, each of which corresponds to FVC, FEV 1 , and PEF, respectively. The extracted parameters are denoted by S FVC , S FEV1 , and S PEF . It was assumed that S FVC , S FEV1 , and S PEF were related by the following linear transformation: where T FVC , T FEV1 , and T PEF are the reference values, and S FVC , S FEV1 , and S PEF are the estimated values of FVC, FEV 1 , and PEF, respectively. All the reference values were obtained from the clinical results. E FVC is the summation of maximum power (TH P = 100%) for the entire recorded samples, E FEV1 is the summation of maximum power for the first one second, and E PEF is the global maximum power in the entire recorded samples; K FVC , K FEV1 , and K PEF are the scaling constants; and C FVC , C FEV1 , and C PEF are offset constants. For each equation, we have a dependent variable corresponding to a reference value and an independent variable corresponding to a predictor. Then, the relationship with the constant values between a dependent variable (T FVC , T FEV1 , or T PEF ) and an independent variable (E FVC , E FEV1 , or E PEF ) can be estimated by linear least squares regression. Statistical analyses were performed using IBM SPSS Statistics for Windows, version 22.0 (manufactured by IBM Corp., Armonk, NY, USA, 2012). Pearson's correlation coefficients were used for performing linear regression analysis. For comparison with the correlation coefficient from the FEV 1 /FVC ratio, we similarly formulated the linear transformation as: where E FEV1/FVC = E FEV1 /E FVC . For the evaluation, we used absolute error (AE) and root mean squared error (RMSE) defined by: where N is the number of subjects; and E FEV1/FVC and T FEV1/FVC are the estimated FEV 1 /FVC ratio and its reference value, respectively. mark is the median, the lower and upper whiskers are the 25th and 75th percentiles, the blue square marks are the 10th and 90th percentiles, and the blue diamond marks are the 5th and 95th percentiles. A significant difference between VFCDM and CWT at p < 0.01 was found based on the t-test. Similarly, a significant difference between VFCDM and STFT was found. In addition, it was found that the absolute error decreased as TH P increased up to 100% for all VFCDM, CWT, and STFT. Thus, VFCDM with TH P = 100% provided the best accuracy for the FEV 1 /FVC ratio estimation. Table 3 summarizes the absolute error (AE) and RMSE values from healthy subjects according to TH P for VFCDM, CWT, and STFT, respectively. It shows that RMSE from VFCDM with TH P = 100% is 2.07 and 2.19 times lower than the CWT and STFT with TH P = 100%, respectively. For mean AE, VFCDM with TH P = 100% provided 2.39 and 2.57 times lower than CWT and STFT with TH P = 100%, respectively. Figure 4a-c show the absolute error distributions of the estimated FEV1/FVC ratios from healthy subjects according to THP based on VFCDM, CWT and STFT, respectively. The central red circle mark is the median, the lower and upper whiskers are the 25th and 75th percentiles, the blue square marks are the 10th and 90th percentiles, and the blue diamond marks are the 5th and 95th percentiles. A significant difference between VFCDM and CWT at p < 0.01 was found based on the t-test. Similarly, a significant difference between VFCDM and STFT was found. In addition, it was found that the absolute error decreased as THP increased up to 100% for all VFCDM, CWT, and STFT. Thus, VFCDM with THP = 100% provided the best accuracy for the FEV1/FVC ratio estimation. Table 3 summarizes the absolute error (AE) and RMSE values from healthy subjects according to THP for VFCDM, CWT, and STFT, respectively. It shows that RMSE from VFCDM with THP = 100% is 2.07 and 2.19 times lower than the CWT and STFT with THP = 100%, respectively. For mean AE, VFCDM with THP = 100% provided 2.39 and 2.57 times lower than CWT and STFT with THP = 100%, respectively. Figure 5a-c show the absolute error distributions of the estimated FEV1/FVC ratios from COPD patients according to THP based on VFCDM, CWT and STFT, respectively. A significant difference between VFCDM and CWT at p < 0.01 was found based on the t-test. Similarly, a significant difference between VFCDM and STFT was found. Table 4 summarizes the absolute error (AE) and RMSE values from COPD subjects according to THP for VFCDM, CWT, and STFT, respectively. It shows that RMSE from VFCDM with THP = 100% is 1.67 and 1.58 times lower than the CWT and STFT with THP = 100%, respectively. For mean AE, VFCDM with THP = 100% provided 2.03 and 1.91 times lower than CWT and STFT with THP = 100%, respectively. Figure 5a-c show the absolute error distributions of the estimated FEV 1 /FVC ratios from COPD patients according to TH P based on VFCDM, CWT and STFT, respectively. A significant difference between VFCDM and CWT at p < 0.01 was found based on the t-test. Similarly, a significant difference between VFCDM and STFT was found. Table 4 summarizes the absolute error (AE) and RMSE values from COPD subjects according to TH P for VFCDM, CWT, and STFT, respectively. It shows that RMSE from VFCDM with TH P = 100% is 1.67 and 1.58 times lower than the CWT and STFT with TH P = 100%, respectively. For mean AE, VFCDM with TH P = 100% provided 2.03 and 1.91 times lower than CWT and STFT with TH P = 100%, respectively. Table 5 summarizes the whole estimated FEV 1 /FVC ratios from each subject at TH P = 100% for VFCDM, CWT, and STFT. For healthy subjects and COPD patients, the VFCDM provided higher accuracy. In addition, for healthy subjects, VFCDM showed reasonably accurate estimation of FEV 1 /FVC. However, for COPD patients, the estimation results were not satisfied with the clinical needs. Nevertheless, all of the COPD results with VFCDM were less than 0.70, which met the criteria for assessing COPD summarized in Table 1. Figure 6a-c show screen snapshots of the iPhone 5S application for FEV 1 /FVC ratio estimation, developed using the Objective-C programming language. Once recording is completed, it takes five seconds for the app to visualize the FEV 1 /FVC ratio estimation result in real-time. Figure 6a shows the screen at the commencement of recording the forced exhalation through the built-in microphone. Figure 6b shows the forced exhalation in the process of being recorded. Recording can be stopped by clicking the circle button at the bottom of the screen. After the recording is complete, the flow-volume curve and the estimated FEV 1 /FVC ratio are displayed, as shown in Figure 6c.       Table 5 summarizes the whole estimated FEV1/FVC ratios from each subject at THP = 100% for VFCDM, CWT, and STFT. For healthy subjects and COPD patients, the VFCDM provided higher accuracy. In addition, for healthy subjects, VFCDM showed reasonably accurate estimation of FEV1/FVC. However, for COPD patients, the estimation results were not satisfied with the clinical needs. Nevertheless, all of the COPD results with VFCDM were less than 0.70, which met the criteria for assessing COPD summarized in Table 1. Figure 6a-c show screen snapshots of the iPhone 5S application for FEV1/FVC ratio estimation, developed using the Objective-C programming language. Once recording is completed, it takes five seconds for the app to visualize the FEV1/FVC ratio estimation result in real-time. Figure 6a shows the screen at the commencement of recording the forced exhalation through the built-in microphone. Figure 6b shows the forced exhalation in the process of being recorded. Recording can be stopped by clicking the circle button at the bottom of the screen. After the recording is complete, the flow-volume curve and the estimated FEV1/FVC ratio are displayed, as shown in Figure 6c.

Discussion
We presented a smartphone-based lung function test using a high-resolution time-frequency spectrum from a smartphone built-in microphone. Even though the time-frequency spectrum is not a sole component for the result accuracy, it is the key algorithm to increase the accuracy. In [24], the audio from a phone was buffered into 30 ms frames and each frame was windowed to quantify the magnitude spectrogram of the signal. On the other hand, we down-sampled to 2450 Hz and visualized the time-frequency spectrum with the time interval of 1/2450 s, which is equivalent to 0.41 ms, approximately. Hence, our method has approximately 73 times higher time resolution than the previous work. More specifically, to estimate the FEV1/FVC ratio, VFCDM provided lower absolute errors than CWT and STFT by 6.52 and 6.67, respectively. In addition, VFCDM provided lower RMSEs than CWT and STFT by 5.94 and 6.62, respectively. The results suggest that the VFCDM approach provided higher accuracy of the FEV1/FVC ratio than CWT and STFT due to high resolution of the time-frequency spectrum. However, we also found that only the FEV1/FVC ratio can be accurately estimated using the smartphone built-in microphone since the ratio as a relative value can be obtained directly without the estimates of FVC and FEV1. These two factors, as well as PEF, are subjective and dependent on the subject's familiarization with the test and performance of the forced exhalation. More specifically, each individual may exhale with slightly different angles toward a built-in microphone even with the add-on mouthpiece. In addition, each individual may bite the mouthpiece deeply or shallowly. Each individual may also move or shake the smartphone during

Discussion
We presented a smartphone-based lung function test using a high-resolution time-frequency spectrum from a smartphone built-in microphone. Even though the time-frequency spectrum is not a sole component for the result accuracy, it is the key algorithm to increase the accuracy. In [24], the audio from a phone was buffered into 30 ms frames and each frame was windowed to quantify the magnitude spectrogram of the signal. On the other hand, we down-sampled to 2450 Hz and visualized the time-frequency spectrum with the time interval of 1/2450 s, which is equivalent to 0.41 ms, approximately. Hence, our method has approximately 73 times higher time resolution than the previous work. More specifically, to estimate the FEV 1 /FVC ratio, VFCDM provided lower absolute errors than CWT and STFT by 6.52 and 6.67, respectively. In addition, VFCDM provided lower RMSEs than CWT and STFT by 5.94 and 6.62, respectively. The results suggest that the VFCDM approach provided higher accuracy of the FEV 1 /FVC ratio than CWT and STFT due to high resolution of the time-frequency spectrum. However, we also found that only the FEV 1 /FVC ratio can be accurately estimated using the smartphone built-in microphone since the ratio as a relative value can be obtained directly without the estimates of FVC and FEV 1 . These two factors, as well as PEF, are subjective and dependent on the subject's familiarization with the test and performance of the forced exhalation. More specifically, each individual may exhale with slightly different angles toward a built-in microphone even with the add-on mouthpiece. In addition, each individual may bite the mouthpiece deeply or shallowly. Each individual may also move or shake the smartphone during the forced exhalation test. Those factors affect the time-frequency spectrum, and may result in inaccurate estimation of FVC, FEV 1 , and PEF. Healthy subjects #2, #9, and #11 embodied such cases. Regarding FEV 1 /FVC, if the three subjects #2, #9, and #11 were excluded, the estimation results from the ten other healthy subjects provided very low absolute errors and RMSEs of 3.573 and 4.760, respectively. Regarding FVC, FEV 1 , and PEF, the correlation r value could increase to 0.763, 0.928, and 0.823, respectively. Thus, the limited and cautious force of exhalation toward the built-in microphone is necessary to increase the estimation accuracy. Furthermore, the future research needs to be toward operation without the add-on adapter. Furthermore, the additional condition needs to be considered: each individual should keep the distance constant between a lip and a microphone. Then, a user may have a trouble keeping the fixed distance between the lip and microphone before the test every time.
We also found that AE and RMSE of FEV 1 /FVC ratios from COPD patients were relatively high with 10.30% ± 10.59% and 14.48%, respectively, even with VFCDM. These high errors were mainly from the artifact sound caused by the narrow windpipe, especially for COPD patients. Most COPD patients have a narrow windpipe, which causes artifact sound even in routine life. In the case of forced exhalation, the artifact sound is more dominating and the real forced exhalation sound is severely affected by the artifacts. Then, the time-varying main frequency cannot be accurately detected, and eventually the instantaneous frequency with maximum power at each sample cannot appropriately represent the volume of the PFT test. More specifically, in the portion of the sound without the artifacts, our proposed method with VFCDM provides higher accuracy than CWT and STFT. In the portion of the sound with the artifacts, there is no difference among VFCDM, CWT, and STFT. This reflects that the results from healthy subjects have higher accuracy than those from COPD patients. In addition, this reflects that the results with VFCDM have higher accuracy than CWT and STFT for both healthy subjects and COPD patients. Thus, the dispersion trend according to TH p is observed only in healthy subjects as shown in Figures 4 and 5. More research regarding artifact sound detection and filtering should be directed to be clinically available in the future.
In our study, among the healthy subjects, seven subjects were aged between 20 and 29 (group A), and the other six subjects were aged between 30 and 39 (group B). For groups A and B, RMSE values were 6.13 and 4.76, and AE values were 4.96 ± 3.89 and 3.93 ± 2.93. However, due to a small number of subjects, the effect of age is not clear from the results. Similarly, for male (N = 10) and female (N = 3) groups from healthy subjects, RMSE values were 4.61 and 7.90, and AE values were 3.48 ± 3.18 and 7.84 ± 1.17. From COPD patients, RMSE values were 15.17 and 11.92, and AE values were 10.65 ± 11.38 and 9.14 ± 99.36, respectively. Similarly with the gender effect, due to a small number of subjects and patients, the effect of gender is not clear from the results. Thus, further studies need to rigorously validate the FEV 1 /FVC ratio and revise the regression model for FVC, FEV 1 , and PEF by considering a larger number of subjects with age and gender matching.

Conclusions
In this paper, we developed to estimate lung function parameters using a high-resolution time-frequency spectrum from a smartphone built-in microphone. For both healthy and COPD groups, we evaluated the estimation performance of FEV 1 /FVC, and found that VFCDM was superior to CWT and STFT. Further, regression analysis was conducted to establish a linear transformation on FVC, FEV 1 and PEF. However, correlation factor values were not high comparing to FEV 1 /FVC since they were subjective and dependent on the subject's familiarization with the test and performance of forced exhalation toward the built-in microphone.