getyourtore.blogg.se

Octave frequencies
Octave frequencies













octave frequencies

Putting the two together yields abs(X(k)) ~ 0.5*A*N. The expression on the right side is approximately equal to 2*(1/N)*abs(X(k))^2 for some value of k corresponding to the peak at frequency f. Note that this typically only holds if the tone frequency is an exact (or near exact) multiple of sampling_frequency/N. spectral content of the tone is contained in only 2 bins (at frequency f and the corresponding aliased frequency -f) account for the summation (all other bins being ~0).spectral leakage effects are negligible.In the frequency domain (the right side of the equation), making the following assumptions: In the time domain (the left side of the equation), the expression is approximately equal to 0.5*N*(A^2). The approximate amplitude of the corresponding peak could be derived using Parseval's theorem: Simplifying the problem to a single tone: x = A*sin(2*pi*f*t)

octave frequencies

Note that the observed relationship is only approximate, so the following is not a mathematical proof, but merely a intuitive way to visualize the relationship between the time-domain tone amplitudes and the frequency-domain peak values. (from the definition of x there should be peaks at 10Hz and 50Hz and the corresponding aliases at -10Hz and -50Hz, which after the wrapping around shows up at 990Hz and 950Hz). Note that you were missing the sampling_frequency/N term which correspondingly resulted in tones being shown at the wrong frequency It is possible (though not necessarilly advised, as this would just obscure your code) to define f = 1000*t*sampling_frequency/N. Note that since the value of t(i) is also linearly related to the index i, through t(i) = (i-1)*0.001 One can deduct the sampling frequency from your definition of t as 1/T where T is the sampling time interval (T=0.001 in your case). Above the Nyquist frequency, the spectrum shows wrapped around negative frequency components (from a periodic extension of the frequency spectrum). Up to the Nyquist frequency (half the sampling rate), the frequency of each values produced by the FFT is linearly related to the index of the output value through: f(i) = (i-1)*sampling_frequency/N















Octave frequencies