Remote Mobile Health Monitoring System Based on Smart Phone and Browser/Server Structure

A remote mobile health monitoring system with mobile phone and web service capabilities is proposed in this paper. It provides an end-to-end solution; specifically, (1) physiologic parameters, including respiration rate and heart rate, are measured by wearable sensors and recorded by a mobile phone which presents the graphical interface for the user to observe his/her health status more easily; (2) it provides doctors and family members with necessary data through a web interface and enables authorized personnel to monitor the patient’s condition and to facilitate remote diagnosis; and (3) it supports real-time alarming and positioning services during an urgent situation, such as a tumble or a heart attack, so that unexpected events can be handled in a timely manner. Experimental results show that the proposed system can reliably monitor the physiologic parameters and conveniently report the user’s position.


INTRODUCTION
As the demand for health care rises rapidly, traditional diagnosis services have become insufficient. With the rapid increasing of the elderly population coupled with a longer life span, e-health is targeted to provide low cost and everyday household usage [1]. In fact, the Remote Mobile Health Monitoring (RMHM) system has become a research hotspot in recent years. Using the wearable physiologic detection technology, it is possible to monitor the user's health condition in real-time. Furthermore, long-term and continuous detection is also achievable. Since it can help doctors to implement regular monitoring and remote diagnosis on time [2,3], RMHM will not only improve the patient's quality of life, but also reduce the burden of the medical system and the cost of public health [4,5].
acute situations. It also alerts medical professionals to respond to emergency cases. An RFID reader is used for entry/exit while a camera is used for vision-based emergency detection. Likewise, LAURA [25] performs localization, tracking and monitoring of indoor patients with WSN. For such systems, the main drawback is that the additional PDA is indispensable and the MICAz motes cannot support the patient's mobility.
In recent years, mobile phones have become an increasingly important platform for the delivery of health interventions [26]. Chan [27] proposed a multi-agent architecture comprising of intelligent agents for cardio monitoring. It relies on the GSM network to collect patient data. Intelligent agents send diagnostic information and recommend medical interventions. The software stack for Chan's architecture is based on the Symbian operating system, while the server-side agent is programmed in Java 2 Micro Edition (J2ME) and Java 2 Enterprise Edition (J2EE). Another system [28] was developed specifically for the elderly patients. A call from a mobile phone to a server computer can initiate transmission of a graphical chart via cellular data communication.
One of the most important capabilities of mobile phones is their ability to connect to the Internet from almost anywhere. This means that the user data can be uploaded to remote servers as soon as it is captured, thus enabling early detection of critical events. Based on the mobile phone, a pervasive health system [29] was proposed to support selfmanagement of chronic patients during their everyday activities. It integrates patient health monitoring, status logging for capturing various problems or symptoms, and social sharing of recorded information within the patient's community, aiming to facilitate disease management. However, the system cannot provide the patient's position information in an emergent situation. The information conveyed by the user to micro-blogging services is realized by combining predefined tags, which is not as convenient as a webpage.
When emergent situations occur, it is necessary to know the patient's accurate location. For outdoor situations, GPS devices can provide positional service effectively. However, it is energy consuming and does not normally work in an indoor environment. In contrast, Wi-Fi networks can be used to provide indoor positioning service. In recent years, model-based localization [30,31,35] and fingerprint-based location [32][33][34] have become more common. Lim [30] proposed to deploy a Wi-Fi network detector at a known position. By analyzing the received signal strength (RSS) from different Access Points (APs), a map is drawn based on path-loss model. Madigan [31] used the Bayesian hierarchical model to reduce the number of training positions. As a result, the computational complexity of localization procedure is effectively reduced. However, these algorithms need to model the coordinates of the building, and all of the APs' coordinates must be known. The procedure is too complicated to be put into practice. In contrast, fingerprint-based localization is a more effective solution. By collecting wireless network information around an unknown position and matching it with the established fingerprint map, the position of a moving target can be estimated. Park [32] used the Thiessen polygons planning to improve the accuracy of moving target localization. Li [33] adopted a hierarchical clustering method to partition the RSS space for Wi-Fi-based indoor localization [34]. The information about the location was ranked in a hierarchical way by identifying the building, floor, room, and geometric position.

720
Remote Mobile Health Monitoring System Based on Smart Phone and Browser/Server Structure Generally, the fingerprint localization methods adopt previously stored maps of the signal strength at several positions to determine the target position by similarity functions and majority rules. Most of the above algorithms need to survey the building layout. Besides, the scale of a fingerprint database is often too large, and in turn the location matching process is computationally intensive and time-consuming. Therefore, they lack practicality and flexibility. In this paper, we propose a new algorithm for indoor localization with Wi-Fi signal via mobile phone.

SYSTEM ARCHITECTURE AND PERFORMANCE REQUIREMENT 3.1. System Architecture and Working Mode
As a multilayer system, the architecture of the proposed RMHM system is shown in Figure 1. As shown in the bottom tier, the portable terminal is worn by the patient. It is capable of sensing and dealing with one or more physiologic signals. For example, the motion sensor is mainly used to judge whether the patient is performing highintensity activities or possible falling. Heart rate sensors can determine whether the patient's body status is normal. If abnormal status is detected when the patient is moving, the system will immediately issue an alarm to avoid an unexpected situation. The middle tier represents the smart phone, which employs the Android operating system. Physiologic data acquired by the portable terminal can be displayed on the smart phone screen. If necessary, it can also issue a vibration and voice alarm. With Android software embedded in the smart phone, the patient's position can be determined by GPS or Wi-Fi. In an emergency situation, the patient's moving track can also be recorded in the webserver database and displayed on the webpage. In this paper, Bluetooth protocol is employed as the communication channel between smart phone and portable terminal.  Figure 1.
RMHM system architecture consisting of three functional parts, including a portable terminal, smart phone, and remote server.
The upper tier, representing the remote server, provides a fixed communication channel for smart phones. This channel consists of network configuration and management functions. It can also implement the terminal registration, initialization, and security customization, etc. Data received from smart phones will be stored in a predefined format to form complete medical records. To provide convenient observation, the server software adopts B/S architecture. The webpage is used to display the real-time monitoring information for doctors and family members who are authorized to access the data. The monitored information contains physical characteristics, variation curves, and location. Patients can query specific information at any site via internet browser. The proposed RMHM system provides two working modes: (1) Normal status monitoring -The information and data from patients will be recorded in a smart phone, which can display the curves. For this mode, the information will be sent to a remote server either when a Wi-Fi network is available, or when the doctor sends a request.
(2) Emergent response -If there are abnormal phenomena, the smart phone will send out an alarm message and will turn into emergency mode. The status and information will then be continuously updated with real-time positioning. The doctor can take quick action before anything else happens to the patient.
For the demands of portability and comfort, the mobile network is used to implement the data transmission between smart phone and webserver. This will be discussed below in detail.

Portable Terminal
For patients, especially the elderly, physiological indexes, such as heart rate and body posture, need to be monitored in real time. A reliable and easily carried device is the key to effective health care monitoring. As the basic functional unit of the RMHM system, the portable terminal is integrated with sensors for heart rate, respiratory rate, temperature, acceleration, and posture.
In this paper, the Zephyr BioHarness TM sensor, a commercially available device, is adopted as the portable terminal, as shown in Figure 2. With no need for multiple devices, it captures comprehensive physiological data such as ECG, breathing, RR 722 Remote Mobile Health Monitoring System Based on Smart Phone and Browser/Server Structure

Figure 2.
Portable physiological sensor is ergonomic, small, and lightweight, with powerful battery support and no limitation to daily activity. The sensor has both data transmission and storage capabilities.
interval, heart rate, respiration rate, skin temperature, posture, vector magnitude peak acceleration, breathing wave amplitude, 3-axis acceleration, and activity level. With a small size of 80 × 40 × 15 mm 3 and a weight of only 35 g, it can be fixed on the user's chest with a belt (Figure 2). Each sensor is assigned with a unique Bluetooth address for identification and data link. The storage capacity is up to 480 hours at the sampling frequency of 200 Hz. The battery can support continuous monitoring for at least 8 hours. The portable terminal communicates with a designated smart phone via Bluetooth protocol at a data transmission rate of 1 Mb/s. Since its wireless signal is very strong, the data sampling can be implemented even during aggravating activities and harsh environments.

Smart Phone (Visualization Terminal)
To avoid additional equipment, a smart phone is adopted as the hardware platform for the visualization terminal. This makes it convenient for users to observe their own status. The function diagram is shown in Figure 3. Even when the patient is involved in outdoor activities, he/she can easily observe his/her physical signs and location via smart phone. As shown in Figure 4(a), the user can have a clear understanding about his/her status and the surrounding environment. On the screen, HR, RR, ST, POS and PA represent heart rate, respiratory rate, body surface temperature, posture information and active state, respectively. Electronic map's Application Programing Interface (API) and floor map are combined to implement real-time localization. At the same time, received data can be saved by smart phone so that the previous dynamic curves can be queried and  Smart phone work flow. After verification and configuration by the interface program, data sent from the portable terminal will be processed for specific application. Verification function determines whether the data are sent from its only matched terminal. Configuration function can carry out time synchronization to ensure real-time performance and data effectiveness.
analyzed. This will give the user a comprehensive understanding of his/her body status, as shown in Figure 4(b). In order to ensure the patient's security to the utmost extent, a threshold value is adopted. Once a vital sign is beyond the normal range, the smart phone will immediately send out an alarm message.

Indoor Localization Algorithm in Smart Phone
For emergency situations, the patient's position information is necessary and useful for fast response. In the background of the health-monitoring, most patients are considered to be in either a hospital or other indoor environment. Since GPS can only provide outdoor positioning data, we adopt a Wi-Fi fingerprint localization method based on important access points (IAP) for indoor environments. Considering that the positioning application in this paper is not for coordinate, but for room, the Nearest Neighbor (NN) method is adopted. According to the signal propagation model, Wi-Fi signal strength will be attenuated with the transmission distance. It will also decrease dramatically when there are obstacles, especially concrete walls. In different rooms, the detected RSS value range also shows obvious differences. Wi-Fi location fingerprints contain a large amount of Wi-Fi signal strength information. Among them, the APs that have strong signal strength will be considered the important features of the fingerprint, namely the IAP.

724
Remote Mobile Health Monitoring System Based on Smart Phone and Browser/Server Structure  Different APs are generally deployed in different rooms so that the overall distribution is relatively scattered. The signal strengths of Wi-Fi APs detected in different rooms will show apparent differences. Referring to the uniqueness of the Wi-Fi signal collected at a particular position, the Wi-Fi fingerprint can be used as a characteristic of the location information.
Field experiments show that, in the Wi-Fi covered indoor environment, it is easy to detect a plurality of AP signals. In two adjacent rooms, random samplings at optional positions are conducted 109 times. The detected AP and its corresponding RSS value are recorded. Three detected APs are selected to conduct the comparison. Due to fluctuation and the intrinsic property of the smart phone, certain AP signals may not be detected at a specific place occasionally. In this case, RSS value will be set to the default value of −120 dB. For different rooms, a comparison of the Wi-Fi signal strength is shown in Figure 5. It is observed that AP1 is placed close to Room1 and far away from Room2, with AP2 on the contrary. AP3 is a widely covered wireless network provided by the mobile service provider. In Figure 5, the detected RSS values in adjacent rooms have a significant difference for effective APs such as AP1 (blue curves) and AP2 (green curves), while for AP3 (red curves), the difference is much smaller between the two rooms. The AP with the strongest signal strength will show obvious differences at different places. According to the above experiment, Wi-Fi signal in each room has unique distribution that can be used to provide a positioning service for the users.
Since Wi-Fi signal is easily influenced by environment interference, it is necessary to implement multiple samplings and data filtering for every sampling point. In this paper, we adopt the iterative recursive weighted average filter [36]. It has satisfactory smoothness and is adoptable for smart phones owing to low computational load and small memory requirement. With the sampling period and frequency represented by T s and f, respectively, the number of data sampled in T s is: Before applying any filtering technique, an effective AP should be selected. During the sampling period, if the detected time N T s (ap) is below the specified threshold N th , related APs should be discarded and marked as interference AP. (2) For the sampled data, every useful AP corresponds to N T s (ap) RSS value, which is always fluctuating. Let Rssi(n) represent the detected n RSSI values for one of the fixed APs. Then, the iterative recursive weighted average filter operates as follows: Step 1: Initialization Step 2: If n = 2, then If n>2, then go to Step 3. Step3: Step 4: Here, [β 1 , β 2 ] and [β 3 , β 4 , β 5 ] are weighted coefficients: For a smart phone, the AP with the strongest signal strength is selected as IAP. The room, whose reference fingerprint has the highest similarity with the unknown fingerprint, will be selected as the estimated room. The algorithm is mainly divided into two stages, the offline database establishment and online positioning.
In order to clearly describe the characteristics of Wi-Fi signal strength, multiple sampling points need to be set at different locations in each room. For each location fingerprint, the APs will be sorted according to their signal strength so that each fingerprint's AP information can be queried quickly.
For online positioning, the important fingerprint of unknown position is analyzed. The similarity calculation synthetically considers the nearest neighbor distance and AP repetition rate. The similarity is calculated as below: (13) where D i indicates the distance between the unknown fingerprint and the screened fingerprint. The AP's signal strength can be acquired and expressed as S = (s 1 , s 2 , …, s n ), where n indicates the number of the AP. S is then matched with the fingerprint data in the database. Letting i represent the number of the reference fingerprint point, the fingerprint distance can be calculated as: (14) where s j represents the strength of signal sent out by the jth AP and received by the smart phone. f ij represents the signal strength sent out by the ith AP among the fingerprint vector F. When q = 1, D i represents the Manhattan distance. When q = 2, D i denotes the Euclidean distance. In practical application, the value q can be selected according to the requirement and the positioning accuracy. Experimental results show that the NN algorithm's positioning accuracy will not improve significantly as q increases. Generally, when q = 2, the positioning effect is better. Hence, the q value is selected as 2. The algorithm's implementation procedure is shown in Figure 6.

Remote Sever
The remote server software consists of two parts: (1) Client/Server(C/S) software; it mainly realizes data receiving. When the smart phone sends data to the server, PC software parses and stores the data into the database. (2) B/S software; as the core of PC program, it transfers the physiological data and position information to the database and displays them on the webpage. Authorized doctors can use portable devices or computers to access the webpage via Internet, wherever available. Vital signs and position information of multiple patients can be viewed graphically. When specific values exceed their respective thresholds, the server can also give alarming messages. The information interface at the webpage of the remote server is shown in Figure 7. For emergency situations, the patient's position in the building is displayed with the floor map, so that the doctors or physicians can observe the patient's position over a period of time. When a patient is selected, the user will enter the interface of physiologic curve. As shown in Figure 8, the real-time curve interface can be seen when the doctor logs in the specified linkage. The curves displayed on the left side include heart rate, respiration rate and body temperature. Therefore, the doctor can understand the physiological variations over a period of time. The patient's upper body posture and acceleration information are displayed digitally on the right side. Therefore, the patient's activity status can be viewed clearly and easily. For instance, a patient keeps normal status until his/her upper body posture changes suddenly. If the posture status remains horizontal for three minutes while the acceleration is zero, he could have possibly fallen to the ground.
With B/S structure, the user interface can be implemented through the WWW browser. It supports multi-user access at any time and any place. Therefore, the system has great flexibility and convenience [37].

RESULTS AND DISCUSSION
A series of experiments were conducted to verify the proposed RMHM system's stability and precision. To certify whether our portable device could perform like a professional sensor, we implemented some experiments and performed data analysis, as shown in Figure 9. For different situations such as walking, running, sitting, and sleeping, related user data are sampled with the portable terminal and professional device. Experimental results show that the portable terminal can attain the accuracy of 96.73%, 94.85%, 98.15% and 99.8% for heart rate, skin temperature, respiration rate, and posture, respectively. Therefore, the accuracy and reliability of the portable terminal are established.
Vital sign data displayed on the remote server. The "body temperature" means the shell temperature.
Except for sensing performance, data transmission between the smart phone and remote server also plays a very important role in guaranteeing the data reliability and real-time performance. During the test, a few "gaps" randomly appeared at the physical sign curve. Compared with the database, it is found that these "gaps" are caused by communication fluctuations of mobile network. Therefore, it is necessary to perform experiment and analysis on the mobile network. The data transmission rate of the Third-Generation (3G) network varies from 300 Kpbs to 2 Mbps, while that of a Wi-Fi network varies from 11 Mbps to 54 Mbps. The average rate of packet loss is defined as the evaluation standard of network transmission quality. The network packet-capture tool is used to continuously grab data packets sent by smart phones. In order to avoid randomness, the operation is repeated for 1000 times. The experimental result in Table  1 shows that Wi-Fi (1.52%) has a lower packet loss than 3G (6.51%). As for transmission delay, it is obtained from the time stamps of both the smart phone and  Figure 9.
Comparison between our portable device and professional sensors.
remote server. Both 3G and Wi-Fi have quite small delays, which do not cause serious influence on the system's real-time performance. In order to test the power consumption, two groups of tests are conducted when the smart phone is idle and busy, respectively. According to the experiments, 3G communication consumes more energy than the Wi-Fi network. Considering the factors above, Wi-Fi is obviously appropriate for data transmission, but there is no significant difference. Since 3G networks have more extensive coverage, they can provide an alternative when Wi-Fi is not available.
To investigate the opinion of potential users on the proposed RMHM system, a questionnaire, as shown in Table 2, was developed and distributed to patients at the outpatient clinic of the hospital. The proposed system was demonstrated to patients by various formats including slides, prototype systems, and technical demonstration. The survey included 65 participants, 42 males and 23 females, with an average age of 65.4 Journal of Healthcare Engineering · Vol. 6 · No. 4 · 2015 731 years (variance was 38.8 years). All participants were smart phone owners and actively concerned about the overall condition of their health. This part of research was approved by the local ethics committee, and all participants signed an informed consent. According to Table 2, the responses to the questions are mostly positive. In particular, there were no negative responses to question 1, "Would you like to use your mobile phone to monitor and record your health-related information for better disease management?". Running the software will consume a part of the resources of the mobile phone, including Central Processing Unit (CPU) load, storage space, battery life, etc. The result shows people are willing to use these resources for the RMHM software. The responses to question 2, "Would you like to share your vital information with your family and doctors?" underscores the importance of privacy concerning personal health. When asked, "Would you mind wearing our portable sensor all day for better disease management?" about 50.5% of the patients were concerned about the inconvenience of it, according to the responses to question 3. Therefore, the comfort of the device is an important factor to consider in regards to the RMHM system. The responses to question 4, "Do you think recording vital information helps to manage the disease?" were mostly positive, which suggested that the potential users believe recording vital information is useful in disease management. The responses to question 5, "Would you like to use the demonstrated product in the future?" indicate that over 66% of patients are willing to use the RMHM system in the future.
Alarm activation experiments were conducted regarding the heart rate monitoring function. The normal range for resting heartbeat is 60∼100 beats per minute. A resting heart rate above 100 beats per minute may be classified as "tachycardia." As shown in Figure 10, the status after a short-range sprint is used to simulate "tachycardia" under 732 Remote Mobile Health Monitoring System Based on Smart Phone and Browser/Server Structure Figure 10. Alarm is triggered when heart rate exceeds the threshold. When certain physiological datum is beyond the threshold, the PC server and smart phone will send out an alarming message.
resting status. The portable terminal worn by the patient can successfully detect the variation of heart rate. At the same time, the smart phone and remote server can immediately send out alarming messages when the heart rate exceeds the threshold. Posture information plays an important role in judging whether the patient needs a succor. The tri-axis acceleration information is used to obtain the depression angle. Through essential calculation and filtering, the posture from 180° to −180° can be obtained with 0° corresponding to the fully upright status. Experiments were conducted to verify the posture perception's accuracy and real-time performance. The result is shown in Figure 11. When the posture changes continuously from −180° to 110° (which is intentionally set larger than the actual range for experiment requirement), the portable terminal can accurately follow up the real situation. At the same time, Figure 11 also shows that there is a certain delay for the sensory data compared with actual pose. The average delay is 1.27 seconds. It is within the acceptable range.
Since it is easy to get position in an outdoor environment, the system's positioning performance is analyzed and discussed for indoor environment. An experiment was performed in Northeastern University. If the patients are in another indoor environment, the proposed system can also provide similar service. The building has many APs deployed inside but not every room has an AP. For each room, multiple AP signals can be acquired. Carried by the users, the smart phone is used to determine the received signal strength. According to the structure shown in Figure 12, there are total 5 floors and 125 rooms in this building. Eight to fourteen sampling points are randomly selected in each room to establish the fingerprint database.
In order to verify the accuracy of the positioning algorithm, localization experiments were conducted for 300 times. In each experiment, a fingerprint is extracted from the database. At the same time, its record in the database is removed. The selected fingerprint is regarded as the actual location that will be matched with the rest of the fingerprints in the database. For further analysis, let us represent the index of the AP with the strongest signal strength. The positioning result is shown in Table 3. When M f = 1, only the first IAP in the database will be selected to match the first IAP of unknown fingerprint. When M f = 2, the first two IAPs in the database will be chosen to match the first two IAPs of unknown fingerprint. The situation is similar when M f = 3. With M f increasing, the matching procedure gradually narrows down the scope. Therefore, the calculation complexity will be decreased. It can be seen from the statistical results that the localization algorithm can achieve the highest accuracy when M f = 2. The reason is that the search range is still large when M f = 1. Positioning results will be influenced by the interference fingerprints. In this case, some deviation will be inevitable. When M f = 3, the search range is so small that some mismatch conditions will occur. Therefore, when M f = 2, the search range is reasonable and the positioning accuracy is acceptable.
For M f = 2, the positioning error is shown in Table 4. For 19 out of the 25 wrong estimations, the estimated position is just around the target room. It shows that the positioning algorithm can provide effective position indication.