An intelligent detection system based on multi-source water quality parameter and algal concentration collaborative perception
Patent Information
- Application Number
- CN202611140666.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-09-29
AI Technical Summary
本发明提高了水质监测的实时性、连续性和可追溯性,有效解决了现有技术中不同RS485设备通信参数和数据格式不统一、高速水样图像与低速水质参数难以协同处理、设备通信异常影响连续采集,以及藻类检测结果与多源水质参数缺少时间对应关系等问题,具有良好的应用前景
[0020]本发明与现有技术相比具有在同一系统中完成待测水样输送、流路压力检测、微流控显微成像、多种水质参数采集、多路RS485设备统一通信、藻类图像处理、数据时间同步以及上位机显示与存储,大大提高了水质监测的实时性、连续性和可追溯性,有效解决了现有技术中不同RS485设备通信参数和数据格式不统一、高速水样图像与低速水质参数难以协同处理、设备通信异常影响连续采集,以及藻类检测结果与多源水质参数缺少时间对应关系等问题,具有良好的应用前景。
Smart Images

Figure CN122836044A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of online water quality monitoring and data processing technology, specifically to an intelligent detection system based on the collaborative sensing of multi-source water quality parameters and algae concentration. Background Technology
[0002] Online water quality monitoring systems typically need to collect multiple water quality indicators such as pH, turbidity, conductivity, dissolved oxygen, oxidation-reduction potential, and algal fluorescence parameters, and determine the water body status based on changes in these indicators. Existing water quality monitoring equipment uses multiple independent sensors for measurement, with each sensor connected to the control equipment via an RS485 bus or other industrial communication interface.
[0003] Water quality sensors from different manufacturers and of different types typically differ in terms of device address, function code, register address, data length, byte arrangement, measurement cycle, calibration method, and response time. Existing monitoring systems often require separate communication programs to be written for different sensors, resulting in repetitive communication logic and complex device configuration. When the same system simultaneously connects to syringe pumps, pressure sensors, and multiple water quality parameter sensors, problems such as inconsistent device polling cycles, mutual waiting for response frames, communication timeouts, inconsistent data formats, and difficulty in timely recovery after device disconnection may also occur.
[0004] Current methods for algae detection mainly include manual sampling followed by microscopic observation and counting, parameter measurement using algae fluorescence sensors, and software processing after acquiring water sample images via camera devices. Manual microscopic detection requires steps such as sampling, sample preparation, observation, and manual counting, making continuous online monitoring inconvenient. Algae fluorescence sensors primarily output fluorescence parameters related to algae, and their measurement results are independent of the algae target information in the microscopic images. When using general-purpose processors or host computers to process water sample videos, image processing tasks share processing resources with tasks such as device communication, data storage, and user interaction. In water quality detection systems using microscopic images and multi-source sensor data, cameras generate continuous high-speed image data, while RS485 devices generate low-speed parameter data with different sampling periods. If data is stored only in the order of reception, it is difficult to establish an accurate temporal correspondence between algae detection results and data such as pH, turbidity, dissolved oxygen, conductivity, redox potential, and pressure, hindering the formation of correlated records for the same water sample detection process. Furthermore, the image acquisition module, sensor acquisition module, fluid transport module, and host computer module in existing water quality testing equipment are often independent of each other, lacking a unified device access method and data synchronization mechanism. Data loss and monitoring interruptions can easily occur when equipment communication is abnormal, response times out, or verification fails, making it difficult to guarantee the integrity and traceability of long-term continuous monitoring data.
[0005] In summary, existing online water quality monitoring systems suffer from several problems, including inconsistent communication parameters and data formats among different RS485 devices, difficulty in coordinating high-speed water sample images with low-speed water quality parameters, disruptions to continuous data acquisition due to communication anomalies, and a lack of temporal correlation between algae detection results and multi-source water quality parameters. Therefore, a smart detection system is needed that collaboratively senses multi-source water quality parameters and algae detection results. This system should integrate sample delivery, flow path pressure detection, microfluidic microscopic imaging, acquisition of multiple water quality parameters, unified communication between multiple RS485 devices, algae image processing, data time synchronization, and upper-computer display and storage within a single system. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing technologies by designing an intelligent detection system based on the collaborative sensing of multi-source water quality parameters and algae concentration. It employs a collaborative architecture of programmable logic and a processor system to achieve water sample image acquisition and algae detection, multi-device polling, Modbus RTU protocol parsing, transmit / receive direction control, and anomaly recovery. It also aligns algae detection results, water quality parameters, pressure data, and device status according to time windows to form a synchronous monitoring record. The system implements unified polling access and protocol parsing for different external devices based on a device communication configuration table. It connects various water quality parameter sensors, pressure sensors, and syringe pumps via multi-channel RS485 communication. It utilizes microfluidics and microscopic imaging modules to acquire images of the water samples to be tested. Based on the collaborative processing of the FPGA programmable logic processing module and the processor system module, it achieves water quality parameter acquisition, algae image detection, unified device polling, communication anomaly handling, multi-source data time synchronization, upper computer display, and data storage. The upper computer uses a 10 Gigabit fiber optic link to complete image and parameter display, device configuration, alarms, and data storage. This invention improves the real-time performance, continuity, and traceability of water quality monitoring. It effectively solves problems in existing technologies such as inconsistent communication parameters and data formats of different RS485 devices, difficulty in coordinating high-speed water sample images with low-speed water quality parameters, the impact of abnormal device communication on continuous acquisition, and the lack of time correspondence between algae detection results and multi-source water quality parameters. It has good application prospects.
[0007] The specific technical solution to achieve the purpose of this invention is: an intelligent detection system based on the collaborative sensing of multi-source water quality parameters and algae concentration. The system is characterized by comprising: a water source, a microfluidics and microscopic imaging module, a multi-source water quality parameter sensing module, a multi-channel industrial control interface unit, an FPGA core processing unit, a host computer platform, a syringe pump, and a pressure sensor. The system connects to various water quality parameter sensors, pressure sensors, and the syringe pump via multi-channel RS485 communication. It acquires images of the water sample to be tested using the microfluidics and microscopic imaging module, and, based on the collaborative processing of the FPGA programmable logic processing module and the processor system module, achieves water quality parameter acquisition, algae image detection, unified equipment polling, communication anomaly handling, multi-source data time synchronization, host computer display, and data storage.
[0008] The water source provides the water sample to be tested to the multi-source water quality parameter sensing module via an injection pump; the pressure sensor is installed in the fluid path between the injection pump and the microfluidics and microscopic imaging module, and inputs the flow path pressure of the water sample to be tested into the FPGA core processing unit through the multi-channel industrial control interface unit; the microfluidics and microscopic imaging module transmits the acquired image of the water sample to the FPGA core processing unit; the multi-source water quality parameter sensing module is connected to the injection pump and the multi-channel industrial control interface unit, and inputs the detected water quality parameter data into the multi-channel industrial control interface unit via RS485 communication. The multi-channel industrial control interface unit is connected to the multi-source water quality parameter sensing module and the FPGA core processing unit. It transmits the water sample to be tested according to the control commands issued by the FPGA core processing unit and returns the operating status information to the FPGA core processing unit. The FPGA core processing unit is connected to the microfluidics and microscopic imaging module and the host computer platform. It uploads synchronous monitoring data, water sample images, algae detection results and equipment status to the host computer platform, and receives configuration parameters and control commands issued by the host computer platform, so as to realize intelligent detection of multi-source water quality parameters and algae concentration through collaborative sensing.
[0009] The microfluidics and microscopic imaging module is equipped with a light source, a microfluidic chip, a microscope, and a camera arranged sequentially along the optical imaging path; the light source illuminates the water sample to be tested in the microfluidic chip; the microscope magnifies and images the detection area of the microfluidic chip; the camera acquires the water sample image of the detection area and transmits it to the FPGA core processing unit through the image input interface module.
[0010] The multi-source water quality parameter sensing module is equipped with a conductivity sensor, a dissolved oxygen sensor, a pH sensor, a redox potential sensor, an algal fluorescence parameter sensor, and a turbidity sensor. It detects the conductivity, dissolved oxygen content, pH value, redox potential, phycocyanin content, and turbidity of the water sample to be tested, and inputs the detected water quality data into the FPGA core processing unit via RS485 communication.
[0011] The multi-channel industrial control interface unit includes an external device interface module, a multi-channel RS485 transceiver module, and a core board communication interface module. The external device interface module connects to a multi-source water quality parameter sensing module, a syringe pump, a pressure sensor, and an extended RS485 device. The multi-channel RS485 transceiver module connects to both the external device interface module and the core board communication interface module. This module converts the digital serial signal output from the FPGA core processing unit into an RS485 differential signal and converts the RS485 differential signal returned from the external device back into a digital serial signal. The core board communication interface module connects to both the multi-channel RS485 transceiver module and the FPGA core processing unit, transmitting multi-channel serial data transmission, serial data reception, and transmit / receive direction control signals.
[0012] The FPGA core processing unit is equipped with a programmable logic processing module and a processor system module for bidirectional data interaction via an on-chip bus, and uploads algae detection results, image processing status, device communication data, device control parameters and device status information to the host computer platform via the AXI bus.
[0013] The programmable logic processing module includes a transmit / receive direction control module, a multi-channel serial communication module, an image and result output module, an algae detection and processing module, an image buffer module, and an image input interface module. The transmit / receive direction control module and the multi-channel serial communication module are respectively connected to the core board's communication interface module, controlling the transmit and receive states of each RS485 communication channel and completing the transmission and reception of communication data from various external devices. The image and result output module inputs the buffered water sample image, algae detection results, and image processing status to the host computer platform through the image input interface module. The algae detection and processing module processes the buffered water sample image and generates algae detection results. The image input interface module receives water sample images captured by the camera and buffers them.
[0014] The processor system module includes a host computer communication module, a communication protocol parsing module, a multi-device polling and scheduling module, a time synchronization and data fusion module, and a device control and management module. The host computer communication module uploads synchronous monitoring data, water sample images, algae detection results, and device status to the host computer platform, and receives configuration parameters and control commands from the host computer platform. The communication protocol parsing module performs device address matching, function code matching, data length verification, and CRC-16 verification on the received device response frames. After the protocol parsing and all verifications pass, it parses the device response data according to the device communication configuration table and executes it according to Modbus. The RTU protocol generates an external device communication request frame; the external device communication request frame includes: a device address field, a function code field, a register address field, a register quantity or data to be written field, and a CRC check field; the multi-device polling scheduling module executes the device access state machine according to the polling cycle of each external device in the device communication configuration table, and performs unified polling scheduling on the external devices according to the device address, communication cycle, and task status of each external device, and generates read instructions, write instructions, or status query instructions for the injection pump, pressure sensor, multi-source water quality parameter sensing module, and extended devices according to the device communication configuration table; the time synchronization and data fusion module adds time information to the water quality parameter data, pressure detection data, injection pump operating status, and algae detection results, and performs time alignment and correlation fusion according to the corresponding detection cycle to generate synchronized monitoring data; the device control and management module generates read instructions, write instructions, or status query instructions for the injection pump, pressure sensor, multi-source water quality parameter sensing module, and extended RS485 devices according to the configuration parameters issued by the host computer platform.
[0015] The host computer platform is connected to the FPGA core processing unit via a 10 Gigabit fiber optic communication link. The host computer platform is equipped with a parameter and equipment status display module, a control and parameter configuration module, an alarm and data storage module, and a video and algae detection result display module. The parameter and equipment status display module displays water quality parameters, pressure data, and the operating status of external equipment. The control and parameter configuration module configures equipment communication parameters, acquisition parameters, and control parameters. The alarm and data storage module generates alarm information based on monitoring data and equipment status and stores synchronous monitoring data. The video and algae detection result display module displays water sample images and algae detection results.
[0016] The multiple water quality parameter sensors in the multi-source water quality parameter sensing module share the same RS485 bus, and each water quality parameter sensor has a different slave device address in the range of 1 to 247. The water quality parameter sensors use serial communication parameters with a communication baud rate of 9600 bit / s, 8 data bits, 1 stop bit, and no parity check.
[0017] The multi-channel industrial control interface unit delivers the water sample to be tested according to the control commands issued by the FPGA core processing unit and returns operating status information to the FPGA core processing unit; the multi-channel RS485 transceiver module includes multiple independent half-duplex RS485 transceiver channels; wherein, at least one RS485 transceiver channel is connected to the injection pump, at least one RS485 transceiver channel is connected to the multi-source water quality parameter sensing module, at least one RS485 transceiver channel is connected to the pressure sensor, and the remaining RS485 transceiver channels are used to connect to expansion devices; the half-duplex RS485 transceiver channel includes: R The system comprises an RS485 transceiver, a terminating resistor, a first bias resistor, a second bias resistor, a transient voltage suppressor, and external device connection terminals. The RS485 transceiver's transmit data input and receive data output terminals are respectively connected to a multi-channel serial communication module, and its drive enable and receive enable terminals are connected to a transmit / receive direction control module. The terminating resistor is connected between the two differential bus terminals of the RS485 transceiver. The first and second bias resistors are respectively connected between the differential bus terminals and the power supply and ground terminals. The transient voltage suppressor is located between the differential bus terminals and the external device connection terminals.
[0018] The processor system module is equipped with a device communication configuration table. Each device configuration item in the device communication configuration table includes at least: device type, communication channel number, slave device address, function code, register start address, number of registers, data type, byte arrangement, data conversion factor, data offset, polling cycle, response timeout time, and maximum number of retransmissions. Before sending an external device communication request frame, the transmit / receive direction control module enables the driver enable terminal of the corresponding RS485 transmit / receive channel to enter the active state and disables the receive enable terminal. After the last stop bit of the external device communication request frame is sent, the driver enable terminal is disabled and the receive enable terminal is enabled, causing the corresponding RS485 transmit / receive channel to switch from the transmit state to the receive state and wait for the response frame from the target device.
[0019] The communication protocol parsing module appends a data acquisition timestamp to the parsed device data after verifying the device address, function code, data length, and CRC-16 in the external device response frame. The time synchronization and data fusion module establishes a data matching time window based on the generation timestamp of the algae detection results. Within this window, it selects device data with the smallest time difference from the benchmark timestamp and a valid identifier for each water quality parameter. The time synchronization and data fusion module associates the selected water quality parameter data, pressure detection data, syringe pump operating status, and algae detection results to form a synchronous monitoring record. This record includes at least: detection task number, timestamp, algae detection results, water quality parameter set, pressure detection data, syringe pump operating status, device online status, communication status, data validity identifier, and alarm identifier. When a preset mandatory parameter is missing within the data matching time window, the missing parameter is written into the synchronous monitoring record. The corresponding data missing flag; the device access state machine includes: device selection state, request frame generation state, request frame sending state, transmit / receive direction switching state, response waiting state, response frame verification state, data parsing and queuing state, and next device switching state. In the data parsing and queuing state, the verified device data, device identifier, communication channel number, and acquisition timestamp are written to the device data buffer. In the response waiting state, when the response timeout time corresponding to the target device is reached and a complete response frame is not received, or the received response frame fails the CRC-16 check, the communication failure count of the current device is incremented by one, and the corresponding communication request frame is resent. When the communication failure count reaches the corresponding maximum number of retransmissions, the current device is marked as offline and switched to the next target device. After a valid response frame from the current device is received again in the subsequent polling process, the communication failure count is cleared and the current device is restored to online status.
[0020] Compared with existing technologies, this invention can complete the transportation of water samples to be tested, flow path pressure detection, microfluidic microscopic imaging, acquisition of multiple water quality parameters, unified communication of multiple RS485 devices, algae image processing, data time synchronization, and upper computer display and storage in the same system. This greatly improves the real-time performance, continuity, and traceability of water quality monitoring. It effectively solves the problems in existing technologies, such as inconsistent communication parameters and data formats of different RS485 devices, difficulty in coordinating the processing of high-speed water sample images and low-speed water quality parameters, the impact of abnormal device communication on continuous acquisition, and the lack of time correspondence between algae detection results and multi-source water quality parameters. It has good application prospects. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the structure of the present invention;
[0022] Figure 2This is a flowchart of the multi-device unified communication and polling scheduling process in Example 1;
[0023] Figure 3 This is a flowchart of the multi-source monitoring data time synchronization and data fusion process in Example 1. Detailed Implementation
[0024] See Figure 1 An intelligent detection system based on the collaborative sensing of multi-source water quality parameters and algae concentration is disclosed, comprising: a water source 1, a microfluidic and microscopic imaging module 2, a multi-source water quality parameter sensing module 3, a multi-channel industrial control interface unit 4, an FPGA core processing unit 5, a host computer platform 6, an injection pump 7, and a pressure sensor 8. The system connects to various water quality parameter sensors, pressure sensors, and the injection pump 7 via multi-channel RS485 communication. It acquires images of the water sample to be tested using the microfluidic and microscopic imaging module 2, and, based on the collaborative processing of the FPGA programmable logic processing module and the processor system module, achieves water quality parameter acquisition, algae image detection, unified equipment polling, communication anomaly handling, multi-source data time synchronization, host computer display, and data storage.
[0025] The water source 1 is connected to the multi-source water quality parameter sensing module 3 and the syringe pump 7 respectively; the multi-source water quality parameter sensing module 3 is in contact with the water sample to be tested and is used to detect various physicochemical parameters of the water sample; the syringe pump 7 is used to extract the water sample to be tested and deliver it to the microfluidics and microscopic imaging module 2; the pressure sensor 8 is set on the fluid pipeline between the syringe pump 7 and the microfluidics and microscopic imaging module 2 and is used to detect the flow path pressure during the delivery of the water sample; the pressure sensor 8 communicates with F via RS485. The PGA core processing unit 5 returns pressure detection data; the microfluidics and microscopic imaging module 2 includes: a light source 2-1, a microfluidic chip 2-2, a microscope 2-3, and a camera 2-4; the syringe pump 7 inputs the water sample to be tested into the microfluidic chip 2-2, the light source 2-1 illuminates the water sample to be tested in the microfluidic chip 2-2, the microscope 2-3 magnifies and images the detection area of the microfluidic chip 2-2, and the camera 2-4 acquires the water sample image of the detection area and directly transmits the water sample image to the FPGA core processing unit 5.
[0026] The multi-source water quality parameter sensing module 3 includes: a conductivity sensor 3-1, a dissolved oxygen sensor 3-2, a pH sensor 3-3, a redox potential sensor 3-4, an algal fluorescence parameter sensor 3-5, and a turbidity sensor 3-6. Each water quality parameter sensor is used to acquire corresponding water quality parameter data and communicates with the multi-channel industrial control interface unit 4 via RS485 communication.
[0027] The multi-channel industrial control interface unit 4 includes: an external device interface module 4-1, a multi-channel RS485 transceiver module 4-2, and a core board communication interface module 4-3. The external device interface module 4-1 is used to connect the injection pump 7, the pressure sensor 8, the multi-source water quality parameter sensing module 3, and the extended RS485 device. The multi-channel RS485 transceiver module 4-2 includes: multiple independent half-duplex RS485 transceiver channels, used to convert the digital serial signal output by the FPGA core processing unit 5 into an RS485 differential signal, and to convert the RS485 differential signal returned by the external device into a digital serial signal. The core board communication interface module 4-3 is used to transmit serial data, serial data, and transmit / receive direction control signals between the multi-channel RS485 transceiver module 4-2 and the FPGA core processing unit 5.
[0028] The half-duplex RS485 transceiver channel includes: an RS485 transceiver, a terminating resistor, a first bias resistor, a second bias resistor, a transient voltage suppression device, and external device connection terminals; the transmit data input terminal and receive data output terminal of the RS485 transceiver are respectively connected to the multi-channel serial communication module of the FPGA core processing unit 5, and the drive enable terminal and receive enable terminal are connected to the transmit / receive direction control module; the terminating resistor is connected between the two differential bus terminals of the RS485 transceiver; the first bias resistor and the second bias resistor are respectively disposed between the differential bus terminal and the power supply terminal and the ground terminal; the transient voltage suppression device is disposed between the differential bus terminal and the external device connection terminals.
[0029] The FPGA core processing unit 5 includes: a programmable logic processing module 5-1 and a processor system module 5-2, which interact bidirectionally via an on-chip bus; the programmable logic processing module 5-1 includes: a transmit / receive direction control module 5-1-1, a multi-channel serial communication module 5-1-2, an image and result output module 5-1-3, an algae detection and processing module 5-1-4, an image buffer module 5-1-5, and an image input interface module 5-1-6.
[0030] The image input interface module 5-1-6 is used to receive water sample images output by the camera; the image buffer module 5-1-5 is used to buffer water sample images; the algae detection and processing module 5-1-4 is used to process the buffered water sample images and generate algae detection results; the image and result output module 5-1-3 is used to output water sample images, algae detection results, and image processing status; the multi-channel serial communication module 5-1-2 is used to generate serial transmission data for different RS485 communication channels and receive serial reception data returned by each channel; the transmit / receive direction control module 5-1-1 is used to control the drive enable and receive enable terminals of each RS485 transmit / receive channel, so that the corresponding RS485 transmit / receive channel switches between transmit and receive states.
[0031] The processor system module 5-2 includes: a host computer communication module 5-2-1, a communication protocol parsing module 5-2-2, a multi-device polling and scheduling module 5-2-3, a time synchronization and data fusion module 5-2-4, and a device control and management module 5-2-5.
[0032] The processor system module 5-2 is equipped with a device communication configuration table. Each device configuration item in the device communication configuration table includes at least the device type, communication channel number, slave device address, function code, register start address, number of registers, data type, byte arrangement, data conversion factor, data offset, polling cycle, response timeout time, and maximum number of retransmissions.
[0033] The device control and management module 5-2-5 generates read instructions, write instructions, or status query instructions for the injection pump, pressure sensor, various water quality parameter sensors, and extended devices based on the configuration parameters issued by the host computer platform and the device configuration items in the device communication configuration table.
[0034] The multi-device polling scheduling module 5-2-3 executes the device access state machine according to the polling cycle of each external device; the device access state machine includes: device selection state, request frame generation state, request frame sending state, send / receive direction switching state, response waiting state, response frame verification state, data parsing and queuing state, and next device switching state.
[0035] The communication protocol parsing module 5-2-2 generates an external device communication request frame according to the Modbus RTU protocol. The communication request frame includes: a slave device address field, a function code field, a register address field, a register quantity or data to be written field, and a CRC check field. The communication protocol parsing module 5-2-2 performs CRC-16 verification on the slave device address field, function code field, and data field in the request frame, and writes the low byte of the CRC check value to the CRC check field before the high byte. For the received device response frame, the communication protocol parsing module 5-2-2 sequentially performs slave device address matching, function code matching, data length verification, and CRC-16 verification. After all verifications pass, the response data is parsed according to the device communication configuration table.
[0036] Before sending the request frame, the transmit / receive direction control module 5-1-1 switches the corresponding RS485 transmit / receive channel to transmit mode. After the last stop bit of the request frame is sent, it switches the corresponding RS485 transmit / receive channel to receive mode and waits for the target device to return a response frame. When the response timeout time corresponding to the target device is reached and a complete response frame is not received, or when the received response frame fails the CRC-16 check, the multi-device polling scheduling module 5-2-3 increments the communication failure count of the current device and retransmits the corresponding communication request frame. When the communication failure count reaches the maximum number of retransmissions, the current device is marked as offline and switched to the next target device. After a valid response frame from the device is received again in subsequent polling processes, the communication failure count is cleared and the device is restored to online status. For valid response data that passes the check of device address, function code, data length, and CRC-16, the communication protocol parsing module 5-2-2 adds a collection timestamp to the parsed device data and writes the device data, device identifier, communication channel number, and collection timestamp into the device data buffer.
[0037] The time synchronization and data fusion module 5-2-4 establishes a data matching time window based on the generation timestamp of the algae detection results. Within the data matching time window, for each water quality parameter, it selects equipment data with the smallest time difference from the reference timestamp and a valid flag. The time synchronization and data fusion module 5-2-4 associates the selected water quality parameter data, pressure detection data, the operating status of the syringe pump 7, and the algae detection results to form a synchronous monitoring record. The synchronous monitoring record includes at least: detection task number, timestamp, algae detection results, water quality parameter set, pressure detection data, syringe pump 7 operating status, equipment online status, communication status, data validity flag, and alarm flag. When a preset mandatory parameter is missing within the data matching time window, a data missing flag corresponding to the missing parameter is written into the synchronous monitoring record.
[0038] The host computer platform 6 is connected to the FPGA core processing unit 5 via a 10 Gigabit fiber optic communication link. The FPGA core processing unit 5 uploads water sample images, algae detection results, water quality parameter data, pressure detection data, synchronous monitoring records, and equipment operating status to the host computer platform 6. The host computer platform 6 sends equipment communication parameters, acquisition parameters, and control parameters to the FPGA core processing unit 5.
[0039] The host computer platform 6 includes: a parameter and equipment status display module 6-1, a control and parameter configuration module 6-2, an alarm and data storage module 6-3, and a video and algae detection result display module 6-4, which are used to complete real-time parameter display, equipment status display, control parameter configuration, abnormal alarm, data storage, and display of water sample images and algae detection results.
[0040] The present invention will be further described in detail below with reference to specific embodiments. It should be noted that the following embodiments are used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Without departing from the concept of the present invention, equivalent substitutions made by those skilled in the art regarding device models, number of communication channels, sampling periods, and parameter configurations can all be applied to the present invention.
[0041] Example 1
[0042] See Figure 1 The invention will be further described in detail below with reference to the overall system architecture and specific implementation of the working process: The intelligent detection system includes: a water source 1, a microfluidics and microscopic imaging module 2, a multi-source water quality parameter sensing module 3, a multi-channel industrial control interface unit 4, an FPGA core processing unit 5, a host computer platform 6, a syringe pump 7, and a pressure sensor 8. The water source 1 is in contact with the multi-source water quality parameter sensing module 3, allowing each water quality parameter sensor to directly detect the water sample to be tested; on the other hand, it is connected to the syringe pump 7 via a fluid pipeline, which extracts the water sample to be tested. The syringe pump 7, pressure sensor 8, and microfluidics chip 2-2 are arranged sequentially along the water sample flow direction. The syringe pump 7 drives the water sample to be tested to flow through the pressure sensor 8 and then into the microfluidics chip 2-2. The pressure sensor 8 outputs the flow path pressure in real time to characterize pipeline blockage, leakage, or pumping abnormalities. The light source 2-1, microfluidic chip 2-2, microscope 2-3 and camera 2-4 are arranged sequentially along the optical imaging path. The camera 2-4 acquires the water sample image of the detection area of the microfluidic chip 2-2 and sends the image directly to the image input interface module 5-1-6 of the FPGA core processing unit 5.
[0043] The multi-source water quality parameter sensing module 3 includes: a conductivity sensor 3-1, a dissolved oxygen sensor 3-2, a pH sensor 3-4, a redox potential sensor 3-5, an algal fluorescence parameter sensor 3-5, and a turbidity sensor 3-6. Multiple water quality parameter sensors share a single RS485 bus and are configured with different slave device addresses. The syringe pump 7 and pressure sensor 8 are each connected to an independent RS485 communication channel. Each device is accessed as an external RS485 device through the same set of device communication configuration, polling scheduling, and protocol parsing logic.
[0044] The FPGA core processing unit 5 adopts a heterogeneous architecture in which the programmable logic processing module 5-1 and the processor system module 5-2 work together. In a preferred embodiment, the FPGA core processing unit 5 may be a Zynq UltraScale+ MPSoC device with PL side and PS side, such as XCZU9EG; the programmable logic processing module 5-1 and the processor system module 5-2 exchange image detection results, device communication data, control parameters and device status information through the AXI bus.
[0045] The host computer platform 6 communicates bidirectionally with the FPGA core processing unit 5 via a 10 Gigabit fiber optic communication link. The host computer platform 6 sends configurations such as test start / stop, equipment polling cycle, equipment address, injection pump 7 operating parameters, alarm thresholds, and data matching time window to the FPGA core processing unit 5. The FPGA core processing unit 5 uploads water sample images, algae detection results, water quality parameters, pressure data, equipment online status, communication status, and synchronous monitoring records to the host computer platform 6.
[0046] Example 2
[0047] The invention will be further described in detail with reference to a specific implementation of a multi-channel industrial control interface and a single RS485 channel: The multi-channel industrial control interface unit 4 includes: an external device interface module 4-1, a multi-channel RS485 transceiver module 4-2, and a core board communication interface module 4-3. This embodiment sets up 24 independent half-duplex RS485 transceiver channels, where the first communication channel connects to the injection pump 7, the second communication channel connects to the multi-source water quality parameter sensing module 3, the third communication channel connects to the pressure sensor 8, and the remaining communication channels are used to connect to expansion devices. The above channel numbering is only one implementation; the actual number and allocation of channels can be adjusted according to the number of devices.
[0048] The FPGA core processing unit 5 and the industrial control daughterboard communicate via the core board communication interface module 4-3, transmitting serial transmit data (TX), serial receive data (RX), and transmit / receive direction control signals for each channel. The core board communication interface module 4-3 sends the aforementioned digital logic signals to the multi-channel RS485 transceiver module 4-2, where each RS485 transceiver performs the conversion between digital single-ended signals and A / B differential signals.
[0049] Each half-duplex RS485 transceiver channel includes: an RS485 transceiver, a terminating resistor, a first bias resistor, a second bias resistor, a transient voltage suppression device, and external device connection terminals. In one specific embodiment, the RS485 transceiver is a MAX3485, the terminating resistor is connected between differential lines A and B with a resistance of 120Ω, the first bias resistor is connected between the power supply terminal and one differential line, and the second bias resistor is connected between the other differential line and the ground terminal; both bias resistors have a resistance of 10kΩ. TVS devices are installed on differential lines A and B to suppress electrostatic discharge, surges, and transient overvoltages.
[0050] The RS485 transceiver's DI terminal receives transmit data output from the multi-channel serial communication module 5-1-2, and its RO terminal returns receive data to the multi-channel serial communication module 5-1-2. The DE terminal and the active-low receive enable terminal are connected to the transmit / receive direction control module 5-1-1. In this embodiment, the DE terminal and the active-low receive enable terminal are controlled by the same direction control signal: during transmission, the direction control signal enables the driver and disables the receiver; during reception, the direction control signal disables the driver and enables the receiver.
[0051] Example 3
[0052] The present invention will be further described in detail with reference to the specific implementation of device communication configuration and protocol parsing: The processor system module 5-2 sets up a device communication configuration table, and each external device corresponds to one or more configuration items, which are used to describe the physical communication channel and protocol parameters of the device.
[0053] The device communication configuration shall include at least the configuration contents shown in Table 1 below:
[0054] Table 1 Device Communication Configuration Content
[0055]
[0056] In one specific configuration, multiple water quality parameter sensors employ serial communication parameters of 9600 bit / s, 8 data bits, 1 stop bit, and no parity check, and are distinguished by slave device addresses that are different from each other and range from 1 to 247. The syringe pump 7 and pressure sensor 8 are also configured with corresponding channel numbers, slave device addresses, function codes, and register parameters in the device communication configuration table. Therefore, the multi-device polling scheduling module 5-2-3 does not require a separate control process for the syringe pump.
[0057] The communication protocol parsing module 5-2-2 generates a request frame according to the Modbus RTU protocol. This request frame includes, in sequence, the slave device address, function code, register start address, number of registers or data to be written, and a CRC check field. The initial value of the CRC-16 check can be set to FFFFH, and after byte-by-byte calculation, the low byte is appended to the end of the message with the high byte last.
[0058] For example, when the slave address of pH sensor 3-3 is set to 06H, and it reads two holding registers at the starting address 2800H, the request frame can be represented as "06 03 28 00 00 02 CC 1C", where 06H is the slave address, 03H is the function code for reading holding registers, 2800H is the starting address, 0002H is the number of registers, and CCH and 1CH are the low and high bytes of the CRC, respectively. This example is only for illustrating the frame generation method; the function codes and register parameters of other devices are determined by the device communication configuration table.
[0059] In one optional sensor configuration, the pH value is read from two registers starting at address 2800H; the compensated redox potential value is read from two registers starting at address 2600H; the dissolved oxygen sensor can read temperature, saturation, and dissolved oxygen concentration from multiple consecutive registers starting at address 2600H; the conductivity and turbidity sensors can read their corresponding measurement data from address 2600H; and the algal fluorescence parameter sensor can continuously read temperature and algal fluorescence measurement values from address 2C00H. The above register configuration is used to illustrate the adaptation method of the device communication configuration table; adaptation is completed by updating the configuration items when the device is replaced.
[0060] Upon receiving a device response frame, the communication protocol parsing module 5-2-2 sequentially performs device address matching, function code matching, response data length verification, and CRC-16 verification. If the verification passes, byte rearrangement and engineering quantity conversion are performed according to the data type, byte arrangement, conversion factor, and offset in the configuration table. If the verification fails, the response data is not written to the valid data buffer, and the error type is passed to the multi-device polling scheduling module 5-2-3.
[0061] Example 4
[0062] See Figure 2 The invention is further described in detail below with a specific implementation of multi-device unified polling and communication anomaly handling: After the system is powered on, the processor system module 5-2 loads the device communication configuration table, initializes the polling timer and communication failure count for each device, and sets each RS485 transceiver channel to receive mode. The multi-device polling scheduling module 5-2-3 selects the current target device from the devices whose polling cycle has reached its end, and reads the device's communication channel number, slave address, function code, register start address, and register quantity, among other configuration parameters. The communication protocol parsing module 5-2-2 generates a Modbus RTU request frame based on the current target device's configuration and adds a CRC-16 checksum field. The transmit / receive direction control module 5-1-1 switches the corresponding RS485 transceiver channel to transmit mode, and the multi-channel serial communication module 5-1-2 sends each byte of the request frame sequentially. The transmit mode is maintained until the last stop bit is sent; after the last stop bit is sent, the corresponding channel is switched to receive mode, and a response timeout timer is started.
[0063] Upon receiving a complete response frame within the response timeout period, the communication protocol parsing module 5-2-2 performs address, function code, length, and CRC checks. If the checks pass, the device data is parsed, and a device identifier, communication channel number, and acquisition timestamp are appended to the data. This information is written to the device data buffer, the current device's communication failure count is cleared, and the device status is updated to online. Subsequently, the multi-device polling scheduling module 5-2-3 switches to the next target device. When the response times out, or the response frame fails the address, function code, length, or CRC check, the current device's communication failure count is incremented. If the communication failure count has not reached the maximum retransmission count, the transmit / receive direction control module 5-1-1 switches the corresponding channel back to transmit mode and retransmits the current request frame; if the maximum retransmission count is reached, the current device is marked as offline, the communication error type is recorded, and the system switches to the next target device. For devices already marked as offline, the system still sends probe requests according to the recovery polling cycle set in the device communication configuration table. When a valid response frame is received from the device again, the communication failure count is cleared, the device is restored to online status, and the normal polling cycle resumes. Through this mechanism, a communication failure in a single device will not block the acquisition of data from other channels or other devices.
[0064] Example 5
[0065] The present invention will be further described in detail with reference to a specific implementation of water sample image processing and algae concentration generation: Camera 2-4 continuously acquires water sample images of the detection area of microfluidic chip 2-2. Image input interface module 5-1-6 converts the input pixels and line / field synchronization information into a data stream format used internally by programmable logic processing module 5-1. Image caching module 5-1-5 uses on-chip memory or external memory to perform line caching or frame caching. Algae detection and processing module 5-1-4 executes a preset image processing flow on the cached water sample images. In one embodiment, the flow includes: grayscale conversion, edge enhancement, threshold segmentation, target region screening, algae target identification and counting. Other image processing methods capable of outputting algae target quantity or target density can also be used. This application does not limit the specific internal steps of the algae detection algorithm.
[0066] Within a detection cycle, the algae detection and processing module 5-1-4 outputs the target algae quantity N and obtains the effective sampling volume V_eff corresponding to that detection cycle. The effective sampling volume can be determined based on the set flow rate Q of the syringe pump 7 and the effective detection time τ, i.e., V_eff = Q × τ; or it can be determined based on the detection channel volume of the microfluidic chip 2-2 and the number of image samplings; the two methods are mutually redundant and verified. The algae concentration C is obtained according to C = N / V_eff and is transmitted to the processor system module 5-2 along with the generation timestamp of the algae detection result. The image and result output module 5-1-3 outputs the original water sample image, the processed image, the target algae quantity, the algae concentration, and the image processing status. To avoid mutual interference with the low-speed polling of various RS485 devices, image acquisition and processing are mainly completed in parallel by the programmable logic processing module 5-1, while device protocol parsing, polling scheduling, and data fusion are completed by the processor system module 5-2.
[0067] Example 6
[0068] See Figure 3The invention is further described in detail below with a specific implementation of time synchronization and fusion of multi-source monitoring data: When the processor system module 5-2 receives an algae detection result, it reads the generation timestamp T of the result and uses T as the reference time for the current synchronized monitoring record. The time synchronization and data fusion module 5-2-4 establishes a data matching time window [T-Δt, T+Δt] according to the host computer configuration or system default parameters. Here, Δt is set according to the polling cycle and allowable time deviation of each water quality parameter sensor. The time synchronization and data fusion module 5-2-4 reads the device data buffer, first filtering data with valid flags and an online device status; then, for each parameter such as pH, redox potential, dissolved oxygen, conductivity, turbidity, and algae fluorescence parameters, it calculates the absolute value of the time difference between the candidate data timestamp and the reference time T, and selects the data with the smallest absolute time difference as the corresponding parameter for the current detection cycle. Pressure detection data and the operating status of the syringe pump 7 are also selected within the data matching time window. For the same device containing multiple valid data entries within a time window, the one with the smallest time difference is selected. For data timestamps outside the time window, they are not written to the current synchronization monitoring record but can be retained in the cache for matching in subsequent monitoring cycles. After parameter selection, the time synchronization and data fusion module 5-2-4 determines whether the preset mandatory parameters are complete. If a mandatory parameter is missing, a data missing flag is written to the corresponding field. Regardless of whether the mandatory parameters are complete, a synchronization monitoring record is generated to ensure the continuity of the monitoring task and the traceability of anomalies.
[0069] The data structure for the synchronous monitoring records is shown in Table 2 below:
[0070] Table 2 Data Structure of Synchronous Monitoring Records
[0071]
[0072] After generating a synchronous monitoring record, the host computer communication module 5-2-1 writes the record into the parameter data sending cache and associates it with the corresponding water sample image or image index. The synchronous monitoring record is uploaded to the host computer platform 6 and written into the database by the alarm and data storage module 6-3, using the detection task number and reference timestamp as the association key to achieve unified querying of images, algae concentration, multi-source water quality parameters, pressure, and equipment status.
[0073] Example 7
[0074] The present invention will be further described in detail using a complete detection task as an example. The complete detection task can be performed according to the following steps:
[0075] 1) The host computer platform 6 issues the test start command, injection pump 7 operating parameters, equipment polling parameters, alarm thresholds and data matching time windows; the equipment control and management module 5-2-5 completes the configuration verification and establishes the test task number.
[0076] 2) The multi-device polling scheduling module 5-2-3 accesses the pressure sensor 8 and each water quality parameter sensor in sequence according to the device communication configuration table to obtain the initial water quality parameters and the online status of the devices; at the same time, it reads the operating status of the injection pump 7.
[0077] 3) The equipment control and management module 5-2-5 generates a request to write the start and operation parameters of the syringe pump 7, which is sent to the syringe pump 7 via the multi-channel serial communication module 5-1-2 and the corresponding RS485 channel; the syringe pump 7 draws the water sample to be tested and makes the water sample flow through the pressure sensor 8 and then enter the microfluidic chip 2-2.
[0078] 4) Camera 2-4 acquires water sample images of the detection area of microfluidic chip 2-2, and programmable logic processing module 5-1 completes image caching, algae detection and algae concentration generation, and generates algae detection results with timestamps.
[0079] 5) The processor system module 5-2 continues to poll each external device, and writes the water quality parameters, pressure data and injection pump status that have passed the protocol verification into the device data cache after adding the acquisition timestamp.
[0080] 6) The time synchronization and data fusion module 5-2-4 uses the timestamp of the algae detection results as a benchmark, selects the most recent valid data of each parameter within the data matching time window, generates a synchronous monitoring record, and writes the corresponding missing flag when there is missing data.
[0081] 7) The host computer communication module 5-2-1 uploads water sample images, algae detection results and synchronous monitoring records through a 10 Gigabit fiber optic communication link. The host computer platform 6 displays real-time video, algae concentration, water quality parameters, pressure curves and equipment status, and generates alarms based on thresholds.
[0082] 8) When the test ends, the host computer platform 6 issues a stop command, the equipment control and management module 5-2-5 controls the injection pump 7 to stop running, saves the final equipment status and data index of this test task, and completes one test task.
[0083] Through the above implementation methods, this system completes fluid transport, microscopic image processing, unified communication among multiple devices, anomaly recovery, multi-source data time synchronization, and centralized management by the host computer on a single hardware platform. The differences between external devices are described through a device communication configuration table. When adding a new device, only the corresponding configuration items and data parsing rules need to be added; the basic processing framework of multi-channel serial communication and polling scheduling does not need to be changed. The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described with reference to embodiments, those skilled in the art should understand that modifications or equivalent substitutions to the technical solutions of the present invention do not depart from the spirit and scope of the present invention, and all such modifications and substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An intelligent detection system for the coordinated sensing of multiple water quality parameters and algae concentration, characterized in that, The system includes: a water source (1), a microfluidics and microscopic imaging module (2), a multi-source water quality parameter sensing module (3), a multi-channel industrial control interface unit (4), an FPGA core processing unit (5), a host computer platform (6), an injection pump (7), and a pressure sensor (8). The water source (1) provides the water sample to be tested to the multi-source water quality parameter sensing module (3) via the injection pump (7). The pressure sensor (8) is located in the fluid path between the injection pump (7) and the microfluidics and microscopic imaging module (2), and inputs the flow path pressure of the water sample to be tested into the FPGA core processing unit (5) through the multi-channel industrial control interface unit (4). The microfluidics and microscopic imaging module (2) transmits the collected image of the water sample to the FPGA core processing unit (5). The multi-source water quality parameter sensing module (3) and the injection pump (7) The system is connected to the multi-channel industrial control interface unit (4) and inputs the detected water quality parameter data into the multi-channel industrial control interface unit (4) via RS485 communication. The multi-channel industrial control interface unit (4) is connected to the multi-source water quality parameter sensing module (3) and the FPGA core processing unit (5). It transmits the water sample to be tested according to the control instructions issued by the FPGA core processing unit (5) and returns the operating status information to the FPGA core processing unit (5). The FPGA core processing unit (5) is connected to the microfluidics and microscopic imaging module (2) and the host computer platform (6). It uploads the synchronous monitoring data, water sample image, algae detection results and equipment status to the host computer platform (6) and receives the configuration parameters and control instructions issued by the host computer platform (6) to realize intelligent detection of multi-source water quality parameters and algae concentration in a coordinated manner.
2. The intelligent detection system for the coordinated sensing of multi-source water quality parameters and algae concentration according to claim 1, characterized in that, The microfluidics and microscopic imaging module (2) is provided with a light source (2-1), a microfluidic chip (2-2), a microscope (2-3) and a camera (2-4) arranged sequentially along the optical imaging path; the light source (2-1) illuminates the water sample to be tested in the microfluidic chip (2-2); the microscope (2-3) magnifies and images the detection area of the microfluidic chip (2-2); the camera (2-4) acquires the water sample image of the detection area and transmits it to the FPGA core processing unit (5) through the image input interface module (5-1-6).
3. The intelligent detection system for the coordinated sensing of multi-source water quality parameters and algae concentration according to claim 1, characterized in that, The multi-source water quality parameter sensing module (3) is equipped with a conductivity sensor (3-1), a dissolved oxygen sensor (3-2), a pH sensor (3-3), a redox potential sensor (3-4), an algal fluorescence parameter sensor (3-5), and a turbidity sensor (3-6). It detects the conductivity, dissolved oxygen content, pH value, redox potential, phycocyanin content, and turbidity of the water sample to be tested, and inputs the detected water quality data into the FPGA core processing unit (5) through RS485 communication.
4. The intelligent detection system for the coordinated sensing of multi-source water quality parameters and algae concentration according to claim 1, characterized in that, The multi-channel industrial control interface unit (4) is provided with an external device interface module (4-1), a multi-channel RS485 transceiver module (4-2), and a core board communication interface module (4-3). The external device interface module (4-1) is connected to the multi-source water quality parameter sensing module (3), the injection pump (7), the pressure sensor (8), and the extended RS485 device. The multi-channel RS485 transceiver module (4-2) is connected to the external device interface module (4-1) and the core board communication interface module (4-3). The multi-channel RS485 transceiver module (4-2) converts the digital serial signal output by the FPGA core processing unit (5) into an RS485 differential signal and converts the RS485 differential signal returned by the external device into a digital serial signal. The core board communication interface module (4-3) is connected to the multi-channel RS485 transceiver module (4-2) and the FPGA core processing unit (5) to transmit multi-channel serial data transmission, serial data reception, and transmission / reception direction control signals.
5. The intelligent detection system for the coordinated sensing of multi-source water quality parameters and algae concentration according to claim 1, characterized in that, The FPGA core processing unit (5) is equipped with a programmable logic processing module (5-1) and a processor system module (5-2) for bidirectional data interaction via an on-chip bus, and uploads algae detection results, image processing status, device communication data, device control parameters and device status information to the host computer platform (6) via the AXI bus. The programmable logic processing module (5-1) includes a transmit / receive direction control module (5-1-1), a multi-channel serial communication module (5-1-2), an image and result output module (5-1-3), an algae detection and processing module (5-1-4), an image buffer module (5-1-5), and an image input interface module (5-1-6). The transmit / receive direction control module (5-1-1) and the multi-channel serial communication module (5-1-2) are respectively connected to the core board communication interface module (4-3) to control each RS485 communication. The system displays the sending and receiving status of the channel and completes the sending and receiving of communication data from various external devices; the image and result output module (5-1-3) inputs the cached water sample image, algae detection results, and image processing status into the host computer platform (6) through the image input interface module (5-1-6); the algae detection and processing module (5-1-4) processes the cached water sample image and generates algae detection results; the image input interface module (5-1-6) receives the water sample image collected by the camera (2-4) and caches it; The processor system module (5-2) includes a host computer communication module (5-2-1), a communication protocol parsing module (5-2-2), a multi-device polling and scheduling module (5-2-3), a time synchronization and data fusion module (5-2-4), and a device control and management module (5-2-5). The host computer communication module (5-2-1) uploads synchronous monitoring data, water sample images, algae detection results, and device status to the host computer platform (6) and receives configuration parameters and control commands issued by the host computer platform (6). The communication protocol parsing module (5-2-2) performs device address matching, function code matching, data length verification, and CRC-16 verification on the received device response frames. After the protocol parsing and all verifications pass, it parses the device response data according to the device communication configuration table and generates an external device communication request frame according to the Modbus RTU protocol. The external device communication request frame includes: a device address field, a function code field, a register address field, a register quantity or data to be written field, and a CRC check field; The multi-device polling scheduling module (5-2-3) executes the device access state machine according to the polling cycle of each external device in the device communication configuration table, and performs unified polling scheduling on the external devices according to the device address, communication cycle and task status of each external device, and generates read instructions, write instructions or status query instructions for the injection pump (7), pressure sensor (8), multi-source water quality parameter sensing module (3) and extended devices according to the device communication configuration table; the time synchronization and data fusion module (5-2-4) adds time information to the water quality parameter data, pressure detection data, injection pump (7) operation status and algae detection results, and performs time alignment and correlation fusion according to the corresponding detection cycle to generate synchronous monitoring data; the device control and management module (5-2-5) generates read instructions, write instructions or status query instructions for the injection pump (7), pressure sensor (8), multi-source water quality parameter sensing module (3) and extended RS485 devices according to the configuration parameters issued by the host computer platform (6).
6. The intelligent detection system for the coordinated sensing of multi-source water quality parameters and algae concentration according to claim 1, characterized in that, The host computer platform (6) is connected to the FPGA core processing unit (5) via a 10 Gigabit optical fiber communication link. The host computer platform (6) is equipped with a parameter and equipment status display module (6-1), a control and parameter configuration module (6-2), an alarm and data storage module (6-3), and a video and algae detection result display module (6-4). The parameter and equipment status display module (6-1) displays water quality parameters, pressure data, and the operating status of external equipment. The control and parameter configuration module (6-2) configures equipment communication parameters, acquisition parameters, and control parameters. The alarm and data storage module (6-3) generates alarm information and stores synchronous monitoring data based on monitoring data and equipment status. The video and algae detection result display module (6-4) displays water sample images and algae detection results.
7. The intelligent detection system for the coordinated sensing of multi-source water quality parameters and algae concentration according to claim 1 or claim 3, characterized in that, The multiple water quality parameter sensors in the multi-source water quality parameter sensing module (3) share the same RS485 bus. Each water quality parameter sensor has a different slave device address in the range of 1 to 247. The water quality parameter sensor uses a serial communication parameter with a communication baud rate of 9600 bit / s, 8 data bits, 1 stop bit and no parity check.
8. The intelligent detection system for the coordinated sensing of multi-source water quality parameters and algae concentration according to claim 4, characterized in that, The multi-channel industrial control interface unit (4) delivers the water sample to be tested according to the control instructions issued by the FPGA core processing unit (5) and returns the operating status information to the FPGA core processing unit (5); the multi-channel RS485 transceiver module (4-2) includes multiple independent half-duplex RS485 transceiver channels; among them, at least one RS485 transceiver channel is connected to the injection pump (7), at least one RS485 transceiver channel is connected to the multi-source water quality parameter sensing module (3), at least one RS485 transceiver channel is connected to the pressure sensor (8), and the remaining RS485 transceiver channels are used to connect to expansion devices; the half-duplex RS485 transceiver channel The system includes: an RS485 transceiver, a terminating resistor, a first bias resistor, a second bias resistor, a transient voltage suppression device, and external device connection terminals; the transmit data input terminal and receive data output terminal of the RS485 transceiver are respectively connected to the multi-channel serial communication module (5-1-2), and the drive enable terminal and receive enable terminal are connected to the transmit / receive direction control module (5-1-1); the terminating resistor is connected between the two differential bus terminals of the RS485 transceiver; the first bias resistor and the second bias resistor are respectively connected between the differential bus terminals and the power supply terminal and the ground terminal; the transient voltage suppression device is disposed between the differential bus terminals and the external device connection terminals.
9. The intelligent detection system for the coordinated sensing of multi-source water quality parameters and algae concentration according to claim 4, characterized in that, Before sending an external device communication request frame, the transmit / receive direction control module (5-1-1) enables the driver enable terminal of the corresponding RS485 transmit / receive channel to enter the active state and disables the receive enable terminal. After the last stop bit of the external device communication request frame is sent, the driver enable terminal is disabled and the receive enable terminal is enabled, so that the corresponding RS485 transmit / receive channel switches from the transmit state to the receive state and waits for the response frame from the target device.
10. The intelligent detection system for the coordinated sensing of multi-source water quality parameters and algae concentration according to claim 5, characterized in that, The processor system module (5-2) is equipped with a device communication configuration table. Each device configuration item in the device communication configuration table includes at least: device type, communication channel number, slave device address, function code, register start address, number of registers, data type, byte arrangement, data conversion factor, data offset, polling cycle, response timeout time, and maximum number of retransmissions. The communication protocol parsing module (5-2-2) adds a collection timestamp to the parsed device data after the external device response frame passes the slave device address, function code, data length, and CRC-16 verification. The time synchronization and data fusion module (5-2-4) establishes a data matching time window based on the generation timestamp of the algae detection results. Within the data matching time window, it selects the device data with the smallest time difference from the reference timestamp and with a valid identifier for each water quality parameter. The time synchronization and data fusion module (5-2-4) associates the selected water quality parameter data, pressure detection data, injection pump operating status, and algae detection results to form a synchronous monitoring record. The synchronous monitoring record includes at least: detection task number, timestamp, algae detection results, and water quality parameter set. The system includes pressure detection data, injection pump operating status, equipment online status, communication status, data validity flags, and alarm flags. When a preset mandatory parameter is missing within the data matching time window, a data missing flag corresponding to the missing parameter is written into the synchronous monitoring record. The equipment access state machine includes: equipment selection status, request frame generation status, request frame sending status, transmit / receive direction switching status, response waiting status, response frame verification status, data parsing queuing status, and next device switching status. In the data parsing queuing status, the verified equipment data, equipment identifier, communication channel number, and acquisition timestamp are written into the equipment data buffer. In the response waiting status, if a complete response frame is not received within the timeout period corresponding to the target device, or if the received response frame fails the CRC-16 check, the communication failure count of the current device is incremented, and the corresponding communication request frame is resent. When the communication failure count reaches the maximum number of retransmissions, the current device is marked as offline, and the system switches to the next target device. After a valid response frame from the current device is received again during subsequent polling, the communication failure count is cleared, and the current device is restored to online status.