Hi there, I'm trying to implement frequency analyzer for audio signal using DFT. Nothing extraordinary, just take e.g. 4096 source samples, apply windowing, pass through DFT and get magnitude of particular frequency bin via msqrt(msqr(Re) + msqr(Im)) , then maybe some overlapping or whatsoever. Let's say, that source samples are in -1..1. The problem is, even if the source signal is for example a sine wave at 400Hz, magnitude of several bins highly exceeds 1, which I think is pretty weird. I have read a few topics about this and there were some things about calibration. But I really don't understand this, since if I imagine a sine wave in range -1..1 at frequency at exactly one frequency bin, then this bin should contain combination of one sine and cosine with the same magnitude, shouldn't it? dmnc
FFT magnitude for frequency analyzer
Started by ●August 4, 2008
Reply by ●August 4, 20082008-08-04
Reply by ●August 4, 20082008-08-04
On Aug 5, 7:21 am, "jungledmnc" <jungled...@gmail.com> wrote:> Hi there, > I'm trying to implement frequency analyzer for audio signal using DFT. > Nothing extraordinary, just take e.g. 4096 source samples, apply windowing, > pass through DFT and get magnitude of particular frequency bin via > > msqrt(msqr(Re) + msqr(Im)) > , then maybe some overlapping or whatsoever. > > Let's say, that source samples are in -1..1. The problem is, even if the > source signal is for example a sine wave at 400Hz, magnitude of several > bins highly exceeds 1, which I think is pretty weird. > > I have read a few topics about this and there were some things about > calibration. But I really don't understand this, since if I imagine a sine > wave in range -1..1 at frequency at exactly one frequency bin, then this > bin should contain combination of one sine and cosine with the same > magnitude, shouldn't it? > > dmncYou would be better plotting the periodogram (power spectrum). Magnitude squared/N. Then take 10Log10 to convert to dB. K.
Reply by ●August 5, 20082008-08-05
Reply by ●August 5, 20082008-08-05
If you see the window effect (leakage) and want to remove it, here is a good article: Dynamic Signal Analysis Basics.PDF http://www.go-ci.com/products.asp James