A data optimization method and system for ultrasonic flowmeter

By collecting original data in an ultrasonic flowmeter for preprocessing and establishing compensation formulas, combining adaptive filtering and gas flow prediction model, the problem of difficulty in real-time adjustment of filter parameters in the existing technology is solved, and higher measurement accuracy and System response speed.

CN118689866BActive Publication Date: 2025-02-11ZHEJIANG WEIWEI INSTR CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411173561.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-02-11
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

It is difficult for existing ultrasonic flowmeters to adjust the filter parameters in real time in terms of temperature, pressure and gas composition changes, resulting in an increase in measurement error.

Method used

By collecting the original data for preprocessing, a compensation formula is established to correct the impact of temperature, pressure and gas composition on flow, and an adaptive filtering formula and gas flow prediction model are constructed to adjust the filtering parameters in real time.

Benefits of technology

It significantly improves the accuracy and stability of the measurement data, reduces noise and abnormal fluctuations, and improves the intelligence and response speed of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689866B_ABST
    Figure CN118689866B_ABST
Patent Text Reader

Abstract

The present invention discloses a data optimization method and system for an ultrasonic flowmeter, which relates to the technical field of gas flow measurement, including collecting raw data for preprocessing, establishing a compensation formula based on the preprocessed gas flow data, and calculating the compensated gas flow data; establishing an adaptive filtering formula, filtering the compensated gas flow data; constructing a gas flow prediction model, predicting the gas flow data in the future, and adjusting the filtering parameters in real time. By correcting the influence of ambient temperature, pressure and gas composition on the gas flow, the accuracy and stability of the measured data are significantly improved, and by adaptive filtering, noise and abnormal fluctuations are reduced to ensure the continuity and reliability of the data. By using the prediction model, the future flow change trend is identified in advance, and the filtering parameters and compensation coefficients are adjusted in real time, thereby improving the intelligence and response speed of the system, and realizing the comprehensive optimization of the ultrasonic gas flowmeter data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of gas flow measurement, and in particular to a data optimization method and system for an ultrasonic flow meter. Background Art

[0002] With the development of industrial automation and intelligence, accurate measurement of gas flow is particularly important in many fields, such as natural gas transportation, chemical production and environmental monitoring. Ultrasonic flowmeter, as a non-contact measuring instrument, has been widely used in the field of gas flow measurement due to its high precision, high reliability and low maintenance cost. Its basic principle is to calculate the flow rate by measuring the time difference or frequency change of ultrasonic wave propagation in the gas medium. However, since gas flow is greatly affected by environmental factors such as temperature, pressure and composition changes, how to improve the measurement accuracy of ultrasonic flowmeter under different environmental conditions has become a problem to be solved urgently.

[0003] Existing ultrasonic flow meters mainly use static filtering algorithms to process the collected gas flow data. These algorithms perform well under fixed environmental conditions, but their filtering effects are often unsatisfactory when the environment changes greatly. When the temperature fluctuates drastically or the pressure changes greatly, traditional static filtering algorithms are difficult to adjust parameters in real time, resulting in increased measurement errors. The impact of changes in gas composition on flow measurement is ignored, which further affects the accuracy of the data. These problems make the existing ultrasonic flow meters have great limitations in practical applications. Summary of the invention

[0004] In view of the problems existing in the above-mentioned existing data optimization method and system of an ultrasonic flowmeter, the present invention is proposed.

[0005] Therefore, the problem to be solved by the present invention is that the existing ultrasonic flow meter technology has fixed filtering parameters, and it is difficult to adjust the filtering parameters in real time to adapt to environmental changes in terms of temperature, pressure and gas composition changes, resulting in measurement errors.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a data optimization method for an ultrasonic flowmeter, comprising:

[0007] Collect the original data for preprocessing, establish a compensation formula based on the preprocessed gas flow data, and calculate the compensated gas flow data;

[0008] Establish an adaptive filtering formula to filter the compensated gas flow data;

[0009] Build a gas flow prediction model to predict gas flow data in the future and adjust filter parameters in real time;

[0010] All data is stored and managed in a relational database.

[0011] As a preferred solution of the data optimization method of an ultrasonic flowmeter described in the present invention, wherein: the acquisition of raw data refers to calibrating the ultrasonic gas flowmeter, installing temperature, pressure and gas composition sensors, and synchronizing the time of all sensors and flowmeters;

[0012] Set the acquisition frequency and sampling period to collect raw data, which includes gas flow data, temperature data, pressure data and gas composition data at each time point in the time window.

[0013] As a preferred solution of the data optimization method of an ultrasonic flowmeter described in the present invention, the preprocessing of the collected raw data refers to detecting the raw data using a median filtering method, marking abnormal data points, replacing the abnormal data points with the mean of the adjacent valid data, and smoothing the raw data after mean replacement using a mean filtering method.

[0014] As a preferred solution of the data optimization method of an ultrasonic flowmeter described in the present invention, wherein: the compensation formula is established based on the pre-processed gas flow data, and the compensated gas flow data is calculated to refer to the temperature data in the original data included in the time window [ t − D t , t + D t ] At each time point The current temperature of the gas flow meter;

[0015] Based on the gas flow data and temperature data, define the average temperature of the gas flow meter in the normal working environment , establish the temperature compensation formula and calculate at the time point Temperature compensated gas flow data :

[0016] ;

[0017] in, For at time point Gas flow data, is the temperature compensation coefficient, For time point The current temperature of the gas flow meter;

[0018] The pressure data in the raw data is included in the time window [ t − D t , t + D t ] At each time point The pressure value of the gas flow meter;

[0019] Based on the pressure data, define the average pressure of the gas flow meter in a normal working environment , establish the pressure compensation formula and calculate at the time point Pressure compensated gas flow data :

[0020] ;

[0021] in, For at time point Pressure data, is the pressure compensation coefficient;

[0022] The gas composition data in the original data is included in the time window [ t − D t , t + D t ] At each time point The concentration value of each gas component;

[0023] Based on the gas composition data, define the average concentration of the i-th gas component in the normal working environment , establish the gas composition compensation formula and calculate the time point Gas flow data after gas composition compensation :

[0024] ;

[0025] in, is the total number of gas components, is the gas composition compensation coefficient, For time point The concentration value of the i-th gas component.

[0026] As a preferred solution of the data optimization method of an ultrasonic flowmeter described in the present invention, wherein: the establishment of an adaptive filtering formula to filter the compensated gas flow data refers to obtaining the data at the time point The temperature-compensated gas flow data is weighted using an exponential function to calculate the temperature change at the time point Gas flow data after temperature compensation and weighting:

[0027] ;

[0028] in, For at time point Gas flow data after temperature compensation and weighting;

[0029] By obtaining at a point in time The pressure-compensated gas flow data is weighted using a logarithmic function to calculate the pressure change at the time point Gas flow data after pressure compensation and weighting:

[0030] ;

[0031] in, For at time point Gas flow data after pressure compensation and weighting;

[0032] By obtaining at a point in time The gas flow data after gas composition compensation is weighted by the fractional function to calculate the time change at the time point Gas flow data after gas composition compensation and weighting:

[0033] ;

[0034] in, For at time point The gas flow data after gas composition compensation and weighting processing, is the current time;

[0035] According to the calculated weighted gas flow data, the adaptive filtering formula is constructed:

[0036] Q t = ∫ t − D t t + D t [ A t + B t + C t ] d t ∫ t − D t t + D t d t ;

[0037] in, For the current time point The filtered gas flow data, is the time window size, is the integration variable Small variables

[0038] The filtering effect was evaluated by calculating the mean square error and comparing the filtered gas flow data with the gas flow data in the original data.

[0039] As a preferred solution of the data optimization method of an ultrasonic flowmeter described in the present invention, wherein: the gas flow prediction model is constructed to predict the gas flow data in the future, and the filter parameter value is adjusted in real time to select the autoregressive integral sliding average model to construct the gas flow prediction model;

[0040] The historical filtered gas flow data is divided into a training set and a test set;

[0041] Use the training set to train the gas flow prediction model and determine the parameters of the model;

[0042] Use the test set to verify the performance of the gas flow prediction model, calculate the prediction error of the model, and evaluate the prediction ability of the model;

[0043] Substituting the real-time filtered gas flow data into the gas flow prediction model to obtain the gas flow data at a future time;

[0044] Use time series analysis to analyze the changing trend of gas flow data over time in the future, and draw a forecast curve chart to intuitively display the changes in gas flow data in the future;

[0045] According to the change of gas flow data in the future, a gas flow change threshold is set. If the gas flow data in the future is detected to be higher than the threshold, it is determined that the gas flow change is large, and the sampling frequency of the gas flow data is increased in real time and the sampling period is shortened. If the gas flow data in the future is detected to be lower than the threshold, it is determined that the gas flow change is small, and the sampling frequency of the gas flow data is reduced in real time and the sampling period is extended.

[0046] Preprocessing the historical filtered gas flow data and the corresponding historical temperature, historical pressure and historical gas composition data, including removing outliers and noise;

[0047] Using regression analysis method, different regression models are established between historical gas flow data and historical temperature, historical pressure and historical gas composition data respectively. The sensitivity coefficients between gas flow data and temperature, pressure and each gas composition data are calculated respectively through different regression models. The sensitivity coefficients are the regression coefficients of the regression models.

[0048] The compensation coefficient is dynamically corrected by the sensitivity coefficient updated in real time according to the gas flow data at the future time and the filtered gas flow data, temperature, pressure and gas composition data at time t.

[0049] As a preferred solution of the data optimization method for an ultrasonic flow meter described in the present invention, wherein: the storing and managing all data in a relational database refers to selecting a relational database to store and manage gas flow data and its analysis results, designing a database table structure to store different types of data, setting regular backup tasks, backing up all data in the database, performing authority management on database users, and encrypting and storing sensitive data.

[0050] Another object of the present invention is to provide a data optimization system for an ultrasonic flowmeter, comprising:

[0051] Data acquisition module, used to collect raw data for preprocessing;

[0052] A gas compensation module is used to establish a compensation formula based on the pre-processed gas flow data and calculate the compensated gas flow data;

[0053] An adaptive filtering module is used to establish an adaptive filtering formula to filter the compensated gas flow data;

[0054] The gas flow prediction module is used to build a gas flow prediction model, predict the gas flow data in the future, and adjust the filtering parameters in real time;

[0055] The data storage module is used to store and manage all data in a relational database.

[0056] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of a data optimization method for an ultrasonic flowmeter when executing the computer program.

[0057] A computer-readable storage medium stores a computer program, which implements the steps of a data optimization method for an ultrasonic flowmeter when executed by a processor.

[0058] The beneficial effects of the present invention are as follows: by correcting the influence of ambient temperature, pressure and gas composition on gas flow, the accuracy and stability of measurement data are significantly improved; by adaptive filtering, noise and abnormal fluctuations are reduced to ensure the continuity and reliability of data; by predictive models, future flow change trends are identified in advance, and filtering parameters and compensation coefficients are adjusted in real time, thereby improving the intelligence and response speed of the system and achieving comprehensive optimization of ultrasonic gas flow meter data. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0060] Figure 1 A flow chart of a data optimization method for an ultrasonic flow meter.

[0061] Figure 2 Schematic diagram of the implementation of filtering processing.

[0062] Figure 3 This is a structural schematic diagram of a data optimization system for an ultrasonic flow meter. DETAILED DESCRIPTION

[0063] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0064] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0065] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0066] Example 1

[0067] Reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and provides a data optimization method for an ultrasonic flowmeter, comprising:

[0068] S1. Collect the original data for preprocessing, establish a compensation formula based on the preprocessed gas flow data, and calculate the compensated gas flow data;

[0069] Specifically, collecting raw data means calibrating ultrasonic gas flow meters, installing temperature, pressure, and gas composition sensors, and synchronizing the time of all sensors and flow meters;

[0070] Set the acquisition frequency and sampling period, and adjust the parameters according to actual application requirements;

[0071] Collect raw data, including gas flow data, temperature data, pressure data and gas composition data at each time point in the time window.

[0072] By calibrating the ultrasonic gas flow meter, installing temperature, pressure and gas composition sensors, synchronizing the time of all sensors and flow meters, and setting the acquisition frequency and sampling period to collect raw data, this method ensures the consistency and accuracy of data acquisition, reduces environmental noise and outliers, and lays a solid foundation for subsequent data processing and optimization, thereby significantly improving the reliability and accuracy of gas flow measurement.

[0073] Furthermore, collecting raw data for preprocessing means using a median filter method to detect the raw data, marking abnormal data points, replacing the abnormal data points with the mean of the adjacent valid data, and using a mean filter method to smooth the raw data after the mean replacement.

[0074] By preprocessing the original data, using the median filter method to detect and mark abnormal data points, replacing the abnormal data points with the mean of the adjacent valid data, and using the mean filter method to smooth the replaced data, this method effectively reduces noise and outliers, smoothes data fluctuations, and significantly improves the quality and accuracy of the data, providing a reliable basis for subsequent data compensation and analysis.

[0075] In addition, based on the pre-processed gas flow data, a compensation formula is established to calculate the compensated gas flow data, which refers to the temperature data in the original data included in the time window. [ t − D t , t + D t ] At each time point The current temperature of the gas flow meter;

[0076] Based on the gas flow data and temperature data, define the average temperature of the gas flow meter in the normal working environment The normal working environment of the gas flow meter refers to the environmental conditions that operate within the design specifications of the gas flow meter, including the allowable operating temperature range, allowable operating pressure range, allowable measurement gas range and allowable measurement flow range preset when the gas flow meter is designed. The temperature compensation formula is established to calculate the time point Temperature compensated gas flow data :

[0077] ;

[0078] in, For at time point Gas flow data, is the temperature compensation coefficient, For time point The current temperature of the gas flow meter;

[0079] The pressure data in the raw data is included in the time window [ t − D t , t + D t ] At each time point The pressure value of the gas flow meter;

[0080] Based on the pressure data, define the average pressure of the gas flow meter in a normal working environment , establish the pressure compensation formula and calculate at the time point Pressure compensated gas flow data :

[0081] ;

[0082] in, For at time point Pressure data, is the pressure compensation coefficient;

[0083] The gas composition data in the original data is included in the time window [ t − D t , t + D t ] At each time point The concentration value of each gas component;

[0084] Based on the gas composition data, define the average concentration of the i-th gas component in the normal working environment , establish the gas composition compensation formula and calculate the time point Gas flow data after gas composition compensation :

[0085] ;

[0086] in, is the total number of gas components, is the gas composition compensation coefficient, For time point The concentration value of the i-th gas component.

[0087] By establishing a compensation formula and calculating the compensated gas flow data, the deviation between the current temperature and the average temperature can be corrected, reducing the measurement error caused by temperature changes. The pressure compensation formula reduces the impact of pressure fluctuations on flow measurement by correcting the difference between the current pressure and the average pressure. The gas composition compensation formula ensures that the impact of different gas components on flow measurement is effectively compensated by correcting the changes in the concentration of each gas component. The compensated data has higher stability and reliability and is no longer significantly affected by changes in environmental conditions. The data volatility is reduced and the trend is smoother and continuous, which is particularly important for long-term monitoring and control. These compensation measures improve the adaptability of the measurement system, enabling the gas flowmeter to maintain high-precision measurement capabilities under different environmental conditions and is widely used in various industrial and environmental monitoring fields. The high-quality data after compensation provides a reliable basis for subsequent data processing and analysis, improves the accuracy and reliability of adaptive filtering and gas flow prediction, supports the stable operation and intelligent adjustment of the control system, and automatically compensates for temperature, pressure and gas composition, reducing manual intervention, improving the automation level and work efficiency of the system, while reducing errors caused by human operation, and further ensuring the accuracy of the measurement data.

[0088] S2, establishing an adaptive filtering formula to filter the compensated gas flow data;

[0089] Specifically, an adaptive filtering formula is established to filter the compensated gas flow data by obtaining the The temperature-compensated gas flow data is weighted using an exponential function to calculate the temperature change at the time point Gas flow data after temperature compensation and weighting:

[0090] ;

[0091] in, For at time point Gas flow data after temperature compensation and weighting;

[0092] Temperature changes have a significant impact on gas flow measurement. Using exponential function weighted processing can effectively reduce the fluctuations caused by temperature changes, making temperature compensation more accurate. The use of exponential functions helps smooth data and reduce measurement errors caused by instantaneous temperature changes.

[0093] By obtaining at a point in time The pressure-compensated gas flow data is weighted using a logarithmic function to calculate the pressure change at the time point Gas flow data after pressure compensation and weighting:

[0094] ;

[0095] in, For at time point Gas flow data after pressure compensation and weighting;

[0096] Pressure changes affect the measurement results of gas flow. Using logarithmic functions for weighted processing can better correct the errors caused by pressure changes. Logarithmic functions have good adaptability to a wide range of pressure changes and can effectively process flow data under high and low pressure conditions.

[0097] By obtaining at a point in time The gas flow data after gas composition compensation is weighted by the fractional function to calculate the time change at the time point Gas flow data after gas composition compensation and weighting:

[0098] ;

[0099] in, For at time point The gas flow data after gas composition compensation and weighting processing, is the current time;

[0100] The change of gas composition has a complex impact on flow measurement. The use of fractional function weighted processing can better handle the impact of changes in gas composition on flow data.

[0101] According to the calculated weighted gas flow data, the adaptive filtering formula is constructed:

[0102] Q t = ∫ t − D t t + D t [ A t + B t + C t ] d t ∫ t − D t t + D t d t ;

[0103] in, For the current time point The filtered gas flow data, is the time window size, is the integration variable Small variables

[0104] Gas flow is affected by many factors. Comprehensive processing can take into account the influence of temperature, pressure and gas composition at the same time. The data after comprehensive processing is smoother and more continuous, which is helpful for subsequent data analysis and control. Through integral processing and weighted synthesis, the adaptive filtering formula can dynamically adjust the filtering parameters according to real-time data.

[0105] The filtering effect was evaluated by calculating the mean square error and comparing the filtered gas flow data with the gas flow data in the original data.

[0106] By obtaining the temperature-compensated gas flow data at a specific time point and the current temperature of the gas flow meter, the temperature change is weighted using an exponential function to calculate the temperature-compensated and weighted gas flow data, which effectively corrects the impact of temperature changes on flow measurement. Using the pressure-compensated gas flow data and the current pressure value, the pressure change is weighted using a logarithmic function to calculate the pressure-compensated and weighted gas flow data, thereby reducing the impact of pressure fluctuations on measurement accuracy. For gas composition compensation, the time change is weighted using a fractional function to calculate the gas composition-compensated and weighted gas flow data, ensuring that the gas composition changes are consistent with the actual measurement accuracy. The influence of chemistry on flow measurement is effectively corrected. By integrating these data with different weightings and constructing an adaptive filtering formula, the gas flow data can be filtered in real time. The adaptive filtering formula can dynamically adjust the filtering parameters according to the real-time data, so that the filtering process can adapt to the changes in the data, significantly reducing the influence of noise and abnormal fluctuations on the measured data. By calculating the mean square error and comparing the filtered gas flow data with the original data, the filtering effect can be effectively evaluated and the filtering algorithm can be continuously optimized. Ultimately, the gas flow data is smoother and more continuous, and the accuracy and stability of the data are greatly improved, providing a reliable foundation for subsequent data analysis, prediction and control.

[0107] S3, build a gas flow prediction model, predict the gas flow data in the future, and adjust the filter parameters in real time;

[0108] Specifically, a gas flow prediction model is constructed to predict the gas flow data in the future, and the filter parameter value is adjusted in real time to select the autoregressive integral sliding average model to construct the gas flow prediction model;

[0109] The historical filtered gas flow data is divided into a training set and a test set;

[0110] Use the training set to train the gas flow prediction model and determine the parameters of the model;

[0111] Use the test set to verify the performance of the gas flow prediction model, calculate the prediction error of the model, and evaluate the prediction ability of the model;

[0112] Substituting the real-time filtered gas flow data into the gas flow prediction model to obtain the gas flow data at a future time;

[0113] Use time series analysis to analyze the changing trend of gas flow data over time in the future, and draw a forecast curve chart to intuitively display the changes in gas flow data in the future;

[0114] According to the change of gas flow data in the future, a gas flow change threshold is set. If the gas flow data in the future is detected to be higher than the threshold, it is determined that the gas flow change is large, and the sampling frequency of the gas flow data is increased in real time and the sampling period is shortened. If the gas flow data in the future is detected to be lower than the threshold, it is determined that the gas flow change is small, and the sampling frequency of the gas flow data is reduced in real time and the sampling period is extended.

[0115] Preprocessing the historical filtered gas flow data and the corresponding historical temperature, historical pressure and historical gas composition data, including removing outliers and noise;

[0116] Using regression analysis method, different regression models are established between historical gas flow data and historical temperature, historical pressure and historical gas composition data respectively. The sensitivity coefficients between gas flow data and temperature, pressure and each gas composition data are calculated respectively through different regression models. The sensitivity coefficients are the regression coefficients of the regression models.

[0117] Based on the gas flow data at future time and at time The filtered gas flow data, temperature, pressure and gas composition data are dynamically corrected through real-time updated sensitivity coefficients, including:

[0118] Adjust the temperature compensation coefficient by temperature sensitivity coefficient :

[0119] ;

[0120] in, is the adjusted temperature compensation coefficient, is the temperature sensitivity coefficient of the temperature compensation coefficient, For the prediction at the current time point Gas flow data, For the current time point The filtered gas flow data, is the average temperature of the gas flow meter in a normal working environment, For the current time point The temperature of the gas flow meter;

[0121] In this formula The temperature sensitivity coefficient of the temperature compensation coefficient indicates the degree of influence of temperature on the gas flow. In the formula, the temperature compensation coefficient is adjusted by the difference between the current temperature and the average temperature in the normal working environment. This adjustment is multiplied by the temperature sensitivity coefficient, indicating the correction strength of the compensation coefficient when the temperature changes. The larger the temperature sensitivity coefficient, the greater the influence of temperature on the gas flow, and the greater the change range of the adjustment compensation coefficient.

[0122] Adjust the pressure compensation coefficient through the pressure sensitivity coefficient :

[0123] ;

[0124] in, is the adjusted pressure compensation coefficient, is the pressure sensitivity coefficient of the pressure compensation coefficient, For the current time point The pressure value of the gas flow meter, It is the average pressure of the gas flow meter in the normal working environment;

[0125] In this formula is the pressure sensitivity coefficient of the pressure compensation coefficient. The pressure compensation coefficient is adjusted by the ratio of the pressure at the current time point to the average pressure under normal working environment. This adjustment process is affected by the pressure sensitivity coefficient. The larger the pressure sensitivity coefficient, the greater the impact of pressure on gas flow changes. Therefore, the adjustment range of the compensation coefficient is also correspondingly larger.

[0126] Adjust the gas composition compensation factor through the gas composition sensitivity coefficient :

[0127] ;

[0128] in, is the adjusted compensation coefficient of the i-th gas component, is the gas composition sensitivity coefficient of the i-th gas composition compensation coefficient, For the current time point The concentration value of the i-th gas component, is the average concentration of the i-th gas component in a normal working environment, which is determined by simulation and experimental methods. , , The value of

[0129] In this formula is the gas composition sensitivity coefficient of the ith gas component compensation coefficient. The difference between the current gas composition and the average composition concentration of the ith gas component in the normal working environment multiplied by the gas composition sensitivity coefficient indicates how changes in gas composition affect the compensation coefficient. The gas composition sensitivity coefficient reflects the sensitivity of the gas composition. The larger the coefficient, the more significant the impact of gas composition changes on the flow rate, and therefore the greater the adjustment range of the compensation coefficient.

[0130] By constructing a gas flow prediction model and adjusting the filtering parameters in real time, the measurement accuracy and system response speed of the gas flow meter can be significantly improved. The gas flow prediction model is constructed by selecting the autoregressive integral sliding average model. The historical filtered gas flow data is divided into a training set and a test set for model training and parameter determination, and the model performance and prediction error are verified to ensure the accuracy and reliability of the model. The real-time filtered gas flow data is substituted into the prediction model to obtain the gas flow data of the future time. The change trend of the future gas flow data is analyzed by the time series analysis method, and a prediction curve chart is drawn to intuitively display the change of the future gas flow. According to the change of the future gas flow data, the gas flow change threshold is set, the sampling frequency and sampling period are dynamically adjusted, and the system's response to flow changes is improved. The sensitivity of the historical filtered gas flow data and the corresponding historical temperature, pressure and gas composition data is calculated, and the sensitivity coefficient is extracted. According to these coefficients and the future gas flow data, the compensation coefficient is adjusted to improve the compensation accuracy and the adaptability of the system. This not only improves the accuracy and real-time performance of gas flow measurement, but also enhances the system's intelligent adjustment ability in complex environments, ensuring that the gas flow meter can operate stably and efficiently under various working conditions.

[0131] S4. Store all data in a relational database and manage it.

[0132] Specifically, storing and managing all data in a relational database means selecting a relational database to store and manage gas flow data and its analysis results, designing a database table structure to store different types of data, setting regular backup tasks, backing up all data in the database, managing permissions for database users, and encrypting and storing sensitive data.

[0133] By storing and managing all data in a relational database, the storage and management efficiency of gas flow data can be significantly improved. A relational database is selected to store and manage gas flow data and its analysis results. By designing a reasonable database table structure, it is ensured that different types of data can be stored in an orderly manner and quickly queried. Regular backup tasks are set to ensure data security and reliability. Even when a system failure occurs, data can be quickly restored. Database users are managed for authority to ensure that only authorized personnel can access and operate data, prevent data leakage and unauthorized modifications, and encrypt sensitive data for storage to further improve data security and privacy protection. This not only ensures data integrity and security, but also improves system stability and maintainability, allowing the gas flow meter system to operate efficiently and reliably in a complex and changing environment.

[0134] Example 2

[0135] Reference Figure 3 , which is a second embodiment of the present invention, and which is different from the previous embodiment, provides a data optimization system for an ultrasonic flowmeter, including:

[0136] Data acquisition module, used to collect raw data for preprocessing;

[0137] A gas compensation module is used to establish a compensation formula based on the pre-processed gas flow data and calculate the compensated gas flow data;

[0138] An adaptive filtering module is used to establish an adaptive filtering formula to filter the compensated gas flow data;

[0139] The gas flow prediction module is used to build a gas flow prediction model, predict the gas flow data in the future, and adjust the filtering parameters in real time;

[0140] The data storage module is used to store and manage all data in a relational database.

[0141] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0142] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0143] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0144] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit with a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit with a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0145] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A data optimization method for an ultrasonic flowmeter, characterized in that: include, Collect the original data for preprocessing, establish a compensation formula based on the preprocessed gas flow data, and calculate the compensated gas flow data; Establish an adaptive filtering formula to filter the compensated gas flow data; Build a gas flow prediction model to predict gas flow data in the future and adjust filter parameters in real time; Store and manage all data in a relational database; The said collecting raw data refers to calibrating ultrasonic gas flow meters, installing temperature, pressure and gas composition sensors, and synchronizing the time of all sensors and flow meters; Set the acquisition frequency and sampling period to collect raw data, which includes gas flow data, temperature data, pressure data and gas composition data at each time point in the time window; The collecting of raw data for preprocessing refers to using a median filter method to detect the raw data, marking abnormal data points, replacing the abnormal data points with the mean of the adjacent valid data, and using a mean filter method to smooth the raw data after the mean replacement; The compensation formula is established based on the pre-processed gas flow data to calculate the compensated gas flow data, which means that the temperature data in the original data is included in the time window. At each time point The current temperature of the gas flow meter; Based on the gas flow data and temperature data, define the average temperature of the gas flow meter in the normal working environment , establish the temperature compensation formula and calculate at the time point Temperature compensated gas flow data : ; in, For at time point Gas flow data, is the temperature compensation coefficient, For time point The current temperature of the gas flow meter; The pressure data in the original data is included in the time window At each time point The pressure value of the gas flow meter; Based on the pressure data, define the average pressure of the gas flow meter in a normal working environment , establish the pressure compensation formula and calculate at the time point Pressure compensated gas flow data : ; in, For at time point Pressure data, is the pressure compensation coefficient; The gas composition data in the original data is included in the time window At each time point The concentration value of each gas component; Based on the gas composition data, define the average concentration of the i-th gas component in the normal working environment , establish the gas composition compensation formula and calculate the time point Gas flow data after gas composition compensation : ; in, is the total number of gas components, is the gas composition compensation coefficient, For time point The concentration value of the i-th gas component.

2. The data optimization method of an ultrasonic flowmeter according to claim 1, characterized in that: The establishment of the adaptive filtering formula to filter the compensated gas flow data refers to obtaining the The temperature-compensated gas flow data is weighted using an exponential function to calculate the temperature change at the time point Gas flow data after temperature compensation and weighting: ; in, For at time point Gas flow data after temperature compensation and weighting; By obtaining at a point in time The pressure-compensated gas flow data is weighted using a logarithmic function to calculate the pressure change at the time point Gas flow data after pressure compensation and weighting: ; in, For at time point Gas flow data after pressure compensation and weighting; By obtaining at a point in time The gas flow data after gas composition compensation is weighted by the fractional function to calculate the time change at the time point Gas flow data after gas composition compensation and weighting: ; in, For at time point The gas flow data after gas composition compensation and weighting processing, is the current time; According to the calculated weighted gas flow data, the adaptive filtering formula is constructed: ; in, For the current time point The filtered gas flow data, is the time window size, is the integration variable Small variables The filtering effect was evaluated by calculating the mean square error and comparing the filtered gas flow data with the gas flow data in the original data.

3. The data optimization method of an ultrasonic flowmeter according to claim 2, characterized in that: The gas flow prediction model is constructed to predict the gas flow data in the future, and the filter parameter value is adjusted in real time to select the autoregressive integral sliding average model to construct the gas flow prediction model; The historical filtered gas flow data is divided into a training set and a test set; Use the training set to train the gas flow prediction model and determine the parameters of the model; Use the test set to verify the performance of the gas flow prediction model, calculate the prediction error of the model, and evaluate the prediction ability of the model; Substituting the real-time filtered gas flow data into the gas flow prediction model to obtain the gas flow data at a future time; Use time series analysis to analyze the changing trend of gas flow data over time in the future, and draw a forecast curve chart to intuitively display the changes in gas flow data in the future; According to the change of gas flow data in the future, a gas flow change threshold is set. If the gas flow data in the future is detected to be higher than the threshold, it is determined that the gas flow change is large, and the sampling frequency of the gas flow data is increased in real time and the sampling period is shortened. If the gas flow data in the future is detected to be lower than the threshold, it is determined that the gas flow change is small, and the sampling frequency of the gas flow data is reduced in real time and the sampling period is extended. Preprocessing the historical filtered gas flow data and the corresponding historical temperature, historical pressure and historical gas composition data, including removing outliers and noise; Using regression analysis method, different regression models are established between historical gas flow data and historical temperature, historical pressure and historical gas composition data respectively. The sensitivity coefficients between gas flow data and temperature, pressure and each gas composition data are calculated respectively through different regression models. The sensitivity coefficients are the regression coefficients of the regression models. The compensation coefficient is dynamically corrected by the sensitivity coefficient updated in real time according to the gas flow data at the future time and the filtered gas flow data, temperature, pressure and gas composition data at time t.

4. The data optimization method of an ultrasonic flowmeter according to claim 3, characterized in that: Storing all data in a relational database and managing it refers to selecting a relational database to store and manage gas flow data and its analysis results, designing a database table structure to store different types of data, setting regular backup tasks, backing up all data in the database, managing the permissions of database users, and encrypting and storing sensitive data.

5. A data optimization system for an ultrasonic flowmeter based on the data optimization method for an ultrasonic flowmeter according to any one of claims 1 to 4, characterized in that: include, Data acquisition module, used to collect raw data for preprocessing; A gas compensation module is used to establish a compensation formula based on the pre-processed gas flow data and calculate the compensated gas flow data; An adaptive filtering module is used to establish an adaptive filtering formula to filter the compensated gas flow data; The gas flow prediction module is used to build a gas flow prediction model, predict the gas flow data in the future, and adjust the filtering parameters in real time; The data storage module is used to store and manage all data in a relational database.

6. A computer device comprising: A memory and a processor; the memory stores a computer program, characterized in that: when the processor executes the computer program, the steps of a data optimization method for an ultrasonic flowmeter described in any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a data optimization method for an ultrasonic flowmeter according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Measurement model optimization for channel prediction improvement in wireless networks

    WO2017186309A1