SBAA632 April   2024 TMAG3001 , TMAG5170 , TMAG5170-Q1 , TMAG5170D-Q1 , TMAG5173-Q1 , TMAG5273

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Implementation and Testing
    1. 2.1 Build Configuration
    2. 2.2 Data Collection
    3. 2.3 Speed Calculation Methods
      1. 2.3.1 Continuous Sampling
      2. 2.3.2 Running Average
      3. 2.3.3 Zero-Crossing
      4. 2.3.4 Periodic Sampling
  6. 3Summary
  7. 4References

Running Average

Since angle measurements are often able to occur many times per gear tooth, it is also possible to create a running average for δθ/δt. For a number of samples, n, the system can implement a shift register for the last n results and provide an average value which updates after each sample. While this has the drawback of being a more memory intensive process for the MCU, the calculated speed can update more slowly and predictably. This method is particularly useful in systems that benefit from a gradual change in feedback such as speedometers and human interface controls such as pedal cadence.