Pipe resistance coefficient on-line identification method and system based on improved recursive least square method
By improving the recursive least squares method for online identification of the resistance coefficient of heating pipe networks, the problem that traditional methods cannot adapt to dynamic changes has been solved, achieving high-precision, real-time updates of the resistance coefficient and supporting precise control of smart valves.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANENG SONGYUAN THERMAL POWER CO LTD
- Filing Date
- 2026-02-12
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies for obtaining resistance coefficients in heating pipe networks rely on design drawings or offline testing, which cannot adapt to dynamic changes and cannot achieve automated online identification, thus affecting the regulation effect of smart valves.
An improved recursive least squares method is adopted to construct a resistance coefficient identification model by collecting heating network operation data. The model is then used to perform online identification by utilizing a variable forgetting factor, a covariance matrix reset mechanism, and parameter constraint processing. The model is then updated in real time to the smart valve control system in conjunction with a reliability assessment.
It enables real-time updates of the resistance coefficient, adapts to dynamic changes in the pipeline network, improves identification accuracy and adaptability, ensures normal system operation, and is suitable for embedded system applications.
Smart Images

Figure CN122287009A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of heating system, and specifically relates to an online identification method and system for pipe group coefficients based on an improved recursive least squares method. Background Technology
[0002] In the process of intelligent transformation of centralized heating systems, an accurate hydraulic model is the foundation for achieving precise control. The resistance coefficient of the heating network is a core parameter of the hydraulic model, and its accuracy directly affects the regulation effect of smart valves. Traditional methods for obtaining the resistance coefficient mainly rely on design drawing data or offline testing, which has obvious limitations.
[0003] Existing technical solutions require collecting multiple sets of pressure-flow data under stable pipeline operation conditions and then using the least squares method to fit the resistance coefficient. However, this method has the following problems: The system needs to be in a stable state, but in actual operation, the heating network conditions change frequently, making it difficult to meet the testing conditions. Offline calculation mode cannot adapt to dynamic changes in the pipeline network, such as changes in characteristics caused by scaling, leakage, etc. The calculation process requires manual intervention and cannot achieve automated online identification. Summary of the Invention
[0004] To address the aforementioned problems, this application provides an online identification method for pipe resistance coefficient based on an improved recursive least squares method, comprising: Collect operational data from the heating network; Based on the operation data of the heating pipeline network, a resistance coefficient identification model is constructed, and an improved recursive least squares method is used to identify the resistance coefficient online based on the resistance coefficient identification model. The credibility of the identification results is assessed, and the verified resistance coefficient is updated to the smart valve control system in real time.
[0005] Optionally, the expression for the drag coefficient identification model is:
[0006] Where ΔP is the pressure difference of the heating network, Q is the flow rate of the heating network, and R is the resistance coefficient of the heating network.
[0007] Optionally, the drag coefficient identification model employs an improved recursive least squares method for online drag coefficient identification, including: Linearize the drag coefficient identification model; The improved recursive least squares method is designed, which includes a variable forgetting factor, a covariance matrix reset mechanism, and parameter constraint handling. Based on the different operating conditions of the heating network, corresponding identification strategies are adopted.
[0008] Optionally, the improved recursive least squares method specifically includes the following improvements: Variable forgetting factor design: A dynamically adjusted forgetting factor is adopted, which adaptively adjusts the value of the forgetting factor according to the rate of change of the output error, so as to improve the algorithm's adaptability to dynamic changes.
[0009] Covariance matrix reset mechanism: When the trace of the covariance matrix exceeds a preset threshold, the covariance matrix is automatically reset to prevent data saturation and ensure the stability and convergence of the algorithm.
[0010] Parameter constraint processing: Physical constraints are set for the drag coefficient to ensure that the identification results conform to actual physical laws, and the constraints are processed using a projection algorithm.
[0011] Optionally, the forgetting factor is calculated as follows:
[0012] in, This represents the forgetting factor at the current time k. Represents the initial minimum value, Indicates the final largest value, This represents the adjustment coefficient. This indicates the rate of change of the output error.
[0013] Optionally, the step of adopting corresponding identification strategies based on different operating conditions of the heating network includes: Under normal operating conditions, the flow and pressure change data during the intelligent valve regulation process are used for identification. Under special test conditions, small-amplitude valve disturbances are actively applied to enhance data stimulation; In case of malfunction, identify abnormal conditions such as leakage and suspend parameter updates.
[0014] Optionally, the credibility assessment of the identification results includes: Check whether the error of the identification results is within the allowable range; Compare the consistency of identification results in adjacent time periods; Check whether the drag coefficient conforms to the laws of physics.
[0015] Optionally, after collecting the heating network operation data, before constructing the resistance coefficient identification model based on the heating network operation data, the collected heating network operation data may be preprocessed, including outlier removal, signal filtering, and unit unification.
[0016] Based on the same inventive concept, this application also provides an online tube resistance coefficient identification system based on an improved recursive least squares method, comprising: The data acquisition unit is used to collect operational data of the heating network. The resistance coefficient identification unit is used to construct a resistance coefficient identification model based on the operation data of the heating network, and to perform online identification of the resistance coefficient using an improved recursive least squares method based on the resistance coefficient identification model. The result verification unit is used to evaluate the credibility of the identification results and update the verified resistance coefficient to the smart valve control system in real time.
[0017] Optionally, the system further includes a preprocessing unit for preprocessing the collected heating network operation data.
[0018] Furthermore, this application also provides a computing device, comprising: at least one processor and a memory; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, an online identification method for pipe resistance coefficient based on the improved recursive least squares method is implemented as described above.
[0019] Furthermore, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the above-described method for online identification of tube resistance coefficients based on an improved recursive least squares method.
[0020] Compared with the prior art, this application has the following advantages: This application provides a method and system for online identification of pipe resistance coefficients based on an improved recursive least squares method, comprising: collecting heating network operation data; constructing a resistance coefficient identification model based on the heating network operation data; performing online identification of resistance coefficients using an improved recursive least squares method based on the resistance coefficient identification model; evaluating the reliability of the identification results; and updating the verified resistance coefficients to the smart valve control system in real time. The advantages of this application are: High real-time performance: It can update the resistance coefficient online in real time to adapt to dynamic changes in the pipeline network; High accuracy: The improved RLS algorithm enhances recognition accuracy, with a measured error of <5%; Highly practical: No special testing conditions are required, and it does not affect the normal operation of the system; Strong Adaptability: The variable forgetting factor design enables the algorithm to adapt to different operating states; Low computational cost: Suitable for real-time operation in embedded systems, and has been verified in actual projects.
[0021] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This paper presents a schematic diagram of the online identification method for pipe resistance coefficient based on the improved recursive least squares method provided in this application. Figure 2 The diagram shows the organization of the online tube resistance coefficient identification system based on the improved recursive least squares method provided in this application. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0025] Example 1 This application provides an online identification method for pipe resistance coefficient based on an improved recursive least squares method, such as... Figure 1 ,include: Collect operational data from the heating network; Based on the operation data of the heating network, a resistance coefficient identification model is constructed. An improved recursive least squares method is used to identify the drag coefficient online based on the drag coefficient identification model. The credibility of the identification results is assessed, and the verified resistance coefficient is updated to the smart valve control system in real time.
[0026] Optionally, collect heating network operation data, including: Collect pressure data: supply and return water pressure at each node, sampling frequency 1Hz; Flow data collection: The flow rate of each branch is measured using an electromagnetic flowmeter; Collect temperature data: supply and return water temperatures, used for density correction temperature data; Valve opening information: Real-time opening data of the smart valve.
[0027] Optionally, data preprocessing may also be included after collecting the heating network operation data: Outlier removal, signal filtering, and unit standardization were implemented. A moving average filter was used to eliminate noise, with a filter window size of 10 sampling points.
[0028] The drag coefficient identification model employs an improved recursive least squares method for online drag coefficient identification, including: Linearize the drag coefficient identification model; The improved recursive least squares method is designed, which includes a variable forgetting factor, a covariance matrix reset mechanism, and parameter constraint handling. Based on the different operating conditions of the heating network, corresponding identification strategies are adopted.
[0029] Optionally, the expression for the drag coefficient identification model is based on the basic formulas for pipeline hydraulic calculation:
[0030] Where ΔP is the pressure difference of the heating network (Pa), Q is the flow rate of the heating network (m³ / h), and R is the resistance coefficient of the heating network (Pa / (m³ / h)²).
[0031] Linearize the model:
[0032] in, =ΔP, = , = .
[0033] The traditional recursive least squares (RLS) method is as follows:
[0034]
[0035]
[0036] Where θ(k) represents the parameter estimate at the current time k. Here, it refers to the resistance coefficient R of the heating network to be identified. It is obtained through recursive updates and is the final output of the algorithm. θ(k-1) represents the value of the parameter estimate at the previous time k. The parameter estimate is 1. This is the basis for the current estimate, and the algorithm will adjust it based on new data. K(k) represents the gain matrix, which determines the "weight" or "influence" of new measurement data on the parameter estimate update. The larger the value of K(k), the greater the correction brought by the new data. Its calculation depends on the covariance matrix and regression vector, with the aim of minimizing the estimation error. This represents the regression vector (or data vector). It contains the input and output data at time k, here... (k)=Q 2 That is, the square of the flow rate, P(k-1) represents the inverse of the error covariance matrix (or simply the covariance matrix) at the previous time step, reflecting the parameter estimate θ(k 1) The degree of uncertainty, P(k) represents the error covariance matrix updated at the current time. As data accumulates, P(k) usually gradually decreases, meaning the confidence of the parameter estimation is increasing. λ represents the forgetting factor. is a constant between 0 and 1 (usually close to 1, such as 0.95-0.99). Its function is to give historical data exponentially decaying weights. I represents the identity matrix. Its main diagonal elements are 1, and the rest are 0. is used in the formula to maintain dimensional consistency of matrix operations, for example, ensuring I when updating P(k). K(k) (k) is a valid matrix operation.
[0037] This application makes three improvements to traditional RLS: (1) Design of variable forgetting factors:
[0038] in, This represents the forgetting factor at the current time k. Represents the initial minimum value, Indicates the final largest value, This represents the adjustment coefficient. This indicates the rate of change of the output error.
[0039] (2) Covariance matrix reset mechanism: When P(k)> When P(k) is executed, To prevent data saturation.
[0040] (3) Parameter constraint handling: Increase physical constraints The constraints are handled using a projection algorithm. This represents the minimum resistance coefficient of the heating network. This represents the maximum resistance coefficient of the heating network.
[0041] Optionally, the step of adopting corresponding identification strategies based on different operating conditions of the heating network includes: Under normal operating conditions, the flow and pressure change data during the intelligent valve regulation process are used for identification. Under special test conditions, small-amplitude valve disturbances are actively applied to enhance data stimulation; In case of malfunction, identify abnormal conditions such as leakage and suspend parameter updates.
[0042] Optionally, the credibility assessment of the identification results includes: Residual analysis: Check whether the error of the identification results is within the allowable range; Consistency check: Compare the consistency of identification results between adjacent time periods; Physical rationality judgment: Check whether the drag coefficient conforms to physical laws.
[0043] The verified parameters are updated in real time to the intelligent valve control system for model predictive control.
[0044] Example 2 Based on the same inventive concept, this application also provides an online tube resistance coefficient identification system based on an improved recursive least squares method, such as... Figure 2 ,include: The data acquisition unit is used to collect operational data of the heating network. The resistance coefficient identification unit is used to construct a resistance coefficient identification model based on the operation data of the heating network, and to perform online identification of the resistance coefficient using an improved recursive least squares method based on the resistance coefficient identification model. The result verification unit is used to evaluate the credibility of the identification results and update the verified resistance coefficient to the smart valve control system in real time.
[0045] The embodiments in this section are basically the same as the method embodiments, and will not be described in detail here.
[0046] Example 3 Based on the same inventive concept, this application also provides an electronic device. The electronic device of this application includes at least one processor and at least one storage medium electrically connected to the processor. The storage medium is electrically connected to the processor, wherein the storage medium stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described above.
[0047] Example 4 Based on the same inventive concept, this application also provides a storage medium storing instructions executable by at least one processor, the instructions being executed by at least one processor to enable at least one processor to perform the method described above.
[0048] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for online identification of pipe resistance coefficient based on an improved recursive least squares method, characterized in that, include: Collect operational data from the heating network; Based on the operation data of the heating pipeline network, a resistance coefficient identification model is constructed, and an improved recursive least squares method is used to identify the resistance coefficient online based on the resistance coefficient identification model. The credibility of the identification results is assessed, and the verified resistance coefficient is updated to the smart valve control system in real time.
2. The method according to claim 1, characterized in that, The expression for the drag coefficient identification model is as follows: Where ΔP is the pressure difference of the heating network, Q is the flow rate of the heating network, and R is the resistance coefficient of the heating network.
3. The method according to claim 2, characterized in that, The drag coefficient identification model employs an improved recursive least squares method for online drag coefficient identification, including: Linearize the drag coefficient identification model; The improved recursive least squares method is designed, which includes a variable forgetting factor, a covariance matrix reset mechanism, and parameter constraint handling. Based on the different operating conditions of the heating network, corresponding identification strategies are adopted.
4. The method according to claim 3, characterized in that, The improved recursive least squares method specifically includes the following improvements: Variable forgetting factor design: A dynamically adjusted forgetting factor is adopted, which adaptively adjusts the value of the forgetting factor according to the rate of change of the output error; Covariance matrix reset mechanism: When the trace of the covariance matrix exceeds a preset threshold, the covariance matrix is automatically reset; Parameter constraint processing: Physical constraints are set for the drag coefficient to ensure that the identification results conform to actual physical laws, and the constraints are processed using a projection algorithm.
5. A method according to claim 4, characterized in that, The formula for calculating the forgetting factor is: in, This represents the forgetting factor at the current time k. Represents the initial minimum value, Indicates the final largest value, This represents the adjustment coefficient. This indicates the rate of change of the output error.
6. The method according to claim 1, characterized in that, The method of adopting corresponding identification strategies based on different operating conditions of the heating network includes: Under normal operating conditions, the flow and pressure change data during the intelligent valve regulation process are used for identification. Under special test conditions, small-amplitude valve disturbances are actively applied to enhance data stimulation; In case of a fault, identify the abnormal leakage condition and suspend parameter updates.
7. The method according to claim 1, characterized in that, The credibility assessment of the identification results includes: Check whether the error of the identification results is within the allowable range; Compare the consistency of identification results in adjacent time periods; Check whether the drag coefficient conforms to the laws of physics.
8. A method according to claim 1, characterized in that, After collecting the operating data of the heating network, before constructing the resistance coefficient identification model based on the operating data, the collected operating data of the heating network is preprocessed. The preprocessing includes outlier removal, signal filtering, and unit unification.
9. An online identification system for pipe resistance coefficient based on an improved recursive least squares method, characterized in that, include: The data acquisition unit is used to collect operational data of the heating network. The resistance coefficient identification unit is used to construct a resistance coefficient identification model based on the operation data of the heating network, and to perform online identification of the resistance coefficient using an improved recursive least squares method based on the resistance coefficient identification model. The result verification unit is used to evaluate the credibility of the identification results and update the verified resistance coefficient to the smart valve control system in real time.
10. A system according to claim 9, characterized in that, The system also includes a preprocessing unit for preprocessing the collected heating network operation data.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the online identification method for tube resistance coefficient based on the improved recursive least squares method as described in any one of claims 1-8.
12. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the online identification method for tube resistance coefficient based on the improved recursive least squares method as described in any one of claims 1-8.