Speed Control of Brushless DC Motor by Adaptive Network

Combination of Micro and Cloud-Based System to
Ambulance
Chi-Chieh Chen1, Pei-Jarn Chen2,*, Bao-Tein Chen3, and Chung-Min Hsu4
1
Department of Electrical Engineering, Southern Taiwan University of Science and
Technology; Department of Administration, Tainan Municipal Hospital;
[email protected]
2
Department of Electrical Engineering, Southern Taiwan University of Science and
Technology; [email protected]
3
Department of Emergency, Tainan Municipal Hospital; [email protected]
4
Department of Electrical Engineering, Southern Taiwan University of Science and
Technology; [email protected]
* Correspondence: [email protected]; Tel.: +886-6-253-3131 (Ext.3348)
Abstract: This paper presents the integrated system of patients vital monitoring in the
ambulance. It provides a real time cloud-based management platform of the ambulance
tracking function with Raspberry Pi 2B which integrates 3G dongle, webcam and GPS
model by using the commercial SpaceLabs bedside monitor. Through this platform structure
to monitor the instruments, emergency medical personnel can also monitor the patient's
condition. The results show the feasibility to transmit current information to server and save
in database by developed home-made system. By means of the internet database
management of the transfer patients, the hospital staff can facilitate distal supervision and
management. The system in this study has been completed commercial prototype test.
Keywords: Micro-Server, Emergency medical services (EMS), physiological monitor, GPS,
Webcam, LAMP.
1. Introduction
Ambulance is the rescue and transportation for injured patients as onshore emergency.
Emergency medical services (EMS) can be divided into two categories: The first is "to send
injured patient to the physician." The second is "to let the physician arrive at the patient
place." Patients transfer often happens to every medical institution using ambulance. Based on
the rule of emergency medical care law, the original medical institution has the responsibility
to transfer carefully out of the hospital [1]. In order to ensure the safety of transfer patients,
monitoring information during delivery process is necessary; moreover, according to World
Health Organization (WHO) report, the electronic ambulance record is beneficial for the
analysis of the emergency care to improve the medical quality [2]. The general ambulance
equipment standards shall have the instrument to maintain the vital sign of patients reached to
the other hospital emergency room. If the original medical institution early informs vital signs
of patients, when the ambulance to arrive, and allows the designated medical hospital to know
monitoring data and transmission parameters, injured patients can receive more timely
treatment [3]. During the process the ambulance is transporting the patient to the physician,
and meantime this system has the function nominally which lets the physician arrive at the
patient place. On the other hand, this system also provides the electronic ambulance record on
duty in the database.
1
Since the popularity of mobile devices has been contributed to the health care service in
recent years, a new industry called the mobile health (mHealth) [2] makes business model of
health care services become more diversified and innovative. With the growth of Internet,
more and more computer workloads do not need to process by high-end servers but by
micro-server [4]. This paper has combined the physiological monitoring system and
cloud-type microprocessor based Clients-Server applied to ambulance tracking function. In
this study, patient’s vital sign parameters from commercial physiological monitor
(SpaceLabs) with real-time video stream (Logitech), and ambulance GPS (Adafruit’s
Ultimate) location are transmitted to micro system (Raspberry Pi) [5] which converts into
cloud parameters format. Server data base management via web may add, delete, query, view
real-time information and permission settings. Permissions can add other users so that other
smart mobile devices can be queried. The patients’ vital trend graphs and real-time
information via web will be displayed on the screen of other smart mobile devices at the same
time. Once Patients transfer happens using ambulance needed in any medical institution, the
above system will achieve a more complete, secure, real-time ambulance tracking function
and effectively patient safety monitoring management and also reached EMS request
nowadays.
2. Experimental
2.1 System structure
We can simply be divided into some components shown in Figure 1. Raspberry Pi B+ (1) as
micro server will capture commercial certificated physiological monitors (2) (SpaceLabs
Ultraview 90369) parameters via RS-232, GPS chip (3) (Adafruit’s Ultimate breakout v3.)
location information via USB, and instant video MJPG-streamer (4) (Logitech C310) via USB
into the Micro SD card in Raspberry Pi. All information from what Raspberry Pi B+ acquire
is sent to 3G USB Dongle (5) (HUAWEI E1820), then transmitted by TCP/IP mode through a
fixed IP address of the cloud to build web database remote server (6). User interface browser
homepage is constructed in PHP environment so that users can easily monitor the patient
condition in the ambulance. The database (7) based on MySQL in different pages can be
authorized to manage the number of beds, medical record number, check physiological
parameters, and measure time. The database provides added, deleted data function, measured
physiological parameters trend profile, and real-time video monitoring function in the
ambulance.
Figure 1. System architecture
2
2.1.1 Raspberry Pi Model B+ Computer Board
Raspberry Pi Model B+ Computer Board is a credit card sized SoC (system on a chip)
board shown in Figure 2. SoC technology is all the necessary electronic circuits and
components (CPU, memory, system I/O) in an integrated circuit (IC). With a keyboard,
mouse, screen, power and Micro SD card, it can be run smoothly after installation of the
operating system. It is a micro-computer in Advanced RISC Machine (ARM) architecture.
Most functions can be compared with the desktop PC. It has lower power consumption, better
performance and audio GPIO pin bit extension. The core uses Broadcom Corporation
BCM2835 ARM1176JZFS 700MHz processor [6].
Figure 2. Raspberry Pi Model B+ Computer Board.
2.1.2 Patient Physiological Monitor
Commercial physiological monitors (SpaceLabs Ultraview 90369 [7]) shown in Figure 3 is
used to measure and monitor patient physiological parameters, further understand vital
symptom for medication before and after care treatment. Under the ambulance condition, the
study simply acquired the quick and direct parameters such as: non-invasive blood pressure
(NIBP), oxygen saturation concentration (SPO2), and heart rate (HR). The parameters are
converted into sequent ASCII code and captured to Raspberry Pi via RS-232/Blue Tooth
(BT).
Figure 3. Physiological monitors SpaceLabs Ultraview 90369, whose side provides the
accessories outlet ports plug in NIBP, SPO2, and EKG.
2.1.3 GPS chip
3
To establish a GPS receiver and transmission of Socket, Adafruit’s Ultimate breakout v3
[8], GPS chip allows the function to add position tracking to Pi project using the open source
GPS daemon 'gpsd' and an inexpensive USB to TTL adapter cable with this external active
antenna shown in Figure 4.
Figure 4. GPS daemon 'gpsd' and an inexpensive USB to TTL adapter cable (left) with
this external active antenna (right)
US National Marine Electronics Association (NMEA) standard specification is followed by
the majority of GPS receivers, which developed a standard for all communications between
the sea electronically, including the format and protocol data transmission of information.
With multiple independently associated with "," separated by the ASCII format, each length
of a data is variable, but begins with "$", carried by 16 control code, and ends in "13" and
"10." Common format for the "GGA" contains a number of satellite positioning time, latitude,
longitude, altitude, positioning, and so on [9]. GPGGA, (Global Positioning System Fix Data,
GGA location
2.1.4 WebCam
Logitech C310 shown in Figure 5 has HD 1280x720, built-in microphone with reduced
noise function, and automatic light adjustment function using MJPG-streamer that copied
JPG-frame from a single input plugin to multiple output plugins. Raspberry Pi can capture
driven Logitech software to display the real-time video. [10]
Figure 5. WebCam Logitech C310
2.1.5 3G USB Dongle Wireless Modem
HUAWEI E1820 mobile broadband dongle 3G/4G modems for HSPA+(High-Speed
Packet Access Evolved)Network USB slider up to 21Mbps [11], not locked to any network,
auto running software and easy to link to internet, just PnP shown in Figure 6.
Figure 6. HUAWEI E1820 mobile broadband dongle connected on Raspberry Pi Board
4
2.1.6 Cloud Server and Linux Operating System
Cloud Server adopts commercial Genuine INTEL Xeon E3-1220V3 Host installed in the
hospital. The Server has built web database with fixed IP network. Raspberry Pi chosen in
this study mainly uses Linux as operating system basis [12]. For low-cost and open source,
Linux as the operating system has been widely used. Linux kit is composed of LAMP (Linux
operating system, Apache, MySQL, Perl / PHP / Python). Apache is web server (http)
software. MySQL is database server. PHP (or Perl) is programming languages. LAMP is a
common internet platform.
2.1.7 Web server database
In this study, Raspberry Pi Model B+ Computer Board as micro web server, which chooses
Apache HTTP Server, builds the cloud database. Apache Software is an open-source web
server because of its cross-platform and security. Through a simple API, it will compile Perl /
Python / PHP interpreter, etc. to the server. The database uses MySQL, thanks to the high
efficacy, low cost, and reliability. It has become the most popular open source in the markets
[13].
2.2 Socket TCP/IP Communication
This study uses Socket interface to interact server and client terminal. Socket is to Tx/Rx
parameter pockets. MCU client formats the patient physiological parameters and GPS
location via TCP/IP to the server. Server uses PHP Socket to receive pocket and then waits
for transmitting pockets from MCU. The data will be classified into MySQL. Figure 7, 8
shows the pockets including formatted parameters about physiological and GPS information
respectively.
Figure 7. Socket pockets formatted physiological parameters
Figure 8. Socket GPS format from client (left) and server(right).
2.3 The operational flow
The system starts at the Server terminal first need to initialize the MySQL database, and
then matches the account password. Determined if the database connects successfully or not,
Server begins to receive the delivered physiological parameter and GPS information to the
database storage from the Client, and meanwhile the audio and video signals will also proceed
the live streaming via the web as shown in Figure 9.
5
Figure 9. System pre-flow chart at the Server terminal
Client-side of the system is divided into three parts for the first step in data acquisition. The
first part is to capture the outgoing physiological parameters from bedside monitor. The
second part is to receive GPS latitude and longitude information. The third part is to receive
the streamed video by Webcam. As above shown in Figure 10, 11, 12, 13, respectively.
Figure 10. Client captures physiological parameters as shown A from beside monitors.
6
Figure 11. Client Receives GPS latitude and longitude information as shown B.
Figure 12. Client streams video signals from Webcam as shown C.
7
Figure 13. System integrates received signals as A, B, and C flow chart at the Server
terminal.
2.4 Vehicle Power Supply for Patient Monitor and Micro-System in Ambulance
To keep the integrated monitoring system applied to ambulance normal function, we would
additionally like to develop a vehicle power supply, shown in Figure 14, whose main function
is to turn 12V of car igniter into two type voltages. One is DC-AC inverter module, 12V DC
boosts into 110V AC 150W, for patient monitor. The other is DC-DC converter module, 12V
DC converted into 5V DC 2A, for micro-system components, respectively. The original
power is from the internal battery charger in the ambulance.
Figure 14. The vehicle power supply diagram for patient monitor and micro-system in
ambulance
3. Results and discussion
8
This system setup as above is mainly divided into two parts, one is placed in the ambulance
on the Raspberry Pi 2B as Client side, and the other is Cloud Server, Genuine INTEL Xeon
E3-1220V3 Host, in the hospital. The Server has built web database with fixed IP network.
3.1 Raspberry Pi 2B as Client side
3.1.1 physiological parameters
After the system captures and formats parameters from the physiological monitor by TTL
transformed to USB interface on Raspberry Pi 2B board. Figure 15 shows the sent out
physiological monitor parameters. What we need is to capture the bed number, date, time, as
well as the physiological parameters.
Figure 15. Physiological monitor, SpaceLabs Ultraview 90369, sends out the bed
number, date, time, vital parameters as well.
Raspberry Pi will capture the physiological parameters and store into micro SD card. Using
a remote connection to the Raspberry Pi 2B in terminal mode processes, with UART
(Universal Asynchronous Receiver/Transmitter) interface to read physiological parameters,
retrieve the desired value of the physiological and formatted, the display offers value
confirmation on the screen in Raspberry shown in Figure 16.
Figure 16. the received parameters in Server
3.1.2 GPS location
According to the National Marine Electronics Association (NMEA) standard, figure 17
shows the GPS module of this study received information. Since receiving a fixed length
format of the latitude and longitude information, we have to retrieve "$GPGGA" at the
beginning of the string. The red blocks are examples of positioning information. Via ","
segments, the client side retrieve strings related to latitude and longitude information shown
in Figure 18.
Since the format NMEA is an international standard and the international standard time
slower than Taiwan for eight hours, we need to dismantle raw data by means of transformed
9
formula (1)(2) into the actual latitude and longitude information, then through Socket
transmitted to Server-side storage shown in Figure 19, further step, positioning and then
display track route on Google map.
Figure 17. The NMEA GPS Module outgoing information
Figure 17. The NMEA GPS Module outgoing information
Figure 18. Retrieve strings related to latitude and longitude information
NN  n1  (n2  60  n3 / 10000  60) / 3600
(1)
(2)
EE  e1  (e2  60  e3 / 10000  60) / 3600
where NN and EE are the actual latitude and longitude information, respectively; n1, n2,
and n3 are dismantled latitude data via "," segments; e1, e 2, and e3 are dismantled
longitude data via "," segments, respectively in Figure 18.
Figure 19. Sending and receiving status of the Server and Client respectively related to
latitude and longitude information
10
3.1.3 real-time video streaming
After installing Nginx RTMP (Web Server Real-Time Messaging Protocol) streaming
server as the primary external services server on Raspberry Pi 2B, which can send instant
camera image, and plus a Webcam, we can create an instant video streaming server as a
monitoring device.
Since installation for Strobe Media Playback on the player matched Nginx web server, the
users in Server computer with a fixed IP or other smart devices can see real-time images on
the internet page shown in Figure 20.
Figure 20. Real time internet video image. There are the present time pointer and date
information on the right of the screen just to verify the captured video synchronously.
3.1.4 3G network connection
Nowadays most 3G/4G network cards are also available in function of USB modem, which
dial-up connection to the Internet. Transferred to the system in the last part of the cloud
database, installed 3G Dongle device provides a wireless transmission network in the
Raspberry Pi 2B. Figure 21 shows the ppp0 in the red block diagram works for information
about network connection.
Figure 21. 3G Dongle establishes ppp0 information which means it works about network
connection.
3.2 Cloud server host in the hospital:
The cloud database system is mainly build for the storage of physiological parameters and
patient’s cases, bed number, and the GPS latitude and longitude information. Web pages are
structured in PHP environment. PHP dynamic language is to write our GUI web program and
11
data are saved to MySQL database in different pages authorized under the management for
the bed number, medical record number, physiological parameters as shown in Figure 22,
measuring time profile to query, add, delete data about physiological parameters measured
trends, and real-time audio and video information of the GPS function.
We have set up a login feature on the Web Server. This function is to prevent the arbitrary
use of the tracking system. When successfully logged in, the administrator can search the
number of transferred beds, medical record number, and measurement time/date as shown in
Figure 23.
The patient’s vital trend graphs in which care-givers can monitor vital signs of the trend
profile as shown in Figure 24 in every fixed interval time(such as 5 seconds) and real-time
information via web will be displayed on the screen in Server or other smart mobile devices in
the same time shown in Figure 25. Permissions can add other users so that other smart mobile
devices can be queried for other form including measure time, HR, BP, SpO2 lists in
database.
Figure 22. Physiological parameters, as an example, are saved to MySQL database by
PHP.
Figure 23. the administrator can search the number of transferred beds, patient record
number, and measurement time/date.
Figure 24. Trend chart with measured time.
12
The users actually view the plot screen like real-time image, GPS map, patient information
data as shown in Figure 26. Another monitoring mode also can be selected by medical staffs
as shown in Figure 27.
Ambulance technician may direct web camera to the patient monitor screen so that the
medical staff in Server can watch synchronized vital information as if the physician were just
at the patient place to monitor the situation.
Figure 25. patient monitor information displayed via web will be displayed on the screen
in Server or other smart mobile devices in the same time
Figure 26. Real-time image, GPS map, and patient monitor displayed on homepage.
13
Figure 27. Another monitoring mode also can be selected shown as the upper left corner
display where web cam might focus on the vital screen of the commercial patient monitor in
accordance with doctor’s opinions.
In Figure 27, on the up right corner, the track route can be recorded on the map, which
provides the staffs to retrieve when, where happened, and what kinds of vital condition. In
Figure 27, trend parts of the HR profile may show the abrupt drop due to the high vibration
and multi-body motion from the patient. Apparently those are not alerts according to doctor’s
opinion. It is presumably inevitable for the system to execute during the restless patients lying
on a stretcher waiting for treatment in the moving ambulance.
This system may also provide further function. Taking HR as an example of vital sign, on
the bottom right part in Figure 27, we may find the HR is 81 beat/min at occurred time
22:24:23; meanwhile, the location of GPS map also shows the message. This is useful for
care-givers to judge the patient situation during transfer process.
Another information on Figure 28, the system can show BP, SpO2 Pulse Rate(PR),
SpO2%, Heart Rate (HR) trends.
Figure 28. The system provides some alternative vital profiles such as BP, SpO2 Pulse
Rate (PR), SpO2%, and heart rate (HR) trends to monitor.
After applying in ambulance of Tainan Municipal Hospital, one general hospital in
southern of Taiwan, the emergency staff has tried to measure and monitor the patients transfer
condition. The results have shown that 82% of the emergency personnel think the necessity of
this platform. 70% of the staff thinks it is helpful for them to use this platform.
4 Conclusion
We have achieved the integrated monitoring system through the micro server. The goal of
the system is to acquire the vital sign raw data such as BP, HR, SpO2, temperature, etc. While
measuring patients’ vital signs, we hope these data directly can be shown in user browser
interface. However, thinking over the emergency characteristic of ambulance, rescuing people
is more important than acquiring vital sign. On the other hand, it is not all of the commercial
medical manufacturers that are willing to provide the port like RS-232 or BT (Blue Tooth) to
interlink vital data for every patient monitor [15]. This will probably be the business issue.
This system is composed of micro server build in an ambulance, GPS chip, physiological
monitors, and web camera. The real-time location information, the patient's condition, video
and other information transmitted back to the hospital. The doctor can make the hospital early
ready to do treatment and strengthen the emergency ambulance time for safety lives. In
addition, if medical disputes should occur, this information will be good proof.
This system has been measured round trips many times from emergency room of Tainan
Municipal Hospital to National Cheng Kung University Hospital in Taiwan through different
paths to verify the degree of stability. It is prospective to be great contribution in the medical
care system.
14
Currently both of clinical and home uses about body physiological signal measurement and
analysis have been very mature. Under high temperature, high vibration and multi-body
motion, however, it is a high challenge to measure and analyze body signals. In addition to
improve the correction of the measurement and analysis module, the future development of
the study will be able to find and develop suitable wired or wireless type physiological signal
measurement module during transferring patient environment. The finally hope for
development through wireless output mode on the platform will create a server mode or with
the exclusive ambulance facility of intelligent cloud-based management system.
Acknowledge
This work is supported by the Tainan Municipal Hospital Foundation of Basic Research
through grants SCMH_IRB No:1040808.
References
[1] Ministry of Health and Welfare, Taiwan, ROC, “Emergency Medical Care Law”
Article 36.
[2] WHO Library Cataloguing-in-Publication Data, 2011, “mHealth New horizons for
health through mobile technologies”, WHO Global Observatory for eHealth series Volume 3 World Health Organization, ISBN 978 92 4 156425
[3] Eisenberg MS, Improving survival from out-of-hospital cardiac arrest: back to the
basics. editorial. Am J Emerg Med. 2007; 49(3): pp. 314-316.
[4] C. S. Wang, C. W. Liu, T. H. Wang, 2013, “A Remote Health Care System
Combining a fall Down Alarm and Biomedical Signal Monitor System in an
Android Smart-Phone” International Journal of Advanced Computer Science &
Application, Vol. 4 Issue 9, pp. 185
[5] A.F. Teixeira, O. Postolache, "Wireless Sensor Network and Web based Information
System for Asthma Trigger Factors Monitoring" Instrumentation and Measurement
Technology Conference (I2MTC) Proceedings, 2014 IEEE International.
[6] Eben Upton and Gareth Halfacree, Raspberry Pi User Guide, 4th Edition, Wiley,
2014.
[7] Ultraview Monitors 90369 Service Manual, 070-0706-01 Rev. K, Spacelabs
Healthcare, 2005.
[8] Adafruit Ultimate GPS Guide Manual, , adafruit learning system, Adafruit Industries,
2015.
[9] NMEA Reference Manual, rev. 1.30, SiRF Technology, Inc. 2005.
[10] HD-WebCam-C310 Guide Manual, Logitech Inc., 2012.
[11] HUAWEI E182E/E1820 21.6M wireless network card Catalog Manual, Der Yuan
technology, 2015
[12] Simic Dragan, Ristic, Srecko, and Obradovic, Slobodan, "Measurement of the
Achieved Performance Levels of the WEB Applications with Distributed Relational
Database," Electronics and Energetics. Facta Universitatis. 2007, pp. 31–43.
15
[13] Installation Linux distributions, phpMyAdmin’s documentation, 2014.
[14] Steven J. Vaughan-Nichols, "Commercial Support now available for the
open-source NGINX Web server", ZDNet Open Source blog. Oct. 18. 2013.
[15] ADLINK Industrial Computing Systems, "Ambulance based Telemedicine Saving
Real Time", Catalog for Medical Panel Computers. 2015.
16