A tubing leak detection method and system based on maximum entropy unscented kalman filter under codec mechanism
By combining the maximum entropy unscented Kalman filter with the encoding and decoding mechanism, the problem of insufficient accuracy caused by nonlinear characteristics and non-Gaussian noise in oil pipeline leak detection is solved, and efficient leak point detection and location are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHEAST GASOLINEEUM UNIV
- Filing Date
- 2026-02-12
- Publication Date
- 2026-05-29
Smart Images

Figure CN122113407A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil pipe leak detection technology, and more specifically, to an oil pipe leak detection method and system based on maximum entropy unscented Kalman filtering under an encoding and decoding mechanism. Background Technology
[0002] As a vital energy source in modern society, oil holds significant importance for countries worldwide in terms of its extraction, transportation, and utilization. However, with the extended operation time of oil pipelines and changes in the external environment, oil pipeline leaks have become increasingly serious in recent years, posing a severe challenge to human society and the natural environment. Therefore, researchers have been continuously exploring and developing efficient pipeline leak detection technologies.
[0003] Pipelines are affected by random environmental factors, and the sensors installed on them also produce random errors due to limited accuracy. Therefore, state estimation can be directly performed using filtering techniques, providing a foundation for leak detection and location procedures. However, existing methods still have significant shortcomings. Traditional Kalman filtering is sensitive to nonlinear systems, leading to large errors; Extended Kalman Filtering (EKF) is prone to linearization instability when the local nonlinear assumption fails, and the Jacobian matrix calculation is complex, often resulting in unrealizable results; in contrast, Unscented Kalman Filtering (UKF) uses the Unscented Transform (UT) to approximate the probability density function of the nonlinear function, making it better suited to nonlinear systems. However, it is highly dependent on Gaussian distribution, so it cannot perform accurate estimation in non-Gaussian environments. Real-world operating conditions are often not ideal, with non-Gaussian noise present everywhere. Therefore, state estimation in non-Gaussian environments remains a challenge. Furthermore, during data transmission, the transmission channel is usually limited by bandwidth and energy, resulting in a significant bottleneck in the amount of data that can be transmitted. Based on the above, research on accurate estimation of nonlinear systems with limited data transmission in non-Gaussian environments is essential. Summary of the Invention
[0004] The technical problem to be solved by this invention is:
[0005] To address the problem of insufficient accuracy in detecting and locating leaks in existing oil pipeline leak detection methods due to nonlinear characteristics, non-Gaussian noise, and limited transmission channels.
[0006] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0007] This invention provides a method for detecting oil pipe leaks based on maximum entropy unscented Kalman filtering under an encoding and decoding mechanism, comprising the following steps:
[0008] S100. Establish an oil pipeline model, add a leakage model, and obtain a state-space model after discretization.
[0009] S200 introduces a dynamic encoding / decoding mechanism to construct the structure of a recursive filter;
[0010] S300, Calculated via unscented transformation Point set, A new set of points is obtained after transformation by a nonlinear function. The point set is then weighted and calculated to obtain... Prior estimation of time and prior error covariance ;
[0011] S400. Calculate the estimated error covariance using matrix inequalities. The upper bound matrix is used to calculate the estimation error by introducing the maximum correlation entropy index. and gain matrix ;
[0012] S500, Calculate the estimated value for the next time step and jump to step S300 to begin execution;
[0013] S600: By setting virtual leak points in pipeline segments and estimating the leakage amount, it is determined whether the pipeline is leaking and the actual leak point is located.
[0014] Further, in step S100, the following are included:
[0015] Establish the momentum equation based on Newton's second law:
[0016] (1)
[0017] Establish a continuity equation based on the law of conservation of mass:
[0018] (2)
[0019] in, For traffic, This is the pressure head value. Using time as the coordinate, It is the acceleration due to gravity. The cross-sectional area of the pipe. The inner diameter of the pipe. For fluid wave velocity, The coefficient of friction;
[0020] The pipeline is divided into sections using the method of characteristics. Segments, each segment is [length missing] Spatial nodes are The time point is The system of equations is then approximated using the finite difference method and transformed into a system of difference equations:
[0021]
[0022] in, For spatial nodes The time point is Traffic; For spatial nodes The time point is The pressure head value;
[0023] The pipeline is divided into n segments, and virtual leak points are set at n-1 segmentation points. The pipeline leakage model is then equivalently treated as a thin-walled orifice model.
[0024]
[0025] in, For spatial nodes The time point is Leakage rate, , for spatial nodes A leakage coefficient of -1 The orifice flow coefficient, The area of the leakage hole;
[0026] When a pipeline leaks, the pipeline model after incorporating the leak model is described as follows:
[0027]
[0028] Considering there are two flow sensors at each end of the pipe, the system output is defined as follows: The state vector is defined as follows: The control input vector is defined as follows: ; Let the nonlinear term be: Leakage item is ;
[0029] Therefore, the state-space model of the pipeline is:
[0030]
[0031] in, , and This is the coefficient matrix in the state equation. This is the coefficient matrix in the observation equation; This indicates that the mean is zero and the covariance matrix is zero. Process noise; This indicates that the mean is zero and the covariance matrix is zero. Measurement noise.
[0032] Further, in step S200, the following are included:
[0033] Assuming each communication channel is equipped with a pair of dynamic encoders and decoders, encoding is first performed according to the following rules:
[0034]
[0035] in, for Quantitative input of time, for The internal state of the time encoder This represents the initial internal state of the encoder. yes The time will be sent to the quantized output of the corresponding decoder. It is a scalar; The quantizer is defined as follows:
[0036]
[0037] in, Indicates the quantization interval, and This is the index of the quantization interval, used to specify the output value corresponding to the m-th quantization interval. It is the value that is taken by itself; x represents the independent variable in the quantizer;
[0038] Secondly, Send to the decoder, where Decode according to the following rules:
[0039]
[0040] in, This is the output of the decoder; This is the initial output of the decoder;
[0041] Then, the errors caused by encoding and decoding Expressed as follows:
[0042]
[0043] Therefore, the following recursive filter structure is constructed:
[0044]
[0045] in, for Prior estimates of time; for time The estimated value; This is the gain matrix.
[0046] Further, in step S300, the following are included:
[0047] S310. Let the initial conditions of the state be:
[0048]
[0049] in, The initial state of the estimated value, As the initial value, This is the initial value for the error covariance;
[0050] S320, Calculation dot set and weight :
[0051]
[0052] in, The initial value of the sigma point. The selection range for sigma points; As the initial mean weight, As the initial covariance weights, For the first The average weight of each sigma;
[0053] choose indivual point These points are known by their estimated values. and the estimated error covariance matrix It is concluded that, Represents the mean. Represents covariance; It is an adjustable proportional parameter. These are auxiliary scaling parameters; It is a small positive value; It is a non-negative number used to control the estimation accuracy of the covariance matrix;
[0054] S330, will After the points are transformed by a nonlinear function, a set of points is obtained. point:
[0055]
[0056] in, This represents the predicted sigma point obtained after transformation by a nonlinear function.
[0057] S340, By applying the above transformation A weighted average is performed on the points to obtain the prior estimate. The calculation formula is:
[0058]
[0059] S350, through the The point set is used for state transition to obtain the system's prior error covariance. :
[0060]
[0061] Further, in step S400, the following is included:
[0062] Prediction error estimation error and the covariance of the estimation error The definition is as follows:
[0063]
[0064] The estimation error is calculated according to formula (21):
[0065]
[0066] Where I is a unit vector;
[0067] The covariance of the estimation error is derived from (21) and (22):
[0068]
[0069] For the uncertainty terms in the estimation error covariance matrix, we construct their respective upper bound matrices using matrix inequalities.
[0070]
[0071] in, This represents the upper bound of the estimation error covariance matrix; Indicates a value greater than zero;
[0072] Introducing the maximum correlation entropy index :
[0073]
[0074] The gain matrix is designed by maximizing the evaluation function. ;
[0075] right about Take the partial derivative of and set it equal to zero:
[0076]
[0077] Therefore, we can conclude that:
[0078]
[0079] Based on formulas (14) and (27), the filter gain is obtained. :
[0080]
[0081] Among them, the definition , It has a core-size bandwidth Gaussian kernel function, .
[0082] Further, in step S600, the following are included:
[0083] S610. Divide the pipeline evenly into n sections, in which... Virtual leak points are set at each section location to ensure that there are no leak points at the beginning and end of the pipeline;
[0084] S620. The leakage at each point along the pipeline is used as a state variable for estimation, and the estimated values are summed to obtain the total leakage of the pipeline.
[0085] S630. Determine if the pipeline is leaking based on the total leakage amount, and locate the actual leak point using the relationship between the leakage amount and the location of the leak point:
[0086]
[0087] in, This represents the estimated total leakage rate. Indicates the estimated location of the leak. This represents the leakage rate of segment i. This represents the location of the virtual leak point in the i-th node.
[0088] The oil pipe leak detection system based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism has a program module corresponding to the above steps. When running, it executes the steps in the oil pipe leak detection method based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism.
[0089] A computer-readable storage medium storing a computer program configured to, when invoked by a processor, implement the steps of a pipe leak detection method based on maximum entropy unscented Kalman filtering under an encoding / decoding mechanism.
[0090] Compared with the prior art, the beneficial effects of the present invention are:
[0091] This invention addresses practical problems encountered in oil pipeline leaks, such as insufficient accuracy in leak detection and location due to nonlinear characteristics, non-Gaussian noise, and limited transmission channels. It proposes an efficient state estimation method. By introducing an encoding-decoding mechanism, a recursive filter structure is constructed, combined with unscented transform and the maximum entropy criterion to design a novel state estimation algorithm. The encoding-decoding mechanism quantizes the raw data into a digital form suitable for channel transmission, improving transmission efficiency and ensuring data security. The maximum correlation entropy criterion uses a Gaussian kernel function to nonlinearly weight the error, reducing the impact of non-Gaussian noise in the estimation process and improving the filter's anti-interference capability. This invention introduces an encoding-decoding mechanism into the observation output stage of the unscented Kalman filter and uses the maximum correlation entropy criterion instead of the traditional minimum mean square error as the optimization objective, thus simultaneously solving the problems of insufficient estimation accuracy and low raw data transmission efficiency under non-Gaussian noise environments. Attached Figure Description
[0092] Figure 1 This is a flowchart of the oil pipe leakage detection method based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism in an embodiment of the present invention;
[0093] Figure 2 This is a diagram illustrating the structure of a virtual leak point in an oil pipeline according to an embodiment of the present invention.
[0094] Figure 3 When an oil pipeline leaks in an embodiment of the present invention, the pipeline... The curve showing the change in the estimated value;
[0095] Figure 4 When an oil pipeline leaks in an embodiment of the present invention, the pipeline... The curve showing the change in the estimated value;
[0096] Figure 5 When an oil pipeline leaks in an embodiment of the present invention, the pipeline... The curve showing the change in the estimated value;
[0097] Figure 6 When an oil pipeline leaks in an embodiment of the present invention, the pipeline... The curve showing the change in the estimated value;
[0098] Figure 7 This is a graph showing the estimated leakage rate variation in an embodiment of the present invention. Detailed Implementation
[0099] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0100] Specific Implementation Plan 1: Combining Figure 1 and Figure 2 As shown, this invention provides a method for detecting oil pipe leaks based on maximum entropy unscented Kalman filtering under an encoding and decoding mechanism, comprising the following steps:
[0101] S100. Establish an oil pipeline model, add a leakage model, and obtain a state-space model after discretization.
[0102] include,
[0103] Establish the momentum equation based on Newton's second law:
[0104] (1)
[0105] Establish a continuity equation based on the law of conservation of mass:
[0106] (2)
[0107] in, For traffic ( ), The pressure head value ( ), For time coordinates ( ), The acceleration due to gravity ( ), The cross-sectional area of the pipe ( ), The inner diameter of the pipe ( ), For fluid wave velocity ( ), The coefficient of friction;
[0108] Since the analytical solutions of formulas (1) and (2) are difficult to process using filtering algorithms, the characteristic line method is used to divide the pipeline into... Segments, each segment is [length missing] Spatial nodes are The time point is By using the finite difference method to approximate the system of equations into a system of difference equations, we can obtain:
[0109]
[0110] in, For spatial nodes The time point is Traffic; Spatial nodes are The time point is Indentation value ( );
[0111] Assuming the pipeline leak occurs at any location other than both ends of the pipeline, a virtual leak point is introduced on the pipeline, and a state estimation method is used for pipeline leak diagnosis; combined with Figure 2 As shown, the pipeline is divided into n segments, and virtual leak points are set at n-1 segmentation points (excluding the two ends); the pipeline leak model is equivalently treated as a thin-walled orifice model, which can be simplified to:
[0112]
[0113] in, For spatial nodes The time point is Leakage rate ( ), ,here For spatial nodes -1 leakage coefficient ( ), The orifice flow coefficient, The area of the leakage hole ( );
[0114] When a pipeline leaks, the oil pipeline model after incorporating the leak model can be described as follows:
[0115]
[0116] Next, considering that there are two flow sensors at each end of the pipe, the system output is defined as follows: The state vector is defined as follows: The control input vector is defined as follows: ; Let the nonlinear term be: Leakage item is ;
[0117] Therefore, the state-space model of the pipeline is:
[0118]
[0119] in, , and This is the coefficient matrix in the state equation. This is the coefficient matrix in the observation equation; This indicates that the mean is zero and the covariance matrix is zero. Process noise; This indicates that the mean is zero and the covariance matrix is zero. Measurement noise;
[0120] S200 introduces a dynamic encoding / decoding mechanism to construct the structure of a recursive filter;
[0121] include,
[0122] Assuming each communication channel is equipped with a pair of dynamic encoders and decoders, encoding is first performed according to the following rules:
[0123]
[0124] in, for The quantization input to the encoder at each time step. for The internal state of the time encoder This represents the initial internal state of the encoder. yes The time will be sent to the quantized output of the corresponding decoder. It is a scalar; The quantizer is defined as follows:
[0125]
[0126] in, Indicates the quantization interval, and This is the index of the quantization interval, used to specify the output value corresponding to the m-th quantization interval. It is the value that is taken by itself; x represents the independent variable in the quantizer;
[0127] Secondly, Send to the decoder, where Decode according to the following rules:
[0128]
[0129] in, This is the output of the decoder. This is the initial output of the decoder;
[0130] Then, the errors caused by encoding and decoding Expressed as follows:
[0131]
[0132] Therefore, we construct the following recursive filter structure:
[0133]
[0134] in, for Prior estimates of time; for time The estimated value; The gain matrix of the estimator to be designed;
[0135] S300, Calculated via unscented transformation Point set, A new set of points is obtained after transformation by a nonlinear function. The point set is then weighted and calculated to obtain... Prior estimation of time and prior error covariance ;
[0136] include,
[0137] S310. Let the initial conditions of the state be:
[0138]
[0139] in, The initial state of the estimated value, As the initial value, To estimate the initial value of the error covariance;
[0140] S320, Calculation dot set and weight :
[0141]
[0142]
[0143] in, The initial value of the sigma point. The selection range for sigma points; As the initial mean weight, As the initial covariance weights, For the first The average weight of each sigma;
[0144] We choose indivual point These points are known by their estimated values. and the estimated error covariance matrix It can be concluded that; It is an adjustable proportional parameter; It is usually a small positive value, which determines Points distributed in The surrounding area These are auxiliary scaling parameters; It is used to control the estimation accuracy of the covariance matrix, and is a non-negative number, usually taken as 2;
[0145] S330, subsequently After the points are transformed by a nonlinear function, a set of points is obtained. point:
[0146]
[0147] in, This represents the predicted sigma point obtained after transformation by a nonlinear function.
[0148] S340, By applying the above transformation A weighted average is performed on the points to obtain the prior estimate. The calculation formula is:
[0149]
[0150] S350, through the By performing state transitions on the point set, the prior error covariance of the system can be obtained. :
[0151]
[0152] S400. Calculate the estimated error covariance using matrix inequalities. The upper bound matrix is used to calculate the prior estimate by introducing the maximum correlation entropy index. and gain matrix ;
[0153] include,
[0154] Prediction error estimation error and estimation error covariance The definition is as follows:
[0155]
[0156] The estimation error can be calculated using formula (21):
[0157]
[0158] Where I is a unit vector;
[0159] Therefore, based on (21) and (22), the covariance of the estimation error can be derived:
[0160]
[0161] For the uncertainty terms in the estimation error covariance matrix, their respective upper bound matrices are constructed here using matrix inequalities;
[0162]
[0163] in, This represents the upper bound of the estimation error covariance matrix; Indicates a value greater than zero;
[0164] Then, we introduce the maximum correlation entropy metric here. :
[0165]
[0166] Following this, the gain matrix will be designed by maximizing the evaluation function. First, regarding about Take the partial derivative of and set it equal to zero:
[0167]
[0168] Therefore, we can conclude that:
[0169] Based on formulas (14) and (27), we can obtain the filter gain. :
[0170]
[0171] Among them, the definition , It has a core-size bandwidth Gaussian kernel function, ;
[0172] S500, Calculate the estimated value for the next time step and jump to step S300 to begin execution;
[0173] S600: By setting virtual leak points in pipeline segments and estimating the leakage amount, it is determined whether the pipeline is leaking and the actual leak point is located.
[0174] include,
[0175] S610. Divide the pipeline evenly into n sections, in which... Virtual leak points are set at each section location to ensure that there are no leak points at the beginning and end of the pipeline;
[0176] S620. The leakage at each point along the pipeline is used as a state variable for estimation, and the estimated values are summed to obtain the total leakage of the pipeline.
[0177] S630. Determine if the pipeline is leaking based on the total leakage amount, and locate the actual leak point using the relationship between the leakage amount and the location of the leak point; the specific formula is as follows:
[0178]
[0179] in, This represents the estimated total leakage rate. This indicates the estimated location of the leak, while This indicates the location of the virtual leak point of the i-th node.
[0180] Specific Implementation Scheme 2: The present invention provides an oil pipe leakage detection system based on maximum entropy unscented Kalman filtering under an encoding and decoding mechanism. The system has a program module corresponding to the above steps, and executes the steps in the above-described oil pipe leakage detection method based on maximum entropy unscented Kalman filtering under an encoding and decoding mechanism when running.
[0181] The other combinations and connections in this implementation scheme are the same as in Specific Implementation Scheme 1.
[0182] Specific Implementation Scheme 3: The present invention provides a computer-readable storage medium storing a computer program configured to, when called by a processor, implement the steps of an oil pipe leakage detection method based on maximum entropy unscented Kalman filtering under an encoding and decoding mechanism.
[0183] The other combinations and connections in this implementation scheme are the same as in Specific Implementation Scheme 1.
[0184] Simulation Experiment
[0185] The parameters for the oil pipeline system are selected as follows:
[0186]
[0187] in,
[0188] , , , , ;
[0189] ; ;
[0190] ,
[0191] Furthermore, we model both process noise and measurement noise using Gaussian mixture noise: , The initial value is set to For the encoding / decoding mechanism model, the parameters are set as follows: .
[0192] exist At a given time (Time), a virtual leak occurs 150 meters into the pipeline system, with a sudden leakage rate of [missing value]. This is equivalent to 10% of the initial traffic itself. .like Figure 3 and Figure 4 As shown, after the leak occurred, the pressure head deviated from its steady state and dropped sharply, then stabilized after a brief fluctuation. This phenomenon occurs because the leak altered the local flow field distribution, leading to a decrease in pressure head near the leak point. Therefore, it can be inferred that the leak likely occurred at time 100 seconds. Figure 5 and Figure 6 The flow rate change curve is shown, indicating that the flow rate also decreased significantly and gradually approached a new steady state. Furthermore, from... Figures 3 to 6 It can be seen that the fitting accuracy between the predicted values and the actual state remains at a high level, indicating that the proposed algorithm can accurately track the dynamic changes of the oil pipeline system.
[0193] Figure 7 The simulation results shown compare the estimated and measured values of the leakage flow: the solid blue line represents the estimated value, and the dashed green line represents the measured value. This demonstrates that the designed algorithm can respond quickly and estimate the leakage flow with high accuracy when a leak occurs. The estimated leakage location is calculated based on the estimated leakage flow and formula (29). The simulation results closely match the actual leak location. Simulation results demonstrate that this leak detection method has significant performance advantages in detecting leaks in oil pipelines.
[0194] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A method for detecting oil pipe leaks based on maximum entropy unscented Kalman filtering under an encoding and decoding mechanism, characterized in that, Includes the following steps: S100. Establish an oil pipeline model, add a leakage model, and obtain a state-space model after discretization. S200 introduces a dynamic encoding / decoding mechanism to construct the structure of a recursive filter; S300, Calculated via unscented transformation Point set, A new set of points is obtained after transformation by a nonlinear function. The point set is then weighted and calculated to obtain... Prior estimation of time and prior error covariance ; S400. Calculate the estimated error covariance using matrix inequalities. The upper bound matrix is used to calculate the estimation error by introducing the maximum correlation entropy index. and gain matrix ; S500, Calculate the estimated value for the next time step and jump to step S300 to begin execution; S600: By setting virtual leak points in pipeline segments and estimating the leakage amount, it is determined whether the pipeline is leaking and the actual leak point is located.
2. The method for detecting oil pipe leaks based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism according to claim 1, characterized in that: In step S100, the following are included: Establish the momentum equation based on Newton's second law: (1) Establish a continuity equation based on the law of conservation of mass: (2) in, For traffic, This is the pressure head value. Using time as the coordinate, It is the acceleration due to gravity. The cross-sectional area of the pipe. The inner diameter of the pipe. For fluid wave velocity, The coefficient of friction; The pipeline is divided into sections using the method of characteristics. Segments, each segment is [length missing] Spatial nodes are The time point is The system of equations is then approximated using the finite difference method and transformed into a system of difference equations: (3) (4) in, For spatial nodes The time point is Traffic; For spatial nodes The time point is The pressure head value; The pipeline is divided into n segments, and virtual leak points are set at n-1 segmentation points. The pipeline leakage model is then equivalently treated as a thin-walled orifice model. (5) in, For spatial nodes The time point is Leakage rate, , for spatial nodes A leakage coefficient of -1 The orifice flow coefficient, The area of the leakage hole; When a pipeline leaks, the pipeline model after incorporating the leak model is described as follows: (6) (7) Considering there are two flow sensors at each end of the pipe, the system output is defined as follows: The state vector is defined as follows: The control input vector is defined as follows: ; Let the nonlinear term be: Leakage item is ; Therefore, the state-space model of the pipeline is: in, , and This is the coefficient matrix in the state equation. This is the coefficient matrix in the observation equation; This indicates that the mean is zero and the covariance matrix is zero. Process noise; This indicates that the mean is zero and the covariance matrix is zero. Measurement noise.
3. The method for detecting oil pipe leaks based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism according to claim 2, characterized in that: Step S200 includes, Assuming each communication channel is equipped with a pair of dynamic encoders and decoders, encoding is first performed according to the following rules: (10) in, for Quantitative input of time, for The internal state of the time encoder This represents the initial internal state of the encoder. yes The time will be sent to the quantized output of the corresponding decoder. It is a scalar; The quantizer is defined as follows: (11) in, Indicates the quantization interval, and This is the index of the quantization interval, used to specify the output value corresponding to the m-th quantization interval. It is the value that is taken by itself; x represents the independent variable in the quantizer; Secondly, Send to the decoder, where Decode according to the following rules: (12) in, This is the output of the decoder; This is the initial output of the decoder; Then, the errors caused by encoding and decoding Expressed as follows: (13) Therefore, the following recursive filter structure is constructed: (14) in, for Prior estimates of time; for time The estimated value; This is the gain matrix.
4. The method for detecting oil pipe leaks based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism according to claim 3, characterized in that: Step S300 includes, S310. Let the initial conditions of the state be: (15) in, The initial state of the estimated value, As the initial value, This is the initial value for the error covariance; S320, Calculation dot set and weight : (16) (17) in, The initial value of the sigma point. The selection range for sigma points; As the initial mean weight, As the initial covariance weights, For the first The average weight of each sigma; choose indivual point These points are known by their estimated values. and the estimated error covariance matrix It is concluded that, Represents the mean. Represents covariance; It is an adjustable proportional parameter. These are auxiliary scaling parameters; It is a small positive value; It is a non-negative number used to control the estimation accuracy of the covariance matrix; S330, will After the points are transformed by a nonlinear function, a set of points is obtained. point: (18) in, This represents the predicted sigma point obtained after transformation by a nonlinear function. S340, By applying the above transformation A weighted average is performed on the points to obtain the prior estimate. The calculation formula is: (19) S350, through the The point set is used for state transition to obtain the system prior error covariance. : (20)。 5. The method for detecting oil pipe leaks based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism according to claim 4, characterized in that: In step S400, the following are included: Prediction error estimation error and the covariance of the estimation error The definition is as follows: (21) The estimation error is calculated according to formula (21): (22) Where I is a unit vector; The covariance of the estimation error is derived from (21) and (22): For the uncertainty terms in the estimation error covariance matrix, we construct their respective upper bound matrices using matrix inequalities. in, This represents the upper bound of the estimation error covariance matrix; Indicates a value greater than zero; Introducing the maximum correlation entropy index : The gain matrix is designed by maximizing the evaluation function. ; right about Take the partial derivative of and set it equal to zero: Therefore, we can conclude that: Based on formulas (14) and (27), the filter gain is obtained. : Among them, the definition , It has a core-size bandwidth Gaussian kernel function, .
6. The method for detecting oil pipe leaks based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism as described in claim 5, characterized in that: Step S600 includes, S610. Divide the pipeline evenly into n sections, in which... Virtual leak points are set at each section location to ensure that there are no leak points at the beginning and end of the pipeline; S620. The leakage at each point along the pipeline is used as a state variable for estimation, and the estimated values are summed to obtain the total leakage of the pipeline. S630. Determine if the pipeline is leaking based on the total leakage amount, and locate the actual leak point using the relationship between the leakage amount and the location of the leak point: in, This represents the estimated total leakage rate. Indicates the estimated location of the leak. This represents the leakage rate of segment i. This represents the location of the virtual leak point in the i-th node.
7. A pipeline leak detection system based on maximum entropy unscented Kalman filtering under an encoding / decoding mechanism, characterized in that: The system has a program module corresponding to the steps of any one of claims 1-6 above, and executes the steps in the above-described method for detecting oil pipe leaks based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism when it is run.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program configured to, when invoked by a processor, implement the steps of the oil pipe leakage detection method based on maximum entropy unscented Kalman filtering under the encoding and decoding mechanism as described in any one of claims 1-6.