For adopting ultrasound wave to carry out the method for flow measurement
Technical field
The present invention relates to adopt ultrasonic propagation time difference method to carry out the method for flow measurement, particularly a kind ofly can realize jamproof flow-measuring method.
Background technology
Ultrasonic propagation time difference method is to adopt ultrasound wave to carry out one of common method of flow measurement, and its principle is to calculate flow velocity according to the difference in ultrasonic signal following current travel-time and adverse current travel-time, thereby calculates flow.Because the velocity of propagation of ultrasound wave in water is much larger than the flow velocity for the treatment of fluid measured, therefore, must be to this time difference carry out accurate measurement and just can reach higher precision.In practical application, this time difference value need to reach the precision of tens ps, if have trickle bubble or impurity in fluid, these trickle bubbles or impurity can produce a certain amount of impact to time difference measurement, tend to cause measuring error to exceed standard, and even cause to measure to lose efficacy when serious.
In order to improve the precision of measurement, existing solution is mainly to set about in the pipeline section design of fluid, by having reduced the generation of bubble since more complicated fluid stable structure, filters the impurity in fluid by increasing filtrator simultaneously.Although adopt these class methods more effectively to solve existing issue, exist design complexities high, take up room large, the problems such as production cost height, therefore use and inconvenience.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of measuring method of antijamming capability can effectively improve ultrasonic propagation time difference method and carry out flow measurement time.
For achieving the above object and other relevant objects, the invention provides and a kind ofly for adopting ultrasound wave to carry out the method for flow measurement, it is characterized in that, it comprises the steps:
1) measure following current travel-time T1 and the adverse current travel-time T2 of ultrasound wave in fluid;
2) relatively whether following current travel-time T1 surpasses the following current travel-time threshold value Ts setting, and as do not surpassed the following current travel-time threshold value Ts setting, does not proceed to step 3), as has surpassed the following current travel-time threshold value Ts setting and proceed to step 1);
3) relatively whether adverse current travel-time T2 surpasses the adverse current travel-time threshold value Tn setting, and as do not surpassed the adverse current travel-time threshold value Tn setting, does not proceed to step 4), as has surpassed the adverse current travel-time threshold value Tn setting and proceed to step 1);
4) calculate the mistiming Δ t of following current travel-time Ts and adverse current travel-time Tn, relatively whether gained mistiming Δ t surpasses the mistiming threshold value Δ T setting, as the mistiming threshold value Δ T surpass not setting does not proceed to step 5), as surpassed the mistiming threshold value Δ T setting and proceeded to step 1);
5) by step 4) time difference of gained is stored as valid data, and relatively whether valid data number reaches the number n of regulation, as reaches regulation number n and enter step 6), as does not reach regulation number n and enter step 1);
6) whether the number time that relatively valid data number reaches regulation is over specifying measurement time threshold Tc, as do not surpassed the Measuring Time threshold value Tc of regulation, calculate the mean value of valid data, this mean value is as the basis calculated flow rate value of instantaneous delivery, as surpassed the Measuring Time threshold value Tc of the regulation processing that reports an error.
Preferably, in step 2), in, as surpassed the following current travel-time threshold value Ts setting, whether the time first comparing and measuring surpasses the Measuring Time threshold value Tc of regulation, and as overtime threshold value Tc, processing reports an error, as do not surpassed Measuring Time threshold value, proceed to step 1).
Preferably, step 3), in, as surpassed the adverse current travel-time threshold value Tn setting, whether the time first comparing and measuring surpasses the Measuring Time threshold value Tc of regulation, and as overtime threshold value Tc, processing reports an error, as do not surpassed Measuring Time threshold value Tc, proceed to step 1).
Preferably, in step 6), calculate the mean value of valid data before first by filtering operation, the value that deviation in valid data is larger is deleted.
As mentioned above, the method that this employing ultrasound wave carries out flow measurement has following beneficial effect: in this flow-measuring method, added anti-interference algorithm, can effectively remove impact measurement result being caused because of trickle bubble or impurity, can effectively improve the precision of measurement, the complexity that can effectively reduce original circuit design simultaneously, reduces costs.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the embodiment of the present invention.
Embodiment
Below, by specific instantiation explanation embodiments of the present invention, those skilled in the art can understand other advantages of the present invention and effect easily by the disclosed content of this instructions.The present invention can also be implemented or be applied by other different embodiment, and the every details in this instructions also can be based on different viewpoints and application, carries out various modifications or change not deviating under spirit of the present invention.
Refer to Fig. 1.It should be noted that, the diagram providing in the present embodiment only illustrates basic conception of the present invention in a schematic way, satisfy and only show with assembly relevant in the present invention in graphic but not component count, shape and size drafting while implementing according to reality, during its actual enforcement, kenel, quantity and the ratio of each assembly can be a kind of random change, and its assembly layout kenel also may be more complicated.
As shown in Figure 1, should be for adopting ultrasound wave to carry out the method for flow measurement, it comprises the steps:
1) first use ultrasonic flow meter to measure following current travel-time T1 and the adverse current travel-time T2 of ultrasound wave in this fluid;
2) relatively whether following current travel-time T1 surpasses the following current travel-time threshold value Ts setting, as do not surpassed the following current travel-time threshold value Ts setting, proceed to step 3), as surpassed the following current travel-time threshold value Ts setting and proceed to step 1), the value of Ts need determine according to the character of different fluid;
3) relatively whether adverse current travel-time T2 surpasses the adverse current travel-time threshold value Tn setting, as do not surpassed the adverse current travel-time threshold value Tn setting, proceed to step 4), as surpassed the adverse current travel-time threshold value Tn setting and proceed to step 1), the value of Ts need determine according to the character of different fluid;
4) calculate the mistiming Δ t of following current travel-time Ts and adverse current travel-time Tn, relatively whether gained mistiming Δ t surpasses the mistiming threshold value Δ T setting, as the mistiming threshold value Δ T surpass not setting does not proceed to step 5), as surpassed the mistiming threshold value Δ T setting and proceeded to step 1);
5) by step 4) time difference of gained is stored as valid data, and relatively whether valid data number reaches the number n of regulation, as reaches regulation number n and enter step 6), as does not reach regulation number n and enter step 1);
6) whether the number time that relatively valid data number reaches regulation is over specifying measurement time threshold Tc, as do not surpassed the Measuring Time threshold value Tc of regulation, calculate the mean value of valid data, this mean value is as the basis calculated flow rate value of instantaneous delivery, as surpassed the Measuring Time threshold value Tc of the regulation processing that reports an error.In order to improve the precision of measurement, calculate the mean value of valid data before first by filtering operation, the value that deviation in valid data is larger is deleted.
Because the processor of executive routine is Multiprocessing device, therefore when step 1) is measured, each time interval may be different, if the time interval is oversize, likely can affect final measuring accuracy, for this reason as a kind of optimal way, in step 2), in, as surpassed the following current travel-time threshold value Ts setting, whether the time that can first compare and measure surpasses the Measuring Time threshold value Tc of regulation, as overtime threshold value Tc, the processing that reports an error, as do not surpassed Measuring Time threshold value, proceeds to step 1) again.In like manner step 3), in, as surpassed the adverse current travel-time threshold value Tn setting, whether the time first comparing and measuring surpasses the Measuring Time threshold value Tc of regulation, as overtime threshold value Tc, the processing that reports an error, as do not surpassed Measuring Time threshold value Tc, proceeds to step 1).
Should be by hyperacoustic time and tide travel-time is calculated respectively for the concrete principle of method that adopts ultrasound wave to carry out flow measurement, tentatively judge whether hyperacoustic propagation is interfered according to the time of calculating gained, if be disturbed obviously, abandon this measured value, and remeasure.If this measured value, in normal interval, calculates the mistiming of time and tide, then judge that time difference, whether in normal interval, if not in normal interval, abandon this measured value, remeasures.If time difference is normal, this value is preserved.Repeatedly measure, try to achieve a plurality of normal time differences, then these a plurality of differences are carried out to software filtering computing, reject the larger value of deviation, then get the mean value of surplus value as the basis of instantaneous delivery.
In this flow-measuring method, added anti-interference algorithm, can effectively remove impact measurement result being caused because of trickle bubble or impurity, can effectively improve the precision of measurement, can effectively reduce the complexity of original circuit design simultaneously, reduced costs.So the present invention has effectively overcome various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all can, under spirit of the present invention and category, modify or change above-described embodiment.Therefore, such as in affiliated technical field, have and conventionally know that the knowledgeable, not departing from all equivalence modifications that complete under disclosed spirit and technological thought or changing, must be contained by claim of the present invention.