Multi-Agent Power Management System for ... - Semantic Scholar

1 downloads 143277 Views 605KB Size Report
based portable Embedded ECG Wireless monitoring device with LabView ... sents a great advantage. Advantage of such multi-agent systems improves the.
Multi-Agent Power Management System for ZigBee based portable Embedded ECG Wireless monitoring device with LabView Application Damir Šoštarić1, Goran Horvat1 and Željko Hocenski2 1 Department of Communications Department of Automation and Process Computing Faculty of Electrical Engineering, J. J. Strossmayer University of Osijek Kneza Trpimira 2b, 31000 Osijek, Croatia {damir.sostaric,goran.horvat,zeljko.hocenski}@etfos.hr 2

Abstract. The techniques of multi-agent system bring intelligence and flexibility to embedded agent/multi-agent embedded system connected to internet presents a great advantage. Advantage of such multi-agent systems improves the use of expanded infrastructure. Installing simplified agents in embedded systems was shown necessary due to increasing use of embedded devices. Multiagent power management system is based on battery control and anticipation of replacement. Wireless transmission of ECG (electrocardiogram) signal via ZigBee (XBee modules) brings some problem into focus. This paper presents concept realized and tested on real equipment. Using smart mobile phone (today a widely used device) interaction/actoric between end user embedded agent and embedded master agent can give feedback about end users health in realtime. Similar, off-line monitoring device exists, but not connected to the network (Holter). Monitoring of patients in real-time can be enabled by such device that exhibits wireless communication and allows transmission of real-time source signal. The agent on which this paper refers to is program/firmware function in program code in small embedded system for monitoring ECG signal. Simplified agent activates the watchdog for battery alert. Main focus is to control the power consumption of WSN (Wireless Sensor Node). Power management has the intelligence middleware and allows timely to respond and inform the end users. Artificial intelligence is integrated in master agent that is element of embedded system cloud and a primal high level layer. Secondary layer is integrated in dedicated servers which respond to device clouds. LabVIEW application for signal processing provides robust and efficient environment for resolving ECG signal processing problem. These tool/application can be also used in other biomedical signal processing applications such as Magnetic Resonance Imaging (MRI) and Electroencephalography (EEG).

Keywords: embedded agent and multi-agent system, power management, ECG device, ECG application, embedded device cloud.

adfa, p. 1, 2011. © Springer-Verlag Berlin Heidelberg 2011

1

Introduction

Electrocardiography today is still indispensable diagnostic method in the detection of various cardiovascular diseases with adults and children. With this method an electrical activity of the heart during the cardiac cycle is recorded and interpreted. The history of these diagnostic methods dates back to 1887 when psychologist Augustus Désiré Waller used capillary electrometer and got first electrocardiogram. Netherland’s doctor and a physiologist Willem Einthoven (1903) constructed a precise galvanometer with wire and specified standard drains and thereby set the standards of routine examination method. The whole electrocardiography is based on simple addition and subtraction of vectors and registering additive vectors on the body surface. Myocardial depolarization in the electrocardiogram corresponding QRS complex showed on Fig. 1. P wave is atrial depolarization, T wave or ST segment represents the repolarization, [1].

Fig. 1. QRS complex With standard electrocardiogram according to Einthoven triangle, Fig. 2., the movement of the additive vectors is monitored in two planes: frontal (standard leads I, II, III, AVL, AVF, AVR) and sagittal (precordial leads V1-V6), [1]. Besides the standard electrocardiogram recording, today in the diagnosis of various heart diseases other modifications are also used. ECG in other modification seeks to capture paroxysmal events such as transient ischemia or paroxysmal arrhythmias which may endanger the life of the patient. With Holter ECG device a 24-48 hour off-line monitoring is enabled. Telemetry represents two options for medium access. Through the use of XBee Series 2 and XBee PRO Series 2 (S2B-programmable freescale microcontroller) embedded system is realized. Integration method of embedded agent on end user device has requirements for source-code development and firmware on demand of multi-agent manager system which is then polled in the form of middleware.

Fig. 2. Vectors in two planes of Einthoven triangle, [1] Embedded system usually contains a low power microcontroller. XBee modules contain the freescale programmable microcontroller and connection is proposed. Body network area can have interaction through ZigBee (default) and Bluetooth (used small module). In case of a Holter device, the used microSD card is not suitable for on-line monitoring [2, 3]. Holter device can be converted into a wireless monitoring device by installing XBee module. Using microSD card’s Serial Peripheral Interface (SPI) the data can be bridged into a standard serial RS232 interface. The incoming data on the SD card is routed through the wireless channel and sent to one of the device clouds. Embedded agent located in end user node responds to the monitored value (usually current) of power consumption and informs main dedicated device cloud server. Except the device cloud server on high level of layer, a primer high level layer of embedded device cloud exists. Such cloud system is identical to network oriented hierarchy of technical process in many automated factories. That cloud system has operating system (OS) and can contain artificial intelligence. Algorithms and custom self learning segments become easier for integration through graphical programming interface [4]. Embedded systems are generating increasing volumes and variety of data. These devices are typically found on the "edge" where the "machine" meets the real-world. Many examples of embedded systems "on-the-edge" can be found across a range of industries such as industrial automation, process control, manufacturing, mining, farming, energy, medical, consumer electronics, air-traffic control, transportation, warehousing, gaming, and home automation, among others. Historically, edge-device (end user) networks have been isolated from the rest of the corporate information-technology (IT) infrastructure and the Internet. With the emergence of cloud computing, IT compute and storage resources can be provisioned on-demand, without human intervention. The resource usage can be measured, and the resource pool can be elastically scaled up or down to match the demand. This is resulting in a drastic reduction in the cost of IT, and creating an opportunity for new types of applications that become possible by connecting the edge devices to the cloud core. The elastic and scalable cloud-computing infrastructure is perfect complement for processing massive amounts of data generated by the edge devices, that can vary

based on the real-world demands. Once the edge data from a variety of sources enters the cloud infrastructure, "Big Data" techniques can be used for intelligent processing of massive data volumes. The new types of applications that become possible include monitoring and management of the edge devices, real-time analytics and data mining, ability to match pricing with demand, condition-based predictive maintenance, controlling/influencing real-world behavior, and new value-add services.

2

Implementation of embedded agent and global multi-agent system infrastructure

Integration of an embedded agent in the end user device is performed by compiling the software code. This code contains the algorithm implemented through one or more functions. Recording device for ECG signal has a programmable microcontroller which in itself may recursively read the state of power management. Checking the state of the battery voltage, and power consumption RF part of the microcontroller can achieve a sleep mode that satisfies the working conditions. Alerting an individual agent can also encourage the communication of other agents in the range ZigBee environment. Body PAN area represents the blue area in Fig. 3 with four scenarios of end users: Nr.1. Represents embedded device to measure the ECG signal and it is the half duplex system in terms of ZigBee infrastructure. Appending computer allows the user to login and supervise measured parameters via on-line SCADA (supervisory control and data acquisition) system. If the user has no access to the computer and the ZigBee network is not available this is considered to be a disadvantage. Nr.2. Such end users system represents an improvement compared to the previous system because the user is enabled almost real-time communication via SMS message and alarming system with personal physician. Additional integration of GPS modules in end device enables the accurate positioning of the patient if wireless system records hart disorder. Nr.3. this scenario using the optional USB Dongle XSticker monitoring and timely response is secured, although there is no ZigBee network toward coordinator. The above scenario applies to the use of computers in the field range of ZigBee transceiver. Nr.4. fourth scenario involves two wireless technologies: ZigBee and Bluetooth. When a ZigBee network is unavailable with the Bluetooth module integrated in the end device its allowed communication to the mobile device or computer. With the development of Android applications is enabled communication by 3G and SMS services for data exchange as well as informing the feedback from the embedded device cloud.

Fig. 3. Global multi-agent system infrastructure

In order for agents to exchange packets within the Cellular and WLAN integrated Multi-agent manager system who "squats" and wakes up to the individual required interrupt routines. On the first upper layer it is possible to realize Company and Home interfaces which are identical to the Smart House embedded systems. Since they are static, they are linked via Ethernet and dual 3G/HSDPA module [5]. Using dual channel information from the end user to device cloud the data is delivered to higher layer of embedded device cloud. Dynamic link for ZigBee is foreseen with installation of a mobile multi-agent system. Mobile agent/multi-agent system is connected via three channels: Cellular network, WLAN and via Iridium satellites. It is also reported as an ConnectPort X4 device cloud, but a mobile agent ConnectPort X5; [5] itself is dedicated embedded router device to cloud. Multi-agent manager system represents the second communication layer while the Distribution Agent is responsible for monitoring data within the cloud device. The highest hierarchical element is Embedded Device Cloud precisely because on the embedded device itself is installed a cloud operating system support. This provides greater distribution and data security with respect to dedicated servers. Embedded agent on the ECG device is presented in Fig. 4 a). Power consumption of end device and agent reaction is showed on Fig. 4 b), [6]. Microcontroler “wakeup” from sleep mode (agent reaction on external interrupt) is realized in program code in few lines of code. Each peak on Fig. 4 b) represents the data sending. Within the Freescale microcontrollers one or more functional routines exists: checking the consumption and calculating and assuming the battery life. Each embedded system is available to the dispatcher (Embedded master agent) who shares priorities to the distribution agent in charge of supervising the activities of - device cloud.

a) b) Fig. 4. a) Laboratory model of end user device, b) End device power consumption

3

Agent and multi-agent power management system

Commonly monitored parameters are temperature, humidity, pressure, vibration intensity and finally vital body function. With vibration is possible to measure “g” force in all three axis. Additional gyroscope integrated on developed board gives information about drift and detection of fast motion of body. There is a need for constant supervision in medical ECG monitoring applications. With prolonged exposure and use of the device there is additional need for using an agent to alert the consumed

energy of batteries. Power management can be integrated on each end user device or on the first upper layer. It is customary that on a first upper layer is located a multiagent manager in different platform systems. The first available platform definitely must include the ZigBee coordinator, which is located in (CPX4) ConnectPort X4 and (CPX5) ConnectPort X5. This kind of scenario (Fig. 3) also represents a mobile multi-agent structure. By measuring voltage and with indirect current measurement system is able to assume an active working hours of battery in a particular mode. With application for power management it is possible by prediction establish battery discharge curve. 3.1

Application for power management

Application for consumption control is typically integrated into an agent. Agent in end device can be custom programmed via direct programming of wireless sensor node (WSN) or uploading python script remotely, Fig. 5. Python file is programmed in CodeWarrior and control is available for agent, multi-agent and mobile multi-agent systems. Custom programmed uploaded python file represent inputs of voltage and current (indirectly measured from one of A/D inputs). This input values with integrated pole placement regulator, build dynamic logout/actor for transceiver RF hardware unit. Possibility of installing applications with GUI (graphical user interface) and API (application programming interface) is enabled by remote access to virtual embedded server residing on the coordinator (CPX4 or CPX5). Using the web interface it is possible to modify the firmware and achieve custom view. In addition to this layer, applications for power management can be dislocated into a higher layer, which is available to embedded master agent. Such agents are integrated into the operating system and have more processing power because they are not limited by power consumption. For example, the platform uses Crossbow coordinator that is running on Debian Linux, [7]. Terminal access allows installation of additional application, which is the main GUI interface for control of the measured parameters.

Fig. 5. Remotely web interface for uploading python file

3.2

Location of embedded agent in microcontroller architecture

The architecture of end user device is based upon a chosen core of the microcontroller. Concept note is based on two electronics application methods, Fig. 6. The first version of the XBee Pro S2B module represents a solution to the IOA (Instrumentation Operation Amplifier). XBee PRO S2B solution is better because it contains fewer components, and an integrated Freescale microcontroller into the module. Series 2 has a drawback as it requires additional microcontroller resulting in additional energy resources. PRO module offers a longer range transmission than Series 2, however the energy consumption is increased accordingly. Additional microcontroller used alongside with Series 2 is an Atmel’s AVR architecture, Fig. 6, while the PRO series includes an integrated Freescale microcontroller. Architecture and location of embedded agent is shown in Fig. 7, where the agent is located between the processing core and peripheral data input unit. Third agent interface represents a link towards the central power unit and it is defined through various modes, depending on the energy state. Through the compiled software code (ANSI C) the operating system (Firmware) is the main core of the kernel and the real-time system.

Fig. 6. Hardware scheme of wireless system: a) XBee PRO S2B, b) XBee Series 2, [8] The laboratory sensor node system (end user device) can be expanded with ZigBee or Bluetooth module. The central processing unit block represents a microcontroller which includes memory (SRAM, ROM and EEPROM) and the data processing unit. The central power unit provides necessary voltage levels for the microcontroller and connected peripheral devices. Microcontrollers’ clock is programmed to 8 MHz and a corresponding external oscillator is used. The ability of the laboratory sensor node to work in real-time is one of the most important features of the presented system. When the code with embedded agent function is inserted in the microcontroller, certain memory locations become active. The microcontroller disposes with RAM and ROM memory accordingly. Possibly of additional control is seen through the use of watchdog timer an dislocation of the embedded agent into the EEPROM memory

segment. The possibility of additional control is provided through activation of the watchdog timer and dislocation of embedded agent in the EEPROM memory, which does the forthcoming dynamics and communication with the ROM / FLASH memory.

Fig. 7. Wireless sensor nod architecture and embedded agent location, [9]

4

Conclusion and future work

Power management for agent/multi-agent system is realized through embedded self monitored devices. With known battery voltage value (3.7 V) and measured battery current, the power consumption can be calculated. Installing the agents in the end user devices was done by programming the function that has the ability to alarm systems at a higher level. Then multi-agent manager system is activated, which further forwards the information to the distribution agent. If the alert level is very high, e.g. a heart attack occurred, the embedded master agent located in the embedded devices cloud is activated. A possible future addition to the end device is the implementation of GPS receiver e.g. LEA6S uBlox. When the aforementioned level of alert is reached embedded master agent is able to locate the patient on the map. Multi-agent system in the presented case, Fig. 3, is stored in CPX4 and CPX5 coordinators. When CPX5 is assigned in the network than it is a mobile multi-agent system who has an additional channel for data communications (Iridium Satellite). Multi-agent system is situated on the second layer and through the Internet or intranet and over the distribution agent it communicates with the most embedded master agent in the hierarchy. NI 9792 is a gateway and contains embedded device cloud integrated on its OS. This gateway has the option of additional ZigBee peripherals for its close sensors if there is a need for it. The aim of this paper is to point out possible improvements of existing solutions and future development of advanced Holter devices, [10, 11, 12]. The biggest space for improvement is evident in the area of information transfer. Instead of off-line data which is at the moment stored on the SD card, the aim is to bridge the information automatically with SPI (Serial Peripheral Interface) to RS232 adapter interface XBee PRO S2B module, Fig. 8.

Fig. 8. Concept for future work (Holter on-line monitoring of ECG signal)

References 1. Biomedicinska elektronika, Školska knjiga, Zagreb 1995, 382 str., Prof. dr. sc. Šantić, Ante.: ISBN 953-0-31637-2 2. Jin Z., Sun Y., Cheng AC., Predicting cardiovascular disease from real-time electrocardiographic monitoring: An adaptive machine learning approach on a cell phone, PMID:19964449, IEEE Trans Inf Technol Biomed. 2010 May;14(3):734-40. Epub 2010 Apr 12. 3. Oresko JJ., Duschl H., Cheng AC., A wearable smartphone-based platform for real-time cardiovascular disease detection via electrocardiogram processing, Conf Proc IEEE Eng Med Biol Soc. 2010;2010:5500-3. 4. API and GUI from National Instruments: LabVIEW http://www.ni.com 5. Wireless equipment “Digi” http://www.digi.com 6. Šoštarić, D.; Vinko, D.; Žagar, D.; Samardžić, I.: Reliability of Welding Parameters Monitoring System, Strojarstvo (0562-1887) 52, (2010), 2; 217-226. 7. Crossbow WSN platform: http://www.xbow.com 8. MikroElektronika Beograd: http://www.mikroe.com 9. D. Šoštarić, D. Vinko, D. Žagar: JavaScript Virtual Web Page for Wireless Sensor Node under AVR Microcontroller Architecture, Wireless Mobile Networking Conference, 2010; Budapest 10. G.M.P. O`Hare., David Marsh., Antonio Ruzzelli., Richard Tynan.: Agents for Wireless Sensor Network Power Management, ISBN: 0-7695-2381-1, IEEE Xplore, 2005. 11. Ma Xinglu., Qu Yingjie.: Reserch on Embedded Agent System Architecture, ISBN: 978-07695-3288-2, IEEE Xplore, 2008. 12. Alcides Montoya, Diana Carolina Restrep, Demetrio Arturo Ovalle.: Artificial Intelligence for Wireless Sensor Networks Enhancement, ISBN 978-953-307-261-6, InTech, December 2010.