If a doctor wants to know how well a cough treatment is working, it can be useful to know exactly how frequently the patient has been coughing. However, a patient's state of mind might influence the impression they have about this: whether they are happy or sad, tired or not, the patient's estimate can be now more than a rough guess. "So a doctor will often ask their partner, 'Were they coughing all night?'," explains Lara Orlandic of Prof. David Atienza's Embedded Systems Lab (ESL). "We want to provide the quantitative measure of how many times people actually cough per day."
In a previous paper the same team published a framework that defined a methodology for counting coughs. In a new paper to be published in
, they announce an upgrade on three levels: accuracy, energy and security.Firstly, accuracy: "There are two sensors: a kinematic sensor, that detects movement, and an audio sensor," says Lara. "If somebody near the patient coughs, but the noise is not coupled to chest movement, the cough is not counted. Similarly, if the patient laughs, so that there is movement but no cough noise, it is not counted as a cough. Our implementation of AI has been trained to distinguish between laughing, throat clearing, talking and coughing."
Secondly, low energy. To be really useful, it is important that the device should be wearable, which means that it has to run on its own batteries. "We wanted to use these sensors to achieve the highest level of detection accuracy while using as little power as possible," explains Stefano Albini, also of ESL. "In order to this, we developed an algorithm that can be run on an embedded device at optimal rates.
"As an example, the processing of audio is quite demanding on energy. We therefore instruct the device to process the audio only if the kinematic sensor can confirm that cough movement has been detected. This saves a lot of battery power."
Thirdly, security: "We collaborate with the CHUV (the University Hospital in Lausanne)," relates Lara,"but when we spoke about a networked system to gather cough information, 24 hours per day, we were told that nobody was likely to sign up for it.
"When we explained that we could keep that information close to the source, only storing it on the device itself, so that each patient could control their own medical data, then they said that people would likely volunteer."
It is easily said, but to develop such a wearable device that is truly "on the edge", that is to say, not reliant on the cloud, is quite a feat.
"We have a lot of data to process on a constrained device," elaborates Stefano, "and this is not a smartphone or a computer. It doesn't have all those processing capabilities, yet it still needs to process all those data and provide an answer, in a fixed amount of time, using as little power as possible. That was our challenge."
"We start by developing algorithms, test it on the hardware, go back to the algorithm development for fine tuning, test it on the hardware again, and so on."
Much of the hardware was provided by SenseModi, a spin-off venture started by ESL alumnus Dr. Jérôme Thevenot, a co-author of the paper. Their VersaSens platform runs on the HEEPocrates platform, which is also developed by a collaboration based in ESL. In many ways this projects epitomises the work on "the Edge" that ESL has been developing for years.
"Cough-E is a great example of what can be achieved with embedded systems," explains Prof. David Atienza, "small, low-power devices that use AI to achieve reliable results. What is interesting in this case is the discreet way in which the data is collected: it is on the Edge, but not connected to the Cloud."
Which is nothing to cough at. Well, at least, not in the figurative sense.
Cough-E: A multimodal, privacy-preserving cough detection algorithm for the edge
Stefano Albini, Lara Orlandic, Jonathan Dan, Jérôme Thevenot, Tomas Teijeiro, Denisa Andreea Constantinescu, David Atienza
IEEE Journal of Biomedical and Health Informatics, 2025