ADAPTIVE ALGORITHM FOR ESTIMATING VORTEX FREQUENCIES IN VORTEX SONIC FLOWMETERS

2016. Т. 16, No 3. С. 75–82 75 Introduction Today the automatic process control systems (APCS) are wide-spread in many production branches. The most accepted elements of APCS are liquids and gas flowmeters. In the hard service conditions the vortex sonic flowmeters have shown good results but their inherent weakness is measurement error growth under the low-flow condition in comparison with the main measurement range [1]. In the previous review of the measurement accuracy increase methods, the authors demonstrated the efficiency of algorithmic methods. One of them is the modern development of algorithm for estimating a vortex shedding frequency, which allows to support the comparable accuracies of the measurement in the full-scale range of the vortex sonic flowmeter. The vortex sonic flowmeter principle is based on a physical phenomenon known as Karman vortex sheet [2, 3]. The core of the phenomenon discovered by Theodore Van Karman is described with a formula: f = St × v/d, (1) where f is an instantaneous vortex shedding frequency; St is a dimensionless number called Strouhal number; v is instantaneous velocity of the measured medium flow; d is the characteristic dimension of the bluff body. The vortex shedding frequency f for the medium after the bluff body is proportional to the medium flow velocity v and depends on the Strouhal number St and the bluff body dimension d. The flow rate calculation for each measured value of the vortex shedding frequency f is difficult because of its instability [4]. For this reason, it is necessary to apply the information-processing algorithm to the vortex shedding frequency data in order to estimate a real value. The development of such algorithms is complicated by the vortex shedding frequency varying from tenths (for low flow) to hundreds of hertz in the vortex sonic flowmeters. Приборостроение, метрология и информационно-измерительные приборы и системы


Introduction
Today the automatic process control systems (APCS) are wide-spread in many production branches.The most accepted elements of APCS are liquids and gas flowmeters.In the hard service conditions the vortex sonic flowmeters have shown good results but their inherent weakness is measurement error growth under the low-flow condition in comparison with the main measurement range [1].In the previous review of the measurement accuracy increase methods, the authors demonstrated the efficiency of algorithmic methods.One of them is the modern development of algorithm for estimating a vortex shedding frequency, which allows to support the comparable accuracies of the measurement in the full-scale range of the vortex sonic flowmeter.
The vortex sonic flowmeter principle is based on a physical phenomenon known as Karman vortex sheet [2,3].The core of the phenomenon discovered by Theodore Van Karman is described with a formula: ) where f is an instantaneous vortex shedding frequency; S t is a dimensionless number called Strouhal number; v is instantaneous velocity of the measured medium flow; d is the characteristic dimension of the bluff body.The vortex shedding frequency f for the medium after the bluff body is proportional to the medium flow velocity v and depends on the Strouhal number S t and the bluff body dimension d.
The flow rate calculation for each measured value of the vortex shedding frequency f is difficult because of its instability [4].For this reason, it is necessary to apply the information-processing algorithm to the vortex shedding frequency data in order to estimate a real value.The development of such algorithms is complicated by the vortex shedding frequency varying from tenths (for low flow) to hundreds of hertz in the vortex sonic flowmeters.The article focuses on the development of vortex shedding frequency estimation algorithm.It shows the difficulties of the application of classical algorithms (moving average and median filtering) for whole measurement range of vortex sonic flowmeter.These algorithms are effective at the high flow region, where frequency of arrival of information about vortex frequency is high.However, at the low flow region where aforementioned frequency equals to tenths of hertz these algorithms are ineffective.

Приборостроение, метрология и информационно-измерительные приборы и системы
A new adaptive algorithm is offered which can operate in a whole range of flowmeter measuring.It combines an ability to react immediately if a flow starts changing, and to provide stable measurements if the flow is stable.The simulation of the proposed algorithm is implemented and its advantages over the algorithms used in serial manufacture are shown.It is noted that the developed algorithm does not need in powerful computing facilities.
Keywords: vortex flowmeters, vortex sonic flowmeters, algorithm for estimating vortex shedding frequency, time series.

Disadvantages of existing algorithms for estimating vortex frequencies
The application of the complex algorithms [5][6][7] requiring the powerful microcontrollers is impractical for most series-produced flowmeters of low and medium price bracket.
The application of simple algorithms like moving average and median filtering [4] does not allow the vortex sonic flowmeters to show equal accuracy under low and high flow conditions.For low flows, the shedding data arrival rate may be tenths and units of hertz.In case of using the algorithm with averaging the great number of instantaneous frequencies, f values it results in sufficient delay of flowmeter response on flow variation.However, if a number of f averaged-values is decreased or the flow calculation is done for each obtained value of f then the instability of flowmeter readout and measurement errors grows up.As for the high-flow measurements, the application of the above-mentioned algorithms is appropriate and maintains the required metrological performance of the flowmeters.

New (adaptive) algorithm for estimating vortex frequency
In order to develop the suggested algorithm it is necessary to define two qualitatively different modes of flowmeter behavior: stable (steady) flow mode and flow variation mode.A flowmeter operation can be presented as a sequence of the two defined modes.Whether the measured flows are low or high, the flowmeter readout in the steady flow mode should be stable.As for the flow variation mode, the time of the flowmeter response to change should be minimal to support the desired accuracy of the flow and accumulated volume measurements.
The main requirements for the developed algorithm are the following.
-When the medium flow is stable, the algorithm should provide low dispersion for frequency estimations.As a research showed, the instantaneous values of the vortex frequencies in a vortex sonic flowmeter varied from 3 % to 9 % in the whole range of measurements, while a variation of the reference flowmeter readings did not exceed 0.3 %.
-A time of response on a flow variation should be minimal for both high-flow and low-flow measurements.
The main point of the algorithm is using of several methods for processing the time series of vortex shedding frequency instantaneous values relevant for each measurement mode (steady or variable).The proposed algorithm scheme is given on Fig. 1.
The algorithm allows combining the advantages of the two data processing methods that are the moving average and the exponential smoothing.The first method provides an effective elimination of a noise term while measuring the steady or slowly varying values, so it is applicable to data processing in a steady flow mode.The method of exponential smoothing is adaptive to a new level of a process without substantial delay and significant response on chance deviations.Because of the named properties, this method is applied in the flow variation mode.It should be mentioned that both methods are not resource-intensive.
At the first stage of the algorithm operation, a new measured value of the vortex frequency is input, whereas the oldest value is eliminated.It results in updating a sample of m instantaneous values of vortex frequencies.
At the second stage the calculation for the sample and the coefficient of variation is performed.The value of the variation coefficient is necessary for determining a current mode of a flow measuring.
The third stage includes a choice of a data processing method of instantaneous vortex frequencies based on a comparison of a calculated variation coefficient with a set level defined by the design features of the flowmeter.
If the variation coefficient is less than the set level, it indicates a steady flow mode.In this case the moving average method is used to estimate the vortex shedding frequency [8].If the variation coefficient exceeds the set level, it is an attribute of a flow variation mode.In this instance the vortex frequency sample estimation is realized by the exponential smoothing [8] using a formula: , where F i and F i-1 are the vortex frequency estimations received by means of the exponential smoothing for i and i -1 measurements; f i is an instantaneous value of the vortex shedding frequency; α is a smoothing parameter; i is an index of a current measurement.

Fig. 1. Scheme of adaptive algorithm for estimating vortex frequency
At the final stage, the flow is calculated by means of the preselected model of the transformation function [2] on the ground of the vortex frequency estimation obtained using one of the methods.
The proposed algorithm is adaptive both to the steady flow mode and the flow variation mode ensuring the operating efficiency either for a high flow or low one.

Functional testing for adaptive algorithm
A program for algorithm testing developed in MATLAB environment allows simulating a time series of the instantaneous vortex frequencies with preset parameters as well as applying the algorithm of vortex frequency estimation to it.The time series simulating the flowmeter operation has an expectation value equal to a value of a simulated stable flow.An interference with the normal law of distribution is imposed on the time series.A level of the interference dispersion is to be selected in such a way that the preset variation coefficient is provided at the simulated value of the flow.To simulate an operation of the vortex frequency estimating algorithm, the following parameters can be preset: the number of values in a sample of instantaneous frequencies m, and a level of a comparison with the variation coefficient Level (Fig. 1).
To compare a response time of the algorithms, let us examine a performance of the flowmeter with 50 mm nominal diameter (Dn) and 0.5-50 m 3 /h flow range under condition of instantaneous (step) flow variation being measured in low flow area.In so doing, the variation coefficient of the simulated time series should be set on the level of 8 % while the number of values in a sample of instantaneous frequencies m = 31, and the level of a comparison with the variation coefficient Level = 10 %.It should be noted that the vortex shedding frequencies for the Dn 50 flowmeter at 2 m 3 /h and 0.5 m 3 /h are 10 hz and 2.5 hz respectively.Fig. 2 demonstrates an instantaneous adaptivity of the algorithm to a flow variation.Under the conditions of rare reception of vortex frequency data, the moving average and exponential smoothing methods have strong delays in comparison with the adaptive algorithm (about 15 and 7 seconds respectively for the example).

Fig. 2. Algorithm response to step flow variation
Along with the instantaneous response to the flow variation, the suggested algorithm shows excellent stability in the steady mode.As a result of the algorithm operation, the variation coefficient of the estimated vortex frequencies reaches 0.5 % while the variation coefficient of the vortex frequency instantaneous values was set at the level of 8 %.

Comparison of algorithms
A comparison of the suggested adaptive algorithm accuracy with the moving average and median filtering algorithms is based on a procedure, which is used for a flowmeter calibration test [1].That is a measuring error calculation of an accumulated volume of a medium in a specified time range.
The operation of the Dn 50 vortex flowmeter should be simulated at low flow with the following sequence of the operating modes.
-For the first 30 seconds, the flow through the flowmeter is 2 m 3 /h.
-For a 5-second period from the 30th second up to the 35th one, the harmonic variation (in a section from π/2 to π) of the flow takes place.
-Beginning from the 35th second up to the 65th one, the flow corresponds to 0.5 m 3 /h.Each of the modes has a random noise with the normal law of the distribution and the dispersion supporting the variation coefficient of 8% at the simulated flow.
Let us apply the above-mentioned algorithms of estimating the vortex shedding frequencies to the simulated time series.A fluent velocity v can be expressed and calculated at every instant using the instantaneous frequencies estimated by the formula (1) for each of the algorithms.Then we can calculate the instantaneous values of the flows (Fig. 3) according to the formula: where S is a cross-section area of a flow tube.To estimate an accumulated volume of a medium, let us integrate the flow values over a period t according to the following formula: where V is an accumulated volume; Q i is an instantaneous flow in an instant i; ∆t i is a period of an integration time; n is a number of readings over a period t.It is possible to calculate a relative error of an accumulated volume measurement: where V algorithm is an accumulated volume based on the vortex frequencies estimated by applying the algorithm; V true is a true (simulated) accumulated volume.

Fig. 3. Simulation of algorithm operation
In order to obtain the average error of measurement  , the above-mentioned sequence of the operations is to be repeated 5 times.The results are given in Table 1.It is evident that the suggested algorithm provides a measurement error to be an order less in low flow.In case of the low flow measuring, the developed algorithm significantly reduces the time of response on a flow variation and keeps stability in a steady mode.These properties of the algorithm allow decreasing the low flow measurement error considerably.In high flow measuring, the suggested algorithm is also highly competitive with the two others because the more is the data arrival rate, the less is the variation coefficient sensitivity to a flow variation.In this case, the suggested algorithm practically develops into the moving average algorithm.

Conclusion
The proposed adaptive algorithm for processing the vortex frequencies data is able to maintain stable estimating of the vortex shedding frequencies in a steady mode.It is shown that the algorithm allows to reduce the time of a flow variation response.It results in reducing the measurement error in a low flow area.Meanwhile, in high flow measuring, the suggested algorithm is as good as the two others discussed above.
The new adaptive algorithm needs no powerful microcontroller.It can take the place of the classical and widespread algorithms without any modification of the flowmeter construction and element base and herewith increase the accuracy of measurement for series-produced flowmeters.