TIDUES5A August   2019  – September 2019

 

  1.   Revision History

Acquisition Algorithm for AbsTOF

As mentioned above, the acquisition algorithm is run when there is no previous memory of the AbsTOF value or when the algorithm detects an anomaly in two consecutive measurements of AbsTOF. Figure 5 shows a representative captured ADC waveform. The small circles in this figure represent the captured points.

It is important to ensure there is some dead time in the capture prior to the ultrasonic signal. This additional dead time enables the algorithm to operate properly and also ensures the signal is still within the capture window at higher temperatures. The dead time between the start of capture and the signal for a DN-25 pipe should be around 5us.

Figure 5. Representative Captured WaveformTIDM-02005 capture.png

As given in Equation 6, i is the time index for the signal capture and TIDM-02005 ieq-r-bar-1-after-fig08.gif is the upstream captured signal.

The acquisition algorithm then employs the following steps:

  1. For every i equal to 2 to (N – 1), let i = {i1, i2, ..., iM } for which TIDM-02005 ieq-acquisition-algorith-step1-eq1.gif .
  2. This means the central value TIDM-02005 ieq-r_sub1_supi.gif is greater than or equal to the two points on either side. The algorithm then uses parabolic interpolation between the TIDM-02005 ieq-acquisition-algorith-step1-eq2.gif for all such i. A parabolic interpolation is chosen (rather than the cosine interpolation for dTOF calculation) for reduced complexity, and the accuracy on AbsTOF estimation is not as tight as the dTOF estimation in terms of contribution to the overall flow error. The algorithm tabulates all these interpolated values. Letting TIDM-02005 ieq-acquisition-algorith-step2-r-tilde.png denote the interpolated value these tabulated values can be given by TIDM-02005 ieq-acquisition-algorith-step1-eq3.png. These interpolated values would now correspond to the "maximum of lobe" values of each wave in Figure 5. These are shown by dark red dots in Figure 7 and Figure 8.

  3. The algorithm then computes the maximum over all these tabulated values TIDM-02005 ieq-acquisition-algorith-step1-eq3.png. This thus generates the maximum of the signal. Let this maximum of the signal be denoted by TIDM-02005 ieq-acquisition-algorith-step2-rmax1.png.
  4. Let η denote the threshold for the wave lobe that we would like the AbsTOF algorithm to lock on to. This threshold would be a function of the type of transducers and should be set to a value where we expect the maximum rate of the change of the waveform to ensure the intended lobe is locked. This threshold is typically set to 0.1 in the USS Software Library. Then let TIDM-02005 ieq-acquisition-algorith-step3-nthresh.png. This threshold can be controlled using the #define USS_ALG_RATIO_OF_TRACK_LOBE in USS_userConfig.h and maintained in USS_Algorithms_User_Configuration. ratioOfTrackLobeToPeak. Figure 6 depicts an ADC capture in which the peak of the signal is around 900 ADC counts. Assuming the maximum rate of change is on the first lobe, setting a threshold of 0.1 would give a threshold around 90 ADC counts (900 x 0.1). It is important to note that on some meters, there could be noise before the first lobe which could be inadvertently locked on to instead of the intended first lobe. In cases where noise is present before the first lobe, it is advised to set the threshold to lock to the second lobe to avoid locking to noise. In the example shown in Figure 6 a threshold of 180 ADC counts(900 x 0.2) could be used to lock to the second lobe.
  5. Figure 6. Determination of Threshold TIDM-02005 tidm-02005-threshold.png
  6. For the tabulated interpolated values TIDM-02005 ieq-acquisition-algorith-step1-eq3.png, find that value of i = iK for which the tabulated value is closest to ηthresh that is the TIDM-02005 ieq-acquisition-algorith-step4-abs-nthresh.png is minimum. The offset delay of the maximum from index iK is then calculated from the parabolic interpolation equation.
  7. The value iK would now be used as an index for the next signal capture. Figure 7 and Figure 8 show the acquisition process.

    Figure 7. Interpolation in Acquisition Algorithm of AbsTOFTIDM-02005 interpolation-in-acquisition-algorithm-of-abstof.png
    Figure 8. Data Points for Acquisition Algorithm for AbsTOFTIDM-02005 algo-2.png