SLAAES9 March   2025 MSP430FR5043 , MSP430FR6005 , MSP430FR6007 , MSP430FR6043 , MSP430FR6045 , MSP430FR6047

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Flow Meter Measurement Theory
    1. 2.1 TOF Measurement Algorithm Implementation
      1. 2.1.1 AbsTOF Calculation Method – Lobe
      2. 2.1.2 AbsTOF Calculation Method – Hilbert Wide
      3. 2.1.3 dTOF Calculation Method - Cross-Correlation
        1. 2.1.3.1 Get a High-Precision dTOF Result
        2. 2.1.3.2 Optimization in Cross-Correlation Method
    2. 2.2 Differences between ADC Approach and TDC Approach
  6. 3MSP430 MCUs for USS Application
    1. 3.1 USS Module
    2. 3.2 Differences Between USS and USS_A Module
    3. 3.3 Software Implementation on MSP430 MCUs
  7. 4Hardware Design Flow
    1. 4.1 Schematics
      1. 4.1.1 Water Meter Schematic – MSP430FR6047 and MSP430FR6007
      2. 4.1.2 Water Meter Schematic – MSP430FR6043 and MSP430FR5043
      3. 4.1.3 Gas Meter Schematic – MSP430FR6043 and MSP430FR5043
    2. 4.2 PCB Layout Guide
  8. 5Software Design Guide
    1. 5.1 USS Demo Projects and Related Resources
    2. 5.2 Demo Project Instruction
      1. 5.2.1 Files in Demo Project
      2. 5.2.2 Properties Setting in Demo Project
  9. 6Summary
  10. 7References

Optimization in Cross-Correlation Method

In the USS library, minimize the calculation process to get a better current consumption performance. The dTOF calculation is divided into two parts:

  1. Coarse calculation: Uses the calculation results of the absTOF UPS and DNS result. Calculate the integer part of the delays between them. Slide the DNS signal according to this result first and then run the cross-correlation process.
  2. Fine calculation: run the cross-correlation process with the slide DNS signal.

The total dTOF result is calculated in Equation 8.

Equation 8. d T O F   =   i n t e g e r   p a r t   f r o m   a b s T O F   r e s u l t s   +   d e c i m a l   p a r t   f r o m   c r o s s   c o r r e l a t i o n   m e t h o d

Use Figure 2-8 as an example.

 Cross-correlation
                    optimization Figure 2-8 Cross-correlation optimization

The integer part of the dTOF result is given by the time difference from absTOF UPS and DNS results. The USS library does not need to slide the DNS signal for multiply times and calculate the cross-correlation result to find the maximum Rxy[k] result. Users need to know exactly how many cycles to slide the signal to get the maximum point of the Rxy[k] result based on the absTOF UPS and DNS results. This saves a lot of data processing time and current consumption.