拙网论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 188|回复: 0

How do you plot an SPL vs frequency curve for a given set of pressure data?

[复制链接]

949

主题

1001

帖子

3736

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3736
发表于 2019-1-9 21:02:09 | 显示全部楼层 |阅读模式
[size=25.8461px]https://dsp.stackexchange.com/questions/1059/how-do-you-plot-an-spl-vs-frequency-curve-for-a-given-set-of-pressure-data[size=25.8461px]
[size=25.8461px]



I have a set of pressure data at a sampling rate of 262144 Hz for 3 seconds making it 786432 samples of pressure data. I want to plot a curve of the SPL (sound pressure level) vs frequency. I first converted pressure data to SPL using <span class="MathJax" id="MathJax-Element-1-Frame" tabindex="0" data-mathml="20log10&#x2061;(P/Pref)" 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;">20log10(P/Pref)20log10⁡(P/Pref) and performed a 4096 point FFT for the 192 segments of data and averaged them.
However, I couldn't get the required SPL values in decibels. Was the approach correct? If not, could you please point out the mistake in my approach?

The steps will be, in this order:
  • apply window function (e.g. Hann or Hamming)
  • calculate FFT
  • calculate magnitude of FFT (sqrt(re*re+im*im))
  • convert magnitude to dB (20*log10(magnitude))
  • apply combined correction/calibration factors (window function compensation, FFT factor of N scaling if needed, factor of 2 for symmetric FFT, Pref calibration, etc) - this can just be a single dB correction value that you add to the dB magnitude values
If your Pref calibration data varies with frequency (e.g. microphone with non-flat frequency response) then it's a little more complicated than the above, but the same basic principles apply.
Note also that if you want weighted dB SPL (e.g. A weighting) then you'll also need to apply the relevant frequency dependent weighting corrections.



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|抱朴守拙BBS

GMT+8, 2025-5-26 06:31 , Processed in 0.184275 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表