BluetoothTM Enabled Acceleration Tracking ( BEAT ) mHealth System : Validation and Proof of Concept for Real-Time Monitoring of Physical Activity

Physical activity is critical to improve the condition of patients with chronic leg and foot ulcers, especially those who are obese and experienced multiple co-morbid conditions. Unfortunately, these individuals are unable to engage in guideline based physical activity (PA) programs. A prototype of Bluetooth enabled acceleration tracking (BEAT) mHealth system was developed and manufactured for remote monitoring and stimulation of adherence to PA in deconditioned patients. The system consists of a miniature accelerometer-based sensor, smartphone application, and a network service. Validation testing showed high reliability and reproducibility of the BEAT sensors. Pilot study with human subjects demonstrated high accuracy of the BEAT system in recognition of different exercises and calculating overall outcomes of PA. Taken together, these results indicate that BEAT system could become a valuable tool for real-time monitoring of PA in deconditioned patients.


Introduction
Annually leg ulcers cost the US healthcare system in excess of $20 billion, additionally leading to an estimated 2 million lost workdays per year; one ulcer can cost more than $40,000 for medical care, possibly exceeding $1000 in patient out-of-pocket expenses [1,2].
Patients with chronic leg and foot ulcers, especially those who are obese and experienced multiple co-morbid conditions, are often physically inactive causing them to develop deconditioned legs that are weak and have reduced ranges of motion, especially of the ankle.Many leg and foot ulcer patients do not walk; they "shuffle" and generally move no more than a few steps at a time, and at distances of less than 5 feet.The majority use walkers, scooters, or wheelchairs leading to social isolation and lack motivation to engage in regular physical activity on their own.Often, these same patients have previously tried physical therapy but continued to suffer from deconditioned legs and ulcers due to poor compliance.
Physical activity is critical to improve the condition of their legs and promote wound healing.Unfortunately, these individuals are unable to engage in guideline based physical activity programs (i.e., supine cycle ergometry, walking, treadmill exercises offered through community exercise groups, etc.) most commonly recommended for ulcer patients.They are "left out" of typical physical activity programs due to inability to participate; most programs have problems with accommodation of patients with leg and foot ulcers.Furthermore, because de-conditioned individuals with leg and foot ulcers are unable to engage in these types of activities, personalized programs need to be developed.
In a recent physical therapy intervention study at Medical University of South Carolina (MUSC), results demonstrated that the lower legs of patients with ulcers have significantly reduced range of motion and strength.A statistically significant improvement in ankle range of motion, specifically dorsiflexion and leg strength (p = 0.03) was found in patients with a history of leg ulcers who participated in a videoconferencing physical activity coaching intervention delivered over the internet [3].
While the goal of the study was to test the feasibility of using the internet for the virtual face-to-face intervention, the "signals" of significance in function suggested that even with small doses of physical activity (one week), patients who were motivated and engaged (there was a statistically significant increase in self-efficacy during the study) were more likely to exercise.In order to properly examine a behavioral intervention to increase physical activity in a group of regular patient wound care an establishing outcome to objectively monitor movement, particularly small toe and forefoot movements is necessary; integration using a technology-assisted Mobile Health (mHealth) can help to monitor physical activity adherence and enhance healing.
In studies that measure adherence to physical activity, accelerometers are widely used.Researchers have demonstrated the reliability and validity as well as the utility of accelerometers to increase physical activity in patient programs using step count as a surrogate measure for energy expenditure (EE) among ambulatory patient populations [4,5].Moreover, accelerometers were used for motion and gesture recognition [6][7][8][9] and even were proven to be able to record fairly small movements (such as tremor [10]).
Nevertheless, developed PA monitors are typically designed to be stand-alone devices (with thus reduced motivation and control functionality), and only in rear cases researchers develop comprehensive feedback-oriented systems for remote patient monitoring.
A breakthrough in patients monitoring in terms of enhanced motivation and control functionality with reasonable solution cost can be achieved using smartphones [11] (widely spreading over cellular network users [12]).Such an mHealth solution can be useful and efficient for insufficiently motivated deconditioned patients with limited mobility to achieve improvement of PA adherence and enhance healing.Considering specific aspects of this population it has to comply with the following requirements:  High sensitivity-sensor must be able to record small accelerations corresponding to minute foot motions;  Small size-sensor must be small enough to be nested at foot or shoes;  Recognition of foot motions-system must be able to recognize prescribed exercise patterns based on forefoot movements proven to be efficient in wound healing;  Power efficiency-sensor battery lifetime must be reasonably long, so that under normal usage conditions patient could use sensor for at least a week on a single battery set;  Interactivity-device must be able to analyze patient's physical activity patterns, assess their compli-ance, and encourage them to exercise more in the case of poor compliance;  Telecommunication capabilities-device must be able to transmit physical activity data to their care provider, and retranslate clinician's recommendations to the patient.mHealth solutions were shown to be efficient for remote monitoring of patients and to provide enhanced feedback and motivation options [13]; however, personalized mHealth systems that fulfill all of the above requirements are not readily available.In response to the lack of monitoring devices specifically targeting lower leg activity for minimally active population, we report here a comprehensive mHealth system consisting of a wireless Bluetooth TM -enabled accelerometer tracking device (BEAT) with an application for Android-based smartphones and integrated web-services (Figure 1).Use of smartphone allows us to simplify BEAT sensor (and thus significantly reduce solution cost), miniaturize it, increase battery lifetime and enhance system functions since BEAT sensor mainly performs accelerometer data acquisition and their transmission to the smartphone while smartphone carries the load of data analysis, networking and communication between the patient and clinician.
The purpose of the current study was to design and test a prototype mHealth BEAT system and provide evidence of its reliability and validity.Furthermore, smartphonebased software algorithms for recognition of specific exercises were developed.Finally, the capabilities for participant motivation and feedback using a smartphone program are also described.

Materials and Methods
The BEAT (Bluetooth-enabled accelerometer tracking device) sensor consists of a 3-axis accelerometer (ADXL335, Analog devices Inc., MA, USA), microprocessor (PIC18F14K22, Microchip Technology Inc., AZ, USA) and a Bluetooth TM module (RN-42, Roving Networks, CA, USA).The accelerometer has dynamic range of −3 g -3 g and resolution of 0.006 g, and those parameters were found sufficient for foot minute movement detection application.A custom printed circuit board (PCB) was produced using Surface Mount technology to reduce physical footprint.
In the BEAT sensor (see Figure 2), acceleration data produced by 3-axis accelerometer are acquired by the microprocessor using on-board 10-bit analog-to-digital converter with a desired sampling rate which can be adjusted accordingly to experiment conditions.As a rule, sampling frequency should be 2 times higher than target frequency of measured events (5 -10 times higher for better detalization), so in this study for exercises (foot movements) with target frequency of 0.5 -1 Hz we picked sampling frequency of 10 Hz.The microprocessor also performs primary data processing and sends the processed data to the Bluetooth TM module, which in its turn transmits the data to the receiving Bluetooth-capable device (the smartphone).Power supply was provided by a CR2032 battery (Panasonic Industrial Company Applied Technologies Group, NJ, USA) with nominal voltage of 3 V and nominal capacity of 225 mAh.
Custom firmware was developed for the BEAT device to perform data collection and initial data processing.The developed firmware provides variable processor operation frequency, data acquisition rate, data buffering parameters and allows Bluetooth module operation at data transfer rates up to 57.6 KB/s.
In order to minimize volumes of data transmitted from BEAT sensor to the smartphone, a protocol for accelerometer data transmission over Bluetooth TM was developed.Assuming 30 bits of acceleration data per single data point (3 axes, 10 bits per each), it uses 6 bytes of data to transmit acceleration data, a checksum and a timestamp (to provide availability to synchronize the data in the case of partial data loss) to a smartphone.This protocol provides significant benefits compared to transmission of uncompressed data (~20 -30 bytes per datapoint) and thus decreases amount of energy used for data transmission.
Motorola Droid2 smartphone (Motorola Mobility Inc., IL, USA) operated on Android OS v.2.2 was used in the study.A special BEAT application was developed for this smartphone (see Figure 3) using Android SDK (Google, Inc., CA, USA).The application performs the following main functions:  Data acquisition from BEAT sensor via Bluetooth TM (using developed data transmission protocol);  Analysis of the data acquired from the BEAT sensor, recognition of specific exercise patterns and determination of major quantitative parameters (exercise intensity, duration, frequency, angles etc.);  Communication with the user (display exercise progress, output of exercise results, statistical data, transmission of incoming messages from the server and/or from clinician);  Compilation of exercise summary and uploading these data to a server using HTTP protocol.Data buffering and storage was implemented in order to prevent data loss in case of absence of Internet connection.
The exercise recognition mechanism implemented in the is based on determination of acceleration extrema, and comparison of "target" acceleration with signal threshold value, as well as "non-target" with noise threshold values.Sequence of "target" acceleration events was set based on exercise geometry.Additional correction for sensor displacement based on principal component analysis was added to increase signal and suppress noise caused by minor sensor displacement, and thus reduce the number of erroneous recognitions.Despite the relative simplicity of this analysis method, it was found to work well for recognition of two exercises used in the study.
The application is in an active state only when exercise session is in progress (~5 -10 sessions per day), it does not consume much energy.No significant influence of the app work on smartphone battery was noted during test.
A server for physical activity monitoring results storage and processing was deployed at Clemson University.It is based on Apache HTTP server (The Apache Software Foundation, USA), supports relational database (MySQL 5, Oracle, CA, USA) and runs PHP interpreter (PHP 5, The PHP group) that was used to perform data analysis and output results to clinicians.Developed server provides access for authorized users (clinicians) to patients' results, and can present these results in a variety of ways, including personal patient's progress, total/averaged exercise frequencies and durations and patient's compliance with prescribed training plan.
BEAT sensor reliability was tested with two main tests.First one was continuous (60 seconds) data acquisition from motionless BEAT sensor.Data acquisition was performed using MATLAB (The MathWorks, Inc., MA, USA), 3 data channels (x-, y-, z-components of acceleration) were recorded and signal standard deviations were calculated.This test was used to estimate level of noises (e.g., RF noises) and pick up proper data acquisition parameters.
Second test was used to evaluate inter-device reproducibility.A rotary shaker (MaxQ Mini 4000, Barnstead International, IA, USA) with 4 BEAT sensors attached was used.BEAT sensors were mounted in similar or different (random) orientations on the platform and placed onto a shaker plate (shaking frequency was varied from 45 to 75 rpm).MATLAB (The MathWorks, Inc., MA, USA) was used to acquire data from all participating sensors (via Bluetooth) simultaneously.Coefficients of variations (CV) were calculated for all 4 devices.In case of similar sensor orientation raw x-, y-, z-acceleration components were used for CV calculations, while in case of random BEAT sensors orientation accelerations obtained from different sensors were transformed into a uniform coordinate system using principal component analysis method thus eliminating difference in orientations of the devices, and thus transformed acceleration components were used for CV calculations.
General purpose of BEAT is recognition of rotational motions of patients' foot since these exercises can be done even by overweight patients with limited mobility and because these motions can be effective in restoring normal blood flow in a foot.Two exercises recommended to ulcer leg patients were chosen as the model ones for this pilot study.Exercise 1 consists of a horizontal rotation of foot (floor wiping) with target frequency of ~0.5 Hz and amplitude of ~80˚.Exercise 2 consists of a vertical rotation of foot in x-z plane (where z is "up" and x is "front" for the patient) of accelerometer with target frequency of ~0.5 Hz and amplitude of ~45˚.Patient is supposed to sit during both exercises and his heal should be pressed to the floor.These exercises were chosen because they include two key foot movements (longitudal and lateral rotations) and are recommended for leg ulcer patients.
A pilot validation of the BEAT system was performed with two healthy volunteers (MUSC IRB protocol #Pro00013314).BEAT sensor was attached to a slipper worn by a healthy volunteer (Figure 4).The volunteer was asked to perform exercise 1 or 2 with BEAT sensor on and simultaneous video recording to determine accuracy of motion recognition by the BEAT application.Initially volunteers were supposed to do 60 one-way motions to simulate 1 minute training session (with target frequency of 1 motion/second) for both exercises, but during the study it was found that not all volunteers were able to do exercise 1 for 60 times, and target number of one-way motions for exercise 1 was cut to 50 to maintain same amount of exercise motions for all volunteers.To check for potential false positives, in some exercise sessions BEAT software was set to recognize the incorrect exercise type (e.g., set to recognize exercise 2 while the subject was doing exercise 1).Thus, four different exercise sessions were used (see Table 1).After the end of every exercise session results were automatically uploaded by the BEAT app to a server and BEAT app motion rec-improvements of battery life.Increased buffer size would however lead to higher device latency, or lag between data acquisition and transmission.Variable buffer size implemented here allows BEAT to be used in different monitoring modes, depending on application.For example, choosing the buffer size of 120 B results in the latency of 2 sec and battery life of approximately 24 h of continuous use, appropriate for real time recording of short-term user-initiated sessions (assuming the session length of 15 min daily, the device would run without the need to change battery for up to 96 days).If 24/7 monitoring in passive mode is desired, increasing the buffer size to 10 kB would allow continuous monitoring for up to 10 days with latency time of 133 sec.ognition results were compared to those obtained from the video records.Each exercise set was performed three times by each volunteer.Results of the recognition by BEAT software were then recorded for each volunteer.
Additional test was performed to determine if BEAT app will provide any false positives in resting volunteers.
Volunteers were asked to sit still for 30 seconds, with BEAT sensor on and BEAT app set to recognize either exercise 1 or 2. Data obtained from BEAT app was tested for any false positives.Three replicates of this test were done by each volunteer.

Results and Discussion
The BEAT system was designed to be a convenient tool for remote monitoring of patients.Thus, all major parts of the system were designed and optimized to fulfill the requirements discussed above.The BEAT sensor was designed to have the following features: small size, high sensitivity and power efficiency.
Exercises for the target population generally include various feet rotations.Typically, small accelerations (both lateral and tangential) are required to perform these types of motions, so reliable detection of corresponding accelerations may be limited by poor accelerometer sensitivity.Thus, we performed evaluation of sensitivity and reliability of the BEAT sensor.Data acquisition accuracy Small sensor size was achieved by using small-size components.For instance, the accelerometer dimensions are 4 mm × 4 mm × 1.45 mm, and the microprocessor dimensions are 7.8 mm × 7.2 mm × 2 mm.This allowed us to design the PCB layout (and final device) with a size (from 20 mm × 28 mm) comparable to that of a quarter coin (see Figure 2

(b)).
Power efficiency was one of our priorities during design of the device.Thus, power-efficient parts were chosen to minimize on-board power consumption (accelerometer with approx.0.3 mA operating current and microprocessor with 0.6 -2 mA operating current).The most power-consuming part of the sensor is the Bluetooth TM module, which consumes up to 25 mA in working mode.To reduce power consumption by the Bluetooth TM module, data storage/buffering by the microprocessor was implemented, to ensure that Bluetooth TM module runs only when a package of data is acquired and ready to be sent, instead of power-inefficient continuous datum-by-datum transmission.For small data packages less than 30 kB (corresponding to 5000 of recorded events, 500 sec @ 10 Hz sampling rate), energy being consumed by the Bluetooth TM module to transmit a package of data is almost independent on the package size; thus increase in the buffer size lead to considerable  is determined by accelerometer parameters and the device design (including device firmware).According to the accelerometer specifications, its accuracy is 0.01 g. 10-bit analog-to-digital (ADC) conversion performed by the microprocessor was adjusted to have ADC accuracy same as that of the accelerometer (3 mV, equal to 0.01 g).
Actual accelerometer data can be (and typically are) affected by different noises (most of them are RF-noise picked up by the circuit and voltage deviations due to irregular power consumption by the Bluetooth TM module during data transmission).To eliminate this factor we implemented multiple acceleration acquisitions for every time-point with averaging thus obtained values.Increasing the number of replicates improves the accuracy but reduces the battery life.To determine optimal number of replicates, we performed experiments with motionless sensors.We found that when the number of replicates was 20 or more, signal deviations for x, y and z components of acceleration did not exceed 0.01 g thus corresponding to the intrinsic accuracy of the accelerometer.Further increase of the number of replicates would only lead to more power consumption, and therefore 20 was chosen as the optimal number of replicates and fixed in the firmware for further experiments.
A rotary shaker plate test with 4 devices was performed to evaluate reliability of the BEAT sensor.At all frequencies used (45, 60 and 75 rpm) sensors in similar orientations were found to give almost identical data (see Figure 5), and coefficient of variation calculated for all 4 devices (75 rpm) was found to be 0.8%.It should be noted, that observed error can originate from both sensor acceleration acquisition error and differences in device orientation.Therefore, a second test was carried out with devices mounted in different orientations.Acceleration values were processed to be comparable (moved into similar coordinate system) and coefficient of variation in this case was 1.1%.Therefore, reliability testing demonstrated that BEAT devices generate consistent acceleration data with sufficient (0.01 g) accuracy.These experiments also showed that consistent acceleration data can be obtained from BEAT sensors independently of their initial orientation.This finding is important because initial orientation of the devices during the exercise is expected to be variable for different patients and for the same patient in different PA sessions.
It was important to prove that BEAT has sufficient sensitivity to detect minute motions corresponding to both chosen exercises, so such estimations are provided below.
To recognize exercise 2 BEAT must be able to detect vertical rotary motions with desired parameters (−45˚ -45˚).To achieve that, the orientation angles of the device were calculated in the points corresponding to the maximal and minimal z acceleration according to Equation (1): where α xz is an angle between z-axis of accelerometer and gravity vector projection to xz plane of accelerometer, x-x-axis acceleration acquired by accelerometer, ggravity acceleration.Similar equation can be used to derive yz orientation of the sensor.Here and further-x axis was determined as patient "front" direction, y as "left", and z as "vertical" direction The amplitude of the motion was then determined from difference between the maximal and minimal acceleration, and averaged over the length of the exercise session.Angular resolution (and angular accuracy) for the angle range of −45˚ -45˚ (typical for our exercises) assuming 0.01 g accuracy of acceleration is less than one degree (ranged from 0.57˚ to 0.81˚) accordingly to (1).Acceleration diapason size for exercise with angular amplitude of 60˚ is expected to be ~0.9 g so it is significantly higher that accelerometer accuracy.The Equation ( 1) is only accurate when sensor movement acceleration is small in comparison with gravity, and it was found to be the case for foot movements during exercises described above, so this approach allows us to determine vertical rotations of patients feet with high accuracy in case of small accelerations and moreover, determine absolute orientations of feet during the exercises.Similar results could be achieved by using a gyroscope instead of accelrometer; however, use of a gyroscope would significantly reduce battery lifetime (typical current needed to supply a gyroscope exceeds 3.5 mA while entire BEAT sensor consumes only 1 -1.5 mA to supply both the microprocessor and accelerometer).
To ensure that accelerometer sensitivity enables it to pick up minute accelerations produced by foot motion, we performed the test in which healthy volunteers were asked to perform Exercise 1 relatively slowly.Accelerations recorded in this test ranged from −0.25 g to +0.25 g giving signal-to-noise ratio of ~25.Thus calculations, simulations and tests performed shows that accelerations produced during both types of foot exercises are well within the range of the BEAT susceptibility.
A smartphone application (BEAT app) was developed to collect and analyze the data from BEAT sensors (Figure 3).It allows a user to connect smartphone to the BEAT sensor via Bluetooth.Then patient is then prompted to choose the exercise they will do (according to the schedule prescribed by their care provider and stored by the BEAT app).After pressing the "Start" button, BEAT app begins acquisition and analysis of the data from the BEAT sensor.Results of the data analysis (number of exercises and confirmed session duration) are displayed on the smartphone screen so that the patient could monitor their progress in real-time and adjust their exercise technique if the BEAT app determines that the exercise is performed incorrectly.After pressing the "Stop" button the BEAT app discontinues data acquisition, calculates combined session outcomes, displays them to the user and attempts to send them to the secure server.If this attempt is unsuccessful, BEAT app stores the session outcomes in the smartphone memory until connection is available and the data are successfully transmitted.
The developed BEAT system (BEAT sensor + BEAT app) is able to perform adherence measurements for minimally ambulatory patients in real-time and thus differs from the majority of traditional commercially available accelerometers.In typical accelerometer designs, epochs (with typical values of 30 -60 seconds) are established that represent time-intervals of information.The realtime approach implemented in the BEAT system is expected to be more efficient by providing immediate feedback to the patient and providing the capability of automated encouraging messages from the centralized server as the PA therapy progresses.
A motion recognition algorithm was developed for BEAT app to distinguish between different exercises, to make sure correct exercise is performed and to determine cumulative outcomes, including the number of exercises done, average frequency, total duration, and motion amplitudes.The algorithm first adjusts the coordinate system and eliminates errors introduced by variability of the BEAT sensor orientation (sensor displacement correction).In the next step, BEAT app analyzes acceleration patterns and matches their parameters with the prerecorded ones for currently selected exercise.If they matched, program records exercise parameter and keeps monitoring until next exercise is observed or user fin-ishes the session.The following recognition parameters are used for analysis: threshold intensities, maximally acceptable noise/incorrect signal ratios, exercise interval/ frequency limits (both minimal and maximal).In case of incorrect exercise (e.g.patient performs exercise 2 instead of exercise 1 set in the app) acceleration pattern parameters do not match, and no exercise is recorded, even though acceleration extremas are observed and found.Using the same algorithm, BEAT app is able to recognize pauses during the exercise and exclude them from the total exercise duration.
A pilot validation of the BEAT system was performed with two healthy volunteers as described in the Methods section.No false positives were recorded in resting volunteers.Exercise sets were designed assess accuracy of recognition by BEAT software.The outcomes reported by BEAT app were compared to those determined from reviewing the video records.Notably, acceleration patterns from different volunteers doing the same exercise were very similar (Figure 6).It is possible however, that variability will be much larger in a larger scale study with deconditioned patients.Should that happen, we plan to perform orientation session with the participants prior to the beginning of the study.In these sessions, we will: 1) Teach the participants to perform the prescribed exercises correctly, and 2) Individually adjust the parameters in the recognition software (acceleration thresholds and target exercise frequencies/durations) for each of the participants to recognize patient-specific patterns for each of the exercises.
The results of the validation study are presented in Table 2.It can be clearly seen, that developed BEAT system showed high accuracy of distinguishing between different exercises for each of the subjects.If needed, accuracy can be further improved by application of individually adjusted filters for each of the subjects.Number of false positives was found to be below 3% for exercise 1, and below 1% for exercise 2. Detailed analysis of the acceleration components showed that these false positives originate from incorrect foot orientation during the exercise and in some cases because of misalignment of the sensor on the slipper.If number of false positives increases in a larger scale study, it can also be improved by individual adjustment of parameters in the recognition software.
Testing also showed that the data were uploaded to the server almost instantly after the end of each session if the smartphone had a regular 3G or Wi-Fi Internet connection indicating that the BEAT system is applicable for real-time monitoring of the subjects.

Conclusion
To conclude, we developed and manufactured a prototype

Figure 2 .
Figure 2. Scheme of the BEAT sensor (a) and a photograph of the manufactured device (b).

Figure 4 .
Figure 4. BEAT sensor attached to a slipper worn by a healthy volunteer.

Figure 5 .
Figure 5. Acceleration data obtained by two sensors during shaker plate test (x axes of accelerometers, 45 Hz rotational speed).

Figure 6 .Table 2 .
Figure 6.Exercise accelerations recorded for two healthy volunteers, exercise 1 (a) and exercise 2 (b) patterns (scale is similar for both volunteers).Table 2. Results of the validation study.Positive recognition -percentage of recognized exercises when BEAT app was recognizing exercise of same type as user was actually doing; False positive recognition-percentage of exercises erroneously recognized as correct while user was doing incorrect exercises.Actual number of exercises was determined using video recording.Average for two volunteers Exercise 1 Exercise 2 True positives, counts 309/300 363/360 False positive, counts 7/360 1/ 300