# Extract rpm from tachometer signal

**URL:** https://discourse.julialang.org/t/extract-rpm-from-tachometer-signal/77329
**Category:** Signal and Image Processing
**Tags:** question, dsp, unitful
**Created:** [March 2, 2022, 11:49pm UTC](https://discourse.julialang.org/t/extract-rpm-from-tachometer-signal/77329 "2022-03-02T23:49:36Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![Paulo\_Jabardo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paulo_jabardo/32/3196_2.png) [@Paulo\_Jabardo](https://discourse.julialang.org/u/Paulo_Jabardo)
#### Post date: [March 4, 2022, 8:57pm UTC](https://discourse.julialang.org/t/extract-rpm-from-tachometer-signal/77329/14 "2022-03-04T20:57:06Z")

</div>

Very nice. Same approach as mine but much simpler. I will rewrite my code.

The thing to be careful about is that, most often, when generating an “artificial” signal, we generate full cycles. And any of the approaches above work well. But when using the output of an instrument, the signal can begin or end at any point of the cycle. In this case using the fft might result in a bias. Of course, if the number of pulses is very large, this is minimized.

On the other hand, if the number of pulses (or cycles in general) is small counting them directly as your approach does is the best approach and interpolation can also help a lot.

Paulo

---

_[View the full topic](https://discourse.julialang.org/t/extract-rpm-from-tachometer-signal/77329)._
