User Stories

iSonea Develops Mobile App and Server Software for Wheeze Detection and Asthma Management

View PDF

The AirSonea device, which connects to an asthma patient’s smartphone and communicates with wheeze analysis algorithms on iSonea’s server
The AirSonea device, which connects to an asthma patient’s smartphone and communicates with wheeze analysis algorithms on iSonea’s server.

“MATLAB enables us to rapidly develop, debug, and test sound-processing algorithms, and MATLAB Coder simplifies the process of implementing those algorithms in C. There’s no other environment or programming language that we could use to produce similar results in the same amount of time.”

Mark Mulvey, iSonea

Managing asthma can be difficult for both the physician and the patient. When physicians assess asthma patients in a clinical environment, they listen for wheezing, a primary sign of asthma and an indication of obstructive airflow in the lungs. But when physicians cannot examine patients directly, they must rely on the patients or patients’ parents to describe the wheezing and any other symptoms. This self-reporting of asthma symptoms and current condition is unreliable, particularly when the patient is a child.

Engineers at iSonea have developed technology that asthma patients can use to record and analyze their own breathing. Instead of listening for wheeze sounds, the AirSonea technology detects wheeze patterns in an image created from recorded breath sounds. iSonea used MATLAB® to develop acoustic respiratory monitoring algorithms, and used MATLAB Coder to implement them as a mobile app and cloud-based server software.

“MATLAB and MATLAB Coder enabled us not only to develop the algorithms but to accelerate the implementation by generating code for a mobile app and a server component,” says Yulya Goryachev, senior algorithm engineer at iSonea.


iSonea needed to develop an algorithm capable of identifying wheeze sounds of varying frequency, amplitude, and duration from 30-second audio recordings produced by a specialized sensor held near the patient’s trachea. To minimize the effects of ambient noise, the team needed to measure and analyze sounds from the user’s environment.

They decided to create an app that would send recordings to iSonea server software, which would invoke the wheeze analysis algorithm and send results back to the patient via the app. The app would also provide an independent evaluation of external noise by using the mobile device’s built-in microphone to record ambient sounds.

In the past, it took months for iSonea engineers to manually code algorithms in C. They needed a way to rapidly translate their algorithms for wheeze detection and ambient noise analysis into C code that could be deployed on the iSonea server and a mobile device, respectively.


iSonea engineers used MATLAB and Computer Vision System Toolbox to develop the wheeze detection algorithm. The algorithm converts the 30-second audio recording into a spectrogram and then analyzes the spectrogram to identify potential wheeze candidates based on energy patterns and other common characteristics of wheeze. The algorithm performs further processing to reject false positives.

To develop the ambient noise detection algorithm, the engineers applied a Hamming window, performed a fast Fourier transform, and located spectral maxima in multiple frequency ranges using MATLAB and Signal Processing Toolbox.

After debugging and testing both algorithms in MATLAB, the team used MATLAB Coder to generate executable functions from their MATLAB code. This step enabled the team to verify that the code was suitable for code generation and to check for run-time errors.

Next, the engineers used MATLAB Coder to generate C code from the algorithms. To verify the generated code, they invoked it from within MATLAB and compared the results with the results produced by the original MATLAB algorithms.

In a subsequent round of testing, the engineers compiled the generated C code using Microsoft® Visual Studio®, and again compared results for verification.

The team integrated the C code for the noise detection algorithm into apps for Apple iPhone and Google® Android devices, and integrated the C code for the wheeze detection algorithm into a web application accessible via the cloud.

The final system was tested in an anechoic chamber using test software that the team had developed with MATLAB and MATLAB Coder.

AirSonea is commercially available in Australia, is awaiting FDA approval in the United States, and has received Conformité Européenne (CE Mark) certification in the European Union.


  • Manual coding effort reduced. “On similar projects in the past, we had to recode our algorithms in C and then debug the C implementation,” says Goryachev. “Now, we generate the C code automatically with MATLAB Coder, which requires significantly less time and effort.”
  • Algorithm development iterations accelerated. “After making a change to an algorithm, we simply re-generate the C code and test it immediately,” says Goryachev. “Previously, the engineers had to rely on C programmers. If they were busy with other projects, it was often days before they could implement the changes.”
  • Code maintenance overhead reduced. “Maintaining the algorithm and C source code separately required the full-time effort of a software engineer,” notes Mark Mulvey, manager of system/DSP engineering at iSonea. “MATLAB Coder enables us to maintain one algorithm in MATLAB and convert it to C at release time, freeing that engineer to work on other projects.”


Develop and implement an acoustic respiratory monitoring system for wheeze detection and asthma management


Develop algorithms for detecting wheeze and ambient noise in MATLAB, and use MATLAB Coder to generate code from the algorithms for mobile devices and a web server


  • Manual coding effort reduced
  • Algorithm development iterations accelerated
  • Code maintenance overhead reduced

Products Used

Learn more about iSonea