Method and device for monitoring a process variable with vibronic sensor

10401215 ยท 2019-09-03

Assignee

Inventors

Cpc classification

International classification

Abstract

A method to determine and/or monitor at least one process variable of a medium with at least one vibration-capable unit. The vibration-capable unit is excited to mechanical vibrations by means of an electrical excitation signal of an adjustable frequency; wherein the mechanical vibrations are transduced into a received electrical signal, which is characterized at least by a frequency and/or a phase and/or an amplitude. The excitation signal is generated based on the received signal; wherein the voltage values of the received signal are sampled at specified predetermined points in time, starting from the excitation signal. The real part and the imaginary part of the received signal are determined from the sampled voltage values of the received signal by means of a Goertzel algorithm; wherein at least one Goertzel coefficientin particular the number of the sample values and/or an operating frequency and/or a sample frequencyis provided for performing the Goertzel algorithm. At least the current phase and/or the current amplitude of the received signal are calculated from the real part and the imaginary part of the received signal; wherein the frequency of the excitation signal is adjusted such that a predeterminable phase shift is present between the excitation signal and the received signal; and wherein the at least one process variable is determined.

Claims

1. A device to determine and/or monitor at least a fill level, a density, a viscosity, or a volume flow rate of a medium, comprising: at least one mechanical vibration-capable unit; a control unit; an electromechanical transducer unit which is designed to excite said at least one mechanical vibration-capable unit to mechanical vibrations based on an electrical excitation signal of an adjustable frequency, and to receive the mechanical vibrations and transduce them into an electrical received signal, which electrical received signal is characterized at least by a frequency and/or a phase and/or an amplitude; an electronic unit with a microprocessor which is designed: to generate the electrical excitation signal based on the electrical received signal, to sample voltage values of the electrical received signal at defined predetermined points in time, to determine the real part and imaginary part of the electrical received signal from the sampled voltage values of the electrical received signal by means of a Goertzel algorithm, to preset at least a number of sample values and/or a working frequency and/or a sample frequency for performing the Goertzel algorithm, to calculate at least a current phase and/or a current amplitude of the electrical received signal from the real part and imaginary part of the electrical received signal; and a control unit that is designed to set the frequency of the electrical excitation signal such that a predeterminable phase shift is present between the electrical excitation signal and electrical received signal; and said electronic unit is designed to determine the fill level, density, a viscosity, or volume flow rate.

2. The device according to claim 1, wherein, further comprising: an adaptive switched capacitor filter.

3. The device according to claim 1, wherein: said electromechanical transducer unit is provided by a piezoelectric actuator or an electromagnetic actuator.

4. A method to determine and/or monitor a fill level, a density, a viscosity, or a volume flow rate of a medium with at least one vibration-capable unit, comprising the steps of: exciting the vibration-capable unit to mechanical vibrations by means of an electrical excitation signal of an adjustable frequency; transducing the mechanical vibrations into electrical received signal, which electrical received signal is characterized at least by a frequency and/or a phase and/or an amplitude, generating the electrical excitation signal based on said electrical received signal; sampling voltage values of said electrical received signal at specified predetermined points in time, starting from said electrical excitation signal; determining the real part and imaginary part of said electrical received signal from the sampled voltage values of said electrical received signal by means of a Goertzel algorithm, presetting at least a number of sample values and/or an operating frequency and/or a sample frequency for performing the Goertzel algorithm; calculating at least a current phase and/or a current amplitude of said electrical received signal from said real part and imaginary part of said electrical received signal; and adjusting the frequency of said electrical excitation signal such that a predeterminable phase shift is present between said electrical excitation signal and said electrical received signal, and determining the fill level, a density, a viscosity, or a volume flow rate based on said received signal.

5. The method according to claim 4, wherein: a working frequency is set to the frequency of said electrical excitation signal.

6. The method according to claim 5, wherein: a whole-number multiple of a period of said electrical excitation signal is selected for the number of said sample values.

7. The method according to claim 4, wherein: a sampling frequency is selected as a whole-number multiple of the frequency of said electrical excitation signal.

8. The method according to claim 7, wherein: two or four times the frequency of said excitation signal is set as said sampling frequency.

9. The method according to claim 4, wherein: the Goertzel algorithm is used across multiple periods of said electrical excitation signal.

10. The method according to claim 4, wherein: said electrical excitation signal is a square wave signal or a sine signal.

11. The method according to claim 4, wherein: said predeterminable phase shift is set using the quotient from the number of said sample values and said sampling frequency by means of a time shift of said sample values in relation to said excitation signal.

12. The method according to claim 4, wherein: said predeterminable phase shift is 90.

13. The method according to claim 4, further comprising the step of: subdividing a measurement period into at least two time intervals, wherein: respectively a first predeterminable phase shift is set in a first time interval, and a second predeterminable phase shift is set in a second time interval.

14. The method according to claim 4, wherein: a function defined by the quotient of the real part and the value of the imaginary part of said received signal, or the inverse of this function for a control deviation, is used to set said predeterminable phase shift.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The invention as well as its advantageous embodiments are described in detail in the following with reference to FIGS. 1-5. Illustrated are:

(2) FIG. 1: is a schematic drawing of a vibronic sensor according to the prior art;

(3) FIG. 2: is a block diagram of an electronic unit according to the invention;

(4) FIG. 3: is a schematic progression of the excitation signal (a) and received signal (b);

(5) FIG. 4: is a schematic drawing of the curve of the simplified control function; and

(6) FIG. 5: is an illustration of the adjustment of the predeterminable phase shift.

DETAILED DISCUSSION IN CONJUNCTION WITH THE DRAWINGS

(7) A vibronic sensor 1 is shown in FIG. 1. A vibration-capable unit 4 is depicted in the form of an oscillating fork which submerges partially into a medium 2 which is located in a container 3. The vibration-capable unit is excited to mechanical vibrations by means of the electromechanical transducer unit 5 and may, for example, be a piezoelectric stack actuator or bimorph actuator. However, it is naturally understood that other embodiments of a vibronic sensor also fall under the invention. Furthermore, an electronic unit 6 is depicted by means of which the signal evaluation and/or signal feed takes place. A block diagram of the necessary components of an electronic unit according to the invention is the subject matter of FIG. 2.

(8) The sensor element 7, comprised of the vibration-capable unit 4 and the electromechanical transducer unit 5 from FIG. 1, is supplied with an excitation signal U.sub.A. Conversely, the electromechanical transducer unit 5 generates, from the mechanical vibrations, a received electrical signal U.sub.E, upon which may be superimposed interference signals U.sub.D which are filtered out by means of an adaptive switched capacitor (SC) filter 8. This serves as an anti-aliasing filter and is especially suitable due to the power consumption requirements of a corresponding measurement apparatus. Furthermore, its adaptive functionality allows the known excitation signal to be followed.

(9) Within the microprocessor 9in particular a low-power microprocessorthe filtered received signal first traverses an analog/digital converter (ADC) 10 and is subsequently evaluated by means of a Goertzel algorithm 11 with regard to its phase .sub.A and amplitude A.sub.A. The frequency of the received signal is set by means of a PI controller 12 so that a predeterminable phase shift is present between the excitation signal and received signal. Finally, the excitation signal is generated by means of a digitally controlled oscillator (DCO), which excitation signal traverses a digital/analog converter (DAC) 13 and again serves to charge the sensor element 7.

(10) The Goertzel algorithm is known per se and, for example, is described in Digitate Signalverabeitung [Digital Signal Processing] by D. Ch. Von Grningen, published in the 3rd edition by Fachbuchverlag Leipzig in 2004.

(11) The transfer function H.sub.k(z) for a second-order Goertzel algorithm is provided by

(12) H k ( z ) = 1 - W N k z - 1 1 - az - 1 + z - 2
with

(13) W N = e - j 2 N
and a=2 cos(k2/N). The Goertzel algorithm accordingly consists of a recursive branch and non-recursive branch. The recursive branch represents a resonator through which all sampled values pass while, after N sample values, the non-recursive branch is traversed once, and as a result supplies the real part and imaginary part of the excitation signal from which the respective variables may be calculated via additional mathematical relations. For this reason, the Goertzel algorithm may also be viewed as a decimating digital filter which, after N sample values, delivers an output value which corresponds to the DFT coefficient at point k. After the calculation of the respective output value, the initial conditions are each reset to zero, and an additional calculation may be started. Since the recursive branch describes a resonator structure, the working frequency of the Goertzel algorithm is often also designated as a resonance frequency.

(14) In practice, the process normally takes place such that the sampling frequency f.sub.S is defined first, and the factor k is subsequently determined via the equation

(15) f k = k f S N
such that the working frequency f.sub.k corresponds to the excitation signal. If k is a whole number, the algorithm is called a normal Goertzel algorithm; given a real k, the algorithm is what is known as a generalized Goertzel algorithm.

(16) A special Goertzel algorithm optimized with regard to a forcibly excited system and with regard to low power consumption is illustrated in FIG. 2, likewise in the form of a block diagram. The necessary measures for optimization are based on an intelligent selection of the sampling frequently and number of sample values. Since the excitation signal is known given a forced excitation, as is typical for vibronic sensors, and because the received signal is evaluated with regard to the frequency of the excitation signal, the sampling rate T.sub.S may be selected intelligently. The Goertzel window as well as the position of the sample values N are then directly coupled to the excitation signal. This has the result that, instead of the factor k, the sampling frequency is adapted continuously such that the working frequency of the Goertzel algorithm is adapted to the signal frequency.

(17) Given a suitable selection of the sampling frequency, the necessary computing operations of the Goertzel algorithm are significantly simplified. In this regard, the sampling frequency is selected so that it amounts to a whole-number multiple of the excitation frequency f.sub.An:
f.sub.S=nf.sub.An.

(18) Consequently, for the working frequency f.sub.k

(19) f k = k nf An N
and, under consideration of the condition f.sub.k=f.sub.An,

(20) k = N n .

(21) If n=4 is now selected in particular, which corresponds to a sampling frequency that is four times higher than the excitation signal, a decisive simplification results for the respective calculation operations to be performed. The trigonometric terms a namely become a constant. In contrast to the general Goertzel algorithm, only additions and subtractions are accordingly executed in the recursive branch, which in turn has a decisive advantage for the implementation of the algorithm in a low-power microcontroller. In particular, exclusively whole-number output values occur given whole-number input values. Since integer values are generated in the ADC, in this case a fixed point arithmetic ultimately does not need to be selected.

(22) The real part and imaginary part of the excitation signal may be measured immediately after N1 sample values by means of the optimized Goertzel algorithm.

(23) The course of an excitation signal (a) and of a sampled received signal (b) are schematically shown in FIG. 3. The excitation signal in FIG. 3a) is provided by a chronological, periodic square wave signal. Both the sample points in time and the relative position of the Goertzel window are defined using the excitation signal. The received signalwhich, in this case, is provided by a sinusoidal signalis shown in FIG. 3b)

(24) For this example, the length of the Goertzel window 16 amounts to exactly one signal period of the excitation signal, and N=4 was selected for the number of sample values 15 since this selection is particularly advantageous with regard to a reduction of the computing effort. However, it is inherently understood that the length of the Goertzel window 16 may also amount to a different whole-number multiple of the signal period of the excitation signal. In general, the more periods traversed by the recursive branch of the Goertzel algorithm, the more narrowband the response of the resonator structure, and the more robust the phase and/or amplitude detection. On the other hand, the speed of the phase and/or amplitude detection decreases with an increasing number of traversed periods.

(25) The chronological order of the recursive (a) and non-recursive (b) branch of the Goertzel algorithm is plotted in FIG. 3b. Given a length of the Goertzel window which corresponds to N sample values, N1 values traverse the recursive branch (a), wherein after the N1 values, the non-recursive branch (b) is traversed once and the real part and imaginary part are calculated, from which in turn the phase information and/or amplitude information may be calculated. It thereby holds true that:

(26) ( iT S ) = arctan ( Im ( iT S ) Re ( iT S ) ) , A ( iT S ) = 2 N Im ( iT S ) 2 + Re ( iT S ) 2

(27) The phase thereby needs to be corrected depending on the algebraic sign of the real part and/or imaginary part. In conclusion, the Goertzel algorithm is reset again to the initial conditions.

(28) Since the calculation of the current phase by means of the arc tangent function is very computationally involved, instead of this calculation the quotient of the imaginary part and real part may be used as a control deviation. The corresponding control function is drawn schematically in FIG. 4. The basic idea behind this simplification is that the real part is zero given a phase shift of 90. It can consequently be used to define the control deviation or, respectively, to regulate the phase. What is known as an error function is accordingly defined as a control deviation, which error function is provided by:

(29) e = Re .Math. Im .Math. .

(30) The imaginary part is thereby likewise considered because, given a phase shift differing from 90, the real part depends on the amplitude, and therefore also on the imaginary part. That the value of the imaginary part is used in turn serves to cover a maximum range for the phase. It is thereby advantageous to limit the control deviation, in particular to +/1. It is noted that this definition applies to a cosine signal. The error function must be inverted for a sine signal so that e=0, given a phase shift of =90. Finally, the adjustment of the predeterminable phase shift between the excitation signal and received signal is illustrated in FIG. 5. Two excitation signals are shown. The black curve has a phase of =0; the gray curve has a phase of =90. To set a specific, predeterminable phase shift, the location of the Goertzel window is thus modified in terms of its position.

(31) It is now the case that the control function, which represents a function of the phase shift , is displaced via the adjustment of a phase shift. In order to be able to adjust to a phase shift that differs from 90, the entire control function must accordingly be displaced analogously along the abscissa, such that e=0 results for the respective predeterminable phase shift. Given this possibility of being able to set a phase shift differing from 90, the density of the medium may also be determined as, for example, a process variable in addition to a predetermined fill level. Furthermore, the option exists to switch back and forth between two different predeterminable phase shifts. In addition to the density, the viscosity of the medium may thereby also be determined, which results from the frequency difference between the two different phase shifts.