Performing an FFT on sampled data

  • Thread starter Thread starter gotem3303
  • Start date Start date
  • Tags Tags
    Data Fft
Click For Summary
SUMMARY

This discussion focuses on performing a Fast Fourier Transform (FFT) on sampled audio data using the MCF51AC256 microcontroller on the DEMOACKIT platform. The user is utilizing CodeWarrior with Processor Expert, which includes an FFT bean for executing the FFT. The input signal is sampled at 40kHz from a microphone breakout board, and the user plans to fill a 512-size array with the sampled data to feed into the FFT function. Key considerations include selecting the appropriate sinusoidal generation method and understanding how to interpret the resulting real and imaginary spectra to determine frequency.

PREREQUISITES
  • Understanding of FFT algorithms and their applications
  • Familiarity with the MCF51AC256 microcontroller and DEMOACKIT platform
  • Experience with CodeWarrior and Processor Expert
  • Knowledge of digital signal processing concepts, particularly sampling theory
NEXT STEPS
  • Research the differences between FFT generation methods: Standard C functions, Full Table, Half Table, Buneman's Algorithm, and NumRec
  • Learn how to interpret the output of the Real Forward FFT function in terms of frequency analysis
  • Explore the mathematical relationship between FFT output and frequency determination
  • Investigate additional resources on digital signal processing and FFT applications in embedded systems
USEFUL FOR

Embedded systems developers, audio signal processing engineers, and anyone interested in implementing FFT algorithms on microcontrollers for frequency analysis.

gotem3303
Messages
29
Reaction score
0
Im trying to perform an FFT on a set of sampled data to determine the frequency of a person humming.

Im using the MCF51AC256 on the DEMOACKIT, coding with Codewarrior using Processor Expert which has a FFT bean included, so all I need to do is pass it values and it performs the FFT.

So I am using a microphone breakout board that has a 100x amp and bandpass filter, and I am going to be sending the signal directly to my ADC on my processor.

In my code I am to sample the inputted signal at 40kHz.

The rest may be wrong so correct me if I am wrong.

I now plan on filling a size 512 array with the sampled signal data. I will then feed that array to the FFT function. This is the definition of the bean:

The bean allows compute forward and backward fast Fourier transform.

I have some fields to set:

1. Sin and Cos generating: This property determines what method is used to getting results of sinus and cosinus operation. I can pick from the following, but which of these would I pick??
-Standard C functions
-Full Table
-Half Table
-Buneman's Algorithm
-NumRec

Also, when I actually perform the FFT, I need to cal the function of course, so I am guessing I would be picking the Real Forward FFT right? I know its not backwards and I am pretty sure I don't need a complex FFT right?

And one last thing for now, which I need help on the most, is the return type of the function.

The function is word RealFwdFFT(dword Size, PFFTType Re)
-Size:dword - FFT size (which will be 512 for me correct)
-Re:PFFTType - On input is pointer to array containing data, returning spectrum where first half or array means real spectrum and second half means imaginary spectrum.
-Return: word - possible error codes.

So my main question is when I get my result back from the function call, and I now have a real spectrum and an imaginary spectrum, how do I find the frequency?

Ive tried doing a lot of research on FFT and DFT and I can't seem to find how to realize the answer I need from this data.
 
Engineering news on Phys.org
gotem3303 said:
So my main question is when I get my result back from the function call, and I now have a real spectrum and an imaginary spectrum, how do I find the frequency?
I think all your questions are answered in this page.
https://www.mathworks.com/help/matlab/ref/fft.html
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
8
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 3 ·
Replies
3
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K