FFT and SPL: Calibrating a microphone?
11 次查看(过去 30 天)
显示 更早的评论
I’m trying to calibrate a microphone for further measurements. I have this equipment: - Microphone Sensitivity: 50mV/Pa - Preamp and A/D Converter gain: 0dB And I want to calibrate it using: - Bruel 4231 Calibrator 94dB @ 1Khz.
So I wrote the following program to analyze the calibrator signal:
Pref=20e-6;
MIC_gain=50e-3;%50mV/pA
%VarName1 manually imported: Time
%VarName3 manually imported: Volts
N=length(VarName1);
fs=1/(VarName1(2)-VarName1(1));
VarName3=VarName3./MIC_gain;
RMS = sqrt(mean(VarName3.^2));
% Just for information - not used
DbTOTAL=20*log10(RMS/Pref);
% Flat top windowing
VarName3=VarName3.*flattopwin(N)';
% DFT
y=fft(VarName3);
% dB - Is it OK?
db = 20*log10((2/N).*(RMS).*(abs(y)/Pref));
f = (0:length(VarName1)-1)*fs/length(VarName1);
figure
% Still have to cut freq up to Fs/2
plot(f,db);
My idea is to measure the higher peak at around 1Khz and compare it with 94db, to get a calibration constant. Any advice/correction is welcome. Thanks!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Measurements and Spatial Audio 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!