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

Tracking Algorithm for AbsTOF

Let iK denote the index from the previous capture (the procedure to get this during acquisition was described in Section 2.2.1.1) for previous burst j–1 and let j denote the current capture. Now, the algorithm has the following steps:

  1. The algorithm checks if GUID-A5309F60-5A6F-4609-99EA-E806BB5E57DE-low.gif, if this is not true then it follows steps (2) and (3). If it is true, then the algorithm goes to step (4).
  2. If however GUID-1B86BFC9-A463-4AEE-BF68-78E4776574C1-low.gif then ik is set equal to ik–1 and if GUID-5D90841E-108C-4B7A-9BE2-CD039D4DD8B4-low.gif then ik is set equal to ik+1.
  3. The check in step (1) is now repeated on this new index iK. In the water flow meter USS Software Library, a maximum of one such update in step (2) is allowed. If the algorithm still does not satisfy the inequality in step (1) then a full acquisition as in Section 2.2.1.1 is triggered.
  4. The offset delay of the maximum from index iK is then calculated from the parabolic interpolation equation. GUID-E07C032A-1634-443E-9A86-180AA226A71C-low.gif denotes the effective time.

The upstream absolute time of flight is thus given by Equation 13.

Equation 13. T u p s a b s = T p r o p + T u p s c o r r i k T o f f s e t

In this equation, Tproop is the propagation time that is specified using #define USS_ACOUSTIC_LENGTH in USS_userConfig.h and is maintained in USS_Meter_Configuration.acousticLength as part of the application meter configuration. It corresponds to the approximate propagation time for ultrasound in the given meter. Typically Tproop is 35 to 40 µs. Toffset corresponds to the number of cycles to back track from the lobe corresponding to the index iK and is a function of the threshold η. In the USS Software Library, Toffset is set to 5 µs and can be modified using the user configuration #define USS_ALG_ADC_ADDITIONAL_CAP_DLY. It is maintained in the variable USS_Algorithms_User_Configuration.ADCAdditionalCaptureDelay.

The calculations of acquisition and tracking for the upstream direction are repeated for the downstream direction. The software keeps track of another index iK for the downstream data for each burst j.