Remote Patient Monitoring in Home Environments

Introduction

As the average span of life increases, people at the age of 65 or older are the fastest growing population in the world. The share of people aged 65 years or over in the total population is projected to increase from 17.1% to 30.0% and the number is projected to rise. The healthcare system in the developed countries is growing under pressure and will not be efficient enough to provide a reliable service on the health treatment for this aging population. Even though wireless sensor networks research was initially driven by military applications, more recently, the medical community is the one showing more interest in the applicability of this technology to the development of telemedicine health care systems.

The requirements for  reliability, flexibility and portability make wireless sensor technologies particularly attractive for telemedicine applications.

The main goal of this project was to create a homecare framework with the following requirements: design simplicity, reliability, low cost and with the less possible user interaction as possible.

High Level Design

Our system has four elements: a corporal device, an environment monitoring appliance, a wireless gateway and a server. The corporal device detects the patient vital signs (temperature and heart rate) as well as its activity. The environment appliance senses the patient environment temperature  and light conditions. All the data gathered from the sensors is sent over a wireless Zigbee link to the Gateway. The data is then recorded on a MySQL database located on the server. The figure shows the system components diagram.
Components diagram
The monitoring system is composed by the sensor devices, the gateway, server and graphical user interface for visualisation and data managing. After deploying the sensor devices (corporal and environmental), we need to plug to the server the USB ZigBee gateway, and then run the connection python script. After this, all the data received by the gateway is treated and stored in the database. The application has three main users, healthcare professional, patient and family member. The healthcare professional can create a new patient, link a given corporal device and environment device to a patient during a certain period of time, insert diagnostic or process notes for a patient, view patient data and create patient and family member login. The patient can insert the symptoms that he is feeling at the time and view his log in real time. The family member can view the patient real time data.
Block diagram

Hardware design

All system components were built using low cost hardware. Size and shape of the corporal device were considered to improve the device usability. For the device data processing and control we used a Sparkfun WEE based on the Arduino platform. This is a prototyping platform based on flexible, easy to use hardware and software. The WEE has an ATmega168V micro controller running at 8 MHz and 8Kbytes of in-system programmable flash. For power supply we used two AA batteries with 5V DC-to-DC step up. For data transmission we used the WEE serial communication capabilities. This hardware is programmed using the Arduino development environment.
For temperature sensing we have used a DALLAS DS18B20-PAR 1-wire Parasite-Power digital thermometer. The digital thermometer has a unique 64-bit identification code, it provides 9 to 12-bit centigrade  temperature  measurements, communicates over a 1-wire bus and it has an operating temperature range from -55o C to +100o C and is accurate to ±0,5oC over a range of -10oC to +85oC.
Temperature sensor

For patient activity monitoring we have used a Freescale Semiconductor MMA7260QT ±1.5g-6g Three Axis Low-g Micromachined Accelerometer. The accelerometer measures acceleration and gravity induced reaction forces. The accelerometer is an analogue sensor which outputs its data value as an integer from 0 to 1023. It outputs a value for every axis (X, Y, Z), which corresponds to the measured acceleration.
Activity Sensor

For the light sensor we use a simple circuit, a LDR (Light Dependent Resistor) and a 4.6 kOhm resistor.
Light Sensor

The wireless link between the devices and the gateway is established using the ZigBee Technology (IEEE 802.15.4). The ZigBee defines a set of communication protocols developed for small and low power digital radios. We have choosen the MaxStream XBee pro radio for the ZigBee communication.
Xbee Pro

Corporal device

The corporal device was assembled using a prototype board and some wiring to connect the components. It is composed by a WEE microcontroller, a three-axis accelerometer, a digital temperature sensor, a XBee pro radio and the power supply. With 10x6x2.5 cm and weighing 150g the device can accommodate all the components and be wearable without causing too much discomfort to the patient.

Corporal device circuit

Corporal device

The corporal device should be placed above the patient right hip, pointing up, because this is the location in the human body with less position changes during activity.

Corporal device

Ambient device

The environment device is composed by a microcontroller, a XBee pro radio, a digital temperature sensor and a LDR – Light Dependent Resistor to detect light conditions. By gathering the patient environment sensor data, it’s possible to frame the received patient vital signs and activity within its surroundings. For instance, we may statistically link the patient activity or some physiological changes to the environment light conditions.

Ambient device circuit

Ambient device

USB-ZigBee Gateway

The gateway is a XBee pro radio with a USB interface connected to a server which receives the data sent by the sensor devices and stores it in a MySQL database. The gateway has a wireless coverage area of 300 meters indoor and 1500 meters outdoor; this makes it suitable for in home monitoring.

XBEE PRO

Software Design

Digital sensors output a formatted value; however, analogue sensors output a value from 0 to 1023. Raw data read from the analogue sensors must be pre-processed in order for the readings to make sense to the application. Sensors raw data is processed in the device and then transmitted to the gateway.

After a series of tests, where the volunteered subjects performed their daily routine activities, we were able to select the following main activities identified by the accelerometer:

  • Standing
  • Sitting
  • Walking
  • Running
  • Laying down (Sleeping)
  • Falling

Processing all this data takes a lot of processing power, and being ours a low cost approach, less processing power is available. So, the objective was to find a way of classifying activity without a lot o processing.

For determining the activity pattern values, the volunteered subjects performed their activities and we recorded the raw accelerometer data into the database. One value for each axis was reported by the accelerometer every 100 milliseconds. After several runs, 200 values for each activity were selected. The analysis of the graphics generated by the stored data, allowed us to understand that single values have no meaning; sets of values, however, could be used to determine pattern activities. Nevertheless, different activities may sometimes produce similar sets of values, so it was important to find another characteristic that, combined with the set of values could identify, without any doubt, a given activity. Further graphical analysis allowed us to recognize that the value of each axis could also determine an activity. So, the set of values and the correspondent axis can determine accurately the current activity.

The next challenge was to decide how large should be the set of values; if it is too small it will not allow to identify a pattern, but if it is to large the risk of overlapping different activity patterns increased. So a set of values cannot be longer than the fastest occurrence of an activity. In fact, the activity that takes less time to occur is a fall (about one second). Based on this, we selected a set of 10 values.

The following graphics represent the Raw data from the accelerometer for different activities, the fall occurs only between readings 33 and 43; after that the volunteer subject lies down on his stomach.

Walking

Walking raw data

Falling

Fall raw data

Standing

Standing raw data

Having the sets of values we required a formula for transforming each set of values into a single value without losing it’s meaning. The statistical variance was the best way to do it, but calculating the variance for the set of values of each axis, would give us three distinct values. Hence, the average between these values would give us a single value that could be used to identify an activity. We have called this value VAI which stands for Value for Activity Indicator. The variance and VAI formula are shown below:

VAI Formula

The accelerometer values vary from subject to subject, and it is impossible, for example, to walk exactly the same way all the time, so we needed to identify a list of range values for each activity. Therefore using the VAI formula and the raw data previously acquired we built with the following table.

Stand,Sit,LayingDown walk Run Fall
Min 0 450 50000 15000
Max 120 5000 48000

From the table above we realize that stand, sit and laying down activities have the same VAI range. So we use the axis values, for instance, for lying down back the x and z- axis must return almost the same value, x must be lower than 420 and y-axis value must be lower than the x-axis value. With this definition most activities can be well identified by a simple algorithm. However, the identification of a fall poses some problems. Sometimes running is miss- identified as fall and a fall may be misidentified as running. To solve this problem we added to the algorithm an activity matrix that incorporates known situations in which a fall occurs, e.g., if someone is running and in the next second is laying in his stomach it is feasible to say he suffered a fall. So we filled the matrix with several of these scenarios. The matrix is composed by: two past activities, the activity to analyze, two future activities and the activity we wish to identify. In real time an array is filled with the activities identified by the accelerometer readings. This array has two past activities, the “present” activity to analyze and two “future” activities. The array is then compared with the matrix. If we have a match with a sequence of events in the matrix then the algorithm outputs the corresponding activity. If we do not have a match, the algorithm decides, based on the single window of data for the “present” activity. In reality, the detection has a delay of 3 seconds, because we need to wait for two more future readings before making a decision.

Results

Testing

The system was tested by four subjects, two male and two female. The following table represents the subjects characteristics.

Subject height Weight Age Sex
Subj 1 1,60 m 65 Kg 89 Female
Subj 2 1,73 m 67 Kg 86 Male
Subj 3 1,71 m 58 Kg 25 Female
Subj 4 1,86 m 80 Kg 27 Male

The test subjects performed several tasks of their day-by-day life and the detected activities where recorded in a database.

Accuracy

The following table shows de accuracy in detecting  the activities of the test subjects.

Detected Activities
Activity Stand Walk Sit Run LieDown Fall
Total 30 40 20 20 20 10
Subj 1 30 40 20 NP 20 NP
Subj 2 30 40 20 NP 20 NP
Subj 3 29 38 20 12 19 3
Subj 4 30 40 20 14 20 3

NP – Not performed

After the use of the known scenarios matrix the fall detection improved from 30% to 60%, adding more know cases to the matrix will improve even more the detection. However, it can cause some false positive detection. Running activity detection has a rate of 70% accuracy, this numbers can be improved by adding known case for running to the matrix. All the other activities have 95% detection accuracy. However, when tested on an elderly subject, and being that our main objective, due to their degraded motor skills, the activity detection improves for near 100%.

Web interface

The figures below show an example of the web interface for patient data visualization.

Figura web 1

Figura web 2

Figura web 3

Conclusion

To design an ambulatory monitoring system, several aspects must be taken into account, reliability, cost, security and user friendliness. By acquiring some ECG, heart rate and other medical sensor equipment we can cover all vital signs, increase the number of applications maintaining the low cost approach. Fall detection can be improved increasing the number of known position in the matrix. A trial and error approach can be used to achieve the maximum detection reliability without too much false positives. This way the system can be reliable and remain low cost.

Appendix

Budget and Parts List

Parts Price Quantity Total
Arduíno wee 19$ 2 38$
MMA7260QT 19,95$ 1 19,95$
DS18B20-PAR 4,25$ 2 8,50$
XBee Pro 60mW 37,95$ 3 113,85$
XBee Explorer USB 24,95$ 1 24,95$
Breakout Board for XBee 2,95$ 2 5,9$
AA battery 2,95$ 4 11,8$
5VDCtoDC stepUp 2x AA 10,95$ 2 21,9$
Light sensor 1,5$ 1 1,5$
Total: 246,35$

References

http://inmotion.pt/store/
http://www.arduino.cc/
http://www.sparkfun.com/
http://www.zigbee.org/