A natural gas pipeline fault detection method, system, device and medium

By calculating the transmission parameter matrix of the natural gas pipeline and Fourier transforming the flow and pressure data, the problem of difficulty in quickly judging natural gas network failures is solved, and rapid and online fault detection and control are achieved.

CN118959902BActive Publication Date: 2024-12-24STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411433980.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-12-24
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

In the context of gas-electric coupling, it is difficult for the power system to quickly judge the fault information of the natural gas network, resulting in the inability to perform corresponding control operations in a timely manner.

Method used

By obtaining the basic parameters and distribution parameters of the natural gas pipeline, calculating the transmission parameter matrix, and performing Fourier transform and inverse transformation of the flow and pressure data, the square root deviation is quantified to determine the fault type.

Benefits of technology

It realizes fast and online natural gas pipeline fault detection, can quickly determine the fault type and perform corresponding control operations, and is suitable for gas-electric chain fault warning scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118959902B_ABST
    Figure CN118959902B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of pipeline fault detection, and discloses a natural gas pipeline fault detection method, system, equipment and medium. The method comprises the following steps: performing Fourier transform on the dynamic measurement data of the natural gas pipeline, namely flow rate and pressure, and representing the transformation result by the sum of a finite number of sinusoidal steady states. Under each sinusoidal steady state, the natural gas pipeline has a definite two-port parameter matrix, namely, a flow matrix and a pressure matrix at the head end of the pipeline and a flow matrix and a pressure matrix at the end of the pipeline. Then, the root mean square deviation of the natural gas pipeline is quantified based on the flow matrix and the pressure matrix at the head end and the end end of the pipeline. The fault type of the natural gas pipeline can be determined according to the calculated root mean square deviation, so that the power system connected to the natural gas network can perform corresponding control operations according to the content of the natural gas fault. The fault detection scheme based on the dynamic characteristics of the pipeline port described in the present invention has the characteristics of being fast and capable of online analysis, and is suitable for gas-electricity interlocking fault early warning scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pipeline fault detection, and in particular to a natural gas pipeline fault detection method, system, equipment and medium. Background Art

[0002] At present, natural gas has become an important force in promoting energy transformation, and its share of power generation has increased year by year. On the one hand, the natural gas network provides more flexible resources for the power system, which helps to improve the reliability and economy of power supply; on the other hand, the impact of natural gas network failures on the power system is also increasing, which requires the power system to have a more accurate grasp of the status information of the natural gas network in order to achieve fault warning and emergency control. However, in most cases, the power system and the natural gas system belong to different management departments, making it difficult to quickly and fully share information, and it is impossible to quickly determine the fault problems of the natural gas network, and thus it is impossible for the power system to perform corresponding control operations.

[0003] It can be seen that, in the context of gas-electricity coupling, how to quickly determine the fault information of the natural gas network based on the measurement data of the natural gas system has become a technical problem that needs to be urgently solved by those skilled in the art. Summary of the invention

[0004] The present invention provides a natural gas pipeline fault detection method, system, equipment and medium to solve the problem of how to quickly determine the fault information of the natural gas network based on the measured data of the natural gas system under the background of gas-electricity coupling.

[0005] In order to solve the above technical problems, the first aspect of the present invention provides a natural gas pipeline fault detection method, comprising:

[0006] Acquiring basic parameters of a natural gas pipeline, and quantifying distribution parameters of the natural gas pipeline according to the basic parameters;

[0007] A plurality of branch points are arranged on the natural gas pipeline, and a first transmission parameter matrix between the head end of the natural gas pipeline and each branch point, and a second transmission parameter matrix between each branch point and the end of the natural gas pipeline are respectively calculated according to the distribution parameters in a fault-free state;

[0008] Obtaining a measurement sequence at the head end of the natural gas pipeline and a measurement sequence at the end of the natural gas pipeline, and performing fast Fourier transform on the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline, respectively, to obtain a frequency domain expression of the head end measurement sequence and a frequency domain expression of the end end measurement sequence; the measurement sequence includes flow and pressure;

[0009] At each of the branch points, based on the first transmission parameter matrix and the frequency domain expression of the head-end measurement sequence, the flow rate and pressure at the head-end of the natural gas pipeline are quantified under a sinusoidal steady state of multiple frequencies, and based on the second transmission parameter matrix and the frequency domain expression of the end-end measurement sequence, the flow rate and pressure at the end of the natural gas pipeline are quantified under a sinusoidal steady state of multiple frequencies;

[0010] Performing inverse fast Fourier transform on the flow rate and pressure at the head end of the natural gas pipeline and the flow rate and pressure at the end of the natural gas pipeline, respectively, to obtain a time domain flow rate sequence and a time domain pressure sequence at the head end of the natural gas pipeline, and a time domain flow rate sequence and a time domain pressure sequence at the end of the natural gas pipeline;

[0011] quantifying the flow root mean square deviation according to the time domain flow sequence at the head end of the natural gas pipeline and the time domain flow sequence at the end of the natural gas pipeline, and quantifying the pressure root mean square deviation according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline;

[0012] The fault type of the natural gas pipeline is determined according to the flow root mean square deviation and the pressure root mean square deviation.

[0013] As one of the preferred schemes, the basic parameters include environmental parameters, pipeline parameters and rated operating points, and the distributed parameters include air conductance, air resistance, air volume and first-order attenuation coefficient; wherein, the environmental parameters include compression ratio, gas constant, temperature and gravitational acceleration, the pipeline parameters include pipeline diameter, cross-sectional area, slope angle and friction coefficient, and the rated operating point includes pressure reference and flow reference.

[0014] As one of the preferred solutions, the first transmission parameter matrix is ​​expressed by the following formula:

[0015]

[0016]

[0017]

[0018]

[0019]

[0020] Where, T is the first transmission parameter matrix; is the sinusoidal steady-state frequency; For points; is the first-order attenuation coefficient; is the pipeline impedance; is the pipeline admittance.

[0021] As one of the preferred solutions, the method of obtaining the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline, and performing fast Fourier transform on the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline, respectively, to obtain the frequency domain expression of the head end measurement sequence and the frequency domain expression of the end end measurement sequence, includes:

[0022] At the current moment, obtaining a measurement sequence of the head end of the natural gas pipeline and a measurement sequence of the end end of the natural gas pipeline;

[0023] A time window is set, and fast Fourier transform is performed on the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline within the time window period to obtain the frequency domain expression of the head end measurement sequence and the frequency domain expression of the end end measurement sequence.

[0024] As one of the preferred solutions, the flow rate and pressure at the head end of the natural gas pipeline are expressed by the following formula:

[0025]

[0026] In the formula, is the pressure at the head end of the natural gas pipeline; is the flow rate at the head end of the natural gas pipeline; is the frequency domain expression of the head-end pressure measurement sequence; is the frequency domain expression of the head-end flow measurement sequence;

[0027] The flow rate and pressure at the end of the natural gas pipeline are expressed by the following formula:

[0028]

[0029] In the formula, is the pressure at the end of the natural gas pipeline; is the flow rate at the end of the natural gas pipeline; is the second transmission parameter matrix; is the length of the natural gas pipeline; is the frequency domain expression of the terminal pressure measurement sequence; It is the frequency domain expression of the terminal flow measurement sequence.

[0030] As one of the preferred solutions, the flow root mean square deviation is quantified according to the time domain flow sequence at the head end of the natural gas pipeline and the time domain flow sequence at the end of the natural gas pipeline, and the pressure root mean square deviation is quantified according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline, including:

[0031] Set a buffer time and add it to the time window period to obtain a buffer time period;

[0032] quantifying the root mean square deviation of the flow rate of the natural gas pipeline within the buffer time period according to the time domain flow rate sequence at the head end of the natural gas pipeline and the time domain flow rate sequence at the end of the natural gas pipeline;

[0033] The root mean square deviation of the pressure of the natural gas pipeline in the buffer time period is quantified according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline.

[0034] As one of the preferred solutions, the method of determining the fault type of the natural gas pipeline according to the flow root mean square deviation and the pressure root mean square deviation includes:

[0035] If the flow rate root mean square deviation is not less than the leakage judgment threshold, it is determined that there is a leakage fault in the natural gas pipeline, and the position corresponding to the minimum value of the flow rate root mean square deviation is taken as the leakage point;

[0036] If the pressure root mean square deviation is not less than the pressure judgment threshold, it is determined that a blockage fault exists in the natural gas pipeline, and the position corresponding to the minimum value of the pressure root mean square deviation is taken as the blockage point.

[0037] A second aspect of the present invention provides a natural gas pipeline fault detection system, comprising:

[0038] A parameter acquisition module, used to acquire basic parameters of the natural gas pipeline and quantify the distribution parameters of the natural gas pipeline according to the basic parameters;

[0039] A matrix calculation module, used to set a plurality of branch points on the natural gas pipeline, and respectively calculate, according to the distribution parameters in a fault-free state, a first transmission parameter matrix between the head end of the natural gas pipeline and each of the branch points, and a second transmission parameter matrix between each of the branch points and the end of the natural gas pipeline;

[0040] A sequence transformation module, used to obtain the measurement sequence of the head end of the natural gas pipeline and the measurement sequence of the end end of the natural gas pipeline, and perform fast Fourier transformation on the measurement sequence of the head end of the natural gas pipeline and the measurement sequence of the end end of the natural gas pipeline respectively, to obtain the frequency domain expression of the head end measurement sequence and the frequency domain expression of the end end measurement sequence; the measurement sequence includes flow and pressure;

[0041] A data quantization module, for quantifying the flow rate and pressure at the head end of the natural gas pipeline at each of the branch points under a sinusoidal steady state of multiple frequencies based on the first transmission parameter matrix and the frequency domain expression of the head end measurement sequence, and for quantifying the flow rate and pressure at the end of the natural gas pipeline under a sinusoidal steady state of multiple frequencies based on the second transmission parameter matrix and the frequency domain expression of the end end measurement sequence;

[0042] A sequence inverse transformation module, used to perform fast Fourier inverse transformation on the flow rate and pressure at the head end of the natural gas pipeline and the flow rate and pressure at the end of the natural gas pipeline, respectively, to obtain a time domain flow rate sequence and a time domain pressure sequence at the head end of the natural gas pipeline, and a time domain flow rate sequence and a time domain pressure sequence at the end of the natural gas pipeline;

[0043] A deviation quantification module, used to quantify the flow root mean square deviation according to the time domain flow sequence at the head end of the natural gas pipeline and the time domain flow sequence at the end of the natural gas pipeline, and to quantify the pressure root mean square deviation according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline;

[0044] A fault determination module is used to determine the fault type of the natural gas pipeline according to the flow root mean square deviation and the pressure root mean square deviation.

[0045] A third aspect of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the natural gas pipeline fault detection method as described above when executing the computer program.

[0046] A fourth aspect of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the natural gas pipeline fault detection method as described above is implemented.

[0047] Compared with the prior art, the beneficial effects of the embodiments of the present invention are as follows: by Fourier transforming the dynamic measurement data of the natural gas pipeline - flow and pressure, and representing the transformation result with the sum of a finite number of sinusoidal steady states, and in each sinusoidal steady state, the natural gas pipeline has a definite two-port parameter matrix - the flow matrix and pressure matrix at the head end of the pipeline and the flow matrix and pressure matrix at the end of the pipeline, and then quantifying the root mean square deviation of the natural gas pipeline based on the flow matrix and pressure matrix at the head and end of the pipeline, the fault type of the natural gas pipeline can be determined according to the calculated root mean square deviation, so that the power system connected to the natural gas network can perform corresponding control operations according to the content of the natural gas fault. The fault detection scheme based on the dynamic characteristics of the pipeline port described in the present invention uses a small amount of natural gas pipeline measurement data to quickly determine its fault problem, has the characteristics of fast and online analysis, and is suitable for gas-electricity interlocking fault warning scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the implementation mode will be briefly introduced below. Obviously, the drawings described below are only some implementation modes of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 is a flow chart of a natural gas pipeline fault detection method provided by a certain embodiment of the present invention;

[0050] Figure 2 It is a structural diagram of a natural gas pipeline fault detection system provided by a certain embodiment of the present invention;

[0051] Figure 3 It is a structural diagram of an electronic device provided by a certain embodiment of the present invention. DETAILED DESCRIPTION

[0052] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings and embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] In the description of the present invention, the terms "first", "second", "third", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", "third", etc. may explicitly or implicitly include one or more of the feature. In the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0054] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two components. The terms "vertical", "horizontal", "left", "right", "upper", "lower" and similar expressions used herein are only for illustrative purposes, and do not indicate or imply that the system or component referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0055] In the description of the present invention, it should be noted that, unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood by specific circumstances.

[0056] In one embodiment, if Figure 1 As shown, the first aspect of the present invention provides a natural gas pipeline fault detection method, comprising:

[0057] S1. Obtaining basic parameters of a natural gas pipeline, and quantifying distribution parameters of the natural gas pipeline according to the basic parameters;

[0058] In one embodiment, the basic parameters include environmental parameters, pipeline parameters and rated operating points, and the distributed parameters include air conductance, air resistance, air volume and first-order attenuation coefficient; wherein the environmental parameters include compression ratio, gas constant, temperature and gravitational acceleration, the pipeline parameters include pipeline diameter, cross-sectional area, slope angle and friction coefficient, and the rated operating point includes pressure reference and flow reference.

[0059] Specifically, the calculation formula of the distribution parameter is as follows:

[0060]

[0061]

[0062]

[0063]

[0064] In the formula, For air blockage; is the friction coefficient; is the compression ratio; is the gas constant; is temperature; is the flow rate benchmark; is the pipe diameter; is the cross-sectional area; is the pressure reference; For air conduction; For Qi capacity; is the first-order attenuation coefficient; is the acceleration due to gravity; The slope angle.

[0065] By quantifying the basic parameters and environmental parameters of the natural gas pipeline, the present invention can more accurately predict the operating status of the pipeline under different working conditions, which is helpful to timely discover potential safety hazards, such as leakage risks, abnormal pressure fluctuations, etc., so as to take measures in advance for maintenance and repair to avoid major safety accidents; understanding and quantifying the distribution parameters can accurately control the flow behavior of natural gas in the pipeline to optimize the transportation process; the quantified basic parameters and distribution parameters can be used to simulate the operating status of the pipeline system under different working conditions, predict future development trends, and provide a scientific basis for decision-making; when a pipeline system fails, the quantified parameters can be used to quickly locate the problem, which is helpful for rapid response, reducing downtime and reducing maintenance costs.

[0066] S2, setting a plurality of branch points on the natural gas pipeline, and respectively calculating, according to the distribution parameters in a fault-free state, a first transmission parameter matrix between the head end of the natural gas pipeline and each of the branch points, and a second transmission parameter matrix between each of the branch points and the end of the natural gas pipeline;

[0067] Specifically, assuming the pipeline length is L, set several points =mL / M, m=1, 2, ..., M-1, M is the number of pipeline divisions, and the first transmission parameter matrix between the pipeline head end and each branch point is calculated when the natural gas pipeline is in a fault-free state. , and the second transmission parameter matrix between each distribution point and the end of the pipeline , wherein the first transmission parameter matrix is ​​expressed by the following formula:

[0068]

[0069]

[0070]

[0071]

[0072]

[0073]

[0074]

[0075] In the formula, is the pipeline impedance; is the pipeline admittance; is the time window length; is the sinusoidal steady-state frequency, ω=2πn / , n=1,2,..., , is the number of frequencies contained in the frequency domain window; Is an imaginary unit.

[0076] The second transmission parameter matrix With the first transmission parameter matrix The expression of is similar to that of Replace with By dividing the long-distance natural gas pipeline into multiple shorter segments, the present invention can perform more accurate calculations on the specific parameters of each segment (such as pipeline diameter, friction coefficient, temperature, etc.). The segmented calculation can more accurately reflect the transmission characteristics of each segment, thereby improving the overall calculation accuracy; when a pipeline system fails, the transmission parameter matrix obtained by the segmented calculation can also help quickly locate the specific location of the failure.

[0077] S3, obtaining a measurement sequence at the head end of the natural gas pipeline and a measurement sequence at the end of the natural gas pipeline, and performing fast Fourier transform on the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline, respectively, to obtain a frequency domain expression of the head end measurement sequence and a frequency domain expression of the end end measurement sequence; the measurement sequence includes flow and pressure;

[0078] In one embodiment, step S3 includes:

[0079] At the current moment, obtaining a measurement sequence of the head end of the natural gas pipeline and a measurement sequence of the end end of the natural gas pipeline;

[0080] A time window is set, and fast Fourier transform is performed on the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline within the time window period to obtain the frequency domain expression of the head end measurement sequence and the frequency domain expression of the end end measurement sequence.

[0081] Specifically, by rolling the pressure measurement sequence at the head end of the natural gas pipeline , Flow measurement sequence at the head end of a natural gas pipeline , Pressure measurement sequence at the end of a natural gas pipeline , Pressure measurement sequence at the end of a natural gas pipeline , we can get the head-end measurement sequence and the end-end measurement sequence of the natural gas pipeline at the current moment; let the current moment be , set a time window , and respectively for the time window period Each measurement sequence in the pipeline is subjected to fast Fourier transform (FFT) to obtain the frequency domain expression of the head-end measurement sequence and the frequency domain expression of the end-end measurement sequence, that is, the frequency domain expression of the pressure sequence at the head end of the natural gas pipeline is obtained respectively. , Frequency domain expression of the flow sequence at the head end of a natural gas pipeline , Frequency domain expression of natural gas pipeline terminal pressure series , Frequency domain expression of natural gas pipeline terminal flow sequence , and its calculation formula is as follows:

[0082]

[0083]

[0084]

[0085]

[0086] In the formula, Time window period The number of time points included.

[0087] The present invention performs FFT analysis on the measurement sequence by setting a time window, and can obtain the spectrum characteristics of the natural gas pipeline in different time periods in real time, providing strong support for real-time monitoring and control; the frequency domain analysis can reveal the components and distribution of the signal at different frequencies, which is crucial for understanding the dynamic characteristics of the airflow in the natural gas pipeline, and FFT can more easily identify the key frequency components in the signal; in the natural gas pipeline system, certain faults (such as leakage, blockage, etc.) will cause changes in the airflow characteristics, and this change may be manifested as an increase or decrease in specific frequency components in the frequency domain. The present invention calculates the spectrum under normal conditions as a basis, and compares it with the spectrum under the current state, so as to quickly detect potential faults and make preliminary diagnosis.

[0088] S4. At each of the sub-points, based on the first transmission parameter matrix and the frequency domain expression of the head-end measurement sequence, quantify the flow rate and pressure at the head-end of the natural gas pipeline under a sinusoidal steady state of multiple frequencies, and based on the second transmission parameter matrix and the frequency domain expression of the end measurement sequence, quantify the flow rate and pressure at the end of the natural gas pipeline under a sinusoidal steady state of multiple frequencies;

[0089] Specifically, at different points In the frequency domain, the pressure and flow sequence at each point are calculated based on the measurement sequence at the head and end of the natural gas pipeline and its corresponding parameter matrix under the sinusoidal steady state of different frequencies. In the frequency domain, the flow and pressure at the head end of the pipeline obtained based on the measurement at the head end of the natural gas pipeline are recorded as , , the flow rate and pressure at the end of the pipeline measured based on the natural gas pipeline end are recorded as , ; Wherein, the flow rate and pressure at the head end and the end of the natural gas pipeline are respectively expressed by the following formulas:

[0090]

[0091] .

[0092] In actual calculation, the points The value is taken evenly, and the higher the required fault identification accuracy, the denser the points are. When a natural gas pipeline fails, if the points are taken at the pipeline fault point, then , It can respectively describe the transmission characteristics from the beginning of the pipeline to the branch point and from the branch point to the end of the pipeline: for leakage faults, the branch point pressures calculated from the beginning and end of the pipeline will be very close, and for blockage faults, the branch point flow rates calculated from the beginning and end of the pipeline will be very close. If the pipeline operates normally, at any branch point, the deviations of the branch point pressure and flow sequences calculated in two directions are small. Based on this principle, accurate detection of natural gas pipeline faults can be achieved.

[0093] The present invention converts the measurement sequences at the beginning and end of the natural gas pipeline into the frequency domain and quantizes them based on the transmission parameter matrix, which can make full use of the hidden characteristics of the signal in the measurement data; by quantizing under sinusoidal steady states of multiple frequencies, the dynamic changes of flow and pressure in the pipeline at different frequencies can be captured to fully reflect the actual operating status of the pipeline system, thereby improving the precision and accuracy of quantification and making it easier to identify possible faults or abnormalities in the pipeline system.

[0094] S5, performing inverse fast Fourier transform on the flow rate and pressure at the head end of the natural gas pipeline and the flow rate and pressure at the end of the natural gas pipeline, respectively, to obtain a time domain flow rate sequence and a time domain pressure sequence at the head end of the natural gas pipeline, and a time domain flow rate sequence and a time domain pressure sequence at the end of the natural gas pipeline;

[0095] Specifically, considering that the calculation error of the frequency domain method at the beginning and end of the time window is large, it is necessary to perform inverse Fourier transform on the flow rate and pressure at the head end of the natural gas pipeline and the flow rate and pressure at the end of the natural gas pipeline, respectively. The transformation process is expressed by the following formula:

[0096]

[0097]

[0098]

[0099]

[0100] In the formula, is the time domain pressure series at the head end of the natural gas pipeline; is the time domain flow sequence at the head end of the natural gas pipeline; is the time domain pressure series at the end of the natural gas pipeline; is the time domain flow series at the end of the natural gas pipeline.

[0101] S6. quantify the flow root mean square deviation according to the time domain flow sequence at the head end of the natural gas pipeline and the time domain flow sequence at the end of the natural gas pipeline, and quantify the pressure root mean square deviation according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline;

[0102] In one embodiment, step S6 includes:

[0103] Set a buffer time and add it to the time window period to obtain a buffer time period;

[0104] quantifying the root mean square deviation of the flow rate of the natural gas pipeline within the buffer time period according to the time domain flow rate sequence at the head end of the natural gas pipeline and the time domain flow rate sequence at the end of the natural gas pipeline;

[0105] The root mean square deviation of the pressure of the natural gas pipeline in the buffer time period is quantified according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline.

[0106] Specifically, considering that the frequency domain method has large calculation errors at the beginning and end of the time window, a buffer time period is set. , and calculate and compare in the buffer time period RMS deviation of pressure within RMS deviation of flow rate , the calculation formula is as follows:

[0107]

[0108]

[0109] In the formula, Buffer time period The number of time points within.

[0110] The present invention smoothes out data fluctuations caused by measurement errors, data transmission delays or system transient responses by setting a buffer time period, which helps to reduce the impact of noise and outliers on quantification results, thereby improving the accuracy of flow and pressure data; by quantifying the root mean square deviation of flow and pressure within the buffer time period, the stability of the natural gas pipeline system can be more comprehensively evaluated. The root mean square deviation reflects the degree of deviation between the data and its average value. A lower root mean square deviation means that the system runs more smoothly within the time period, which helps to promptly discover and prevent potential unstable factors and improve the accuracy of fault detection.

[0111] S7, determining the fault type of the natural gas pipeline according to the flow root mean square deviation and the pressure root mean square deviation;

[0112] In one embodiment, step S7 includes:

[0113] If the flow rate root mean square deviation is not less than the leakage judgment threshold, it is determined that there is a leakage fault in the natural gas pipeline, and the position corresponding to the minimum value of the flow rate root mean square deviation is taken as the leakage point;

[0114] If the pressure root mean square deviation is not less than the pressure judgment threshold, it is determined that a blockage fault exists in the natural gas pipeline, and the position corresponding to the minimum value of the pressure root mean square deviation is taken as the blockage point.

[0115] Specifically, when a natural gas pipeline fails, the value of the flow root mean square deviation or pressure root mean square deviation will increase significantly except for the fault point. Then, when there is a leakage fault in the natural gas pipeline, the following formula must be satisfied:

[0116]

[0117] In the formula, The traffic judgment threshold.

[0118] at this time The minimum value point is the leakage point ,Right now:

[0119]

[0120] The difference in the flow sequence of the leakage point calculated from the beginning and end of the pipeline is and The difference is the leakage flow curve of the pipeline ,Right now:

[0121] .

[0122] Then when there is a blockage fault in the natural gas pipeline, the following formula must be satisfied:

[0123]

[0124] In the formula, is the pressure judgment threshold.

[0125] at this time The minimum point is the blocking point ,Right now:

[0126]

[0127] The difference in the pressure sequence of the blockage point calculated from the beginning and end of the pipeline is and The difference is the pipeline blockage pressure curve ,Right now:

[0128] .

[0129] The present invention adopts flow root mean square deviation and pressure root mean square deviation as judgment basis in natural gas pipeline fault detection, which are respectively used to detect leakage faults and blockage faults, and help to accurately locate the location of the fault so that it can be quickly transmitted to the power system, so that the power system connected to the natural gas network can perform corresponding control operations according to the content of the natural gas fault, which is of great significance for ensuring the safe and stable operation of the pipeline.

[0130] In the embodiment of the present invention, based on the problem of how to quickly determine the fault information of the natural gas network according to the measurement data of the natural gas system in the context of gas-electricity coupling, a natural gas pipeline fault detection method is designed, which realizes obtaining the basic parameters of the natural gas pipeline and quantifying the distribution parameters of the natural gas pipeline according to the basic parameters; setting a plurality of points on the natural gas pipeline, and calculating the first transmission parameter matrix between the head end of the natural gas pipeline and each of the points and the second transmission parameter matrix between each of the points and the end of the natural gas pipeline according to the distribution parameters in a fault-free state; obtaining the measurement sequence of the head end of the natural gas pipeline and the measurement sequence of the end of the natural gas pipeline. , and respectively perform fast Fourier transform on the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline to obtain the frequency domain expression of the head end measurement sequence and the frequency domain expression of the end measurement sequence; the measurement sequence includes flow and pressure; at each of the sub-points, based on the first transmission parameter matrix and the frequency domain expression of the head end measurement sequence, quantify the flow and pressure at the head end of the natural gas pipeline under a sinusoidal steady state of multiple frequencies, and based on the second transmission parameter matrix and the frequency domain expression of the end measurement sequence, quantify the flow and pressure at the end of the natural gas pipeline under a sinusoidal steady state of multiple frequencies; the flow and pressure at the head end of the natural gas pipeline and the flow and pressure at the end of the natural gas pipeline are quantified. The flow and pressure at the end are subjected to inverse fast Fourier transform respectively to obtain the time domain flow sequence and time domain pressure sequence of the head end of the natural gas pipeline, as well as the time domain flow sequence and time domain pressure sequence of the end of the natural gas pipeline; the flow root mean square deviation is quantified according to the time domain flow sequence at the head end of the natural gas pipeline and the time domain flow sequence at the end of the natural gas pipeline, and the pressure root mean square deviation is quantified according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline; the technical solution for determining the fault type of the natural gas pipeline according to the flow root mean square deviation and the pressure root mean square deviation; by Fourier transforming the dynamic measurement data of the natural gas pipeline - flow, pressure Leaf transformation is performed, and the transformation result is represented by the sum of a finite number of sinusoidal steady states. Under each sinusoidal steady state, the natural gas pipeline has a definite two-port parameter matrix - the flow matrix and pressure matrix at the head end of the pipeline and the flow matrix and pressure matrix at the end of the pipeline. The root mean square deviation of the natural gas pipeline is quantified based on the flow matrix and pressure matrix at the head and end of the pipeline. The fault type of the natural gas pipeline can be determined according to the calculated root mean square deviation, so that the power system connected to the natural gas network can perform corresponding control operations according to the content of the natural gas fault. The fault detection scheme based on the dynamic characteristics of the pipeline port described in the present invention is fast and can be analyzed online, and is suitable for gas-electricity interlocking fault warning scenarios.

[0131] It should be noted that although the steps in the above flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders.

[0132] In another embodiment, if Figure 1 As shown, the second aspect of the present invention provides a natural gas pipeline fault detection system, comprising:

[0133] A parameter acquisition module 10 is used to acquire basic parameters of the natural gas pipeline and quantify the distribution parameters of the natural gas pipeline according to the basic parameters;

[0134] A matrix calculation module 20 is used to set a plurality of points on the natural gas pipeline, and to calculate, according to the distribution parameters in a fault-free state, a first transmission parameter matrix between the head end of the natural gas pipeline and each of the points, and a second transmission parameter matrix between each of the points and the end of the natural gas pipeline;

[0135] The sequence transformation module 30 is used to obtain the measurement sequence of the head end of the natural gas pipeline and the measurement sequence of the end end of the natural gas pipeline, and perform fast Fourier transformation on the measurement sequence of the head end of the natural gas pipeline and the measurement sequence of the end end of the natural gas pipeline to obtain the frequency domain expression of the head end measurement sequence and the frequency domain expression of the end end measurement sequence; the measurement sequence includes flow and pressure;

[0136] A data quantization module 40 is used to quantify the flow rate and pressure at the head end of the natural gas pipeline at each of the branch points under a sinusoidal steady state of multiple frequencies based on the first transmission parameter matrix and the frequency domain expression of the head end measurement sequence, and to quantify the flow rate and pressure at the end of the natural gas pipeline under a sinusoidal steady state of multiple frequencies based on the second transmission parameter matrix and the frequency domain expression of the end end measurement sequence;

[0137] The sequence inverse transformation module 50 is used to perform fast Fourier inverse transformation on the flow rate and pressure at the head end of the natural gas pipeline and the flow rate and pressure at the end of the natural gas pipeline, respectively, to obtain the time domain flow rate sequence and time domain pressure sequence at the head end of the natural gas pipeline, and the time domain flow rate sequence and time domain pressure sequence at the end of the natural gas pipeline;

[0138] The deviation quantification module 60 is used to quantify the flow root mean square deviation according to the time domain flow sequence at the head end of the natural gas pipeline and the time domain flow sequence at the end of the natural gas pipeline, and to quantify the pressure root mean square deviation according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline;

[0139] The fault determination module 70 is used to determine the fault type of the natural gas pipeline according to the flow root mean square deviation and the pressure root mean square deviation.

[0140] It should be noted that each module in the above-mentioned natural gas pipeline fault detection system can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. For the specific definition of a natural gas pipeline fault detection system, please refer to the definition of a natural gas pipeline fault detection method above. The two have the same functions and effects, which will not be repeated here.

[0141] A third aspect of the present invention provides an electronic device, the electronic device comprising:

[0142] processor, memory, and bus;

[0143] The bus is used to connect the processor and the memory;

[0144] The memory is used to store operation instructions;

[0145] The processor is used to call the operation instruction, and the executable instruction enables the processor to perform the operation corresponding to the natural gas pipeline fault detection method shown in the first aspect of the present invention.

[0146] In an alternative embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The electronic device 5000 shown includes: a processor 5001 and a memory 5003. The processor 5001 and the memory 5003 are connected, such as through a bus 5002. Optionally, the electronic device 5000 may also include a transceiver 5004. It should be noted that in actual applications, the transceiver 5004 is not limited to one, and the structure of the electronic device 5000 does not constitute a limitation on the embodiments of the present invention.

[0147] Processor 5001 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 5001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0148] The bus 5002 may include a path to transmit information between the above components. The bus 5002 may be a PCI bus or an EISA bus, etc. The bus 5002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0149] The memory 5003 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0150] The memory 5003 is used to store application code for executing the solution of the present invention, and the execution is controlled by the processor 5001. The processor 5001 is used to execute the application code stored in the memory 5003 to implement the content shown in any of the above method embodiments.

[0151] Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0152] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a natural gas pipeline fault detection method as shown in the first aspect of the present invention.

[0153] Yet another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed on a computer, enables the computer to execute the corresponding contents of the aforementioned method embodiments.

[0154] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented.

[0155] In summary, the present invention relates to the technical field of pipeline fault detection, and discloses a natural gas pipeline fault detection method, system, equipment and medium. The dynamic measurement data of the natural gas pipeline, namely flow rate and pressure, are Fourier transformed, and the transformation result is represented by the sum of a finite number of sinusoidal steady states. In each sinusoidal steady state, the natural gas pipeline has a definite two-port parameter matrix, namely, the flow matrix and pressure matrix at the head end of the pipeline and the flow matrix and pressure matrix at the end of the pipeline. The root mean square deviation of the natural gas pipeline is quantified based on the flow matrix and pressure matrix at the head and end of the pipeline. The fault type of the natural gas pipeline can be determined according to the calculated root mean square deviation, so that the power system connected to the natural gas network can perform corresponding control operations according to the content of the natural gas fault. The fault detection scheme based on the dynamic characteristics of the pipeline port described in the present invention has the characteristics of being fast and can be analyzed online, and is suitable for gas-electricity interlocking fault warning scenarios.

[0156] Each embodiment in this specification is described in a progressive manner, and the same or similar parts of each embodiment can be directly referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. It should be noted that the technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0157] The above-mentioned embodiments only express several preferred implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principle of the present invention, and these improvements and substitutions should also be regarded as the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the protection scope of the claims.

Claims

1. A natural gas pipeline fault detection method, characterized in that: include: Acquiring basic parameters of a natural gas pipeline, and quantifying distribution parameters of the natural gas pipeline according to the basic parameters; A plurality of branch points are arranged on the natural gas pipeline, and a first transmission parameter matrix between the head end of the natural gas pipeline and each branch point, and a second transmission parameter matrix between each branch point and the end of the natural gas pipeline are respectively calculated according to the distribution parameters in a fault-free state; Obtaining a measurement sequence at the head end of the natural gas pipeline and a measurement sequence at the end of the natural gas pipeline, and performing fast Fourier transform on the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline, respectively, to obtain a frequency domain expression of the head end measurement sequence and a frequency domain expression of the end end measurement sequence; the measurement sequence includes flow and pressure; At each of the branch points, based on the first transmission parameter matrix and the frequency domain expression of the head-end measurement sequence, the flow rate and pressure at the head-end of the natural gas pipeline are quantified under a sinusoidal steady state of multiple frequencies, and based on the second transmission parameter matrix and the frequency domain expression of the end-end measurement sequence, the flow rate and pressure at the end of the natural gas pipeline are quantified under a sinusoidal steady state of multiple frequencies; Performing inverse fast Fourier transform on the flow rate and pressure at the head end of the natural gas pipeline and the flow rate and pressure at the end of the natural gas pipeline, respectively, to obtain a time domain flow rate sequence and a time domain pressure sequence at the head end of the natural gas pipeline, and a time domain flow rate sequence and a time domain pressure sequence at the end of the natural gas pipeline; quantifying the flow root mean square deviation according to the time domain flow sequence at the head end of the natural gas pipeline and the time domain flow sequence at the end of the natural gas pipeline, and quantifying the pressure root mean square deviation according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline; determining a fault type of the natural gas pipeline according to the flow root mean square deviation and the pressure root mean square deviation; The basic parameters include environmental parameters, pipeline parameters and rated operating points, and the distributed parameters include air conductance, air resistance, air volume and first-order attenuation coefficient; wherein the environmental parameters include compression ratio, gas constant, temperature and gravitational acceleration, the pipeline parameters include pipeline diameter, cross-sectional area, slope angle and friction coefficient, and the rated operating point includes pressure reference and flow reference; The first transmission parameter matrix is ​​expressed by the following formula: In the formula, is the first transmission parameter matrix; is the sinusoidal steady-state frequency; For points; is the first-order attenuation coefficient; is the pipeline impedance; is the pipeline admittance; The second transmission parameter matrix is ​​obtained by converting the first transmission parameter matrix Replace with ( - );in, is the length of the natural gas pipeline.

2. A natural gas pipeline fault detection method according to claim 1, characterized in that: The step of obtaining the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline, and performing fast Fourier transform on the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline, respectively, to obtain the frequency domain expression of the head end measurement sequence and the frequency domain expression of the end end measurement sequence, includes: At the current moment, obtaining a measurement sequence of the head end of the natural gas pipeline and a measurement sequence of the end end of the natural gas pipeline; A time window is set, and fast Fourier transform is performed on the measurement sequence at the head end of the natural gas pipeline and the measurement sequence at the end of the natural gas pipeline within the time window period to obtain the frequency domain expression of the head end measurement sequence and the frequency domain expression of the end end measurement sequence.

3. A natural gas pipeline fault detection method according to claim 1, characterized in that: The flow rate and pressure at the head end of the natural gas pipeline are expressed by the following formula: In the formula, is the pressure at the head end of the natural gas pipeline; is the flow rate at the head end of the natural gas pipeline; is the frequency domain expression of the head-end pressure measurement sequence; is the frequency domain expression of the head-end flow measurement sequence; The flow rate and pressure at the end of the natural gas pipeline are expressed by the following formula: In the formula, is the pressure at the end of the natural gas pipeline; is the flow rate at the end of the natural gas pipeline; is the inverse matrix of the second transmission parameter matrix; is the frequency domain expression of the terminal pressure measurement sequence; It is the frequency domain expression of the terminal flow measurement sequence.

4. A natural gas pipeline fault detection method according to claim 2, characterized in that: The method of quantifying the flow root mean square deviation according to the time domain flow sequence at the head end of the natural gas pipeline and the time domain flow sequence at the end of the natural gas pipeline, and quantifying the pressure root mean square deviation according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline, comprises: Set a buffer time and add it to the time window period to obtain a buffer time period; quantifying the root mean square deviation of the flow rate of the natural gas pipeline within the buffer time period according to the time domain flow rate sequence at the head end of the natural gas pipeline and the time domain flow rate sequence at the end of the natural gas pipeline; The root mean square deviation of the pressure of the natural gas pipeline in the buffer time period is quantified according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline.

5. A natural gas pipeline fault detection method according to claim 1, characterized in that: The determining the fault type of the natural gas pipeline according to the flow root mean square deviation and the pressure root mean square deviation includes: If the flow rate root mean square deviation is not less than the leakage judgment threshold, it is determined that there is a leakage fault in the natural gas pipeline, and the position corresponding to the minimum value of the flow rate root mean square deviation is taken as the leakage point; If the pressure root mean square deviation is not less than the pressure judgment threshold, it is determined that a blockage fault exists in the natural gas pipeline, and the position corresponding to the minimum value of the pressure root mean square deviation is taken as the blockage point.

6. A natural gas pipeline fault detection system, characterized in that: include: A parameter acquisition module, used to acquire basic parameters of the natural gas pipeline and quantify the distribution parameters of the natural gas pipeline according to the basic parameters; A matrix calculation module, used to set a plurality of branch points on the natural gas pipeline, and respectively calculate, according to the distribution parameters in a fault-free state, a first transmission parameter matrix between the head end of the natural gas pipeline and each of the branch points, and a second transmission parameter matrix between each of the branch points and the end of the natural gas pipeline; A sequence transformation module, used to obtain the measurement sequence of the head end of the natural gas pipeline and the measurement sequence of the end end of the natural gas pipeline, and perform fast Fourier transformation on the measurement sequence of the head end of the natural gas pipeline and the measurement sequence of the end end of the natural gas pipeline, respectively, to obtain the frequency domain expression of the head end measurement sequence and the frequency domain expression of the end end measurement sequence; The measurement sequence includes flow and pressure; A data quantization module, for quantifying the flow rate and pressure at the head end of the natural gas pipeline at each of the branch points under a sinusoidal steady state of multiple frequencies based on the first transmission parameter matrix and the frequency domain expression of the head end measurement sequence, and for quantifying the flow rate and pressure at the end of the natural gas pipeline under a sinusoidal steady state of multiple frequencies based on the second transmission parameter matrix and the frequency domain expression of the end end measurement sequence; A sequence inverse transformation module, used to perform fast Fourier inverse transformation on the flow rate and pressure at the head end of the natural gas pipeline and the flow rate and pressure at the end of the natural gas pipeline, respectively, to obtain a time domain flow rate sequence and a time domain pressure sequence at the head end of the natural gas pipeline, and a time domain flow rate sequence and a time domain pressure sequence at the end of the natural gas pipeline; A deviation quantification module, used to quantify the flow root mean square deviation according to the time domain flow sequence at the head end of the natural gas pipeline and the time domain flow sequence at the end of the natural gas pipeline, and to quantify the pressure root mean square deviation according to the time domain pressure sequence at the head end of the natural gas pipeline and the time domain pressure sequence at the end of the natural gas pipeline; A fault determination module, used to determine the fault type of the natural gas pipeline according to the flow root mean square deviation and the pressure root mean square deviation; The basic parameters include environmental parameters, pipeline parameters and rated operating points, and the distributed parameters include air conductance, air resistance, air volume and first-order attenuation coefficient; wherein the environmental parameters include compression ratio, gas constant, temperature and gravitational acceleration, the pipeline parameters include pipeline diameter, cross-sectional area, slope angle and friction coefficient, and the rated operating point includes pressure reference and flow reference; The first transmission parameter matrix is ​​expressed by the following formula: In the formula, is the first transmission parameter matrix; is the sinusoidal steady-state frequency; For points; is the first-order attenuation coefficient; is the pipeline impedance; is the pipeline admittance; The second transmission parameter matrix is ​​obtained by converting the first transmission parameter matrix Replace with ( - );in, is the length of the natural gas pipeline.

7. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the natural gas pipeline fault detection method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the natural gas pipeline fault detection method according to any one of claims 1 to 5 is implemented.