Commit 0e54cc71 authored by Johannes Klein's avatar Johannes Klein Committed by Marco Berzborn

Akustische Messtechnik excercise update

Added options for HD2 instead of itaMSTFbandpass
parent a0df615e
%% demo: sound insulation measurement %% demo: sound insulation measurement
% Demo fr die Messtechnik Vorlesung % Demo fr die Messtechnik Vorlesung
% mgu/jck 2014 % mbe/jck/mgu 2017
%% Init %% Init
ccx; ccx;
%% Measurement Setup for Dode sub and mid-range %% Measurement Setup for Dode sub and mid-range
freqRange = [50 5000]; % Script for itaMSTF with HD2 and Dode. Comments for itaMSTFbandpass.
freqRangeSweep = [freqRange(1) / 2 178; 178 freqRange(2) *2]; freqRange = [50 10000]; % [50 5000]
% freqRangeSweep = [freqRange(1) / 2 178; 178 freqRange(2) *2];
bandsPerOctave = 3; bandsPerOctave = 3;
averages = 2; averages = 2;
MS = itaMSTFbandpass; MS = itaMSTF; % itaMSTFbandpass
MS.inputChannels = 1; MS.inputChannels = 1;
MS.outputChannels = [1 3]; MS.outputChannels = 1;
MS.freqRange = freqRangeSweep; MS.freqRange = freqRange;%freqRangeSweep;
MS.outputamplification = 30; MS.outputamplification = 30;
MS.fftDegree = 19; MS.fftDegree = 20;
MS.stopMargin = 2.5; MS.stopMargin = 2.5;
MS.latencysamples = 8303; MS.latencysamples = 8303;
...@@ -24,17 +25,19 @@ MS.latencysamples = 8303; ...@@ -24,17 +25,19 @@ MS.latencysamples = 8303;
%% Reverb %% Reverb
% Source: Receiver Room % Source: Receiver Room
% Receiver: Receiver Room % Receiver: Receiver Room
pause(5)
receiverRoomRIR = MS.run; receiverRoomRIR = MS.run;
receiverRoomRIR = ita_time_window(receiverRoomRIR,[4 5], 'time', 'crop');
ra = ita_roomacoustics(receiverRoomRIR.merge, 'freqRange',freqRange, 'bandsPerOctave', bandsPerOctave, 'T20'); %% Compute and plot
ra = ita_roomacoustics(receiverRoomRIR, 'freqRange', freqRange, 'bandsPerOctave', bandsPerOctave, 'T20');
RT = ra.T20; RT = ra.T20;
RT.plot_freq RT.plot_freq
%% Receiver Room Level %% Receiver Room Level
% Source: Source Room % Source: Source Room
% Receiver: Receiver Room % Receiver: Receiver Room
pause(5)
for idm = 1:averages for idm = 1:averages
receiverRoom(idm) = MS.run; receiverRoom(idm) = MS.run;
end end
...@@ -45,7 +48,7 @@ receiverRoom.channelUnits(:) = {'Pa'}; ...@@ -45,7 +48,7 @@ receiverRoom.channelUnits(:) = {'Pa'};
%% Source Room Level %% Source Room Level
% Source: Source Room % Source: Source Room
% Receiver: Source Room % Receiver: Source Room
pause(5)
for idm = 1:averages for idm = 1:averages
sourceRoom(idm) = MS.run; %#ok<*SAGROW> sourceRoom(idm) = MS.run; %#ok<*SAGROW>
end end
...@@ -75,8 +78,8 @@ D.bar ...@@ -75,8 +78,8 @@ D.bar
%% Ri %% Ri
% Receiver room data % Receiver room data
V = 65*6; % Volume V = 154; % Volume
S = 220; % Wall surface S = 194; % Wall surface
% Equivalent absorption area % Equivalent absorption area
A = 0.163 * V ./ RT.freqData; A = 0.163 * V ./ RT.freqData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment