{'fraction_non_alphanumeric': 0.019891500904159132, 'fraction_numerical': 0.002345926396559308, 'mean_word_length': 5.122681029323759, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SAFEWATER – Innovative Tools for the Detection and Mitigation of CBRN Related Contamination Events of Drinking Water

The safety and/or security of drinking water can be threatened by natural disasters, accidents or malevolent attacks. The European FP7 project SAFEWATER aims at developing a comprehensive event detection and event management solution for drinking water security management and mitigation against major deliberate, accidental or natural CBRN related contaminations. New cost-effective C, B, and RN sensors will be developed. An innovative concept with a broad network of low-cost sensors-"domestic sensors" (complementary to a set of sensors in strategic locations) will be developed. A technology platform will be provide which is able to capture and analyze the data collected by the sensors and from other information systems and give a full overview of the crisis to the responders by means of online look-ahead simulations to efficiently manage potential crises. For testing the SAFEWATER solution it will be integrated with on utility-partners' information systems.

Keywords: Drinking water networks, CWRN sensors, real-time detection, event management, online simulation

Motivation
The security of drinking water is increasingly recognized as a major challenge for municipalities and water utilities. The safety and or security of drinking water can be threatened by natural disasters, accidents or malevolent attacks. In the event of a contamination water spreads rapidly and hence extensively before the problem is detected. Contaminated drinking water can induce major epidemics, disrupt economic life and create mass panic. A first generation of software packages and sensors has been developed for managing drinking water safety and security and in particular for detecting incidents, such as the Guardian Blue from Hach Lange, Canary from EPA. They allow for an overall management of water security including the systematic collection and interpretation of information by online sensors. However this first generation of tools suffers from a range of serious shortcomings: (1) Real-time detection and alarm capabilities are non-existing or insufficient; (2) current limitations of propagation models make the effective situational assessment of potentially contaminated zones very difficult; (3) so far no generic approach for the online-calibration of the hydraulic and transport model exists; (4) Models for response, mitigation and recovery that are almost inexistent for real world systems at present; (5) the set of available CBRN sensors, which can be used to detect contamination threats to water drinking quality, is very limited.
The European FP7 project SAFEWATER (10/2013 -12/2016) aims at developing a comprehensive event detection and event management solution for drinking water security management and mitigation against major deliberate, accidental or natural CBRN related contaminations. The proposed comprehensive SAFEWATER solution, comprising enhanced near-real-time sensors, an advanced Decision Support System, on-line hydraulic propagation models and an all-encompassing Event Management System will be tested against several true-to-life usage cases (e.g. contamination of a municipal storage tank, contamination of a major water trunk line, contamination of a local supply line) using several families on contaminants such as organic compounds, toxic waste, and radioactive material. Trials and measurements of individual components of the system as well as the complete entire system are performed in special hydraulic test networks set up in three different water Utilities. Applying the SAFEWATER system or even components thereof will enhance a Water Utility's ability to rapidly detect a contamination event, analyze its repercussions using real-time hydraulic models, mitigate the damage using simulation tools and swift operating procedures, and deal more effectively with the event using a comprehensive event management tool.

Overview about the SAFEWATER System
Fig. 1 provides an overview about the structure of the Structure SAFEWATER system. Key module is the Event Management System (EMS) which handles incoming events and provides decision support in case of a crisis (but also for routine operations). The Event Detection System (EDS) detects so far unknown constellations of water quality parameters. These events may be a hint on a contamination in the drinking water network, or due to a so far unknown operational effect. In case of an event it is important to provide decision support about the best mitigation measures (e.g. opening/closing of valves). In the SAFEWATER system the hydraulic and quality state of the network is simulated in real-time. In case of an event online response tools can predict the spread of the contamination and calculate optimal measures to minimize the impact of the contamination. The simulators can also be used in an offline context in order to train the operational staff. Furthermore, the simulators are used in order to train the event detection system. Within the SAFEWATER project also enhanced CBRN sensors are developed which provide the ability for an early detection of CBRN contaminations.

Event Management System
The Event Management System (EMS) provides a web-based user interface to manage contamination events.
The EMS provides notifications about automatically detected events, allows manual introduction of new events and related information, and supports situational awareness. To provide such functionalities, the EMS relies on the Event Detection System (EDS) for the actual detection of events, and on the Simulators for estimating the evolution of the contamination spread, as well as the location of the contamination source. Additionally, a Workflow Engine enables the orchestration of the interactions among components according to pre-defined processes specified using Business Process Model and Notation (BPMN 2 ). Communication among the system components is achieved by means of a Message oriented Middleware (MoM), which permits loose coupling and provides flexibility regarding the distribution of the executing components (see Fig. 2). A simple detection and response scenario includes the following steps: 1. The EDS monitors the network using SCADA data and detects an event.
2. The EDS issues a notification about the event.
3. The event is visualized in the EMS. 4. A response workflow is started. 5. As part of the response flow a simulation gets executed. 6. The results of the simulation are displayed in the EMS. While currently not implemented, the process execution mechanism provided by the workflow engine enables the extension of the system to accommodate complex scenarios. Those scenarios may involve the utilization of communication mechanisms such as e-mail or SMS, and interaction with other systems, such as an ERP or an intrusion detection system (as a complementary event generation source).
The EMS is able to visualize detected events both in table form, with search and sorting options, and on a map. In the latter case, an indicator is placed using the coordinates provided by the EDS (see Fig. 3). To support the event management process, information about the events can be extended through online forms. As indicated in the example steps listed above, upon detection of an event a workflow is started that will trigger the execution of the Simulators. When a contamination event occurs, a simulation to predict the contamination spread in the network during the following hours is executed. The results of the simulation are graphically displayed on a representation of the network with its parts colored according to the values generated during the simulation.
Besides the look-ahead simulation, other kinds of simulation are also available, which are also accessible through the EMS interface. The data provided by the SCADA system and the sensors can be used to feed an analysis algorithm that will try to estimate the location of the contamination source. Additionally, it is possible to explore what-if scenarios using different configuration options of the Simulators. The details regarding the EDS and the Simulators can be respectively found in sections 3 and 4.

Event Detection System
The Event Detection System (EDS) is a software platform based on machine learning technology which enables to detect that there is an issue with the water quality. The need to detect pending problems in water system arises from the need to minimize damage cause by unexpected abnormal events. The logic behind this methodology is presented by the following table.
Common good -most Common bad-change Rare good Rare bad Horizontal axis shows two options. Common occurrences and Rare occurrences. The vertical axis displays a Good occurrence versus a Bad occurrence. The interaction between the two dimensions yields four basic occurrences.
Common-Good: This is the case most of the time. Common-Bad: This indicates that this part of the system should be replaced. Rare-Good: Occurrences in this category require classification. Rare-Bad: This indicates that something is wrong in the system. In many cases, detecting occurrences may be difficult since the system is asked to find something that hasn't yet happened in the past. Such a challenge addressed by utilizing an Unsupervised Machine Learning methodology (UML). The heart of UML is to learn the normal behaviour of the systems and to detect when the system deviates from normal behaviour.
The EDS uses several methods to generate an indication that something is wrong. Violation of single variables limits Appearance of rare combination(s) Similarity to Bad past situation(s) Violation of Rules Each type of indication may be based on one or several Detectors. A Detector is an algorithm trained to detect specific abnormality in data. An example of a Detector is an algorithm to detect that a variable is out of its statistical limits. Such a Detector "learns" the statistical limits of each variable and when actual data violates these limits (after delay time) the EDS generates alert.
It is the user's choice as to which Detectors to activate. The default option is that they are all activated. Once activated a Detector may be calibrated.
When several Detectors simultaneously alert an Event is generated. An event needs to be classified by the user. Over time, the EDS learns from the classification of events and improves its alerting policy. The EDS and the EMS communicate via the MoM of the system.

Offline and Online Simulators
Since many years powerful simulation tools are available for the offline simulation of the hydraulic behavior of water distribution networks and the dynamics of water quality parameters. An example is the open source toolkit EPANET resp. EPANET-MSX for enhanced water quality simulations. These simulators can be used for the analysis of different contamination scenarios in order to get a better understanding of the water network behavior. However, the usage of these platforms for decision support of water utilities is still a challenge as the calibration of the models is not an easy task (mainly due to the lack of detailed water consumption data). Furthermore, the accuracy of water quality models is limited as in most packages the models are very simplified, e.g. assuming complete mixing of concentrations at junctions. One aim of the SAFEWATER project is the enhancement of existing simulation platforms (EPANET-MSX and SIR-3S) in order to improve the accuracy of the water quality models by a more realistic mixing model. Furthermore, the topology of the models is simplified by the technique of graph decomposition. Due to that, without any loss of accuracy, the model size is reduced considerably (typically more than 50%).
In recent years, simulations are also performed in (near) real time ("online simulation"). Such online hydraulic and water quality simulators support the online identification of contaminant sources in real time. They can also provide an estimation of the contamination severity and the impact of mitigation and recovery measures by means of look-ahead calculations. For application of network simulations as operative tool in the framework of a security management system, offline data are insufficient. Online Simulation models are important tools for network monitoring as well as mitigation and response to a contamination event. In case of a contamination the effective response to the event can save health or even lives of thousands of people. A basic requirement for that is to have a good estimate for the current and future situation, notably the spread of contamination. Therefore it is important that all water quality and transport calculations are based on a very accurate hydraulic model. This is possible only by using a well calibrated online simulation model. Besides the estimation of the future affected areas, also response actions such as source identification and determination of isolation valves for preventing the further spread of contamination are based on the results of the online simulation model.
In contrast to the offline simulators where the boundary conditions of the model define a certain scenario that represents the network behavior of the past or a situation that never has been happen in the real system the online simulation model aims at reflecting the actual operational state of the system as accurate as possible. For that purpose the hydraulic simulation engine is connected to the SCADA system of the utility. Dependent on the desired degree of integration this connection can be realized within the IT-infrastructure of the Process Control System (PCS) or outside the firewall of the PCS. In the latter case the process data are transferred in certain time intervals from the PCS to a database whereas full integration means that the simulation software runs within the PCS.
Online simulation is aimed to provide a complete overview of the actual state of a drinking water distribution system for both network hydraulics, as well as water quality, at any place and with a time delay of only a few minutes (including time for data transfer and processing as well as calculation). Since measurements exists only at selected locations they can deliver only a local snapshot of the current system state. The simulation model by using the measurements as boundary conditions fills the gap between these locations and enables drawing a comprehensive picture about the current state of the entire system. The model is constantly updated and ideally fits with the real physical system by automatically updating the key model parameters (boundary conditions). It provides the basis for all higher functions such as source identification, propagation, severity, impact, as well as customized views on the system. In other words, online simulation supports fast and appropriate response, in addition to monitoring the current state of the system.
In SAFEWATER online simulation models are implemented for designated pilot zones of the water supply systems of the three end-users involved in the project. One model includes a domestic zone of an urban water supply system that serves around 50.000 people. The second model consists of a subsection of a large regional water supplier that delivers water to municipalities and their local water suppliers. The third systems incudes a combined transport and distribution system with two water works and storage facilities with dynamic network operations.
For modelling purposes the online data of the PCS are subdivided into two groups. The group of actuators includes operational states and measurements that are transferred to the simulator directly as boundary conditions of the simulation model. Examples are valve states, operational states (on/off) or speed of pumps, water level in reservoirs or set values of control devices. The second group consists of so called sensors. In the online model sensors include redundant information from measurements in the field that are used for the comparison of measurements and calculation results The difference plays an important role as indicator for the quality (matching with reality) and calibration state of the simulation model.
In order to make the online simulations capable of being integrated within different client software special tools and interfaces have to be developed within the project SAFEWATER. The data integration component implements a number of Plugins, for instance, generic online data interface for connecting with any SCADA system and the simulator Plugin that runs the simulations. In addition, multiple external calculation or visualization tools can be updated and operated using the central component. In SAFEWATER the online simulation results are presented within the general and user friendly Event Management System (EMS) in order to make them available not only for experts that are experienced in using hydraulic simulation models but also for decision makers and technical staff of the utility.

Innovative CBRN Sensors
The work on CBRN sensors deals with development and adaptation of sensors for water contamination. The sensors will be evaluated together with water utilities at two different stages during the SAFEWATER project. The rationality for this developmental work is to provide the event management system/event detection system with useful data of a kind that is not available using "off-the-shelf" sensors presently on the market.
The radioactive threats are covered by partner CEA using a technology based on plastic scintillators. To manage the challenge of beta radiation detection, and possibly also Alpha radiation, CEA has designed a new plastic scintillator light collection system and developed associated high velocity electronics and data processing algorithms. The first release of the system was built and is now under evaluation for detection of Beta radiation. A novel approach is used where the scintillator is implemented as scintillating optical fibres, to come close to the bulk of the water, in order to increase the area detection. The scintillating fibres will convert the radiation into light that will travel through each optical fibre to finally be detected by the PMT (Photon Multiplier Tube, see Fig. 4). For detection of chemical contaminants in drinking water, partner Biomonitech is developing a compact bacteria-based chemical online sensor. This technology is based on measuring rapid changes in light emitted by natural marine luminescent bacteria upon exposure to low concentrations of a broad range of chemicals that affect their metabolism. Biomonitech has developed assay buffers that make the bacteria sensitive to certain groups of chemicals to monitor either metallic (cationic heavy metals and metalloids) or other (mainly) organic chemicals. An important part of the present work includes design of a server for analysis/ alarm and a Biomonitech-operated shared raw data server.
For detection of E. coli bacteria in drinking water, partner Acreo has adapted an earlier concept for an antibodybased sensor. This sensor system use antibody-mediated fluorescent labelling of Escherichia coli, followed by counting of bacteria using a small in-house developed flow cytometer in combination with fast data analysis (Fig.  5). The whole system for fluorescent tagging of E. coli and detection in the flow cytometer has been integrated in a unit that is directed from a laptop PC and will be able to detect bacterial contamination in 5-15 minutes. This will give new possibilities for quick response when integrated in the event management system/event detection system.

Summary and Outlook
The proposed comprehensive SAFEWATER solution, comprising enhanced near-real-time sensors, an advanced Decision Support System, on-line hydraulic propagation models and an all-encompassing Event Management System will be tested against several true-to-life usage cases (e.g. contamination of a municipal storage tank, contamination of a major water trunk line, contamination of a local supply line) using several families on contaminants such as organic compounds, toxic waste, and radioactive material. Trials and measurements of individual components of the system as well as the complete entire system are performed in special hydraulic test networks set up in three different water Utilities. First results are expected by the end of 2015.