A BP neural network-based ultrasonic flowmeter correction device, method and system

By combining a BP neural network with a sensor unit and a standard flow meter, the automatic correction of the ultrasonic flow meter is achieved, which solves the measurement error problem of the ultrasonic flow meter under complex working conditions and improves measurement accuracy and production efficiency.

CN117309077BActive Publication Date: 2026-06-12LANGFANG ENN GAS EQUIP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LANGFANG ENN GAS EQUIP
Filing Date
2023-09-26
Publication Date
2026-06-12

Smart Images

  • Figure CN117309077B_ABST
    Figure CN117309077B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on BP neural network's ultrasonic flowmeter correction device, method and system, method includes: by standard flowmeter and ultrasonic flowmeter simultaneously detect instantaneous flow, simultaneously measure influence factor variable value;The measured data is normalized, and neuron is initialized;Based on the feedback learning mechanism of BP neural network, according to instantaneous flow actual value, instantaneous flow measured value and influence factor variable value are autonomously learned training;When reaching preset error rate or meeting preset learning number, training is completed, and model parameters are saved;Model parameters are loaded to ultrasonic flowmeter, and the correction of ultrasonic flowmeter is completed.Through the technical scheme of the application, the nonlinear, irregular measurement error caused by the change of the coupling of multiple factors can be corrected, which is suitable for complex working conditions, and the correction calibration process does not require manual intervention, fully automatic fitting, greatly improves production efficiency and saves cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of measurement technology, and in particular to an ultrasonic flowmeter correction device based on a BP neural network, an ultrasonic flowmeter correction method based on a BP neural network, and an ultrasonic flowmeter correction system based on a BP neural network. Background Technology

[0002] With the development of ultrasonic metering technology, ultrasonic flow meters have gradually replaced traditional mechanical flow meters such as orifice plate flow meters and turbine flow meters. Ultrasonic flow metering uses ultrasonic signals as a sensing medium, applied to the measured medium, and reflects the flow rate information of the measured gas through the time-of-flight of the ultrasonic signal. Compared with traditional flow metering devices, ultrasonic flow metering offers higher accuracy and a wider range; it is a non-contact measurement method, characterized by no wear and tear and less susceptibility to external vibration environments, making it highly adaptable. Ultrasonic metering technology has significant advantages in flow measurement and is becoming the mainstream product in the flow metering market.

[0003] The time-of-flight method is the primary measurement method for ultrasonic flowmeters. However, because the time difference in measurement is on the nanosecond scale, the echo signal in the gas is affected by factors such as high and low temperatures and pressure. Drift errors will affect the measurement results. Therefore, the correction method becomes a key challenge in the production process of ultrasonic flowmeters.

[0004] 1) In the past, ultrasonic flow meters did not take into account changes in factors such as high temperature, low temperature, pressure, and pipe diameter, resulting in measurement errors that did not meet national standards, and their application was limited to standard working conditions.

[0005] 2) Alternatively, to correct errors caused by changes in a single factor, a large amount of data is collected manually and the data is fitted and compensated on a PC. This is time-consuming, labor-intensive, and has low output efficiency.

[0006] 3) There is no good solution when multiple factors change in combination. Summary of the Invention

[0007] To address the aforementioned problems, this invention provides a method and system for correcting ultrasonic flow meters based on a BP neural network. The BP neural network autonomously learns and corrects the instantaneous flow measurement of the ultrasonic flow meter based on the actual instantaneous flow value measured by a standard flow meter. Simultaneously, the influencing factor variables detected by the sensor unit are introduced into the correction process. The trained BP neural network model parameters are loaded into the corresponding ultrasonic flow meter, thereby correcting the ultrasonic flow meter. This method can correct nonlinear and irregular measurement errors caused by the coupling and change of multiple factors. It is suitable for complex working environments, and the correction, calibration, and standardization process requires no manual intervention, achieving fully automatic fitting, greatly improving production efficiency, and saving costs.

[0008] To achieve the above objectives, the present invention provides an ultrasonic flow meter correction device based on a BP neural network, comprising an ultrasonic flow meter and a standard flow meter, wherein the ultrasonic flow meter and the standard flow meter are connected in series in the same area of ​​the same fluid transport channel.

[0009] The ultrasonic flow meter includes a metering unit, a sensor unit, and a control unit. The metering unit and the standard flow meter are used to simultaneously detect the instantaneous flow rate of the fluid in the fluid delivery channel. The metering unit is used to transmit the detected instantaneous flow rate measurement value to the control unit. The standard flow meter is used to transmit the detected instantaneous flow rate actual value to the control unit through a communication bus. The sensor unit is used to detect the value of a preset type of influencing factor variable.

[0010] The control unit is used to obtain the correction matrix of the ultrasonic flow meter by autonomous learning using a BP neural network based on the instantaneous flow measurement value, the influencing factor variable value, and the actual instantaneous flow value, thereby realizing the data correction of the ultrasonic flow meter.

[0011] In the above technical solution, preferably, the sensor unit includes a temperature sensor, a pressure sensor and a gas sensor, and the influencing factor variable values ​​detected by the sensor unit include temperature variable values, pressure variable values ​​and gas composition.

[0012] This invention also proposes a BP neural network-based ultrasonic flowmeter correction method, applicable to the BP neural network-based ultrasonic flowmeter correction device disclosed in any of the above technical solutions, comprising:

[0013] The instantaneous flow rate of the fluid in the fluid delivery channel is detected simultaneously by a standard flow meter and an ultrasonic flow meter, while the value of the corresponding type of influencing factor variable is measured by a sensor unit.

[0014] The actual instantaneous flow rate and the measured instantaneous flow rate obtained from a preset number of measurements are normalized, and the neurons of the BP neural network are initialized.

[0015] Based on the feedback learning mechanism of the BP neural network, autonomous learning training is performed according to the actual instantaneous flow rate, the measured instantaneous flow rate, and the values ​​of the influencing factor variables.

[0016] Training is completed when the self-learning result reaches a preset error rate or meets a preset number of learning iterations compared to the actual instantaneous flow rate, and the model parameters of the BP neural network are saved.

[0017] The model parameters are loaded into the ultrasonic flow meter to complete the correction of the ultrasonic flow meter.

[0018] In the above technical solution, preferably, the sensor unit includes a temperature sensor, a pressure sensor and a gas sensor, and the corresponding type of influencing factor variable values ​​measured by the sensor unit include temperature variable values, pressure variable values ​​and gas composition.

[0019] In the above technical solution, preferably, the specific process of normalizing the actual instantaneous flow rate value and the instantaneous flow rate measurement value obtained from measuring a preset number of times, and initializing the neurons of the BP neural network includes:

[0020] The actual instantaneous flow rate and the measured instantaneous flow rate are normalized using the following formula (1), and the data is initialized to the range of 0 to 1:

[0021] Xn=(d_in[i]-MinData+b) / (MaxData-MinData+b) Formula (1)

[0022] Wherein, MinData is the maximum value in the dataset of the actual instantaneous flow rate or the measured instantaneous flow rate, MinData is the minimum value in the dataset of the actual instantaneous flow rate or the measured instantaneous flow rate, b is an arbitrary constant, d_in[i] is the input dataset, and Xn is the output result;

[0023] The BP neural network is initialized using the following formula (2), and the weight data is initialized to the interval of -1 to 1:

[0024] Wn=((double) rand()*2 / RAND_MAX-1) / 2 Formula (2)

[0025] Here, rand() generates a random number, and RAND_MAX is the maximum value among the random numbers.

[0026] In the above technical solution, preferably, the feedback learning mechanism based on the BP neural network, the specific process of autonomous learning and training according to the actual instantaneous flow rate, the measured instantaneous flow rate, and the influencing factor variable values ​​includes:

[0027] The instantaneous flow measurement value and the influencing factor variable value are weighted and accumulated using formula (3), and then the sigmoid activation function formula (4) is used to generate a stimulus, which is transmitted to the next layer of connected neurons, and so on to generate the prediction result Y. j ;

[0028]

[0029]

[0030] Wherein, Wn represents the weight of the neural unit in the BP neural network;

[0031] The difference between the predicted result Yj and the actual instantaneous flow rate dj is calculated as the error value E. Based on the error value, the final error of the neural unit weights of the BP neural network is calculated according to formula (5). And according to formula (6), the final error is multiplied by the learning rate to obtain the corrected weight △W:

[0032]

[0033]

[0034] Wherein, dj is the actual instantaneous flow rate value detected by the standard flow meter.

[0035] This invention also proposes an ultrasonic flowmeter correction system based on a BP neural network, applying the ultrasonic flowmeter correction method based on a BP neural network disclosed in any of the above technical solutions, including:

[0036] The data detection module is used to simultaneously detect the instantaneous flow rate of the fluid in the fluid delivery channel by a standard flow meter and an ultrasonic flow meter, while the sensor unit measures the values ​​of corresponding influencing factor variables.

[0037] The data processing module is used to normalize the actual instantaneous flow rate and the instantaneous flow rate measurement value obtained from a preset number of measurements, and to initialize the neurons of the BP neural network.

[0038] The model training module is used to perform autonomous learning training based on the feedback learning mechanism of the BP neural network, according to the actual instantaneous flow rate, the measured instantaneous flow rate, and the values ​​of the influencing factor variables.

[0039] The parameter saving module is used to complete training and save the model parameters of the BP neural network when the self-learning result reaches a preset error rate or meets a preset number of learning times compared with the actual instantaneous flow rate.

[0040] The device correction module is used to load the model parameters into the ultrasonic flow meter to complete the correction of the ultrasonic flow meter.

[0041] In the above technical solution, preferably, the sensor unit includes a temperature sensor, a pressure sensor and a gas sensor, and the corresponding type of influencing factor variable values ​​measured by the sensor unit include temperature variable values, pressure variable values ​​and gas composition.

[0042] In the above technical solution, preferably, the data processing module is specifically used for:

[0043] The actual instantaneous flow rate and the measured instantaneous flow rate are normalized using the following formula (1), and the data is initialized to the range of 0 to 1:

[0044] Xn=(d_in[i]-MinData+b) / (MaxData-MinData+b) Formula (1)

[0045] Wherein, MinData is the maximum value in the dataset of the actual instantaneous flow rate or the measured instantaneous flow rate, MinData is the minimum value in the dataset of the actual instantaneous flow rate or the measured instantaneous flow rate, b is an arbitrary constant, d_in[i] is the input dataset, and Xn is the output result;

[0046] The BP neural network is initialized using the following formula (2), and the weight data is initialized to the interval of -1 to 1:

[0047] Wn=((double) rand()*2 / RAND_MAX-1) / 2 Formula (2)

[0048] Here, rand() generates a random number, and RAND_MAX is the maximum value among the random numbers.

[0049] In the above technical solution, preferably, the model training module is specifically used for:

[0050] The instantaneous flow measurement value and the influencing factor variable value are weighted and accumulated using formula (3), and then the sigmoid activation function formula (4) is used to generate a stimulus, which is transmitted to the next layer of connected neurons, and so on to generate the prediction result Y. j ;

[0051]

[0052]

[0053] Wherein, Wn represents the weight of the neural unit in the BP neural network;

[0054] The difference between the predicted result Yj and the actual instantaneous flow rate dj is calculated as the error value E. Based on the error value, the final error of the neural unit weights of the BP neural network is calculated according to formula (5). And according to formula (6), the final error is multiplied by the learning rate to obtain the corrected weight △W:

[0055]

[0056]

[0057] Wherein, dj is the actual instantaneous flow rate value detected by the standard flow meter.

[0058] Compared with the prior art, the beneficial effects of the present invention are as follows: the instantaneous flow measurement value measured by the ultrasonic flow meter is autonomously learned and corrected by the BP neural network based on the actual instantaneous flow value measured by the standard flow meter. At the same time, the influencing factor variable values ​​detected by the sensor unit are introduced into the correction process. The model parameters of the trained BP neural network are loaded into the corresponding ultrasonic flow meter to realize the correction of the ultrasonic flow meter. It can correct the nonlinear and irregular measurement error caused by the coupling change of multiple factors. It is suitable for complex working environments. Moreover, the correction calibration process does not require manual intervention, and the fully automatic fitting greatly improves production efficiency and saves costs. Attached Figure Description

[0059] Figure 1 This is a schematic diagram of the structure of an ultrasonic flowmeter correction device based on a BP neural network, as disclosed in one embodiment of the present invention.

[0060] Figure 2 This is a flowchart illustrating an ultrasonic flow meter correction method based on a BP neural network, as disclosed in one embodiment of the present invention.

[0061] Figure 3 This is a logical block diagram of an ultrasonic flowmeter correction method based on a BP neural network disclosed in one embodiment of the present invention;

[0062] Figure 4 This is a schematic diagram of a BP neural network model disclosed in one embodiment of the present invention;

[0063] Figure 5 This is a schematic diagram of a module of an ultrasonic flowmeter correction system based on a BP neural network, as disclosed in one embodiment of the present invention.

[0064] In the diagram, the correspondence between the components and the reference numerals is as follows:

[0065] 100. Ultrasonic flow meter; 101. Standard flow meter; 102. Metering unit; 103. Control unit; 104. Sensor unit;

[0066] 1. Data detection module, 2. Data processing module, 3. Model training module, 4. Parameter storage module, 5. Device correction module. Detailed Implementation

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

[0068] The present invention will now be described in further detail with reference to the accompanying drawings:

[0069] like Figure 1 As shown, an ultrasonic flow meter correction device based on a BP neural network according to the present invention includes an ultrasonic flow meter 100 and a standard flow meter 101, which are connected in series in the same area of ​​the same fluid transport channel.

[0070] The ultrasonic flow meter 100 includes a metering unit 102, a sensor unit 104, and a control unit 103. The metering unit 102 and the standard flow meter 101 are used to simultaneously detect the instantaneous flow rate of the fluid in the fluid delivery channel. The metering unit 102 is used to transmit the detected instantaneous flow rate measurement value to the control unit 103. The standard flow meter 101 is used to transmit the detected instantaneous flow rate actual value to the control unit 103 through a communication bus. The sensor unit 104 is used to detect the value of a preset type of influencing factor variable.

[0071] The control unit 103 is used to obtain the correction matrix of the ultrasonic flow meter 100 by autonomous learning using a BP neural network based on the instantaneous flow measurement value, the influencing factor variable value and the actual instantaneous flow value, thereby realizing the data correction of the ultrasonic flow meter 100.

[0072] In this embodiment, the metering unit 102 is specifically used to generate an excitation signal to drive the ultrasonic transducer to emit an ultrasonic signal, and is able to receive and process ultrasonic echo signals generated by the ultrasonic waves upstream and downstream of the fluid in the fluid transport channel, and calculate the instantaneous flow rate based on the time difference between the upstream ultrasonic signal and the downstream ultrasonic echo signal.

[0073] In this embodiment, the ultrasonic flow meter 100 is the object to be corrected, and its measured instantaneous flow rate is used as the instantaneous flow rate measurement value. The standard flow meter 101 is a calibrated flow meter that can perform standard flow rate detection, which can determine whether the performance of the calibrated or corrected flow meter is qualified, and its measured instantaneous flow rate is used as the actual flow rate value of the current fluid transport pipeline.

[0074] The control unit 103 consists of an embedded ARM chip and peripheral control circuitry. It acquires the instantaneous flow rate measurement value from the metering unit 102, the influencing factor variable values ​​measured by the sensor unit 104, and the actual instantaneous flow rate value measured by the standard flow meter 101 via a data bus. The embedded ARM chip incorporates a BP neural network algorithm, which trains and corrects the matrix through autonomous learning to obtain the final measurement value. Furthermore, NB-IoT or 4G communication technologies can be used to upload the final measurement value to an IoT cloud platform.

[0075] In the above embodiment, preferably, the sensor unit 104 includes a temperature sensor, a pressure sensor, and a gas sensor. The influencing factor variables detected by the sensor unit 104 correspond to temperature variable values, pressure variable values, and gas composition. The gas sensor is used to measure the flow rate of gas as a fluid, and detects the gas composition, such as oxygen, hydrogen, methane, etc.

[0076] During implementation, depending on the influencing factors in the measurement scenario where the ultrasonic flow meter 100 is located, different types of sensors can be added to correct the degree of influence of different influencing factors on the measurement results of the ultrasonic flow meter 100.

[0077] like Figure 2 and Figure 3 As shown, the present invention also proposes an ultrasonic flowmeter correction method based on a BP neural network, applied to the ultrasonic flowmeter correction device based on a BP neural network disclosed in any of the above embodiments, comprising:

[0078] The instantaneous flow rate of the fluid in the fluid delivery channel is simultaneously detected by a standard flow meter 101 and an ultrasonic flow meter 100, while the corresponding type of influencing factor variable value is measured by a sensor unit 104.

[0079] The actual instantaneous flow rate and the measured instantaneous flow rate obtained from a preset number of measurements are normalized, and the neurons of the BP neural network are initialized.

[0080] The feedback learning mechanism based on BP neural network performs autonomous learning and training based on the actual instantaneous flow rate, the instantaneous flow rate measurement value, and the values ​​of influencing factor variables.

[0081] Training is completed when the self-learning result reaches a preset error rate or meets a preset number of learning iterations compared to the actual instantaneous flow rate, and the model parameters of the BP neural network are saved.

[0082] The model parameters are loaded into the ultrasonic flow meter 100 to complete the correction of the ultrasonic flow meter 100.

[0083] In this embodiment, the instantaneous flow measurement value measured by the ultrasonic flow meter 100 is autonomously learned and corrected based on the actual instantaneous flow value measured by the standard flow meter 101 using a BP neural network. At the same time, the influencing factor variables detected by the sensor unit 104 are introduced into the correction process. The model parameters of the trained BP neural network are loaded into the corresponding ultrasonic flow meter 100 to correct the ultrasonic flow meter 100. This can correct nonlinear and irregular measurement errors caused by the coupling and change of multiple factors. It is suitable for complex working environments, and the correction calibration process does not require manual intervention. It is fully automatic, greatly improves production efficiency, and saves costs.

[0084] Specifically, in the control unit 103, based on the multivariate data acquired by the standard flow meter 101, ultrasonic flow meter 100 and sensor unit 104, a BP neural network is used for autonomous learning to obtain the correction matrix of the ultrasonic flow meter 100 measurement value.

[0085] like Figure 4 As shown, in this BP neural network, the input layer transmits stimuli to the hidden layer. The hidden layer then transmits the stimuli to the output layer based on the strength (weights) of the connections between neurons and the transmission rules (activation function). The output layer processes the stimuli processed by the hidden layer to produce the final result. If a correct result is found, it is compared with the generated result to obtain the error. This error is then used to correct the connection weights in the neural network, thus completing the learning process. By employing a backfeedback learning mechanism to correct the weights in the neural network, the correct measurement result is ultimately output.

[0086] In the above embodiment, preferably, the sensor unit 104 includes a temperature sensor, a pressure sensor, and a gas sensor. The sensor unit 104 measures the corresponding type of influencing factor variable values, including temperature variable values, pressure variable values, and gas composition. The gas sensor is used to measure the flow rate of gas as a fluid, and detects the gas composition, such as oxygen, hydrogen, methane, etc.

[0087] During implementation, depending on the influencing factors in the measurement scenario where the ultrasonic flow meter 100 is located, different types of sensors can be added to obtain the corresponding influencing factor measurement values, which can be used to correct the degree of influence of different influencing factors on the measurement results of the ultrasonic flow meter 100.

[0088] In the above embodiments, preferably, the specific process of normalizing the actual instantaneous flow rate value and the instantaneous flow rate measurement value obtained by measuring a preset number of times, and initializing the neurons of the BP neural network includes:

[0089] The following formula (1) is used to normalize the actual instantaneous flow rate and the measured instantaneous flow rate, and the data is initialized to the range of 0 to 1:

[0090] Xn=(d_in[i]-MinData+b) / (MaxData-MinData+b) Formula (1)

[0091] Wherein, MinData is the maximum value in the dataset of instantaneous flow actual values ​​or instantaneous flow measurement values, MinData is the minimum value in the dataset of instantaneous flow actual values ​​or instantaneous flow measurement values, b is an arbitrary constant, d_in[i] is the input dataset, and Xn is the output result;

[0092] The BP neural network is initialized using the following formula (2), and the weight data is initialized to the interval of -1 to 1:

[0093] Wn=((double) rand()*2 / RAND_MAX-1) / 2 Formula (2)

[0094] Here, rand() generates a random number, and RAND_MAX is the maximum value among the random numbers.

[0095] Specifically, in a BP neural network, the output of biological neurons is sensitive to data between 0 and 1, which helps improve the efficiency of self-learning. Therefore, the above-mentioned data normalization process is very necessary.

[0096] In the above embodiments, preferably, the specific process of autonomous learning training based on the feedback learning mechanism of the BP neural network, according to the actual instantaneous flow rate, the instantaneous flow rate measurement value, and the influencing factor variable values, includes:

[0097] Formula (3) is used to weight and accumulate the instantaneous flow measurement value and the influencing factor variable value (weight Wn) to generate Y. n Then, the sigmoid activation function formula (4) is used to generate stimulus Y. j The information is then transmitted to the next connected neuron, and so on, to produce the prediction result.

[0098]

[0099]

[0100] Where Wn is the weight of the neural unit in the BP neural network, Xn is the instantaneous flow measurement value or the value of the influencing factor variable, such as X1 being the instantaneous flow measurement value, X2 being the temperature variable value, and X3 being the pressure variable value, and the corresponding W1, W2, and W3 are the weights of the above values ​​respectively.

[0101] The difference between the predicted result Yj and the actual instantaneous flow rate dj is calculated as the error value E. Based on the error value, the final error of the weights of the neural units in the BP neural network is calculated according to formula (5). And according to formula (6), the final error is multiplied by the learning rate I to obtain the corrected weight ΔW:

[0102]

[0103]

[0104] Where, d j The actual instantaneous flow rate value obtained by standard flow meter 101.

[0105] In the above implementation, it is determined whether the result of the neural network after self-learning and the actual instantaneous flow value of the standard flow meter 101 meet the preset error rate (such as an error rate of 0.01) or the preset number of learning times (such as more than 1000 times). If either of the two conditions is met, the training is completed; otherwise, it returns to continue executing formulas (3) to (6).

[0106] The parameters of the trained BP neural network model are stored in a non-volatile flash memory chip. The ultrasonic flow meter 100 will load these model parameters each time it is powered on to complete the correction of the ultrasonic flow meter 100.

[0107] like Figure 5 As shown, the present invention also proposes an ultrasonic flowmeter correction system based on a BP neural network, which applies the ultrasonic flowmeter correction method based on a BP neural network disclosed in any of the above embodiments, including:

[0108] The data detection module 1 is used to simultaneously detect the instantaneous flow rate of the fluid in the fluid delivery channel by the standard flow meter 101 and the ultrasonic flow meter 100, and at the same time, the sensor unit 104 measures the values ​​of the corresponding type of influencing factor variables.

[0109] Data processing module 2 is used to normalize the actual instantaneous flow rate and the instantaneous flow rate measurement value obtained from a preset number of measurements, and to initialize the neurons of the BP neural network.

[0110] Model training module 3 is used for feedback learning mechanism based on BP neural network to perform autonomous learning training based on the actual value of instantaneous flow, the measured value of instantaneous flow and the value of influencing factor variables;

[0111] The parameter saving module 4 is used to complete the training and save the model parameters of the BP neural network when the self-learning result reaches a preset error rate or meets a preset number of learning times compared with the actual instantaneous flow rate.

[0112] Device correction module 5 is used to load model parameters into ultrasonic flow meter 100 to complete the correction of ultrasonic flow meter 100.

[0113] In this embodiment, the instantaneous flow measurement value measured by the ultrasonic flow meter 100 is autonomously learned and corrected based on the actual instantaneous flow value measured by the standard flow meter 101 using a BP neural network. At the same time, the influencing factor variables detected by the sensor unit 104 are introduced into the correction process. The model parameters of the trained BP neural network are loaded into the corresponding ultrasonic flow meter 100 to correct the ultrasonic flow meter 100. This can correct nonlinear and irregular measurement errors caused by the coupling and change of multiple factors. It is suitable for complex working environments, and the correction calibration process does not require manual intervention. It is fully automatic, greatly improves production efficiency, and saves costs.

[0114] In the above embodiments, preferably, the sensor unit 104 includes a temperature sensor, a pressure sensor and a gas sensor, and the corresponding type of influencing factor variable values ​​measured by the sensor unit 104 include temperature variable values, pressure variable values ​​and gas composition.

[0115] In the above embodiments, preferably, the data processing module 2 is specifically used for:

[0116] The following formula (1) is used to normalize the actual instantaneous flow rate and the measured instantaneous flow rate, and the data is initialized to the range of 0 to 1:

[0117] Xn=(d_in[i]-MinData+b) / (MaxData-MinData+b) Formula (1)

[0118] Wherein, MinData is the maximum value in the dataset of instantaneous flow actual values ​​or instantaneous flow measurement values, MinData is the minimum value in the dataset of instantaneous flow actual values ​​or instantaneous flow measurement values, b is an arbitrary constant, d_in[i] is the input dataset, and Xn is the output result;

[0119] The BP neural network is initialized using the following formula (2), and the weight data is initialized to the interval of -1 to 1:

[0120] Wn=((double) rand()*2 / RAND_MAX-1) / 2 Formula (2)

[0121] Here, rand() generates a random number, and RAND_MAX is the maximum value among the random numbers.

[0122] In the above embodiments, preferably, the model training module 3 is specifically used for:

[0123] Formula (3) is used to weight and accumulate the instantaneous flow measurement value and the influencing factor variable value (weight Wn) to generate Y. n Then, the sigmoid activation function formula (4) is used to generate stimulus Y. j The information is then transmitted to the next connected neuron, and so on, to produce the prediction result.

[0124]

[0125]

[0126] Where Wn represents the weights of the neural units in the BP neural network;

[0127] The difference between the predicted result Yj and the actual instantaneous flow rate dj is calculated as the error value E. Based on the error value, the final error of the weights of the neural units in the BP neural network is calculated according to formula (5). And according to formula (6), the final error is multiplied by the learning rate I to obtain the corrected weight ΔW:

[0128]

[0129]

[0130] Where, d j The actual instantaneous flow rate value obtained by standard flow meter 101.

[0131] The ultrasonic flow meter correction system based on BP neural network disclosed in the above embodiments has the same functions implemented by each module as the steps of the ultrasonic flow meter correction method based on BP neural network disclosed in the above embodiments. In the implementation process, the above method is referred to, and will not be repeated here.

[0132] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A correction method for an ultrasonic flowmeter based on a BP neural network, characterized in that, include: The instantaneous flow rate of the fluid in the fluid delivery channel is detected simultaneously by a standard flow meter and an ultrasonic flow meter, while the value of the corresponding type of influencing factor variable is measured by a sensor unit. The actual instantaneous flow rate and the measured instantaneous flow rate obtained from a preset number of measurements are normalized, and the neurons of the BP neural network are initialized. The specific process includes: The actual instantaneous flow rate and the measured instantaneous flow rate are normalized using the following formula (1), and the data is initialized to the range of 0 to 1: Xn=(d_in[i]-MinData+b) / (MaxData-MinData+b) Formula (1) Where MaxData is the maximum value in the dataset of the actual instantaneous flow rate or the measured instantaneous flow rate, MinData is the minimum value in the dataset of the actual instantaneous flow rate or the measured instantaneous flow rate, b is an arbitrary constant, d_in[i] is the input dataset, and Xn is the output result; The BP neural network is initialized using the following formula (2), and the weight data is initialized to the interval of -1 to 1: Wn=((double) rand()*2 / RAND_MAX-1) / 2 Formula (2) Where rand() generates a random number, and RAND_MAX is the maximum value among the random numbers; Based on the feedback learning mechanism of the BP neural network, autonomous learning training is performed according to the actual instantaneous flow rate, the measured instantaneous flow rate, and the values ​​of the influencing factor variables. The specific process includes: The instantaneous flow measurement value and the influence factor variable value are weighted and accumulated by using formula (3), and a stimulus is generated by using a Sigmoid activation function formula (4) and transmitted to the neurons connected to the next layer, and the prediction result Y is generated by analogy j ; Official (3); Official (4); Wherein, Wn represents the weight of the neural unit in the BP neural network; The difference between the predicted result Yj and the actual instantaneous flow rate dj is calculated as the error value E. Based on the error value, the final error of the weights of the neural units in the BP neural network is calculated according to formula (5), and the final error is multiplied by the learning rate I according to formula (6) to obtain the corrected weight ΔW: Official (5); Official (6); Wherein, dj is the actual instantaneous flow rate value detected by the standard flow meter; Training is completed when the self-learning result reaches a preset error rate or meets a preset number of learning iterations compared to the actual instantaneous flow rate, and the model parameters of the BP neural network are saved. The model parameters are loaded into the ultrasonic flow meter to complete the correction of the ultrasonic flow meter.

2. The ultrasonic flowmeter correction method based on BP neural network according to claim 1, characterized in that, The sensor unit includes a temperature sensor, a pressure sensor, and a gas sensor. The corresponding influencing factor variable values ​​measured by the sensor unit include temperature variable values, pressure variable values, and gas composition.

3. The ultrasonic flowmeter correction method based on a BP neural network according to claim 1, characterized in that, The ultrasonic flow meter and the standard flow meter are connected in series in the same area of ​​the same fluid delivery channel; The ultrasonic flow meter includes a metering unit, a sensor unit, and a control unit. The metering unit and the standard flow meter are used to simultaneously detect the instantaneous flow rate of the fluid in the fluid delivery channel. The metering unit is used to transmit the detected instantaneous flow rate measurement value to the control unit. The standard flow meter is used to transmit the detected instantaneous flow rate actual value to the control unit through a communication bus. The sensor unit is used to detect the value of a preset type of influencing factor variable. The control unit is used to obtain the correction matrix of the ultrasonic flow meter by autonomous learning using a BP neural network based on the instantaneous flow measurement value, the influencing factor variable value, and the actual instantaneous flow value, thereby realizing the data correction of the ultrasonic flow meter.

4. The ultrasonic flowmeter correction method based on a BP neural network according to claim 3, characterized in that, The sensor unit includes a temperature sensor, a pressure sensor, and a gas sensor. The influencing factor variables detected by the sensor unit correspond to temperature variable values, pressure variable values, and gas composition.

5. An ultrasonic flowmeter correction system based on a BP neural network, characterized in that, The ultrasonic flowmeter correction method based on a BP neural network as described in any one of claims 1 to 4 includes: The data detection module is used to simultaneously detect the instantaneous flow rate of the fluid in the fluid delivery channel by a standard flow meter and an ultrasonic flow meter, while the sensor unit measures the values ​​of corresponding influencing factor variables. The data processing module is used to normalize the actual instantaneous flow rate and the instantaneous flow rate measurement value obtained from a preset number of measurements, and to initialize the neurons of the BP neural network. The model training module is used to perform autonomous learning training based on the feedback learning mechanism of the BP neural network, according to the actual instantaneous flow rate, the measured instantaneous flow rate, and the values ​​of the influencing factor variables. The parameter saving module is used to complete training and save the model parameters of the BP neural network when the self-learning result reaches a preset error rate or meets a preset number of learning times compared with the actual instantaneous flow rate. The device correction module is used to load the model parameters into the ultrasonic flow meter to complete the correction of the ultrasonic flow meter.

6. The ultrasonic flowmeter correction system based on a BP neural network according to claim 5, characterized in that, The sensor unit includes a temperature sensor, a pressure sensor, and a gas sensor. The corresponding influencing factor variable values ​​measured by the sensor unit include temperature variable values, pressure variable values, and gas composition.

7. The ultrasonic flowmeter correction system based on a BP neural network according to claim 6, characterized in that, The data processing module is specifically used for: The actual instantaneous flow rate and the measured instantaneous flow rate are normalized using the following formula (1), and the data is initialized to the range of 0 to 1: Xn=(d_in[i]-MinData+b) / (MaxData-MinData+b) Formula (1) Where MaxData is the maximum value in the dataset of the actual instantaneous flow rate or the measured instantaneous flow rate, MinData is the minimum value in the dataset of the actual instantaneous flow rate or the measured instantaneous flow rate, b is an arbitrary constant, d_in[i] is the input dataset, and Xn is the output result; The BP neural network is initialized using the following formula (2), and the weight data is initialized to the interval of -1 to 1: Wn=((double) rand()*2 / RAND_MAX-1) / 2 Formula (2) Here, rand() generates a random number, and RAND_MAX is the maximum value among the random numbers.

8. The ultrasonic flowmeter correction system based on a BP neural network according to claim 7, characterized in that, The model training module is specifically used for: The instantaneous flow measurement value and the influencing factor variable value are weighted and accumulated using formula (3), and then the sigmoid activation function formula (4) is used to generate a stimulus, which is transmitted to the next layer of connected neurons, and so on to generate the prediction result Y. j ; Official (3); Official (4); Wherein, Wn represents the weight of the neural unit in the BP neural network; The difference between the predicted result Yj and the actual instantaneous flow rate dj is calculated as the error value E. Based on the error value, the final error of the neural unit weights of the BP neural network is calculated according to formula (5). And according to formula (6), the final error is multiplied by the learning rate I to obtain the corrected weight △W: Official (5); Official (6); Wherein, dj is the actual instantaneous flow rate value detected by the standard flow meter.