Network management by Smartphones Sensors thresholds in an integrated Control system for Hazardous materials Transportation

— Hazardous materials are dangerous but necessary goods and must be transported into big cities. Tracking of trucks is expensive and difficult to standardize under government surveillance. The proposed solution to solve the lack of an integrated control system is network management based on virtual fences using smartphone sensors to monitor and advise any exceeding threshold, which leads to accident avoidance, faster detection time of accidents, and consequently, reduction in traffic jams, damage to human health and environment.

the streets in São Paulo city has any kind of surveillance. The inspection process of government entities is not able to track 100% of cargo transport. This fact doesn´t allow them to take preventive measures and increases the time of identification and containment of a possible accident. In case of an accident, firefighters put their lives in danger by adopting standard procedures with basic protective equipment which is sometimes incompatible to hazardous substance and don't solve the problem. This paper proposes an evolution in dangerous goods transportation surveillance considering the need for realtime tracking and cargos privacy. The implementation in trucks tracking considers smartphone applications to track trucks and control their routes. Section 2 introduces the Integrated Operations Center, vehicle tracking by mobile networks, fault management, and problem management. Section 3 shows the proposed hardware and software architecture in an integrated control system to hazardous materials transportation. Section 4 shows the proposed configuration. Section 5 concludes the paper. Section 6 possible future directions.
their legacy system. Despite several departments work in the same environment, not all information is shared. The lack of integration between different legacy systems thrusts aside the possibility of optimized transport route planning and increases the response time for abnormal conditions. Information and communication technologies are transforming transportation systems [4]. 2.2 Tracking technologies Many companies offer their services of tracking systems, which are proprietary systems with high costs of acquisition and maintenance. They often require the installation of an on-board device inside the vehicle, which is difficult to be installed and costs a lot of money. Smartphone application to track vehicles is a non-intrusive and cheaper solution. Mobile 5G technology is considered the IoT generation that can connect virtually any type of device, including smartphones and vehicle-embedded modems. The 5G, as the next mobile network technology, promises to transfer core-to-edge functions; it will significantly reduce latency in critical mission operations, such as collision avoidance functionality [5] and, will make feasible the connection between two smartphones, the D2D -Device to Device function [6] which can reach a throughput of 3.5 Mbps at 20m distance.

Smartphone sensors
Smartphones have location sensors like accelerometer, speed, compass, altitude, latitude, and longitude. Two location features in smartphones are used to georeference: a) The GNSS_Provider uses Global Navigation Satellite System-GNSS, it is accurate but slow. b) The Network_Provider uses the cellular mobile network, it is faster but isn't as accurate as GNSS_Provider. The feature FusedLocationApi optimizes the two smartphone features and avoids excessive battery drain. Security vulnerabilities for tracking solutions have privacy concerns that analyze United Nations patterns using dangerous goods classification [8].

Smartphone application interface
There are development platforms used to support applications to collect data from smartphone sensors and handle statistical data [8]. There are four main data acquisition APIs: a) SensorApi -Read sensor data b) RecordingApi -Provides data collection and storage on servers. c) SessionsApi-Provides the application to manage user activity sessions. d) HistoryApi-Provides access to the database with data insertion, deletion, and reading capabilities.

Virtual Fences
The combination of digital maps and tracking signals creates constrains areas with many applications like fleet management, when a truck driver breaks from his route, the dispatcher receives an alert [9].

2.6
Fault management FCAPS (Fault, Configuration, Account, Performance, and Security) is a standard defined by ISO -International Standardization Organization [10]. Fault detection in sensor networks depends on the type of applications and the type of failures [10]. According to OSI -Open System Interconnection recommendation the alarms reporting functions are classified considering their severity and criticality [12] and according to ITIL (Information Technology Infrastructure Library) faults are classified as incidents [13].

2.7
Problem management Isaca.org [13] defines problem management as recording recurring incidents, mapping their root causes, and determining standardized actions with registered and preprogrammed procedures for each situation, to improve decision-making and solve problems more assertively and efficiently [13]. Figure 1 illustrates the ITIL problem management workflow.

International Journal of Advanced Engineering Research and Science (IJAERS)
[  Table 1 presents the classification of automation levels [15], the higher the automatic level is, the more efficient and dedicated to greater intellectual capacity activities the human actions will be [14]. Table 1. Classification of automation levels Level Description 1 The automatic system does not provide any assistance; the operator must perform all tasks by himself. 2 The automatic system offers a complete set of action alternatives. 3 The automatic system shows some of the action alternatives. 4 The automatic system suggests one action. 5 The automatic system carries out an action in case there is an approval from the operator. 6 The automatic system programs an automatic action that can be canceled by the operator within a specific period. 7 The automatic system executes an action automatically and informs the operator. 8 If the operator wants, the automatic system informs him about the completion of the action. 9 The operator is informed about the completion of the action if the artificial intelligence system decides to do it. 10 The system takes all decisions by itself and acts automatically, completely ignoring the operator.

2.8
Decision making According to Fisher et al [16] ETL -Extract Transform Load - figure 2 shows the four steps to populate the data warehouse:

a)
Extract: Extracts data from the source system b) Transform: Apply functions to conform data to a standard dimensional schema c) Load: Load the data into the data mart for consumption d) Process: Load the data from the data mart into the cube for browsing and analyses the information on cube view at OLAP -On-Line Analytical Processing

III. PROPOSED SOLUTION
The proposed solution considers integrate dangerous goods transportation authorization requests with all the databases of the municipality that are relevant for route planning and optimization. Smartphone applications use sensors as a source of collecting information about the vehicles, and it is possible to track them without the need to install any embedded devices. It is much easier and economical for every hazardous cargo driver to carry a smartphone with a tracking application than to use an on-board equipment of difficult installment, maintenance, and standardization. 3.1 Proposed functional diagram for hazardous cargo transportation management São Paulo city has an Integrated Operations Center with several areas of expertise: Police, civil defense, road Traffic Company, and medical emergency. Each department has its legacy system, but without integration with the same data source. Considering that the major problem in hazardous cargo transportation is the lack of surveillance, using smartphones to collect data, the driver behavior and traffic conditions analyze to decision making is a reliable solution, including the case of loss of communication the smartphone can collect data offline and send it as soon as the communication is reestablished. The identification from smartphone identification and vehicle identification information, as well as vehicle location, latitude, longitude, x-axis, and y, z acceleration information collected from the sensors by the GNSS_Provider and Network_Provider modules, which are transmitted through the base stations coverage area and forwarded to the servers by the packet data networks. From web map API it is possible to track vehicles in realtime and view them graphically. Any route change can be sent from the operations center control room to the driver.

3.2
Smartphone sensors Georeferenced location data by smartphones' sensors is the best ready-made solution considering other communication technologies including VANETs, vehicle ad hoc networks that are still a bet [17]. Smartphones are always connected and in case of lack of communication, smartphones can collect data offline and send it as soon as the communication is reestablished. Smartphone and vehicle identification information, as well as vehicle location, latitude, longitude, and acceleration information collected from the smartphone sensors by the GPS_Provider and Network_Provider modules, are transmitted by commercial mobile operators' base stations, which provide a coverage area and forward the information central servers through the packet networks. Web maps API allows tracking vehicles in real-time and view them graphically. Figure 4 illustrates the process of data collection and tracking of vehicles. Route optimization Figure 5 illustrates the proposed functional diagram for hazardous cargo transportation management. When a hazardous cargo transport is authorized, the route planning module determines the best route to be traced. During transportation, the data is collected, the driver´s behavior and traffic conditions are analyzed to decide case some abnormalities are detected, including by other sources of information, and require corrective actions.  (6)Municipality control. Track systems consider the data collection from smartphone sensors such as three-dimensional accelerometers and GPS data that allow tracking vehicles, their speed, and location with precision. After analysis, the collected data is compared with the planned routes. In case of relevant divergence, the threshold alerts can be sent to the Integrated Operations Center. Figure 7 presents the functional diagram for comparison between tracking data and planned routes.   Route planning consists of analyzing all information relevant to vehicle flow between the route´s points of interest, including geographical zones, time restriction, road capacity, etc.
Dynamic route optimization consists of analyzing the behavior of a track with a planned route and proposing changes whenever a more favorable condition is possible. Route restrictions can be entered into the system manually or automatically if incidents that cause an impact on the One dynamic optimization technique is the Rolling Horizon where k intervals divide one stage, named projection stage or projection horizon. In the projection horizon, the first r intervals are the head and after this the tail of the horizon. Using the head is possible to estimate the behavior of the tail. According the time passes the head advances into the tail and calculates new behavior [19]. New behaviors update the thresholds. Comparing the planned route and the tracked transport if deviations are higher than the defined thresholds, the system will alert or perform scheduled actions, which are set according to the level of automation required by the Integrated Control Center [14], so human actions can be devoted to activities of major importance that require greater intellectual capacity.

3.4
Proposed hardware architecture. Hardware and software architectures were built-in function of the cloud computing concept [20] and SOA serviceoriented architecture [21], which considers moving multiple legacy systems to a common barring service in the Integrated Operations Center. The packet data network must have a firewall to limit access to external servers of tracking companies, transport companies, telephone operators, map databases, social networks, and vehicle traffic metering servers. The hardware structure considers at least two data centers with redundancy and load balancing. Virtual machines are considered to be a solution for obtaining a higher computational efficiency and application re-establishment capability. User access provided by a private cloud, which grants access from any location to all integrated services. Figure 8 illustrates the proposed hardware architecture.

3.5
Proposed Software Architecture The proposal of the software architecture takes into consideration the concept of service-oriented architecture, which enables the integration of multiple legacy systems in a staggered manner, avoiding abrupt migrations and without interrupting users´ systems. The software architecture is divided into five blocks: Human-machine interface; Optimization system; Database; Communication system; Data acquisition system. Figure 9 illustrates the proposed software architecture divided into five blocks. The Proposed Software Architecture integrates information from legacy systems of different architectures, protocols, and databases, which do not exchange information with each other. The use of service-oriented architecture is based on integrating different legacy systems in a single service barring. Figure 10 illustrates SOA integration with different legacy systems using a service barring.

Users interface Process
Interactions Information Users IT Legacy systems  Figure 12 illustrates a map with tracking points as heart bits. The threshold could be the meters between each time interval or the distance from the planned route.

Crisis situation, alerts:
A normal situation indicates that the situation is under control, but it can be changed in case if an accident or any situation requiring action beyond the driver's control occurs. It means that a crisis situation was reached, and it can be detected by telemetry sensors that indicate changes to the planned route, the sudden reduction of speed, interruption of information transmission, or pressing the panic button by the driver if the vehicle is equipped with this type of device.
The alert system informs the Integrated Control Center, so it can execute procedures for containment actions and eventually trigger alerts to citizens of the affected region. The communication and alerting system takes into consideration integration into the database of nine government departments:  Massive alerts warn the population of a crisis situation in more than one way, in both sound and/ or visual form. It is important to emphasize that no system can cover 100% of the area by itself and provide a full availability. Therefore, the system must be redundant and integrated into other types of resources. Once a crisis situation is detected and if it is necessary to alert citizens, the Civil Defense Department is called upon to notify the population with text messaging systems, web pages, mass media such as radio and TV, as well as with sirens and speakers.
The proposed system considers the constant evolution and new technologies will be available to the population to provide evolutionary maintenance, educate people, and adapt the system to the new facilities. Figure 15 illustrates a coverage area of an alert system using the short message system provided by a mobile carrier.

IV. PROPOSED ALARMS CONFIGURATION
The speed limit exceeded is the biggest cause of a truck accident, so before exceeding the speed, the driver will have remembered the Integrated Operations Center receives alerts and can punish him. According to Fernandes et al. [35], the accident injury scale is an acceleration function, the Integrated Operations Center receives alerts to a high-risk condition of an accident or to detect it, where major alarms mean attention, and critical alarms need actions. Considering a planned route and real-time tracking, the route analysis compares the location considering the traffic behavior, and if the difference is relevant, an alert is triggered as a possible accident. A smartphone drop in free fall means 9,8 m/s 2 acceleration, so to avoid false alarms, and be feasible to major part of commercial smartphones, a sudden break considers accelerometer values above 3 * 9,8 m/s 2 . Truck's stability consider 28 0 as the maximum side slope, so angular speeds bigger than π/6 rad/s is considered a rollover. A closed vehicle under the Sun reaches 70 o C, so ambient temperatures above 80 o C indicates fire. An explosion produces high noise, so the microphone sensor indicates a critical alarm to noise above 140 dB. According to Bhatti et al. [36], a car crash produces high pressure, so Pressure above 350,000 hPa indicates a critical alarm. To avoid false alarms, and unnecessary field teams' displacement, the proposal considers bidirectional interaction between driver and Integrated Operational Center. Table 2 presents a proposal for the main alerts that the smartphone sends to the Integrated Operations Center. The column Sensor identifies which sensor is used, the column Function details the alarm configuration, and the column Criticality classifies the human actions, major means high risk, and critical a possible accident. Human actions can be automated according to table 1. Noise > 140 dB Critical V. CONCLUSIONS Considering the implementation of smartphone sensors as a management control system will bring four main benefits: a) Reduction of traffic jams, accident avoidance, and faster traffic release. b) Reduction of the lost time: The average origindestination time in big capitals is also directly related to the duration of traffic jams. Thus the reduction of the roads obstruction times will have a significant impact on the quality of the lives of passers-by and will consequently bring productivity gains in the professional sector as well. c) Economic gains: Reduction of fuels and workforce time. d) Environmental gains: Reduction of carbon dioxide emissions, the main greenhouse effect gas, as well as the reduction in emission of other pollutants such as carbon monoxide, nitrogen oxides, and hydrocarbons. In the case of the leak of hazardous materials, in addition to mitigating the detection time, there is a reduction in combat time, with prior knowledge of the field teams which saves the lives of the field team members and the affected population. The leak of hazardous materials can contaminate soil, rivers, groundwater, and air.

VI. FUTURE WORKS
As the continuation of this research work, it is suggested to: a) Develop a mobile application, focusing on the security of access to traffic data. b) Estimate and analyze the possible theft reductions of dangerous cargo vehicles and extend the study to other cargoes. c) Estimate and analyze the possible saving of human lives by avoiding accidents, the cost of social assistance to injured people, and any victims of indirect effects such as exposure to gases and toxic materials spills.