I'm interested in trying to estimate the worst-case error when using a particular DFT implementation (CMSIS) and an ADC and voltage reference with known error bounds.

I think that I can work out the math itself without much issue, but I'm not clear what "worst-case" looks like.

I have a vibrating string with constant fundamental harmonic frequency (like a guitar string) per "pluck" - the frequency can change from pluck to pluck though. The fundamental frequency should have the highest magnitude by a good margin, so higher-order harmonics and outside noise should not present too much problem.

So if I assume that my ADC is, say, +-2 LSB at 2kSamples/s (using a sample size of 1024 points with a perfect voltage reference), and I look at a simple sine wave of representative frequency, what would the worst case look like?

  • Would it be if the ADC alternated between +2 and -2 LSB on each measurement?
  • Or maybe it would "throw off" FFT more to have every measurement be +2 LSB for a certain time then all of a sudden be -2 LSB?

Clearly (?) there is some point where you want to ADC measurements to be off by its extremes, otherwise its just a translation of the wave.

  • Has anyone seen a resource for figuring out this kind of thing before? Or is it better just to run a few thousand examples and do a statistical analysis to determine likely bounds?

My motivation is to discover if I can know a priori if I should go with an ADC of less precision and accuracy, i.e. if a certain ADC is overkill.

  • 1
    \$\begingroup\$ I don't understand what the error that you're worried about is. Error in doing what? Between what and what? \$\endgroup\$ – Marcus Müller Nov 7 '19 at 19:22
  • \$\begingroup\$ In actual use, the background noise level, music store HVAC system, power supply fans across the room, etc. can produce more the +-2 LSBs of Gaussian white noise into a high gain mic + 16-bit audio ADC. Also, single guitar plucks change frequency over the duration of the note, and the fundamental pitch frequency isn't always the strongest spectral peak in a DFT. So... statistical analysis of data from actual conditions, yes. \$\endgroup\$ – hotpaw2 Nov 7 '19 at 19:52
  • \$\begingroup\$ @hotpaw2 Useful, thanks. Also not an actual guitar string, but a vibrating system where the fundamental should have the largest magnitude (at least I'm fairly sure). So if this is the case, I'm guessing that devices which are meant to use measurements of fundamental frequencies (some chem lab calibration equipment for instance) don't have particularly accurate error bound specifications? \$\endgroup\$ – TrivialCase Nov 7 '19 at 20:08
  • \$\begingroup\$ @MarcusMüller The error between calculated fundamental from FFT and the actual fundamental? \$\endgroup\$ – TrivialCase Nov 7 '19 at 20:08
  • 1
    \$\begingroup\$ @TrivialCase and what kinds of symmetries a mathematician may find there. It seems like something one could spend a week or two on, just allowing the imagination to fly. But it appears to me to be something that promises some new and interesting insights. You may be lucky to have an opportunity to pursue this. The parts of the imagery in my mind that I do have firmly in place is already feeling attractive to follow. I wish I could draw it all out for you.... but it would take time and I probably would need to animate it. \$\endgroup\$ – jonk Nov 8 '19 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.