A civil gas measurement method based on ultrasonic measurement
By monitoring and data calibration of the gas usage cycle, the metering accuracy of ultrasonic gas meters under the influence of noise and impurities is solved, and higher gas metering accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411412280.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-10-11
AI Technical Summary
Existing ultrasonic gas meters are susceptible to external noise and impurities during the metering process, resulting in a decrease in the accuracy of the metering data.
By dividing and monitoring the gas usage cycle, the independent duration and independent usage of the gas equipment are recorded, and the noise in the pipeline is monitored. When the noise exceeds the limit, it is marked as an abnormal gas usage cycle, and a data calibration strategy is performed based on historical data to calibrate the metered data during the abnormal cycle.
It improves the accuracy and stability of gas metering, reduces metering errors caused by noise and impurities, and ensures the accuracy and consistency of gas usage data.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gas metering, and in particular to a civil gas metering method based on ultrasonic metering. Background Art
[0002] With the rapid development of modern society, gas, as one of the important energy sources, is widely used in residents' lives and industrial production; gas metering and charging are crucial links in the gas supply system. Accurate gas metering is not only related to the rights and interests of users, but also has an important impact on the economic benefits of gas companies; therefore, the accuracy, stability and reliability of gas metering equipment have always been the focus of research and development; traditional gas metering methods are mainly based on mechanical meters, which rely on mechanical structures to measure gas flow. Its advantages are simple structure and low cost, but it also has disadvantages such as low accuracy, complex maintenance and limited service life.
[0003] In recent years, ultrasonic technology has gradually been applied to gas metering. Ultrasonic gas meters calculate the gas flow rate by detecting the propagation time difference of ultrasonic waves in the gas. Compared with mechanical meters, ultrasonic gas meters have the advantages of no moving parts, high precision, and good long-term stability.
[0004] In the prior art, gas metering methods based on ultrasonic technology have made significant progress, but in practical applications, there are still some aspects that need to be improved; during the metering process, existing ultrasonic gas meters may be affected by external noise factors, resulting in a decrease in the accuracy of metering data; noise interference will affect the ultrasonic signal, resulting in measurement errors; in addition, during the long-term use of ultrasonic gas meters, impurities in the gas may accumulate on the detection probe of the ultrasonic gas meter, thereby causing measurement errors.
[0005] To this end, this method proposes an automatic measurement and calibration method based on historical data when the gas meter has measurement errors caused by noise. At the same time, based on historical data, it is judged whether the gas meter has errors due to the influence of impurities on the detection probe during use, and a statistical calibration method is performed based on the errors. Summary of the invention
[0006] The present invention provides a civil gas metering method based on ultrasonic metering, which helps solve the problems mentioned in the above background technology.
[0007] The present invention provides the following technical solution: a civil gas metering method based on ultrasonic metering, comprising:
[0008] Use ultrasonic gas meters to record users' gas usage;
[0009] When it is detected that a user uses gas, the period from when the user starts to use gas to when the user stops using gas is recorded as a gas use cycle of the user;
[0010] In each gas usage cycle: obtain the device currently using gas, recorded as the gas-using device; obtain the duration of gas use by each gas-using device, recorded as the gas use duration of each gas-using device; obtain the time when each gas-using device starts using gas and the time when it ends using gas, recorded as the gas use time period of the gas-using device;
[0011] When the gas-using equipment uses gas, its heat load is a fixed value;
[0012] In each gas usage cycle, filter out the independent gas usage time period of each gas-consuming device and calculate the independent gas usage of each gas-consuming device;
[0013] In each gas usage cycle, the gas usage per unit time of each gas-consuming device is calculated through the independent usage of the gas-consuming device, which is used as the historical data of each gas usage cycle;
[0014] Calculate the average gas consumption per unit time of each gas-consuming equipment;
[0015] During each gas usage cycle, the noise of the gas pipeline where the ultrasonic gas meter is located is monitored;
[0016] When noise exceeding the limit is detected in a gas usage cycle, the gas usage cycle will be recorded as an abnormal gas usage cycle;
[0017] Obtain the abnormal duration period within the abnormal gas usage cycle and obtain the marked gas-using equipment;
[0018] Performing a first data calibration strategy according to the marked gas-consuming equipment and the average gas consumption per unit time of each gas-consuming equipment;
[0019] After each gas usage cycle, the gas usage of the gas usage cycle is obtained and the estimated gas usage is calculated;
[0020] Compare the gas consumption in this gas usage cycle with the estimated gas consumption to determine whether there is an error in the gas consumption in this gas usage cycle;
[0021] If there is no error, the gas consumption of this gas usage cycle is recorded;
[0022] If there is an error, executing a second data calibration strategy;
[0023] Obtain error values and perform statistical calibration based on the error values.
[0024] Optionally, in each gas usage cycle, the independent gas usage time period of each gas-consuming device is screened out, and the independent gas usage of each gas-consuming device is calculated, including:
[0025] In each gas usage cycle, obtain the gas usage time period of each gas-consuming device;
[0026] Compare the gas usage time periods of each gas-consuming device;
[0027] Obtain the time period during which each gas-consuming device uses gas alone;
[0028] According to the time period during which each gas-consuming device independently uses gas, the gas usage time during which each gas-consuming device independently uses gas is calculated and recorded as the independent time of each gas-consuming device;
[0029] Obtain the gas consumption of each gas-consuming device when it uses gas independently, and record it as the independent consumption of each gas-consuming device.
[0030] Optionally, in each gas usage cycle, the gas usage per unit time of each gas-consuming device is calculated through the independent usage of the gas-consuming device as the historical data of each gas usage cycle, including:
[0031] For each gas-using equipment within a gas usage cycle:
[0032] Get the independent duration of each gas-using device and record it in seconds as H;
[0033] Get the independent consumption of each gas-consuming device, denoted as F;
[0034] Set the unit time to one second;
[0035] Then the gas consumption per unit time of each gas-consuming equipment is F÷H;
[0036] The gas consumption per unit time of each gas-consuming device during the gas usage cycle is obtained to form the historical data of the gas usage cycle.
[0037] Optionally, the calculating the average gas consumption per unit time of each gas-consuming device includes:
[0038] After each gas usage cycle ends, the currently ended gas usage cycle is recorded as a marked gas usage cycle;
[0039] Obtain all gas usage cycles before the marked gas usage cycle to form a historical gas cycle set;
[0040] Get the historical data of each gas usage cycle in the historical gas cycle set;
[0041] According to the historical data of each gas usage cycle, the gas usage per unit time of each gas-using device in each gas usage cycle is obtained to form a unit usage set of each gas-using device;
[0042] For each gas consumer:
[0043] Get the number of elements in the unit usage set, denoted as A;
[0044] Calculate the sum of all elements in the unit usage set, denoted as Z;
[0045] Calculate Z÷A and use the result as the average gas consumption per unit time of each gas-consuming device corresponding to the marked gas usage cycle.
[0046] Optionally, obtaining the abnormal duration period within the abnormal gas usage cycle and obtaining the marked gas-using equipment includes:
[0047] During the abnormal gas usage period, the timer starts when the noise exceeds the limit;
[0048] When the abnormal gas usage cycle ends, or when the noise is detected to be converted from an over-limit state to a normal state, the timing stops;
[0049] The time length obtained by the timing is obtained and recorded as the abnormal time length section within the abnormal gas usage cycle;
[0050] The gas-using equipment that uses gas within the abnormal time period is obtained and recorded as the marked gas-using equipment.
[0051] Optionally, performing a first data calibration strategy according to the marked gas-consuming equipment and the average gas consumption per unit time of each gas-consuming equipment includes:
[0052] Obtain each marked gas-using device within the abnormal time period;
[0053] The duration of gas usage of each marked gas-using device in the abnormal duration period is obtained respectively, and recorded as the abnormal gas usage duration of each marked gas-using device;
[0054] For each marked gas-consuming device during the abnormal duration:
[0055] Obtain the abnormal gas consumption duration of the marked gas-using equipment, and obtain the average gas consumption per unit time corresponding to the marked gas-using equipment;
[0056] Calculate the product of abnormal gas consumption duration and average gas consumption per unit time, and use the result as the actual gas consumption of the marked gas-consuming equipment;
[0057] Obtain the actual gas consumption of all marked gas-using devices during the abnormal time period;
[0058] The sum of the actual gas consumption of all marked gas-consuming devices during the abnormal time period is obtained as the actual gas consumption during the abnormal time period;
[0059] The gas usage outside the abnormal time period within the abnormal gas usage cycle is obtained, and added to the actual gas usage during the abnormal time period as the gas usage recorded by the ultrasonic gas meter during the abnormal gas usage cycle.
[0060] Optionally, after each gas usage cycle ends, obtaining the gas usage of the gas usage cycle and calculating the estimated gas usage includes:
[0061] Obtain all gas-using equipment within this gas usage cycle;
[0062] For each gas-consuming device within this gas usage cycle:
[0063] Obtain the gas usage time of the gas-consuming equipment and obtain the average gas usage per unit time corresponding to the gas-consuming equipment;
[0064] Calculate the product of the gas usage time and the average gas usage per unit time, and use the result as the estimated gas usage of the gas-consuming equipment;
[0065] Obtain the estimated gas consumption of each gas-consuming device during this gas usage cycle, and calculate the sum of the estimated gas consumption of all gas-consuming devices during this gas usage cycle as the estimated gas consumption for this gas usage cycle.
[0066] Optionally, comparing the gas usage in the current gas usage cycle with the estimated gas usage to determine whether there is an error in the gas usage in the current gas usage cycle includes:
[0067] Obtain the gas consumption recorded by the ultrasonic gas meter during this gas usage cycle, recorded as D;
[0068] Get the estimated amount of gas for this gas usage cycle, denoted as R;
[0069] Calculate the absolute value of the difference between D and R, recorded as T;
[0070] Set the maximum error threshold;
[0071] Calculate the ratio of T to R and compare the obtained ratio with the maximum error threshold;
[0072] If the ratio of T to R is greater than the maximum error threshold, it is determined that there is an error in the gas usage during this gas usage cycle;
[0073] If the ratio of T to R is ≤ the maximum error threshold, it is determined that there is no error in the gas usage in this gas usage cycle;
[0074] If there is an error, executing a second data calibration strategy includes:
[0075] The gas usage of this gas usage cycle recorded by the ultrasonic gas meter is deleted, and the estimated gas usage of this gas usage cycle is used as the actual gas usage of this gas usage cycle and recorded.
[0076] Optionally, obtaining the error value and performing statistical calibration according to the error value includes:
[0077] Set the error number judgment threshold, denoted as K;
[0078] Set the error deviation threshold to a positive value;
[0079] When there is an error in a gas usage cycle, the gas usage cycle is recorded as a marked cycle;
[0080] Obtain the gas consumption recorded by the ultrasonic gas meter during the marking period, and obtain the estimated gas consumption and gas consumption duration during the marking period;
[0081] Calculate the difference between the estimated gas amount and the gas amount recorded by the ultrasonic gas meter, and calculate the ratio of the difference to the gas amount of the marking period as the error value of the marking period;
[0082] If after the marking period, there are K consecutive gas usage periods with error values, then the error values of these K gas usage periods are obtained respectively to form an error value set;
[0083] When all the error values in the error value set are positive or negative, the difference between each error value and the error value of the marking period is calculated respectively, and the absolute value of the obtained result is taken as the error deviation of each error value, and compared with the error deviation threshold;
[0084] If in the error value set, there is an error value whose error deviation is greater than the error deviation threshold, no statistical calibration is performed;
[0085] If the error deviations of all error values in the error value set are ≤ the error deviation threshold, the error value of the marking period is used as the statistical calibration amount;
[0086] When controlling the ultrasonic gas meter to subsequently record the gas consumption of each gas usage cycle, the gas consumption recorded by the ultrasonic gas meter is obtained, which is recorded as M;
[0087] The product of M and the statistical calibration amount is calculated and added to M, and the result is taken as the actual gas consumption during the gas use period.
[0088] The present invention has the following beneficial effects:
[0089] 1. By adopting ultrasonic gas meters and using ultrasonic sensors to monitor gas flow in real time, ultrasonic technology can more accurately sense gas flow speed and volume compared to traditional mechanical gas meters, thereby reducing measurement errors; in addition, ultrasonic measurement does not rely on changes in gas pressure or temperature, so it can maintain high measurement accuracy under a variety of environmental conditions, thereby improving the accuracy of gas measurement.
[0090] 2. By dividing and monitoring the gas usage cycle, the independent duration and independent usage of the gas-using equipment are recorded in each cycle, and the noise in the pipeline is monitored. Once the noise exceeds the limit, it will be marked as an abnormal gas usage cycle. By obtaining the gas-using equipment and gas usage duration in the abnormal usage cycle and executing the first data calibration strategy based on historical data, the data affected by noise and resulting in inaccurate measurement in the abnormal gas usage cycle is calibrated, and then the actual gas usage of the user in the abnormal gas usage cycle is obtained, thereby ensuring the accuracy of gas metering.
[0091] 3. After each gas usage cycle, the actual gas usage is compared with the estimated amount to determine whether there is an error between the two. If the existing error is greater than the set maximum error threshold, the second data calibration strategy is executed based on historical data to calibrate the gas usage within the gas usage cycle. This process not only ensures that the gas usage measured in each gas usage cycle is consistent with the user's actual gas usage, but also avoids the measurement error caused by the detection probe of the ultrasonic gas meter being covered by impurities during long-term use, thereby ensuring the accuracy of the gas usage recorded in each gas usage cycle. At the same time, this method reduces the error accumulation of gas metering when the ultrasonic gas meter is used for a long time, thereby ensuring the stability and accuracy of long-term measurement.
[0092] 4. By screening the independent duration of each gas-using device and calculating its independent gas consumption, the gas consumption per unit time of each device can be determined. This method can accurately identify the gas usage behavior of each device and avoid the problem of gas usage confusion when multiple devices are used at the same time; the statistics of independent duration ensure that the gas consumption data of each device is more accurate without interference from other devices, which helps to improve the accuracy of measurement.
[0093] 5. After each gas usage cycle ends, it is marked as a "marked gas usage cycle", and the data of all previous gas usage cycles are used to form a historical gas cycle set to analyze the unit time gas consumption of each gas-using device. This method uses the unit consumption set to calculate the average unit time gas consumption, which can smooth out the fluctuations in each gas cycle; during the gas use process, due to changes in user behavior or different equipment conditions, the gas usage in each cycle may fluctuate; calculating the average value through the historical data set can effectively reduce the error caused by abnormal conditions in a single cycle, thereby improving the stability of measurement and ensuring accuracy in long-term use.
[0094] 6. By setting the error frequency determination threshold K, the scheme can effectively filter out occasional single errors. In the process of gas metering, individual usage cycles may lead to calculation deviations due to short-term factors. If calibration is based solely on the error of a single cycle, unnecessary adjustments may be made, which may introduce more errors. By setting the K value, the system will only perform further calibration analysis when errors occur for K consecutive cycles. This mechanism ensures that the system takes corrective actions only when persistent errors occur, thus avoiding excessive sensitivity of error calibration.
[0095] 7. By setting the error deviation threshold, the system can flexibly judge the severity of the error. In K consecutive error cycles, by calculating the error deviation between each cycle and the marked cycle, the system can identify the trend and amplitude of the error. When all errors in the error value set are within a reasonable range, these errors can be considered to be normal fluctuations of the system. Statistical calibration can further optimize these tiny deviations. However, if the error deviation exceeds the set threshold, the system determines that the error cannot be calibrated, thereby avoiding further data deviation caused by incorrect calibration. Through this layer of screening, the robustness of the system is ensured and the possibility of misoperation is reduced.
[0096] 8. By adopting statistical calibration quantities and combining them with the error values of the marking period for calibration correction, the accuracy of the data is further improved. After the gas meter adds the product of the data volume M and the calibration quantity in subsequent records, it can dynamically adjust the measurement results to ensure the real-time and accuracy of the gas consumption data. This method can not only correct historical errors, but also continuously optimize future data over time, so that the system has good self-calibration and feedback functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] Figure 1 It is a flow chart of the basic steps of the present invention. DETAILED DESCRIPTION
[0098] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.
[0099] Embodiment 1, a civil gas metering method based on ultrasonic metering method, comprising:
[0100] Ultrasonic gas meters are used to record users' gas usage. Ultrasonic gas meters use ultrasonic sensors to monitor gas flow in real time. Compared with traditional mechanical gas meters, ultrasonic technology can more accurately sense gas flow rate and volume, thereby reducing metering errors. In addition, ultrasonic metering does not rely on changes in gas pressure or temperature, so it can maintain high metering accuracy under a variety of environmental conditions, thereby improving the accuracy of gas metering.
[0101] When it is detected that a user uses gas, the period from when the user starts to use gas to when the user stops using gas is recorded as a gas use cycle of the user;
[0102] In each gas usage cycle: obtain the device currently using gas, recorded as the gas-using device; obtain the duration of gas use by each gas-using device, recorded as the gas use duration of each gas-using device; obtain the time when each gas-using device starts using gas and the time when it ends using gas, recorded as the gas use time period of the gas-using device;
[0103] The heat load of the gas-using equipment is a fixed value during the process of using the gas; the heat load is a fixed value, which means that the amount of gas used per unit time by the gas-using equipment remains consistent during the process of using the gas;
[0104] In each gas usage cycle, filter out the independent gas usage time period of each gas-consuming device and calculate the independent gas usage of each gas-consuming device;
[0105] In each gas usage cycle, the gas usage per unit time of each gas-consuming device is calculated through the independent usage of the gas-consuming device, which is used as the historical data of each gas usage cycle;
[0106] Calculate the average gas consumption per unit time of each gas-consuming equipment;
[0107] During each gas usage cycle, the noise of the gas pipeline where the ultrasonic gas meter is located is monitored;
[0108] When noise exceeding the limit is detected in a gas usage cycle, the gas usage cycle will be recorded as an abnormal gas usage cycle;
[0109] Obtain the abnormal duration period within the abnormal gas usage cycle and obtain the marked gas-using equipment;
[0110] A first data calibration strategy is implemented based on the marked gas-using equipment and the average gas consumption per unit time of each gas-using equipment; by dividing and monitoring the gas usage cycle, the independent duration and independent consumption of the gas-using equipment are recorded in each cycle, and the noise in the pipeline is monitored. Once the noise exceeds the limit, it will be marked as an abnormal gas usage cycle. By obtaining the gas-using equipment and gas consumption duration in the abnormal usage cycle and executing the first data calibration strategy based on historical data, the data affected by noise and resulting in inaccurate measurement in the abnormal gas usage cycle is calibrated, and then the actual gas consumption of the user in the abnormal gas usage cycle is obtained, thereby ensuring the accuracy of gas metering.
[0111] After each gas usage cycle, the gas usage of the gas usage cycle is obtained, and the estimated gas amount is calculated; the gas usage of the gas usage cycle is obtained, which means obtaining the gas usage of the gas usage cycle recorded by the ultrasonic gas meter;
[0112] Compare the gas consumption in this gas usage cycle with the estimated gas consumption to determine whether there is an error in the gas consumption in this gas usage cycle;
[0113] If there is no error, the gas consumption of this gas usage cycle is recorded;
[0114] If there is an error, the second data calibration strategy is executed; by comparing the actual gas usage with the estimated amount after the end of each gas usage cycle, it is determined whether there is an error between the two. If the existing error is greater than the set maximum error threshold, the second data calibration strategy is executed based on historical data to calibrate the gas usage within the gas usage cycle; this process not only ensures that the gas usage measured in each gas usage cycle is consistent with the user's actual gas usage, but also avoids the measurement error caused by the detection probe of the ultrasonic gas meter being covered by impurities during long-term use, and ensures the accuracy of the gas usage recorded in each gas usage cycle; at the same time, this method reduces the accumulation of gas metering errors when the ultrasonic gas meter is used for a long time, and ensures the stability and accuracy of long-term measurement.
[0115] Obtaining error values, and performing statistical calibration based on the error values;
[0116] The basic process of this program is as follows Figure 1 shown.
[0117] In each gas usage cycle, the independent gas usage time period of each gas-consuming device is screened out, and the independent gas usage of each gas-consuming device is calculated, including:
[0118] In each gas usage cycle, obtain the gas usage time period of each gas-consuming device;
[0119] Compare the gas usage time periods of each gas-consuming device;
[0120] Obtain the time period during which each gas-consuming device uses gas alone;
[0121] According to the time period in which each gas-using device uses gas independently, the gas usage time of each gas-using device independently is calculated and recorded as the independent time of each gas-using device; the gas-using device independently using gas means that only one gas-using device uses gas within a period of time, and this period of time is recorded as the independent time of this gas-using device;
[0122] The gas consumption of each gas-consuming device when it uses gas independently is obtained, and recorded as the independent consumption of each gas-consuming device; the gas consumption of the gas-consuming device when it uses gas independently refers to the gas consumption used by the gas-consuming device within an independent time period.
[0123] In each gas usage cycle, the gas usage per unit time of each gas-consuming device is calculated through the independent usage of the gas-consuming device as the historical data of each gas usage cycle, including:
[0124] For each gas-using equipment within a gas usage cycle:
[0125] Get the independent duration of each gas-using device and record it in seconds as H;
[0126] Get the independent consumption of each gas-consuming device, denoted as F;
[0127] Set the unit time to one second;
[0128] Then the gas consumption per unit time of each gas-consuming equipment is F÷H;
[0129] The gas consumption per unit time of each gas-consuming device during the gas usage cycle is obtained to form the historical data of the gas usage cycle; the gas consumption per unit time of each device is determined by screening the independent duration of each gas-consuming device and calculating its independent gas consumption. This method can accurately identify the gas usage behavior of each device and avoid the problem of gas usage confusion when multiple devices are used at the same time; the statistics of independent duration ensure that the gas usage data of each device is more accurate without interference from other devices, which helps to improve the accuracy of measurement.
[0130] The calculation of the average gas consumption per unit time of each gas-consuming device includes:
[0131] After each gas usage cycle ends, the currently ended gas usage cycle is recorded as a marked gas usage cycle;
[0132] Obtain all gas usage cycles before the marked gas usage cycle to form a historical gas cycle set;
[0133] Get the historical data of each gas usage cycle in the historical gas cycle set;
[0134] According to the historical data of each gas usage cycle, the gas usage per unit time of each gas-using device in each gas usage cycle is obtained to form a unit usage set of each gas-using device;
[0135] For each gas consumer:
[0136] Get the number of elements in the unit usage set, denoted as A;
[0137] Calculate the sum of all elements in the unit usage set, denoted as Z;
[0138] Calculate Z÷A, and use the result as the average gas consumption per unit time of each gas-consuming device corresponding to the marked gas usage cycle; after each gas usage cycle, mark it as a "marked gas usage cycle", and use the data of all previous gas usage cycles to form a historical gas cycle set to analyze the gas consumption per unit time of each gas-consuming device. This method uses the unit consumption set to calculate the average gas consumption per unit time, which can smooth out the fluctuations in each gas cycle; during the gas use process, the gas usage in each cycle may fluctuate due to changes in user behavior or different equipment conditions; calculating the average value through the historical data set can effectively reduce the error caused by abnormal conditions in a single cycle, thereby improving the stability of measurement and ensuring accuracy in long-term use.
[0139] The step of obtaining the abnormal duration period within the abnormal gas usage cycle and obtaining the marked gas-using equipment includes:
[0140] During the abnormal gas usage period, the timer starts when the noise exceeds the limit;
[0141] When the abnormal gas usage cycle ends, or when the noise is detected to be converted from an over-limit state to a normal state, the timing stops;
[0142] The time length obtained by the timing is obtained and recorded as the abnormal time length section within the abnormal gas usage cycle;
[0143] The gas-using equipment that uses gas within the abnormal time period is obtained and recorded as the marked gas-using equipment.
[0144] The first data calibration strategy is performed according to the marked gas-consuming equipment and the average gas consumption per unit time of each gas-consuming equipment, including:
[0145] Obtain each marked gas-using device within the abnormal time period;
[0146] The duration of gas usage of each marked gas-using device in the abnormal duration period is obtained respectively, and recorded as the abnormal gas usage duration of each marked gas-using device;
[0147] For each marked gas-consuming device during the abnormal duration:
[0148] Obtain the abnormal gas consumption duration of the marked gas-using equipment, and obtain the average gas consumption per unit time corresponding to the marked gas-using equipment;
[0149] The product of the abnormal gas usage duration and the average gas usage per unit time is calculated, and the result is used as the actual gas usage of the marked gas-using device; the actual gas usage described in this embodiment represents the actual gas usage of a certain gas usage cycle or a certain gas-using device;
[0150] Obtain the actual gas consumption of all marked gas-using devices during the abnormal time period;
[0151] The sum of the actual gas consumption of all marked gas-consuming devices during the abnormal time period is obtained as the actual gas consumption during the abnormal time period;
[0152] Obtain the gas usage outside the abnormal time period within the abnormal gas usage cycle, and add it to the actual gas usage during the abnormal time period as the gas usage recorded by the ultrasonic gas meter during the abnormal gas usage cycle;
[0153] After each gas usage cycle ends, the gas usage of the gas usage cycle is obtained, and the estimated gas usage is calculated, including:
[0154] Obtain all gas-using equipment within this gas usage cycle;
[0155] For each gas-consuming device within this gas usage cycle:
[0156] Obtain the gas usage time of the gas-consuming equipment and obtain the average gas usage per unit time corresponding to the gas-consuming equipment;
[0157] Calculate the product of the gas usage time and the average gas usage per unit time, and use the result as the estimated gas usage of the gas-consuming equipment;
[0158] Obtain the estimated gas consumption of each gas-consuming device during this gas usage cycle, and calculate the sum of the estimated gas consumption of all gas-consuming devices during this gas usage cycle as the estimated gas consumption for this gas usage cycle.
[0159] The step of comparing the gas consumption in the current gas usage cycle with the estimated gas consumption to determine whether there is an error in the gas consumption in the current gas usage cycle includes:
[0160] Obtain the gas consumption recorded by the ultrasonic gas meter during this gas usage cycle, recorded as D;
[0161] Get the estimated amount of gas for this gas usage cycle, denoted as R;
[0162] Calculate the absolute value of the difference between D and R, recorded as T;
[0163] Setting a maximum error threshold; the maximum error threshold reflects the difference between the gas consumption recorded by the ultrasonic gas meter and the estimated gas consumption. The smaller the value is set, the smaller the difference between the two is required;
[0164] Calculate the ratio of T to R and compare the obtained ratio with the maximum error threshold;
[0165] If the ratio of T to R is greater than the maximum error threshold, it is determined that there is an error in the gas usage during this gas usage cycle;
[0166] If the ratio of T to R is ≤ the maximum error threshold, it is determined that there is no error in the gas usage in this gas usage cycle;
[0167] If there is an error, executing a second data calibration strategy includes:
[0168] The gas usage of this gas usage cycle recorded by the ultrasonic gas meter is deleted, and the estimated gas usage of this gas usage cycle is used as the actual gas usage of this gas usage cycle and recorded.
[0169] The obtaining of the error value and performing statistical calibration according to the error value includes:
[0170] A threshold for determining the number of errors is set, denoted as K; the threshold for determining the number of errors K represents a determination condition for executing statistical calibration. When the number of gas usage cycles in which error values exist continuously is K, statistical calibration begins. By setting the threshold for determining the number of errors K, the scheme can effectively filter out single errors that occur occasionally. In the process of gas metering, individual usage cycles may lead to calculation deviations due to short-term factors. If calibration is performed based solely on the error of a single cycle, unnecessary adjustments may be made, which may in turn introduce more errors. By setting the K value, the system will only perform further calibration analysis when errors occur for K consecutive cycles. This mechanism ensures that the system takes corrective actions only when persistent errors occur, thereby avoiding excessive sensitivity of error calibration.
[0171] An error deviation threshold whose value is a positive number is set; the error deviation threshold represents the maximum deviation value between the allowed error values. If the difference between two error values is less than or equal to the error deviation threshold, the two error values are deemed equal. The setting of the error deviation threshold enables the system to flexibly judge the severity of the error. In K consecutive error cycles, by calculating the error deviation between each cycle and the marked cycle, the system can identify the trend and amplitude of the error. When all errors in the error value set are within a reasonable range, these errors can be considered to be normal fluctuations of the system. Statistical calibration can further optimize these minor deviations. However, if the error deviation exceeds the set threshold, the system determines that the error cannot be calibrated, thereby avoiding further data deviation caused by incorrect calibration. Through this layer of screening, the robustness of the system is ensured and the possibility of misoperation is reduced.
[0172] When there is an error in a gas usage cycle, the gas usage cycle is recorded as a marked cycle;
[0173] Obtain the gas consumption recorded by the ultrasonic gas meter during the marking period, and obtain the estimated gas consumption and gas consumption duration during the marking period;
[0174] Calculate the difference between the estimated gas amount and the gas amount recorded by the ultrasonic gas meter, and calculate the ratio of the difference to the gas amount of the marking period as the error value of the marking period;
[0175] If after the marking period, there are K consecutive gas usage periods with error values, then the error values of these K gas usage periods are obtained respectively to form an error value set;
[0176] When all the error values in the error value set are positive or negative, the difference between each error value and the error value of the marking period is calculated respectively, and the absolute value of the obtained result is taken as the error deviation of each error value, and compared with the error deviation threshold;
[0177] If in the error value set, there is an error value whose error deviation is greater than the error deviation threshold, no statistical calibration is performed;
[0178] If the error deviations of all error values in the error value set are ≤ the error deviation threshold, the error value of the marking period is used as the statistical calibration amount;
[0179] When controlling the ultrasonic gas meter to subsequently record the gas consumption of each gas usage cycle, the gas consumption recorded by the ultrasonic gas meter is obtained, which is recorded as M;
[0180] The product of M and the statistical calibration amount is calculated and added to M, and the result is used as the actual gas consumption in the gas usage cycle; by adopting the statistical calibration amount and combining the error value of the marking period for calibration correction, the accuracy of the data is further improved. After the gas meter adds the product of the data amount M and the calibration amount in the subsequent records, the measurement result can be dynamically adjusted to ensure the real-time and accuracy of the gas consumption data. This method can not only correct historical errors, but also continuously optimize future data over time, so that the system has good self-calibration and feedback functions.
[0181] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0182] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A civil gas metering method based on ultrasonic metering, characterized in that: include: Use ultrasonic gas meters to record users' gas usage; When it is detected that a user uses gas, the period from when the user starts to use gas to when the user stops using gas is recorded as a gas use cycle of the user; In each gas usage cycle: obtain the equipment currently using gas, record it as the gas-using equipment; obtain the duration of gas usage for each gas-using equipment, record it as the gas usage duration for each gas-using equipment; Obtain the time when each gas-consuming device starts using gas and the time when it stops using gas, and record them as the gas-using time period of the gas-consuming device; When the gas-using equipment uses gas, its heat load is a fixed value; In each gas usage cycle, filter out the independent gas usage time period of each gas-consuming device and calculate the independent gas usage of each gas-consuming device; In each gas usage cycle, the gas consumption per unit time of each gas-consuming device is calculated through the independent consumption of the gas-consuming device, which is used as the historical data of each gas usage cycle; Calculate the average gas consumption per unit time of each gas-consuming equipment; During each gas usage cycle, the noise of the gas pipeline where the ultrasonic gas meter is located is monitored; When noise exceeding the limit is detected in a gas usage cycle, the gas usage cycle will be recorded as an abnormal gas usage cycle; Obtain the abnormal duration period within the abnormal gas usage cycle and obtain the marked gas-using equipment; Performing a first data calibration strategy according to the marked gas-consuming equipment and the average gas consumption per unit time of each gas-consuming equipment; After each gas usage cycle, the gas usage of the gas usage cycle is obtained and the estimated gas usage is calculated; Compare the gas consumption in this gas usage cycle with the estimated gas consumption to determine whether there is an error in the gas consumption in this gas usage cycle; If there is no error, the gas consumption of this gas usage cycle is recorded; If there is an error, executing a second data calibration strategy; Obtaining error values, and performing statistical calibration based on the error values; In each gas usage cycle, the independent gas usage time period of each gas-consuming device is screened out, and the independent gas usage of each gas-consuming device is calculated, including: In each gas usage cycle, obtain the gas usage time period of each gas-consuming device; Compare the gas usage time periods of each gas-consuming device; Obtain the time period during which each gas-consuming device uses gas alone; According to the time period during which each gas-consuming device independently uses gas, the gas usage time during which each gas-consuming device independently uses gas is calculated and recorded as the independent time of each gas-consuming device; Obtain the gas consumption of each gas-consuming device when it uses gas independently, and record it as the independent consumption of each gas-consuming device; In each gas usage cycle, the gas usage per unit time of each gas-consuming device is calculated through the independent usage of the gas-consuming device as the historical data of each gas usage cycle, including: For each gas-using equipment within a gas usage cycle: Get the independent duration of each gas-using device and record it in seconds as H; Get the independent consumption of each gas-consuming device, denoted as F; Set the unit time to one second; Then the gas consumption per unit time of each gas-consuming equipment is F÷H; Obtain the gas consumption per unit time of each gas-consuming device during the gas usage cycle to form the historical data of the gas usage cycle; The calculation of the average gas consumption per unit time of each gas-consuming device includes: After each gas usage cycle ends, the currently ended gas usage cycle is recorded as a marked gas usage cycle; Obtain all gas usage cycles before the marked gas usage cycle to form a historical gas cycle set; Get the historical data of each gas usage cycle in the historical gas cycle set; According to the historical data of each gas usage cycle, the gas usage per unit time of each gas-using device in each gas usage cycle is obtained to form a unit usage set of each gas-using device; For each gas consumer: Get the number of elements in the unit usage set, denoted as A; Calculate the sum of all elements in the unit usage set, denoted as Z; Calculate Z÷A and use the result as the average gas consumption per unit time of each gas-consuming device corresponding to the marked gas usage cycle; The step of obtaining the abnormal duration period within the abnormal gas usage cycle and obtaining the marked gas-using equipment includes: During the abnormal gas usage period, the timer starts when the noise exceeds the limit; When the abnormal gas usage cycle ends, or when the noise is detected to be converted from an over-limit state to a normal state, the timing stops; The time length obtained by the timing is obtained and recorded as the abnormal time length section within the abnormal gas usage cycle; Obtain the gas-using equipment that uses gas within the abnormal time period and record them as marked gas-using equipment; The first data calibration strategy is performed according to the marked gas-consuming equipment and the average gas consumption per unit time of each gas-consuming equipment, including: Obtain each marked gas-using device within the abnormal time period; The duration of gas usage of each marked gas-using device in the abnormal duration period is obtained respectively, and recorded as the abnormal gas usage duration of each marked gas-using device; For each marked gas-consuming device during the abnormal duration: Obtain the abnormal gas consumption duration of the marked gas-using equipment, and obtain the average gas consumption per unit time corresponding to the marked gas-using equipment; Calculate the product of abnormal gas consumption duration and average gas consumption per unit time, and use the result as the actual gas consumption of the marked gas-consuming equipment; Obtain the actual gas consumption of all marked gas-using devices during the abnormal time period; The sum of the actual gas consumption of all marked gas-consuming devices during the abnormal time period is obtained as the actual gas consumption during the abnormal time period; Obtain the gas usage outside the abnormal time period within the abnormal gas usage cycle, and add it to the actual gas usage during the abnormal time period as the gas usage recorded by the ultrasonic gas meter during the abnormal gas usage cycle; After each gas usage cycle ends, the gas usage of the gas usage cycle is obtained, and the estimated gas usage is calculated, including: Obtain all gas-using equipment within this gas usage cycle; For each gas-consuming device within this gas usage cycle: Obtain the gas usage time of the gas-consuming equipment and obtain the average gas usage per unit time corresponding to the gas-consuming equipment; Calculate the product of the gas usage time and the average gas usage per unit time, and use the result as the estimated gas usage of the gas-consuming equipment; Obtain the estimated gas consumption of each gas-consuming device in the current gas usage cycle, and calculate the sum of the estimated gas consumption of all gas-consuming devices in the current gas usage cycle as the estimated gas consumption of the current gas usage cycle; The step of comparing the gas consumption in the current gas usage cycle with the estimated gas consumption to determine whether there is an error in the gas consumption in the current gas usage cycle includes: Obtain the gas consumption recorded by the ultrasonic gas meter during this gas usage cycle, recorded as D; Get the estimated amount of gas for this gas usage cycle, denoted as R; Calculate the absolute value of the difference between D and R, recorded as T; Set the maximum error threshold; Calculate the ratio of T to R and compare the obtained ratio with the maximum error threshold; If the ratio of T to R is greater than the maximum error threshold, it is determined that there is an error in the gas usage during this gas usage cycle; If the ratio of T to R is ≤ the maximum error threshold, it is determined that there is no error in the gas usage in this gas usage cycle; If there is an error, executing a second data calibration strategy includes: The gas consumption of the current gas usage cycle recorded by the ultrasonic gas meter is deleted, and the estimated gas consumption of the current gas usage cycle is used as the actual gas consumption of the current gas usage cycle and recorded; The obtaining of the error value and performing statistical calibration according to the error value comprises: Set the error number judgment threshold, denoted as K; Set the error deviation threshold to a positive value; When there is an error in a gas usage cycle, the gas usage cycle is recorded as a marked cycle; Obtain the gas consumption recorded by the ultrasonic gas meter during the marking period, and obtain the estimated gas consumption and gas consumption duration during the marking period; Calculate the difference between the estimated gas amount and the gas amount recorded by the ultrasonic gas meter, and calculate the ratio of the difference to the gas amount of the marking period as the error value of the marking period; If after the marking period, there are K consecutive gas usage periods with error values, then the error values of these K gas usage periods are obtained respectively to form an error value set; When all the error values in the error value set are positive or negative, the difference between each error value and the error value of the marking period is calculated respectively, and the absolute value of the obtained result is taken as the error deviation of each error value, and compared with the error deviation threshold; If in the error value set, there is an error value whose error deviation is greater than the error deviation threshold, no statistical calibration is performed; If the error deviations of all error values in the error value set are ≤ the error deviation threshold, the error value of the marking period is used as the statistical calibration amount; When controlling the ultrasonic gas meter to subsequently record the gas consumption of each gas usage cycle, the gas consumption recorded by the ultrasonic gas meter is obtained, which is recorded as M; The product of M and the statistical calibration amount is calculated and added to M, and the result is taken as the actual gas consumption during the gas use period.
Citation Information
Patent Citations
Method for improving metering precision of ultrasonic gas meter under abnormal flow
CN115931070A
Gas meter anomaly detection method, device and equipment and storage medium
CN118730250A
Cited By
A wide-range high-precision gas metering system and method based on ultrasonic time difference method
CN122858610A