Method and equipment for measuring total phosphorus flux in water in real time
Through the multi-parameter water quality sensor array and LSTM model, the total phosphorus flux is monitored in real time, which solves the problems of long detection cycles of total phosphorus and large reagent consumption in the existing technology, and achieves efficient and economical real-time water quality monitoring and management.
Patent Information
- Application Number
- CN202510539176.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, total phosphorus detection relies on laboratory chemical analysis methods to detect a long detection cycle and large reagent consumption, and it is impossible to achieve minute-level real-time monitoring, resulting in a lag in response to pollution incidents.
The multi-parameter water quality sensor array and long-term short-term memory network LSTM model are used, combined with the radar wave flow meter to monitor the flow data in real time, invert the total phosphorus concentration through LSTM, and power is powered by photovoltaic power generation to realize real-time total phosphorus flux calculation and data upload.
It has achieved minute-level total phosphorus flux data acquisition, significantly improving detection efficiency and accuracy, reducing reagent use, reducing costs, and supporting real-time water quality monitoring and management.
Smart Images

Figure BDA0005378905370000021 
Figure BDA0005378905370000031 
Figure BDA0005378905370000033
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality monitoring, and specifically provides a method and device for real-time measurement of total phosphorus flux in water. Background Art
[0002] Total phosphorus in water refers to the result obtained by measuring various forms of phosphorus (including orthophosphate, condensed phosphate, pyrophosphate, metaphosphate, and phosphate combined with organic groups, etc.) in a water sample after digestion and converting them into orthophosphate, which is measured in milligrams of phosphorus per liter of water sample. It reflects the total content of phosphorus in the water body. The main sources of total phosphorus include domestic sewage, chemical fertilizers, organophosphorus pesticides, and phosphate builders in modern detergents, etc. Excessive phosphorus is the main cause of water eutrophication, foul odor, and the occurrence of eutrophication in lakes and red tides in bays.
[0003] 1. Existing total phosphorus detection mainly relies on laboratory chemical analysis methods (such as ammonium molybdate spectrophotometry). There are problems such as a long detection cycle (usually more than 30 minutes). When performing total phosphorus detection, a large amount of chemical reagents, such as ammonium molybdate and potassium persulfate, are required. This not only increases the detection cost but also may cause secondary pollution to the environment. At the same time, due to the limitations of a long detection cycle and large reagent consumption, the existing laboratory chemical analysis methods are difficult to achieve real-time monitoring of total phosphorus, which is a significant defect for water quality monitoring scenarios that require rapid response.
[0004] 2. Existing online monitoring devices mostly adopt the combined technology of ultraviolet digestion + chemical detection, and have problems such as high maintenance cost, susceptibility to turbidity interference, and slow response speed (usually 5 - 10 minutes).
[0005] 3. Traditional flux calculation relies on discrete sampling and cannot achieve minute-level real-time flux monitoring, resulting in a lag in response to pollution events and the inability to take timely countermeasures.
[0006] Therefore, a method and device for real-time measurement of total phosphorus flux in water are proposed to solve the above problems. Summary of the Invention
[0007] In view of this, the technical problem to be solved by the present invention is to provide a method and device for real-time measurement of total phosphorus flux in water to solve the problems of large reagent consumption and inability to achieve minute-level real-time flux detection in the prior art.
[0008] To achieve the above object, the present invention provides the following technical solution: A method for real-time measurement of total phosphorus flux in water, comprising:
[0009] S1. Analyze the water quality data of the monitored river section in previous years, determine the conventional water quality index with the strongest correlation with the total phosphorus concentration in this section, and deploy a device for real-time measurement of total phosphorus flux in water at the monitoring section.
[0010] S2. Arrange the radar wave current meters of the measuring device in S1 at equal intervals on the vertical line from the water surface to the river bottom. Align the multi-parameter water quality sensor array in the measuring device with the water flow direction. Obtain the real-time cross-sectional flow data through the radar wave current meters in the measuring device; obtain the conventional water quality index data through the multi-parameter water quality sensor array.
[0011] S3. Construct a long short-term memory network LSTM inversion model with multi-parameter coupling. The inversion model uses a moving window algorithm to eliminate sensor drift and inversely calculate the total phosphorus concentration through the inversion model.
[0012] S4. Combine the relevant data obtained by the measuring device and calculate the total phosphorus flux in real time according to the flux calculation method. The specific formula for the total phosphorus flux is as follows:
[0013] Q = Σ[C(t) × v(t) × A(t)]
[0014] In the formula, Q represents the total phosphorus flux; C(t) represents the phosphorus concentration at time t; v(t) represents the water flow velocity at time t; A(t) represents the cross-sectional area of the river channel at time t.
[0015] After obtaining the total phosphorus flux, upload the data to the cloud platform.
[0016] The inversion model described in S3 is based on the long short-term memory network model LSTM, and the main steps include:
[0017] S3.1, Data standardization: Z-score standardization or Min-Max normalization can be used. The specific formula is as follows:
[0018]
[0019] In the formula, x represents the original data value, x min represents the minimum value of the data, x max represents the maximum value of the data, x norm represents the normalized value;
[0020] S3.2, Construct a supervised learning dataset: Use the sliding window method to convert the time series data into a supervised learning format; the input is the feature data X of the past T time steps; the output is the total phosphorus concentration Y of the current or future k time steps.
[0021] S3.3, LSTM model construction; when constructing the model, use multiple LSTM layers stacked and map the output of the LSTM to the final inversion value through a fully connected layer. The specific formula for the LSTM unit is as follows:
[0022] (3) Forget gate: Determine which information to discard; the specific formula is as follows:
[0023] f t = σ(Wf · [h t-1 , x t + b f )
[0024] In the formula, f t represents the output of the forget gate; σ represents the Sigmoid activation function; W f represents the weight matrix of the forget gate; h t-1 represents the hidden state at the previous moment; x t represents the input at the current moment; b f represents the bias term of the forget gate;
[0025] (4) Output gate: determines which new information to store; the specific formula is as follows:
[0026] i t = σ(W i · [h t-1 , x t + b i )
[0027]
[0028] In the formula, i t represents the output of the input gate; represents the candidate memory cell state; W i and W G represent the weight matrices of the input gate and the candidate state; b i and b C represent the bias terms of the input gate and the candidate state; tanh represents the hyperbolic tangent activation function;
[0029] (3) Update the cell state; the specific formula is as follows:
[0030]
[0031] In the formula, C t represents the memory cell state at the current moment; ⊙ represents element-wise multiplication;
[0032] (4) Output gate: determines which information to output; the specific formula is as follows:
[0033] o t = σ(W o · [h t-1 , x t + b o )
[0034] h t = o t ⊙ tanh(C t )
[0035] Where, o t represents the output of the output gate; h t represents the hidden state at the current moment; W o represents the weight matrix of the output gate; b o represents the bias term of the output gate, σ represents the sigmoid function; ⊙ represents element-wise multiplication; W, b represent trainable parameters;
[0036] S3.4, Model training and optimization; The optimizer selects Adam, the Dropout layer or L2 regularization is used to prevent overfitting, the validation set loss is monitored, and training stops when there is no improvement for several consecutive rounds.
[0037] A real-time measurement device for total phosphorus flux in water, including a multi-parameter sensor array module, a data acquisition and processing module, a power supply module, a communication and storage module, and also including a distribution box. A photovoltaic panel is installed above the distribution box, a bracket is installed below the distribution box, a depth adjustment plate is slidably connected to the bracket, a fixed frame is fixedly connected to the middle of the bracket, and sensor mounting covers are evenly slidably connected in the depth adjustment plate;
[0038] A self-adjusting mechanism is arranged at the bottom of the photovoltaic panel, and the self-adjusting mechanism is used for multi-angle adaptive adjustment of the photovoltaic panel;
[0039] A depth-adjustable protection mechanism is arranged in the depth adjustment plate, and the depth-adjustable protection mechanism is used for different-depth adjustment and protection of the sensor mounting covers.
[0040] Preferably, the data acquisition and processing module and the communication and storage module are both installed in the distribution box, the power supply module is installed in the photovoltaic panel, and the multi-parameter sensor array module is installed in the depth adjustment plate.
[0041] Preferably, the self-adjusting mechanism includes a first electric telescopic rod, the bottom of the first electric telescopic rod is installed in the middle of the upper surface of the distribution box, a servo motor is installed on the upper surface of the first electric telescopic rod, the upper end of the driving shaft of the servo motor is fixedly connected with a support frame, and the other end of the support frame away from the servo motor is rotatably connected with a rotating shaft.
[0042] Preferably, one end of the rotating shaft is fixedly connected with a swing arm, the other end of the rotating shaft is fixedly connected with a connecting plate, the other end of the connecting plate away from the swing arm is fixedly connected to the depth adjustment plate, and a ball is rotatably connected to the end of the swing arm away from the rotating shaft.
[0043] Preferably, a hollow column is arranged outside the servo motor, the bottom of the hollow column is fixedly connected to the upper surface of the distribution box, a semi-circular arc groove is opened on one side of the hollow column close to the servo motor, and the ball is slidably connected in the semi-circular arc groove.
[0044] Preferably, the depth-adjustable protection mechanism includes a second electric telescopic rod. One end of the second electric telescopic rod is fixedly connected to the depth adjustment plate, and the other end of the second electric telescopic rod is fixedly connected to a diamond-shaped telescopic plate. A connecting column is rotatably connected to the middle connection of the diamond-shaped telescopic plate. A guiding groove is formed in the middle of the depth adjustment plate, and the outer surface of the connecting column is slidably connected in the guiding groove. A pressing plate is fixedly connected to the bottom of the depth adjustment plate, and anchor cones are uniformly fixedly connected to one side of the pressing plate away from the depth adjustment plate.
[0045] Preferably, a radar wave flow velocity meter and a water quality detection sensor are installed in the sensor installation cover.
[0046] Compared with the prior art, the present invention provides a method for real-time measurement of total phosphorus flux in water, having the following beneficial effects:
[0047] 1. Through the design of this solution, not only can minute-level total phosphorus flux data be obtained, and the measurement period is significantly shortened to 45 seconds (30 seconds for sensor response plus 15 seconds for calculating the sensor), significantly improving the detection efficiency and making data updates more timely. Moreover, due to the short measurement period, the technology adopted in this solution can achieve real-time monitoring, which helps to promptly detect water quality changes and provides strong support for water quality management.
[0048] 2. Through the design of this solution, the relative error between the inversion data and the real data is less than 15% of the sensor, thus proving that the inversion method of this solution has very high accuracy. Since the error range of the inversion data is small, its reliability is relatively high, which means that in practical applications, these inversion data can be more trusted, and thus more accurate and scientific decisions can be made. This high accuracy enables the inversion data to more accurately reflect the actual total phosphorus concentration situation and provides reliable data support for water quality monitoring and management.
[0049] 3. Since this solution does not require the use of chemical reagents, it not only significantly reduces the related costs such as reagent procurement, storage, treatment, and waste discharge, reduces the cost of single measurement, but also reduces the total cost in long-term operation, making water quality monitoring more economical and efficient, and at the same time reducing the potential pollution to the environment.
[0050] 4. In this solution, real-time data transmission is achieved through the GPRS / 4G network, and the monitoring data can be immediately remotely received and analyzed. This feature greatly improves the speed of data update. The real-time data transmission function supports remote monitoring and management. Users can view the water quality monitoring report at any time through mobile devices or computer terminals, understand the water quality change trend, enabling relevant personnel to quickly obtain water quality information and make timely responses and decisions.
[0051] The real-time measurement device for total phosphorus flux in water in the present invention has the following beneficial effects:
[0052] 5. Through the design of this solution, the operator only needs to simply adjust the depth adjustment plate to slide downward along the bracket according to the water depth of the river channel until the pressing plate at its bottom touches the water bottom, and insert the anchor cone into the river bottom for fixation. This process not only simplifies the installation steps and reduces the operation difficulty, but also through the depth-adjustable design of the depth adjustment plate, effective installation can be achieved in both shallow water areas and deep water areas, thus being able to flexibly adapt to river channel environments of different depths. This characteristic greatly improves the versatility and practicality of the equipment.
[0053] 6. In this solution, through the swinging of the swing arm and the mutual extrusion of the ball and the semi-circular groove, the telescopic movement of the first electric telescopic rod can control the pitching of the depth adjustment plate, and the rotation of the depth adjustment plate can be adjusted by the servo motor. By adjusting the pitching angle of the depth adjustment plate and rotating along with the sunlight, it can be ensured that the photovoltaic panel is always perpendicular to the sun's rays, thereby maximizing the absorption of solar energy, increasing the energy output, ensuring the smoothness during the total nitrogen flux measurement, and at the same time, in strong wind or unsafe weather, the photovoltaic panel can be automatically adjusted to a safe position, reducing the risk of damage, and thus extending the service life. Brief Description of the Drawings
[0054] Figure 1 is a flowchart of a real-time measurement method for total phosphorus flux in water of the present invention;
[0055] Figure 2 is a three-dimensional structure schematic diagram of the present invention;
[0056] Figure 3 is an auxiliary three-dimensional structure schematic diagram of the present invention;
[0057] Figure 4 is a schematic diagram of the structural connection relationship of the self-adjusting mechanism of the present invention;
[0058] Figure 5 of the present invention Figure 4 is an enlarged view at A in;
[0059] Figure 6 is a schematic diagram of the structural connection relationship of the depth-adjustable protection mechanism of the present invention;
[0060] Figure 7 is an auxiliary schematic diagram of the structural connection relationship of the depth-adjustable protection mechanism of the present invention.
[0061] In the figure:
[0062] 1. Distribution box; 11. Bracket; 12. Photovoltaic power generation panel; 13. Fixed frame; 14. Depth adjustment plate; 15. Sensor installation cover;
[0063] 2. Self - regulating mechanism; 21. First electric telescopic rod; 22. Servo motor; 23. Support frame; 24. Rotating shaft; 25. Swing arm; 26. Ball; 27. Hollow column; 28. Semi - arc groove; 29. Connecting plate;
[0064] 3. Depth - adjustable protection mechanism; 31. Second electric telescopic rod; 32. Rhombic expansion plate; 33. Connecting column; 34. Guide groove; 35. Pressing plate; 36. Anchor cone. Detailed implementation mode
[0065] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
[0066] The following further elaborates on the present invention in detail according to the drawings and embodiments.
[0067] First embodiment
[0068] Please refer to Figures 1 to 7 as shown:
[0069] To solve the problems mentioned in the technical solution, the embodiment of the present application provides a real - time measurement device for total phosphorus flux in water, including a multi - parameter sensor array module, a data acquisition and processing module, a power supply module, a communication and storage module, and further includes a distribution box 1. A photovoltaic panel 12 is installed above the distribution box 1, a support 11 is installed below the distribution box 1, a depth - adjustment plate 14 is slidably connected to the support 11, a fixed frame 13 is fixedly connected to the middle of the support 11, and sensor mounting covers 15 are evenly slidably connected in the depth - adjustment plate 14;
[0070] A self - regulating mechanism 2 is arranged at the bottom of the photovoltaic panel 12, and the self - regulating mechanism 2 is used for multi - angle adaptive adjustment of the photovoltaic panel 12;
[0071] A depth - adjustable protection mechanism 3 is arranged in the depth - adjustment plate 14, and the depth - adjustable protection mechanism 3 is used for different - depth adjustment and protection of the sensor mounting covers 15;
[0072] The data acquisition and processing module and the communication and storage module are both installed in the distribution box 1, the power supply module is installed in the photovoltaic panel 12, and the multi - parameter sensor array module is installed in the depth - adjustment plate 14;
[0073] As Figure 3As shown, through the design of this solution, the operator only needs to simply adjust the depth adjustment plate 14 to slide downward along the support 11 according to the depth of the river channel water surface until the pressing plate 35 at its bottom contacts the water bottom and the anchor cone 36 is inserted into the river bottom for fixation. This process not only simplifies the installation steps and reduces the operation difficulty, but also through the depth-adjustable design of the depth adjustment plate 14, effective installation can be achieved in both shallow water areas and deep water areas, so as to flexibly adapt to river channel environments with different depths. This characteristic greatly improves the versatility and practicality of the equipment.
[0074] Specifically, as Figure 5 and Figure 6 shown, the bottom of the first electric telescopic rod 21 is installed in the middle of the upper surface of the distribution box 1. A servo motor 22 is installed on the upper surface of the first electric telescopic rod 21. The upper end of the drive shaft of the servo motor 22 is fixedly connected with a support frame 23. One end of the support frame 23 away from the servo motor 22 is rotatably connected with a rotating shaft 24; one end of the rotating shaft 24 is fixedly connected with a swing arm 25, the other end of the rotating shaft 24 is fixedly connected with a connecting plate 29, and one end of the connecting plate 29 away from the swing arm 25 is fixedly connected to the depth adjustment plate 14. One end of the swing arm 25 away from the rotating shaft 24 is rotatably connected with a ball 26; a hollow column 27 is arranged outside the servo motor 22. The bottom of the hollow column 27 is fixedly connected to the upper surface of the distribution box 1. A semi-circular arc groove 28 is opened on one side of the hollow column 27 close to the servo motor 22, and the ball 26 is slidably connected in the semi-circular arc groove 28;
[0075] Among them, the ball 26 is slidably connected in the semi-circular arc groove 28, and there is no limiting obstacle between the upper surface of the hollow column 27 and the swing arm 25. When the first electric telescopic rod 21 starts to extend, it will drive the depth adjustment plate 14 to start rotating clockwise along the middle of the rotating shaft 24, that is, adjust the pitch of the depth adjustment plate 14; the horizontal angle of the depth adjustment plate 14 can be adjusted by the rotation of the support frame 23. The depth adjustment plate 14 can be adaptively rotated along the light through the photosensor installed in the depth adjustment plate 14.
[0076] In this solution, through the swinging of the swing arm 25 and the mutual extrusion of the ball 26 and the semi-circular arc groove 28, the pitch of the depth adjustment plate 14 can be controlled by the telescopic movement of the first electric telescopic rod 21, and the rotation of the depth adjustment plate 14 can be adjusted by the servo motor 22. By adjusting the pitch angle of the depth adjustment plate 14 and rotating along with the sunlight, it can be ensured that the photovoltaic panel is always perpendicular to the sun's rays, so as to maximize the absorption of solar energy and increase the energy output, thus ensuring the smoothness during the total nitrogen flux measurement. At the same time, in strong wind or unsafe weather, the photovoltaic panel can automatically adjust to a safe position to reduce the risk of damage and thus extend the service life.
[0077] Specifically, as Figure 6 and Figure 7As shown in the figure, one end of the second electric telescopic rod 31 is fixedly connected to the depth adjustment plate 14. The other end of the second electric telescopic rod 31 is fixedly connected with a rhombic telescopic plate 32. A connecting column 33 is rotatably connected at the middle connection of the rhombic telescopic plate 32. A guiding groove 34 is formed in the middle of the depth adjustment plate 14. The outer surface of the connecting column 33 is slidably connected in the guiding groove 34. A pressing plate 35 is fixedly connected to the bottom of the depth adjustment plate 14. A plurality of anchor cones 36 are evenly fixedly connected to one side of the pressing plate 35 away from the depth adjustment plate 14. A radar wave flow velocity meter and a water quality detection sensor are installed in the sensor installation cover 15.
[0078] Among them, the outside of the sensor installation cover 15 adopts a waterproof and anti-biological adhesion shell, which is suitable for different water depths and flow velocity environments. At the same time, an ultrasonic cleaner is provided in the sensor installation cover 15. The measuring device automatically enters the cleaning mode every month, and the attachments on the surface of the sensor are removed by the ultrasonic vibration of the ultrasonic cleaner.
[0079] In this solution, through the design of the sensor installation cover 15 arranged in an array on the depth adjustment plate 14, the distance between each sensor installation cover 15 can be quickly adjusted by starting the second electric telescopic rod 31. The design of this solution can not only adapt to water bodies with different water depths, flow velocities and water quality conditions, whether in natural water bodies such as rivers, lakes or reservoirs, or in artificial environments such as sewage treatment plants and industrial discharge outlets, but also the device can provide reliable measurement results. Moreover, by adjusting the spacing depth, the device can ensure that the sensors are in the best measurement positions, realizing multi-dimensional data collection, which helps to more deeply understand the phosphorus pollution status of the water body and its influencing factors, so as to more accurately obtain water quality and flow velocity data. This accuracy is crucial for evaluating the phosphorus content and its dynamic changes in the water body.
[0080] Second Embodiment
[0081] Taking the monitoring of a certain river cross-section as an example:
[0082] Step 1: Analyze the water quality data of the monitored river section in previous years, determine the conventional water quality index with the strongest correlation with the total phosphorus concentration in this river section, and arrange real-time measurement equipment for the total phosphorus flux in the monitoring cross-section.
[0083] First, install the total phosphorus flux equipment. As Figure 2 shown, first stably install the fixing frame 13 on the bridge above the river, and then stably install the distribution box 1 on the bracket on the upper end of the bracket 11. At the same time, under the control of the control module installed in the distribution box 1, the photovoltaic panel 12 can be controlled by the light sensor on the photovoltaic panel 12 to always maintain the best angle with the light. The specific operation is as follows:
[0084] As Figure 5As shown in the figure, first, the light sensor on the depth adjustment plate 14 is used to adaptively control the telescopic movement of the first electric telescopic rod 21, so that the depth adjustment plate 14 is always at the best elevation angle with respect to the light. At this time, when the first electric telescopic rod 21 starts to extend, it can drive the servo motor 22 to drive the support frame 23 to move upward. At this time, when the support frame 23 moves upward, it will synchronously drive the rotating shaft 24 to start moving upward. Since the swing arm 25 is fixedly connected to one end of the rotating shaft 24, and the end of the swing arm 25 away from the rotating shaft 24 slides in the semi-circular groove 28, when the entire rotating shaft 24 moves upward, it will drive the swing arm 25 to drive the connecting plate 29 to start rotating in the clockwise direction. At this time, when the swing arm 25 rotates in the clockwise direction, it will drive the rotating shaft 24 to drive the connecting plate 29 to start rotating in the clockwise direction. At this time, when the connecting plate 29 rotates synchronously, it will drive the depth adjustment plate 14 to start rotating in the clockwise direction until the depth adjustment plate 14 is at the best angle with respect to the light, and then the light sensor is used to control the first electric telescopic rod 21 to stop extending. At this time, as time goes by, the angle of the sun will deflect. At this time, the light sensor will control the servo motor 22 to start rotating synchronously. By rotating the servo motor 22, it will synchronously drive the depth adjustment plate 14 to rotate. In this solution, through the swinging of the swing arm 25 and the mutual extrusion of the ball 26 and the semi-circular groove 28, the telescopic movement of the first electric telescopic rod 21 can control the elevation of the depth adjustment plate 14, and the rotation of the depth adjustment plate 14 can be adjusted by the servo motor 22. By adjusting the elevation angle of the depth adjustment plate 14 and rotating it along with the sunlight, it can ensure that the photovoltaic panel is always perpendicular to the sun's rays, thereby maximizing the absorption of solar energy, increasing the energy output, ensuring the smoothness during the measurement of the total nitrogen flux, and at the same time, in strong wind or unsafe weather, the photovoltaic panel can be automatically adjusted to a safe position, reducing the risk of damage, and thus extending the service life.
[0085] Furthermore, the installation of the depth adjustment plate 14 is started. At this time, the operator only needs to simply adjust the depth adjustment plate 14 to slide downward along the support 11 according to the depth of the river channel water surface until the pressing plate 35 at its bottom contacts the water bottom, and insert the anchor cone 36 into the bottom of the river for fixation. This process not only simplifies the installation steps and reduces the operation difficulty, but also through the depth-adjustable design of the depth adjustment plate 14, effective installation can be achieved in both shallow water areas and deep water areas, thus being able to flexibly adapt to river channel environments with different depths. This characteristic greatly improves the versatility and practicality of the equipment.
[0086] Before installing the multi-parameter water quality sensor array in the measuring device, analyze the water quality monitoring data of the monitored river section in previous years to determine the conventional water quality index with the strongest correlation with total phosphorus in this section. Then, start to align the multi-parameter water quality sensor array in the measuring device with the water flow direction and install it in the sensor installation cover 15. Since the outside of the sensor installation cover 15 uses a waterproof and anti-biofouling shell, it is suitable for different water depths and flow velocity environments. At the same time, an ultrasonic cleaner is set in the sensor installation cover 15. The measuring device automatically enters the cleaning mode every month, and the attachments on the sensor surface are removed by the ultrasonic vibration of the ultrasonic cleaner.
[0087] Furthermore, the measuring sensors are all installed in the sensor installation cover 15. At this time, as shown in Figure 7 , under the control of the control module in the distribution box 1, it is used to start the control of the second electric telescopic rod 31 through terminal control. By starting the second electric telescopic rod 31, the diamond-shaped telescopic plate 32 can be driven to extend synchronously in the depth adjustment plate 14. Since the connecting column 33 slides in the guide groove 34, driving the diamond-shaped telescopic plate 32 by the second electric telescopic rod 31 can more stably adjust the sliding position of the sensor installation cover 15 in the depth adjustment plate 14, so that the detection of the sensor installation cover 15 at different depths in the water can be quickly adjusted. In this solution, through the design of the sensor installation cover 15 installed in an array in the depth adjustment plate 14, the distance between each sensor installation cover 15 can be quickly adjusted by starting the second electric telescopic rod 31. The design of this solution can not only adapt to water bodies with different water depths, flow velocities and water quality conditions, whether in natural water bodies such as rivers, lakes or reservoirs, or in artificial environments such as sewage treatment plants and industrial discharge outlets, this device can provide reliable measurement results, and this device can ensure that the sensor is in the best measurement position by adjusting the spacing depth, realizing multi-dimensional data collection, which helps to more deeply understand the phosphorus pollution status of the water body and its influencing factors, so as to more accurately obtain water quality and flow velocity data. This accuracy is crucial for evaluating the phosphorus content and its dynamic changes in the water body.
[0088] Step 2: Arrange the radar wave current meters of the measuring device in step S1 at equal intervals on the vertical line from the water surface to the river bottom. The multi-parameter water quality sensor array in the measuring device is aligned with the water flow direction. Obtain the real-time cross-section flow data through the radar wave current meters in the measuring device; obtain the conventional water quality index data through the multi-parameter water quality sensor array;
[0089] Step 3: Construct a long short-term memory network LSTM inversion model with multi-parameter coupling. The inversion model uses a moving window algorithm to eliminate sensor drift and inversely calculate the total phosphorus concentration through the inversion model. The inversion model is based on the long short-term memory network model LSTM. The main steps include:
[0090] S3.1, Data Standardization: Z-score standardization or Min-Max normalization can be used, and the specific formulas are as follows:
[0091]
[0092] In the formula, x represents the original data value, x min represents the minimum value of the data, x max represents the maximum value of the data, x norm represents the value after normalization;
[0093] S3.2, Constructing a Supervised Learning Dataset: Using the sliding window method, convert the time series data into a supervised learning format; the input is the feature data X of the past T time steps; the output is the total phosphorus concentration Y of the current or future k time steps;
[0094] Example: If T = 5, then each sample is X = [t-4, t-3, t-2, t-1, t], Y = [t+1].
[0095] LSTM Model Construction; When constructing the model, multiple LSTM layers need to be stacked, and then the output of the LSTM is mapped to the final inversion value through a fully connected layer. The LSTM cell formula is:
[0096] S3.3, LSTM Model Construction; When constructing the model, multiple LSTM layers are stacked, and the output of the LSTM is mapped to the final inversion value through a fully connected layer. The specific LSTM cell formula is as follows:
[0097] (5) Forget Gate: Determine which information to discard; the specific formula is as follows:
[0098] f t = σ(W f · [h t-1 , x t + b f )
[0099] In the formula, f t represents the output of the forget gate; σ represents the Sigmoid activation function; W f represents the weight matrix of the forget gate; h t-1 represents the hidden state of the previous moment; x t represents the input of the current moment; b f represents the bias term of the forget gate;
[0100] (6) Output Gate: Determine which new information to store; the specific formula is as follows:
[0101] i t = σ(W i · [h t-1 , xt +b i )
[0102]
[0103] In the formula, i t represents the output of the input gate; represents the candidate memory cell state; W i and W C represent the weight matrices of the input gate and the candidate state; b i and b C represent the bias terms of the input gate and the candidate state; tanh represents the hyperbolic tangent activation function;
[0104] (3) Update the cell state; the specific formula is as follows:
[0105]
[0106] In the formula, C t represents the memory cell state at the current moment; ⊙ represents element-wise multiplication;
[0107] (4) Output gate: Determine which information to output; the specific formula is as follows:
[0108] o t = σ(W o ·[h t-1 , x t +b o )
[0109] h t = o t ⊙tanh(C t )
[0110] In the formula, o t represents the output of the output gate; h t represents the hidden state at the current moment; W o represents the weight matrix of the output gate; b o represents the bias term of the output gate, σ represents the sigmoid function; ⊙ represents element-wise multiplication; W, b represent trainable parameters;
[0111] S3.4, Model training and tuning; The optimizer uses Adam, the Dropout layer or L2 regularization to prevent overfitting, monitors the validation set loss, and stops training when there is no improvement for several consecutive rounds.
[0112] Step 4: Combine the relevant data obtained by the measuring device and calculate the total phosphorus flux in real time according to the flux calculation method. The specific formula for the total phosphorus flux is as follows:
[0113] Q = Σ[C(t) × v(t) × A(t)]
[0114] In the formula, Q represents the total phosphorus flux; C(t) represents the phosphorus concentration at time t; v(t) represents the water flow velocity at time t; A(t) represents the cross-sectional area of the river channel at time t;
[0115] Among them, the sensor needs to be calibrated for zero / span once a week. The moving window algorithm used in the model can eliminate sensor drift. The model used needs to collect laboratory control data monthly, and online training of the model is triggered when the error continuously exceeds the standard. After obtaining the total phosphorus flux, the data is uploaded to the cloud platform.
[0116] Through the design of this solution, not only can minute-level total phosphorus flux data be obtained, and the measurement period is significantly shortened to 45 seconds (30 seconds for sensor response plus 15 seconds for calculation), which significantly improves the detection efficiency and makes the data update more timely. Moreover, due to the short measurement period, the technology adopted in this solution can achieve real-time monitoring, which helps to detect water quality changes in a timely manner and provides strong support for water quality management.
[0117] Please refer to the above working process Figures 1 to 7 .
[0118] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0119] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A real-time measurement method for total phosphorus flux in water, characterized in that, Including: S1. Analyze the water quality data of the monitored river section in previous years, determine the conventional water quality index with the strongest correlation with the total phosphorus concentration in this river section, and install real-time measurement equipment for the total phosphorus flux at the monitoring section; S2. Arrange the radar wave current meters of the measurement equipment in step S1 at equal intervals on the vertical line from the water surface to the river bottom at the monitoring section. Align the multi-parameter water quality sensor array in the measurement equipment with the water flow direction. Obtain the real-time flow data of the section through the radar wave current meter; obtain the conventional water quality index data through the multi-parameter water quality sensor array; S3. Construct a long short-term memory network LSTM inversion model with multi-parameter coupling. The inversion model uses a moving window algorithm to eliminate sensor drift, and inversely calculate the total phosphorus concentration through the inversion model; S4. Combine the relevant data obtained by the measurement equipment, and calculate the total phosphorus flux in real time according to the flux calculation method. The specific formula for the total phosphorus flux is as follows: Q = Σ[C(t)×v(t)×A(t)] In the formula, Q represents the total phosphorus flux; C(t) represents the phosphorus concentration at time t; v(t) represents the water flow velocity at time t; A(t) represents the cross-sectional area of the river channel at time t; After obtaining the total phosphorus flux, upload the data to the cloud platform.
2. The real-time measurement method for total phosphorus flux in water according to claim 1, characterized in that The inversion model described in S3 is based on the long short-term memory network model LSTM, and the main steps include: S3.
1. Data standardization: Z-score standardization or Min-Max normalization can be used. The specific formula is as follows: Where x represents the original data value, x min represents the minimum value of the data, x max represents the maximum value of the data, x norm represents the value after normalization; S3.
2. Construct a supervised learning data set: Use the sliding window method to convert the time series data into a supervised learning format; the input is the feature data X of the past T time steps; the output is the total phosphorus concentration Y of the current or future k time steps; S3.
3. LSTM model construction; when constructing the model, stack multiple LSTM layers, and map the output of the LSTM to the final inversion value through the fully connected layer. The specific formula for the LSTM unit is as follows: (1) Forget gate: The specific formula is as follows: f t = σ(W f · [h t-1 , x t + b f ) where f t represents the output of the forget gate; σ represents the Sigmoid activation function; W f represents the weight matrix of the forget gate; h t-1 represents the hidden state at the previous moment; x t represents the input at the current moment; b f represents the bias term of the forget gate; (2) Output gate: The specific formula is as follows: i t = σ(W i · [h t-1 , x t + b i ) where, i t represents the output of the input gate; represents the candidate memory cell state; W i and W C represent the weight matrices of the input gate and the candidate state; b i and b C represent the bias terms of the input gate and the candidate state; tanh represents the hyperbolic tangent activation function; (3) Update the cell state; the specific formula is as follows: where C t represents the state of the memory cell at the current moment; ⊙ represents element-wise multiplication; (4) Output gate: The specific formula is as follows: o t = σ(W o · [h t-1 , x t + b o ) h t = o t ⊙tanh(C t ) where, o t represents the output of the output gate; h t represents the hidden state at the current time; W o represents the weight matrix of the output gate; b o represents the bias term of the output gate, σ represents the sigmoid function; ⊙ represents element-wise multiplication; W, b represent trainable parameters; S3.
4. Model training and tuning; Select Adam as the optimizer, use the Dropout layer or L2 regularization to prevent overfitting, monitor the loss of the validation set, and stop training when there is no improvement for several consecutive rounds.
3. A real-time measurement device for total phosphorus flux in water, applicable to the real-time measurement method for total phosphorus flux in water described in any one of claims 1-2, characterized in that, It includes a multi-parameter sensor array module, a data acquisition and processing module, a power supply module, a communication and storage module, and also includes a distribution box (1). A photovoltaic panel (12) is installed above the distribution box (1), a bracket (11) is installed below the distribution box (1), a depth adjustment plate (14) is slidably connected to the bracket (11), a fixing frame (13) is fixedly connected to the middle of the bracket (11), and sensor mounting covers (15) are evenly slidably connected in the depth adjustment plate (14); A self-adjusting mechanism (2) is arranged at the bottom of the photovoltaic panel (12), and the self-adjusting mechanism (2) is used for multi-angle adaptive adjustment of the photovoltaic panel (12); A depth-adjustable protection mechanism (3) is provided in the depth adjustment plate (14), and the depth-adjustable protection mechanism (3) is used for adjusting and protecting the sensor mounting cover (15) at different depths.
4. The real-time measurement device for total phosphorus flux in water according to claim 3, characterized in that: The data acquisition and processing module and the communication and storage module are both installed in the distribution box (1), the power supply module is installed in the photovoltaic panel (12), and the multi-parameter sensor array module is installed in the depth adjustment plate (14).
5. The real-time total phosphorus flux measuring device in water according to claim 3, characterized in that: The self-adjusting mechanism (2) includes a first electric telescopic rod (21). The bottom of the first electric telescopic rod (21) is installed in the middle of the upper surface of the distribution box (1). A servo motor (22) is installed on the upper surface of the first electric telescopic rod (21). The upper end of the drive shaft of the servo motor (22) is fixedly connected to a support frame (23). One end of the support frame (23) away from the servo motor (22) is rotatably connected to a rotating shaft (24).
6. The real-time measurement device for total phosphorus flux in water according to claim 5, characterized in that: One end of the rotating shaft (24) is fixedly connected to a swing arm (25), the other end of the rotating shaft (24) is fixedly connected to a connecting plate (29), one end of the connecting plate (29) away from the swing arm (25) is fixedly connected to the depth adjustment plate (14), and one end of the swing arm (25) away from the rotating shaft (24) is rotatably connected to a ball (26).
7. The real-time measurement device for total phosphorus flux in water according to claim 6, characterized in that: A hollow column (27) is arranged outside the servo motor (22). The bottom of the hollow column (27) is fixedly connected to the upper surface of the distribution box (1). A semi-circular arc groove (28) is opened on one side of the hollow column (27) close to the servo motor (22), and the ball (26) is slidably connected in the semi-circular arc groove (28).
8. The real-time measurement device for total phosphorus flux in water according to claim 3, characterized in that: The depth-adjustable protection mechanism (3) includes a second electric telescopic rod (31). One end of the second electric telescopic rod (31) is fixedly connected in the depth adjustment plate (14). The other end of the second electric telescopic rod (31) is fixedly connected to a diamond-shaped telescopic plate (32). The middle connection part of the diamond-shaped telescopic plate (32) is rotatably connected to a connecting column (33). A guiding groove (34) is opened in the middle of the depth adjustment plate (14). The outer surface of the connecting column (33) is slidably connected in the guiding groove (34). A pressing plate (35) is fixedly connected to the bottom of the depth adjustment plate (14). A plurality of anchor cones (36) are evenly fixedly connected to one side of the pressing plate (35) away from the depth adjustment plate (14).
9. The real-time measurement device for total phosphorus flux in water according to claim 3, characterized in that: A radar wave current meter and a water quality detection sensor are installed in the sensor mounting cover (15).
Citation Information
Patent Citations
Single frequency point frequency spectrum prediction method based on optimum long short-term memory model
CN109194423A
Water level real-time monitoring device for intelligent construction and use method of water level real-time monitoring device
CN114705271A
Method and system for generating remote sensing product of total phosphorus content in large range of rivers and lakes
CN117315497A
Support is adjusted in real time to photovoltaic board angle
CN207427047U
Sewage monitoring equipment with adjustable depth
CN214278147U
Cited By
Sewage dosing automatic regulation and control method and system based on wireless sensor network
CN121107481A
Accurate accounting method for total phosphorus flux of lake
CN122113666A
Accurate calculation method of total phosphorus flux in lake
CN122113666B