An infant monitoring system with the support of accurate real-time indoor positioning

This article presents an indoor infant monitoring system based on Android system which employs a low-cost Bluetooth Low Energy (BLE) pseudolite to accurately locate the infants in the activity indoors and timely remind the parents. It can achieve a positioning accuracy better than 2 m and e ﬀ ectively reduce the risk of injury to infants and young children. The performance of the proposed system, using false negative rate, false alarm rate, and alarm response time as indicators, is compared with that of the system using Quuppa as a positioning source. The experiment results show that both BLE pseudolite and Quuppa as a positioning source can basically meet the positioning accuracy for the infant monitoring system, but the BLE-pseudolite-based system provides a more cost-e ﬃ cient solution.


Introduction
Young children, especially Infants from 6 months to 2 years old are at risk of injuries because they can crawl, walk and climb, but cannot communicate well with their parents. What is more, the infants and toddlers at this stage are curious about the external world and their behaviors are unpredictable and uncontrollable. Parents cannot keep the baby in sight at all time at home. If the infant enters the danger zone, which is potentially dangerous to them in the home, by himself, the risk of injury will increase sharply. According to statistics, 26.1% of child deaths linked to accidental injuries in China, and this number is still growing at a rate of 7%-10% per year. Fifty-two percent of child accidents occur in the family. Accidental injury has become the first "killer" for infants and young children. Therefore, it is important to provide an indoor infant monitoring system to effectively monitor the activities of young children and provide early warning of possible dangers (Cao et al. 2018).
Nowadays, the outdoor infant monitoring products based on the GNSS positioning technology can be easily bought in the market. And GNSS has been proven to achieve the highest precision of submeter. However, there is no infant monitoring system for indoor use because the GNSS signals can hardly be received in the room.
In order to achieve the ideal indoor infants monitoring effect, it is necessary to implement highprecision indoor positioning technology based on mass smartphones. So, the indoor positioning, especially indoor positioning for the public, is the key technology for indoor infant monitoring system. Three main types of indoor positioning technology based on smartphones are used widely: positioning technology based on frequency signal; positioning technology based on built-in multiple sensors; positioning technology based on multi-source fusion.
Indoor positioning technology based on frequency signal mainly includes Wi-Fi, Bluetooth, Near Field Communication (NFC), and cellular signals. Bluetooth operates at frequencies between 2402 MHz and 2480 MHz, or between 2400 MHz and 2483.5 MHz including the guard bands of 2 MHz wide at the bottom and 3.5 MHz wide at the top. Distance intersection (Schatzberg, Banin, and Amizur 2014) and fingerprint positioning methods can be employed in Bluetooth-signal-based indoor positioning, reaching a positioning accuracy of 4 m (Chen et al. 2013;Chen et al. 2015). But it is extremely environmentally sensitive, and the signal of the single Bluetooth chip is unstable. Quuppa, the Bluetooth antenna array system introduced by Nokia company, has a positioning accuracy of several centimeters, but the area covered by each antenna is small and the installation cost is high (Quuppa 2019).
Built-in multiple sensors, including magnetometers, accelerometers, barometers, and gyroscopes are equipped in cell phones, which support for the sensor-based positioning methods like geomagnetic matching, Pedestrian Dead Reckoning (PDR), audio positioning, visual positioning and visible light positioning. However, it is difficult to construct an accurate magnetic field with a characteristic fingerprint database in practical applications because the indoor magnetic field signal is easily changed by humans (Chen and Chen 2017). PDR fails to give accurate heading estimation so it cannot be used for localization independently. Other sensor-based positioning methods such as audio positioning and visible light positioning require the deployment of professional hardware, which are currently unsuitable for the public.
Bayesian filter, such as Kalman filter (Zhang et al. 2013), Unscented Kalman Filter (UKF) (Chen et al. 2011) and Particle filter (Chen et al. 2014), is widely used in multi-source fusion positioning system to achieve higher accuracy and better stability (Chen and Chen 2017). Nevertheless, there is no universal positioning method suitable for the public.
To summarize, few credible products are found in the current indoor positioning market for the general public on account of the difficulties below: (1) There is no or weak GNSS signal in the room.
So the traditional outdoor positioning technologies are unsuitable for indoor location.
(2) Indoor topologies are complex and harsh indoor channel environment often cause serious multi-path effects.
(3) It is difficult to predict the behaviors of users. (4) It is a necessity to use user-friendly electronics with simple post-maintenance. (5) The professional navigation equipment cannot be used due to the cost limit.
This paper aims to realize a reliable indoor positioning technology suitable for the public and to develop an indoor infant monitoring system. We use Bluetooth Low Energy (BLE) pseudolite stations to realize the positioning technology. The stations are composed of BLE chips which are combined with UKF-based positioning engines and navigation messages. Navigation messages are sent to users in the form of broadcasts, which can be received by ordinary smartphones, to achieve accurate positioning. It means that, theoretically, it is possible to support countless users. Based on this positioning technology, the proposed indoor infant monitoring system on Android system can accurately locate the children indoors and promptly remind the parents when the children enter the dangerous area. The system is expected to effectively reduce the possibility of injury to young children and show wonderful performance in the aspects of availability, reliability, practicality, low cost and high precision.
The remainder of the paper is organized as follows: structured as follows: Section 2 emphasizes the key technologies of the monitoring system. Section 3 presents the system design and implementation, which analyzed the system demand and described the system structure from four aspects. Section 4 describes introduces the experiment conducted indoor and discusses the experiment results, while finally Section 5 summarizes the conclusions and future work.

Bluetooth low energy beacon
Bluetooth beacons are hardware transmittersa class of BLE devices that broadcast their identifier to nearby portable electronic devices. The technology enables smartphones, tablets, and other devices to perform actions in close proximity to a beacon. Bluetooth beacons use proximity sensing of BLE devices to transmit universally unique identifiers received by compatible applications or operating systems (Addey 2013). The identifier and a few bytes of information sent with it can be used to determine the physical location of the device, and track locationbased operations on the client or trigger device.
Bluetooth beacons differ from other location-based technologies in that broadcast devices can simply transmit signals to devices at the receiving end and require a specific application to be installed on the device to interact with the beacon. Bluetooth beacons currently have four protocols, including iBeacon, AltBeacon, URIBeacon, and Eddystone. The pseudosatellite studied in this paper uses Bluetooth chips supporting the iBeacon protocol as a positioning signal source.
Our system uses the Bluetooth beacon for the following advantages: first, it makes the system more user-friendly because ordinary mobile phones can receive signals without pairing. Second, it provides convenience for us to use the fields provided by the standard interface to access navigation information for positioning. Third, it is cheap for the public.

Invisible fence
An invisible fence is an electronic system which was first invented by Richard Pike in 1973. It limits pets or other livestock within a predefined boundary without the use of physical barriers. If the pet ignores its warning sound, it will receive a slight electric shock from the collar. The stimuli delivered to the pet can be applied more frequently when the animal approaches the border. In this way, pets quickly learn to avoid the location of invisible fences, making them an effective virtual barrier. In some pet fence systems, a buried wire emits a radio signal to activate the electronic collar. Other pet fences are wireless.
The central unit sends wireless signals and starts the system when the pet travels beyond the specified radius.
In another case, the electronic collar uses GNSS signals to determine proximity to a predetermined "virtual fence" without any physical installation. Although the boundary position is inaccurate due to GNSS tolerances, the system is still more flexible than traditional fences, making it easier to change boundaries. The monitoring system studied in this paper adopts the concept of invisible fence based on indoor pseudo-satellite to monitor infants and young children.
Considering the various layouts of different houses, invisible fences can be used to set dangerous areas as needed, and the dangerous areas can be easily modified when the home layout changes.

Demand analysis
The purpose of the indoor infant care system is to monitor infants and young children in activities and to alert their parents to possible hazards. The required features are as follows: (1) The system can provide fast system positioning, high response frequency, and timely alarm.
(2) The position of the infant in the room can be obtained in real time, and the position information is visually displayed. (3) The system has the ability to let the parents browse the indoor environment and customize the indoor danger zone. (4) The trajectory of infant activities can be obtained and analyzed. (5) The system is able to distinguish and identify multiple devices and support the monitoring of multiple infants. (6) The system prices should be acceptable for the public and support ordinary smartphones.

System structure
According to these demands above, this article proposes an indoor infant monitoring which is divided into four modules: BLE pseudolite module, Server Client, Infant Client, and Parent Client. Figure 1 shows the structure of the system, including physical structure and functional module structure. The function of the BLE pseudolite module is to provide a high-precision position in the room in real time. BLE pseudolite built with multiple BLE beacon chips can effectively reduce the position errors. The Infant Client is designed to get its own location and send the result back. The positioning calculation is done in the Infant Client to ease the pressure on Server Client. Even in the case of multiple users, it will not cause the server to be stuck. The function of the Server Client is to provide an interface for storing and getting the location for the users. After receiving the signal sent by Infant Client, Server Client stores the sequence of positions arranged in time, which facilitates various analysis, such as motion trajectory and the number of times to enter a certain area. The function of Parent Client is to display the indoor position of the infant in real time, the activity track of the infant in a certain time, and the statics analysis results and to alert the parents when the infant enters the dangerous area. Parents can use ordinary Android phones without additional equipment.
3.2.1. BLE pseudolite module BLE pseudolite module consists of multiple Bluetooth chips supporting the iBeacon protocol and a Micro Control Unit (MCU). Using multiple Bluetooth chips is aimed to overcome the instability of the signal of a single Bluetooth chip. The MCU is the coordination center of each Bluetooth chip. The BLE pseudolite module adopts a circular design, and the Bluetooth chip is evenly distributed on the edge of the BLE pseudolite module to minimize the interference of signals between the chips. The BLE pseudolite module is powered and configured through the serial port. When BLE pseudolite works, the Bluetooth chip broadcasts a transmission signal, and the distance between each BLE pseudolite and the positioning device can be calculated by the distance formula (Equation (1)).
where d represents the calculated distance, RSSI represents the received signal strength, A is the signal strength calibration value when the transmitter and receiver are 1 m away, and n is the environmental attenuation factor. Each Bluetooth has been calibrated to make the distance more accurate. BLE pseudolites are positioned using a tightly coupled fusion approach. The navigation message stored in the Bluetooth chip is sent to the user in the form of broadcast and decoded for further use. A set of speeds, navigation information and the BLE pseudolite distances obtained from the mobile phone sensors are submitted with previous positioning results as parameters to the UKF during positioning. The UKF is proposed as an improvement to the Extended Kalman Filter (EKF). With appropriate weights of a finite number of points, the probability of state distribution is propagated through nonlinear dynamics of a system. The Unscented Transformation (UT) is a simple method for calculating the statistics of a random variable which undergoes a nonlinear transformation. By using UT, sigma points completely capture the true mean and covariance of the Gaussian Random Variables (GRV) up to the third order accuracy without Tylor expansion.
the variables x, v, n are the positions, the velocities, and the acceleration in 2D Cartesian coordinate, respectively, P v is predicted noise covariance, and P n is measured noise covariance.
where λ is uniform scale parameter, L is dimension of the enhanced state.
where W i is the weight.

Server Client
On the server side, Python language (Python 2019) is used to build Web services, MariaDB (MariaDB 2019) is used to store data, Gunicorn (Gunicorn 2019) is used to build multi-threaded deployments, and Nginx (Nginx 2019) is used to reverse proxying to achieve server load balancing. Figure 2 shows the workflow of Server Client. The hardware of Server Client uses the Dell PowerEdge T130 server, and the configuration is Intel Xeon CPU E3-1220 v5 3.00 GHz, Memory of 16 GB, and 2TB mechanical hard disk. Server software is Linux operating system.

Infant Client
Infant Client is designed with Model-View-Presenter (MVP) architecture according to the functions of positioning and registration identity. As shown in Figure 3, the View is responsible for display, the Model is responsible for processing data-related logic, and the Presenter acts as a bridge and is responsible for connecting View and Model. Figure 4 shows the interface of Infant Client. As shown in Figure 4(a), the interface is designed to add new Infant Client devices. As shown in Figure 4(b), at the top of the page there are two buttons to control the BLE pseudolite and Quuppa as a source of positioning, in order to serve for the comparison of the experiment. At the bottom of the page, there is a list of strings used to display target status and target information.
The system first receives the signal sent by the BLE pseudolite, then decodes the signal to obtain the location calculated from the navigation information, and finally sends it to the server through the web interface provided by the server.

Parent Client
The function of Parent Client is to display the indoor map and the position of the infants and children with BLE pseudolite and Quuppa as the positioning source, respectively. Parents use a normal Android phone to realize in-time monitoring. When the infant is detected to be in the dangerous zone set by the user, an alarm will be given. The activity track of the infant can also be analyzed. Figure 5 shows the interface of Parent Client. In Figure 5(a), an indoor map where danger zones and anchor points are displayed on the phone. There are also two floating buttons, which are, respectively, used for alarm response timing and positioning switch. As shown in Figure 5(b), the parental danger zone operator panel is where the user can customize the specific danger area. Figure 5(c) shows the parameters of the system. The proportion of infant's activities in dangerous areas is shown in Figure 5(d).

Experiment results
The experimental environment is a test room of 120 m 2 . Six BLE-pseudolite-based stations and three Quuppabased stations are hung on the ceiling of the room evenly. Figure 6 depicts the indoor map of the test room, where the blue points designate the position of the BLE-pseudolite-based stations, and the red points designate the position of the Quuppa-based stations.
To evaluate the performance of the system in an indoor environment, we use false negative rate, false alarm rate and alarm response time as indicators. False negative rate refers to the rate that the system fails to alarm when the baby is in a dangerous area. False alarm rate refers to the rate that the system alarms when the baby is not in a dangerous area. Alarm response time is the time interval since the baby enters the dangerous area until the system alarms. What is more, we use Quuppa as a comparison. The Bluetooth antenna array system introduced by Nokia's Quuppa has a positioning accuracy of several centimeters, but each antenna has a small coverage area and high installation cost. According to the layout of the experimental site, the kitchen and bathroom are set as dangerous areas. Figure 7 shows the alarm state of the system when an infant enters a danger zone.

False negative rate
As mentioned above, the false negative rate refers to the rate that the system fails to alarm when the infant enters the danger zone. To test this rate, the experimenter held the Infant Client and walked randomly in the danger zone, recording the positioning data of the system. Points that appear outside the danger zone are the missing points. The false negative rate is calculated by dividing the number of missing points by the total number of points. To analyze the false negative rate, BLE pseudolite was compared with Quuppa as the source of positioning under the same experimental environment. Figure 8 shows the experiment positioning data of the false negative rate. Figure 8(a) is the data using BLE pseudolite as the positioning source, and Figure 8(b) is the data using Quuppa as the positioning source. The red points are the points in the danger zone when BLE pseudolite is used as the positioning source, and the blue points are the points in the danger zone when Quuppa is used. The green points are the missing points outside the danger zone. Table 1 shows the statistics results of false negative rate.

False alarm rate
As mentioned above, false alarm rate refers to the rate that the system alarms when the infant is not  in the danger zone. To test this rate, the experimenter held the Infant Client and walked randomly near the danger zone, recording the positioning data of the system. Points that appear in the danger zone are the missing points. The false alarm rate can be obtained by dividing the number of false positive points by the total number of points. Figure 9 shows the experimental positioning data of false alarm rate. Figure 9(a) is the data using BLE pseudolite as the positioning source, and Figure 8(b) is the data using Quuppa as the positioning source. The green points are the points outside the danger zone. The red points are the missing points inside the danger zone. Table 2 shows the statistics results of false alarm rate.

Alarm response time
The final experiment was to test the alarm response time. The experimenter walked into the danger zone from outside and separately recorded the moment the experimenter entered the danger zone and the moment of alarming. The interval between two moments is the system alarm response time. A total of 11 experiments were performed using BLE pseudolites and Quuppa as the positioning source, separately. Figure 10 shows the statistics results of the system alarm response time statistics using these two positioning sources. The solid blue line indicates the time of each system alarm response recorded when the pseudolite is used as the positioning source, and the blue-dotted line indicates the average value of the system alarm response time. The solid red line indicates the response time of each system alarm recorded when using Quuppa as the positioning source and the red-dotted line indicates the average value of the system alarm response time. The system alarm response time are 1103.9 ms and 2107.6 ms when using the BLE pseudolite and Quuppa as the positioning source, separately.
To summarize, the BLE-pseudolite-based system is more suitable for indoor infant monitoring than the Quuppa-based system. The measured accuracy of BLE pseudolite can reach 1 m which is enough for infant monitoring. Although it does not have the same centimeter-level positioning accuracy as Quuppa, it can achieve ideal experimental results. For BLE pseudolite, a long distance will increase the error, so a reasonable layout can further improve the accuracy. In general, both the Quuppa and BLE pseudolite can basically meet the need of system for positioning accuracy. Quuppa is superior to BLE pseudolite in stability and positioning accuracy while BLE pseudolite is better than Quuppa in response time. In this experiment, the three Quuppa-based stations cost a total of more than 24,000 RMB, while the six BLE pseudolites cost only a total of 1,000 RMB. Given the cost of hardware, pseudolite is better than Quuppa on its price/performance ratio, which is more acceptable to consumers.

Conclusions and future work
Based on BLE pseudolite, this paper designs a set of indoor infant monitoring system that integrates Server Client, Infant Client, and Parent Client, and realizes the function of indoor positioning, danger alarm and   activity analysis. Particularly, according to the characteristics of the Bluetooth chip, the navigation message codec, which is one of the core functions of BLE pseudolite, is well designed and implemented, and no additional equipment is needed.
The experiment results verified that the system can basically meet the design goals. It can greatly reduce the burden on parents to monitor infants and young children at home and improve the personal safety of infants and young children indoors. Nevertheless, it still needs further improvement. On one hand, an angle judgment based on the distance judgment is expected to add in order to realize accurate positioning through a single base station and reduce the number of the BLE pseudolites deployed. On the other hand, cloud computing and new software tools have provided the means for easier sharing of data and processes (Bermudez 2017), and it may improve the concurrent capabilities of the server to combine the system with cloud computing technology in the future. These updates could deliver smarter data curation, more accurate inferences and more automated decision-making (Dold and Groopman 2017), leading to a more smart and advanced monitoring system.  Figure 9. Experiment positioning data of false alarm rate (a) BLE-pseudolite-based experiment data, (b) Quuppa-based experiment data.  Figure 10. Alarm response time.