Chemical adding method for environment perception and multi-point water quality optimization of heat supply system

Through real-time perception of multi-point water quality sensors and quantum optimization algorithm combined with tensor decomposition technology, a distributed dosing control system is built, which solves the problems of local water quality changes and global control in the heating system, and achieves efficient and stable water quality control.

CN120355530AActive Publication Date: 2025-07-22CHENGDU SHU CARBON TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

It is difficult for existing heating systems to take into account local water quality changes and global optimal control in large-scale distributed networks. Centralized drug-dosing control methods are susceptible to single point failures and are difficult to adapt to complex spatial and temporal heterogeneity of water quality.

Method used

The multi-point water quality sensor is used to perceive data in real time, and water quality characteristics are extracted through quantum state spatial mapping and quantum Fourier transform. The dosing strategy is solved with the quantum annealing algorithm, and the drug characteristics are integrated using tensor decomposition technology to construct the drug compatibility matrix, and the dosage amount is calculated through the distributed dosing terminal. The drug injection time lag is corrected with the advance control algorithm to achieve dynamic prediction and precise control.

Benefits of technology

It improves the efficiency and stability of water quality control in the heating system, achieves local adaptability, global coordination and dynamic responsiveness, and enhances the distributed coordination capabilities and robustness of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355530A_ABST
    Figure CN120355530A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of heat supply systems, and relates to a heat supply system environment perception and multi-point water quality optimization dosing method, which comprises the following steps: realizing real-time perception and uploading of water quality data through a plurality of sensor nodes, then extracting deep periodic characteristics of the water quality data by adopting quantum state space mapping and quantum Fourier transform, and finally, performing multi-point water quality optimization on the deep periodic characteristics. A global optimal agent combination strategy is solved in a constructed quantum optimization model in combination with a quantum annealing algorithm, agent characteristics and pipe network parameters are integrated by using a tensor decomposition technology, an agent compatibility matrix is constructed, each agent adding terminal calculates the agent adding amount based on local sensing, the agent adding decision consistency is ensured through a PBFT consensus mechanism, and the agent adding efficiency is improved. And finally, in combination with the flow velocity distribution characteristics of the pipe network, the agent injection time lag is corrected by using an advanced control algorithm, and dynamic prediction and accurate control are realized, so that breakthrough of the distributed agent adding control system in the aspects of local adaptability, global coordination and dynamic responsiveness is realized, and the efficiency and stability of water quality regulation and control of the heat supply system are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of heating systems. More specifically, it relates to a method for environmental perception and multi-point water quality optimization dosing in a heating system. Background Technique

[0002] With the continuous expansion of the scale of urban heating systems, the structure of centralized heating networks has become increasingly complex, water quality fluctuates frequently, and chemical dosing, as a key means to maintain stable system water quality and improve operating efficiency, has received extensive attention. In traditional heating systems, dosing strategies are usually based on data collected by single-point or a small number of water quality sensors, and preset fixed rules or linear models are used for decision-making. This approach 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 responses in large-scale distributed heating networks, its effectiveness and adaptability are significantly reduced.

[0003] Current mainstream technologies mostly adopt centralized dosing control methods, that is, after the central control system analyzes data from multiple monitoring points, global chemical dosing decisions are made. Such methods have certain advantages in dealing with complexity and global optimal control, but there are obvious limitations as follows: the centralized architecture is highly dependent on communication links and central nodes and is vulnerable to single-point failures; and the water quality of each pipe section has spatio-temporal heterogeneity, and it is difficult for centralized strategies to take into account local changes. Summary of the Invention

[0004] The present invention provides a method for environmental perception and multi-point water quality optimization dosing in a heating system, which solves the technical problem that it is difficult for the prior art to take into account local changes.

[0005] A method for environmental perception and multi-point water quality optimization dosing in a heating system includes the following steps:

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

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

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

[0009] Step 4: Each drug dosing terminal calculates the local drug dosage according to its own sensor data, and spreads the local drug dosage to the surrounding drug dosing terminals through the Gossip protocol. All terminals reach a consistent drug dosing decision through the PBFT protocol. During the process of reaching the drug dosing decision, the drug dosing decision of each terminal is guided by the compatibility matrix;

[0010] Step 5: Calculate the propagation time delay of the drug according to the flow velocity distribution of the pipe network and the target drug injection amount, establish a spatio-temporal compensation model by using the lead control algorithm, predict and adjust the drug injection amount, and obtain a drug dosing strategy based on hydrodynamics and time delay compensation.

[0011] The present invention realizes the real-time perception and upload of water quality data through multiple sensor nodes, comprehensively reflecting the water quality state in the heating system; then adopts quantum state space mapping and quantum Fourier transform to extract the deep periodic characteristics of water quality data, combines the quantum annealing algorithm to solve the global optimal drug combination strategy in the constructed quantum optimization model, and improves the intelligent level and global coordination ability of drug dosing decisions; further, uses tensor decomposition technology to integrate drug characteristics and pipe network parameters, constructs a drug compatibility matrix, and provides quantitative guidance for local drug dosing; at the execution level, each drug dosing terminal calculates the drug dosage based on local perception, realizes information diffusion through the Gossip protocol, and ensures the consistency of drug dosing decisions through the PBFT consensus mechanism, improving the distributed cooperation ability of the system; finally, combines the flow velocity distribution characteristics of the pipe network, establishes a spatio-temporal compensation model, and uses the lead control algorithm to correct the drug injection time delay to achieve dynamic prediction and precise control; therefore, the present invention realizes a breakthrough in the local adaptability, global coordination and dynamic responsiveness of the distributed drug dosing control system, and significantly improves the efficiency and stability of water quality regulation in the heating system.

[0012] Preferably, in step 1, each sensor simulates the characteristics of biological cells, adjusts the data sampling frequency according to the dynamic characteristics of environmental changes, adapts to the dynamic changes under different water quality environments. When the environmental data changes increase, the sensor nodes in the corresponding area increase the sampling frequency; 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, the system triggers the antibody generation algorithm for calibration. The antibody generation algorithm dynamically adjusts the parameters of the sensor or switches to a backup sensor through a machine learning model or a rule-based calibration mechanism.

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

[0015] Water quality data preprocessing: Perform normalization processing on the water quality data and map it to the interval [0, 1];

[0016] Mapping to the quantum state space: Map the normalized water quality data to the quantum state space, that is, encode the water quality data into the superposition state of qubits;

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

[0018] Constructing the QUBO model: Based on the chemical cost, scaling risk, and the influence of periodic features, construct the QUBO model to represent the chemical dosing decision problem, with the goal of minimizing the chemical cost and structural risk. 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 chemical i; q i represents the decision variable of whether to use chemical i. q i = 1 means using the chemical, and q i = 0 means not using the chemical; R ij represents the scaling risk coefficient between chemical i and chemical j; q i ·q j represents the decision variable of whether two chemicals are used simultaneously. If both are used, then q i ·q j = 1, otherwise it is 0; P i represents the coefficient of the influence of chemical i by periodic features;

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

[0022] Optimizing the chemical dosing strategy by quantum annealing: Initialize the qubits through a 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 through the quantum computer, and gradually converge to the minimum energy state according to the quantum superposition and interference effects, that is, the optimized chemical combination strategy.

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

[0024] Construct a four-dimensional parameter tensor based on the chemical combination strategy

[0025]

[0026] Wherein: represents the chemical adaptability score; represents the time effectiveness score; represents the space coordination score; represents the economic index; α, β, γ, δ represent the weight coefficients;

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

[0028]

[0029] Wherein: λ r represents the eigenvalue weight, indicating the contribution of each component; represents the L2-normalized chemical adaptability basis vector; represents the L2-normalized time effectiveness basis vector; represents the L2-normalized space coordination basis vector; d r represents the L2-normalized economic index basis vector;

[0030] Use the alternating least squares method to optimize each basis vector, and the objective function is as follows:

[0031]

[0032] Based on the objective function, iterative optimization is carried out until the preset stop condition is reached and then the iteration stops;

[0033] Compatibility matrix generation:

[0034]

[0035] Wherein: k represents the time dimension index; 1 represents the economic dimension index; represents the component of the time basis vector in the time interval k; represents the component of the economic basis vector at the cost level 1.

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

[0037] Local metering initialization: Each dosing terminal extracts the corresponding proportioning weight from the compatibility 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 allocation: Based on the pipe network topology structure and the distance attenuation coefficient, each terminal calculates the weight between it and the adjacent terminals to obtain the neighbor weight;

[0039] Iterative Consensus Optimization: In each iteration, the terminal updates the drug dosage based on its current dosage and the information of its neighbors, and adjusts the value according to the gradient of the loss function, gradually approaching the optimized drug dosage;

[0040] Discretization and Instruction Generation: Generate the discretized drug dosage based on iterative optimization.

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

[0042]

[0043] Where: represents the drug dosage of terminal i in the t-th iteration; α represents the historical dosage retention weight; w ij represents the neighbor weight; η represents the gradient step size; represents the gradient of the loss function with respect to D i ; represents the loss function; D i represents the drug dosage of the i-th terminal in the current iteration;

[0044]

[0045] Where: D i represents the drug dosage of the i-th terminal in the current iteration; represents the reference drug dosage of the i-th terminal, which is the local average calculated based on the drug dosages of neighbor terminals and the initial value; D j represents the drug dosage of 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.

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

[0047] Drug Transmission Cycle Calculation: Calculate the drug transmission cycle based on the pipe section length, the flow velocity of the pipe section at time t, and the inherent delay compensation of the pipe section;

[0048] Dynamic Phase Compensation: Based on the calculated drug transmission cycle, introduce a dynamic phase compensation term, perform phase correction according to the change of time t, and compensate for the drug propagation deviation caused by the change of flow velocity;

[0049] Dynamic Modulation and Drug Adjustment: Based on the deviation between the flow velocity of the pipe section and the historical flow velocity, realize the non-linear mapping between the flow velocity and the dosage through the tanh function to obtain the pulsation gain coefficient;

[0050] Based on the obtained pulsation gain coefficient and the dynamic phase, calculate the pulsation-modulated drug dosage; constrain the drug dosage outside the boundary constraints to within the boundary based on the set boundary constraints to obtain the final drug dosage.

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

[0052] The present invention realizes the real-time perception and upload of water quality data through multiple sensor nodes, comprehensively reflecting the water quality status in the heating system; then adopts quantum state space mapping and quantum Fourier transform to extract the deep periodic characteristics of water quality data, combines the quantum annealing algorithm to solve the global optimal chemical agent combination strategy in the constructed quantum optimization model, improving the intelligent level and global coordination ability of the chemical dosing decision-making; further, uses tensor decomposition technology to integrate chemical agent characteristics and pipe network parameters, constructs a chemical agent compatibility matrix, and provides quantitative guidance for local chemical dosing; at the execution level, each chemical dosing terminal calculates the chemical dosing amount based on local perception, realizes information diffusion through the Gossip protocol, and ensures the consistency of chemical dosing decisions through the PBFT consensus mechanism, improving the distributed cooperation ability of the system; finally, combines the flow velocity distribution characteristics of the pipe network, establishes a spatio-temporal compensation model, and uses an anticipatory control algorithm to correct the time delay of chemical agent injection, realizing dynamic prediction and precise control; therefore, the present invention achieves a breakthrough in the local adaptability, global coordination and dynamic responsiveness of the distributed chemical dosing control system, significantly improving the efficiency and stability of water quality regulation in the heating system. Description of the 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 required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0054] Figure 1 It is the overall step block diagram provided by the embodiment of the present invention.

[0055] Figure 2 It is the specific step block diagram of step 5 provided by the embodiment of the present invention. Detailed Embodiment

[0056] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application clearer, the following further details the present application in conjunction 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] See Figure 1 As shown, a method for heating system environment perception and multi-point water quality optimized chemical dosing includes the following steps:

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

[0059] As a possible implementation of this embodiment, in step 1, each sensor simulates the characteristics of biological cells and adjusts the data sampling frequency according to the dynamic characteristics of environmental changes (adaptive within 1 - 15 minutes) to adapt to the dynamic changes in different water quality environments. When the environmental data changes increase, the sensor nodes in the corresponding area increase the sampling frequency; when the environmental data changes stably, the sampling frequency is reduced. Exemplarily, assuming that 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 moment;

[0062] Among them, the water quality data includes, for example, pH, hardness, temperature, Ca 2+ / Mg 2+ concentration, etc. These data are collected by a sensor array (including different types of sensors, such as pH sensors, temperature sensors, chemical composition sensors, etc.).

[0063] As a possible implementation of this embodiment, in step 1, when the data difference of three adjacent nodes exceeds the threshold, the system triggers the antibody generation algorithm for more accuracy. Among them, the antibody generation algorithm is to dynamically adjust the parameters of the sensor or switch to a standby sensor through a machine learning model or a rule - based calibration mechanism. Exemplarily, as follows:

[0064] Assume that there are three adjacent sensor nodes S1, S2, and S3, and their data are D1, D2, and D3 respectively. If the deviation exceeds 30%, then:

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

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

[0067] Exemplarily, the antibody generation algorithm is as follows: when abnormal data is detected, assuming that the data D of adjacent sensors i deviates more than 30% from the average value μ, then the antibody generation algorithm is triggered:

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

[0069] where δ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·δD i ;

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

[0073] In this embodiment of the core, through the bionic dynamic perception protocol combined with the overall immune mechanism, a system that can adaptively adjust the sampling frequency, correct abnormal data and ensure data accuracy is constructed, enabling the simulation of the behavior of biological groups, sensor adaptive adjustment, anomaly detection and sensor calibration, ensuring the accuracy and timeliness of the data collected from the environment, and providing reliable basic data for the subsequent stage.

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

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

[0076] Water quality data preprocessing: Normalize the water quality data and map it to the interval [0, 1];

[0077] Mapping to the quantum state space: Map the normalized water quality data to the quantum state space, that is, encode the water quality data as a superposition state of quantum bits. Assume the water quality data X norm = [x1, x2,..., x n , and the superposition state of quantum bits is expressed as:

[0078]

[0079] where: |i) represents the state of the quantum bit; α i represents the superposition coefficient of the quantum state;

[0080] Extracting periodic characteristics: Based on the superposition state of quantum bits, perform a transformation using the quantum Fourier transform, so that the superposition state of quantum bits is transformed into a frequency-domain quantum state, and the periodic characteristics are extracted and encoded into the phase information of the quantum bits;

[0081] Constructing the QUBO model: Based on the chemical agent cost, scaling risk, and periodic characteristic impact, construct a QUBO model to represent the chemical agent dosing decision problem. The goal is to minimize the chemical agent cost and scaling risk, and 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] Where: C i represents the unit cost of chemical agent i; q i represents the decision variable of whether to use chemical agent i. q i = 1 indicates using the chemical agent, and q i = 0 indicates not using the chemical agent; R ij represents the scaling risk coefficient between chemical agent i and chemical agent j; q i ·q j represents the decision variable of whether to use two chemical agents simultaneously. If both are used, then q i ·q j = 1, otherwise it is 0; P i represents the coefficient of the impact of periodic characteristics on chemical agent i;

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

[0085] Quantum annealing to optimize the chemical agent dosing strategy: Initialize qubits through a 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 qubits through the quantum computer, and gradually converge to the minimum energy state according to the quantum superposition and interference effects, that is, the optimized chemical agent combination strategy.

[0086] In this embodiment, the periodic characteristics are extracted through quantum Fourier transform and considered as an additional term when constructing the QUBO model to ensure that the dynamic fluctuations of water quality can be addressed during the chemical dosing process. Through the quantum annealing optimization algorithm, we can obtain the optimal dosing strategy on the basis of global optimization to ensure the stability of water quality and the efficient use of chemicals. Secondly, in this embodiment, by constructing a quantum unconstrained quadratic optimization model (QUBO), the chemical selection, scaling risk, and the impact of periodic perturbations 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, the defect that traditional optimization algorithms are prone to falling into local optima can be avoided, and the global optimal solution of the dosing strategy can be achieved. This optimization ability is particularly significant in scenarios where multiple chemicals are used in combination and there are complex interactions of mutual inhibition or enhancement effects.

[0087] Step 3: Collect chemical characteristics and pipe network parameters, and combine the water quality data and chemical combination strategy. Use tensor decomposition technology to reduce the dimension and integrate the data to obtain the compatibility matrix of the chemicals.

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

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

[0090] Define the four-dimensional tensor in the following form: It contains the scoring information of four dimensions: chemical adaptability, time effectiveness, spatial coordination, and economy.

[0091] Exemplarily, for chemical adaptability: dimension 1 represents the type of chemical, with a total of 256 chemicals;

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

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

[0094] For the economic index: dimension 4 represents the economic cost, with a total of 256 levels;

[0095] Construct a four-dimensional parameter tensor based on the chemical combination strategy

[0096]

[0097] In the formula: Represents the chemical adaptability score; Represents the time effectiveness score; Represents the spatial coordination score; Represents the economic index; α, β, γ, δ represent the weight coefficients. Exemplarily, α = 0.4, β = 0.3, γ = 0.2, δ = 0.1;

[0098] Among them, 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 chemical agent i; pH opt Represents the pH value of the current water quality; e represents the base of the natural logarithm; The Sigmoid function is used for normalization, and the value range is between [0, 1];

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

[0102]

[0103] In the formula: Represents the half-life of chemical agent j; T = 24h is the heating cycle; If the half-life of the chemical agent is greater than the heating cycle, it means that the time effectiveness of the chemical agent is strong, and the amplitude is 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 coordinate of pipe network area k; x w Represents the coordinate of the pollution source; σ = 50m is the standard deviation, used to adjust the influence of the spatial distance;

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

[0108]

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

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

[0111]

[0112] In the formula: λr Indicates the eigenvalue weight, representing the contribution of each component; Indicates the chemically adaptable basis vector after L2 normalization; Indicates the time effectiveness basis vector based on L2 normalization; Indicates the space coordination basis vector after L2 normalization; d r Indicates the economic index basis vector after L2 normalization;

[0113] Use the alternating least squares method to optimize each basis vector, where the objective function is as follows:

[0114]

[0115] Based on the objective function, perform iterative optimization until the preset stop condition is reached and then stop the iteration;

[0116] Compatibility matrix generation:

[0117]

[0118] In the formula: k represents the time dimension index; l represents the economic dimension index; Represents the component of the time basis vector in the time interval k, where Represents the component of the economic basis vector in the cost level 1,

[0119] Normalization processing: Normalize by row:

[0120] According to the decision vector q * Perform screening. If the pipe section i is not dosed, the corresponding row of M k(i) Is set to zero;

[0121] Based on this, the output compatibility matrix is represented as Where the row index represents 50 time intervals (each row corresponds to a five-minute window), and the column index represents 50 cost levels (each column corresponds to a cost interval); the matrix element value represents the dosing ratio weight, satisfying the normalization condition:

[0122] In this embodiment, the original 256 is decomposed by CP 4The number of parameters is compressed to 32×(4×256)+32 = 32,832 parameters, greatly reducing the computational complexity; and the compatibility matrix is recalculated every five minutes to dynamically adapt to water quality changes; the potential correlation patterns in the time and economic dimensions are provided through the basis vectors, which helps to explain the dosing ratio decisions; therefore, the present invention uses the decomposition technology of the four-dimensional parameter tensor, which can not only compress the data volume, but also update the compatibility matrix in real time on the premise of ensuring the calculation accuracy, and has high interpretability and performance.

[0123] Step 4: Each dosing terminal calculates the local dosing amount according to its own sensor data, and spreads the local dosing amount to the surrounding dosing terminals through the Gossip protocol. All terminals reach a consistent dosing decision through the PBFT protocol. During the process of reaching the dosing decision, the dosing decision of each terminal is guided by the compatibility matrix;

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

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

[0126]

[0127] In the formula: represents the initial dosing amount of the pipe section (dosing terminal) i; l(i) represents the economic level index of the pipe section i; k represents the current time interval index; represents the decision vector;

[0128] Information diffusion and weight allocation: Based on the pipe network topology structure and the distance attenuation coefficient, each terminal calculates the weight between it and the adjacent terminals to obtain the neighbor weights;

[0129]

[0130] In the formula: d ij represents the pipe network topology distance between terminal i and terminal j; γ = 0.5 represents the distance attenuation coefficient; represents the neighbor set of terminal (pipe section) j; e represents the base of the natural logarithm;

[0131] Iterative consensus optimization: In each iteration, the terminal updates the dosing amount according to its own current dose and the information of the neighbors, and adjusts the value according to the gradient of the loss function, gradually approaching the optimized dosing amount;

[0132] The update formula for updating the dosing amount is as follows:

[0133]

[0134] In the formula: represents the dosing amount of terminal i in the t-th iteration; α represents the historical measurement retention weight; w ij represents the neighbor weight; η represents the gradient step size; represents the gradient of the loss function with respect to D i ; represents the loss function; D i represents the dosing amount of the i-th terminal in the current iteration;

[0135]

[0136] In the formula: D i represents the dosing amount of the i-th terminal in the current iteration; represents the reference dosing amount of the i-th terminal, which is the local average calculated based on the dosing amounts of neighbor terminals and the initial value; D j represents the dosing amount of 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;

[0137]

[0138] In the formula: represents the initial dosing amount of terminal i; represents the initial dosing amount of terminal j;

[0139] Discretization and instruction generation: Generate the discretized dosing amount based on iterative optimization; for example, the stopping conditions we set are as follows:

[0140] The maximum number of iterations is 10 times, and the early termination condition: when the iteration is terminated; in each iteration, the terminal updates the dosing amount according to its own current dose and the information of neighbors, and adjusts the value according to the gradient of the loss function, gradually approaching the optimized dosing amount; and discretize the doses output by the iteration. The dosing amount less than 0.1 is regarded as invalid dosing and set to 0, and other doses are discretized to two decimal places.

[0141] In this embodiment, the dosing decision reached through PBFT (Practical Byzantine Fault Tolerance protocol) can ensure that all dosing terminals can still stably reach a consistent dosing decision in the face of possible network failures or node failures; the fault tolerance ability of the PBFT protocol ensures that the system can still reliably execute the dosing operation when some terminals fail, thus improving the robustness and stability of the system; the Gossip protocol is used for information dissemination, enabling each dosing terminal to gradually reach a consensus based on local data and the data of neighboring terminals; this distributed information dissemination and decision-making mechanism can effectively avoid single-point failures and optimize the dosing amount of each terminal through multiple iterations, making the overall dosing decision more reasonable and accurate. The update process of the dosing amount is based on local sensor data and combines the information of neighboring terminals, and gradually tends to the globally optimal dosing amount configuration through iterative optimization; this dynamic adjustment ability can quickly adapt to changes in factors such as water quality, economic cost, and time interval in the pipe network environment, and adjust the dosing strategy of the chemical agent in real time, improving the flexibility and response ability of the system.

[0142] Step 5: According to the flow velocity distribution of the pipe network and the target chemical agent injection amount, calculate the propagation time delay of the chemical agent, use the lead control algorithm to establish a spatio-temporal compensation model, predict and adjust the injection amount of the chemical agent, and obtain a dosing strategy based on fluid dynamics and time delay compensation.

[0143] See Figure 2 As shown, as a possible implementation manner of this embodiment, step 5 includes the following steps:

[0144] Calculation of the chemical agent transmission period: Based on the pipe section length, the flow velocity of the pipe section at time t, and the inherent delay compensation of the pipe section, calculate the chemical agent transmission period;

[0145]

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

[0147] If the flow velocity v i (t) is less than 0.1 m / s, then set T i (t) = T max = 3600 s to prevent division-by-zero errors and avoid calculation instability in the case of low flow velocities;

[0148] By calculating the chemical agent transmission period, the system can take into account the time lag effect caused by the differences in pipe section length and flow velocity, and the delay compensation term approximately models the transportation inertia according to the physical length, improving the physical credibility of the model; combined with the propagation time delay for lead control, it can adjust the chemical agent dosing in advance before the water quality deteriorates downstream, achieving the spatio-temporal alignment of the drug effect in space.

[0149] Dynamic phase compensation: Based on the calculated chemical agent 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 chemical agent propagation deviation caused by the change of flow velocity;

[0150]

[0151] Where: T trend = 86400 s is the 24-hour period, representing the period of the flow velocity change between day and night; φ i (t) represents the phase of pipe section i at time t; Δφ i (t) represents the phase correction term;

[0152] In this embodiment, by introducing a phase function, the flow velocity change of the circadian rhythm can be modeled and compensated, improving the stability of the system during long-term operation. The phase error compensation effectively reduces the advance or lag of the chemical agent transportation caused by the flow velocity or fluctuation, improving the timeliness and accuracy of chemical agent dosing.

[0153] Dynamic modulation and chemical agent adjustment: Based on the deviation between the pipe section flow velocity and the historical flow velocity, the non-linear mapping between the flow velocity and the metering is realized through the tanh function to obtain the pulsating gain coefficient;

[0154]

[0155] In the formula: v avg is the average value of the historical flow velocity; v std represents the standard deviation of the flow velocity; G i (t) represents the global attenuation factor; represents the set of adjacent chemical agent dosing pipe sections whose spatial distance from pipe section i is less than or equal to 100 meters; 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 section i and j;

[0156] In this embodiment, pulsating gain modulation is introduced to improve the timing adjustment ability of the drug dosing system, enabling it to adjust the drug dosage according to the phase, resulting in a slight periodic fine-tuning effect for the drug dosing behavior, achieving flexible control rather than hard switching; avoiding the "fully open / fully closed" drug dosing behavior, ensuring a more stable and continuous drug concentration in the pipe network. Considering the spatial distance and neighborhood effect comprehensively, a spatial drug coordination adjustment mechanism is formed; reducing the risks of repeated drug dosing at multiple drug dosing terminals and excessive local drug concentration, and improving the utilization rate and uniformity of the drug in the whole network.

[0157] Based on the obtained pulsating gain coefficient and dynamic phase, calculate the drug dosage after pulsating modulation; based on the set boundary constraints, constrain the drug dosage that is not between the boundary constraints within the boundary to obtain the final drug dosage; that is, dose upper limit protection. If the drug dosage after pulsating modulation exceeds 1.5 times the original drug dosage, it is forced to be limited to the maximum drug dosage to prevent over-adjustment; if the drug dosage after pulsating modulation is negative, it is forced to be set to zero.

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

Claims

1. A method for environmental perception and multi-point water quality optimized dosing of a heating system, characterized in that It 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, use quantum Fourier transform to extract the periodic characteristics of water quality parameters, then based on the constructed quantum optimization model, use quantum annealing algorithm to solve the chemical dosing decision problem and obtain the chemical agent combination strategy; Step 3: Collect chemical agent characteristics and pipe network parameters, combine with water quality data and chemical agent combination strategy, and use tensor decomposition technology to reduce the dimension and integrate the data to obtain the compatibility matrix of chemical agents; Step 4: Each chemical dosing terminal calculates the local chemical dosing amount according to its own sensor data, and through the Gossip protocol, spreads the local chemical dosing to the surrounding chemical dosing terminals. All terminals reach a consistent chemical dosing decision through the PBFT protocol. During the process of reaching the chemical dosing decision, the compatibility matrix is used to guide the chemical dosing decision of each terminal; Step 5: Calculate the propagation time delay of the chemical agent according to the flow velocity distribution of the pipe network and the target chemical agent injection amount, use the lead control algorithm to establish a spatio-temporal compensation model, predict and adjust the injection amount of the chemical agent, and obtain the chemical dosing strategy based on hydrodynamics and time delay compensation.

2. The environmental perception and multi-point water quality optimized dosing method for a heating system according to claim 1, characterized in that, In Step 1, each sensor simulates the characteristics of biological cells, adjusts the data sampling frequency according to the dynamic characteristics of environmental changes, adapts to the dynamic changes under different water quality environments. When the environmental data changes increase, the sensor nodes in the corresponding area increase the sampling frequency; when the environmental data changes are stable, the sampling frequency is reduced.

3. A multi-point water quality optimized heating method for environmental perception of a heating system according to claim 1, characterized in that, In Step 1, when the data difference of three adjacent nodes exceeds the threshold, the system triggers the antibody generation algorithm for more accuracy. The antibody generation algorithm is to dynamically adjust the parameters of the sensor or switch to a standby sensor through a machine learning model or a rule-based calibration mechanism.

4. A multi-point water quality optimized heating method for environmental perception of a heating system according to claim 1, characterized in that The said Step 2 includes the following steps: Water quality data preprocessing: Normalize the water quality data and map it to the interval [0, 1]; Map to quantum state space: Map the normalized water quality data to the quantum state space, that is, encode the water quality data into a quantum bit superposition state; Extract periodic characteristics: Based on the quantum bit superposition state, perform transformation using quantum Fourier transform, so that the quantum bit superposition state is transformed into a frequency domain quantum state, and the periodic characteristics are extracted and encoded into the phase information of the quantum bits; Construct the QUBO model: Based on the chemical agent cost, scaling risk and the influence of periodic characteristics, construct the QUBO model to represent the chemical dosing decision problem. The goal is to minimize the chemical agent cost and structural risk. 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 ); Where: C i represents the unit cost of chemical agent i; q i represents the decision variable of whether to use chemical agent i. q i = 1 indicates the use of the chemical agent, and q i = 0 indicates the non - use of the chemical agent; R ij represents the scaling risk coefficient between chemical agent i and chemical agent j; q i ·q j represents the decision variable of whether two chemical agents are used simultaneously. If both are used, then q i ·q j = 1; otherwise, it is 0; P i represents the coefficient by which chemical agent i is affected by periodic characteristics; Convert the QUBO model into a quantum computing problem to obtain the form solved by the quantum annealing algorithm; Quantum annealing optimizes the chemical dosing strategy: Initialize the quantum bits through a 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 quantum bits through the quantum computer and gradually converge to the minimum energy state according to the quantum superposition and interference effects, that is, the optimized chemical agent combination strategy.

5. A multi-point water quality optimized heating method for environmental perception of a heating system according to claim 1, characterized in that, The said Step 3 includes the following steps: Constructing a Four-Dimensional Parameter Tensor Based on a Pharmaceutical Combination Strategy In the formula: represents the chemical adaptability score; represents the time effectiveness score; represents the space coordination score; represents the economic index; α, β, γ, δ represent the weight coefficients; Tensor decomposition: Perform tensor decomposition based on the constructed four-dimensional parameter tensor: where: λ r represents the eigenvalue weight, indicating the contribution of each component; represents the chemically adaptable basis vector after L2 normalization; represents the time-validity basis vector based on L2 normalization; represents the space-coordination basis vector after L2 normalization; d r represents the economic indicator basis vector after L2 normalization; Optimize each basis vector using the alternating least squares method, where the objective function is as follows: Perform iterative optimization based on the objective function until the iteration stops after reaching the preset stopping condition; Compatibility matrix generation: where: k represents the time dimension index; l represents the economic dimension index; represents the component of the time basis vector in the time interval k; represents the component of the economic basis vector in cost level 1.

6. A multi-point water quality optimized heating method for environmental perception of a heating system according to claim 1, characterized in that, Step 4 includes the following steps: Local metering initialization: Each dosing terminal extracts the corresponding ratio weight from the compatibility matrix according to the current time and economic cost level, and then combines the decision vector to initialize the dosing amount of each terminal; Information diffusion and weight assignment: Based on the pipe network topology and distance attenuation coefficient, each terminal calculates the weight between it and adjacent terminals to obtain the neighbor weight; Iterative consensus optimization: In each iteration, the terminal updates the dosing amount according to its current dose and the information of neighbors, and adjusts the value according to the loss function gradient, gradually approaching the optimized dosing amount; Discretization and instruction generation: Generate the discretized dosing amount based on iterative optimization.

7. A multi-point water quality optimized heating method for environmental perception of a heating system according to claim 6, characterized in that The update formula for updating the dosing amount is as follows: In the formula: represents the drug dosage of terminal i in the t-th iteration; α represents the historical measurement retention weight; w ij represents the neighbor weight; η represents the gradient step size; represents the gradient of the loss function with respect to D i ; represents the loss function; D i represents the amount of drug added to the i-th terminal in the current iteration; Where: D i represents the drug dosage of the i-th terminal in the current iteration; represents the reference drug dosage of the i-th terminal, which is the local average calculated based on the drug dosages of neighbor terminals and the initial value; D j represents the drug dosage of the j-th terminal in the current iteration; (i, j) ∈ ε indicates that there is a direct connection between terminals i and j, and ε represents the set of all adjacent terminal pairs.

8. A multi-point water quality optimized heating method for environmental perception of a heating system according to claim 1, characterized in that, Step 5 includes the following steps: Pharmaceutical transmission cycle calculation: Calculate the pharmaceutical transmission cycle based on the pipe section length, the flow velocity of the pipe section at time t, and the inherent delay compensation of the pipe section; Dynamic phase compensation: Based on the calculated pharmaceutical transmission cycle, introduce a dynamic phase compensation term, perform phase correction according to the change of time t, and compensate for the pharmaceutical propagation deviation caused by the change of flow velocity; Dynamic modulation and pharmaceutical adjustment: Based on the deviation between the pipe section flow velocity and the historical flow velocity, realize the non-linear mapping between the flow velocity and the metering through the tanh function to obtain the pulsation gain coefficient; Calculate the pulsation-modulated pharmaceutical metering based on the obtained pulsation gain coefficient and the dynamic phase; Constrain the pharmaceutical metering outside the boundary constraints to within the boundary based on the set boundary constraints to obtain the final pharmaceutical metering.

Citation Information

Patent Citations

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

    CN115579072A

  • Method for solving entity alignment problem based on distribution problem

    CN116150385A

  • Underwater detector cluster adaptive detection method and system based on distributed reinforcement learning

    CN119204155A

  • Intelligent dosing method and system

    CN119493373A

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

    CN119629211A