Flow compensation and remote transmission integrated system for ultrasonic gas meter

By integrating operating condition discrimination, dynamic gas density modeling, and remote communication control, the system solves the problems of metering accuracy and remote data transmission of ultrasonic gas meters in low flow and complex environments, and realizes intelligent closed-loop management with self-learning and low power consumption.

CN121702490AActive Publication Date: 2026-03-20ZENNER METERING TECH (SHANGHAI) LTD
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-05
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Ultrasonic gas meters suffer from insufficient metering accuracy under conditions such as low flow rate, temperature fluctuations, pipeline vibration, and irregular installation. Furthermore, the remote meter reading function suffers from problems such as poor contact and high maintenance difficulty. There is a lack of integrated solutions that balance flow compensation accuracy and remote data transmission stability.

Method used

A system integrating operating condition discrimination, dynamic gas density modeling, adaptive optimization of flow rate correction factors, and remote communication control is constructed. It includes an operating condition discrimination module, a correction factor generation module, a stability judgment module, an identification module, a communication control module, a network detection module, an update module, and a maintenance triggering module, realizing functions such as self-learning, self-correction, and low-power sleep.

Benefits of technology

It significantly improves the metering accuracy and remote data transmission stability of ultrasonic gas meters in complex environments, making it suitable for underground and remote areas, and possessing good scalability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121702490A_ABST
    Figure CN121702490A_ABST
Patent Text Reader

Abstract

The invention discloses a flow compensation and remote transmission integrated system for an ultrasonic gas meter, which relates to the technical field of ultrasonic gas metering, and identifies whether the system is in a low-flow weak-signal state or not by collecting parameters such as environment temperature, pipeline pressure and signal interference intensity; if the working condition is the abnormal working condition, constructing a gas density dynamic model, and generating a flow velocity correction factor in combination with gas component parameters to realize flow compensation; the compensated flow velocity is packaged after stability judgment, and is uploaded to a remote server when power supply and a network meet conditions; if the condition is not met, caching the data and entering dormancy, and intermittently awakening and detecting the network recovery condition; meanwhile, the system has the capability of difference self-learning optimization and compensation model updating, and a remote maintenance mechanism is triggered in combination with an error trend; the system has the advantages of high metering precision, strong anti-interference capability, good remote transmission stability and strong self-maintenance capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ultrasonic gas metering technology, specifically to an integrated system for flow compensation and remote transmission of ultrasonic gas meters. Background Technology

[0002] Ultrasonic gas meters, with their advantages of no moving mechanical parts, high metering accuracy, and fast response speed, are gradually replacing traditional mechanical gas meters and becoming an important device for urban gas metering. However, in practical applications, the metering accuracy of ultrasonic gas meters is affected by several factors, especially when the gas flow rate is extremely low, temperature fluctuations are frequent, pipeline vibration disturbances are strong, or the installation location is irregular. In these situations, traditional flow compensation models struggle to accurately respond to environmental changes, leading to significant metering deviations at low flow rates.

[0003] In addition, ultrasonic gas meters need to have remote meter reading function in some application scenarios, especially in cold or remote areas where there is a strong demand for centralized management. The installation of the remote transmission module usually relies on external wiring, which has problems such as poor contact, difficult maintenance, and high power consumption, which seriously affect the reliability and lifespan of the meter.

[0004] Currently, there is no integrated solution that can balance flow compensation accuracy and remote data transmission stability under low flow conditions. Especially in narrow downhole pipelines, frequent gas source switching, or heating accompanied by gas fluctuations, metering errors and remote transmission failures coexist, becoming a technical bottleneck that urgently needs to be solved. Summary of the Invention

[0005] The purpose of this invention is to provide an integrated system for flow compensation and remote transmission of ultrasonic gas meters to address the shortcomings of the prior art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a flow compensation and remote transmission integrated system for ultrasonic gas meters, comprising: The operating condition discrimination module obtains the initial operating parameters of the ultrasonic gas meter installed in the target pipe section, including ambient temperature T0, pipeline pressure P0, low flow threshold Qmin, and real-time signal interference intensity I0, to determine whether the current operating condition is in a low flow and weak signal state. The correction factor generation module, if determined to be in a low flow rate and weak signal state, establishes a gas density dynamic model D(t) based on T0, P0 and Qmin, and constructs a real-time gas flow rate correction factor Cv(t) in conjunction with the standard parameters G of the gas components. The stability judgment module compensates the current flow rate value Qa detected by the gas meter according to Cv(t) to obtain the compensated flow rate Qc=Qa×Cv(t), and determines whether Qc is in the stable range [Qmin, Qmax]. Identification module, if Qc is within the stable range, then encapsulate Qc and attach the current timestamp T t and the unique device number ID to form a remote transmission data packet Dp; Communication control module, obtain the current power supply status V0 and network reachability status Sn. If V0 ≥ threshold voltage Vt and Sn is valid, then upload Dp to the remote server; Network detection module, if V0 < Vt or Sn fails, then temporarily cache Dp to the local EEPROM storage unit, enter the low-power sleep mode, and at the same time start the intermittent network detection subroutine Sd until V0 ≥ Vt and Sn is valid, and then execute the communication control module; Update module, compare the successfully reported Qc with the initial value Qa and D(t), evaluate the stability of the compensation model. If the difference is continuous for N times, , then automatically correct the Cv(t) model parameters according to the trend of ΔQ and reconstruct D(t); Maintenance trigger module, if ΔQ tends to 0 for a long time, then output that the current meter condition is compensation effective and record it in the remote database; otherwise output compensation anomaly and send a maintenance instruction.

[0007] Preferably, determining whether the current working condition is in a low-flow weak-signal state includes: if the currently detected flow rate Qa ≤ Qmin; and at the same time satisfy I0 ≥ signal interference threshold Ithresh; and satisfy ΔT / Δt > 5°C / min or ΔP / Δt > 10 kPa / min; then determine the current operating state as a low-flow weak-signal state.

[0008] Preferably, the correction factor generation module includes: Based on the obtained ambient temperature T0 and pipeline pressure P0, combined with the ideal gas state equation, calculate the instantaneous reference density value ρ0 of the gas in the target pipe section; On the basis of ρ0, introduce the flow state correction coefficient corresponding to the low-flow threshold Qmin to continuously correct ρ0 over time and establish a dynamic gas density model D(t) that changes with time; Call the gas component standard parameter G corresponding to the current gas type and perform a coupling calculation between the gas component standard parameter G and the gas density dynamic model D(t) to obtain a gas sound speed correction parameter; Compensate the ultrasonic propagation time difference according to the gas sound speed correction parameter to generate a real-time gas flow rate correction factor Cv(t).

[0009] Preferably, the stability judgment module includes: Perform a multiplication operation on the real-time gas flow rate correction factor and the currently detected flow rate value to obtain a compensated flow rate value; Set minimum and maximum flow rate thresholds that match the structural characteristics of the gas meter and the characteristics of the gas source to construct a stable judgment range; The compensated flow velocity value is compared with the stability judgment interval. If the compensated flow velocity is within the interval, it is judged as a stable operating condition; otherwise, it is an unstable operating condition. The compensated flow velocity values ​​are processed by moving average over multiple consecutive time periods. If the moving average value remains within a stable range, the current operating condition is confirmed to be stable.

[0010] Preferably, the communication control module includes: The power supply voltage value is obtained in real time through a voltage detection circuit and compared with a preset threshold voltage to determine whether the current power supply status meets the upload conditions. The network status query command is invoked through the communication module to obtain the current network signal strength and access authentication status, and a network reachability status flag is generated. If the supply voltage is greater than or equal to the threshold voltage and the network reachability flag is valid, the data transmission interface is invoked to send the encapsulated data packet to the remote server.

[0011] Preferably, the update module includes: After each successful data upload, record the difference between the current compensated flow rate value and the initial detected flow rate value, and calculate the absolute difference ΔQ. An error threshold is set. If the difference within a preset number of consecutive times is greater than or equal to the error threshold, it is determined that the compensation model has an offset. Based on the trend of the difference change, and combined with the parameter fitting residual of the gas density dynamic model, the dynamic weight of the gas flow rate correction factor is adjusted. The gas density dynamic model is reconstructed based on the updated dynamic weights, and a new correction factor is output for use in the next round of compensation calculation.

[0012] Preferably, the dynamic weights of the gas flow rate correction factor include: Trend analysis was performed on the difference between the compensated flow velocity value and the initial detected flow velocity value over multiple consecutive data periods to extract the characteristics of the change direction and fluctuation amplitude. Using historical parameters involved in the calculation of correction factors in the gas density dynamic model as input variables, an error residual fitting function is constructed, and the least squares residual is solved. The sensitivity coefficients of each input variable are calculated based on the fitting residuals, and these coefficients are used as the basis for adjusting the dynamic weights. A gradient update strategy is used to iteratively optimize the weights of the gas velocity correction factor to obtain the updated correction factor.

[0013] Preferably, the maintenance triggering module evaluates the long-term trend of ΔQ. If the average value of ΔQ approaches 0 and the standard deviation is less than the stability threshold σ, then the compensation is effective.

[0014] The technical effects and advantages provided by the present invention in the above technical solution are as follows: 1. This invention constructs an integrated ultrasonic gas meter flow compensation and remote transmission system that combines operating condition discrimination, dynamic gas density modeling, adaptive optimization of flow rate correction factors, and remote communication control. This system effectively addresses the impact of non-ideal operating conditions such as low flow rate, signal interference, and gas composition fluctuations on ultrasonic metering accuracy. In particular, the introduction of a closed-loop correction mechanism based on physical modeling and data feedback enables the compensation results to have self-learning and self-correcting capabilities, significantly improving the system's long-term stability and reliability in complex environments.

[0015] 2. This invention also integrates functional modules such as low-power sleep mode, breakpoint resume, network recovery identification, and remote maintenance triggering, ensuring data integrity and reducing energy consumption even in scenarios with insufficient power supply or network failure. It is suitable for difficult-to-maintain application environments such as downhole and edge areas. The overall system achieves an intelligent closed loop from operational condition perception to data upload, from compensation modeling to maintenance response, and possesses good scalability. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0017] Figure 1 This is a flowchart of the system modules of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] For examples, please refer to Figure 1 As shown in this embodiment, a flow compensation and remote transmission integrated system for ultrasonic gas meters includes: The operating condition discrimination module obtains the initial operating parameters of the ultrasonic gas meter installed in the target pipe section, including the ambient temperature T0, the pipeline pressure P0, the low flow threshold Qmin, and the real-time signal interference intensity I0, and is used to determine whether the current operating condition is in the low flow weak signal state.

[0020] In this embodiment, the operating condition discrimination module is used to identify whether the ultrasonic gas meter is in the low flow weak signal state during actual operation, so as to perform flow compensation and remote transmission processing subsequently.

[0021] Specifically, the operating condition discrimination module is communicatively connected to the ultrasonic gas meter installed in the target pipe section and can obtain the following initial operating parameters in real time: Ambient temperature T0: Obtained through the built-in temperature sensor in the meter or an external temperature detection component, with the unit of degree Celsius. Pipeline pressure P0: Measure the static gas pressure of the pipe section before or after the meter through the connected differential pressure sensor, with the unit of kPa. Low flow threshold Qmin: Obtained by presetting or remotely configuring through the built-in metering module of the gas meter, representing the low reliability critical flow velocity value considered by the system, with the unit of ; Real-time signal interference intensity I0: Obtained by quantitatively calculating the correlation, amplitude stability and background noise level of the ultrasonic transmitted and received signals, with the unit of dB or relative perturbation coefficient.

[0022] The operating condition discrimination module internally presets a set of logical rules for determining the low flow weak signal state. The typical rules are as follows: If the current detected flow velocity Qa ≤ Qmin; and at the same time, I0 ≥ the signal interference threshold Ithresh; and ΔT / Δt > 5°C / min or ΔP / Δt > 10 kPa / min are satisfied; then the current operating state is determined to be in the low flow weak signal state, and the status flag bit is output to drive the compensation modeling module to start the compensation process. Otherwise, if Qa > Qmin and I0 < Ithresh, it is determined to be in the normal flow state, and the system enters the standard metering and remote transmission process.

[0023] To improve the determination accuracy, the operating condition discrimination module can integrate a sliding window algorithm for data trend smoothing processing to ensure that the recognition process is insensitive to instantaneous disturbances but can respond in time to continuous deterioration of the operating condition.

[0024] The correction factor generation module, if it is determined to be in the low flow weak signal state, establishes a dynamic gas density model D(t) based on T0, P0 and Qmin, and constructs a real-time gas flow velocity correction factor Cv(t) in combination with the standard parameters G of the gas components.

[0025] In this embodiment, based on the obtained ambient temperature T0 and pipeline pressure P0, and combined with the gas flow characteristics under low flow conditions, a gas flow rate correction factor Cv(t) is constructed through gas density modeling and sound velocity calibration to improve the metering accuracy of the ultrasonic gas meter under unstable conditions.

[0026] First, the instantaneous reference density of the gas under the current operating conditions is constructed using the ideal gas equation of state. The ideal gas equation of state is: ρ0 = (P0 × M) / (R × T0); where: ρ0 represents the instantaneous reference density of the gas in the target pipe section, in kg / m³; P0 is the real-time pipeline pressure collected, in Pa; T0 is the ambient temperature collected, in K; M is the molar mass corresponding to the target gas type, in kg / mol; and R is the ideal gas constant, with a value of 8.314 J / (mol·K). Through the above calculation, the theoretical basic density value of the gas under the current environment can be obtained.

[0027] Considering the instability of the gas flow state under low flow conditions, a time-varying correction factor is introduced on the basis of ρ0 to construct a gas density dynamic model D(t) that better reflects the actual flow characteristics.

[0028] The time-varying correction factor is based on a low flow threshold Qmin to construct a flow regime correction coefficient K(t), with a value range of [0.95, 1.05]. It represents the density fluctuation rate of the gas at low flow rates, and is specifically defined as follows: Where: α is the adjustment coefficient, ranging from 0.01 to 0.05, representing the density fluctuation amplitude; f is the disturbance frequency, in Hz, determined by the ratio of Qa to Qmin under actual operating conditions; t is the current time, in seconds. Then the gas density dynamic model D(t) is expressed as: This model can dynamically reflect the fluctuations in actual gas density under weak flow disturbances.

[0029] Based on the gas density represented by D(t) above, and considering the gas composition characteristics, the correction parameter for sound velocity compensation is further calculated. Assuming the current gas type is natural gas, its composition parameter G is obtained by looking up a table, including the main gas components (methane, ethane, propane, nitrogen, etc.) and their volume fractions. The sound velocity correction parameter Ca(t) is calculated as follows: Where: γ is the specific heat ratio of the gas, calculated by weighted average of the gas component parameters G; M_eff is the effective molar mass corresponding to the current gas component, in kg / mol; R is the ideal gas constant; T0 is the temperature. By jointly calculating D(t) and G, M_eff and γ are obtained, thus Ca(t), which is the gas sound velocity correction parameter under the current operating condition.

[0030] Finally, the sound velocity correction parameter Ca(t) is applied to correct the ultrasonic wave propagation time difference to generate the flow velocity correction factor Cv(t) for flow velocity compensation.

[0031] Let the original calculated flow velocity be Qa, measured based on the bidirectional ultrasonic propagation time difference Δt. According to the correction parameter Ca(t), Δt is adjusted to Δt′, with the relationship: Δt′ = Δt × (C0 / Ca(t)); where: C0 is the gas sound velocity constant during initial calibration; Δt is the currently detected ultrasonic propagation time difference; Ca(t) is the currently calculated corrected sound velocity. Substituting Δt′ into the ultrasonic flow velocity formula, we get: Where L is the sensor spacing. The flow rate correction factor Cv(t) is expressed as: Cv(t) = Q_c / Qa; that is, the proportionality coefficient between the original flow rate and the corrected flow rate, used to compensate for Qa. Using the Cv(t) output for subsequent flow rate calculation can effectively improve the metering accuracy of ultrasonic gas meters in low-flow, complex disturbance environments.

[0032] The stability assessment module compensates for the current flow rate Qa detected by the gas meter based on Cv(t) to obtain the compensated flow rate. And determine whether Qc is in the stable interval [Qmin, Qmax].

[0033] First, obtain the original flow velocity value detected by the ultrasonic gas meter, and record it as the current detected flow velocity value. Then, using the previously calculated real-time gas flow velocity correction factor, multiply the two values ​​to calculate the compensated flow velocity value. The calculation formula is: Compensated flow velocity value = Current detected flow velocity value × Real-time gas flow velocity correction factor; where the real-time gas flow velocity correction factor originates from the flow velocity compensation process and represents the correction ratio coefficient after the ultrasonic wave propagation is affected by changes in sound velocity.

[0034] To define whether a flow rate is stable, a set of flow rate thresholds that match the structural parameters of the ultrasonic gas meter and the characteristics of a typical gas source must be preset.

[0035] A minimum stable flow rate threshold is set as the minimum flow rate threshold, and a maximum stable flow rate threshold is set as the maximum flow rate threshold. Together, they constitute the stability judgment interval: Stability judgment interval = [minimum flow rate threshold, maximum flow rate threshold]; where: the minimum flow rate threshold is generally set as the lower limit at which ultrasonic metering accuracy begins to decline, typically 0.016 cubic meters per hour; the maximum flow rate threshold is determined based on the pipe diameter and meter body structure, generally 1.2 to 1.5 times the rated maximum flow rate, used to tolerate short-term flow rate peaks. This interval serves as an important benchmark for judging the stability of the operating condition.

[0036] The compensated flow velocity value is compared with the aforementioned stability judgment interval. If the compensated flow velocity value falls between the minimum and maximum flow velocity thresholds, the current operating condition is considered to be within a qualified stable range and recorded as a preliminary stable state; otherwise, it is judged as an unstable operating condition. This comparison is a single-point judgment, mainly used to quickly identify sudden abnormal states or the entry into the compensation boundary region.

[0037] To enhance the robustness of operating condition judgment and eliminate the interference of short-term sudden changes on the judgment results, a moving average judgment over a time period is introduced.

[0038] Within a set fixed time period (e.g., 30 seconds), the compensated flow velocity values ​​are processed using a moving average. The moving average is implemented using a simple weighted average model, expressed as: current moving average flow velocity value = sum of all compensated flow velocity values ​​within the selected time period / number of flow velocity samples; generally, sampling is performed once per second, with a total of 30 data points within 30 seconds.

[0039] If the sliding average flow velocity value remains within the stability determination range for three consecutive time periods (e.g., 90 seconds), then the current operating condition is finally confirmed as a stable state.

[0040] If the average flow rate exceeds the threshold range in any period, the current operating condition remains unstable and remote data encapsulation is not triggered.

[0041] The identification module, if Qc is within a stable range, encapsulates Qc and attaches the current timestamp T. t Together with the device's unique ID, a remote data packet Dp is generated.

[0042] The compensated flow velocity value is output by the flow velocity compensation module and confirmed by the stability judgment module to be between the minimum and maximum flow velocity thresholds. Furthermore, a stable state is confirmed through multi-period moving averages. The identification module initiates the packetization process only when all the above conditions are met simultaneously.

[0043] To ensure that the transmitted data has time tracking capabilities, a high-precision real-time clock component is invoked during the packet encapsulation process to generate a timestamp for the current sampling moment, which is recorded as the current timestamp. This timestamp uses the Coordinated Universal Time (UTC) format and is accurate to the second.

[0044] The current timestamp is obtained by calling the embedded clock register or an external time synchronization module, and is stored in the packet buffer along with the compensated flow rate value as a criterion for judging data validity.

[0045] To identify the source of the data and prevent data confusion from multiple gas meters, a unique device number is attached during the packaging process and recorded as the unique device number.

[0046] The unique device serial number is written into a non-erasable memory chip during the manufacturing stage via laser marking or firmware burning. The format can be represented by a 32-bit or 64-bit hexadecimal code, such as "0xA1B2C3D4E5F60789". This serial number occupies a fixed field position in the packet structure and is used for device identification and maintenance tracking after data reporting.

[0047] A complete remote data packet contains the following fields: header identification field (such as a synchronization word, used for communication identification); device unique number; current timestamp; compensated flow rate value; and data integrity check code (such as CRC-8 or CRC-16). These fields are packaged in a preset format and written to the data buffer to form a remote data packet, denoted as a remote data packet.

[0048] If the system has network type recognition function or power consumption management requirements, the following fields can be added: current signal quality level; module working status code; data retransmission flag (used to determine whether the data is reported repeatedly).

[0049] After the packetization process is complete, the identification module writes the remote transmission data packet into the output queue of the communication module, waiting for the communication control module to perform the reporting operation. This process is structurally decoupled from the compensation and judgment processes, but logically remains dependent on them, ensuring that packetization and transmission only occur when the data is reliable.

[0050] The communication control module obtains the current power supply status V0 and network reachability status Sn. If V0 ≥ threshold voltage Vt and Sn is valid, then Dp is uploaded to the remote server.

[0051] The communication control module has a set of voltage detection circuits connected in parallel with the main power supply circuit, which are used to periodically obtain the current power supply voltage value of the device and record it as the current power supply voltage value.

[0052] The current supply voltage is compared with a preset threshold voltage. This threshold voltage is determined based on the startup voltage and stable operating voltage of the communication module used, and is typically set to 3.3 volts. For example, when the module is an NB-IoT communication module, the threshold voltage is set to 3.3 volts, with a tolerance range of ±0.1 volts. The judgment condition is: If the current power supply voltage is greater than or equal to the threshold voltage, the power supply status is deemed to be satisfied. If the current power supply voltage is less than the threshold voltage, the current power supply status is considered not to meet the data upload conditions, and the communication control module enters a waiting or low-power state, without triggering the upload operation.

[0053] This judgment process runs on a millisecond cycle, ensuring that communication operations are only performed under stable voltage conditions, thus reducing the risk of communication failure.

[0054] On the premise that the power supply state is satisfied, the communication control module further calls the standard network status query instruction through the communication module to obtain the signal strength and access authentication status of the current communication network.

[0055] The signal strength is determined by reading the reference signal received power (RSRP) and received signal strength indicator (RSSI). If the RSRP is higher than -100 dBm and the RSSI is higher than -85 dBm, it indicates that the signal strength is good.

[0056] Meanwhile, the module queries the network registration status to confirm whether the network access and authentication registration have been completed. Only when the access status is "registration completed" and the signal strength meets the set threshold, a network reachable status flag is generated, denoted as the network status flag. The values of the network status flag are as follows: Valid status (flag value is "1"): indicates that the current network status meets the data transmission requirements; Invalid status (flag value is "0"): indicates that the current network is unavailable and the data upload operation is prohibited.

[0057] The network status judgment period is synchronized with the power supply judgment, and the status is refreshed every 10 seconds by default.

[0058] When the power supply state is satisfied and the network status flag is in the valid state, the communication control module calls the data transmission interface to send the encapsulated data packet to the remote server.

[0059] The data transmission interface uses a connection-oriented data upload protocol, such as MQTT, CoAP or HTTP, and automatically selects a low-power priority channel according to the configuration. The content of the data packet includes: the compensated flow rate value; the current timestamp; the device unique number; the data integrity check code.

[0060] After sending the data, the communication module waits for the server to return a reception confirmation instruction. If the confirmation is successful, the upload time and response status are recorded; if the reception is not successful or there is no response after the timeout, the data retransmission or cache waiting logic is entered to prevent data loss.

[0061] Through the joint implementation of the above power supply state judgment, network reachability detection and data transmission control, it is ensured that the data upload process is stable and safe, and it is applicable to the ultrasonic gas meter remote transmission application scenario with low power consumption and high reliability requirements.

[0062] For the network detection module, if V0 < Vt or Sn fails, Dp is temporarily cached in the local EEPROM storage unit, and it enters the low-power sleep mode. At the same time, the intermittent network detection subroutine Sd is started until V0 ≥ Vt and Sn is valid, and then the communication control module is executed.

[0063] When the communication control module detects that the current power supply voltage is less than the threshold voltage, or the network status flag is invalid, meaning that the power supply or network does not meet the data upload requirements, the network detection module immediately takes over the processing flow.

[0064] At this time, the remote data packets generated by the identification module will be temporarily written to the local non-volatile storage unit, preferably using EEPROM as the cache medium to ensure that the data is still retained after power failure.

[0065] The cache write process includes the following operations: The compensated flow rate value, the current timestamp, and the device's unique identifier are packaged into structured data. Generate and attach data integrity verification fields, such as 16-bit cyclic redundancy check codes; The encapsulated complete data frame is written into the preset data buffer area in the EEPROM according to the address index; Update the write pointer and cache status flags to prevent duplicate writing or overwriting of data that has not been uploaded.

[0066] The cache structure is organized using a circular queue, which supports data readback in chronological order.

[0067] After the data caching operation is completed, the network detection module immediately controls the main control chip to enter a low-power sleep mode, reducing overall current consumption and extending the device's battery life.

[0068] The sleep mode employs a low-power hardware pin-triggered mechanism, shutting down all functional units except for the watchdog timer and clock module, including the display, power indicator, and main power supply path of the communication module. Typical current is controlled below 5 microamps in sleep mode.

[0069] Before entering hibernation, save the current power supply voltage value and the previous network status so that the detection program can continue to make judgments after waking up.

[0070] To monitor network status recovery in real time, an intermittent network detection subroutine is embedded within the network detection module. This subroutine periodically wakes up the communication module at set time intervals to detect network connectivity and power supply status, and determines whether to reactivate the communication control module.

[0071] The detection subroutine's execution cycle is defined as the detection period, configurable between 60 and 300 seconds, with a default value of 120 seconds. Each detection process includes: Wake up the communication module and reacquire the current power supply voltage value; call the network status query command to obtain the network signal strength and registration status; determine whether the power supply voltage value is greater than or equal to the threshold voltage; determine whether the network status flag is valid.

[0072] If both of the following conditions are met simultaneously: the current power supply voltage is greater than or equal to the threshold voltage; and the network status flag is valid, then the detection subroutine outputs a recovery signal, immediately exits sleep mode, and triggers the communication control module to start the data upload process. Otherwise, the subroutine automatically shuts down the communication module power supply, re-enters sleep mode, and wakes up again when the next detection cycle arrives.

[0073] To improve reliability, the network detection module also maintains a cache index table to record the location, timestamp, and number of upload attempts for data to be uploaded. If a single piece of data fails to upload five times consecutively, an error flag is generated and recorded in the local maintenance log area for subsequent manual or remote maintenance.

[0074] The update module compares the successfully reported Qc with the initial values ​​Qa and D(t) to evaluate the stability of the compensation model. If the difference is N consecutive times... Then, the Cv(t) model parameters are automatically corrected based on the ΔQ trend, and D(t) is reconstructed.

[0075] After each compensation, once the flow rate value is successfully uploaded to the remote server, the difference between the compensated flow rate value and the initial detected flow rate value before compensation is immediately recorded, and its absolute value is calculated and denoted as the difference ΔQ. The calculation method is: Difference ΔQ = Compensated flow rate value minus the absolute value of the initial detected flow rate value, i.e. .

[0076] Subsequently, a static error threshold is set, denoted as error threshold δ. The value of δ is set according to the minimum measurable resolution of the gas meter, which is usually 0.015 cubic meters per hour.

[0077] If the difference ΔQ over N consecutive data periods is greater than or equal to the error threshold δ (for example, N is 5), then the current compensation model is determined to have a stability shift, triggering the correction process.

[0078] A trend analysis is performed on the difference ΔQ over the aforementioned N data periods, including determining its growth direction (positive / negative), growth rate, and fluctuation amplitude. The specific method is as follows: Calculate the difference sequence between adjacent differences and extract the direction of change; The degree of volatility was assessed using the sliding standard deviation method. A trend scoring factor is constructed to measure the stability risk of model deviation.

[0079] This scoring factor serves as one of the triggering conditions for subsequent model residual fitting.

[0080] The historical input parameters currently used in the construction of the gas density dynamic model are used as variable inputs, including ambient temperature, pipeline pressure, flow regime correction coefficient, and gas composition parameters.

[0081] Based on these variables, a set of fitting functions is constructed, and the compensation error residuals are fitted using least squares, in the form of: Minimize: Fitting residual = Measured ΔQ minus the sum of squares of the model predicted ΔQ.

[0082] By fitting the results, the mapping relationship between each input variable and the error is obtained, and the sensitivity coefficient of each variable is calculated. The sensitivity coefficient represents the strength of the variable's influence on the error under a unit change, and serves as a reference for subsequent weight updates.

[0083] Based on the sensitivity coefficient results, a gradient update strategy is used to iteratively optimize the weights of the constituent parameters of the gas flow rate correction factor. The gradient update strategy is expressed as follows: new weight value = current weight value minus learning rate multiplied by sensitivity gradient. The learning rate, an adjustment factor between 0.05 and 0.1, is used to control the optimization step size and prevent parameter oscillation or divergence.

[0084] This strategy assigns new dynamic weights to each participating factor, resulting in an updated gas flow rate correction factor.

[0085] The optimized weight allocation results are substituted back into the gas density dynamic model, the corrected density expression is recalculated, and a new round of gas flow rate correction factor is output as the input parameter for the next cycle of compensation calculation.

[0086] The new correction factor will be used to calculate the compensation flow rate in the current cycle and to determine whether to maintain or further correct it in the next cycle, so as to achieve adaptive modeling of dynamic closed loop.

[0087] Through the above complete process, continuous self-learning and dynamic optimization of the gas flow rate compensation model can be achieved, improving the long-term metering stability of ultrasonic gas meters under non-standard gas sources and fluctuating flow conditions.

[0088] If the maintenance trigger module detects a long-term trend of ΔQ towards 0, it outputs that the current metering condition is valid and records it to the remote database; otherwise, it outputs that the compensation is abnormal and sends a maintenance command.

[0089] After the compensation model update module outputs the correction factor, the maintenance trigger module tracks the trend of the absolute difference ΔQ between the compensated flow velocity value and the initial detected flow velocity value in each cycle.

[0090] Set a continuous time window T (such as 24 hours or 100 measurement periods), and calculate the average and standard deviation of all ΔQ within this window to determine the volatility of the compensation model output.

[0091] The specific judgment condition is as follows: if the average value of ΔQ approaches 0 within the time window T, and the standard deviation is lower than the preset stability threshold σ (e.g., 0.005 cubic meters per hour), then the model compensation result is considered stable and the error is controllable. This state is judged as "effective compensation state".

[0092] When the current meter is determined to be in a compensated and effective state, the maintenance trigger module generates a status log, including: the current timestamp; the current device's unique ID; the determination result (compensation effective); and the average and standard deviation of ΔQ. This log is written to a remote database through the data encapsulation module as a historical record of the device's status, which is used by the remote monitoring platform for trend analysis and performance evaluation.

[0093] If the maintenance trigger module detects that ΔQ continuously deviates from 0 within multiple time windows, or that the fluctuation amplitude exceeds the stability threshold σ, and the model has failed to converge after more than two rounds of adaptive updates, it determines that the compensation model may have failed and enters a "compensation anomaly state." The anomaly state triggering logic includes, but is not limited to, any of the following conditions: the average value of ΔQ is continuously higher than the set offset threshold (e.g., 0.03 cubic meters per hour); the standard deviation of ΔQ exceeds the set upper limit (e.g., 0.01 cubic meters per hour); the correction factor weight adjustment frequency exceeds three times but ΔQ shows no significant downward trend. At this time, the maintenance trigger module automatically generates a maintenance instruction, which includes: the target device number; the current anomaly type (e.g., excessive compensation deviation); and suggested maintenance operations (e.g., checking sensor interfaces, resetting compensation parameters, or remotely issuing initialization commands). This maintenance instruction is pushed to the management platform or maintenance personnel's client via a remote communication interface as the trigger for maintenance operations.

[0094] After receiving the response command from the remote platform, the maintenance trigger module can record the maintenance execution result, such as "initialization command issued" or "equipment enters manual maintenance mode", and update the local status flag to avoid repeated alarms.

[0095] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A flow compensation and remote transmission integrated system for ultrasonic gas meters, characterized in that: It includes: An operating condition discrimination module, which obtains the initial operating parameters of an ultrasonic gas meter installed in a target pipe section, including the ambient temperature T0, the pipeline pressure P0, the low flow threshold Qmin, and the real-time signal interference intensity I0, and is used to determine whether the current operating condition is in a low flow weak signal state; A correction factor generation module, if it is determined to be in a low flow weak signal state, establishes a gas density dynamic model D(t) based on T0, P0 and Qmin, and constructs a real-time gas flow velocity correction factor Cv(t) in combination with the standard gas component parameters G; A stability judgment module, compensates the current detected flow velocity value Qa of the gas meter according to Cv(t) to obtain the compensated flow velocity Qc = Qa × Cv(t), and judges whether Qc is within the stable interval [Qmin, Qmax]; The identification module, if Qc is within a stable range, encapsulates Qc and attaches the current timestamp T. t And the device's unique ID, forming a remote data packet Dp; A communication control module, obtains the current power supply state V0 and the network reachable state Sn, if V0 ≥ the threshold voltage Vt and Sn is valid, then uploads Dp to a remote server; A network detection module, if V0 < Vt or Sn fails, temporarily caches Dp to the local EEPROM storage unit, enters the low-power sleep mode, and simultaneously starts the intermittent network detection subroutine Sd until V0 ≥ Vt and Sn is valid, and then executes the communication control module; The update module compares the successfully reported Qc with the initial values ​​Qa and D(t) to evaluate the stability of the compensation model. If the difference is N consecutive times... Then, the Cv(t) model parameters are automatically adjusted based on the ΔQ trend, and D(t) is reconstructed. A maintenance trigger module, if ΔQ tends to 0 for a long time, outputs that the current meter operating condition is compensated effectively and records it in the remote database; otherwise, outputs compensation abnormality and sends a maintenance instruction.

2. The flow compensation and remote transmission integrated system for ultrasonic gas meters according to claim 1, characterized in that: Judging whether the current operating condition is in a low flow weak signal state includes: if the current detected flow velocity Qa ≤ Qmin; and at the same time satisfies I0 ≥ the signal interference threshold Ithresh; and satisfies ΔT / Δt > 5°C / min or ΔP / Δt > 10 kPa / min; then the current operating state is determined to be in a low flow weak signal state.

3. The flow compensation and remote transmission integrated system for ultrasonic gas meters according to claim 1, characterized in that: The correction factor generation module includes: Based on the obtained ambient temperature T0 and pipeline pressure P0, combined with the ideal gas state equation, calculates the instantaneous reference density value ρ0 of the gas in the target pipe section; On the basis of ρ0, introduces the flow state correction coefficient corresponding to the low flow threshold Qmin, makes a time-continuous correction to ρ0, and establishes a gas density dynamic model D(t) that changes with time; Calls the standard gas component parameters G corresponding to the current gas type, and performs a coupling calculation on the standard gas component parameters G and the gas density dynamic model D(t) to obtain a gas sound speed correction parameter; Compensates the ultrasonic propagation time difference according to the gas sound speed correction parameter to generate a real-time gas flow velocity correction factor Cv(t).

4. The flow compensation and remote transmission integrated system for ultrasonic gas meters according to claim 1, characterized in that: The stability judgment module includes: Performs a multiplication operation on the real-time gas flow velocity correction factor and the current detected flow velocity value to obtain a compensated flow velocity value; Sets a minimum flow velocity threshold and a maximum flow velocity threshold that match the structural characteristics of the gas meter and the gas source characteristics, and constructs a stability judgment interval; Compares the compensated flow velocity value with the stability judgment interval, if the compensated flow velocity is within this interval, it is determined to be a stable operating condition, otherwise it is an unstable operating condition; Performs a moving average process on the compensated flow velocity values in multiple consecutive time periods, if the moving average value continuously stays within the stable interval, then confirms that the current operating condition is a stable state.

5. The flow compensation and remote transmission integrated system for ultrasonic gas meters according to claim 1, characterized in that: The communication control module includes: The power supply voltage value is obtained in real time through a voltage detection circuit and compared with a preset threshold voltage to determine whether the current power supply status meets the upload conditions. The network status query command is invoked through the communication module to obtain the current network signal strength and access authentication status, and a network reachability status flag is generated. If the supply voltage is greater than or equal to the threshold voltage and the network reachability flag is valid, the data transmission interface is invoked to send the encapsulated data packet to the remote server.

6. The flow compensation and remote transmission integrated system for ultrasonic gas meters according to claim 1, characterized in that: The update module includes: After each successful data upload, record the difference between the current compensated flow rate value and the initial detected flow rate value, and calculate the absolute difference ΔQ. An error threshold is set. If the difference within a preset number of consecutive times is greater than or equal to the error threshold, it is determined that the compensation model has an offset. Based on the trend of the difference change, and combined with the parameter fitting residual of the gas density dynamic model, the dynamic weight of the gas flow rate correction factor is adjusted. The gas density dynamic model is reconstructed based on the updated dynamic weights, and a new correction factor is output for use in the next round of compensation calculation.

7. The flow compensation and remote transmission integrated system for ultrasonic gas meters according to claim 6, characterized in that: The dynamic weights of the gas flow rate correction factor include: Trend analysis was performed on the difference between the compensated flow velocity value and the initial detected flow velocity value over multiple consecutive data periods to extract the characteristics of the change direction and fluctuation amplitude. Using historical parameters involved in the calculation of correction factors in the gas density dynamic model as input variables, an error residual fitting function is constructed, and the least squares residual is solved. The sensitivity coefficients of each input variable are calculated based on the fitting residuals, and these coefficients are used as the basis for adjusting the dynamic weights. A gradient update strategy is used to iteratively optimize the weights of the gas velocity correction factor to obtain the updated correction factor.

8. The flow compensation and remote transmission integrated system for ultrasonic gas meters according to claim 1, characterized in that: The maintenance triggering module evaluates the long-term trend of ΔQ. If the average value of ΔQ approaches 0 and the standard deviation is less than the stability threshold σ, then it outputs a compensation effective state.

Citation Information

Patent Citations

  • Intelligent gas flow correction method, Internet of Things system, device and medium

    CN115773797A

  • Ultrasonic metering compensation method and system based on intelligent gas internet of things, and medium

    CN116346864A

  • Optimization method based on measurement data of ultrasonic gas meter

    CN117573668A

  • Dynamic metering method and system based on NB Internet of Things ultrasonic gas meter

    CN118149939A

  • Water meter flow real-time correction method and system based on intelligent sensor

    CN120274855A