Remote Monitoring and Fall Detection - Semantic Scholar

3 downloads 0 Views 146KB Size Report
Springer. 15. Vicente Tocino, A. et al. (2009) Personal Health Monitor. New Directions in Intelligent. Interactive Multimedia Systems and Services - 2, pp 465-475.
Remote Monitoring and Fall Detection: Multiplatform Java Based Mobile Applications Miguel A. Laguna, Javier Finat GIRO and MoBiVAP Research Groups, University of Valladolid, Campus M. Delibes, 47011 Valladolid, Spain [email protected], [email protected]

Abstract. Life quality of dependent persons is associated with personal autonomy and mobility, between others parameters. But the development of mobile applications for autonomy support is a challenging activity. Some of the challenges are the diversity of target platforms (including display sizes, keypads or tactile screens variations in each platform), and the limits in memory size, processing resources, battery duration, etc. For these reasons, a software product line (SPL) approach can provide a considerable advantage in mobile application development. This article presents a SPL that makes possible the remote monitoring of dependent people to facilitate their autonomy. Wireless sensors allow real-time information such as heart rate or oxygen saturation level to be controlled. Risk situations, including fall detection, critical in elderly persons who live alone, can also be detected. In the SPL approach, only the required features are incorporated in each concrete product (avoiding the device overload with a resource-costly extensive solution). The article presents an Android/Symbian based SPL architecture, using Bluetooth wireless sensors connected to a Smartphone. The mobile system is able to detect alarm situations and is remotely connected to a central system, aimed for its use in elderly residences. Keywords: remote monitoring, fall detection, mobile application.

1

Introduction

The mobility of dependent people can come into conflict with frequent monitoring of health parameters under medical supervision and with risk detection. The increased costs of care and the geographic dispersion favor the deployment of personalized health services based on low cost ubiquitous systems, accessible to more people while reducing the medical costs. Consequently, one of the most interesting applications of mobile devices is the development of systems that increase the personal autonomy. These technologies have generated huge expectations but we should ensure that their costs are reasonable. The key point is that personalization of each application to the (person/sensors/mobile device) combination can be unaffordable in terms of cost and development time. To make things worse, multiple platforms for mobile devices are appearing and evolving continuously (and several display sizes, color depth and variations in keypads or tactile screens can share the same platform). For these

2

Miguel A. Laguna, Javier Finat

reasons we are working in a set of projects aimed to apply the product line paradigm of software development to the specific case of customizable mobile systems. Software product lines (SPL) combine systematic development and the reuse of coarse-grained components that include the common and variable parts of the product line [3]. Tough successful, this approach is complex and requires a great effort by the companies that take it on. The research we carry out in the GIRO group aims to simplify the change from a conventional development process towards one that benefits from the product line advantages. For this reason, we proposed to use the standard UML package merge relationship to represent the SPL architecture variations with conventional CASE and IDE tools [8]. We have used that approach with several mobile systems. The requirements for a remote monitoring SPL were presented in [7]. This paper reports the practical experiences in the implementation of this SPL for remote monitoring systems for dependent people, using a combination of sensors, Android and Symbian based mobile devices and a central server that can be consulted in real time from anywhere by medical personnel using a standard Internet browser. A distinctive characteristic is the use of conventional CASE and IDE tools, a precondition imposed by our goal of simplifying the adoption of the SPL paradigm. In particular, we have used Java/Eclipse and the Android and Symbian platforms for the implementation of the remote monitoring SPL. Only a specific plug-in is required to handle the feature models and the configuration process, distinctive of the SPL approach. The personnel involved vary from postgraduate students to undergraduates finishing their term projects but, in any case, not specialists in SPL development. The rest of the article is organized as follows: Section 2 briefly presents the technique used for the SPL design and implementation, based on the package merge relationship of UML. Section 3 is devoted to the description of the remote monitoring SPL. In Section 4 the related work is analyzed and, finally, Section 5 concludes the article and outlines future work.

2

Software Product Lines and the Package Merge Relationship

The specific SPL techniques are aimed to handle variability and traceability at each abstraction level of the product line. The product line development requires models that represent the SPL variability and a mechanism to obtain the configuration of features that represent the best combination of variants for each specific application. Additionally, the optional features must be connected with the related variation points of the architectural models that implement the SPL through traceability links. This explicit connection allows the automatic instantiation of the SPL generic architecture into each specific application. This is derived from the complete architecture selecting or not each optional feature, fulfilling the concrete set of functional and nonfunctional requirements. The selected feature sub-model, through traceability relationships, guides the composition of the pre-existing code packages. The precondition for the success of this process is the existence of traceability links from features to design and from design to implementation. Our solution to this problem [8] consist of expressing the SPL variability of UML models using the package merge relationship, defined in the UML infrastructure

Remote Monitoring and Fall Detection: Multiplatform Java Based Mobile Applications 3

meta-model. This mechanism permits a clear traceability between feature and UML models to be established. The technique consists of associating a package to each optional feature, so that all the necessary elements that model the feature remain located in a package (maintaining the UML meta-model unchanged and separating both variability levels). The resulting package model is hierarchical, reflecting the feature diagram structure. Considering each pair of related packages, the dependent package can only be included if the base package is also selected. Therefore, the application to SPL consists of building the architectural model (including structural – class diagrams-, behavioral -use cases-, and dynamic –interaction diagram- models) starting from a base package that gathers the common SPL aspects. Then, each variability point detected in the feature diagram originates a package, connected through a merge relationship with its parent package. When each product is derived, these packages will be combined or not, according to the selected feature configuration. Additionally, using C# partial classes (or an adapted version of Java) organized in packages, a direct connection between design and code can be established. Therefore a one-to-one relationship from features to design and from design to implementation is recorded. As an added value, the package structure of the code for each final product of the SPL can be obtained automatically (and passed to the compiler) from the features configuration [8]. To achieve this, making the technique readily accessible to developers, we use the FeatureIDE plug-in for Eclipse [6] that allows using Java classes in a similar way to the native C# partial classes. This can be a good solution for mobile devices that use Java as their preferred language. In the case of our SPL, we have designed a platform independent architecture and subsequently we can implement different platform specific SPL designs for C# (Windows Mobile platform) and Java (Symbian and Android platforms). The Java version requires two different implementations, due to the characteristics of the Android platform that do not use the standard Java ME facilities, in particular the standard user interface libraries. We present in this article the details of the Android and Symbian versions of the SPL.

3

Multiplatform Remote Monitoring Product Line

The product line was planned initially with independence of any particular platform and the requirements were presented in [7], together with a first prototype, developed in C# for Windows Mobile devices. However, due to the greater presence in the market of the Android and Symbian Smartphones, we decided to implement the complete SPL using Java for these platforms. Apart from continuous monitoring, other eventual situations can be considered. The possibility of cancelling an alarm signal or manually raising one (Panic Button) should be included in most systems. On the other hand, in aged people, accidental falls represent a frequent risk, that can be detected with an accelerometer based sensor and an adequate algorithm. An experimental prototype was developed with a set of requirements, validated by the medical staff of a senior citizens’ residence that collaborates with us in developing monitoring systems. This experimental system used a well known gamepad as accelerometer connected via Bluetooth with a

4

Miguel A. Laguna, Javier Finat

workstation (no libraries were available to connect a windows mobile device in a simple way). The .NET platform and C # were used to develop the system, due to the ease of integration with the available libraries. The experimental version was intended for home scenarios (or a small residence), since the limits are defined by the Bluetooth connection range (a maximum theoretical distance of 100 meters, much less in practical situations). The results were satisfactory both in fall detection and false positive rejection [9]. This experience has been very useful for the integration of the WiTilt sensor in the remote monitoring SPL. The WiTilt sensor is a professional tri-axial accelerometer with a standard communication protocol accessible from any mobile device using Java o C# languages and common Bluetooth libraries [16]. Finally, a set of platform related decisions must be taken. Some important differences concern device types (smart or conventional phones, PDAs, etc.) and operating systems (Windows mobile, Android, Symbian tactile and keypad based devices, etc.). These requirements lead to an implementation with a hierarchical package structure. The SPL base package support the continuous monitoring of patients. To prevent failures, the right operation of sensors is verified in the mobile device. If local or remote validations fail, alert signals are raised. Once validated, the sequence of values is analyzed, comparing the read values with the intended range as set by health professionals. A module allows rules to be configured that use customizable calculations to detect risk situations alert. Alarms can be generated in the presence of critical values for original or calculated values, and then this information is sent (combined with the last available location is the positioning feature is also selected) to the central system. The elapsed time from the moment of detection until the alarm is sent allows the person to cancel the alarm if it is a false positive. The system shows also locally each sensor’s data and risk state. The generic positioning package must be combined with the GPS or Wi-Fi variants (or both), to get the patient location directly in devices equipped with built-in GPS or using an approximate position obtained from the existing indoor Wi-Fi antennas. Other packages add the fall detection or the remote configuration features. The distributed architecture of the system has been designed and implemented following the scheme of Figure 1. The data are collected by the mobile device and sent to the central system using a Web service via http. If a situation reflects abnormal parameters or a possible fall, the mobile device indicates to the patient the problem and after a few seconds an alarm is generated to be sent to a central system using the Web service. The Web service saves the received data in a Database that is used by a typical Web application, accessible from any Internet browser. The coordinates that the mobile application sends to the Central System are used with the Google Maps API to represent the position of the monitored person inside the residence (or its outdoor position). The architecture fulfils usual constraints relative to customized configuration, the use of Web services for communications between the mobile device and the central system, and security in data transmission. Security in Bluetooth transmission is granted by associating the sensor to a unique device (password required) during configuration phase. On the other hand, secure Web services are similar to the HTTPS standard.

Remote Monitoring and Fall Detection: Multiplatform Java Based Mobile Applications 5

Mobile Device

Central System Web Service

Mobile Application XML SOAP

DB

Web Application

HTML

Work Station Web Browser



Google Google Maps

Fig. 1. Deployment diagram of the generic monitoring system

Due to the experience of the development team and the advantages of using the enhanced Visual Studio/FMT platform, the first prototypes were initially developed using PDAs and Smartphones that support Windows Mobile. Java/Eclipse and the FeatureIde plug-in have been used to develop the alternative implementations for the Android and Symbian platforms. The Java versions have been developed in parallel for the two platforms. Both have a common part that is basically the domain model but, however, each platform uses different user interface frameworks. The support libraries for Bluetooth communications are also specific for each platform. In the Symbian version we use standard Java ME to implement a simple interface. In the Android version, the native activities and XML definition of the user interfaces are used. The techniques used for adding optional parts to the user interface are based on dynamic addition of widgets. An array of widgets (or menus) can be complemented dynamically using the optional code incorporated in each package. Figure 2 shows an example of the user interface for a product configuration in Android. In both platforms, health parameters, such as heart rate and oxygen saturation, have been evaluated and controlled by software using the data sent from a commercial wireless sensor. Also the GPS and indoor Wi-Fi positioning module for integrated devices and Bluetooth/Wi-Fi communication features have been implemented. WiFi/3G is used to communicate directly with the central system using a Web service. If there is no Wi-Fi connectivity, alerts can be sent using SMS messages directly to a configurable telephone number, covering the risk situations when the Internet connection is unavailable. In the case of Symbian, an additional application developed in C++ must be included, due to Java ME restrictions.

6

Miguel A. Laguna, Javier Finat

Several configurations of the SPL have been deployed for different Symbian (Nokia 5800) and Android (Samsung Galaxy, HTC Hero) mobile devices. The sensor used (Figure 2) was a Nonin Bluetooth pulsi-oximeter [12] that provides heart-rate and oxygen saturation values. The fall detection package has been developed for the Java platforms implementing the algorithm presented in [9] using Bluetooth communication with the WiTilt sensor (Figure 2). Bluetooth communication and GPS positioning are managed using the platform native libraries.

Fig. 2. Main form of a configuration in Android, the pulsi-oximeter sensor, and the tri-axial accelerometer (external and internal view) used in the SPL

Finally, Figure 3 shows the user interface that medical personnel uses to monitor the location of a patient (using the Google Maps API), the alarms raised, and the graphical representation of the monitored parameters (in the example, the oxygen saturation). The use of standard SOAP based Web services to communicate with the central station has the advantage that no changes are needed in the server when an application is configured for a new mobile platform. Also in the server, the monitored data is made persistent using a database. Finally, a conventional Web application makes the data available to medical staff using an Internet browser. The Web service and the Web application for monitoring were developed using ASP/.NET and SQL Server under Windows but is used transparently by the three mobile platforms.

4

Related Work

There are many works that use mobile devices and sensors for remote monitoring [10] [15], including commercial solutions [5]. Most of these works are ad hoc solutions, valid for concrete platforms and sensors. However, we are mainly interested in generic or configurable approaches comparable to ours. Some of these works provide design patterns and generic tools for SPL design and configuration in the mobile domain. For example, in [4] some architecture patterns were specified in a platform independent and adaptable way. Also generic, [11] present a requirement analysis for

Remote Monitoring and Fall Detection: Multiplatform Java Based Mobile Applications 7

mobile middleware, based on a product line approach, including mobility concerns that should be addressed to customize the compliant platforms versions.

 

Fig. 3. Generic view of the implemented architecture of the SPL monitoring system and the user interface as seen by the medical personnel

Changing the approach, Anastasopoulos [2] uses Aspect Oriented Programming (AOP) as an alternative for building Java ME product lines. The same AOP technique is used by [1] in the context of an industrial mobile product line. These proposals need specific techniques and languages that are not usual in a typical software company. Though these solutions are valid, the learning of new modeling or implementation techniques and the need of specialized CASE and IDE tools represent barriers for the adoption of the approach of product lines in many organizations; we therefore believe that the UML/conventional IDE solution presented here improves the abovementioned proposals.

5

Conclusions

In this work the viability of a product line development approach to customizable mobile system has been shown. The use of the package merge relationship and partial classes (adapting the Java language) enables the automated generation of each product from the features configuration. Furthermore, the use of conventional CASE and IDE tools can simplify the adoption of this paradigm, avoiding the need of specific tools and techniques as in previous alternatives. The approach has been successfully applied to the design and implementation of a product line in the domain of remote monitoring, implemented with mobile devices. The remote monitoring systems can facilitate the autonomy of dependent people. Heart rate or oxygen saturation data are obtained with wireless sensors. Risk situations (deduced from those values or from a fall suspicion) can also be detected. The diversity of individual situations and the resource limitations of mobile devices favor the use of the SPL paradigm. In the context of a senior citizen residence, we use a combination of sensors/mobile devices with a monitoring central server accessible

8

Miguel A. Laguna, Javier Finat

from any Internet browser. The personnel involved were last year undergraduate students and recent graduates. Some of these had professional experience but they were not specialists in SPL development. The orientation of the author was enough to accomplish the feature modeling, the only specific SPL technique used during the development process.

Acknowledgments This work has been founded by the Spanish MICIINN (TIN2008-05675 and BIA2009-14254-C02-01).

References 1.

2.

3. 4. 5. 6. 7. 8. 9. 10. 11.

12. 13. 14.

15. 16.

Alves, V., Matos Jr, P., Cole, L., Borba, P., Ramalho G. (2005). Extracting and Evolving Mobile Games Product Lines. In Proceedings of the 9th SPLC'05. September 2005. Springer-Verlag. Anastasopoulos, M. Muthig. D. (2004). An evaluation of aspect-oriented programming as a product line implementation technology. In Proceedings of the International Conference on Software Reuse (ICSR), 2004. Bosch, J. (2000). Design & Use of Software Architectures. Adopting and Evolving a Product-Line Approach. Addison-Wesley. Cho, H., Yang, J.S. (2008) Architecture patterns for mobile games product lines, International Conference on Advanced Communication Technology, ICACT. pp. 118-122. Ericsson Mobile Health: http://www.ericsson.com/hr/ict_solutions/e-health/emh FeatureIde (2011): Eclipse-Plugin for Feature-Oriented Software Development. Otto-vonGuericke-Universität Magdeburg. http://www.fosd.de/fide Laguna, M.A., Finat, J., González, J.A. (2009) Remote Health Monitoring: A Customizable Product Line Approach. IWANN (2) 2009: 727-734 Laguna, M. A., González-Baixauli, B., & Marqués, J. M. (2007). Seamless Development of Software Product Lines: Feature Models to UML Traceability. GPCE 07. Laguna, M. A., Tirado, M.J., Finat, J., Marqués, J.M. (2010) Fall Detection Systems: A Solution Based on Low Cost Sensors. Proceedings of ICSOFT 2010 Lubrin, E. Lawrence, E., Navarro, K.F. (2005) Wireless Remote Healthcare Monitoring with Motes, International Conference on Mobile Business (ICMB'05), pp. 235-241. Morais, Y., Burity, T., Elias, G., (2010). Towards a mobile middleware product line: A requirement analysis. In ITNG2010 - 7th International Conference on Information Technology: New Generations. Nonin (2011). Pulse Oximetry Monitoring. http://www.nonin.com/PulseOximetry. Salva A, Bolibar I, Pera G, Arias C. Incidence and consequences of falls among elderly people living in the community. Med Clin (Barc) 2004;122(5):172–6. Sochos, P., Philippow, I., & Riebish., M. (2004). Feature-oriented development of software product lines: mapping feature models to the architecture. LNCS 3263 (pp. 138152). Springer. Vicente Tocino, A. et al. (2009) Personal Health Monitor. New Directions in Intelligent Interactive Multimedia Systems and Services - 2, pp 465-475 WiTilt (2011). SparkFun Electronics. http://www.sparkfun.com/products/8563