A control system of a smart gas meter controller function detection device
By dividing the smart gas meter controller into time periods and clustering dynamic operating conditions, identifying error-exceeding operating condition groups and constructing an adaptive compensation model, the metering deviation problem of the smart gas meter controller in dynamic flow scenarios is solved, realizing full-scenario coverage detection and real-time accurate compensation, thus improving metering reliability.
Patent Information
- Application Number
- CN202511329610.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-09-17
AI Technical Summary
Existing smart gas meter controller detection equipment has a problem of missing detection in dynamic flow scenarios, resulting in metering deviations. It is impossible to accurately locate the root cause of the error and lacks real-time compensation methods, which affects the legitimate rights and interests of gas companies and users.
By using modules for time period segmentation, operating condition clustering, error determination, and compensation construction, stable and dynamic traffic periods are divided, operating condition groups with excessive errors are identified, and an adaptive compensation model for operating conditions is constructed to realize real-time dynamic characteristic calculation of traffic and error compensation.
It achieves full-scenario coverage detection, accurately determines systematic errors, adapts to different usage scenarios, ensures stable measurement accuracy under dynamic operating conditions, reduces disputes, and improves measurement reliability.
Smart Images

Figure CN120831950B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart gas meter testing technology, specifically a control system for a smart gas meter controller function testing device. Background Technology
[0002] As the core metering instrument for gas trade settlement, the metering accuracy of smart gas meters is directly related to the legitimate rights and interests of gas companies and users. Currently, the functional testing equipment for smart gas meter controllers generally suffers from the problem of "missed detection in subdivided metering scenarios": existing tests mostly focus on stable flow scenarios (such as the gas consumption of a typical household of 0.1-4 m³ / h), only verifying the metering accuracy under stable flow conditions, but ignoring the dynamic flow scenarios that commonly exist in actual use - such as sudden large flow of gas from commercial stoves, instantaneous flow fluctuations when gas water heaters start and stop, and sudden changes in flow caused by load switching of industrial equipment.
[0003] The direct consequences of the aforementioned missed detection issues are that while smart gas meter controllers perform well in laboratory tests, after being put into actual use, metering deviations in dynamic flow scenarios (such as slow metering during instantaneous high flow rates and unstable metering during start-stop fluctuations) lead to disputes involving hidden gas shortages by gas companies or overpayments by users. In addition, existing testing equipment lacks the ability to structurally classify dynamic operating conditions, making it impossible to accurately pinpoint the root causes of metering errors in different dynamic scenarios. Furthermore, the disconnect between testing and actual application means that even if dynamic errors are detected, it is difficult to correct them through real-time compensation, further reducing the metering reliability of smart gas meters.
[0004] Therefore, the present invention provides a control system for a functional testing device for an intelligent gas meter controller. Summary of the Invention
[0005] In order to overcome the shortcomings of the prior art, at least one technical problem raised in the background art is solved.
[0006] The technical solution adopted by this invention to solve its technical problem is: a control system for a smart gas meter controller function detection device, comprising:
[0007] Time period segmentation module: By analyzing the stability of the flow rate of the smart gas meter controller in each time period unit, the time period unit is divided into stable flow period and dynamic flow period;
[0008] Operating condition clustering module: Calculates the dynamic characteristics of traffic flow within a dynamic traffic period and obtains multiple dynamic operating condition groups through clustering.
[0009] Error determination module: The module tests and compares the metering function of the smart gas meter controller under stable flow and dynamic operating conditions. It identifies the error exceeding the standard in the dynamic operating condition group and determines whether there is a systematic metering error in the smart gas meter controller under dynamic operating conditions by analyzing the frequency and error distribution characteristics.
[0010] Compensation construction module: If it exists, construct an adaptive compensation model based on the dynamic characteristics of the flow of the dynamic working condition group.
[0011] Dynamic compensation module: It predicts the flow stability by monitoring the metered flow of the smart gas meter controller in real time. If the prediction result is dynamic, it calculates the dynamic characteristics of the flow in real time, determines the dynamic operating condition group, and compensates the metering error of the smart gas meter controller under dynamic operating conditions according to the operating condition adaptive compensation model of the dynamic operating condition group.
[0012] Furthermore, the method for dividing the stable traffic period and the dynamic traffic period is as follows:
[0013] The system synchronously collects the instantaneous flow rate, pipeline pressure, gas temperature, and meter readings of the smart gas meter controller during historical operating cycles.
[0014] The historical operating cycle is divided into several time periods of equal length. For each time period:
[0015] Calculate the coefficient of variation and the maximum rate of change of flow within the time period unit, where the maximum rate of change of flow is the maximum value of the rate of change of flow between adjacent sampling points within the time period unit;
[0016] The coefficient of variation is compared with the preset coefficient of variation, and the maximum rate of change of flow is compared with the preset rate of change.
[0017] If the coefficient of variation is less than the preset coefficient of variation and the maximum flow rate of change is less than the preset rate of change, the time period is marked as a stable flow period; otherwise, it is marked as a dynamic flow period.
[0018] Furthermore, the calculation method for the dynamic characteristics of traffic flow within the dynamic traffic period is as follows:
[0019] Flow dynamic characteristics include peak flow multiple, mean flow rate of change, pressure fluctuation amplitude, and dynamic duration;
[0020] For any given dynamic traffic period:
[0021] The peak flow multiple is obtained by calculating the ratio of the maximum flow during the dynamic flow period to the average flow during the stable flow period, where the stable flow period is the stable flow period before the dynamic flow period.
[0022] The mean rate of change of flow rate is obtained by calculating the mean of the flow rate change rate of each adjacent sampling point within the dynamic flow period;
[0023] The pressure fluctuation range is the difference between the maximum and minimum pressure during the dynamic flow period;
[0024] The dynamic duration is the length of the dynamic traffic period, which is the end time of the dynamic traffic period minus the start time.
[0025] Furthermore, the method for obtaining multiple dynamic operating condition groups through clustering is as follows:
[0026] For each dynamic traffic period:
[0027] The dynamic characteristics of the flow in each dynamic flow period are standardized and used as the operating condition characteristics.
[0028] The elbow method is used to determine the number of clusters K, starting from 1. The sum of squared errors SSE corresponding to each K is calculated, and the K-SSE curve is plotted. The point where the SSE drops sharply and then flattens out is the optimal value of K.
[0029] K working condition features are randomly selected as initial cluster centers. The Euclidean distance between each working condition feature and the K cluster centers is calculated, and the working condition features are assigned to the clusters with the closest Euclidean distance.
[0030] After all operating condition features are assigned, the center of each cluster is recalculated. The assignment and update are repeated until the change in the cluster center is less than or equal to the preset threshold. The clustering ends, and multiple dynamic operating condition groups are finally obtained.
[0031] Furthermore, the method for testing and comparing the metering function of the smart gas meter controller under stable flow and dynamic operating conditions is as follows:
[0032] For stable flow, the nominal flow rate of the meter is used as the benchmark. Low flow boundary point, normal intermediate point and high flow boundary point are selected, and a first-level accuracy standard device is used to maintain the flow stability of each detection point.
[0033] The initial cumulative reading of the smart meter and the initial reading of the standard device are recorded simultaneously. After the cumulative volume of the standard device reaches the threshold, the final reading of the smart meter and the final reading of the standard device are recorded simultaneously. At the same time, the pipeline pressure and gas temperature are collected during the detection.
[0034] The cumulative volume of the smart meter and the standard device is converted to the standard state according to the ideal gas law, and then the relative error of each flow point is obtained by calculating the deviation of the cumulative volume between the smart meter and the standard device.
[0035] Each detection point was tested three times, and the average error was taken as the stable flow error of that flow point.
[0036] For each dynamic operating condition group, the operating condition characteristics are reproduced using a dynamic flow calibration device, and instantaneous data from smart meters and standard devices are collected simultaneously, including the instantaneous flow rate and cumulative reading of smart meters, the instantaneous flow rate and cumulative reading of standard devices, as well as real-time pressure and temperature.
[0037] For any dynamic flow time period within the dynamic operating condition group, the cumulative error is calculated according to the stable flow error formula. The cumulative error of all dynamic time periods within the dynamic operating condition group is statistically analyzed, and the average value is taken as the measurement error of the dynamic operating condition group.
[0038] Furthermore, the method for identifying the error exceeding the standard operating condition group is as follows:
[0039] If the metering error of the smart gas meter controller is within the standard range under stable flow conditions:
[0040] For any dynamic operating condition group, calculate the deviation between the average metering error within the group and the metering error under stable flow rate.
[0041] If the average error of all dynamic flow time periods within a group exceeds the standard range or the deviation from the metering error under stable flow exceeds the preset deviation, the dynamic operating condition group will be marked as an error exceeding the standard operating condition group.
[0042] Furthermore, the method for determining whether the smart gas meter controller has systematic metering errors under dynamic operating conditions is as follows:
[0043] The proportion of error-exceeding operating conditions in the total dynamic operating conditions is calculated to obtain the percentage of error-exceeding operating conditions, and then compared with the preset percentage.
[0044] If the proportion of error-exceeding operating conditions is greater than the preset proportion, and the error direction of each error-exceeding operating condition group is consistent, then the smart gas meter controller has a systematic metering error under dynamic operating conditions.
[0045] Furthermore, the construction process of the adaptive compensation model for the working condition is as follows:
[0046] For any dynamic operating condition group;
[0047] Based on the dynamic characteristics of flow rate under dynamic operating conditions, flow rate dynamic characteristics that are strongly correlated with measurement error are selected as model input features by using the Pearson correlation coefficient.
[0048] Based on the multiple linear regression method, a multiple linear regression model between the model input features and the measurement error compensation amount is established as the working condition adaptive compensation model for the dynamic working condition group.
[0049] Furthermore, the method for predicting traffic stability is as follows:
[0050] Real-time data collection of flow rate, pressure, and temperature from the smart gas meter controller under the current metering conditions;
[0051] The real-time traffic variation coefficient and traffic change amplitude are calculated based on a sliding window. If the real-time variation coefficient is greater than the preset variation coefficient or the real-time traffic change amplitude is greater than the preset change amplitude, then the traffic is predicted as dynamic.
[0052] Furthermore, the method for determining the dynamic operating condition group and performing measurement error compensation is as follows:
[0053] Calculate the Euclidean distance between the real-time flow dynamic characteristics and the characteristic centers of each dynamic operating condition group. The dynamic operating condition group with the smallest Euclidean distance is the current dynamic operating condition group.
[0054] Based on the current operating conditions of pressure and temperature, the volume is converted into the standard state and the real-time measurement error is calculated.
[0055] Call the adaptive compensation model of the current dynamic working condition group, input the real-time model input features, and obtain the measurement error compensation amount;
[0056] The output of the compensated metering value is This is the final measurement value, where V 表显实时 C is the real-time metering value displayed by the smart gas meter controller. 实时 This is the error compensation amount.
[0057] The beneficial effects of this invention are as follows: By covering all scenarios, it overcomes the limitation of existing equipment that only detects stable flow rates. Through historical data segmentation and dynamic clustering, it covers all dynamic operating conditions such as start-up, shutdown, fluctuations, and sudden increases in flow rates in both residential and industrial scenarios, completely solving the problem of missed detections in subdivided metering scenarios and accurately determining systematic errors. By combining the proportion and distribution characteristics (directional consistency) of error-exceeding operating condition groups, it avoids misjudging single operating condition errors as systemic problems, providing accurate basis for locating the root cause of errors. It constructs adaptive compensation models for different dynamic operating condition groups, rather than a "one-size-fits-all" compensation strategy, ensuring that the metering error in each dynamic scenario is controlled at a low level (≤±1.5%). Detection and application closed loop: It connects "offline detection and analysis" with "online real-time compensation," transforming laboratory test results into metering accuracy assurance in actual use, effectively reducing metering disputes between gas companies and users. Through the historical data period and segmentation method differentiated by user type, it adapts to smart gas meter controllers in different usage scenarios such as residential and industrial applications, and has broad application value. Attached Figure Description
[0058] The invention will now be further described with reference to the accompanying drawings.
[0059] Figure 1 This is a flowchart of the steps of the control system of the intelligent gas meter controller function testing device described in this invention;
[0060] Figure 2 This is a logic diagram of the control system of a smart gas meter controller function detection device according to the present invention. Detailed Implementation
[0061] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0062] Please see Figure 1 As shown in the embodiment of the present invention, the control system of a smart gas meter controller function testing device includes the following modules:
[0063] Time period segmentation module: By analyzing the stability of the flow rate of the smart gas meter controller in each time period unit, the time period unit is divided into stable flow period and dynamic flow period;
[0064] The process of dividing the time period into stable flow periods and dynamic flow periods includes:
[0065] The historical operating cycle of the smart gas meter controller is determined based on the user type. For example, for residential gas meters, a complete 14-day cycle is used (covering the gas consumption patterns of two weeks, including differences between weekdays and weekends), while for industrial gas meters, a cycle of three production shifts is used (covering typical operating conditions such as equipment start-up and shutdown, and load switching).
[0066] Based on the continuity of gas consumption behavior, the historical operating cycle is divided into several time periods of equal length, for example:
[0067] Residential gas meters: divided into 1-hour segments;
[0068] Industrial gas meters: divided into 30-minute segments (to match short-cycle load changes of equipment);
[0069] Synchronously collect the instantaneous flow rate Q (unit: m³) of the smart gas meter controller within the historical data period. 3 / h), pipeline pressure P (kPa), gas temperature T (°C), smart gas meter controller reading V (m³). 3 Sampling frequency ≥ 1Hz (to ensure dynamic changes are captured);
[0070] For each small time period:
[0071] Calculate the coefficient of variation (CV) and the maximum rate of change (∆Q) of the flow rate within a short time period. max , , where Q i The flow rate at the i-th sampling point within a short time interval;
[0072] The coefficient of variation is compared with the preset coefficient of variation, and the maximum rate of change of flow is compared with the preset rate of change.
[0073] If the coefficient of variation is less than the preset rate of change and the maximum flow rate of change is less than the preset rate of change, the short time period is marked as a stable flow period; otherwise, it is marked as a dynamic flow period.
[0074] The purpose of dividing traffic periods into stable and dynamic periods is as follows:
[0075] Clearly define which periods are characterized by stable gas consumption and which by dynamic gas consumption, to ensure that the analysis objects for subsequent dynamic scenarios accurately correspond to the actual flow rate changes in use;
[0076] Operating condition clustering module: Calculates the dynamic characteristics of traffic flow within a dynamic traffic period and obtains multiple dynamic operating condition groups through clustering.
[0077] The calculation process for the dynamic characteristics of the flow during the dynamic flow period includes:
[0078] For each dynamic traffic period:
[0079] Extract dynamic traffic features from each dynamic traffic period, including the peak traffic multiple K. peak Mean rate of change of flow Pressure fluctuation amplitude δ P Dynamic duration t d ;
[0080] Among them, the peak flow multiple K peak The formula used to distinguish between small fluctuations and large surges is: , where Q max This represents the maximum flow rate within a dynamic flow period. The average flow rate during the previous stable flow period;
[0081] Mean rate of change of flow The formula used to distinguish between slow fluctuations and rapid switching is: , where Q i Let n be the flow rate at the i-th sampling point within the dynamic flow period, and n be the number of sampling points within the dynamic flow period.
[0082] Pressure fluctuation amplitude δ P It is the difference between the maximum and minimum pressure during a dynamic flow period, used to distinguish between stable pressure dynamics and pressure disturbance dynamics.
[0083] Dynamic duration t d The length of the dynamic traffic period is the difference between the end time and the start time of the dynamic traffic period, used to distinguish between instantaneous start and stop and continuous fluctuations;
[0084] For each flow dynamic characteristic, Z-score normalization is used to eliminate the influence of steelmaking, and the formula is: Where μ is the characteristic mean and σ is the characteristic standard deviation;
[0085] The dynamic characteristics of traffic flow in each time period are standardized and used as operating condition features for clustering. Different dynamic operating conditions corresponding to the dynamic traffic flow time period are clustered into multiple dynamic operating condition groups, specifically:
[0086] K working condition features are randomly selected as initial cluster centers. The Euclidean distance between each working condition feature and the K cluster centers is calculated, and the working condition features are assigned to the clusters with the closest Euclidean distance.
[0087] After all operating condition features are assigned, the center of each cluster is recalculated. The assignment and update are repeated until the change in the cluster center is less than or equal to the preset threshold. The clustering ends and multiple dynamic operating condition groups are finally obtained, such as: start-stop operating condition group, traffic fluctuation operating condition group, and large traffic surge operating condition group.
[0088] For example, taking 10 dynamic flow time periods of a residential gas meter as an example, four core characteristic values are calculated for each dynamic flow time period:
[0089] |Time Period ID|Peak Traffic Multiple K peak |Mean rate of change of flow |Pressure fluctuation amplitude δ P |Dynamic duration t d |;
[0090] |1|2.1|12.5|0.4|8|;
[0091] |2|2.8|10.3|0.5|12|; ...
[0092] |10|6.2|28.5|1.3|35|;
[0093] Calculate the mean and standard deviation of each feature using the formula. Standardize the features;
[0094] Calculate the sum of squared errors (SSE) for different K values, plot the K-SSE curve, and observe that the SSE drops sharply and then flattens out when K=3. Therefore, the optimal number of clusters K=3 is selected.
[0095] Randomly select the initial cluster center:
[0096] Cluster center 1 (randomly selected ID=1): [-0.62, -0.10, -0.64, -0.75];
[0097] Cluster center 2 (randomly selected ID=4): [-1.14, -1.17, -1.15, 1.13];
[0098] Cluster center 3 (randomly selected ID=7): [0.77, 0.91, 0.64, -0.26];
[0099] First assignment: Calculate the Euclidean distance between each sample and the three cluster centers, and assign it to the nearest cluster.
[0100] Cluster 1: ID=1,2,3;
[0101] Cluster 2: ID=4,5,6;
[0102] Cluster 3: ID=7,8,9,10;
[0103] Update cluster centers: Calculate the new center for each cluster:
[0104] New center of cluster 1: [-0.45, -0.12, -0.38, -0.74];
[0105] New center of cluster 2: [-1.09, -1.10, -1.07, 1.48];
[0106] New center in cluster 3: [1.15, 1.17, 1.09, -0.22];
[0107] Reassignment and update: Repeat the above process until the change in cluster centers is less than 0.01. The result of the second assignment is the same as the first, and the change in cluster centers is less than 0.01. The clustering ends.
[0108] Ultimately, three dynamic operating condition groups were obtained:
[0109] |Working Condition Group| Includes Time Period ID|Feature Description|Working Condition Group Naming|;
[0110] |cluster 1|1,2,3|K peak Medium (2.1-2.8), high flow rate change rate (10.3-14.2%), small pressure fluctuation (0.4-0.6kPa), short duration (6-12s) |Start-stop condition group|;
[0111] |cluster 2|4,5,6|K peak Small (1.2-1.4), low flow rate change rate (2.1-3.5%), small pressure fluctuation (0.2-0.3 kPa), long duration (150-200 s) |Flow fluctuation group|;
[0112] |Cluster 3|7,8,9,10|K peakLarge (4.5-6.2), high flow rate change rate (22.3-28.5%), large pressure fluctuation (0.9-1.3kPa), medium duration (35-60s) | Large flow surge group |;
[0113] Clustering successfully divided 10 dynamic traffic time periods into 3 dynamic operating condition groups with distinct characteristics:
[0114] Start-stop mode group: mainly corresponds to the short-term start-up and shutdown of gas equipment;
[0115] Flow fluctuation group: mainly corresponds to the firepower adjustment of gas equipment during use;
[0116] High flow surge group: mainly for the simultaneous use of multiple gas appliances or the start-up of large equipment;
[0117] The purpose of clustering different dynamic traffic time periods according to their dynamic characteristics is as follows:
[0118] The complex and diverse dynamic flow changes are abstracted into a finite number of interpretable and targeted operating condition categories, avoiding a "one-size-fits-all" approach to all dynamic scenarios during subsequent detection and modeling, and laying the foundation for accurate analysis of measurement errors in different dynamic scenarios;
[0119] Error determination module: The module tests and compares the metering function of the smart gas meter controller under stable flow and dynamic operating conditions. It identifies the error exceeding the standard in the dynamic operating condition group and determines whether there is a systematic metering error in the smart gas meter controller under dynamic operating conditions by analyzing the frequency and error distribution characteristics.
[0120] The process of detecting and comparing the metering function of the smart gas meter controller under stable flow conditions includes:
[0121] For stable traffic:
[0122] Clearly define stable traffic detection points, which need to cover three types of key traffic, including low traffic boundary points, regular intermediate points, and high traffic boundary points;
[0123] For each set stable flow point, repeat the detection 3 times according to the following procedure (to ensure repeatability):
[0124] S1: Start the standard metering device, adjust the flow rate to the target value (e.g., 0.1 m³ / h), and after the flow rate stabilizes (the standard device shows a flow rate fluctuation of ≤ ±1%), record the initial cumulative reading of the smart meter (referred to as V0) and the initial reading of the standard device (referred to as V0standard).
[0125] S2: Maintain stable flow operation. When the cumulative volume of the standard device reaches the preset threshold (e.g., 1m³, to avoid excessive relative error caused by small volume), the smart meter terminates the cumulative reading (V1) and the standard device terminates the reading (V1 standard).
[0126] S3: Anomaly monitoring: If the smart meter experiences "disconnection or reading jump" during the test, stop the test immediately, check the pipeline sealing or controller communication problems, and retest after troubleshooting;
[0127] According to the formula Calculate the relative error for each flow point, where V1-V0 are the cumulative values of the smart meter, and V 1标 -V 0标 For the cumulative value of the standard device, the smaller the absolute value of E, the higher the accuracy;
[0128] Calculate the coefficient of variation of the error value of each flow point in 3 detections and compare it with the preset coefficient of variation. If the coefficient of variation is less than or equal to the preset coefficient of variation, calculate the average relative error of the 3 detections and use it as the measurement error of the flow point.
[0129] For dynamic operating condition groups:
[0130] The core equipment includes a dynamic flow calibration device and a high-frequency data acquisition system. The dynamic flow calibration device supports "flow-time" curve programming and control accuracy. The high-frequency data acquisition system has a sampling frequency of ≥10Hz and synchronously acquires the "instantaneous flow and cumulative reading" of the smart meter and the "instantaneous flow, cumulative reading and real-time pressure" of the standard device to avoid errors caused by time difference.
[0131] For each dynamic operating condition group, dynamic flow-time simulation curves are generated according to characteristic parameters, for example:
[0132] Phase 1 (pre-stabilization period): 0~10s, flow rate stabilizes at 1m³ / h (simulating the low flame state of a commercial stove).
[0133] Phase 2 (Dynamic Period): 10~20s, flow rate linearly increases from 1 m³ / h to 5 m³ / h (K peak =5), maintained for 10s (t) d =10s);
[0134] Phase 3 (post-stabilization period): 20~30s, the flow rate decreases linearly from 5m³ / h to 1m³ / h;
[0135] For each dynamic operating condition group, the test is repeated 3 times, and the procedure is as follows:
[0136] S1: Piping Connection and Parameter Initialization: Connect the smart meter to the dynamic calibration device, turn on the constant temperature and pressure control (same as stable scenario), load the "Group 1 Dynamic Curve" through the software, and record the initial cumulative reading of the smart meter (V0, 动 ), initial reading of standard device (V) 0,标 ).
[0137] S2: Dynamic Scene Reproduction and Data Acquisition: Start the dynamic calibration device and run it according to the preset curve t1 (covering the pre-stabilization period - dynamic period - post-stabilization period 0-t1). The acquisition system synchronously records one set of data every 0.1s:
[0138] Smart Meter: Instantaneous Flow Q 智 (t), cumulative reading V 智 (t);
[0139] Standard device: Instantaneous flow rate Q 标 (t), cumulative reading V 标 (t), real-time pressure P(t);
[0140] Ensure that changes in traffic and pressure during the dynamic period are consistent with the actual scenario;
[0141] S3: Anomaly monitoring: If the smart meter shows "no response to instantaneous flow and stagnation of cumulative reading" during the dynamic period, the test should be stopped and the dynamic sampling frequency of the controller (whether it is lower than 10Hz, causing missed sampling) or algorithm lag issues should be investigated.
[0142] Convert the volume point by point to the volume under standard conditions;
[0143] For each dynamic condition within the dynamic condition group:
[0144] For each sampling point in the dynamic operating condition, calculate the metering error for a single dynamic flow time period: , where V 0,动 V is the cumulative reading of the smart gas meter controller. 0,标 The cumulative reading of the standard device;
[0145] For each dynamic operating condition group, calculate the average metering error of all dynamic flow time periods within the group, and use it as the metering error of the dynamic operating condition group.
[0146] The process for identifying the error-exceeding operating condition group includes:
[0147] If the metering error of the smart gas meter controller is within the standard range under stable flow conditions:
[0148] For any dynamic operating condition group, calculate the deviation between the measurement error of the dynamic operating condition group and the measurement error under stable flow. If the average error of all dynamic flow time periods in the group exceeds the standard range or the deviation from the measurement error under stable flow exceeds the preset deviation, the dynamic operating condition group is marked as an error exceeding the standard operating condition group.
[0149] The process of determining whether the smart gas meter controller has systematic metering errors under dynamic operating conditions includes:
[0150] The proportion of error-exceeding operating conditions in the total number of dynamic operating conditions is calculated, and the percentage of error-exceeding operating conditions is compared with the preset percentage.
[0151] If the proportion of error-exceeding working conditions is greater than the preset proportion, and the error direction of each error-exceeding working condition group is consistent, then the smart gas meter controller has a systematic metering error under dynamic working conditions.
[0152] The purpose of determining whether a smart gas meter controller has systematic metering errors under dynamic operating conditions is as follows:
[0153] Accurately identifying the core issues of dynamic metering not only clarifies whether dynamic errors exist, but also determines whether the error is an accidental problem in a single scenario or a widespread system defect, providing a basis for decision-making on whether to build a compensation model in the future.
[0154] Compensation construction module: If it exists, construct an adaptive compensation model based on the dynamic characteristics of the flow of the dynamic working condition group.
[0155] The construction process of the adaptive compensation model for each dynamic working condition group includes:
[0156] Based on the dynamic characteristics of flow rate under dynamic operating conditions, flow rate dynamic characteristics that are strongly correlated with measurement error are selected as model input features by using the Pearson correlation coefficient.
[0157] A model is constructed using multiple linear regression, and a compensation quantity C is established. k Linear relationship with input features;
[0158] The model formula is C k =a0+a1·f1+a2·f2+...+a n ·f n , where C k f is the compensation amount for the k-th working condition group. n For the nth input feature, a n The nth model parameter is obtained by fitting historical error data using the least squares method.
[0159] For example, for groups experiencing a large surge in traffic:
[0160] Input features: Kpeak (Peak flow multiple), δ P (Pressure fluctuation range);
[0161] The fitted parameters are: a0=0.15, a1=0.6, a2=1.2;
[0162] Model formula: C = 0.15 + 0.6·K peak +1.2·δ P The meaning is K peak For every increase of 1, the compensation amount increases by 0.6%, δ P For every 0.1 kPa increase, the compensation increases by 0.12% (to offset negative errors).
[0163] The purpose of constructing adaptive compensation models for each dynamic operating condition group is as follows:
[0164] It solves the problem that a single compensation scheme cannot adapt to multiple dynamic scenarios, provides accurate error correction basis for each type of dynamic working condition, and eliminates systematic dynamic measurement deviations from the algorithm level.
[0165] Dynamic compensation module: It predicts the flow stability by monitoring the metering flow of the smart gas meter controller in real time. If the prediction result is dynamic, it calculates the dynamic characteristics of the flow in real time, determines the dynamic working condition group, and compensates the metering error of the smart gas meter controller under dynamic working conditions according to the working condition adaptive compensation model of the dynamic working condition group.
[0166] The process of predicting flow stability by monitoring the metered flow rate of the smart gas meter controller in real time includes:
[0167] Set the monitoring frequency and collect the flow rate Q, pressure P, and temperature T of the smart gas meter controller in real time during the current metering.
[0168] The real-time traffic variation coefficient and traffic change amplitude are calculated based on a sliding window. If the real-time variation coefficient is greater than the preset variation coefficient or the real-time traffic change amplitude is greater than the preset change amplitude, then the traffic is predicted as dynamic.
[0169] The process for determining the dynamic operating condition group includes:
[0170] For predicted dynamic traffic, four features are extracted in real time, including the traffic peak multiple K. peak Mean rate of change of flow Pressure fluctuation amplitude δ P Dynamic duration t d And the dynamic working condition group is determined by the minimum Euclidean distance matching method, specifically:
[0171] Calculate the Euclidean distance between the real-time traffic dynamic characteristics and the feature centers (mean of features within the group during clustering) of each dynamic operating condition group. The dynamic operating condition group with the smallest Euclidean distance is the current dynamic operating condition group.
[0172] The process of compensating for measurement errors based on the adaptive compensation model for operating conditions includes:
[0173] Based on the current operating conditions of pressure and temperature, convert to standard volume and calculate real-time error;
[0174] The adaptive compensation model of the current dynamic working condition group is invoked, real-time features are input, and the compensation amount C is obtained. 实时 ;
[0175] The compensated metering value output is , which is the final measurement value, where V 表显实时 The real-time metering value displayed by the smart gas meter controller;
[0176] The functions of real-time monitoring and dynamic error compensation are:
[0177] Function 1: By monitoring current flow, pressure, and temperature data in real time, predict flow stability (determine whether it is dynamic flow), identify the current dynamic operating condition group, call the corresponding compensation model to calculate the compensation amount and correct the real-time metering value, and ensure that the controller can still achieve accurate metering in actual dynamic scenarios.
[0178] Function 2: It connects offline analysis and modeling with online practical applications, transforming the results of previous analysis of historical data into real-time measurement accuracy assurance, and ultimately solving the measurement error problem of smart gas meter controllers under dynamic operating conditions.
[0179] The technical solution and advantages of this application embodiment are as follows: By performing stability analysis on the flow rate of the smart gas meter controller in each time period unit, the time period unit is divided into a stable flow period and a dynamic flow period. The dynamic flow characteristics in the dynamic flow period are calculated, and multiple dynamic operating condition groups are obtained through clustering. The metering function of the smart gas meter controller is detected and compared under the stable flow and dynamic operating condition groups respectively. The error exceeding the standard operating condition group is identified in the dynamic operating condition group. By analyzing the frequency and error distribution characteristics, it is determined whether there is a systematic metering error in the smart gas meter controller under the dynamic operating condition. If so, an adaptive compensation model for the operating condition is constructed based on the flow dynamic characteristics of the dynamic operating condition group. The flow stability is predicted by the metering flow rate of the smart gas meter controller monitored in real time. If the prediction result is dynamic, the real-time flow dynamic characteristics are calculated to determine the dynamic operating condition group to which the controller belongs. The metering error of the smart gas meter controller under the dynamic operating condition is compensated according to the adaptive compensation model of the dynamic operating condition group. This application segments historical data and determines flow stability, separating stable and dynamic time periods. It then clusters the dynamic time periods to obtain structured operating condition groups. Subsequently, it detects metering errors in both stable and dynamic scenarios, identifies systematic dynamic errors, constructs an adaptive compensation model for the exceeding operating condition group, and finally monitors the current flow in real time and calls the model to compensate for errors. This achieves full-scenario coverage detection, systematic error location, and real-time accurate compensation for smart gas meter controllers, improving metering accuracy in dynamic scenarios and adapting to different user types such as residential and industrial applications. It provides reliable technical support for the functional testing and error correction of smart gas meters.
[0180] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A control system for a smart gas meter controller function detection apparatus, characterized by: Comprise: Period division module: by analyzing the stability of the flow of the intelligent gas meter controller in each period unit, the period unit is divided into stable flow period and dynamic flow period; Working condition clustering module: calculate the flow dynamic characteristics in the dynamic flow period, and obtain multiple dynamic working condition groups through clustering processing; Error judgment module: respectively in stable flow and dynamic working condition group, the measurement function of the intelligent gas meter controller is detected and compared, the error exceeding working condition group is identified in the dynamic working condition group, and through the frequency and error distribution characteristic analysis, whether the intelligent gas meter controller has systematic measurement error under dynamic working condition is judged; The judgment method of whether the intelligent gas meter controller has systematic measurement error under dynamic working condition is: Statistical error exceeding working condition group in total dynamic working condition group, get error exceeding working condition group proportion, and compare with preset proportion; If the error exceeding working condition group proportion is greater than the preset proportion, and the error direction of each error exceeding working condition group is consistent, then the intelligent gas meter controller has systematic measurement error under dynamic working condition; Compensation construction module: if there is, based on the flow dynamic characteristics of dynamic working condition group, construct working condition adaptive compensation model; Dynamic compensation module: through real-time monitoring of the measurement flow of the intelligent gas meter controller, the flow stability is predicted, if the prediction result is dynamic, the real-time flow dynamic characteristics are calculated, the belonging dynamic working condition group is determined, and the measurement error of the intelligent gas meter controller under dynamic working condition is compensated according to the working condition adaptive compensation model of the belonging dynamic working condition group.
2. The control system of the intelligent gas meter controller function detection equipment according to claim 1, wherein: The division method of stable flow period and dynamic flow period is: Synchronously collect the instantaneous flow, pipeline pressure, gas temperature and intelligent gas meter controller measurement value of the intelligent gas meter controller in the historical running period; Divide the historical running period into several time length equal period units, for each period unit: Calculate the coefficient of variation and maximum flow rate of change of the flow in the period unit, wherein the maximum flow rate of change is the maximum value of the flow rate of change of adjacent sampling points in the period unit; Compare the coefficient of variation with the preset coefficient of variation, and compare the maximum flow rate of change with the preset rate of change; If the coefficient of variation is less than the preset coefficient of variation, and the maximum flow rate of change is less than the preset rate of change, mark the period unit as stable flow period, otherwise, mark it as dynamic flow period.
3. The control system of the intelligent gas meter controller function detection equipment according to claim 1, wherein: The calculation method of flow dynamic characteristics in the dynamic flow period is: Flow dynamic characteristics include flow peak value multiple, flow rate of change average, pressure fluctuation amplitude and dynamic duration; For any dynamic flow period: Through proportional calculation of the maximum flow in the dynamic flow period and the average flow in the stable flow period, the flow peak value multiple is obtained, wherein the stable flow period is the stable flow period before the dynamic flow period; The mean value of the flow rate change rate of each adjacent sampling point in the dynamic flow period is calculated to obtain a flow rate change rate mean value; The pressure fluctuation amplitude is the difference between the maximum pressure and the minimum pressure in the dynamic flow period; The dynamic duration time is the length of the dynamic flow period, i.e., the end time-start time of the dynamic flow period.
4. The control system of the intelligent gas meter controller function detection device according to claim 3, wherein: The way of obtaining multiple dynamic working condition groups through clustering processing is: For each dynamic flow period: The flow rate dynamic characteristics of each dynamic flow period are standardized to obtain working condition characteristics; The elbow method is used to determine the number of clusters K, K is taken from 1, the error sum of squares SSE corresponding to each K is calculated, a K-SSE curve is drawn, and the K corresponding to the point where the SSE drops sharply and then tends to be flat is the optimal value; K working condition characteristics are randomly selected as initial cluster centers, the Euclidean distance between each working condition characteristic and the K cluster centers is calculated, and the working condition characteristics are assigned to the cluster with the nearest Euclidean distance; After all the working condition characteristics are assigned, the center of each cluster is recalculated, and the assignment and update are repeated until the variation of the cluster center is less than or equal to a preset threshold, the clustering ends, and multiple dynamic working condition groups are finally obtained.
5. The control system of the intelligent gas meter controller function detection device according to claim 1, wherein: The way of detecting and comparing the metering function of the intelligent gas meter controller under stable flow and dynamic working condition groups is: For stable flow, the low flow boundary point, the conventional intermediate point, and the high flow boundary point are selected based on the nominal flow of the meter, and a first-order precision standard device is used to maintain the stability of the flow at each detection point; The initial cumulative readings of the intelligent meter and the initial readings of the standard device are recorded synchronously, and after the cumulative volume of the standard device reaches a threshold, the terminal readings of the intelligent meter and the standard device are recorded synchronously, and the pipeline pressure and gas temperature during detection are collected simultaneously; The cumulative volumes of the intelligent meter and the standard device are converted into standard states according to the ideal gas state equation, and the relative error of each flow point is calculated by comparing the cumulative volumes of the intelligent meter and the standard device; Each detection point is tested repeatedly for three times, and the error mean value is taken as the stable flow error of the flow point; For each dynamic working condition group, the working condition characteristics are reproduced using a dynamic flow calibration device, and the instantaneous data of the intelligent meter and the standard device are collected synchronously, including the instantaneous flow, cumulative readings of the intelligent meter, the instantaneous flow, cumulative readings of the standard device, and real-time pressure and temperature; For any dynamic flow time period in the dynamic working condition group, the cumulative error is calculated according to the stable flow error formula, the cumulative errors of all dynamic time periods in the dynamic working condition group are counted, and the mean value is taken as the metering error of the dynamic working condition group.
6. The control system of the intelligent gas meter controller function detection device according to claim 5, wherein: The way of identifying the error exceeding condition group is: If the metering error of the intelligent gas meter controller under stable flow is within the standard range: For any dynamic working condition group, the deviation between the metering average error in the group and the metering error under stable flow is calculated. If the average error of all dynamic flow time periods in the group exceeds the standard range or the deviation of the measurement error under stable flow exceeds the preset deviation, the dynamic working condition group is marked as an error exceeding group.
7. The control system of the intelligent gas meter controller function detection device according to claim 1, wherein: The construction process of the working condition adaptive compensation model is: For any dynamic working condition group; Based on the flow dynamic characteristics of the dynamic working condition group, the flow dynamic characteristics strongly correlated with the measurement error are selected as the model input characteristics through the Pearson correlation coefficient; Based on the multiple linear regression method, a multiple linear regression model between the model input characteristics and the measurement error compensation is established, which is the working condition adaptive compensation model of the dynamic working condition group.
8. The control system of the intelligent gas meter controller function detection device according to claim 1, wherein: The flow stability prediction method is: Real-time acquisition of the flow, pressure and temperature of the intelligent gas meter controller under current measurement; Based on the sliding window, the real-time flow variation coefficient and the flow variation amplitude are calculated. If the real-time variation coefficient is greater than the preset variation coefficient or the real-time flow variation amplitude is greater than the preset variation amplitude, it is predicted as dynamic flow.
9. The control system of the intelligent gas meter controller function detection device according to claim 7, wherein: The method for determining the dynamic working condition group and performing measurement error compensation is: Calculate the Euclidean distance between the real-time flow dynamic characteristics and the feature center of each dynamic working condition group. The dynamic working condition group with the smallest Euclidean distance is the current dynamic working condition group; Based on the pressure and temperature of the current working condition, the volume under standard state is converted and the real-time measurement error is calculated; Call the working condition adaptive compensation model of the current dynamic working condition group, input the real-time model input characteristics, and get the measurement error compensation. The compensated metering value output is , that is, the final metering value, wherein, is the real-time metering value displayed by the intelligent gas meter controller, is the error compensation amount.
Citation Information
Patent Citations
Dynamic metering method and system based on NB Internet of Things ultrasonic gas meter
CN118149939A
Demand prediction system and demand prediction method
US20190147465A1