A method for correcting measured values of thermal system parameters in power plants based on automatic differentiation
By applying automatic differential technology to quickly calculate the Jacobian matrix in the thermal system of the power station, the problem of cumbersome and incomparable correction process in the existing technology is solved, and efficient and accurate parameter measurement value correction and coarse error recognition are achieved.
Patent Information
- Application Number
- CN202210452600.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-04-27
AI Technical Summary
The parameter correction method of existing power station thermal systems is cumbersome, the calculation is complex, and it is not flexible and versatile, making it difficult to quickly identify and correct the coarse errors in the measured values.
The Jacobian matrix of the residual term of the equilibrium equation of the power station thermal system is quickly derived with respect to the measured values of each measurement point by simplifying the calculation process, improving the calculation speed and accuracy, and solving the measurement point correction amount through constrained optimization problems.
It improves the calculation speed and accuracy of the parameter measurement values of the power station thermal system, simplifies the correction process, enhances the flexibility and versatility of the method, and can effectively identify and correct coarse errors in the measurement values.
Smart Images

Figure CN114840811B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of power plant thermal system parameter correction methods, and in particular relates to a power plant thermal system parameter measurement value correction method based on automatic differentiation. Background Art
[0002] During the operation of the thermal system of a power plant, various types of sensor instruments are required to measure parameter values to help managers monitor the operating conditions of various parts of the system in real time. Due to the influence of various factors, the instrument measurement results usually have a certain error compared to the standard value, which in turn causes the corresponding physical quantity balance relationships (such as mass balance and energy balance) to no longer hold, affecting the accuracy of system analysis; in some cases, due to the failure of the instrument itself, the error generated by the corresponding measurement value will even evolve into an intolerable gross error, which directly leads to the loss of credibility of the monitoring of the system operation status, and must be accurately identified and eliminated. However, there are often hundreds of measurement points in the actual thermal system of a power plant. It is difficult to quickly identify the size and severity of the instrument measurement error directly from the measurement results of each instrument in the system based on manual inspections and relevant experience alone. It is not easy to determine the specific measurement point location where the gross error occurs in the system, and it is even more difficult to determine the correction method for the measurement value at each measurement point in the system.
[0003] In order to achieve the two goals of (1) gross error identification and (2) general error correction of power plant thermal systems, it is necessary to propose an effective method for correcting the measured values of power plant thermal system parameters. In this field, a set of methods for correcting the measured values of power plant thermal system parameters has been constructed based on statistical theories. However, this method involves the calculation of complex functional relationships between various variables, especially the calculation of the Jacobian matrix. Under the framework of the classical method, the Jacobian matrix calculation formula is usually manually derived for the specific system function relationship, or the table function is used for numerical differential approximate calculation. The steps are cumbersome and not universal when applied to a variety of different complex systems. The calculation formula needs to be derived separately and a dedicated calculation program needs to be written. Summary of the invention
[0004] The purpose of the present invention is to provide a method for correcting the measured values of the parameters of the thermal system of a power plant based on automatic differentiation, so as to solve one or more technical problems existing in the field. The main problem solved by the present invention is that in the framework of the classic correction method, it is necessary to adopt the method of manual derivation or numerical differential approximation to solve the Jacobian matrix required for calculation, which makes the corresponding correction method very cumbersome, lacks flexibility and versatility, and the application scenarios are greatly limited; the method proposed in the present invention can quickly derive the Jacobian matrix of the residual terms of the equilibrium equation in the thermal system of a complex power plant with respect to the measured values at each measuring point in the system, thereby speeding up the calculation speed of the measured values of the parameters of the thermal system of the power plant, improving the accuracy of the calculation results, and can be flexibly applied to the calculation of various types of thermal systems in power plants.
[0005] The present invention is achieved by adopting the following technical solutions:
[0006] A method for correcting measured values of power plant thermal system parameters based on automatic differentiation comprises the following steps:
[0007] 1) According to the actual research of the power plant thermal system and the arrangement of measuring instruments, a parameter measurement balance relationship model of the power plant thermal system is constructed;
[0008] 2) For the parameter measurement balance relationship model constructed in step 1), obtain the measurement value data of each measurement point under a certain working condition, and generate the measurement value mean and covariance matrix;
[0009] 3) Starting from the mean and covariance matrix of the measured values generated in step 2), the Jacobian matrix of the residual of the system equilibrium equation with respect to the measured point variables is calculated by automatic differentiation technology;
[0010] 4) Based on the Jacobian matrix obtained in step 3), a constrained optimization problem about the correction amount of each measuring point of the system is constructed to solve the correction amount of the measurement value of the measuring point;
[0011] 5) According to the correction amount of each measuring point calculated in step 4), calculate the gross error criterion, judge whether there is a gross error in the measurement value of each measuring point, locate and eliminate the possible gross error;
[0012] 6) After eliminating the gross errors in the measurement data, the measured values of the variables at each measuring point of the corrected system are obtained through the correction calculation results of the final step.
[0013] A further improvement of the present invention is that in step 1), the parameter measurement balance relationship model is represented by the following relationship:
[0014] y=f(x),F=g(y) (1)
[0015] In the formula, x represents the measurement value vector of the measuring point corresponding to the instruments actually arranged in the system, including the measurement values of flow, temperature and pressure sensors; y represents the key physical quantity vector obtained by combining the measurement values or solving the model, which is called the output variable; F represents the residual vector of the equation obtained by substituting the key physical quantity into the system balance equation;
[0016] The system balance equations include mass balance equations and energy balance equations. The mass balance equation indicates that the net flow at the specified node is zero and has the following form:
[0017] f m,i =q in,i -q out,i =0 (2)
[0018] Where f m,i represents the residual of the mass balance equation listed at the i-th node, q in,i represents the total inflow flow at the i-th node, q out,i represents the total outflow at the i-th node; the energy balance equation indicates that the net increase rate of energy at the specified node is zero, and has the following form:
[0019] f e,j =H in,j -H out,j =0 (3)
[0020] Where f e,j represents the residual of the energy balance equation listed at the jth node, H in,j With H out,j They represent the total inflow enthalpy and total outflow enthalpy at the jth node respectively; the total inflow enthalpy is calculated as follows:
[0021] H in,j =∑ k h jk q k (4)
[0022] where q k represents the flow rate of any fluid flowing into the node, h jk It represents the specific enthalpy corresponding to the fluid in this path; construct a composite function relationship from the measurement value x at the measuring point to the output variable y and then to the system equilibrium equation group F.
[0023] A further improvement of the present invention is that, in step 2), it is assumed that for a certain measuring point x in the system within a certain period of time i n measurements were made, and a series of measurement values were obtained: i1 ,x i2 ,…,x in , then the mean and variance estimates of the measured values at this measuring point are calculated as follows:
[0024]
[0025] in is the estimated value of the mean at the measuring point, is the unbiased estimate of the variance at the measuring point;
[0026] The correlation coefficient ρ between the variables of these measuring points is formulated based on the historical observation values or engineering experience during actual operation. ij , construct the covariance matrix S between the measured values of each measuring point x , whose elements are given by:
[0027]
[0028] The covariance matrix calculated according to the above formula contains the statistical distribution information of the variables at each measuring point in the system.
[0029] A further improvement of the present invention is that in step 3), the Jacobian matrix J of the output variable y with respect to the measuring point variable x is calculated by automatic differentiation technology. y,x , and the Jacobian matrix J of the residual F of the system equilibrium equation with respect to the output variable y F,y ; Then, the Jacobian matrix of the residual of the system equilibrium equation with respect to the measurement point variables is solved by the chain rule, as shown in the following formula:
[0030] J f,x =J F,y J y,x (7).
[0031] A further improvement of the present invention is that in step 4), the Jacobian matrix J is obtained F,x Afterwards, the residual of the system equilibrium equation is calculated based on the mean and covariance data of the measured values at the measuring points, and the correction required for each measured value at the measuring point is solved based on the relationship between the variables.
[0032] A further improvement of the present invention is that the specific implementation method of step 4) is: according to the functional relationship given by formula (1), the mean of the key quantity and the residual of the system balance equation is calculated in sequence:
[0033]
[0034] in and are the means of the key quantity vector and the residual vector of the system balance equation respectively; the covariance matrix S of the residual vector of the system balance equation is obtained by the covariance matrix transformation of the measurement point measurement value F , as shown below:
[0035]
[0036] In order to solve the correction value v of the measurement point, a constrained optimization problem is constructed as follows:
[0037]
[0038] The optimization objective function l(v) is the inverse matrix of the covariance matrix For the quadratic form of the correction v, the optimization goal is the minimum value of the function to ensure that the overall level of the correction is minimized; the Lagrange multiplier method is used to solve the optimization problem, and the multiplier λ is introduced to transform the problem into an unconstrained optimization problem as shown below:
[0039]
[0040] At this time, the stationary condition Solving this problem, we get the equation: That is to say Multiply the Jacobian matrix J on both sides of the equation. F,x , convert the equation into the following form:
[0041] J F,x v=S F λ (12)
[0042] According to the constraint equation, it is known that Substituting the left side of the equation into the multiplier, we can solve it as:
[0043]
[0044] Substituting the multiplier solution back into equation (12), the correction amount can be obtained, which can be expressed as the following calculation formula:
[0045]
[0046] At this point, the Jacobian matrix J can be calculated by automatic differentiation F,x And the covariance matrix S of the system equilibrium equation F Obtain the correction value of each measuring point in the system to minimize the residual error of the system equilibrium equation.
[0047] A further improvement of the present invention is that in step 5), it is determined whether there is a gross error in the measured value of each measuring point in the system, and an evaluation is performed based on the magnitude of the correction value v. For this purpose, an auxiliary vector is calculated as shown in the following formula:
[0048]
[0049] Then calculate and check the gross error criterion K according to the following criteria:
[0050]
[0051] where n F is the number of equilibrium equations of the system, F(n F ,∞) distribution, obtained by table lookup or computer program; when the criterion in formula (16) is satisfied, there is no gross error in the system measurement data; otherwise, there may be gross errors in the measurement values of each measuring point in the system. In order to further determine which measuring points the gross errors may occur, the following discriminant is used to test the correction value v at each measuring point respectively. i :
[0052]
[0053] In the formula is the correction value v i The variance of , that is, the covariance matrix S calculated by the following formula v The diagonal elements of :
[0054]
[0055] and is the variance of the measured value of the measuring point calculated according to formula (5). When the criterion (17) is satisfied, the measuring point x i There is no gross error on the measuring point x i The measurements above may contain gross errors;
[0056] In order to eliminate the gross errors found in the inspection process, the sequential elimination method is adopted, and the gross error criterion value K is calculated according to formula (17): i The largest measuring point variable data is removed from the system, and then the above calculation steps are repeated until the gross errors that may exist in the data of each measuring point are completely eliminated.
[0057] A further improvement of the present invention is that in step 6), the correction value vector v calculated in the last step is added as the final correction vector to the mean vector of the measured value of the measuring point The correction process is completed, and the average value of each measuring point after correction is:
[0058]
[0059] The covariance matrix reflecting the random correlation between the measurement points is corrected as follows:
[0060]
[0061] Where S v is the covariance matrix of the correction value calculated according to formula (18). At this point, the correction process of the measured values of the thermal system of the entire power station is completed.
[0062] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0063] In the existing classical power plant thermal system parameter correction method, the operational combination relationship between the parameters is very complex. Usually, the Jacobian matrix reflecting the dependency relationship of each variable is processed by manually derived differential expressions or numerical differential approximation. The calculation is large and the accuracy is low, which will have a great impact on the correction balance of parameter measurement values and the accuracy of gross error judgment of the power plant thermal system. Taking the parameter measurement correction process of the thermal system of a thermal power plant as an example, the calculation process involves two major balance relationships, mass balance and energy balance, and it is necessary to consider the complex physical property relationship of water vapor as a fluid working medium, which makes the parameter coordination process difficult. Usually, the Jacobian matrix required by the correction method is solved by combining manual derivation of differential analytical expressions and numerical differential approximation. The steps are cumbersome, the calculation is large, the accuracy is relatively low, and it is even more difficult to flexibly extend to other types of systems with different structures. The solution method proposed in the present invention can directly solve the Jacobian matrix of the system equilibrium equation with respect to the variables of each measuring point according to the functional relationship between the variables, and then efficiently and accurately realize the evaluation and correction of the errors of the variables at each measuring point, and can be easily extended to power plant thermal systems with different structural modes.
[0064] As a high-performance computing method, automatic differentiation technology can ensure extremely high computational accuracy similar to symbolic differentiation and relatively low computational cost similar to numerical differentiation by applying precise symbolic differentiation methods to the most basic operators and continuously substituting known numerical results. With the large-scale research and improvement of automatic differentiation methods in the field of artificial intelligence represented by deep learning in recent years, the computational efficiency and accuracy of automatic differentiation methods can now reach extremely high levels, further broadening their scope of application.
[0065] The parameter measurement value correction method proposed in the present invention for various power plant thermal systems is based on the classical parameter correction method. The difference is that the present invention incorporates automatic differentiation technology, which effectively reduces the complexity of parameter balance calculation; by accurately calculating the Jacobian matrix, the calculation accuracy of the correction amount is improved, and it can be applied to power plant thermal systems of various structures, using the same calculation process to handle complex variable relationships, and has a wide range of application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 The flowchart for solving the correction process of the thermal system balance equation of the power station based on automatic differentiation is given.
[0067] Figure 2Schematic diagram of the process of using automatic differentiation technology to solve the residual of the system equilibrium equation with respect to the system measurement point variables.
[0068] Figure 3 This is a diagram of the flow measurement points and their relationships in the high-pressure cylinder-medium-pressure cylinder thermal system of a power station. DETAILED DESCRIPTION
[0069] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to be able to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features described in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0070] See also Figure 1 As shown, the present invention provides a method for correcting measured values of power plant thermal system parameters based on automatic differentiation, comprising the following steps:
[0071] 1) According to the actual research of the power plant thermal system and the arrangement of measuring instruments, the power plant thermal system parameter measurement balance relationship model is constructed. It is expressed by the following relationship:
[0072] y=f(x),F=g(y) (1)
[0073] In the formula, x represents the measurement value vector of the measuring point corresponding to the instrument actually arranged in the system, including the measurement values of various sensors such as flow, temperature, and pressure; y represents the key physical quantity vector obtained by combining the measurement values or modeling, called the output variable, which is either a combination of various measurement values (such as the total inflow flow of a subsystem) or a physical quantity indirectly calculated through other measurement values (such as the total enthalpy value of the fluid working medium); F represents the residual vector of the equation obtained by substituting the key physical quantity into the system balance equation. The system balance equation includes two types: mass balance equation and energy balance equation. The mass balance equation indicates that the net flow at the specified node is zero, and has the following form:
[0074] f m,i =q in,i -q out,i =0 (2)
[0075] Where f m,i represents the residual of the mass balance equation listed at the i-th node, q in,i represents the total inflow flow at the i-th node, q out,irepresents the total outflow at the i-th node. Both are positive values and should cancel each other out when the measured values are accurate. The energy balance equation represents the net increase rate of energy at a specified node to be zero and has the following form:
[0076] f e,j =H in,j -H out,j =0 (3)
[0077] Where f e,j represents the residual of the energy balance equation listed at the jth node, H in,j With H out,j They represent the total inflow enthalpy and total outflow enthalpy at the jth node, respectively. Both are positive values and should cancel each other out when the measured values are accurate. The total inflow enthalpy can be further calculated as follows:
[0078] H in,j =∑ k h jk q k (4)
[0079] where q k represents the flow rate of any fluid flowing into the node, h jk It represents the specific enthalpy corresponding to the fluid in this path. The total outflow enthalpy can be calculated by a similar method. Thus, a composite function relationship can be constructed from the measurement value x of the measuring point to the output variable y and then to the system equilibrium equation group F.
[0080] 2) Obtain the measurement data of each measuring point of the system under a certain working condition and generate the mean and covariance matrix.
[0081] The above only completes the system parameter measurement balance relationship model, but has not yet brought in the specific measurement values at each measuring point. In the actual operating system, due to the fluctuation of the operating state and the influence of the instrument's own factors, even under steady-state conditions, the measured values at each measuring point have small fluctuations, and the measured values corresponding to certain specific measuring points may even have large fluctuations. Therefore, the state of the system cannot be defined only by the measured values of the instruments at each measuring point at a certain moment, but it is necessary to use the mean and variance of multiple measurements of each measuring point over a period of time to characterize the physical parameters of each part of the system. Suppose that for a certain measuring point x in the system over a period of time i n measurements were made, and a series of measurement values were obtained: i1 ,x i2 ,…,x in , the mean and variance estimates of the measured values at the measuring point can be calculated as follows:
[0082]
[0083] in is the estimated value of the mean at the measuring point, is the unbiased estimate of the variance at the measuring point. In the actual operating system, there may be random correlations between the measured values of some measuring points. Therefore, it is necessary to formulate the correlation coefficient ρ between the variables of these measuring points based on the historical observations or engineering experience in the actual operation process. ij Thus, the covariance matrix S between the measured values of each measuring point can be constructed x , whose elements are given by:
[0084]
[0085] The covariance matrix calculated according to the above formula contains the statistical distribution information of the variables at each measuring point in the system, and is an important basis for correcting the parameter values of the power plant thermal system in the subsequent calculation steps.
[0086] 3) Calculate the Jacobian matrix of the residual of the system equilibrium equation with respect to the measured point variables through automatic differentiation technology.
[0087] In order to determine the measurement error level based on the balance relationship between the variables at each measuring point in the system, the Jacobian matrix J of the residual of the system balance equation with respect to the measuring point variables must be calculated first. F,x To this end, the Jacobian matrix J of the output variable y with respect to the measurement point variable x can be calculated by automatic differentiation technology y,x , and the Jacobian matrix J of the residual F of the system equilibrium equation with respect to the output variable y F,y ; Then, the Jacobian matrix of the residual of the system equilibrium equation with respect to the measured point variables can be solved by the chain rule, as shown in the following formula:
[0088] J f,x =J F,y J y,x (7)
[0089] When using a computer program to implement this part of the calculation process, it is only necessary to provide the functional relationship given by formula (1), without manually deriving the differential expression. Automatic differentiation technology helps to quickly obtain the corresponding Jacobian matrix for any functional combination relationship, so that the corresponding calculation program can have great versatility while maintaining extremely high calculation accuracy and fast calculation speed.
[0090] 4) Calculate the correction amount of the measurement value at the measuring point.
[0091] Get the Jacobian matrix J F,x After that, the residual of the system balance equation can be calculated based on the mean and covariance data of the measured values of the measuring points, and the correction required for each measured value of the measuring point can be solved based on the relationship between the variables. First, the mean of the key quantity and the residual of the system balance equation can be directly calculated according to the functional relationship given by formula (1):
[0092]
[0093] in and are the means of the key quantity vector and the residual vector of the system balance equation respectively. At the same time, it is necessary to obtain the covariance matrix S of the residual vector of the system balance equation through the covariance matrix transformation of the measurement point measurement value F , as shown below:
[0094]
[0095] In order to solve the correction value v of the measurement point measurement value, a constrained optimization problem is constructed as follows:
[0096]
[0097] The optimization objective function l(v) is the inverse matrix of the covariance matrix For the quadratic form of the correction v, the optimization objective is the minimum value of the function to ensure that the overall level of the correction is minimized; the constraint equation indicates that the correction reduces the residual of the system equilibrium equation to zero in the first-order approximation corresponding to the Jacobian matrix. Furthermore, the Lagrange multiplier method can be used to solve the optimization problem, and the multiplier λ is introduced to transform the problem into an unconstrained optimization problem as shown below:
[0098]
[0099] At this time, the stationary condition can be directly Solving this problem, we get the equation: That is to say Multiply the Jacobian matrix J on both sides of the equation. F,x , the equation can be transformed into the following form:
[0100] J F,x v=S F λ (12)
[0101] According to the constraint equation, it is known that Substituting the left side of the equation into the equation, we can solve the multiplier as:
[0102]
[0103] Substituting the multiplier solution back into equation (12), the correction amount can be obtained, which can be expressed as the following calculation formula:
[0104]
[0105] At this point, the Jacobian matrix J can be directly calculated by automatic differentiationF,x And the covariance matrix S of the system equilibrium equation F Obtain the correction value of each measuring point in the system to minimize the residual error of the system equilibrium equation.
[0106] 5) Determine whether there are gross errors in the measurement values of each measuring point, locate and eliminate possible gross errors.
[0107] In order to determine whether there is a gross error in the measured value of each measuring point in the system, it is necessary to evaluate it based on the size of the correction value v. To this end, the auxiliary vector shown in the following formula is calculated:
[0108]
[0109] Then calculate and check the gross error criterion K according to the following criteria:
[0110]
[0111] where n F is the number of equilibrium equations of the system, F(n F ,∞) distribution, can be obtained by looking up a table or using a computer program. When the criterion in equation (16) is met, there is no gross error in the system measurement data; otherwise, there may be gross errors in the measurement values of each measuring point in the system. To further determine which measuring points the gross errors may occur at, the following discriminant can be used to test the correction value v at each measuring point: i :
[0112]
[0113] In the formula is the correction value v i The variance of , that is, the covariance matrix S calculated by the following formula v The diagonal elements of :
[0114]
[0115] and is the variance of the measured value of the measuring point calculated according to formula (5). When criterion (17) is satisfied, the measuring point x i There is no gross error on the measuring point x i The measurements above may contain gross errors.
[0116] In order to eliminate the gross errors found in the inspection process, the sequential elimination method can be used to calculate the gross error criterion value K according to formula (17): iThe largest measuring point variable data is removed from the system, and then the above calculation steps are repeated until the gross errors that may exist in the data of each measuring point are completely eliminated.
[0117] 6) Calculate the corrected measured values of the variables at each measuring point in the system. After eliminating the gross errors that may exist in the measured data of each measuring point in the system, the corrected value vector v calculated in the last step can be added to the mean vector of the measured value of the measuring point as the final correction vector The correction process is completed. The average value of each measuring point after correction is:
[0118]
[0119] The covariance matrix reflecting the random correlation between the measurement points is corrected as follows:
[0120]
[0121] Where S v is the covariance matrix of the correction value calculated according to formula (18). So far, the correction process of the measured values of the thermal system of the entire power station has been completed. Specific embodiments
[0123] There is a thermal system of high pressure cylinder and medium pressure cylinder in a certain power station. For the sake of simplicity, only its flow balance relationship is analyzed here. The flow measurement points in the system and their relationship are as follows: Figure 3 As shown. Among them, the circular symbol represents a single measuring point in the pipeline, which is represented by a single letter; the rounded rectangular symbol represents a virtual measuring point abstracted from other more complex power plant system components or subsystems that are connected to this part of the thermal system. Its measurement value can be represented by a specific measuring point in the pipeline, or it can be obtained by combining the measurement values of multiple measuring points in these components. When analyzing the balance relationship of the measurement values of each measuring point in the system, these two types of measuring points are treated equally. When the power station enters the operating state, it is necessary to monitor the operating status of the thermal system through the working fluid flow measurement values at each measuring point; for this purpose, it is necessary to analyze the balance relationship of the measurement values of each measuring point in the system over a period of time, identify, locate and eliminate the gross errors that may exist in the measurement values of the measuring points, and correct the original measurement value data of the measuring points with large fluctuations and deviations to measurement value data with small fluctuations and deviations.
[0124] In the embodiment of the present invention, the specific steps of correcting the measured values of each measuring point of the thermal system of the power station are as follows:
[0125] 1) According to the arrangement of flow measurement points of the power plant thermal system in the embodiment, a parameter measurement balance relationship model of the thermal system is constructed. For the high-pressure cylinder-medium-pressure cylinder thermal system in this embodiment, it is necessary to first list the variables of each measurement point in the system and number them in sequence. There are a total of 21 flow measurement points in the system, which are numbered in the following order starting from 1: GL, A, B, L, M, GL-F, GY-CQ, H, D, E, JG2-G, GY-ZY, ZY-CQ-1, ZY-CQ-2, JD2-Bu, ZY-C, R, P, K, X. Figure 2 As shown, the system measurement point variable vector x is obtained, and its component form is shown in the following equation:
[0126] x=(x1,x2,…,x 21 ) (19)
[0127] After this, construct the four output variables y=(y1,y2,y3,y4) as shown below T , which respectively represent the net inflow of the high-pressure cylinder, the net outflow of the high-pressure cylinder, the net inflow of the medium-pressure cylinder, and the net outflow of the medium-pressure cylinder. The relationship between them and the measured values of each measuring point in the thermal system y=f(x) is expressed by the following component form formulas:
[0128] y1=x1-x2-x3 (20)
[0129] y2=-x2+x4+x5+x6+x7+x8+x9+x 10 -x 11 +x 12 (twenty one)
[0130] y3=x7+x 13 -x 20 (twenty two)
[0131] y4=-x4+x 14 +x 15 +x 16 +x 17 +x 18 +x 19 +x 21 (23) Based on the output variables constructed above, the residual of the system's balance equation can be further listed. In this thermodynamic system, only the mass balance equation is involved; the mass balance equation is constructed for the high-pressure cylinder part and the medium-pressure cylinder part of the system respectively, and all the equation terms are moved to the left side of the equal sign, and the residual vector of the balance equation F = (F m,1 ,F m,2 ), its specific functional relationship F = g(y) is expressed by the following component form calculation formula:
[0132] Fm,1 =y1-y2 (24)
[0133] F m,2 =y3-y4 (25)
[0134] Therefore, a composite function relationship from the measured value x at the measuring point to the output variable y and then to the system equilibrium equation group F was constructed for the thermal system.
[0135] 2) For the system measurement point variable measurement value vector x proposed above, obtain the measurement value data of each measurement point of the system under a certain working condition, and generate the mean and covariance matrix. According to the flow measurement data of each measurement point in the thermal system during the operation of the power station, statistical calculation is performed according to formula (5) to obtain the mean value of the measurement value at each measurement point With the variance estimate The variance estimate can be further calculated according to formula (6) to construct the covariance matrix S between the measured values of each measuring point in the system: x , where the correlation coefficient can be determined based on engineering experience: 4,5 =ρ 5,4 =ρ 4,6 =ρ 6,4 =0.2,ρ 5,6 =ρ 6,5 =0.4. The covariance matrix thus calculated contains the statistical distribution information of the variables at each measuring point in the system, and is an important basis for correcting the measured values of each measuring point in the system in the subsequent calculation steps.
[0136] 3) Calculate the Jacobian matrix of the residual of the system equilibrium equation with respect to the measuring point variables through automatic differentiation technology. In order to judge the measurement error level according to the equilibrium relationship between the variables of each measuring point in the system, it is necessary to first calculate the Jacobian matrix J of the residual of the system equilibrium equation with respect to the measuring point variables. F,x To this end, the Jacobian matrix J of the output variable y with respect to the measurement point variable x can be calculated by automatic differentiation technology y,x , and the Jacobian matrix J of the residual F of the system equilibrium equation with respect to the output variable y F,y By inputting the above constructed equations (20) to (25) into the computer program, the Jacobian matrix Jy corresponding to the system can be quickly obtained by self-implementation or calling the existing automatic differentiation calculation module. ,x and JF ,y According to formula (7), the Jacobian matrix J of the residual error of the system equilibrium equation with respect to the measured point variables is obtained. F,x It reflects the dependence of the residual of the system balance equation on the measuring point variable and can be used to calculate the correction amount of the measuring point measurement value in the subsequent steps.
[0137] The Jacobian matrix is a key step in the correction process of the parameter measurement value of the entire thermal system, and its calculation accuracy and speed will directly affect the overall accuracy and overall speed of the entire calculation process. Compared with the classical method of calculating the Jacobian matrix by manually deriving analytical differentials or numerical approximate differential methods, the automatic differentiation method is used in the present invention to solve the Jacobian matrix. Automatic differentiation is a function differential solution method between symbolic differentiation and numerical differentiation. Its characteristics are that the symbolic differentiation method is applied to the most basic operator, and then the numerical value is substituted, the intermediate result is retained, and finally applied to the entire function. The automatic differentiation method does not need to spend a lot of calculation costs like simple symbolic differentiation to store large-scale intermediate calculation results, and also has a calculation accuracy similar to automatic differentiation and far higher than numerical differentiation. It has been widely used in fields such as deep learning. Therefore, compared with the classical method, the thermal system parameter measurement value correction method proposed in the present invention simultaneously realizes the high accuracy and high efficiency of Jacobian matrix calculation, and can flexibly adapt to the adjustment between the relationship between various parameters in the thermal system. For example, if the arrangement and connection relationship of the measuring points in this embodiment are changed, or the number of measuring points in the system is increased or decreased, the classical method has to re-derive the Jacobian matrix relationship and make major changes to the calculation program; given that the power plant thermal system analyzed in the actual engineering scenario is often much larger and more complex than the one analyzed in this embodiment, such changes will be extremely complicated. Under the framework proposed by the present invention, only the relationship (20) to (25) input in the first step needs to be changed, and the relevant code for calculating the Jacobian matrix based on automatic differentiation and the subsequent operation code do not need to be adjusted, thereby greatly improving the flexibility and adaptability of the thermal system parameter measurement value correction process.
[0138] 4) Calculate the correction of the measured value. Obtain the Jacobian matrix J F,x After that, the residual of the system balance equation can be calculated based on the mean and covariance data of the measured values of the measuring points, and the correction required for each measured value of the measuring point can be solved according to the relationship between the variables. First, the mean of the key quantity and the residual of the system balance equation can be calculated directly according to the functional relationship given by equations (20) to (25). and At the same time, according to the Jacobian matrix J calculated in the previous step F,x According to formula (9), the covariance matrix S of the residual vector of the system equilibrium equation can be obtained by transforming the covariance matrix of the measurement point measurement value: F In order to solve the correction value v of the measurement point, an optimization problem as shown in formula (10) is constructed, which is finally transformed into an unconstrained optimization problem to solve the following equation as shown in the following formula:
[0139]
[0140] Where λ is the Lagrange multiplier. By solving the optimization problem according to the process described above, the value of the correction can be obtained, which is expressed by the following calculation formula:
[0141]
[0142] The matrices and vectors on the right side of the equation have been obtained in the previous steps. Only a few inversions and matrix product operations are needed to obtain the specific value of the correction vector. At this point, the Jacobian matrix J can be directly calculated by automatic differentiation F,x And the covariance matrix S of the system equilibrium equation F Obtain the correction value of each measuring point in the system to minimize the residual error of the system equilibrium equation.
[0143] 5) Determine whether there are gross errors in the measured values of each measuring point, locate and eliminate possible gross errors. In order to determine whether there are gross errors in the measured values of each measuring point in the system, it is necessary to evaluate based on the size of the correction value v. To this end, first calculate the auxiliary vector shown in the following formula:
[0144]
[0145] Then calculate and check the gross error criterion K according to the following criteria:
[0146]
[0147] where F 2,∞;95% =2.60 is the 95% quantile of the F(2,∞) distribution. When the criterion in formula (30) is met, there is no gross error in the system measurement data; otherwise, there may be gross errors in the measurement values of each measuring point in the system. In order to further determine which measuring points the gross errors may occur, the following discriminant can be used to test the correction value v at each measuring point respectively: i :
[0148]
[0149] In the formula is the correction value v i The variance of , that is, the covariance matrix S calculated by formula (18) v The diagonal elements of is the variance of the measured value of the measuring point calculated according to formula (5). When the criterion (31) is satisfied, the measuring point x i There is no gross error on the measuring point x i The measured value on may contain gross errors. In order to eliminate the gross errors found in the inspection process, the sequential elimination method can be used to calculate the gross error criterion value K according to equation (31): iThe largest measuring point variable data is removed from the system, and then the calculation process of the above steps is repeated until the gross errors that may exist in the data of each measuring point are completely eliminated.
[0150] 6) Calculate the corrected measured values of the variables at each measuring point in the system. After eliminating the gross errors that may exist in the measured data of each measuring point in the system, the corrected value vector v calculated in the last step can be added to the mean vector of the measured value of the measuring point as the final correction vector The correction process is completed. The average value of each measuring point after correction is:
[0151]
[0152] The covariance matrix reflecting the random correlation between the measurement points is corrected as follows:
[0153]
[0154] Where S v is the correction value covariance matrix calculated according to formula (18). So far, the correction process of the thermal system measurement value in this specific embodiment has been completed.
[0155] Although the present invention has been described in detail above with general descriptions and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements may be made thereto based on the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection claimed by the present invention.
Claims
1. A method for correcting measured values of power plant thermal system parameters based on automatic differentiation, characterized in that: The following steps are involved: 1) According to the actual research of the power plant thermal system and the arrangement of measuring instruments, a parameter measurement balance relationship model of the power plant thermal system is constructed; 2) For the parameter measurement balance relationship model constructed in step 1), obtain the measurement value data of each measurement point under a certain working condition, and generate the measurement value mean and covariance matrix; suppose that for a certain measurement point x in the system within a certain period of time i n measurements were made, and a series of measurement values were obtained: i1 , x i2 , …, x in , then the mean and variance estimates of the measured values at this measuring point are calculated as follows: in is the estimated value of the mean at the measuring point, is the unbiased estimate of the variance at the measuring point; The correlation coefficient ρ between the variables of these measuring points is formulated based on the historical observation values or engineering experience during actual operation. ij , construct the covariance matrix S between the measured values of each measuring point x , whose elements are given by: The covariance matrix calculated according to the above formula contains the statistical distribution information of the variables at each measurement point in the system; 3) Starting from the mean and covariance matrix of the measured values generated in step 2), the Jacobian matrix of the residual of the system equilibrium equation with respect to the measured point variables is calculated by automatic differentiation technology; the Jacobian matrix J of the output variable y with respect to the measured point variable x is calculated by automatic differentiation technology respectively y,x , and the Jacobian matrix J of the residual F of the system equilibrium equation with respect to the output variable y F,y ; Then, the Jacobian matrix of the residual of the system equilibrium equation with respect to the measurement point variables is solved by the chain rule, as shown in the following formula: I F,x =J F,y I y,x (7) 4) According to the Jacobian matrix obtained in step 3), a constrained optimization problem about the correction amount of each measuring point in the system is constructed to solve the correction amount of the measured value of the measuring point; the Jacobian matrix J is obtained F,x Afterwards, the residual of the system equilibrium equation is calculated based on the mean and covariance data of the measured values at the measuring points, and the correction required for each measured value at the measuring point is solved based on the relationship between the variables; 5) According to the correction amount of each measuring point calculated in step 4), calculate the gross error criterion, judge whether there is a gross error in the measurement value of each measuring point, locate and eliminate the possible gross error; 6) After eliminating the gross errors in the measurement data, the measured values of the variables at each measuring point of the corrected system are obtained through the correction calculation results of the final step.
2. A method for correcting measured values of power plant thermal system parameters based on automatic differentiation according to claim 1, characterized in that: In step 1), the parameter measurement balance relationship model is expressed by the following relationship: y=f(x), F=g(y) (1) In the formula, x represents the measurement value vector of the measuring point corresponding to the instruments actually arranged in the system, including the measurement values of flow, temperature and pressure sensors; y represents the key physical quantity vector obtained by combining the measurement values or solving the model, which is called the output variable; F represents the residual vector of the equation obtained by substituting the key physical quantity into the system balance equation; The system balance equations include mass balance equations and energy balance equations. The mass balance equation indicates that the net flow at the specified node is zero and has the following form: f m,i =q in,i -q out,i =0 (2) Where f m,i represents the residual of the mass balance equation listed at the i-th node, q in,i represents the total inflow flow at the i-th node, q out,i represents the total outflow at the i-th node; the energy balance equation indicates that the net increase rate of energy at the specified node is zero, and has the following form: f e,j =H in,j -H out,j =0 (3) Where f e,j represents the residual of the energy balance equation listed at the jth node, H in,j With H out,j They represent the total inflow enthalpy and total outflow enthalpy at the jth node respectively; the total inflow enthalpy is calculated as follows: H in,j =∑ k h jk q k (4) where q k represents the flow rate of any fluid flowing into the node, h jk It represents the specific enthalpy corresponding to the fluid in this path; construct a composite function relationship from the measurement value x at the measuring point to the output variable y and then to the system equilibrium equation group F.
3. A method for correcting measured values of power plant thermal system parameters based on automatic differentiation according to claim 2, characterized in that: The specific implementation method of step 4) is: according to the functional relationship given by formula (1), the mean of the key quantity and the residual of the system balance equation is calculated in sequence: in and are the means of the key quantity vector and the residual vector of the system balance equation respectively; the covariance matrix S of the residual vector of the system balance equation is obtained by the covariance matrix transformation of the measurement point measurement value F , as shown below: In order to solve the correction value v of the measurement point, a constrained optimization problem is constructed as follows: The optimization objective function l(v) is the inverse matrix of the covariance matrix For the quadratic form of the correction v, the optimization goal is the minimum value of the function to ensure that the overall level of the correction is minimized; the Lagrange multiplier method is used to solve the optimization problem, and the multiplier λ is introduced to transform the problem into an unconstrained optimization problem as shown below: At this time, the stationary condition Solving this problem, we get the equation: That is to say Multiply the Jacobian matrix J on both sides of the equation. F,x , convert the equation into the following form: J F,x v=S F λ(12) According to the constraint equation, it is known that Substituting the left side of the equation into the multiplier, we can solve it as: Substituting the multiplier solution back into equation (12), the correction amount can be obtained, which can be expressed as the following calculation formula: At this point, the Jacobian matrix J can be calculated by automatic differentiation F,x And the covariance matrix S of the system equilibrium equation F Obtain the correction value of each measuring point in the system to minimize the residual error of the system equilibrium equation.
4. A method for correcting measured values of power plant thermal system parameters based on automatic differentiation according to claim 3, characterized in that: In step 5), it is determined whether there is a gross error in the measured value of each measuring point in the system, and an evaluation is performed based on the magnitude of the correction value v. For this purpose, the auxiliary vector shown in the following formula is calculated: Then calculate and check the gross error criterion K according to the following criteria: where n F is the number of equilibrium equations of the system, F(n F ,∞) distribution, obtained by looking up a table or computer program; when the criterion in formula (16) is met, there is no gross error in the system measurement data; otherwise, there may be gross errors in the measurement values of each measuring point in the system. In order to further determine which measuring points the gross errors may occur, the following discriminant is used to test the correction value v at each measuring point respectively. i : In the formula is the correction value v i The variance of , that is, the covariance matrix S calculated by the following formula v The diagonal elements of : and is the variance of the measured value of the measuring point calculated according to formula (5). When the criterion (17) is satisfied, the measuring point x i There is no gross error on the measuring point x i The measurements above may contain gross errors; In order to eliminate the gross errors found in the inspection process, the sequential elimination method is adopted, and the gross error criterion value K is calculated according to formula (17): i The largest measuring point variable data is removed from the system, and then the above calculation steps are repeated until the gross errors that may exist in the data of each measuring point are completely eliminated.
5. A method for correcting measured values of power plant thermal system parameters based on automatic differentiation according to claim 4, characterized in that: In step 6), the correction value vector v calculated in the last step is added as the final correction vector to the mean vector of the measured value of the measuring point The correction process is completed, and the average value of each measuring point after correction is: The covariance matrix reflecting the random correlation between the measurement points is corrected as follows: Where S v is the covariance matrix of the correction value calculated according to formula (18). At this point, the correction process of the measured values of the thermal system of the entire power station is completed.
Citation Information
Patent Citations
Multi-target optimization method used for determining composite material constitutive equation parameter
CN107273590A
Interval model correction method taking correlation into account
CN108563895A