Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Virtual Sensing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPAH
IN-NOVA
Virtual Sensing
Commits
5dc9385d
There was an error fetching the commit references. Please try again later.
Commit
5dc9385d
authored
3 months ago
by
Achilles Kappis
Browse files
Options
Downloads
Patches
Plain Diff
Added different DMA desings for 2D and 3D diffuse sound fields
parent
771e83fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Signal Processing/Array Processing/MATLAB/Functions/firstOrderDma.m
+39
-8
39 additions, 8 deletions
...cessing/Array Processing/MATLAB/Functions/firstOrderDma.m
with
39 additions
and
8 deletions
Signal Processing/Array Processing/MATLAB/Functions/firstOrderDma.m
+
39
−
8
View file @
5dc9385d
...
...
@@ -27,15 +27,23 @@
% - Omni, Omnidirectional,
% Monopole
% - Dipole, Figure-of-Eight
% - Cardioid
% - Hypercardioid
% - Supercardioid
% - Cardioid, Cardio
% - Hypercardioid, Hyper,
% Hypercardioid2D, Hyper2D,
% Hypercardioid3D, Hyper3D
% - Supercardioid, Super,
% Supercardioid2D, Super2D,
% Supercardioid3D, Super3D
% It can also be a numeric value
% representing the angle for
% which the response is
% specified (input parameter
% "beta") in degrees.
% [Default: Dipole]
% "beta") in degrees. For more
% information on the differences
% between the 2D and 3D versions
% of the Hyper- and
% Super-cardioids see the notes
% below. [Default: Dipole]
%
% beta [numeric] (Optional): The (normalised to unity) response at the
% angle specified with teh parameter "pPattern".
...
...
@@ -63,6 +71,18 @@
% --------------------------------------------------
% Notes
%
% - 2D and 3D versions: The directional patterns of the Hypercardioid and
% Supercardioid are based on the optimisation of the
% Directivity Index/Factor (DI/DF) and the
% Front-to-Back Ratio (FBR). However, the results
% depend on the type of the considered noise field.
% Thus, the desings that optimise these metrics are
% different for the spherically (3D) and
% the cylindrically (2D) diffuse fields. The
% available values without a dimension (either 2D or
% 3D) correspond to the spherically diffuse sound
% field (3D case).
%
% --------------------------------------------------
function
[
h
,
output
]
=
firstOrderDma
(
freq
,
d
,
pPattern
,
beta
,
input
)
% ====================================================
...
...
@@ -100,6 +120,11 @@ function [h, output] = firstOrderDma(freq, d, pPattern, beta, input)
if
nargin
>
2
&&
~
isempty
(
pPattern
)
if
isstring
(
pPattern
)
||
ischar
(
pPattern
)
validateattributes
(
pPattern
,
{
'char'
,
'string'
},
{
'scalartext'
,
'nonempty'
},
mfilename
,
'Polar pattern'
,
3
);
validatestring
(
pPattern
,
[
"Omni"
,
"Omnidirectional"
,
"Monopole"
,
...
"Dipole"
,
"Figure-of-Eight"
,
...
"Cardioid"
,
"Cardio"
,
...
"Hypercardioid"
,
"Hyper"
,
"Hypercardoid2d"
,
"Hyper2d"
,
"Hypercardoid3d"
,
"Hyper3d"
,
...
"Supercardioid"
,
"Super"
,
"Supercardoid2d"
,
"Super2d"
,
"Supercardoid3d"
,
"Super3d"
])
elseif
isnumeric
(
pPattern
)
validateattributes
(
pPattern
,
{
'numeric'
},
{
'scalar'
,
'real'
,
'nonnan'
,
'finite'
,
'nonempty'
},
mfilename
,
'Angle of null'
,
3
);
end
...
...
@@ -129,13 +154,19 @@ function [h, output] = firstOrderDma(freq, d, pPattern, beta, input)
case
{
'dipole'
,
'figure-of-eight'
}
pPattern
=
pi
/
2
;
beta
=
0
;
case
'cardioid'
case
{
'cardioid'
,
'cardio'
}
pPattern
=
-
pi
;
beta
=
0
;
case
'hypercardioid'
case
{
'hypercardioid'
,
'hyper'
,
'hypercardioid3d'
,
'hyper3d'
}
pPattern
=
acos
(
-
1
/
3
);
beta
=
0
;
case
{
'hypercardioid2d'
,
'hyper2d'
}
pPattern
=
(
2
*
pi
/
3
);
beta
=
0
;
case
'supercardioid'
case
{
'supercardioid'
,
'super'
,
'supercardioid3d'
,
'super3d'
}
pPattern
=
deg2rad
(
125
);
beta
=
0
;
case
{
'supercardioid2d'
,
'super2d'
}
pPattern
=
(
3
*
pi
/
4
);
beta
=
0
;
otherwise
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment