SLAA889A March   2019  – July 2021 MSP430FR6041 , MSP430FR6043 , MSP430FR60431 , MSP430FR6045 , MSP430FR6047 , MSP430FR60471

 

  1.   Trademarks
  2. 1Flow Metering Background
    1. 1.1 Water Flow Velocity Estimation
      1. 1.1.1 Velocity of Ultrasound in Water is Known
      2. 1.1.2 Velocity of Ultrasound in Water is Unknown
  3. 2Algorithms for Ultrasonic Water Flow Metering
    1. 2.1 Correlation Based Technique for Differential TOF Estimation
    2. 2.2 Absolute Time-of-Flight (AbsTOF) Measurement (Tup and Tdn)
      1. 2.2.1 AbsTOF Calculation
        1. 2.2.1.1 Acquisition Algorithm for AbsTOF
        2. 2.2.1.2 Tracking Algorithm for AbsTOF
  4. 3References
  5. 4Revision 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 2-5 shows a representative captured ADC waveform. The small circles in this figure represent the captured points.

GUID-B9B63187-D414-41D9-A24D-ACBDF2FC6C0B-low.pngFigure 2-5 Representative Captured Waveform

As given in Equation 8, i is the time index for the signal capture and GUID-7064ABAD-9A8F-47DC-A4DB-40F8D2B77304-low.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 GUID-6D996721-B150-4644-A92A-FDADAFA09D8F-low.gif .

    This means the central value GUID-AEE94E07-F101-4AEA-86EF-471495C81001-low.gif is greater than or equal to the two points on either side. The algorithm then uses parabolic interpolation between the GUID-750FEDF7-6DC6-4B93-815D-35E08B1751E9-low.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 GUID-6BC5EF43-C4D7-46C4-8D2B-92709F32B991-low.png denote the interpolated value these tabulated values can be given by GUID-36089D3F-744E-4626-92A4-B77BC05696EB-low.png. These interpolated values would now correspond to the "maximum of lobe" values of each wave in Figure 2-5. These are shown by dark red dots in Figure 2-6 and Figure 2-7.

  2. The algorithm then computes the maximum over all these tabulated values GUID-36089D3F-744E-4626-92A4-B77BC05696EB-low.png. This thus generates the maximum of the signal. Let this maximum of the signal be denoted by GUID-79EB29E0-CEBF-4437-A605-ABAAD92435E3-low.png.
  3. 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. This threshold is typically set to 0.1 in the USS Software Library. Then let GUID-C3CBC371-5E5C-47C1-A228-6C6204AD3627-low.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.
  4. For the tabulated interpolated values GUID-36089D3F-744E-4626-92A4-B77BC05696EB-low.png, find that value of i = iK for which the tabulated value is closest to ηthresh that is the GUID-6C9B62AC-564A-4ED9-8C48-0DB1FBC0278C-low.png is minimum. The offset delay of the maximum from index iK is then calculated from the parabolic interpolation equation.

    The value iK would now be used as an index for the next signal capture. Figure 2-6 and Figure 2-7 show the acquisition process.

    GUID-EE26ED1C-DDCC-40D2-9AE9-6749C394063E-low.pngFigure 2-6 Interpolation in Acquisition Algorithm of AbsTOF
    GUID-248DAB08-DBBD-4CDB-8632-B2C1E86A040A-low.pngFigure 2-7 Data Points for Acquisition Algorithm for AbsTOF