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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPAH
IN-NOVA
Virtual Sensing
Commits
e5d4eb0c
Commit
e5d4eb0c
authored
1 year ago
by
Achilles Kappis
Browse files
Options
Downloads
Patches
Plain Diff
Add function to calculate the array manifold of an arbitrary array
parent
bc76efb0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Signal Processing/Array Processing/MATLAB/Functions/arrMan.m
+71
-0
71 additions, 0 deletions
Signal Processing/Array Processing/MATLAB/Functions/arrMan.m
with
71 additions
and
0 deletions
Signal Processing/Array Processing/MATLAB/Functions/arrMan.m
0 → 100644
+
71
−
0
View file @
e5d4eb0c
%% Calculate the array manifold (steering vector) of an arbitrary array
% --------------------------------------------------
% Author: Achilles Kappis
% e-mail: axilleaz@protonmail.com
%
% Date: 28/05/2024 (DD/MM/YYYY)
%
% Copyright: MIT
% --------------------------------------------------
% Functionality: Calculate the array manifold (steering vector) of an
% arbitrary array.
% --------------------------------------------------
% Input
%
% mPos [numeric]: The positions of the sensors in Cartesian coordinates.
% This must be an Mx3 matrix where M denotes the number of
% sensors and for each sensor the coordinates are in
% [x, y, z] format.
%
% dirs [numeric]: These are the directions for which the array manifold
% will be calculated. This must be an Nx2 matrix where N is
% the number of directions and for each direction the
% azimuth and elevation/inclination is given. The values
% must be provided in radians. The directions must be
% pointing towards the incoming plane waves and not towards
% the array/origin.
%
% k [numeric]: The wavenumbers of interest. This must be a vector
% containing all the wavenumbers for which the array manifold
% will be calculated.
%
% --------------------------------------------------
% Output
%
% am [numeric]: The array manifold/steering vector of the array for the
% directions/angles and wavenumbers provided. The dimensions
% of the argument are MxNxK where M is the number of sensors,
% N the number of directions/angles and K the number of
% frequencies/wavenumbers.
%
% --------------------------------------------------
% Notes
%
% --------------------------------------------------
function
am
=
arrMan
(
mPos
,
dirs
,
k
)
% ====================================================
% Check for number of arguments
% ====================================================
narginchk
(
3
,
3
);
nargoutchk
(
0
,
1
);
% ====================================================
% Validate input arguments
% ====================================================
% Validate mandatory arguments
validateattributes
(
mPos
,
"numeric"
,
{
'2d'
,
'finite'
,
'nonnan'
,
'nonempty'
,
'real'
,
'ncols'
,
3
},
mfilename
,
"Position of sensors"
,
1
);
validateattributes
(
dirs
,
"numeric"
,
{
'2d'
,
'finite'
,
'nonnan'
,
'nonempty'
,
'real'
,
'ncols'
,
2
},
mfilename
,
"Directions of interest"
,
2
);
validateattributes
(
k
,
"numeric"
,
{
'vector'
,
'finite'
,
'nonnan'
,
'nonempty'
,
'nonnegative'
,
'real'
},
mfilename
,
"Wavenumbers of interest"
,
3
);
% =============================================
% Calculate the array manifold
% =============================================
% Get Cartesian coordinates of directions
[
x
,
y
,
z
]
=
sph2cart
(
dirs
(:,
1
),
dirs
(:,
2
),
ones
(
size
(
dirs
(:,
1
))));
% Inner product of directions and sensor position
am
=
mPos
*
[
x
,
y
,
z
]
.'
;
% Multiply with wavenumbers
am
=
am
.*
permute
(
k
(:),
[
3
,
2
,
1
]);
end
\ No newline at end of file
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