Abstract
Abstract
Sudden water pollution accidents threaten the safety of people's drinking water, such as accidental or deliberate contamination events. In this contribution, we introduce a real-time early warning system that can monitor water to ensure safety. We report results of a pilot-scale installation of a sensor-based early warning system (EWS) to detect and report water quality problems along the Yangtze River near Nanjing, China. The system used four different sensors. Water quality parameters detected in this study were necessary to calculate water quality indices consistent with the Chinese government standards. Sensors transmitted data to a server, which stored them in a database, integrated the data into different water quality indices, and sent them to the client. An alarm was triggered if the indices exceeded a certain threshold. The originality of this article was that we set the indices' thresholds and the combined threshold of them to judge the sudden water pollution accidents clearly and accurately and then we gave the alarm levels according to thresholds. The client can support the EWS by storing the data, facilitating inquiries about historic data, and presenting oscillograms and trends within the database.
Introduction
O
There are a great many rivers, lakes, and reservoirs in China, especially in the southeast. Many of these water systems are potential health risks because of the discharge of industrial and agricultural pollutants (Liu et al., 2012; Zhang et al., 2012). In recent years, people have had to stop using the water from these sources for various periods because of such accidents. An early warning system (EWS) to detect the occurrence of contamination events and trigger an alarm is urgently needed to safeguard people and support their access to good quality safe water supplies. EWSs consist of sensors that monitor pollution events in real time and instruments that can interpret the sensors' output (USEPA, 2005; Brussen, 2007).
Basic water quality sensors monitor pH, chloride, temperature, turbidity, conductivity, and dissolved oxygen (DO) (Grayman et al., 2001; Frey and Sullivan, 2004). Biological behavioral sensors are based on the sensitivity of aquatic animals to toxins in the water. For example, Daphnia magna change their behavior, speed of movement, and swimming height, whereas fish change their normal behavior by swimming faster and more erratically (De Hoogh et al., 2006; Jeon et al., 2008; Mons, 2008) in the presence of toxins. Biological toxicity sensors are based on a luminescent bacterium that produces light in the presence of specific toxins (Zurita et al., 2007). A photoelectric sensor in the machine can detect the emitted light (Henderson et al., 2009; USEPA, 2010), indicating the presence of specific contaminants. Besides these, there are other sensors based on gas chromatography–mass spectrometry, liquid chromatography–mass spectrometry, surface acoustic waves, and electrochemical detection techniques (Storey et al., 2011). These sensors acquire data that can be stored within the sensor for later download or transmitted to another device that is programmed to interpret the data in real time. Operators can then access the information, interpret it, and decide how to act. Automated metering and wireless technology can improve data acquisition and management within the communication system. Software such as TEVA-SPOT, optMQ-s, and CANARY assists in determining sensor placement, assessing the consequences of contamination events and evaluating water parameters by analyzing the acquired data (Berry et al., 2008; Hart et al., 2008; Murray et al., 2010).
Study Site
The Yangtze River of China has a length of 6,300 km and is the third longest river and ninth largest river basin in the world. The Yangtze discharges an average of 900 km3 of water per year (Chen et al., 2002; Yang et al., 2002). Large urban centers are dependent on the river to supply drinking water. The pilot site of the Nanjing University Early Warning System (NJU-EWS) is the Zhao Qiao river pumping station in the Nanjing Chemical Industry Park (Fig. 1), which was built in October 2001 and located north of the Yangtze River. The Park has an area of about 45 km2 and most of its operations are connected to the petrochemical industry (Nanjing University, 2012). The NJU-EWS was located at the Zhao Qiao River pumping station in the Nanjing Chemical Industry Park (Fig. 1). The Park was built in October 2001; it is located north of the Yangtze River and is a national level chemical industrial park. The Park has an area of about 45 km2 (Nanjing University, 2012) and houses more than 100 chemical industries. Industries focus on six main areas: (1) oil and gas, (2) organic chemical raw materials, (3) fine chemicals, (4) polymers, (5) medicine science, and (6) new chemical materials. It is home to many large companies, including among others, Sinopec (China Petrochemical Corporation), ChemChina (China National Chemical Corporation), Badische Anilin Soda Fabrik Ga (BASF), British Petroleum (BP), Celanese, Air Products & Chemicals Corp, and the accumulated investment is more than 5 billion dollars. The employees of the companies and their families live in close proximity to the Park in a densely populated and representative sensitive area where there is a high risk of pollution. Discharge from the companies in the Park and rain runoff drainage is released into the Zhao Qiao River, which then flows into the Yangtze River through the Zhao Qiao River pumping station. Because of leaks of highly toxic, hazardous, and potentially explosive discharges from various companies, dead fish have been reported in the Zhao Qiao River according to investigations by the Environmental Protection Department, and the water quality is unstable. The Zhao Qiao River pumping station is at 32°16.941′N and 118°48.605′E. Our field investigations showed that background values of water quality parameters are as follows: DO=6.4 mg/L, SS=39 mg/L, COD 33.57=mg/L, pH=7.64±0.04, depth=1.8 m. We analyzed the area's geographical and hydrological data and, after considering the pollution risks, the convenience of housing for the sensors, and the communication ability, we chose the pumping station as the sampling location. Nanjing City is located south of the industrial park, on the southern bank of the Yangtze River.

Location of Nanjing Chemical Industry Park with respect to the Yangtze River and Nanjing City.
The NJU-EWS consists of four sensors, a communications system, and an interpretation platform. The sensors measure basic water quality parameters, biological behavior, biological toxicity, and ultraviolet absorbance, and collectively provide data to define the water quality. These data are sent to a server at the pilot site, and the server sends the data to a platform at Nanjing University (NJU) using the communication system. The platform then utilizes built-in algorithms to interpret the data and sound an alarm if the river water is polluted.
NJU-EWS Design and Monitoring Pollution
NJU-EWS includes hardware and software components and has the ability to acquire data and manage information (Fig. 2). The four sensors detect the data needed to define water quality indices, and these data are transmitted to the platform at the monitoring center through the internet. If a contamination event occurs, the monitoring center sends an alarm to the manager.

Schematic diagram of the Nanjing University Early Warning System (NJU-EWS).
Hardware components
The hardware components can be automatically controlled, reducing human operator error and man power. The system includes the following:
(1) Sensors to monitor pH, DO, turbidity, conductivity, temperature, biological behavior, biological toxicity, and the presence of nitrobenzene and dichlorophenol. The sensors are connected to the server by a serial RS-232 module. (2) Transmitting device consisting of a serial communication device and a network (internet) communication device. (3) Server and platform computers, located at the pilot site and monitoring center, respectively, contain the software components that control the NJU-EWS.
Software components
(1) Server software has three modules: a serial communication module that receives the sensor data, an access database module that stores the sensor data, and a network communication module that sends the data to the monitoring center.
(2) Platform software includes three modules: a network communication module to receive the data from the server, an access database module that saves the data, and a data processing module to handle the data and present analysis results to the users.
Monitoring pollution
Operator error, ineffective supervision, or other accidents may result in hazardous materials being discharged into the river, causing contamination events. There are four common pathways:
(1) Pollutants are discharged into natural waters through the stormwater pipe network; for example, wastewater may enter the stormwater pipe network during a fire disaster. (2) Pollutants leak into natural waters following a storage tank explosion or other disasters. (3) Pollutants affect the wastewater treatment process as a result of toxicants discharged through the sewerage pipe network. (4) Pollutants are discharged into natural waters as a result of hazardous material leaking during transport.
The pollutants that we studied were benzene derivatives, substituted benzenes, chlorophenols, halogenated hydrocarbons, alkanes, polyaromatic hydrocarbons, and pesticides. These pollutants are produced in large quantities and are highly toxic.
NJU-EWS Sensors
The four sensors in the NJU-EWS measure basic water parameters, biological behavior, biological toxicity, and ultraviolet absorbance. The most sensitivity is the biological toxicity sensor, then basic parameters sensor, and biological behavior sensor; the worst sensitivity is ultraviolet sensor. We chose these four sensors as we wanted to detect the main pollutants found in discharges from the Chemical Park and also the pollutants that we had previously detected in the Yangtze River in our field investigation. These pollutants were benzene derivatives, substituted benzenes, chlorophenols, and pesticides. For example, the biological behavior sensor monitors pesticides, such as dichlorvos, cadmium chloride, dipterex, parathion, and deltamethrin. The biological toxicity sensor monitors benzene derivatives, substituted benzenes, and chlorophenols, such as phenol and nitrobenzene. The ultraviolet sensor mainly monitors nitrobenzene, dichlorophen, other benzene derivatives, and chlorophenols, and the basic parameters sensor monitors the five basic background parameters of the river to support the data from the other sensors. All four sensors distinguish the main pollutants and their presence in the river. Monitoring can therefore provide an early warning service.
Basic parameters sensor
The basic parameters sensor uses a DIQ/S182-MOD multimeter probe, produced by the German WTW Company (WTW's Chinese Agency, 2010). This can detect five water quality parameters in real time: pH, DO, turbidity, conductivity, and temperature. The sensor has a viewing screen and four probes (Fig. 3). The four probes should be plugged into the river water to detect the water quality indices. The probes must be washed once a week using distilled water.

Basic parameters sensor.
Biological behavior sensor
The Research Center for Eco-Environmental Sciences of the Chinese Academy of Sciences provided us with the biological behavior sensor (Fig. 4). The river water should be pumped into the biological behavior sensor's chambers where fishes are in it. It can perceive variations in the actions of the test organisms, which disturb the signal produced by an electric field. The test organisms used in this system were Japanese rice fish or Madaka (Jin et al., 2012). When Madaka is exposed to elevated concentrations of dichlorvos, cadmium chloride, dipterex, parathion, it will result in a pronounced decrease in behavior strength in a short time, which we regard as avoidance behavior; this phase is followed by a regulatory response or by different adjustment/readjustment patterns. When Madaka is exposed to lower concentrations, there will be an adjustment response that decreases after a long time. The response to deltamethrin differs from the response to the above-mentioned pollutants, in that there is no adjustment response when exposed to higher concentrations (Zha and Wang, 2006; Ren and Wang, 2010). To reduce statistical error, 12 Madakas were placed into the four chambers of the sensor, so that there were three Madakas in every chamber. If the difference value, which is calculated as the difference between the average behavior strength before the change over a sequence of five times and the average behavior strength after the change for a sequence of five times, when all Madaka are exposed to higher concentrations is more than 20%, it indicates that the water quality has been changed. Equally, when all Madaka are exposed to a lower concentration, and the value for the difference is more than 10%, it indicates that the water quality has been changed (Nanjing University, 2012). It can give three types of results: “safety,” “pollution,” and “serious pollution” to describe the water quality. Because Madakas can live for 2–3 weeks in the chambers of the sensor according to our pilot project debugging experience, they should be replaced during the period.

Biological action sensor.
Biological toxicity sensor
The biological toxicity sensor was provided by the State Key Laboratory of Pollution Control and Resource Reuse in the School of the Environment, Nanjing University (Fig. 4). The river water should be pumped into the sensor to be detected. The bioluminescence response from luminous bacteria detects biotoxicity, with a luciferase catalyst to improve the detection speed. Because the luminous bacteria's activity can be maintained for 1 week, it should be replaced every week. The luciferase catalyst can respond quickly to different concentrations of organics; it can detect phenol and nitrobenzene, and the correlation coefficients with the luminous intensity and the linear fit of their concentrations are 0.94 and 0.99, respectively, both of which were significant when p<0.05. The detected EC50 values were 50.57 mg/L and 28.8 mg/L, respectively (Nanjing University, 2012).
Ultraviolet sensor
The ultraviolet sensor was provided by the Key Laboratory of Advanced Photonic and Electronic Materials of the Nanjing National Laboratory of Microstructures, Department of Physics, Nanjing University (Fig. 4). The river water should be pumped into the ultraviolet sensor where the ultraviolet can irradiate it. The sensor acquires the water sample's absorbance spectrum according to the feature of the organic pollutants' absorbing the ultraviolet spectrum and then compares with the reference background of water sample for peak seeking and spectral line fitting. The fitting method uses asymmetric Gaussian distribution functions to fit the spectrum's shape using the least-squares method; the results show that this method can get a good simulated spectral line coinciding with the actual testing spectral line. At last, we get the organic pollutant's species and concentration by using the absorbance and the concentration of database, which is measured by the standard method. At the time, we get the absorbance spectrum line's match value. The optical distance and detection range of the sensor can be adjusted in this application program; for example, when the sensor's optical distance is 1 cm, the detection range of nitrobenzene is 0.05–50 ppm, the detection range for dichlorophen is 0.1–100 ppm, and the detection range for chlorobenzene is 30–3,000 ppm (Chen et al., 2009; Huang et al., 2010; Nanjing University, 2012).
NJU-EWS Communication System
The NJU-EWS communication system consists of serial communication and network communication systems.
Serial communication system
Using the serial communication technology, the sensors send the water quality data to the server at the pilot site every 5 min. The sensors use a Modbus communication protocol, with a baud rate of 9,600 bps, 8 data bits, an odd parity bit, and a stop bit of 1.
Network communication system
The network communication system uses the wireless CDMA (Code Division Multiple Access) technology. This follows the CDMA2000 standard and is based on the socket program. Using TCP, the server sends the sensor data to the client every 10 min in a JSON (JavaScript Object Notation) format. An example is given below:
{
“Time”: “2011-07-12 11:49:25,”
“The Basic Parameters Sensor”:
{
“pH”: “7.40,”
“Dissolved Oxygen”: “2.051,”
“Conductivity”: “0.837,”
“Turbidity”: “5.889,”
“Temperature”: “15.4”
}
}
The pH is given in standard units, DO is in mg/L, conductivity is in μmhos/cm, turbidity is in formazin nephelometric units (FNU), and temperature is in °C.
Platform and Environmental Management Strategies of the NJU-EWS
In the event of discharges from factories or ships, the leakage of pollutants, or other pollution events, the data are sent to the platform at Nanjing University by the communication system. The platform, which contains the early warning threshold values for the indices, sounds an alarm when the index values exceed the warning threshold. The system sends a red alarm message and sounds a whistle to notify the manager (Fig. 5). The data are real time and dynamic. The data are stored so that the manager can query the data in the platform to obtain specific information on the levels and duration of the problem.

Receiving data on the NJU-EWS platform.
Early warning threshold
Warning thresholds are set in accordance with the People's Republic of China standards (Ministry of Environmental Protection of China, 2002). The main reason why the four sensors were incorporated into one system was to improve the accuracy of monitoring, as described earlier. Some of the pollutants detected by the biological behavior sensor, the biological toxicity sensor, and the ultraviolet sensor are coincident. The basic parameters sensor permits assessment of the pollutants. The different sensors have different sensitivities; the sensors are ranked according to their sensitivity in the following order from high to low: the biological toxicity sensor, the basic parameters sensor, the biological behavior sensor, and the ultraviolet sensor. The lower sensitivity sensors can give preliminary information, and the higher sensitivity sensors can give further judgment to improve the reliability. Also, the sampling time of the sensors is different; the sampling times of the basic parameters sensor is set at 5 min, the ultraviolet sensor is set at 10 min, the biological behavior sensor is set at 30 s, and the biological toxicity sensor is set at 20 min, so the longer the detection period, the more reliable the result. Of course, operators ideally should have experience of how to assess the results from the different sensors over long operation periods; in practice, the data are very complicated, we can just provide some limited examples:
(1) Warning thresholds for two of the five water quality parameters sensors are as follows: the pH warning threshold is for values less than 6 and greater than 9. This range ensures that the pH remains close to neutral, protecting the safety of the river eco-environment. The water at this site is used by the factories in the Chemical Park, so we choose the fourth type of national water quality standard (Ministry of Environmental Protection of China, 2002), which is suitable for industrial consumption water and entertainment consumption water where human body cannot contact it directly. If the index value exceeds the threshold, the platform sends an alarm message. The DO index warning threshold is 3 mg/L. If the ambient value falls below this, an alarm message will be sent. Similar thresholds have been established for the other water quality parameters. Data from the other sensors can then be examined to provide more information on the situation. (2) Biological behavior threshold is set according to the toxicological responses of the fish. The warning threshold of the biological behavior sensor is triggered when the index is indicative of pollution or serious pollution. The state of pollution occurs when the fish exhibit some erratic behavior, and serious pollution occurs when they exhibit severely erratic behavior. In both cases, an alarm message will be sent. (3) Biological toxicity sensor triggers an alarm when the luminous intensity of the water sample is less than 80% or more than 120% of the bacteria's relative luminous intensity. If the index value is outside this range, a red alarm message is sent. The threshold for the quality control material is from 30% to 70% of the bacteria's relative luminous intensity. If the sensor data are outside this range, a yellow alarm message is sent. (4) The warning threshold of the ultraviolet sensor for nitrobenzene concentrations is 5.0 mg/L and that for dichlorophenol is 1.0 mg/L. If the index values exceed these thresholds, an alarm message will be sent. These thresholds are in accordance with the People's Republic of China standards (Ministry of Environmental Protection of China, 1990), which should be disposed by a secondary sewage treatment plant. As the ultraviolet sensor is in the Chemical Park, the background concentrations of nitrobenzene and dichlorophenol are higher than in other surface water. Thus, we choose the third type of national water quality standard (Ministry of Environmental Protection of China, 1990). (5) There is also a warning threshold for the combination of data from all sensors. We considered the combined sensors' function to improve the early warning's accuracy because a single sensor gives an alarm that may be wrong and we should verify data with other sensors. If more sensors give alarms, the possibility of accidental or deliberate contamination event is higher. To integrate the four sensors' data, we designed a combined warning threshold. The four sensors are classified as measuring basic factors, biological properties, and physical properties. According to their response times, we designed the combined warning thresholds shown in Table 1.
DO, dissolved oxygen.
We set five grades to better emulate human brain function, the grade is high, the possibility of event is higher. The grades of water quality were set according to practical experience and sensors' sensitivity in consideration of the following factors:
(i) Different sensors have different sensitivities. The biological toxicity sensor is the most sensitive, followed by the water quality parameters sensor, the biological behavior sensor, and the ultraviolet sensor. As the ultraviolet sensor is not very accurate, the values at the bottom of Table 1 are only included for reference. (ii) We set grades I and II as safe levels, with grade I being the best. Grade II indicates low DO, which should receive attention to prevent the ecology of the water worsening. A yellow alarm is sent when the water quality reaches grade III. In this state, the biological toxicity exceeds its safe range and the DO is low. The water at the site should be examined carefully. A red alarm is sent when the water quality reaches grade IV. The biological behavior sensor begins to give a pollution signal at this point, and intakes near the site should be closed. Grade V is the worst situation, when all sensor indexes trigger their respective alarms.
As a result, the warning system classifies five alarm types; they are “Green,” “Blue,” “Yellow,” “Orange,” and “Red,” the alert level gradually increases, the “Green” alert level is the lowest, the “Red” alert level is higher, and the alert level is decided by all combined sensors' data. There are also every sensor's warning threshold value and water quality standard that every index should comply with, as shown in Table 1.
Storing, showing, and querying data
The platform stores the sensor data and these can then be listed to show the change in values over time. The stored information enables the operators to query the data and create graphical plots to present the data. Thus, users can query the real-time and historic data, look up changes in past data, or provide periodic reports to communities and interested parties.
Data storage
The combined technologies use a Microsoft Access 2007 database, which includes functions to query the data and add records. The design of the database tables is given below:
FNU, formazin nephelometric units.
Data display
The server sends data to the platform at 10-min intervals. The platform uses the list table of the DataGridView to show the sensors' index data. The software uses the C# language, and users can view the data in real time (Fig. 6).

Querying basic parameters sensor data.
Data queries
The platform uses the list of table function of the DataGridView to show the sensors' index values. For example, the user can query August 24, 2012, and obtain an oscillogram for this date. The history data can be showed to users (Fig. 6). Users can view many other oscillograms from different dates for the purpose of comparison (Fig. 7).

Oscillogram of dissolved oxygen (DO).
Conclusions
The NJU-EWS was implemented in a branch of the Yangtze River, the branch and the Yangtze River form a ring (Fig. 1), and the Chemical Park locates by the branch; if an accidental or deliberate contamination event occurs in the Chemical Park along the branch, the pollution will enter into the main river. The pilot was located in the Zhao Qiao River pumping station, which was located at the branch of the Yangtze River, where the relative flow rate was 10.55 m3/s and flow velocity was 0.21 m/s. Because of limitations associated with the field conditions and with the deployment and maintenance of the sensors, we constructed an experiment room (Fig. 8) and used two peristaltic pumps to pump water from the river into a pool (0.5 m long×0.5 m wide×1 m high) in the room. The pumps were able to adjust to the relative flow rate of the river, and the probes of the sensors were placed into the pool to monitor the water quality. The NJU-EWS has the ability to raise an alarm when accidental or deliberate contamination events occur. The main functions of the proposed system are as follows:
(1) The system provides the basic parameters needed to develop water quality indices: pH, DO, conductivity, turbidity, and temperature. The system also provides data on the biological behavior index, the biological toxicity index, and the ultraviolet index. When the water quality data exceed predetermined thresholds, the system sends an alarm through the communications system to inform the manager. This allows the management staff to address sudden pollution episodes and supports the government's science policy by providing data that can be accessed through the database. (2) The data from each sensor can be used to verify data from the other sensors, so as to decrease the error rate associated with the alarm signal. The more sensors give the alarm, the possibility of event is higher. Different sensors' alarm can give reasons in different aspects. For example, when both the basic parameters sensor and the biological behavior sensor send an alarm, the possibility of an accidental or deliberate contamination event is very high. This should trigger a check of the site. However, if only the turbidity sensor triggers an alarm signal, it may be that a rainstorm, rather than a sudden water pollution accident, has caused high turbidity levels. (3) The platform's data can provide the input to water quality models for computing the downstream impact of a pollution event.

Location of the experiment room.
Nevertheless, the system presented here has certain limitations. These are as follows.
(i) The communication system is not very stable. When it goes offline, it must be reconnected. (ii) The NJU-EWS sensors must be maintained and repaired if they should break. For example, the basic parameters sensors and detectors should be washed every week; the fish in the biological behavior sensor should be changed; and the bacteria in the biological toxicity sensor should be changed periodically. To ensure the system's continuous operation, we prepare more backups for the devices that should be washed or are usually broken.
Footnotes
Acknowledgments
This work was supported by the Major State Water Pollution Control and Treatment Technique Program of China (2012ZX07506007-02) and by the State 863 project of China (2008AA06A405). The authors would like to thank the Research Center for Eco-Environmental Sciences, Chinese Academy of Sciences, Resource Reuse, School of the Environment, Nanjing University and the Key Laboratory of Advanced Photonic and Electronic Materials, Nanjing National Laboratory of Microstructure, Nanjing University, for providing the sensors.
Author Disclosure Statement
No competing financial interests exist.
