Keywords

1 Introduction

Chronic Obstructive Pulmonary Disease (COPD) is an umbrella term for respiratory conditions such as emphysema, chronic bronchitis and upper airways obstruction. In 2015, 3·2 Million (M) people (95% uncertainty interval [UI] 3·1M to 3·3M) died from COPD worldwide, an increase of 11·6% (95% UI 5·3 to 19·8) compared with 1990. From 1990 to 2015, the prevalence of COPD increased by 44·2% (41·7% to 46·6%) [1]. The national prevalence of COPD in European countries ranges between 0.2% to 28%. This wide range could be due to a number of reasons: real differences in prevalence between countries and the use of different methods of diagnosis. The top-5 countries in Western Europe with patients diagnosed as living with COPD are: France – 3.5M; UK – 3M; Germany – 2.7M; Italy – 2.6M; Spain – 1.5M; Belgium – 0.4M [2].

In the UK projections until 2030 indicate that the number of COPD patients will increase by 39% in England and by 17% in Scotland, i.e., 0.95M (95% uncertainty interval 0.94M–0.96M) in 2011 to 1.3M (1.1–1.4M) in 2030; for Scotland, the estimate is 0.10M (0.10–0.11M) people with diagnosed COPD in 2011, increasing to 0.12M (0.11–0.13M) in 2030 [3].

The direct healthcare costs for COPD can be divided into maintenance costs for the care of COPD patients and the additional costs for moderate to severe exacerbations. Between 2011–2030, the costs of COPD in England will rise by £800 Million from £1.5 Billion in 2011 to £2.3 Billion in 2030; similarly, the rise in costs in Scotland is projected to increase by £48 Million from £159 Million in 2011 to £207 Million in 2030. We have established that COPD is a financial burden for the healthcare system in European countries which is projected to rise at least until 2030 [3].

COPD is generally caused by smoking, long-term severe asthma, and environmental conditions, such as extended exposure to airborne particulate matter, and fumes from biomass burning for cooking and heating [4]. COPD sufferers experience wheezing, breathlessness, and complications due to pneumonia which affects their quality of life and productivity at work [5].

COPD is a chronic condition and number of steps can be taken by subjects to manage their condition. These include methods to improve breathing and alleviate breathlessness using abdominal breathing exercises, and a physical exercise programme called pulmonary rehabilitation (PR) to improve muscle strength and lung fitness. The 2016 update of quality standard from the UK National Institute for Health and Care Excellence (NICE) recommended that post-exacerbation patients should be offered a PR programme within four weeks of their hospital discharge to aid in restoring functional performance of the respiratory system, resuming every-day physical activities, improving quality of life, and reducing the risk of re-hospitalisation due to relapse [6].

PR involves a six-week course of weekly supervised group exercise classes and nutrition advice. It is important that the COPD patients also exercise at home in between the classes, and continue them regularly beyond the six-week course [7]. The resulting increase in aerobic performance through endurance training and daily physical activity is known to lead to improvements in their quality of life [7].

This paper describes a PR system comprising of a wearable sensor device and an Android App: the 3-axis accelerometer-based Respeck device [8] validated in clinical trials [9, 10] worn as a patch on the chest monitors the respiratory rate and respiratory effort, and the intensity of physical exercises during PR [11]; the Android application (the Rehab App) on the phone orchestrates the exercises and collects and transmits the anonymized subject data to the server using WiFi or mobile internet. The Care Team of community respiratory nurses, pulmonary physiotherapists and general practitioners have access to the key to the subject’s personal information and can view up-to-date status on the subject via the dashboard in a password-protected secure website. The PR system is one component of a larger COPD care package which employs machine learning algorithms running on the GoogleCloud server to analyse the continuous, minute-level Respeck data for patterns in breathing and activity levels which could forecast deterioration in the patient’s condition leading to exacerbation and possible hospitalisation. The aim is for the Care Team to intervene in a timely fashion to arrest deterioration and avoid hospitalization, and manage the patients in the comfort of their home.

The PR system has the following objectives: (i) to enable patients to perform their PR exercises daily at home and at a time of their convenience; (ii) to inform the Care Team on a dashboard that their charges are complying with the exercise regime; (iii) to establish the relationship between the COPD Assessment Test (CAT) [12] reflecting the individual’s perceived condition and the breathing data from the Respeck device.

The novel contributions of this paper are: the implementation of a home-based pulmonary rehabilitation system using a combination of a wearable Respeck device and an Android App, and relating the COPD subject’s respiratory data with their CAT score.

2 Related Work

The adherence to the PR programme is an issue of concern to researchers and healthcare professionals [13, 14]. Keating et al. used qualitative methods to study the experiences of PR uptake or lack of it#, by interviewing 19 COPD patients who had declined to participate in a PR program, and the 18 COPD patients who had dropped out of their programme [15]. The lack of perceived benefits and transport considerations were major issues for the patients. Other factors were lack of self-confidence due to fear of being breathless and exacerbation of existing medical conditions, and the role of the referring physician and the healthcare team of physiotherapists and respiratory nurses in encouraging the patient to adhere with the PR regime.

The PR system presented in this paper addresses these issues squarely. A home-based PR system removes the need for COPD subjects to travel to the clinics as they can exercise in the comfort of their home at a time of their choosing. Up-to-date information is shared, lack of exercise sessions is flagged and the Care Team can make inquires on the patient’s condition and reasons for non-compliance. The patients can also gain comfort that the Respeck data collected during the exercises, such as the elevation of respiratory rate after an exercise and the resting time between exercises could provide early warning in deterioration in their condition.

Vela et al. [16] emphasise the need to understand the patients’ heterogeneities and co-morbidities such as cardiovascular diseases, Type 2 diabetes, metabolic syndrome, anxiety, and depression. The design of the PR system allows customisation of the exercise sessions to suit their conditions on the day and taking account of their co-morbidities.

3 Pulmonary Rehabilitation System

The primary function of the home-based PR system is to guide the patients to perform the exercises regularly. There are four main components: the Respeck respiratory and physical activity monitor (Fig. 1); the Android phone and App; the cloud-based server; and, the Dashboard, as illustrated in Fig. 2. The application running on a smartphone or a tablet (for patients with tremor in their fingers who will require a larger surface for the user interface) orchestrates the exercises with animations and voice instructions to illustrate the exercises which the patients mimic. Secondly, up-to-date information on the COPD patient’s condition is required to be shared with the Care Team. This is achieved by the wireless Respeck respiratory and physical activity monitor (Fig. 1) worn as an adhesive patch on the chest during the PR exercises.

Fig. 1.
figure 1

The Respeck wireless monitor (left) worn as a plaster on the chest (right).

The Respeck device contains a three-axis accelerometer operating at 12.5 Hz, a 32-bit ARM processor for on-board processing of the sensor data, and a Bluetooth 4.0 radio for communicating with the mobile phone. It has been designed for continuous wear with minimal intervention from the patient. It is turned on continuously; the data is transmitted automatically to the mobile device using store-and-forward methods; low energy design ensures that the battery can run for a period of 4–6 months of continuous operation before recharging the device overnight using a wireless charger.

Data from the Respeck device is uploaded wirelessly to the server in real-time and analysed to provide the Care Team with up-to-date information on the conformance to the exercise regime in terms of frequency of exercise sessions, and the respiratory health condition (trends in respiratory rate) of their cohort. This enables the Care Team to prioritise their resources in a timely fashion for those who need them. Thirdly, the PR system addresses the important issue of extending the reach of the Care Team to provide remote observation of COPD patients without invading their privacy.

3.1 The Apps

Figure 3 illustrates the four main component Android applications: the Pairing App, the AirRespeck App, the Pulmonary Rehabilitation App, and, the Diary Application; and, the Respeck sensor device worn as a plaster on the chest of the COPD individual.

The Pairing App.

The Pairing App associates the Respeck device of the subject and their unique personal identifier with the phone running the Pulmonary rehab application. This ensures that the data sent from the phone is tagged with the subject identifier during the course of the transfer to the Server, storage and future analysis. All the data is annotated with this unique identifier. This ensures that no personal information is stored on the server to ensure patient anonymity and adherence to the General Data Protection Regulation (GDPR). Only the Care Team has the key to relate the unique identifier to the subject’s name and medical records on a need-to-know basis.

The AirRespeck Application.

The AirRespeck App handles the secure and reliable transfer wirelessly of respiratory rate/flow extracted from the accelerometer sensor data in the Respeck device and its display in the App and onward transmission to the server. The live data received from the Respeck is also forwarded to the Rehab application via a Broadcast.

Fig. 2.
figure 2

An overview of the pulmonary rehabilitation system

The Pulmonary Rehabilitation (Rehab) Application.

The Rehab Application on the mobile device orchestrates the rehabilitation exercises, both visually using animations and aurally via a voice interface for COPD individuals who tend to be elderly with deteriorating visual and aural faculties. The exercises are interspersed with resting periods for the patients to recover their breath. The rates of recovery of the breathing rate after each exercise recorded over several rehab sessions are used to characterise changes in the patient’s condition over time and provide insights to the Care Team. In summary, the data from the App confirms whether the patient is conforming to the exercise regime, and provides assessment of the patient’s well-being. The Rehab App enables patients to customise the exercise regime by choosing from the list of 10 exercises and selecting their durations. After the exercise selection, an animation of the current exercise is displayed, illustrating the correct way of performing the exercise. After finishing each exercise the patient is invited to rest until their breathing recovers and during this period their “quiet breathing at rest” is collected. The breathing rates and the rest times between each exercise are collected for each session. At the end of an exercise session, the patient can view their average breathing rate during the resting periods in comparison with previous sessions. All the exercise session statistics are returned to the AirRespeck App and uploaded to the server for analysis and the results displayed on the dashboard for the Care Team.

The Diary Application.

COPD Assessment Test (CAT) [12] captures the patient’s perception of their condition as recorded in the Diary App. It contains 8 questions with 6 possible answers with scores attached for each question - 0 being the best score and 5 being the worst. The scores are then aggregated to report a final CAT score: higher the score, the worse was the patient’s self-assessment of their condition. The score is transmitted back to the AirRespeck App, which uploads it to the server to be displayed alongside the exercise data to the Care Team. Figure 4 illustrates the CAT scores for a COPD individual over a period of 6 months.

The Server.

The server receives respiratory rate data from Airespeck App on the phone every minute, which is stored in the Google Datastore. It also contains the raw accelerometer data uploaded manually from the subject’s phone by the healthcare team. The raw data can be analysed for classifying a larger range of physical activity recognition using more computationally intensive machine learning models than can be afforded on the phones.

Fig. 3.
figure 3

Components of the pulmonary rehabilitation system.

Fig. 4.
figure 4

The individual scores for the CAT questions for a single COPD subject for a period of 6 months.

The Dashboard.

The continuous minute-averaged breathing data and PR data processed on the phone and automatically uploaded to the server, and the manually-uploaded raw data are displayed on a password-protected dashboard which can be viewed only by the Care Team personnel. The dashboard shows time-series data of the continuous monitoring breathing rate, activity level, and exercise statistics such as the breathing rate during resting times, the average resting time between exercises in a session. The dashboard also shows the CAT scores over the same time frame.

4 The Design

The design of the home-based PR system was guided by the following principles. The target users are elderly and the majority of them might not be computer literate. The ease of usage and customisation to the requirements of the COPD patients were central. The Respeck device is always on and does not require the patient to press any buttons to start using it or start uploading data. This is important as older COPD patients are likely to forget although a reminder from the App to turn the device on could have been another approach to address this issue.

Anyone familiar with using a mobile phone should be able to use the PR system. Once the App is opened on the mobile device with a single action, the data collection and upload takes place automatically without patient intervention. Animation of the current exercise reminds the user with a countdown to time the exercise. All visual information is also conveyed by a voice interface which calls out the exercises and counts down for patients with poor eyesight. The 10 exercises available in the App as recommended by the British Lung Foundation are: Sit to stand; Knee extensions; Squats; Heel raises; Bicep curls; Shoulder press; Wall push offs; Leg slides; Step ups; Walking. As shown in Fig. 5, the interface at the start of the exercises allows the physiotherapist or the patient to customise the set of exercises, set the duration to their condition on the day and personalise it to the restrictions imposed by their co-morbidities. This is important on two counts: COPD patients often have other conditions such as heart disease and any exercises recommended by the physiotherapists should take this into account and attend to the overall condition of the patient without harmful side-effects; secondly, patients might feel poorly on certain days and might prefer less strenuous exercises on the day and should be able to alter the exercise regime accordingly.

Fig. 5.
figure 5

Pulmonary rehabilitation app: selection of exercises and number of repetitions.

Up-to-date information on the state of the patient is uploaded to the server which can be viewed by the Care Team. Sensor data is transferred automatically to the server via the mobile phone either via the WiFi or via the cellular network to the Cloud-based server. Information on the latest PR exercise is uploaded immediately or stored and forwarded if for any reason the mobile device is not connected. This does not rely on any intervention from the patient so that the Care Team have fresh information on their cohort of patients.

The design of the home-based pulmonary rehabilitation system was guided by the requirements of the end-users and the healthcare team comprising of physiotherapists, respiratory nurses, primary care physicians and the hospital pulmonologists. A participatory approach to design was followed in which a focus group of the healthcare team met to tease out the specification and early COPD patient users provided feedback on the design which was refined iteratively resulting in the final deployment design.

Some early adopters wanted two changes: on certain days the patients wanted to take a long walk in lieu of the exercises and wanted this facility to be included in the App design. Another set of patients wanted a dashboard at the start where they could choose which set of exercises they wanted to follow on that day and modify the period of each exercise accordingly.

Fig. 6.
figure 6

A display of the recovery of the Respeck respiratory rate during the resting periods and intensity of exercise activity during pulmonary rehabilitation.

The display of information for the healthcare team was guided by their clinical requirements. Figure 6 shows the elevation of breathing rates after each exercise and their recovery during the resting period. At a glance one can identify the relative durations of the different exercises, the intensity of the physical activity during the exercises, and the duration of intervening rest periods.

5 Analysis and Results

5.1 CAT Score Prediction Using Exercise Data

The CAT score captures the patient’s perception of their condition as recorded in the Diary App. Valid exercise blocks were identified 48 h of recordings around a CAT diary submission, as each CAT submission had to be associated with exactly one exercise block. In total, 20 out of the 31 investigated patients submitted diary entries with a preceding valid exercise block. Figure 7 shows the distribution of valid and invalid exercise blocks for each patient ID. The distribution of CAT scores is bimodal, with a high prevalence of high and low scores and a moderately represented middle ground, as illustrated in Fig. 8. This is due to the diary entries being consistently filled in by only a few patients which are either at the healthier end of the scale (4002, 4113) or at the unhealthy end of the scale (4019, 4103). The lack of CAT scores below 5 is explained by the fact that the study included only patients already diagnosed with COPD, and would therefore have a CAT score greater than 5.

Fig. 7.
figure 7

Statistics for each patient (denoted by the subject ID) for data extracted during 48 h before a diary entry.

Fig. 8.
figure 8

The distribution of CAT scores for all diary entries succeeding a valid exercise block in a time window of 48 h.

5.1.1 Labels and Feature Extraction

The following hypothesis was formulated: the CAT score can be predicted by the features extracted from the Respeck data during the PR exercises. The features considered for this task were:

  1. 1.

    The diary entries to derive the CAT score

  2. 2.

    The respiratory rate

  3. 3.

    Respiratory rate recovery slopes after an exercise session

  4. 4.

    The length of the rest periods between exercises

  5. 5.

    The intensity of activity during an exercise

  6. 6.

    Exercise execution features, such as speed and angle changes (denoting quick and large movements).

The feature correlation was calculated using the Pearson correlation coefficient and the features were ranked by their absolute coefficient value.

The highest coefficient value (−0.84) is achieved by the mean angles during the rest periods, suggesting that healthier patients might move around more during the rest periods. Other highly correlated features are the resting time length (0.78) and the breathing rate after each exercise (0.47–0.63). The prediction baseline was set as predicting the mean CAT score of all CAT score available in the dataset. The error measures used are the mean absolute error (MAE) and the root mean-square error (RMSE). The MAE measure weighs all deviations the same, whereas RMSE penalizes larger errors quadratically more than lower ones.

Fig. 9.
figure 9

True CAT scores vs predicted CAT scores obtained with a linear regression model fitted to only one activity feature.

The baseline results obtained from predicting the mean CAT score are 11.34 for MAE and 12.03 for RMSE.

As mentioned previously, the mean angular changes during the rest periods are a very good predictor for the CAT score. In fact, fitting a linear regression on the CAT scores using just this feature as an input can predict the labels with a MAE of 5.44 and a RMSE of 6.6, which is significantly better than the baseline, as shown in Fig. 9. The activity features during the exercise periods have a lower r-value than the activity features during rest periods, but the correlation of −0.38 for both the activity measure and angle changes during exercises suggests that healthier subjects typically perform more ample and faster movements than subjects with a worse health condition.

The length of the rest periods after each exercise had a high correlation coefficient of 0.78, suggesting that healthier patients (lower CAT scores) take a shorter time to rest between exercises. The length feature also obtained a MAE of 6.78 and a RMSE of 7.69 when used to predict the CAT score with a linear model.

The mean respiratory rate during resting periods has a correlation coefficient of 0.72 and suggests that a higher breathing rate during resting periods is an indicator of the worsening condition of a patient. Individual exercises have different average resting breathing rate measurements and our experiments show that the ‘Sit to stand’ exercise has the highest correlation coefficient, whereas the ‘Shoulder press’ exercise has the lowest correlation coefficient.

The variance of the respiratory rate is also a good predictor, with a score of 0.66, implying that patients with a more varying breathing rate report higher CAT scores.

In addition to the intuitive features discussed so far, spectra features consider the frequency components of the Respeck signal. Each spectrum covers a frequency range of about 0.05 Hz, and each exercise is decomposed in this range of frequencies. A high positive correlation value for a particular spectrum suggests that patients in a bad condition tend to move in that particular frequency range.

Figure 10 shows the distribution of frequencies for each exercise (x-axis) and their correlation coefficient (y-axis). For the walking exercise, the main frequency component is the walking speed, and the graph suggests that a speed of 0.5–1 Hz (1 step every 1 or 2 s) is highly correlated with less healthy patients. In contrast, healthy patients walk with a speed of 2 Hz (2 steps per second) up to a speed of 6 Hz (5–6 steps every second). The “sit to stand” exercise has very few positive coefficients, and the graph suggests that less healthy patients perform the movement in the 0.1–0.2 Hz category, implying one sit-to-stand motion in 5–10 s.

5.1.2 Linear Regression

As stated previously, a baseline model using solely the mean angles during the resting time feature as a predictor obtained a result of 5.64 (MAE) and 6.88 (RMSE).

The models trained on this task were an Ordinary Least Squares (OLS) regression, then included regularization factors to avoid overfitting in the Lasso Regression and Ridge Regression models. Finally, an Elastic Net was fitted to the data which contains both L1 and L2 regularisation factors.

The hyperparameter optimisation was achieved by splitting the dataset randomly into training (80%) and test (20%) sets. The training set was further split by 10-fold cross-validation. The RMSE measure used to determine the best hyperparameter for each model. Table 1 presents the results for all trained models, with reported MAE and RMSE scores on the test set. The extremely high MAE and RMSE values for OLS regression illustrate the negative effect of overfitting the data when training the model without regularisation terms.

Fig. 10.
figure 10

Correlation coefficients for the spectra of each pulmonary rehabilitation exercise in the frequency range of 0 to 6 Hz.

Table 1. Best MAE and RMSE for the four linear regression models, reported on the test set.

5.1.3 Regression with Artificial Neural Networks

Fig. 11.
figure 11

RMSE for different number of networks in the ensemble when using the mean predictions of the networks

Fig. 12.
figure 12

RMSE for different number of units in the two hidden layers (l1 and l2).

Regression using Artificial Neural Networks (ANN) was attempted using an ANN with one hidden layer and one unit cell for the output. The activation function for the hidden layer was chosen to be TanH for its empirically tested performance. The learning rate was set to 0.001 fixed across epochs and no regularisation terms were applied. The effect of adding more units to the hidden layer was investigated, and discovered that even the lowest values of RMSE, achieved at 3–7 units in the hidden layers, achieved worse results than the ridge regression.

Adding another hidden unit to the network proved to be beneficial, as it obtained a lower RMSE than the linear models, as shown in Fig. 11. The best performance was achieved for 40 units in the first hidden layer, and 85 units in the second hidden layer, with an RMSE of 4.144. Adding even more hidden layers only reduced the performance of the model. The RMSE and MAE performances of the 2 hidden-layer-network configuration on the test set, averaged over five runs, were 4.98 and 3.119, respectively.

To further optimise the performance, a neural network ensemble was implemented which ran the same neural network several times, with different weight initialisations, and took the mean of the individual predictions as the final prediction. Figure 12 shows the RMSE score for number of networks in the ensemble, the minimum being reached at an ensemble of 6 networks.

6 Conclusion

This paper has presented a novel approach to home-based pulmonary rehabilitation. The fiscal burden of COPD on the healthcare system was established and the reasons for poor adherence has been explained. The combination of a wearable device with a mobile App provides an IoT solution which addresses the barriers to poor compliance. The design issues together with data analysis using machine learning and the display of information to the healthcare team has been described. In conclusion, the home-based pulmonary rehabilitation system helps COPD patients to perform their daily exercises at home and for the healthcare team to monitor compliance and changes in the health status of the patients using the respiratory rate from the Respeck device as the key parameter. Future work will involve the use of the Respeck and the pulmonary rehabilitation system in large scale clinical deployment.