GIS-based River Water Quality Dynamic Monitoring System
2026-04-06 09:05:46··#1
1 Introduction At present, environmental protection departments mainly collect data through monitoring stations, and then process and analyze these data through water quality models in the monitoring center to monitor the water quality of rivers. However, these stations are widely dispersed, and the collected river water quality data is relatively one-sided and cannot reflect the water quality of the entire river. In addition, the transmission and analysis methods are backward, and the monitoring results are always lagging behind the changes in water quality and cannot reflect the dynamic status of river water quality in a timely manner [1]. Therefore, it is very necessary to develop a system that can reflect the water quality of rivers in real time. With the development of computer technology, communication technology and GIS (Geographic Information System) technology, it has become possible to develop such a system. This paper proposes a GIS-based dynamic monitoring system for river water quality based on these technologies. This system can reflect the water quality status in a timely manner. 2 Overall System Design The entire system consists of two parts: a monitoring center and a data acquisition terminal. The monitoring center is the server of the entire system and runs the GIS system; the data acquisition terminal is an embedded system that collects river water quality data on-site. Since the river water quality monitoring covers a wide range, the GIS system and the data acquisition terminal are interconnected and communicated through TCP/IP. The data acquisition terminal uses TCP/IP to achieve reliable long-distance data transmission. The monitoring center GIS receives the river water quality data collected by all terminals, stores, analyzes, manages, queries and displays the water quality data, and manages all acquisition terminals. 3 Implementation of GIS system GIS, or Geographic Information System, is a system that integrates geography, geometry, computer science and other sciences, and uses graphic technology and database technology to collect, store, analyze, manage and display spatial information and its attribute information [2]. Its main feature is the management of spatial objects, which can display various spatial locations, spatial distributions and spatial relationships through digital maps [3][4][5]. In this design, GIS is used to store, analyze, simulate and display river water quality data to realize the monitoring of river water quality. The whole system consists of a database, a GIS visualization interface and a water quality model. The system block diagram is shown in the figure. The GIS visualization interface directly manages spatial objects, displays the spatial location, spatial distribution and other spatial attributes of spatial objects, and displays the non-spatial attribute data of spatial objects by associating spatial attributes. These spatial attributes and non-spatial attributes are managed by spatial database and non-spatial database respectively. Spatial databases manage various spatial data in GIS, including topographic maps, thematic maps, and the geographical coordinates and shapes of objects such as watersheds, embedded system terminals, and pollution sources. Non-spatial attribute databases are implemented using SQL databases to manage various non-spatial attribute data, including water quality monitoring data (such as river flow, velocity, dissolved oxygen DO, etc.), statistical data, and social attribute data (such as economic conditions, industrial layout, and water quality standards).The GIS visualization interface reads spatial and non-spatial data from the database through various standard database interfaces provided by the database, and performs joint analysis and display on the GIS interface through the correlation between spatial and non-spatial data. At the same time, through interaction with the database, GIS realizes functions such as query, location, analysis, simulation and early warning. Water quality models are mathematical descriptions of the changing patterns of pollutants in the water environment and the interrelationships between influencing factors, and are one of the important means of water quality monitoring [6]. In recent years, various multivariate integrated water quality models have been studied and applied, such as the QUAL model series developed by the US Environmental Protection Agency and the MIKE model series developed by the Danish Hydrodynamics Institute [7][8]. These water quality models describe the migration and transformation process of pollutants in water bodies in great detail, but they have many parameters and complex structures. In the design, the integrated water quality model is simplified to a certain extent according to actual needs, realizing zero-dimensional, multi-dimensional water quality models and water environment capacity models. In fact, the object of water quality model processing is the watershed, which is a spatial object. Therefore, in the design, the water quality model is fully integrated into GIS and becomes part of the GIS function. GIS can directly use water quality models to analyze and simulate water quality data, and the simulation results can be directly displayed on the GIS visualization interface; this makes up for the shortcomings of water quality models in terms of expression and the shortcomings of GIS in terms of analysis and simulation. 4 Implementation of Embedded System Embedded system is a computer system with application as the center and software and hardware that can be customized. It has the advantages of high integration, low cost, support for various real-time operating systems and network functions [9][10]. In this design, an embedded system is used to collect water quality data in the field and transmit the collected data to the monitoring station through TCP/TP. According to the different functions implemented, the system is divided into processor module, storage module, data acquisition module, network module and other peripheral interfaces. The system module division diagram is shown in Figure 3. Each module consists of hardware and software, which together complete specific functions. The processor module is the core of the whole system. It consists of a low-cost, low-power 32-bit core ARM7TDMI and a real-time operating system μC/OS-II. It is mainly responsible for the management of external hardware devices, external interrupt control, task scheduling and communication and information exchange between various functional modules. All other modules' software is implemented and runs on top of the operating system. They are tasks with different priorities, and at any given time, they are in one of the following states: sleep, ready, running, waiting, or interrupted. The operating system controls the state of each module by sending mailbox-structured messages. The data storage module consists of memory and a file system, responsible for storing programs and acquired data. The memory uses 2MFlashROM + 16MNandFlash + 8MSdram, where 2MFlashROM stores the system boot program, 16MNandFlash stores programs and data, and 8MSdram handles program execution and data storage. For NandFlash, a Fat16 format file system is implemented. The file system separates system tasks from data, avoiding system impact during data storage and retrieval; it also provides standard API interfaces and introduces high-speed read/write buffers, preventing tasks from directly reading and writing to NandFlash, thus solving the speed problem of data reading between the CPU and Flash memory. The data acquisition module consists of various sensors, data acquisition tasks, and data processing tasks, responsible for the acquisition and processing of various data. In water quality monitoring, the data collected by sensors mainly includes comprehensive water quality indicators (such as dissolved oxygen DO), water pollution indicators (such as biochemical oxygen demand (BOD) and chemical oxygen demand (COD), and hydrological parameters (flow velocity and flow rate). The data acquisition task primarily performs analog signal acquisition, analog-to-digital conversion, and digital signal processing. It is typically in a waiting state, awaiting messages containing control parameters. These control parameters mainly include frequency selection, channel selection, and starting the analog-to-digital converter. A 4K capacity ring stack is designed for the data acquisition task to temporarily store sampled data. The data processing task is mostly idle, with a stack of the same size as the data acquisition task, and is only invoked when immediate data transmission is required. The network module consists of an 8019as network interface card chip, an embedded TCP/IP protocol, and network tasks. It mainly handles network data transmission and reception and communication with the monitoring center's GIS system. This system implements all basic TCP/IP protocols, referencing the UNIX TCP/IP protocol. The TCP/IP protocol suite is divided into the application layer, transport layer, network layer, and data link layer. The network layer consists of the TCP and ICMP protocols, while the data link layer consists of the network interface card (NIC) driver and the ARP protocol. Operations between these layers are isolated, communicating through API function calls to transmit data to the upper or lower layer protocols. The system also retains some peripheral interfaces for future system expansion and upgrades.5. Embedded System Operation Process After the embedded system powers on, the BootLoader in FlashROM initializes the CPU and performs hardware self-tests such as the network card. Then, it copies the operating system kernel and application tasks from NandFlash to SDRAM. After completion, the operating system gains control of the CPU and begins initialization of the operating system and application tasks. This includes initializing all data structures, allocating stack space, establishing message queues, and creating tasks. Next, it reads system running status parameters stored in the file system. These parameters include the running status of each task, the sampling frequency of data acquisition, the IP address of the remote host, the local default gateway, and the system login password, and adjusts the task parameters accordingly. After system initialization, each task is in a sleep state and must be activated via a message. 6. Implementation of Dynamic Water Quality Monitoring Dynamic water quality monitoring is implemented by transmitting water quality data collected in the field to the monitoring center in real time via TCP/IP. The monitoring center analyzes and processes the received water quality data and displays it on a GIS to achieve dynamic monitoring. The entire dynamic water quality monitoring process consists of two parts: real-time acquisition and transmission of water quality data and dynamic display of water quality data. 6.1 Real-time Acquisition and Transmission of Water Quality Data Real-time acquisition and transmission of water quality data is jointly accomplished by data acquisition tasks, data processing tasks, network tasks, operating system tasks, and the file system. Normally, the data acquisition task is in a sleep/delayed waiting state. After the delay time, the data acquisition task is activated, performs a data acquisition, and saves the data in its own stack. After completion, it returns to the sleep/delayed waiting state. In this design, the delay is 10 seconds, meaning data is acquired once every 10 seconds. The sampling frequency of the entire system can be changed by altering the delay time of the acquisition task. After a data acquisition is completed, there are two processing methods for the data in the stack: immediate transmission and normal processing. The immediate transmission method is mainly used to monitor the impact of pollution incidents on river water quality. When a serious pollution incident occurs, it is necessary to quickly understand the water quality status. The monitoring center sends an immediate transmission command to the embedded acquisition terminal via the network. The operating system task processes and judges the command, then sends a message to activate the data processing task. The data processing task reads the data from the acquisition task stack into its own stack, clears the acquisition task stack after reading, and enters a sleep state. Next, the operating system task sends a message to activate the network task. The network task reads the data from the data processing task stack into the network card buffer, clears the data processing task stack, and then TCP/IP starts sending data. This method transmits data once per data acquisition, offering good real-time performance, but consumes too many system and network resources. The normal processing method involves transmitting data according to the pre-designed procedure. After one sampling is completed, if the sampling task stack is not full, the next sampling continues until the stack is full. Once full, the file system is invoked to store the data in the stack as a file in Flash. Furthermore, the network task is activated every 2 hours, reading the data from Flash into the network card buffer and then sending the data. This method avoids consuming system resources due to excessive data reading, writing, and transmission. 6.2 Dynamic Display of Water Quality Data Dynamic display of water quality data involves dynamically displaying the analyzed and processed water quality data on the GIS visualization interface. After receiving the water quality data, the monitoring center verifies the data according to certain rules, and stores valid data that conforms to the rules into the database. The visualization interface reads stored data through the database API interface, performs aggregation and other processing, and then calls the water quality model for analysis and simulation. The results of the analysis and simulation are dynamically displayed on the GIS visualization interface in different colors. Figure 5 shows the display of water quality simulation results for a certain period of time in the Changsha section of the Xiangjiang River using a water capacity model, which can directly determine the pollution status of each monitoring section. 7. Conclusion This paper proposes a GIS-based dynamic river water quality monitoring system, which realizes the automatic collection and transmission of field river water quality data without human intervention. By integrating the water quality model into GIS, it fully utilizes the expressive power of GIS and the simulation and analysis capabilities of the water quality model, enabling real-time reflection of water quality status and achieving dynamic monitoring of river water quality.References 1 Li Yiting. Overview of the National Water Quality Monitoring Plan [J]. China Water Resources, 2003.7. 2 Luo Yunqi, Zeng Kun, et al. Construction of Digital Geographic Information System and Advanced Application of Mapinfo [M]. Beijing: Tsinghua University Press, 2003. 3 Zhuang Yan. Data Model and Implementation Technology of Open Object-Oriented Geographic Information System Kernel [Doctoral Dissertation of Wuhan University] [D]. 2002. 4 K. Fedra*. Urban environmental management: monitoring, GIS, and modeling. Computers, Environment and Urban Systems, 23 (1999) 443-457, Austria. 5 Cao Zhiyue, Liu Yue. An Object-Oriented Spatiotemporal Data Model [J]. Acta Geodaetica et Cartographica Sinica. 2002-1. 6 Fu Guowei, Cheng Shengtong. Water Pollution Control Planning. Tsinghua University Press, 1985. 7 Thomas O. Barnwell Jr., Linfield C. Brown, & Raymond C. Whittemore. Importance of Field Data in Stream Water Quality Modeling Using Qual2E-UNCAS[J], Journal of Environmental Engineering, 2004, 130(6): 643-647. 8 Guo Jingsong, Li Shenghai et al. Research progress on water quality models and their applications[J]. Journal of Chongqing University of Architecture, 2002, 24(2): 109-115. 9 Joel Sherrill, Jeff Mayes. SAFFER: A Scaleable Architecture for Embedded Reliable Real-Time System[R]. On-Line Application Research Corporation, Technical Report, OAR-TR-99-183-03, 1999. 10 Jiang Xin. Research and implementation of embedded control system software platform[Doctoral dissertation of Huazhong University of Science and Technology]. 2003. Editor: He Shiping