|
https://dsp.stackexchange.com/questions/46692/calculating-1-3-octave-spectrum-from-fft-dft
I struggle with the theory of FFT / DFT and the 1/3 octave spectrum. - Assume I have a DFT analysis of a given signal.
- It (the DFT analysis) consists of many equidistant frequency bins that contain the corresponding amplitude (RMS or Peak).
- I now want to calculate a 1/3 octave spectrum which has different frequency bins that are not equidistant.
- Assume that one of the 1/3 octave bins reaches from 100 Hz to 200 Hz and the bin size of my DFT is 10 Hz.
- Assume the amplitude of the DFT is already in RMS.
Here is what I do at the moment (in Matlab) but it seems that it's not correct: - Adding all DFT amplitudes within 100 Hz and 200 Hz in linear scale (Pascal in my case).
- After adding the RMS amplitudes (within one 1/3 octave bin) I just calculate corresponding the Decibel (dB) value - that's it.
Is there more to it? Can you point me in the correct direction? I do not "want" (I have to mimic another software) to use so-called 1/3-Octave-Band Filter Banks like in this Matlab example.
Related
shareimprove this question
edited Jan 27 '18 at 23:34
[backcolor=rgba(31, 127, 135, 0.08)]asked Jan 25 '18 at 16:58

Dr. Manuel Kuehner16311 silver badge99 bronze badges
What is usually done for power spectrum analysis is to average a number of DFT bins that correspond to the desired frequency-dependent (e.g., 1/3 octave) bandwidth. You can check a related paper for more details. Things are not as simple if you want to smooth complex spectra, though. What do you want to achieve, i.e., what is your goal? – applesoup Jan 28 '18 at 4:20
@applesoup Thanks for taking an interest in my question! I want to achieve a 1/3 octave analysis of a given sound signal. Since Matlab does not offer it out of the box I want to do it manually. The core of the question is basically how to average DFT bins correctly. I do evaluate not the power - I do evaluate the "signal" (voltage, air pressure). – [backcolor=rgba(31, 127, 135, 0.08)]Dr. Manuel Kuehner Jan 28 '18 at 17:54
1
Smoothing the complex spectrum requires more scrutiny than smoothing the (real-valued) power spectrum. This is because of the <span class="MathJax" id="MathJax-Element-8-Frame" tabindex="0" data-mathml="2π" role="presentation" style="border: 0px; font-variant: inherit; font-stretch: inherit; line-height: normal; font-family: inherit; vertical-align: baseline; box-sizing: inherit; display: inline; word-spacing: normal; overflow-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; position: relative;">2π2π-periodicity of the phase. The paper mentioned in my first comment contains a thorough discussion of fractional-octave smoothing of complex- and real-valued spectra. While the mentioned paper is not freely available, this related technicl report is. – applesoup Feb 1 '18 at 10:14
@applesoup Thanks. I will look into it! In the meantime, I found my biggest mistake and will provide a short answer. – [backcolor=rgba(31, 127, 135, 0.08)]Dr. Manuel Kuehner Feb 1 '18 at 20:24
[url=]add a comment[/url]
3 Answersactiveoldestvotes
[color=rgb(187, 192, 196) !important][color=rgb(106, 115, 124) !important][size=1.61538]1
[color=rgb(69, 161, 99) !important]
Dr. Manuel Kuehner, You are close. You need to take the square root of the linear values squared. Ptotal_linear=p21+p22+...−−−−−−−−−√Ptotal_linear=p12+p22+...
Ptotal_dB=20log10(Ptotal_linear/20E-6)Ptotal_dB=20log10(Ptotal_linear/20E-6)
FYI: I wrote a MATLAB function to do exactly as you request. It is here
|
|