A Real-Time Location-Based Services System Using WiFi Fingerprinting Algorithm for Safety Risk Assessment of Workers in Tunnels

. Thispaperinvestigatesthefeasibilityofareal-timetunnellocation-basedservices(LBS)systemtoprovideworkers’safetyprotection andvariousservicesinconcretedamsite.Inthisstudy,receivedsignalstrength-(RSS-)basedlocationusingfingerprinting algorithmandartificialneuralnetwork(ANN)riskassessmentisemployedforpositionanalysis.ThistunnelLBSsystemachieves anonline,real-time,intelligenttrackingidentificationfeature,andtheon-siterunningsystemhasmanyfunctionssuchasworker emergencycall,trackhistory,andlocationquery.BasedonANNwithastrongnonlinearmapping,andlarge-scaleparallel processingcapabilities,proposedLBSsystemiseffectivetoevaluatetheriskmanagementonworkersafety.Thefieldimplementation showsthattheproposedlocationalgorithmisreliableandaccurate(3to5meters)enoughforprovidingreal-timepositioning service.TheproposedLBSsystemisdemonstratedandfirstlyappliedtothesecondlargesthydropowerprojectintheworld,to trackworkersontunnelsiteandassuretheirsafety.Theresultsshowthatthesystemissimpleandeasilydeployed.


Introduction
Over the past decade, there was a surge of accidents in underground constructions worldwide [1][2][3].Consequently, safety is a critical issue in construction industry, especially for the underground construction workplace.Currently the health and safety management of the human on a large hydroelectric power construction site mainly depends on the contractor supervision and owner inspection on an irregular basis.Without modern information technology and effective management, this traditional method can hardly assure workers' safety.The construction industry has the poorest Health and Safety (H&S) records in any major industry [4,5].In China, the probability of construction workers being killed and injured is higher than the average figures for all other industries, with billion RMB Yuan of economic losses being measured each year [1].
As a consequence, some studies [6][7][8][9][10][11][12][13] have been focused on the development of intelligent control systems, adopting advanced communication technologies and intelligent algorithms as the means for developing new automated manage systems.These are expected to be capable of providing support to H&S tasks in various circumstances.For example, some advanced technologies, such as intelligent response and rescue systems, have significantly contributed to the reduction of mining fatalities and accidents [14,15].A realtime tracking service for workers, equipment, and materials is the important information for various construction activities such as safety management [15,16], material management [17], and work planning.Accurate and reliable information of workers' location can lead to better decision making.
Positioning system technologies can be divided into two categories, that is, outdoor [18,19] and indoor [17,[20][21][22][23][24][25] positioning.The most popular and established outdoor positioning system is Global Positioning System (GPS) [18].The current indoor positioning systems technology is WiFi, radio frequency identification (RFID) [20], laser, infrared, and ultrasound.Modern localization systems use various techniques and algorithm such as received signal strength indicator (RSSI) [16], time of arrival (TOA), time difference 2 Mathematical Problems in Engineering of arrival (TDOA) and angle of arrival (AOA).GPS is wellknown to work independently (defined as a device that does not require any installation of technology on a construction site other than a device on the resource to position it) for tracking service [19].RFID technology [20] enables a seamless link between any physical tagged entity and the business information infrastructure providing lightweight computational and communication capabilities.Currently, the RFID technology that is used for personnel localization is actually only an attendance recording system rather than the real location tracking system.Using it, not the exact point of the target but only an area with bigger scope than the target can be known.This does not satisfy the requirement of real-time precision positioning.When the accidents happen in the tunnels, it will be very difficult to rescue the trapped workers because of low positioning accuracy.Wireless sensor networks (WSN) have attracted more and more research interest in tunnel applications for their advantages of selforganization, low cost, and high reliability [24,26].Wireless sensor networks for location tracking would allow for a wide deployment of sensors across construction sites and, as a consequence, a chance for ubiquitous computing capable of implementing even complex applications such as integrated project monitoring to identify the real state of construction site execution.
With the development of IEEE802.11technology, WiFi spreads all over the world.Its coverage becomes wider and wider.Although WiFi is not designed for positioning, the signal that access point (AP) or station regularly sends contains the information of RSS, which provides the possibility for locating mobile station.The academia and industry pay great attentions to applying WiFi technology to locate points.RFID has a history of demonstrated ability and market dominance, yet it also has a key disadvantage-the fact that it is nowadays populated with proprietary solutions, including expensive readers.WiFi-based real-time locating system (RTLS) has recently become just such an opportunity, with RTLS functions being handled by specialized software.Compared with the existing positioning technology such as GPS, cellular localization, RFID, and ZigBee, the positioning based on WiFi has the following advantages [11]: (1) can work on different occasions, such as indoor and outdoor, providing the possibility of the ubiquitous positioning; (2) only depends on the existing WiFi network, does not need to make any changes, and is of low cost, which means the existing IT infrastructure can be reused; (3) effect of non-line-of-sight (NLOS) on WiFi signal is small, even in the situations where there are obstacles.With the advances in data mining with big data, wireless communication technologies and smart mobile devices, a real-time LBS, which provide personalized services based on users' location information and the growing accumulation of industry knowledge, have been widely applied in military, transportation, logistics, construction site, and so forth.Realization of environment monitoring and worker localization in underground constructions plays an important role in construction and worker's safety.In order to safeguard the workers, firstly, need to know where they are, then we can carry out effective implementation of LBS that provides rich and extensible services, especially after the catastrophic accidents, and so the rescue team can reach the disaster scene accurately and carry out the rescue work timely by acquiring accurate location information.Thus, in some industry like underground mining, installing localization system is enforced by Chinese Government's law.In hydropower industry, leading corporations like Three Gorges Corporation not only actively adopt sensory technologies in monitoring health of hydraulic structural engineering [7,9,11], which makes a great contribution to cracking control of mass concrete [9], but also pay more and more attention to LBS system to protect workers' safety and various services.
In this study, the positioning system based on WiFi using RSS is introduced.The LBS system provides data based on the location of the mobile client and can be segmented into "push" and "pull" models.The risk management is also proposed.This paper studies the feasibility of an LBS system to provide workers' safety and protection and various services in tunnels of high arch dam site.The proposed system was tested and deployed in main tunnels of Xiluodu arch dam site.

Position Calculation Method.
Currently the methods of most positioning systems based on WiFi using RSS are divided into two main categories: trilateration algorithm [27,28] and fingerprinting [25] technique.Trilateration algorithm estimates the target position by measuring the distance between target and at least three known reference points, while fingerprinting technique gets the target location by matching the fingerprint information, which is the characteristic of signals.[27,28] is a method of calculating the coordinates based on geometry, which can be trivially expressed as the problem of finding the intersection of three spheres that involves a system of quadratic equations [28].There are many algebraic and numerical methods to solve this problem in 2D [29] and in 3D positioning [28,30].The precondition of a simplified geometric algorithm is that estimated distances from a node to at least three of the anchor nodes are known.This method is utilized in the three anchor nodes as the intersection of a circle centered at the position of the unknown node, as shown in Figure 1.The coordinates of the three anchor nodes  1 ,  2 , and  3 is known in advance as ( 1 ,  1 ), ( 2 ,  2 ), and ( 3 ,  3 ), and the distances from these three anchor nodes to node  are  1 ,  2 , and  3 .If the coordinates of node  (, ) are unknown, then there will be the following formulae [29]:

Trilateration Algorithm. Trilateration
(1) Equation ( 2) is derived from (1), and the coordinates of  are calculated: WiFi positioning based on trilateration algorithm can be divided into two phases: distance and location.Firstly, the target point receives RSS of three different specific APs whose positions are known, and then it is converted into the distances between the target and the corresponding APs in accordance with the transmission loss model of wireless signal.Wireless signals are commonly affected by path loss, shadow fading, and so on in the transmission process.The relationship between receiving signal power and the distance can be given by signal transmission loss model.
The location of target point is calculated through the trilateration algorithm; namely, the three APs are centers, respectively.The distances between the target and the corresponding APs are the drawn radiuses of three circles.The intersection of three circles is exactly the target point.The WiFi positioning based on the trilateration algorithm relies heavily on known AP location information and accurate signal transmission loss model.However, due to reasons such as increasingly complicated electromagnetism environment in tunnels of arch dam, it is hard to rely on the signal transmission loss model.Therefore, the wireless location based on trilateration algorithm has difficulties in this implementation, and it is used as an auxiliary means.

Fingerprinting Technique. RSS-based location finger-
printing is based on statistical theory and proven industry practice.Location fingerprinting refers to techniques that match the fingerprint of some characteristic of a signal that is location dependent [31].Position fingerprint identification depends on the database of characteristics of the target.Figure 2 illustrates that its process is mainly divided into two phases: offline phase or training phase and online phase or positioning phase.The goal of training phase is to establish a location fingerprinting database.Firstly, the reasonable reference point's distribution needs to be selected.It is ensured that they can provide enough information for estimating position accurately at the positioning stage.Then, in each reference point, we measure the RSS values from different APs in turn, making the corresponding unique identity (usually MAC address) and position information of reference point recorded in the database.Due to the environmental effect, the strength of wireless signals is not stable.In order to overcome the influence of unstable RSS on positioning, several measurements on each reference point are usually collected and averaged [25].The accurate position is increased with collecting data; however, it means more labor consumed.In this study, the received specific RSS is comprised of existing data in the database.The position is calculated according to certain matching algorithm.-nearest neighbor algorithm is often used to compare data in fingerprinting system [16,25].-nearest neighbor (KNN) method is one of the simplest ways to determine the location of the unknown position by using the fingerprint map.This algorithm is a location fingerprinting method that considers  CPs (calibration points) to calculate the approximate position of the target.The idea is to compare the fingerprints in the fingerprint map to the observed measurements and to select  calibration points with the "nearest" RSS values.In the KNN approach [32], the vector is used as a measurement and compared to the fingerprint map, which includes only the sample averages.Let the list [32] be the list of calibration point coordinates (3) corresponding to the list of  fingerprints which satisfies where   ∈  1: ,   ∈  1: and the function (⋅) is a chosen distance measure.The Euclidean norm is widely used.
The most common choice as a user's location estimator x is the average of the coordinates of the  "nearest" fingerprints; that is, The estimator is a very restricted approach to compute the location estimation, because the number of possible estimates is always finite and is a function of the number of CPs.The location estimation is done by using the value  = 1, which leads to the nearest neighbor (NN) method.The Euclidean norm is used as a distance measure, but the estimate is rejected if where CPi is the "nearest" calibration point.

Risk Management on Worker Safety.
Many studies [1,2,33] relative to risk management are conducted for underground mining industry.In China the probability of construction worker fatalities in underground industries is higher than that of all other industries, with the economic losses being measured each year in billions [1].Similar situations have been recorded worldwide.Health and safety control are inadequate in terms of preventing risks which, because of their specific nature, are unpredictable.To better assure the H&S of people in construction such sole dependence on patrolling officers for control purposes should be reduced and in part replaced by a more objective evaluation of worker effort.Techniques, such as the tracking of the location of workers and analysis of workers' behavior would be a helpful site control inclusion [8].Worker safety monitoring at dam site is a complex multi-index nonlinear process, which requires monitoring system has some intelligent information processing capabilities in order to ensure the reliability.The risk management is also very important to proposal classification of safety risk of worker, equipment and environment, and so forth.Artificial neural network (ANN) [34] has a strong nonlinear mapping, large-scale parallel processing capabilities, as well as adaptive, self-training, self-learning, self-organization and fault tolerance, and so forth.It is suitable to be adopted in this LBS system.As shown in Figure 3, the 3-layer model [35] is the most widely studied and applied model among many different types of artificial neural networks.The first layer has input neurons, which send data via synapses to the second layer of neurons, and then via more synapses to the third layer of output neurons.More complex systems will have more layers of input neurons and output neurons.The synapses store parameters called "weights" manipulate the data in the calculations.In this study, the output represents the solution to the problem, that is, worker safety assessment or risk index.
Where (  ) is the input and (  ) is the corresponding array of weights, the activation layer is given by Finally, the output value can be calculated as In this model, the weight revision method can greatly affect the network behavior, which is shown in the follwoing: where  is the impulse coefficient,  ℎ is the connected weight between the input layer's node and the middle layer's node, and  ℎ is the connected weight between the middle layer's node and the output layer's node.

Description of the Real-Time LBS System
3.1.Overview of System.This system focuses mainly on providing a real-time LBS system that can automatically capture, transfer, and analyze the positions of workers in working zone and can provide various location based services.Figure 4 shows the system main structural.(1)  in a heavy load.Particularly, the system can real-time handle large amounts of worker's position on-site.
(2) Bidirectional alarm and warning service: worker can issue critical alarm actively by pressing emergency button of tag; control center can show the region and the warning information.When a worker goes into the zone where it is dangerous or is forbidden, alarm message will be alerted to the worker as well as his worker mates or the supervisor near him.
(3) Risk management: safety issues are collected and managed by risk management module in LBS system.An important part of issue tracking is to classify issues as per their status.LBS system assumes that an issue can be in one of the three stages: opened, resolved, and closed.Hence, all listed statuses will be matched to these three stages.The following statuses are predefined: new, acknowledged, confirmed, assigned, resolved, and closed.
LBS system provides data based on the location of the mobile client and can be segmented into "push" and "pull" models.The "push" model is the one in which information is proactively sent to subscribers.On arch dam construction site, there is much of warning and notice information needing to be delivered to works in certain areas in time, so "push" model is very useful."Pull" services are used by subscribers to retrieve area information.Workers can get information from LBS according to their interest.In order to strengthen the robustness of data transmission, the application offers a temporary storage function if communication with the base station is broken.The data is able to be uploaded when the network is again available.
Performance of the location-based service system in site application is very important, especially where there are hundreds of workers.The following technical means are utilized for contributing high performance in this decentralized and scale-out system: (1) 3 up-to-date IBM xSeries servers powered by multiway, multicore Intel Xeon processors with hyper thread enabled; (2) main data (system users, worker's information, and WiFi finger print) load into memory and main task happed there instead of store in Disk and avoid of frequently IO exchange.A high-efficient key-value search subsystem which is similar to nowadays NOSQL database is developed.

Software
Architecture.This is typical client-server architecture.The service side is mainly responsible for location request from terminal and positioning calculation.Considering the load balancing, the web server and positioning server running the position calculation are separate both logically and physically.The client is mainly responsible for gathering around AP wireless signal strength and will submit those data to the server side, the server using the data to calculate terminal position based on predefined algorithm.
Using the standard HTTP client and server communication protocol, programming is convenient and scalable.Figure 5 illustrates the information interaction diagram of proposed software system.Mobile terminal submits GET request to web server; GET request information includes signal characteristic strength vector.Web server receives those requests and forwards them to positioning server.Positioning server queries fingerprint database and does certain calculation.A best estimation for position works out.Server Software.The server software consisted of (1) location engine server to calculate real-time position of mobile terminals using fingerprint mapping algorithm; (2) mobile terminals management for management of all the mobile terminals' configuration, diagnosing functions; (3) system administration for user management, system level parameters, and so forth; (4) data import and export for backup and restore; (5) web mapping service (WMS) standards compliant map server, store sand displays spatial data.Any client can use map service by embedding JavaScript snippet into standard html page; (6) log and diagnosis, the entire log and diagnose information can be configured into different catalogs and levels; the output destination can be selectable from local disk file, TCP/IP socket to restful web services; (7) fault tolerance and load balancing, one server's fault cannot lead to failure of whole system; fault server can be detected and isolated from the whole system; system load can be distributed into servers according to resource usage (CPU, memory, disk, etc.); (8) enterprise message server, system and user-defined messages including warning and alert information to workers are delivered and dispatched.Both SMS and LBS system message are supported.
LBS Web Client Software Interface.As shown in Figure 6, the proposed LBS web client interface consisted of nine modules: (1) user management, which manages system users, including a RBAC based rights management; (2) worker management, which manages all workers under LBS system's monitoring; (3) virtual electrical fence system, which can monitor workers in and out certain area; (4) map view, web GIS system, which shows digital map; (5) alarm system, which collects all system alarms and notifications; (6) attendance management system, which generates reports and analyzes the working time sheet of all workers; (7) report system, which reports and queries module for LBS; (8) SMS system, where SMS can be sent out automatically or manually; (9) safety issues management, which manages all safety issues, such as unsafe worker behavior and unsafe facility in work area.(3) warning and notice, which mainly shows all the warnings and notices from system; (4) system information, which shows current system status such as CPU load and memory usage; (5) setting, where reporting interval value can be set; server IP address can also be set; (6) control center, which can use some utility of control center, for example, to broadcast an SMS to all users; (7) 3G communication (both voice and video call); (8) emergency help, which when touched, control center will receive an emergency message; (9) help, where help and tutorial information are provided.

On-Site Application Cases
4.1.Site Setup.Xiluodu hydroelectric power station [36,37] is the second largest one which can output 13.86 million kW power, and it is close to Three Gorges hydroelectric power station in China.The project site is located on the Jinshajiang River in Leibo county of Sichuan Province.The total pouring concrete is about 600 million cubic meters, and total length of tunnel is about 100,000 m.There are hundreds of workers working in the tunnels of arch dam in order to control construction quality of dam grouting, dam reinforcement, and worker' safety [8].The implementation of the proposed system is of important significance.At 2013, WIFI-RTLS infrastructure was deployed in all six main tunnels in arch dam.The installed snapshot is shown in Figure 7.In the tunnels site, there is already complete WiFi network, which is used as backbone network for monitoring equipment and devices to be used as communication tools.

Discussion on Worker's Trajectory and LBS Service Risk.
The system monitored the worker's activities in the tunnel.Track lines illustrated that the worker was doing his routine on-site safety supervision job, while in the middle of tunnel, there is a place which is classified as "dangerous." So LBS system pushes an alert message to him, which is shown in Figure 8(c).This case shows the feasibility of a real-time monitoring system for worker's trajectory, which functions by checking whether any worker operates within a classified place (work, forbidden, or dangerous area).If emergency situations happened, the worker can trigger an emergency call for help.On the other hand, the system can push message to worker.By using this bidirectional communication, LBS system functions are demonstrated and worker's on-site work safety is ensured.

Conclusions
The paper presents the realization of real-time LBS system for monitoring worker's location with the use of WiFi tracking technology to provide service base on the location.Based on the study results, the most influential factors contributing to the successful implementation of the real-time LBS for workers are identified.
To achieve an online, real-time, intelligent tracking identification feature, the on-site running system satisfies worker emergency call, track history, and location query, and so forth.Based on ANN with a strong nonlinear mapping and large-scale parallel processing capabilities, proposed LBS system is effective to evaluate the risk management on worker's safety.
The site operation case also shows that the RSS-based localization algorithm implemented by WiFi RTLS is reliable and accurate enough in some cases, but in other few cases which require more accurate (less than 1 m, at cm level) positioning, WiFi RTLS is not the final solution.So hybrid positioning technology which includes different precision measurement needs to be developed on arch dam construction site and more further researches need to be conducted.Moreover, LBS is in rapid development nowadays, both in industry and in academia, especially in 3D virtual reality environment.It can provide more vivid and perfect experience to arch dam construction management firm.

Figure 2 :
Figure 2: Schematic flow of RSS fingerprint technique.

Figure 3 :
Figure 3: The architecture of neural network model.

Figure 5 :Figure 6 :
Figure 5: Information interaction diagram of proposed software system.

3. 3 .
The LBS Software Interface.The LBS software includes server software, web client, and mobile interface.Detailed introduction is illustrated as follows.

Figure 7 :
Figure 7: A snapshot of RTLS devices in tunnel site.

Table 1 :
The three-main-factor matrix.
Table 1 demonstrates current main risk factor matrix using Xiludu arch