Transient flow modeling generation method and transient flow generation and measurement device

By defining six basic transient flow models and generating transient flows using an electromechanical integrated system, and combining artificial intelligence technology, the problem of evaluating the metering characteristics and pattern recognition of flow meters under transient flow conditions was solved, and high-precision measurement of flow meters in non-steady-state flow scenarios was achieved.

CN121994331APending Publication Date: 2026-05-08ZHEJIANG INSTITUTE OF QUALITY SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG INSTITUTE OF QUALITY SCIENCES
Filing Date
2026-01-19
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing flow meters face difficulties in evaluating metering characteristics and recognizing patterns under transient flow conditions, resulting in large measurement errors and making them unsuitable for real-world unsteady flow scenarios.

Method used

Six basic transient flow models are defined using time univariate functions, and transient flows are generated through a mechatronics system. Artificial intelligence technology is used for pattern recognition and model training to provide a transient flow generation and measurement device.

Benefits of technology

This improves the metering performance of the flow meter under transient flow conditions, reduces measurement errors, and realizes the intelligent evolution of the flow meter and the accuracy of transient flow pattern recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121994331A_ABST
    Figure CN121994331A_ABST
Patent Text Reader

Abstract

The invention relates to the field of fluid flow measurement, and discloses a transient flow modeling generation method and a transient flow generation and measurement device, the device is a computer-controlled mechatronics system, and is used for generating transient flow with standard quantity value characteristics and carrying out metrological characteristic test on a flowmeter under the generated transient flow. The transient flow generating and measuring device is used for repeatedly testing the flow meter for multiple times under different transient flow models, instantaneous flow measured by the flow meter is collected to form time sequence data, and instantaneous flow measured by the transient flow generating and measuring device is synchronously collected to form time sequence data. And the time series data are built into a labeled data set which is used for training a transient flow pattern recognition model. And transplanting the transient flow pattern recognition model obtained by training into the flow meter, and endowing the flow meter with a transient flow response function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0003] This invention relates to the field of fluid flow measurement, proposes a method for generating transient fluid flow, and based on this, provides a transient flow generation and measurement device for testing and evaluating the metering characteristics of flowmeters. Background Technology

[0005] Traditionally, flow measurement values ​​are defined based on steady-state flow. Steady-state flow, also known as constant flow, is characterized by the fluid flow parameters remaining constant over time at any spatial location. Flow measurement standards established in laboratories worldwide are based on testing and evaluating the metering characteristics of flowmeters under steady-state fluid flow conditions. Flowmeters operate under a laboratory-created steady-state flow condition, and their flow measurement results are characterized by the mean, offering ease of measurement and reproducibility. In terms of data processing, measurement noise can be easily identified and eliminated through filtering methods using mean and variance statistics, resulting in high measurement accuracy. Establishing laboratory-based measurement standards based on steady-state flow is essential for defining and assigning flow values ​​and evaluating the metering characteristics of flowmeters.

[0006] In the real world, steady-state flow conditions comparable to those in the laboratory are extremely rare; flow meters typically operate under transient flow conditions. Transient flow, also known as unsteady flow, is characterized by the fluid parameters at any spatial location changing over time. For example, the fluid flow rate after a valve is opened is a transient process of increasing from small to large, while the flow rate after the valve is closed is a transient process of decreasing from large to small. Fluid flow at the pump outlet exhibits strong pulsation. Common fluid filling or consumption processes in factories are usually discontinuous transient processes. The filling or filling of fuels such as compressed hydrogen, compressed natural gas, and liquefied natural gas is a transient process of first increasing from small to large and then decreasing from large to small. In transient flow scenarios with non-stationary dynamic characteristics, a key issue is whether the metering characteristics of a flow meter operating under transient flow conditions are equivalent to those under steady-state flow conditions.

[0007] Flowmeters operate under transient flow conditions, performing discrete measurements. The resulting data is a time-series dataset whose statistical characteristics change over time. Data points often exhibit autocorrelation, and the measurement results are no longer represented by the mean. Random errors cannot be identified solely through mean and variance statistics. Therefore, filtering algorithms based on steady-state flow are generally unsuitable for transient flow conditions. A more appropriate approach is to perform curve fitting on the time-series data, using the fitting result as an estimate of the actual flow. This significantly reduces flowmeter measurement errors and improves metering performance under transient flow conditions. Consequently, if a flowmeter is only assigned metering characteristics based on steady-state flow and lacks a transient response algorithm, its performance under transient flow will differ significantly from its steady-state performance, resulting in substantial measurement errors. In fact, it is common practice to amplify the maximum permissible measurement error in field engineering applications of flowmeters to twice the maximum permissible measurement error under laboratory steady-state flow conditions. Therefore, when flowmeters need to adapt to transient flow measurement scenarios, another problem that needs to be addressed is how to equip them with a suitable transient response algorithm.

[0008] The process of curve fitting for transient flow sampling data in time series also faces the challenge of the complexity of real-world transient flows, namely, the problem of choosing a fitting curve model. One feasible approach is to decompose the complex transient flow into representative basic transient flows and their combinations, and then use artificial intelligence techniques to perform pattern recognition on the transient flow sampling data to find a matching fitting curve model, thereby obtaining a good curve fitting effect.

[0009] One remaining challenge in applying artificial intelligence (AI) technology is training transient flow pattern recognition models. Basic transient flows can be defined using mathematical modeling, then numerically processed by a computer program and converted into control commands to generate the desired transient flow via a physical generating device. When generating complex transient flows, this can be achieved using basic transient flows and their combinations. The generating device needs to include measurement feedback to measure and verify the consistency between the actual transient flow and the control model, using the measurement results as a standard value for comparison with flowmeter measurements under the same flow conditions. This novel flow generation and measurement device solves the problem of response comparison for transient flow pattern recognition results. It can be used to test and evaluate the flowmeter's metrological characteristics under transient flows and to train the flowmeter's transient flow pattern recognition model, providing a foundational testing and verification platform for the intelligent evolution of flowmeters based on statistical learning and even AI technologies. Summary of the Invention

[0011] In order to solve the above-mentioned technical problems in the prior art, the purpose of this invention is to provide a technical means for testing and evaluating the metering characteristics of flow meters under transient flow and for training transient flow pattern recognition models.

[0012] To achieve this objective, this invention first proposes a method for modeling transient flow, characterized by defining six basic transient flow models using a univariate time function, including:

[0013] Open valve flow model, In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, which is non-negative; q max The upper limit instantaneous flow rate is a non-negative constant parameter; a and b are constant parameters greater than 0, and the valve opening time T is set. o At t=0, q(0)≈0 is satisfied, and the approximate value of b is calculated. At t=T o When q(T) is satisfied o )≈q max We can calculate an approximate value for a.

[0014] Valve-closed flow model In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, which is non-negative; q max The upper limit instantaneous flow rate is a non-negative constant parameter; a and b are constant parameters greater than 0, and the valve closing time T is set. c At t=0, q(0)≈q max The approximate value of b is calculated at t=T c When q(T) is satisfied c )≈0, and we can calculate an approximate value of a.

[0015] Pulsating flow model In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, which is non-negative; q m is the average instantaneous flow rate, a non-negative constant parameter; c is a constant parameter ranging from 0 to 1. When c=0, the model degenerates into a steady flow; T is the pulsation period, a constant parameter greater than 0.

[0016] Linear increasing flow model, In the formula, q(t) is the instantaneous flow rate of the transient flow; t is the time variable, ranging from 0 to τ. i ;q min The lower limit flow rate at the initial time is incremented; this is a non-negative parameter. max The upper limit flow rate at the incremental end time is a non-negative constant parameter; d is a constant parameter between 0 and 1; τ i This is a constant parameter with an incrementing time length and a value greater than 0.

[0017] Linear decreasing flow model, In the formula, q(t) is the instantaneous flow rate of the transient flow; t is the time variable, ranging from 0 to τ. d ;q max A non-negative constant parameter q is used to decrease the upper limit flow rate at the initial time. minThe lower limit flow rate at the decreasing end time is a non-negative constant parameter; d is a constant parameter between 0 and 1; τ d This is a constant parameter greater than 0, representing the decreasing time length.

[0018] Composite wave flow model, In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, a non-negative number; q0 is the initial instantaneous flow rate of the transient flow at t=0, a non-negative constant parameter; T is the period of the fundamental current at k=1, a constant parameter greater than 0; q k is the amplitude of the k-th harmonic current, a non-negative constant parameter; n is a positive integer representing the number of synthesized waves.

[0019] In this invention, complex transient flows can be generated by combining various basic transient flow models. For example, a transient flow with an intermittent effect can be generated by combining open-valve flow and closed-valve flow models. First, the open-valve flow is started, and the instantaneous flow rate q reaches its upper limit. max Then the valve is turned off, creating an intermittent effect through the opening and closing of the valve. The intermittent flow can be repeated multiple times, with each cycle's valve opening time T. o Or valve closing time T c Different combinations are possible. Such combinations are free as long as the control parameters do not conflict, such as combinations of open-valve flow and pulsating flow, combinations of open-valve flow and pulsating flow and closed-valve flow, combinations of linearly increasing flow and pulsating flow, combinations of pulsating flow and linearly decreasing flow, combinations of linearly increasing flow and linearly decreasing flow, combinations of composite undulating flows with multiple different parameters, and so on.

[0020] The present invention also includes a transient flow generation and measurement device, which is a computer-controlled mechatronic system used to generate transient flows with standard quantitative characteristics and to perform metrological characteristic tests on the flowmeter under the generated transient flow. The device uses time-series data collected during the test to train the transient flow pattern recognition model of the flowmeter. The main components of its hardware include:

[0021] The piston cylinder is a hollow cylinder with one end fitted to the piston and the other end sealed by a flange. The flange has fluid inlet and outlet holes, and the interior can be filled with fluid.

[0022] A piston, a hollow cylinder with a uniform cross-sectional area, is precision-machined. When it moves within a piston cylinder, it displaces an equal volume of fluid from the cylinder. The volume of fluid flowing out of the piston cylinder is equal to the piston's cross-sectional area multiplied by the distance the piston travels, and the instantaneous flow rate of the fluid is equal to the piston's cross-sectional area multiplied by its velocity. Therefore, a piston possesses the characteristics of a metering element; by measuring the piston's velocity and distance, its motion state can be obtained, and consequently, the fluid's flow state.

[0023] The ball screw, precision machined, has a uniform lead. Its moving end is connected to the piston via a nut, and its fixed end is connected to the reducer. It is used to convert the rotary motion of the servo motor into the linear motion of the piston.

[0024] The speed reducer, precision machined, has a defined transmission ratio. Its input shaft is connected to a servo motor, and its output shaft is connected to a ball screw to achieve speed reduction transmission.

[0025] The servo motor's output end is connected to a reducer, and its tail end is connected to a rotary encoder. The control circuit and electrical lines are connected to the servo drive, providing power for the piston's movement and ensuring precise and controllable rotation speed.

[0026] The servo driver, control loop, and electrical output lines are connected to the servo motor, and the communication interface is connected to the main controller to receive control commands from the main controller and provide feedback on the operating parameters of the servo motor.

[0027] A rotary encoder, installed at the tail end of the servo motor's rotating spindle, outputs a signal connected to the main controller. The rotary encoder can be an integrated component of the servo motor, used to directly measure the servo motor's rotational speed and indirectly measure the piston's speed and distance. The servo motor's rotational speed is equal to the rotary encoder's output pulse frequency divided by the encoder's resolution. The piston speed can be calculated by dividing the servo motor's rotational speed by the reducer's reduction ratio and then multiplying by the ball screw's lead. The cumulative number of rotations of the servo motor is equal to the cumulative number of pulses output by the rotary encoder divided by the encoder's resolution. The piston distance can be calculated by dividing the cumulative number of rotations by the reducer's reduction ratio and then multiplying by the ball screw's lead.

[0028] The main controller connects to a host computer via a communication port, enabling data transmission and information exchange; it also connects to a servo driver via a communication port, enabling data transmission and information exchange with the servo driver; it receives pulse signals from the rotary encoder via a pulse port; and it receives digital or pulse signals from the flow meter under test via either a communication port or a pulse port. The main controller has a built-in high-precision clock that applies time stamps to the collected data during the reception of signals from the rotary encoder and the flow meter under test, transforming it into time-series data.

[0029] The host computer connects to the main controller via a communication port to enable data transmission and information exchange with the main controller. The host computer is equipped with control and measurement software, which sends servo motor motion control commands through the main controller and receives and processes the data uploaded by the main controller.

[0030] The transient flow generation and measurement device of this invention, and the control and measurement software built on the host computer, have the following main functions: controlling transient flow generation, flow meter testing, data processing, and training of transient flow pattern recognition models. The main working steps include:

[0031] The transient flow model to be generated is selected through the transient flow generation module of the host computer control and measurement software. This model can be a single basic transient flow model or a combination of several basic transient flow models arranged in a time sequence. The selected transient flow model is numerically processed by the program, converted into control commands, and input into the main controller.

[0032] The main controller controls the servo driver to drive the servo motor to rotate according to the control instructions received from the host computer.

[0033] Driven by a servo driver, the servo motor's rotary motion is reduced by a reducer and then converted into linear motion via a ball screw drive, which in turn drives the piston to move within the piston cylinder.

[0034] The piston cylinder is filled with fluid, and the piston squeezes the fluid out as it moves inside the cylinder.

[0035] A rotary encoder installed on the servo motor measures the rotation signal of the servo motor in real time. This signal is fed back to the main controller in real time in the form of pulse signals. The cumulative pulses are proportional to the linear movement distance of the piston, and the pulse frequency is proportional to the linear movement speed of the piston.

[0036] The main controller applies time stamps to the received rotary encoder pulse signals to form time-series data, calculates the piston speed and travel distance, and transmits this data to the host computer. To reduce the computational burden on the main controller, it can also measure only the frequency and cumulative pulse count of the rotary encoder pulse signals, apply time stamps to the measurement results to form time-series data, and upload this data to the host computer, which then calculates the piston speed and travel distance.

[0037] The data processing module of the host computer control and measurement software calculates the instantaneous flow rate of the transient flow based on the received piston movement speed with time stamps or the frequency of the rotary encoder pulse signal. It then visualizes the transient flow occurrence and the actual instantaneous flow rate curve of the measuring device, thus realizing the instantaneous flow rate measurement of the transient flow. A goodness-of-fit index is used. To evaluate the fitting effect of the actual instantaneous flow curve, where q i For instantaneous flow samples, This is the instantaneous flow rate estimate of the fitted curve. This represents the average instantaneous flow rate sample. The data processing module of the host computer control and measurement software calculates the actual cumulative flow rate of the transient flow generation and measurement device based on the received piston movement distance with time stamps or the cumulative pulse count of the rotary encoder, thus realizing the measurement of the actual cumulative flow rate.

[0038] The data processing module of the host computer control and measurement software quantifies the transient flow model and presents the theoretical instantaneous flow curve in a visual manner. This curve is then compared with the fitted actual instantaneous flow curve to determine the degree of agreement between the two. The host computer calculates the theoretical cumulative flow based on the time integral of the transient flow model and compares this calculation with the actual cumulative flow measured by the transient flow generation and measurement devices. This comparison is used to evaluate the numericalization error of the transient flow model or the overall motion control error. This error can be used as a metric for evaluating and improving the numericalization algorithm of the transient flow model or the motion control algorithm of the servo motor.

[0039] The fluid output from the transient flow generator and measuring device flows through the flow meter. The flow meter measures the transient flow and calculates the instantaneous flow rate or cumulative flow rate based on the measurement results, which is then output to the main controller through the pulse port or communication port.

[0040] The main controller collects the transient instantaneous flow rate or cumulative flow rate measured by the flow meter, applies a time stamp to form time series data, and uploads it to the host computer.

[0041] The data processing module of the host computer control and measurement software compares the instantaneous flow rate or cumulative flow rate of the transient flow measured by the flow meter with the actual instantaneous flow rate or actual cumulative flow rate measured by the transient flow generator and measuring device itself. The measurement value of the transient flow generator and measuring device is used as a reference value to determine the measurement error of the flow meter.

[0042] A transient flow pattern recognition model training module based on artificial intelligence technology is built into the host computer control and measurement software. The flowmeter is repeatedly tested under different transient flow models using transient flow generation and measurement devices, and the instantaneous flow rate measured by the flowmeter is collected to form time-series data. Simultaneously, the instantaneous flow rate measured by the transient flow generation and measurement devices themselves is also collected to form time-series data. These time-series data are compiled into a labeled dataset for training the transient flow pattern recognition model. The trained transient flow pattern recognition model is then ported to the flowmeter, endowing it with a transient flow response algorithm. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the hardware structure of the transient flow generation and measurement device of the present invention and its application in flow meter testing. Detailed Implementation

[0046] The invention will now be further described with reference to the accompanying drawings.

[0047] exist Figure 1 The document illustrates the hardware structure of the transient flow generation and measurement device 1 and its related connecting pipes, fluid storage containers, and fluid flow paths used in flow meter testing.

[0048] The transient flow generation and measurement device 1 is a mechatronic system. Its hardware structure comprises a frame 2 that holds a piston cylinder 3, a piston 4, a ball screw 5, a reducer 6, and a servo motor 7, forming a mechanical system.

[0049] The piston cylinder 3 is a hollow cylinder with an inner diameter slightly larger than that of the piston 4. One end of the cylinder is sealed with a flange, and the flange has holes for fluid inlet and outlet. The other end of the cylinder is provided with an annular seal, which forms a sliding seal with the piston 4 that extends into it.

[0050] Piston 4 is a hollow cylinder, precision-machined with a uniform cross-sectional area and a smooth surface. It extends into piston cylinder 3, allowing for low-resistance linear movement within the cylinder. The inner end face of piston 4 within piston cylinder 3 is a sealing surface, while the outer end face is a non-sealing surface. It coaxially engages with ball screw 5, and the nut of ball screw 5 is fixedly mounted on this end face. When piston 4 moves outward from piston cylinder 3, it draws fluid from outside into the cylinder; when piston 4 moves inward from piston cylinder 3, it expels fluid from inside the cylinder. Piston 4 is a measuring element that provides a standard volumetric value. The product of the piston's velocity and its cross-sectional area equals the instantaneous flow rate of the fluid, and the product of the piston's stroke into the cylinder and its cross-sectional area equals the volume of fluid displaced by the piston.

[0051] The ball screw 5 is precision machined to have a uniform lead. One end of the screw passes through the nut and is a free end, extending into the inner cavity of the piston 4. The other end of the screw is a fixed end, which is connected to the output shaft of the reducer 6 to convert the rotational motion of the servo motor 7 into the linear motion of the piston 4.

[0052] The reducer 6 is precision machined to effectively control transmission accuracy and efficiency. The output shaft of the reducer 6 is connected to the fixed end of the ball screw 5, and the input shaft is connected to the main shaft of the servo motor 7. This reduces the speed of the servo motor 7 and transmits the rotational power of the servo motor 7 to the ball screw 5.

[0053] The output end of the rotating spindle of the servo motor 7 is connected to the input shaft of the reducer 6, and the tail end of the rotating spindle is connected to the rotary encoder 8.

[0054] When assembling the mechanical system consisting of piston cylinder 3, piston 4, ball screw 5, reducer 6, and servo motor 7, it is required to ensure good coaxiality and mechanical fit accuracy to ensure that the motion resistance of the mechanical system is as small as possible, the motion is highly stable, and the moving parts do not jam or jump.

[0055] like Figure 1 As shown, the rotary encoder 8, servo driver 9, main controller 10, and host computer 11 in the hardware structure of the transient flow generation and measurement device 1 constitute a measurement and control system, wherein:

[0056] The rotary encoder 8 measures the rotational speed of the servo motor 7 from its spindle and transmits it to the main controller 10 as pulse signals. The pulse frequency output by the rotary encoder 8, divided by its resolution, divided by the reduction ratio of the reducer 6, and multiplied by the lead of the ball screw 5, equals the piston 4's movement speed. The cumulative number of pulses output by the rotary encoder 8, divided by its resolution, divided by the reduction ratio of the reducer 6, and multiplied by the lead of the ball screw 5, equals the piston 4's stroke. To ensure the accuracy of piston speed and distance measurement, the rotary encoder 8 must have a sufficiently high resolution, and the movement distance of the piston 4 represented by each pulse signal must not exceed 5 micrometers.

[0057] The servo driver 9 is connected to the main controller 10 through the communication port, receives control from the main controller 10, converts the motion control commands of the main controller 10 into the rotational speed and rotational position of the servo motor 7, and collects the working status parameters of the servo motor 7 and feeds them back to the main controller 10.

[0058] The main controller 10 is connected to the host computer 11 via a communication port, receives control from the host computer 11, and converts the control parameters issued by the host computer 11 into control commands and transmits them to the servo drive 9. The main controller 10 also acquires the pulse signal of the rotary encoder 8 through the pulse port, and acquires the instantaneous flow and cumulative flow signals or data measured by the external flow meter 15 through the pulse port or the communication port.

[0059] The main controller 10 needs to employ a high-frequency, high-speed microprocessor with a built-in high-precision clock to meet the performance requirements of high real-time performance, low latency, and fast response. During the process of receiving pulse signals from the rotary encoder 8, the main controller 10 applies time stamps to the acquired pulse frequency or cumulative pulse count at a certain interval. When receiving instantaneous or cumulative flow data measured by the flow meter 15, it applies a time stamp to each received instantaneous or cumulative flow data, thus forming a time-series data from all the acquired data. This time-series data is transmitted to the host computer 11 through the communication port.

[0060] like Figure 1As shown, the host computer 11 in the hardware structure of the transient flow generation and measurement device 1 is a general-purpose computer, equipped with control and measurement system software, and serves as the central hub of the entire mechatronics system. The host computer 11 realizes functions such as human-computer interaction, task support, decision control, and data processing through the control and measurement system. Among these, the core modules closely related to this invention are the transient flow generation module, the data processing module, and the transient flow pattern recognition model training module.

[0061] The transient flow generation module generates six basic transient flow models: the open valve flow model. The valve-closed flow model is pulsating flow model Linear increasing flow model Linear decreasing flow model Composite wave flow model Integrated into the control and measurement system software, it forms the core of the algorithm. In use, a single basic transient flow model can be selected, or multiple basic transient flow models can be selected and combined in chronological order to form a combined model. The transient flow generation module automatically processes the transient flow model numerically according to the set parameters, displays the theoretical instantaneous flow rate curve, and converts it into servo motor motion control parameters. These parameters are then sent from the host computer 11 to the main controller 10, which in turn controls the servo driver 9 to drive the servo motor 7 to rotate, pushing the piston 4 to move and discharging the fluid from the piston cylinder 3, thus generating transient flow.

[0062] The data processing module converts the time-series pulse frequency of the rotary encoder 8 uploaded by the main controller 10 into the actual instantaneous flow rate output by the piston 4. It uses a transient flow generation model to fit the instantaneous flow rate as a function of time and displays the instantaneous flow rate curve. This curve is then compared visually with the theoretical instantaneous flow rate curve provided by the model to determine the degree of agreement. A goodness-of-fit index is used to further analyze the data. To evaluate the fitting effect of the actual instantaneous flow curve, where q i For instantaneous flow samples, This is the instantaneous flow rate estimate of the fitted curve. The instantaneous flow rate is the average of the sample values. The theoretical cumulative flow rate is obtained by integrating the transient flow model curve over time. The actual cumulative flow rate output by piston 4 is calculated based on the cumulative pulse count of the time series output by rotary encoder 8 collected by main controller 10. The theoretical cumulative flow rate is subtracted from the actual cumulative flow rate, and the difference is divided by the theoretical cumulative flow rate, expressed as a percentage error. This percentage error is used to evaluate the combined error caused by model numericalization and motion control, and serves as an indicator for improving the model numericalization algorithm and motion control. The data processing module also performs curve fitting on the time series instantaneous flow rate data measured by flowmeter 15 collected by main controller 10 to obtain the instantaneous flow rate curve of the flowmeter. This curve is then compared visually with the actual instantaneous flow rate curve of the transient flow generation and the measuring device itself to evaluate the consistency between the flowmeter's instantaneous flow rate measurement effect and the actual instantaneous flow rate. The data processing module uses a goodness-of-fit index. To evaluate the fitting effect of the instantaneous flow rate curve of the flow meter, where q mi This is a sample of the instantaneous flow rate from the flow meter. This represents the instantaneous flow rate estimate of the fitted curve of the flow meter. This is the average instantaneous flow rate sample of the flow meter. The data processing module compares the cumulative flow rate measured by the flow meter 15, which is acquired by the main controller 10, with the actual cumulative flow rate output by the piston 4. The difference between the two is divided by the actual cumulative flow rate output by the piston 4, and expressed as a percentage relative error, which is used as the transient flow measurement error of the flow meter 15.

[0063] The transient flow pattern recognition model training module, built upon a convolutional neural network (CNN) or recurrent neural network (RNN) model, aims to train a transient flow pattern recognition model for use in flow meters. This allows for pattern recognition of six basic transient flow models, selection of a suitable curve model for fitting, and calculation of the flow meter's cumulative flow using the integral of the fitted curve. The training dataset is generated through repeated testing of various flow meters 15 under different basic transient flows. It uses time-series instantaneous flow data of a certain length collected by the flow meters as input, and the transient flow occurrence and the model of the measuring device itself as responses and comparisons, forming a labeled dataset for pattern recognition model training. The trained model is then ported to the flow meter 15. The training effect can be evaluated using the flow meter's instantaneous flow fitting curve and transient flow measurement error from the aforementioned data processing module.

[0064] like Figure 1As shown, the transient flow generation and measurement device 1 illustrates an example of a practical application. The outlet of the piston cylinder 3 is connected to the fluid storage container 14 via pipe 12 and valve 13a. When valve 13a is open and valve 13b is closed, and the piston 4 moves outward from the piston cylinder 3, as indicated by arrow F1, fluid from the fluid storage container 14 is injected into the piston cylinder 3. The outlet of the piston cylinder 3 is connected to the flow meter 15 via pipe 12 and valve 13b, and the outlet of pipe 12 is connected to the fluid storage container 14. When valve 13b is open and valve 13a is closed, and the piston 4 moves inward from the piston cylinder 3, as indicated by arrow F2, fluid from the piston cylinder 3 is forced out of the cylinder by the piston 4, flows through pipe 12, valve 13b, and flow meter 15, and returns to the fluid storage container 14. The flow state of the fluid is determined by the movement state of the piston 4, which is determined by the transient flow model selected by the transient flow generation module of the host computer 11. During fluid flow, the main controller 10 acquires the pulse signal output by the rotary encoder 8 in real time through the pulse port, and acquires the instantaneous flow rate and cumulative flow rate signals output by the flow meter 15 in real time through the pulse port or communication port. It also applies a time stamp to each acquired data point to form time-series data, which is then transmitted to the host computer 11. The data processing module of the host computer 11 processes the time-series data, outputs a visualized instantaneous flow rate fitting curve of the flow meter, and calculates the transient flow measurement error of the flow meter.

[0065] Of course, the above description of the embodiments of the present invention is given only as illustrative examples, and those skilled in the art can add various modifications without exceeding the protection scope of the present invention. For example: in the embodiment, the main controller 10 can automatically control valves 13a and 13b; the main controller 10 can receive the pulse signal representing the flow rate output by the flow meter 15 through the pulse input port, and can also receive the current signal representing the flow rate output by the flow meter 15 through the current port; temperature measuring instruments or pressure measuring instruments can be installed on the piston cylinder 3, the pipe 12, or the pipes connecting the flow meter 15 before and after, and the temperature or pressure signals can be collected by the main controller 10 or by the host computer 11; the transient flow pattern recognition model of the host computer 11 can also adopt a long short-term memory neural network model (LSTM) or a bidirectional recurrent neural network model (Bi-RNN).

[0066] In particular, without a doubt, unless otherwise stated, the various structural and functional features of each specific embodiment described above should not be regarded as combined or indivisibly connected to each other, but rather as simply juxtaposed.

Claims

1. A transient flow generation and measurement device for testing or training transient flow metering characteristics, comprising a host computer (11), a main controller (10), a servo driver (9), a servo motor (7), a rotary encoder (8), a reducer (6), a ball screw (5), a piston (4), and a piston cylinder (3), characterized in that: The inner end face of the piston (4) extending into the piston cylinder (3) is a sealing surface, and the outer end face of the piston cylinder (3) is a non-sealing surface. It is coaxially engaged with the ball screw (5). The ball screw (5) is connected to the output shaft of the reducer (6) to convert the rotational motion of the servo motor (7) into the linear motion of the piston (4). The input shaft of the reducer (6) is connected to the main shaft of the servo motor (7). The tail end of the rotating main shaft is connected to the rotary encoder (8). The rotary encoder (8) measures the rotational speed of the servo motor (7) from the main shaft of the servo motor (7) and transmits it to the main controller (10) in the form of a pulse signal. The servo driver (9) is connected to the main controller (10) through the communication port, receives the control of the main controller (10), converts the motion control command of the main controller (10) into the rotational speed and rotational position of the servo motor (7), and collects the working status parameters of the servo motor (7) and feeds them back to the main controller (10).

2. The transient flow generation and measurement device as described in claim 1, characterized in that: The main controller (10) applies a time stamp to the collected data during the process of acquiring the pulse signal output by the rotary encoder (8) or the flow signal output by the flow meter under test, forming time series data, and transmits it to the host computer (11).

3. The transient flow generation and measurement device as described in claim 1, characterized in that: The host computer (11) is equipped with a transient flow generation module, a data processing module and a transient flow pattern recognition model training module.

4. The transient flow generation and measurement device as described in claim 3, characterized in that: The transient flow generation module generates six basic transient flow models: The first type is the open-valve flow model. In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, and it is non-negative; q max The upper limit instantaneous flow rate is a non-negative constant parameter; a and b are constant parameters greater than 0, and the valve opening time T is set. o At t=0, q(0)≈0 is satisfied, and the approximate value of b is calculated. At t=T o When q(T) is satisfied o )≈q max The approximate value of a is calculated. The second type is the valve-closed flow model. In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, and it is non-negative; q max The upper limit instantaneous flow rate is a non-negative constant parameter; a and b are constant parameters greater than 0, and the valve closing time T is set. c At t=0, q(0)≈q max The approximate value of b is calculated at t=T c When q(T) is satisfied c )≈0, thus obtaining an approximate value for a; The third type is the pulsating flow model. In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, which is non-negative; q m is the average instantaneous flow rate, a non-negative constant parameter; c is a constant parameter between 0 and 1, when c=0, the model degenerates into a steady flow; T is the pulsation period, a constant parameter greater than 0; The fourth type is the linear increasing flow model. In the formula, q(t) is the instantaneous flow rate of the transient flow; t is the time variable, ranging from 0 to τ. i ;q min The lower limit flow rate at the initial time is incremented; this is a non-negative parameter. max The upper limit flow rate at the incremental end time is a non-negative constant parameter; d is a constant parameter between 0 and 1; τ i A constant parameter that is greater than 0 and represents the incrementing time length. The fifth type is the linear decreasing flow model. In the formula, q(t) is the instantaneous flow rate of the transient flow; t is the time variable, ranging from 0 to τ. d ;q max A non-negative constant parameter q is used to decrease the upper limit flow rate at the initial time. min The lower limit flow rate at the decreasing end time is a non-negative constant parameter; d is a constant parameter between 0 and 1; τ d A constant parameter greater than 0, representing the decreasing time duration; The sixth type is the composite wave flow model. In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, a non-negative number; q0 is the initial instantaneous flow rate of the transient flow at t=0, a non-negative constant parameter; T is the period of the fundamental current when k=1, a constant parameter; q k is the amplitude of the k-th harmonic current, a non-negative constant parameter; n is a positive integer representing the number of synthesized waves.

5. The transient flow generation and measurement device as described in claim 4, characterized in that: The six basic transient flow models can be used individually or combined freely to form combined transient flow models.

6. The transient flow generation and measurement device as described in any one of claims 3-5, characterized in that: The transient flow generation module quantifies the transient flow model and converts it into servo motor motion control parameters, which are then sent from the host computer (11) to the main controller (10). The main controller (10) then controls the servo driver (9) to drive the servo motor (7) to rotate, thereby pushing the piston (4) to move and discharging the fluid in the piston cylinder (3) to generate transient flow. The rotary encoder (8) measures the rotation signal of the servo motor (7) and feeds it back to the main controller (10).

7. The transient flow generation and measurement device as described in any one of claims 3-5, characterized in that: The data processing module performs the following processing: The actual instantaneous flow rate of the transient flow is calculated based on the frequency of the pulse signal output by the time-stamped rotary encoder collected by the main controller (10). The actual instantaneous flow rate curve of the transient flow is fitted according to the transient flow model that occurred, and the goodness-of-fit index is used. To evaluate the fitting effect of the actual instantaneous flow curve, where q i For instantaneous flow samples, This is the instantaneous flow rate estimate of the fitted curve. This represents the average of the instantaneous flow rate samples. The theoretical cumulative flow is calculated by time integration of the transient flow model. The actual cumulative flow of the transient flow is calculated based on the cumulative number of pulses of the pulse signal output by the time-marked rotary encoder collected by the main controller (10). The difference between the actual cumulative flow and the theoretical cumulative flow is divided by the theoretical cumulative flow to obtain the comprehensive error caused by the numericalization of the transient flow model and motion control. Based on the flow signal output by the tested flowmeter with time stamp acquired by the main controller (10), the actual instantaneous flow curve of the tested flowmeter is fitted according to the transient flow model that occurred, and the goodness-of-fit index is used. To evaluate the fitting effect of the instantaneous flow rate curve of the flow meter, where q mi This is a sample of the instantaneous flow rate from the flow meter. This represents the instantaneous flow rate estimate of the fitted curve of the flow meter. The instantaneous flow rate sample mean of the flow meter. The cumulative flow of the flow meter is calculated based on the flow signal output by the flow meter under test with time stamp collected by the main controller (10). The actual cumulative flow of the transient flow is subtracted from the cumulative flow of the flow meter and divided by the actual cumulative flow of the transient flow to obtain the transient flow measurement error of the flow meter under test.

8. The transient flow generation and measurement device as described in claim 3, characterized in that: The transient flow pattern recognition model training module is built using a convolutional neural network (CNN), recurrent neural network (RNN), long short-term memory neural network (LSTM), or bidirectional recurrent neural network (Bi-RNN) model. It uses a time-series-based labeled dataset to train the transient flow pattern recognition model for the flow meter, and the trained transient flow pattern recognition model is then transferred to the flow meter.

9. A method for modeling and generating transient flows, characterized in that: Define six basic transient flow models, including: Open valve flow model, In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, which is non-negative; q max The upper limit instantaneous flow rate is a non-negative constant parameter; a and b are constant parameters greater than 0, and the valve opening time T is set. o At t=0, q(0)≈0 is satisfied, and the approximate value of b is calculated. At t=T o When q(T) is satisfied o )≈q max The approximate value of a is calculated. Valve-closed flow model In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, which is non-negative; q max The upper limit instantaneous flow rate is a non-negative constant parameter; a and b are constant parameters greater than 0, and the valve closing time T is set. c At t=0, q(0)≈q max The approximate value of b is calculated at t=T c When q(T) is satisfied c )≈0, thus obtaining an approximate value for a; Pulsating flow model In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, which is non-negative; q m is the average instantaneous flow rate, a non-negative constant parameter; c is a constant parameter between 0 and 1, when c=0, the model degenerates into a steady flow; T is the pulsation period, a constant parameter greater than 0; Linear increasing flow model, In the formula, q(t) is the instantaneous flow rate of the transient flow; t is the time variable, ranging from 0 to τ. i ;q min The lower limit flow rate at the initial time is incremented; this is a non-negative parameter. max The upper limit flow rate at the incremental end time is a non-negative constant parameter; d is a constant parameter between 0 and 1; τ i A constant parameter that is greater than 0 and represents the incrementing time length. Linear decreasing flow model, In the formula, q(t) is the instantaneous flow rate of the transient flow; t is the time variable, ranging from 0 to τ. d ;q max A non-negative constant parameter q is used to decrease the upper limit flow rate at the initial time. min The lower limit flow rate at the decreasing end time is a non-negative constant parameter; d is a constant parameter between 0 and 1; τ d A constant parameter greater than 0, representing the decreasing time duration; Composite wave flow model, In the formula, q(t) is the instantaneous flow rate of the transient flow; t is a time variable, a non-negative number; q0 is the initial instantaneous flow rate of the transient flow at t=0, a non-negative constant parameter; T is the period of the fundamental current at k=1, a constant parameter greater than 0; q k is the amplitude of the k-th harmonic current, a non-negative constant parameter; n is a positive integer representing the number of synthesized waves; The transient flow is generated individually or by free combination of the six basic transient flow models.