A heat supply system environment sensing and multi-point water quality optimization dosing method

By employing multi-point water quality sensing and quantum-optimized dosing methods, the challenges of local water quality changes and global control in heating systems have been solved. This has enabled efficient, stable, and flexible water quality regulation in distributed dosing systems, thereby improving the adaptability and responsiveness of heating systems.

CN120355530BActive Publication Date: 2025-11-18CHENGDU SHU CARBON TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510457710.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-13
Publication Date
2025-11-18
Estimated Expiration
2045-04-13

AI Technical Summary

Technical Problem

Existing heating systems struggle to balance local water quality changes and optimal global control when dealing with large-scale distributed heating networks. Centralized chemical dosing methods are susceptible to single-point failures and are ill-suited to complex spatiotemporal heterogeneity.

Method used

A multi-point water quality sensing and quantum-optimized dosing method is adopted. Water quality data is sensed in real time through multiple sensor nodes. A global dosing strategy is constructed using quantum Fourier transform and quantum annealing algorithms. Tensor decomposition technology is combined to integrate the characteristics of the dosing agents. Distributed dosing decisions are realized using the Gossip protocol and PBFT consensus mechanism. Precise control is achieved by combining flow velocity distribution and spatiotemporal compensation models.

Benefits of technology

This achievement represents a breakthrough in the heating system's local adaptability, global coordination, and dynamic responsiveness, significantly improving the efficiency and stability of water quality control, avoiding the impact of single-point failures, and ensuring the consistency and accuracy of chemical dosing decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355530B_ABST
    Figure CN120355530B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of heating system, and relates to a heating system environment sensing and multi-point water quality optimization dosing method, wherein real-time sensing and uploading of water quality data are realized through multiple sensor nodes, then deep periodic characteristics of the water quality data are extracted by using quantum state space mapping and quantum Fourier transform, a global optimal medicament combination strategy is solved in a constructed quantum optimization model by combining a quantum annealing algorithm, a medicament compatibility matrix is constructed by using tensor decomposition technology to integrate medicament characteristics and pipe network parameters, each dosing terminal calculates a dosing amount based on local sensing, consistency of dosing decisions is ensured through a PBFT consensus mechanism, finally, a flow velocity distribution characteristic of the pipe network is combined, a lead control algorithm is used to correct medicament injection time lag, dynamic prediction and accurate control are realized, and therefore, a breakthrough is realized in local adaptability, global coordination and dynamic responsiveness of the distributed dosing control system, and efficiency and stability of water quality regulation of the heating system are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of heating system, more particularly, relates to a heating system environment perception and multi-point water quality optimization dosing method. BACKGROUND

[0002] With the continuous expansion of urban heating system, the structure of central heating network is becoming more and more complex, and the water quality fluctuates frequently. As a key means to maintain system water quality stability and improve operation efficiency, dosing has attracted widespread attention. In the traditional heating system, the dosing strategy is usually based on the data collected by a single or a small number of water quality sensors, and a preset fixed rule or linear model is used for decision-making. This method has certain feasibility in the initial stage of the system or when the operating conditions are relatively stable, but in the face of complex water quality changes and fluid dynamic response in large-scale distributed heating network, its effectiveness and adaptability are greatly reduced.

[0003] The current mainstream technology mostly adopts centralized dosing control method, that is, the central control system makes global dosing decision after analyzing the data of multiple monitoring points, which has certain advantages in dealing with complexity and global optimal control, but has the following obvious limitations. The centralized architecture is strongly dependent on communication links and center nodes, and is easily affected by single point failure. Moreover, the water quality of each pipe section has spatial and temporal heterogeneity, and the centralized strategy is difficult to consider local changes. SUMMARY

[0004] The application provides a heating system environment perception and multi-point water quality optimization dosing method, which solves the technical problem that the prior art cannot consider local changes.

[0005] A heating system environment perception and multi-point water quality optimization dosing method, comprising the following steps:

[0006] Step 1: Collect water quality data based on multiple sensor nodes, and send the collected water quality data to a central processing system;

[0007] Step 2: Map the collected water quality data to an 8-dimensional quantum state space, and use quantum Fourier transform to extract the periodic characteristics of the water quality parameters. Then, based on the constructed quantum optimization model, use quantum annealing algorithm to solve the dosing decision problem, and obtain the dosing combination strategy;

[0008] Step 3: Collect the characteristics of the dosing agent and the pipe network parameters, and combine the water quality data and the dosing combination strategy to use tensor decomposition technology to reduce and integrate the data, and obtain the compatibility matrix of the dosing agent;

[0009] Step 4: Each dosing terminal calculates the local dosing amount according to its own sensor data, and propagates the local dosing to the surrounding dosing terminals through the Gossip protocol. All terminals reach an agreement on the dosing decision through the PBFT protocol. In the process of reaching the dosing decision, the compatibility matrix is used to guide the dosing decision of each terminal.

[0010] Step 5: According to the flow rate distribution of the pipe network and the target drug injection amount, the propagation time lag of the drug is calculated. A space-time compensation model is established using the lead control algorithm to predict and adjust the injection amount of the drug, and a dosing strategy based on fluid dynamics and time lag compensation is obtained.

[0011] The present application realizes real-time sensing and uploading of water quality data through multiple sensor nodes, comprehensively reflecting the water quality state in the heating system. Then, the deep periodic characteristics of the water quality data are extracted by using quantum state space mapping and quantum Fourier transform, and the global optimal drug combination strategy is solved in the constructed quantum optimization model combined with the quantum annealing algorithm, which improves the intelligent level and global coordination ability of the dosing decision. Further, the tensor decomposition technology is used to integrate the drug characteristics and pipe network parameters to construct a drug compatibility matrix, which provides quantitative guidance for local dosing. At the execution level, each dosing terminal calculates the dosing amount based on local sensing, and realizes information diffusion through the Gossip protocol, and ensures the consistency of the dosing decision through the PBFT consensus mechanism, which improves the distributed collaboration ability of the system. Finally, combined with the flow rate distribution characteristics of the pipe network, a space-time compensation model is established, and the lead control algorithm is used to correct the drug injection time lag, realizing dynamic prediction and precise control. Therefore, the present application realizes breakthroughs in local adaptability, global coordination and dynamic responsiveness of the distributed dosing control system, and significantly improves the efficiency and stability of the water quality regulation of the heating system.

[0012] Preferably, in step 1, each sensor simulates the characteristics of a biological cell, and adjusts the data sampling frequency according to the dynamic characteristics of environmental changes, adapts to the dynamic changes in different water quality environments, and increases the sampling frequency of the corresponding sensor nodes when the environmental data changes increase. When the environmental data changes are stable, the sampling frequency is reduced.

[0013] Preferably, in step 1, when the data difference of three adjacent nodes exceeds the threshold value, the system triggers the antibody generation algorithm for calibration, wherein the antibody generation algorithm is a machine learning model or a rule-based calibration mechanism, which dynamically adjusts the parameters of the sensor or switches to a backup sensor.

[0014] Preferably, the step 2 comprises the following steps:

[0015] Water quality data preprocessing: the water quality data is normalized and mapped to the interval [0, 1];

[0016] Mapping to quantum state space: mapping the normalized water quality data to a quantum state space, i.e. encoding the water quality data as a superposition state of qubits;

[0017] Extracting periodic features: based on the superposition state of qubits, a quantum Fourier transform is used for transformation, so that the superposition state of qubits is transformed into a frequency domain quantum state, and the periodic features are extracted and encoded into the phase information of the qubits;

[0018] Constructing a QUBO model: based on the cost of the medicine, the risk of scaling and the influence of periodic features, a QUBO model is constructed to represent the medicine decision problem, the goal of which is to minimize the cost of medicine and the risk of scaling, wherein the objective function is defined as follows:

[0019] H = ∑ i (C i ·q i )+∑ i,j (R ij ·q i ·q j )+∑ i (P i ·q i );

[0020] In the formula: C i represents the unit cost of medicine i; q i represents the decision variable of whether to use medicine i, q i = 1 indicates that the medicine is used, q i = 0 indicates that the medicine is not used; R ij represents the scaling risk coefficient between medicine i and medicine j; q i ·q j represents the decision variable of whether two medicines are used at the same time, q i ·q j = 1 if both are used, otherwise 0; P i represents the coefficient of the influence of periodic features on medicine i;

[0021] Converting the QUBO model into a quantum computing problem to obtain a form solved by quantum annealing algorithm;

[0022] Quantum annealing optimization of medicine strategy: initialize the qubits by quantum computer, construct the Hamiltonian of the objective function, and simulate the optimization process through the annealing process of quantum mechanics; gradually change the state of the qubits by the quantum computer, and gradually converge to the minimum energy state according to the quantum superposition and interference effect, i.e. the optimized medicine combination strategy.

[0023] Preferably, the step 3 comprises the following steps:

[0024] Based on the medicine combination strategy, a four-dimensional parameter tensor is constructed

[0025]

[0026] wherein: denotes the chemical adaptability score; denotes the time effectiveness score; denotes the spatial coordination score; denotes the economic indicator; a, b, g, d denotes the weight coefficient;

[0027] Tensor decomposition: based on the constructed four-dimensional parameter tensor, tensor decomposition is performed:

[0028]

[0029] wherein: l r denotes the eigenvalue weight, denotes the contribution of each component; denotes the L2 normalized chemical adaptability basis vector; denotes the L2 normalized time effectiveness basis vector; denotes the L2 normalized spatial coordination basis vector; d r denotes the L2 normalized economic indicator basis vector;

[0030] Each basis vector is optimized using the alternating least squares method, wherein the objective function is as follows:

[0031]

[0032] Iterative optimization is performed based on the objective function, and the iteration is stopped after a preset stopping condition is reached;

[0033] Compatibility matrix generation:

[0034]

[0035] wherein: k denotes the time dimension index; l denotes the economic dimension index; denotes the component of the time basis vector in the time interval k; denotes the component of the economic basis vector in the cost level l.

[0036] Preferably, the step 4 comprises the following steps:

[0037] Local metering initialization: each dosing terminal extracts the corresponding matching weight from the matching matrix according to the current time and economic cost level, and then combines the decision vector to initialize the dosing amount of each terminal;

[0038] Information diffusion and weight distribution: based on the pipe network topology and the distance attenuation coefficient, each terminal calculates the weight between itself and adjacent terminals to obtain neighbor weights;

[0039] Iterative consensus optimization: in each iteration, the terminal updates the dosage according to its current dosage and neighbor information, and adjusts the value according to the loss function gradient, gradually tends to the optimized dosage;

[0040] Discretization and instruction generation: based on the iterative optimization, the discretized dosage is generated.

[0041] Preferably, the update formula for updating the dosage is as follows:

[0042]

[0043] In the formula: Dti represents the dosage of terminal i in the tth iteration; a represents the historical metering retention weight; w ij represents the neighbor weight; η represents the gradient step; represents the gradient of the loss function to D i ; represents the loss function; D i represents the dosage of the ith terminal in the current iteration;

[0044]

[0045] In the formula: D i represents the dosage of the ith terminal in the current iteration; represents the reference dosage of the ith terminal, which is a local average calculated based on the dosages of neighbor terminals and the initial value; D j represents the dosage of the jth terminal in the current iteration; (i,j) ∈ ε represents that there is a direct connection between terminal i and terminal j, and ε represents the set of all adjacent terminal pairs.

[0046] Preferably, the step 5 comprises the following steps:

[0047] Medication transmission period calculation: based on the pipe segment length, the flow rate of the pipe segment at time t, and the inherent delay compensation of the pipe segment, the medication transmission period is calculated;

[0048] Dynamic phase compensation: based on the calculated medication transmission period, a dynamic phase compensation term is introduced, and the phase is corrected according to the change of time t, to compensate for the medication propagation deviation caused by the change of flow rate;

[0049] Dynamic modulation and medication adjustment: based on the deviation of the pipe segment flow rate and the historical flow rate, a nonlinear mapping of flow rate and metering is realized through a tanh function, to obtain a pulsation gain coefficient;

[0050] Based on the obtained pulsation gain coefficient and dynamic phase, the medication metering after pulsation modulation is calculated; based on the set boundary constraint, the medication metering that is not between the boundary constraints is constrained to be within the boundary, to obtain the final medication metering.

[0051] The beneficial effects of the present application include:

[0052] The present application realizes real-time sensing and uploading of water quality data through multiple sensor nodes, comprehensively reflecting the water quality state in the heating system; then the deep periodic characteristics of the water quality data are extracted by quantum state space mapping and quantum Fourier transform, and the global optimal reagent combination strategy is solved in the constructed quantum optimization model combined with the quantum annealing algorithm, which improves the intelligent level and global coordination ability of the reagent decision; further, the reagent compatibility matrix is constructed by using tensor decomposition technology to integrate the reagent characteristics and pipe network parameters, providing quantitative guidance for local reagent addition; at the execution level, each reagent addition terminal calculates the reagent addition amount based on local sensing, and realizes information diffusion through the Gossip protocol, and ensures the consistency of reagent addition decision through the PBFT consensus mechanism, improving the distributed collaboration ability of the system; finally, combined with the flow distribution characteristics of the pipe network, a space-time compensation model is established, and the reagent injection time lag is corrected by using the advanced control algorithm, realizing dynamic prediction and accurate control; therefore, the present application realizes breakthroughs in local adaptability, global coordination and dynamic responsiveness of the distributed reagent addition control system, and significantly improves the efficiency and stability of the water quality regulation of the heating system. BRIEF DESCRIPTION OF DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0054] Figure 1 The overall step block diagram provided for the embodiments of the present application.

[0055] Figure 2 The specific step block diagram of step 5 provided for the embodiments of the present application. DETAILED DESCRIPTION

[0056] In order to make the technical problems, technical solutions and beneficial effects of the present application more clear, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0057] Referring to Figure 1 As shown in the drawings, a heating system environment sensing and multi-point water quality optimal reagent addition method includes the following steps:

[0058] Step 1: Collect water quality data based on multiple sensor nodes, and send the collected water quality data to a central processing system;

[0059] As one possible implementation of this embodiment, in step 1, each sensor simulates the characteristics of a biological cell and adjusts the data sampling frequency (adaptive from 1 to 15 minutes) according to the dynamic characteristics of environmental changes to adapt to dynamic changes in different water quality environments. When environmental data changes increase, the sampling frequency of the corresponding sensor node increases; when environmental data changes are stable, the sampling frequency decreases. For example, assuming the sampling frequency of a certain sensor is f(t), its adaptive frequency adjustment can be expressed as:

[0060] f(t) = f0 + α·ΔE(t);

[0061] In the formula: f0 represents the initial sampling frequency; α represents the adaptive factor; f(t) represents the adjusted sampling frequency; ΔE(t) represents the change in environmental data at time t, which is the difference between the current environmental data and the environmental data at the previous time.

[0062] Water quality data includes parameters such as pH, hardness, temperature, and calcium. 2+ / Mg 2+ Concentration and other data are collected by a sensor array (including different types of sensors, such as pH sensors, temperature sensors, chemical composition sensors, etc.).

[0063] As one possible implementation of this embodiment, in step 1, when the data difference between three adjacent nodes exceeds a threshold, the system triggers an antibody generation algorithm for calibration. The antibody generation algorithm dynamically adjusts the sensor parameters or switches to a backup sensor through a machine learning model or a rule-based calibration mechanism, as exemplified below:

[0064] Assuming there are three adjacent sensor nodes S1, S2, and S3, with data points D1, D2, and D3 respectively, if the deviation exceeds 30%, then:

[0065] |D i -μ|>0.3·μ, where

[0066] In the formula: D i This represents the data value of sensor i; μ represents the average value of the data from the three adjacent sensors; if the absolute difference is greater than 30% of the average value, the anomaly handling mechanism is triggered.

[0067] An exemplary antibody generation algorithm is as follows: When abnormal data is detected, assume that the adjacent sensor data D i If the deviation from the mean μ exceeds 30%, the antibody generation algorithm is triggered.

[0068] δD i =|D i -μ|If δD i> 0.3.mu.;

[0069] wherein delta D i represents the deviation between the sensor data and the mean value;

[0070] According to the degree of abnormality, an automatic calibration factor is set to adjust the sensor data:

[0071] D' = D i + C * delta D i ;

[0072] In the formula: D' represents the corrected sensor data; C represents the automatic calibration factor;

[0073] In this embodiment, by combining the bionic dynamic sensing protocol with the whole immune mechanism, a system capable of self-adaptive adjustment of sampling frequency, correction of abnormal data and ensuring data accuracy is constructed, so that the biological population behavior can be simulated, the sensor can be self-adaptive adjusted, the abnormality can be detected and the sensor can be calibrated, and the accuracy and timeliness of the data collected from the environment are ensured, thereby providing reliable basic data for the subsequent stage.

[0074] Step 2: mapping the collected water quality data to an 8-dimensional quantum state space, using quantum Fourier transform to extract the periodic characteristics of the water quality parameters, then using quantum annealing algorithm to solve the dosing decision problem based on the constructed quantum optimization model, and obtaining the dosing combination strategy;

[0075] As a possible implementation manner of this embodiment, the step 2 includes the following steps:

[0076] Water quality data preprocessing: normalizing the water quality data and mapping to the interval [0, 1];

[0077] Mapping to quantum state space: mapping the normalized water quality data to the quantum state space, i.e. encoding the water quality data as a quantum bit superposition state, assuming that the water quality data X norm = [x1, x2, …, x n ], the quantum bit superposition state is represented as:

[0078]

[0079] Where: |i> represents the state of the quantum bit; alpha i represents the superposition coefficient of the quantum state;

[0080] Extracting periodic characteristics: based on the quantum bit superposition state, quantum Fourier transform is used for transformation, so that the quantum bit superposition state is converted into a frequency domain quantum state, and the periodic characteristics are extracted and encoded into the phase information of the quantum bit;

[0081] Constructing QUBO model: Based on the influence of drug cost, fouling risk and periodic characteristics, a QUBO model is constructed to represent the drug decision problem, and the objective is to minimize the drug cost and fouling risk, where the objective function is defined as follows:

[0082] H = ∑ i (C i ·q i )+∑ i,j (R ij ·q i ·q j )+∑ i (P i ·q i );

[0083] In the formula: C i represents the unit cost of drug i; q i represents the decision variable of whether to use drug i, q i =1 indicates the use of the drug, q i =0 indicates not to use the drug; R ij represents the fouling risk coefficient between drug i and drug j; q i ·q j represents the decision variable of whether to use two drugs, q i ·q j =1 if both are used, otherwise 0; P i represents the coefficient of the influence of periodic characteristics on drug i;

[0084] Convert the QUBO model into a quantum computing problem to get the form of quantum annealing algorithm solution;

[0085] Quantum annealing optimization of drug strategy: initialize quantum bits through quantum computer, construct Hamiltonian of objective function, and simulate optimization process through quantum mechanics annealing process; gradually change the state of quantum bits through quantum computer, and gradually converge to the minimum energy state according to the quantum superposition and interference effect, that is, the optimized drug combination strategy.

[0086] In this embodiment, periodic features are extracted by quantum Fourier transform and considered as an additional term when building the QUBO model, ensuring that the dynamic fluctuations of water quality can be addressed during the process of adding chemicals; through the quantum annealing optimization algorithm, we can get the best dosing strategy on the basis of global optimization, ensuring the stability of water quality and the efficient use of chemicals; secondly, in this embodiment, by constructing a quantum unconstrained binary optimization model (QUBO), the selection of chemicals, the risk of scaling and the influence of periodic disturbance are modeled as a unified objective function; by mapping this model to the Hamiltonian of a quantum system and using the quantum annealing algorithm to search for the lowest energy state, we can avoid the defect that traditional optimization algorithms are prone to local optimization, and achieve global optimal solution of the dosing strategy; this optimization capability is particularly significant in the context of the complex interaction of multiple chemicals used together, mutual inhibition or enhancement of effect.

[0087] Step 3: Collect chemical properties and pipe network parameters, and combine water quality data and chemical combination strategy, use tensor decomposition technology to reduce and integrate data, and get the compatibility matrix of chemicals;

[0088] As a possible implementation of this embodiment, step 3 includes the following steps:

[0089] Assume the decision vector q * ∈{0,1} 2000 , which is the output of the quantum annealing algorithm, the vector length is 2000, indicating whether to dose each pipe segment (dosing terminal); if q * =1 indicates that pipe segment i needs to be dosed; q * =0 indicates that pipe segment i does not need to be dosed;

[0090] The form of the four-dimensional tensor is defined as follows: Including the score information of chemical adaptability, time effectiveness, spatial coordination and economy;

[0091] For example, chemical adaptability: dimension 1 represents the type of chemical, a total of 256 chemicals;

[0092] Time effectiveness: dimension 2 represents the time period, a total of 256 time intervals;

[0093] Spatial coordination: dimension 3 represents the spatial region, a total of 256 pipe network regions;

[0094] Economic indicators: dimension 4 represents economic cost, a total of 256 levels;

[0095] Based on the chemical combination strategy, a four-dimensional parameter tensor is constructed

[0096]

[0097] In the formula: represents the chemical adaptability score; represents the time effectiveness score; represents the spatial coordination score; represents the economic indicator; α, β, γ, δ represent weight coefficients, for example, α = 0.4, β = 0.3, γ = 0.2, δ = 0.1;

[0098] wherein the chemical adaptability score is obtained based on the following formula:

[0099]

[0100] In the formula: pH i represents the optimal applicable pH value of the medicament i; pH opt represents the pH value of the current water quality; e represents the base number of the natural logarithm; the Sigmoid function is used for normalization, with a value range of [0, 1];

[0101] The time effectiveness score is obtained based on the following formula:

[0102]

[0103] In the formula: represents the half-life of the medicament j; T = 24 h is the heat supply period; if the half-life of the medicament is greater than the heat supply period, it indicates that the time effectiveness of the medicament is strong, with an amplitude of 1, otherwise the amplitude is 0.5;

[0104] The spatial coordination score is obtained based on the following formula:

[0105]

[0106] In the formula: x k represents the coordinates of the pipe network area k; x w represents the coordinates of the pollution source; σ = 50 m is the standard deviation, used to adjust the influence of spatial distance;

[0107] The economic indicator score is obtained based on the following formula:

[0108]

[0109] In the formula: C l represents the unit price of the cost level l; C max and C min are the maximum and minimum costs preset by the system, respectively;

[0110] Tensor decomposition: perform tensor decomposition based on the constructed four-dimensional parameter tensor:

[0111]

[0112] where λ r denotes eigenvalue weight, denotes contribution of each component; denotes L2-normalized chemical adaptability basis vector; denotes L2-normalized time effectiveness basis vector; denotes L2-normalized spatial coordination basis vector; r denotes L2-normalized economic indicator basis vector;

[0113] Each basis vector is optimized using alternating least squares method, where the objective function is as follows:

[0114]

[0115] Iterative optimization is performed based on the objective function, and the iteration is stopped after a preset stopping condition is reached;

[0116] Compatibility matrix generation:

[0117]

[0118] where k denotes time dimension index; l denotes economic dimension index; denotes component of time basis vector in time interval k, where denotes component of economic basis vector in cost level l,

[0119] Normalization: normalized by row:

[0120] Screening is performed according to the decision vector q * If pipe section i is not dosed, M k(i) in the corresponding row is set to zero;

[0121] Based on this output, the compatibility matrix is represented as where row index represents 50 time intervals (each row corresponds to a five-minute window), column index represents 50 cost levels (each column corresponds to a cost interval); matrix element value represents the matching weight of the medicament, which satisfies the normalization condition:

[0122] In this embodiment, the original 256 4The parameter is compressed to 32* (4*256) +32=32832, the calculation complexity is greatly reduced, the matching matrix is recalculated every five minutes, the water quality change is dynamically adapted, the potential correlation mode of time and economic dimension is provided through the base vector, the matching decision of the medicament is helped to be explained, and therefore, the four-dimensional parameter tensor decomposition technology is utilized, the data amount is compressed, the matching matrix is updated in real time under the premise of ensuring the calculation precision, and the high explainability and performance are obtained.

[0123] Step 4: Each dosing terminal calculates the local dosing amount according to the sensor data of the terminal, propagates the local dosing to surrounding dosing terminals through the Gossip protocol, and all terminals reach an agreement on the dosing decision through the PBFT protocol, wherein in the process of reaching the dosing decision, the matching matrix is used to guide the dosing decision of each terminal.

[0124] As a possible implementation manner of the embodiment, the step 4 includes the following steps:

[0125] Local metering initialization: each dosing terminal extracts the corresponding matching weight from the matching matrix according to the current time and the economic cost level, and then combines the decision vector to initialize the dosing amount of each terminal;

[0126]

[0127] In the formula, the initialization dosing amount of the pipe section (dosing terminal) i is represented; l(i) represents the economic level index of the pipe section i; k represents the current time interval index; The decision vector is represented;

[0128] Information diffusion and weight distribution: based on the pipe network topological structure and the distance attenuation coefficient, each terminal calculates the weight between the terminal and the adjacent terminal to obtain the neighbor weight;

[0129]

[0130] In the formula, d ij The pipe network topological distance between the terminal i and the terminal j is represented; gamma=0.5 represents the distance attenuation coefficient; The neighbor set of the terminal (pipe section) j is represented; e represents the base number of the natural logarithm;

[0131] Iterative consensus optimization: in each iteration, the terminal updates the dosing amount according to the current dose and the neighbor information of the terminal, and adjusts the value according to the loss function gradient, so as to gradually tend to the optimized dosing amount;

[0132] The update formula of the updated dosing amount is as follows:

[0133]

[0134] where: denotes the dosage of terminal i in the t-th iteration; a denotes the historical measurement retention weight; w ij denotes the neighbor weight; η denotes the gradient step size; denotes the gradient of the loss function with respect to D i ; denotes the loss function; D i denotes the dosage of the i-th terminal in the current iteration;

[0135]

[0136] where: D i denotes the dosage of the i-th terminal in the current iteration; denotes the reference dosage of the i-th terminal, which is a local average calculated based on the dosages of the neighbor terminals and the initial value; D j denotes the dosage of the j-th terminal in the current iteration; (i,j) e e denotes that there is a direct connection between terminal i and terminal j, and e denotes the set of all adjacent terminal pairs;

[0137]

[0138] where: denotes the initialized dosage of terminal i; denotes the initialized dosage of terminal j;

[0139] Discretization and instruction generation: the discretized dosage is generated based on iterative optimization; for example, we set the stop condition as follows:

[0140] the maximum number of iterations is 10, and the early termination condition is: when the iteration is terminated; in each iteration, the terminal updates the dosage according to its current dosage and neighbor information, and adjusts the value according to the gradient of the loss function, gradually tending to the optimized dosage; and the dosage output by the iteration is discretized, and the dosage less than 0.1 is considered as invalid medication and set to 0, and other dosages are discretized to two decimal places.

[0141] In this embodiment, the consensus decision reached through PBFT (Byzantine Fault Tolerance Protocol) can ensure that all dosing terminals can still reach a consistent dosing decision stably when facing possible network failures or node failures; the fault tolerance capability of the PBFT protocol ensures that the system can still reliably perform dosing operations when some terminals fail, thereby improving the robustness and stability of the system; the Gossip protocol is used for information dissemination, so that each dosing terminal can gradually reach a consensus based on local data and the data of neighbor terminals; this distributed information dissemination and decision mechanism can effectively avoid single-point failures and optimize the dosing amount of each terminal through multiple iterations, so that the overall dosing decision is more reasonable and accurate. The updating process of the dosing amount is based on local sensor data and combined with the information of neighbor terminals, and gradually tends to the globally optimal dosing amount configuration through iterative optimization; this dynamic adjustment capability can quickly adapt to changes in water quality, economic cost, time interval and other factors in the pipe network environment, and adjust the dosing strategy of the medicament in real time, thereby improving the flexibility and response capability of the system.

[0142] Step 5: According to the flow rate distribution of the pipe network and the target medicament injection amount, the propagation time lag of the medicament is calculated, a time-space compensation model is established using the lead control algorithm, the injection amount of the medicament is predicted and adjusted, and a dosing strategy based on fluid dynamics and time lag compensation is obtained.

[0143] Referring to Figure 2 As shown in the figure, as one possible implementation of the present embodiment, the step 5 includes the following steps:

[0144] Medicament transmission period calculation: based on the length of the pipe section, the flow rate of the pipe section at time t, and the inherent delay compensation of the pipe section, the medicament transmission period is calculated;

[0145]

[0146] In the formula: L i represents the length of pipe section i; v i (t) represents the flow rate of pipe section i at time t; represents the inherent delay compensation term of pipe section i,

[0147] If the flow rate v i (t) is less than 0.1 m / s, set T i (t) = T max = 3600 s to prevent division by zero error and avoid unstable calculation in low flow rate conditions;

[0148] By calculating the drug transmission period, the system can consider the time lag effect caused by the length of the pipe section and the flow rate difference, and the delay compensation term approximates the delivery inertia according to the physical length, improving the physical credibility of the model; combined with the propagation time lag, the advance control can adjust the drug delivery in advance before the downstream water quality deteriorates, and realize the space-time alignment of the drug effect in space.

[0149] Dynamic phase compensation: based on the calculated drug transmission period, a dynamic phase compensation term is introduced, which changes according to time t to correct the phase and compensate for the deviation of drug transmission caused by changes in flow rate;

[0150]

[0151] Wherein: T trend 86400s is a 24-hour cycle, representing the cycle of diurnal flow rate changes; φ i (t) represents the phase of pipe section i at time t; Δφ i (t) represents the phase correction term;

[0152] In this embodiment, the introduction of the phase function can model and compensate for the diurnal rhythm of flow rate changes, improve the stability of long-term operation of the system, and effectively reduce the advance or lag of drug delivery caused by flow rate or fluctuation, improve the timeliness and accuracy of drug addition.

[0153] Dynamic modulation and drug adjustment: based on the deviation of pipe section flow rate and historical flow rate, the non-linear mapping of flow rate and metering is realized through the tanh function, and the pulsatile gain coefficient is obtained;

[0154]

[0155] In the formula: v avg is the average value of the historical flow rate; v std represents the standard deviation of flow rate; G i (t) represents the global decay factor; represents the set of adjacent dosing pipe sections with a spatial distance less than or equal to 100 meters from pipe section i; x i , x j respectively represent the spatial coordinates of pipe section i and pipe section j; R represents the action radius; ||x i -x j || represents the spatial distance between pipe sections i and j;

[0156] In the embodiment, pulsating gain modulation is introduced to improve the timing adjustment capability of the dosing system, so that it can adjust the dosage according to the phase, so that the dosing behavior has a slight periodic fine-tuning effect, and flexible control rather than hard switching can be realized; avoid the "full on / full off" dosing behavior, and ensure that the pipe network drug concentration is more stable and continuous. Considering the spatial distance and neighborhood effect, a spatial drug coordination adjustment mechanism is formed; reduce the risk of repeated dosing of multiple dosing terminals, high local drug concentration, etc., and improve the overall network drug utilization rate and uniformity.

[0157] Based on the obtained pulsating gain coefficient and dynamic phase, the pulsating modulated drug metering is calculated; based on the set boundary constraint, the drug metering not between the boundary constraints is constrained within the boundary to obtain the final drug metering; that is, the dose upper limit protection, if the pulsating modulated drug amount exceeds 1.5 times of the original dosing amount, it is forced to be limited to the maximum drug amount, to prevent excessive adjustment; if the pulsating modulated drug amount is negative, it is forced to be set to zero.

[0158] The above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for environmental sensing and multi-point water quality optimization dosing in a heating system, characterized in that, Includes the following steps: Step 1: Collect water quality data based on multiple sensor nodes and send the collected water quality data to the central processing system; Step 2: Map the collected water quality data to an 8-dimensional quantum state space, and use quantum Fourier transform to extract the periodic features of the water quality parameters. Then, based on the constructed quantum optimization model, use the quantum annealing algorithm to solve the dosing decision problem and obtain the dosing combination strategy. Step 2 includes the following steps: Water quality data preprocessing: Normalize the water quality data and map it to the [0,1] interval; Mapping to quantum state space: Mapping the normalized water quality data to quantum state space, that is, encoding the water quality data into a superposition of qubits; Extracting periodic features: Based on the superposition state of qubits, the quantum Fourier transform is used to transform the superposition state of qubits into frequency domain quantum states, and the periodic features are extracted and encoded into the phase information of the qubits; Constructing a QUBO model: A QUBO model is constructed based on the influence of reagent cost, scaling risk, and periodic characteristics to represent the dosing decision problem. The objective is to minimize reagent cost and scaling risk, where the objective function is defined as follows: H=∑ i (C i ·q i )+∑ i,j (R ij ·q i ·q j )+∑ i (P i ·q i ); In the formula: C i q represents the unit cost of drug i; i q represents the decision variable for whether drug i is used. i =1 indicates the use of the medicine, q i =0 indicates that no medicine is used; R ij Indicates the scaling risk coefficient between reagent i and reagent j; q i ·q j q represents the decision variable for whether two drugs should be used simultaneously; if both are used, then... i ·q j =1, otherwise 0; P i The coefficient representing the influence of periodic characteristics on agent i; The QUBO model is transformed into a quantum computing problem, resulting in a solution form obtained by the quantum annealing algorithm. Quantum annealing optimizes the dosing strategy: The quantum bits are initialized by a quantum computer to construct the Hamiltonian of the objective function, and the optimization process is simulated by the annealing process of quantum mechanics; the state of the quantum bits is gradually changed by the quantum computer, and the optimization strategy is gradually converged to the minimum energy state based on quantum superposition and interference effects. Step 3: Collect the characteristics of the reagents and the pipeline parameters, and combine them with water quality data and reagent combination strategies. Use tensor decomposition technology to reduce the dimensionality of the data and integrate it to obtain the reagent compatibility matrix. Step 3 includes the following steps: Constructing a four-dimensional parameter tensor based on drug combination strategy In the formula: Indicates chemical adaptability score; Indicates the time validity score; Indicates spatial harmony score; These represent economic indicators; α, β, γ, and δ represent weighting coefficients. Among them, chemical adaptability score Based on the following formula: Where: pH i Indicates the optimal applicable pH value for reagent i; pH opt This represents the current pH value of the water; e represents the base of the natural logarithm; normalization is performed using the Sigmoid function, and the value range is between [0,1]. The time effectiveness score is obtained based on the following formula: In the formula: This represents the half-life of drug j; T is the heating cycle. Spatial harmony score is obtained based on the following formula: In the formula: x k The coordinates of the pipeline area k are represented by x. w The coordinates of the pollution source are represented; σ = 50m is the standard deviation, used to adjust for the influence of spatial distance. The economic performance score is obtained based on the following formula: In the formula: C l Indicates the unit price for cost level l; C max and C min These are the system's preset maximum and minimum costs, respectively. Tensor decomposition: Tensor decomposition based on the constructed four-dimensional parametric tensor: In the formula: λ r The eigenvalue weights represent the contribution of each component. This represents the L2-normalized chemical fitness basis vector; Represents the time-efficiency basis vectors based on L2 normalization; d represents the spatially consistent basis vectors after L2 normalization; r This represents the L2-normalized basis vector of economic indicators. The basis vectors are optimized using alternating least squares, with the objective function as follows: The iteration is performed based on the objective function until a preset stopping condition is met. Matching matrix generation: In the formula: k represents the time dimension index; l represents the economic dimension index; This represents the components of the time basis vector in time interval k; This represents the component of the economic basis vector at cost level l; Step 4: Each dosing terminal calculates the local dosing amount based on its own sensor data and transmits the local dosing information to surrounding dosing terminals via the Gossip protocol. All terminals reach a consensus on the dosing decision through the PBFT protocol. During the process of reaching the dosing decision, a compatibility matrix guides the dosing decision of each terminal. Step 4 includes the following steps: Local metering initialization: Each dosing terminal extracts the corresponding ratio weight from the compatibility matrix based on the current time and economic cost level, and then combines it with the decision vector to initialize the dosing amount of each terminal; Information diffusion and weight allocation: Based on the network topology and distance attenuation coefficient, each terminal calculates its weight with neighboring terminals to obtain the neighbor weight; Iterative consensus optimization: In each iteration, the terminal updates the dosage based on its current dose and the information of its neighbors, and adjusts the value according to the gradient of the loss function, gradually approaching the optimized dosage; Discretization and instruction generation: Generating discretized dosage based on iterative optimization; Step 5: Based on the flow velocity distribution of the pipeline network and the target amount of agent injected, calculate the propagation time delay of the agent, use the advance control algorithm to establish a spatiotemporal compensation model, predict and adjust the amount of agent injected, and obtain a dosing strategy based on fluid dynamics and time delay compensation. Step 5 includes the following steps: Calculation of the chemical transport cycle: The chemical transport cycle is calculated based on the pipe segment length, the flow velocity of the pipe segment at time t, and the inherent delay compensation of the pipe segment. Dynamic phase compensation: Based on the calculated drug delivery cycle, a dynamic phase compensation term is introduced to correct the phase according to the change of time t, and to compensate for the drug propagation deviation caused by the change of flow rate; Dynamic modulation and reagent adjustment: Based on the deviation between the pipe section flow velocity and the historical flow velocity, the nonlinear mapping between flow velocity and metering is realized through the tanh function to obtain the pulsating gain coefficient; The drug dosage after pulsation modulation is calculated based on the obtained pulsation gain coefficient and dynamic phase; the drug dosage that is not within the boundary constraints is constrained to the boundary based on the set boundary constraints to obtain the final drug dosage.

2. The method for environmental sensing and multi-point water quality optimization dosing in a heating system according to claim 1, characterized in that, In step 1, each sensor simulates the characteristics of a biological cell and adjusts the data sampling frequency according to the dynamic characteristics of environmental changes to adapt to the dynamic changes in different water quality environments. When the environmental data changes, the sampling frequency of the corresponding sensor node increases; when the environmental data changes are stable, the sampling frequency decreases.

3. The method for environmental sensing and multi-point water quality optimization dosing in a heating system according to claim 1, characterized in that, In step 1, when the data difference between three adjacent nodes exceeds a threshold, the system triggers the antibody generation algorithm for calibration. The antibody generation algorithm dynamically adjusts the sensor parameters or switches to a backup sensor through a machine learning model or a rule-based calibration mechanism.

4. The method for environmental sensing and multi-point water quality optimization dosing in a heating system according to claim 1, characterized in that, The formula for updating the dosage is as follows: In the formula: The dose of medication administered to terminal i in the t-th iteration represents the dosage; α represents the historical measurement retention weight; w ij Indicates the neighbor weights; η represents the gradient step size; The loss function represents the relationship between D and D. i The gradient; D represents the loss function; i This represents the dosage of the drug administered to the i-th terminal in the current iteration; In the formula: D i This represents the dosage of the i-th terminal in the current iteration; D represents the reference dosage for the i-th terminal, calculated as a local average based on the dosages of neighboring terminals and the initial value; j This represents the amount of medication administered to the j-th terminal in the current iteration; (i,j)∈ε indicates that there is a direct connection between terminal i and terminal j, and ε represents the set of all adjacent terminal pairs.

Citation Information

Patent Citations

  • Intelligent monitoring control system and method for water quality of heat supply pipe network

    CN115579072A

  • Remote monitoring operation and maintenance system and method for water treatment equipment

    CN119629211A