Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am tasked with simulating an analog signal, and sampling it isochronously to determine its frequency. By simulate I mean we are using math.c's sin function, so no need (I think) to dive into the frequency domain. We are supposed to check the signal every X seconds and once a 256 sample buffer is full, run a function to spit out Y Hz. Given said buffer, how do I find the signal's frequency?

The document given to help understand this mentions Nyquist, complex numbers, and fourier transforms, and is available on page 27 and 28 here: http://oxconltd.com/SeattleU/assignments/project4/project4-aut11a.pdf.

I've had Circuits II, Diff eq, linear algebra, and multivar calc, and I know of fourier transforms, but I'm still a bit lost.

share|improve this question
    
Hint: The lowest frequency that you can detect reliably with $256$ samples spaced $X$ seconds apart is $1/256X$ Hz; the highest frequency is $1/2X$ Hz (in most cases) when the samples will be alternately $+a$ and $-a$. –  Dilip Sarwate Nov 28 '11 at 18:50
    
Thank you for your time. So, that somewhat explains the professor's specifications for the input frequency range: 35Hz <= Frequency <= 3.75kHz. If sampling at 2.5 times the max frequency (9.375 kHz), according to your equation the lowest frequency is ~36 Hz. I know 2 x highest frequency is the minimum sampling frequency necessary, but since it's a pure sin wave sampling at 2x could return all 0's. He recommended 2.5 to 3, so apparently 3 was put out for confusion. –  Bobby Nov 28 '11 at 19:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.