Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
4
Merge Requests
4
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
0d4e517b
Commit
0d4e517b
authored
Nov 29, 2017
by
Markus Mueller-Trapet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add static pressure as input option
parent
3fcce815
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
kernel/DSP/ita_sound_power.m
kernel/DSP/ita_sound_power.m
+10
-12
No files found.
kernel/DSP/ita_sound_power.m
View file @
0d4e517b
...
@@ -14,6 +14,7 @@ function varargout = ita_sound_power(varargin)
...
@@ -14,6 +14,7 @@ function varargout = ita_sound_power(varargin)
% chamber
% chamber
% 'T' (20) : Temperature in deg Celsius
% 'T' (20) : Temperature in deg Celsius
% 'RH' (0.5) : Relative Humidity
% 'RH' (0.5) : Relative Humidity
% 'p_s' (101325) : Static pressure in Pa
%
%
% Example:
% Example:
% audioObjOut = ita_sound_power(audioObjIn)
% audioObjOut = ita_sound_power(audioObjIn)
...
@@ -31,17 +32,19 @@ function varargout = ita_sound_power(varargin)
...
@@ -31,17 +32,19 @@ function varargout = ita_sound_power(varargin)
% Author: Christian Haar -- Email: christian.haar@akustik.rwth-aachen.de
% Author: Christian Haar -- Email: christian.haar@akustik.rwth-aachen.de
% Created: 24-Jun-2010
% Created: 24-Jun-2010
% Re-write to conform with ISO 3741: Markus Mueller-Trapet -- Email: markus.mueller-trapet@nrc.ca
% Modified: 28-Nov-2017
%% Initialization and Input Parsing
%% Initialization and Input Parsing
sArgs
=
struct
(
'pos1_spl'
,
'itaSuper'
,
'pos2_T_empty'
,
'itaSuper'
,
'room_volume'
,
124
,
'room_surface'
,
181
,
'T'
,
20
,
'RH'
,
0.5
,
'freqRange'
,
ita_preferences
(
'freqRange'
),
'bandsPerOctave'
,
ita_preferences
(
'bandsPerOctave'
)
);
sArgs
=
struct
(
'pos1_spl'
,
'itaSuper'
,
'pos2_T_empty'
,
'itaSuper'
,
'room_volume'
,
124
,
'room_surface'
,
181
,
'T'
,
20
,
'RH'
,
0.5
,
'p_s'
,
101325
,
'freqRange'
,
ita_preferences
(
'freqRange'
),
'bandsPerOctave'
,
ita_preferences
(
'bandsPerOctave'
)
);
[
spl
,
T_empty
,
sArgs
]
=
ita_parse_arguments
(
sArgs
,
varargin
);
[
spl
,
T_empty
,
sArgs
]
=
ita_parse_arguments
(
sArgs
,
varargin
);
% acoustic constants
% acoustic constants
c
=
20.05
*
sqrt
(
273
+
sArgs
.
T
);
c
=
20.05
*
sqrt
(
273
+
sArgs
.
T
);
Z_0
=
itaValue
(
400
,
'kg/(m^2*s)'
);
% this is the fixed value to get the reference for 1pW right
% correction factors for the meteorological conditions (not in dB!)
% correction factors for the meteorological conditions (not in dB!)
% (assumes static pressure is the reference value)
C1
=
101325.
/
double
(
sArgs
.
p_s
)
.*
sqrt
((
273.15
+
sArgs
.
T
)/
314
);
C1
=
sqrt
((
273.15
+
sArgs
.
T
)/
314
);
C2
=
101325.
/
double
(
sArgs
.
p_s
)
.*
sqrt
((
273.15
+
sArgs
.
T
)/
296
)
.^
3
;
C2
=
sqrt
((
273.15
+
sArgs
.
T
)/
296
)
.^
3
;
%% calculate sound pressure level data
%% calculate sound pressure level data
% first third-octaves then average
% first third-octaves then average
...
@@ -53,14 +56,9 @@ spl_m = itaResult(spl_m,T_empty.freqVector);
...
@@ -53,14 +56,9 @@ spl_m = itaResult(spl_m,T_empty.freqVector);
A
=
55.26
*
itaValue
(
double
(
sArgs
.
room_volume
)/
c
,
's*m^2'
)/
T_empty
;
A
=
55.26
*
itaValue
(
double
(
sArgs
.
room_volume
)/
c
,
's*m^2'
)/
T_empty
;
%% calculate sound power (Eq 20 in ISO 3741)
%% calculate sound power (Eq 20 in ISO 3741)
sound_power
=
spl_m
^
2
*
A
*
10
^
(
-
6
/
10
)
*
C1
*
C2
;
sound_power
=
spl_m
^
2
*
A
/(
4
*
Z_0
);
% exponent and frequency-dependent part
% apply exponent and frequency-dependent corrections
sound_power
.
freq
=
sound_power
.
freq
.*
exp
(
A
.
freq
.
/
double
(
sArgs
.
room_surface
))
.*
(
1
+
double
(
sArgs
.
room_surface
)
*
c
.
/(
8
*
double
(
sArgs
.
room_volume
)
.*
sound_power
.
freqVector
));
sound_power
.
freq
=
C1
.*
C2
.*
sound_power
.
freq
.*
exp
(
A
.
freq
.
/
double
(
sArgs
.
room_surface
))
.*
(
1
+
double
(
sArgs
.
room_surface
)
*
c
.
/(
8
*
double
(
sArgs
.
room_volume
)
.*
sound_power
.
freqVector
));
% getting the reference values right
sound_power
=
sound_power
*
itaValue
(
1e-12
,
'W'
)/
itaValue
(
20e-6
,
'Pa'
)
^
2
/
itaValue
(
1
,
'm^2'
);
% or the straight-forward way:
% sound_power = spl_m^2 * A/(2*itaValue(c,'m/s')*itaValue(1.2,'kg/m^3'));
%% Add history line
%% Add history line
sound_power
=
ita_metainfo_add_historyline
(
sound_power
,
mfilename
,
varargin
);
sound_power
=
ita_metainfo_add_historyline
(
sound_power
,
mfilename
,
varargin
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment