wav dataからdB splの求め方

87 次查看(过去 30 天)
Cir 2t
Cir 2t 2020-9-16
平素よりお世話になっております。
wav dataの電圧波形のデータから音圧(dB単位)を計算したいのですが、いかのように考えたのですが、これで良いか少し不安を抱えています。
検証していただけると幸いです。
%電圧(の実効値)は以下のようになります。
%電圧(V) = 音圧(Pa)×マイク感度(V/Pa)×アンプ利得(倍)
%マイク感度の V/Pa という単位は、1Paの音圧で1Vの出力電圧(実効値)が出るという意味です。
%音圧 0dB というのは20μPaのことなので
%音圧(Pa) = 2×10^(-6)×10^{音圧(dB)/20}
%になります( 1Pa の音圧は 94dB )。したがって元の音量が dB 単位のときは次式で計算できます。
%電圧(V) = 2×10^(-6)×10^{音圧(dB)/20}×マイク感度(V/Pa)×アンプ利得(倍)
%逆に電圧の実効値から音圧を計算するには
%音圧 (dB) = 20*log10[ 電圧(V)/{ 2×10^(-6)×マイク感度(V/Pa)×アンプ利得(倍)} ]
マイク感度は、4mV/Paです。アンプゲインは、20dBです。ですので、下記のようにコードを書きました。
absは、複素数になっていたので入れました。
v=data;
a= 2*10^(-6);
m=4*10^(-3);
amp=20;
dB=20*log10(abs(data/(a*m*amp)));
Thank you for your continued support.
I'd like to calculate the sound pressure (in dB) from the voltage waveform data of wav data, but I'm a little worried about if this is okay.
I would appreciate it if you could verify it.
% Voltage (effective value) is as follows.
% Voltage (V) = Sound pressure (Pa) x Microphone sensitivity (V / Pa) x Amplifier gain (times)
% The unit of microphone sensitivity V / Pa means that 1V output voltage (effective value) is output at 1Pa sound pressure.
% Sound pressure 0dB means 20μPa
% Sound pressure (Pa) = 2 × 10 ^ (-6) × 10 ^ {Sound pressure (dB) / 20}
It becomes% (sound pressure of 1Pa is 94dB). Therefore, when the original volume is in dB, it can be calculated by the following formula.
% Voltage (V) = 2 × 10 ^ (-6) × 10 ^ {Sound pressure (dB) / 20} × Microphone sensitivity (V / Pa) × Amplifier gain (times)
% Conversely, to calculate the sound pressure from the effective value of the voltage
% Sound pressure (dB) = 20 * log10 [Voltage (V) / {2 × 10 ^ (-6) × Microphone sensitivity (V / Pa) × Amplifier gain (times)}]
The microphone sensitivity is 4 mV / Pa. The amplifier gain is 20 dB. So I wrote the code as below.
abs was a complex number, so I put it in.
  3 个评论
Cir 2t
Cir 2t 2020-9-17
Mr. Rik.
Thank you for translating my Japanese into English.
Hernia Baby
Hernia Baby 2021-2-24
複素数ということはFFTをかけたのでしょうか?
であれば正規化が必要だと思われます。

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 スペクトル解析 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!