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
cbb81fe8
Commit
cbb81fe8
authored
8 months ago
by
Achilles Kappis
Browse files
Options
Downloads
Patches
Plain Diff
Changed variable name of srcCsd to Svv in obsFilt.m
parent
80575f59
No related branches found
No related tags found
1 merge request
!2
Update the MATLAB implementation of the optimal frequency domain observation filter
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Virtual Sensing/Remote Microphone Technique/MATLAB/Functions/obsFilt.m
+11
-11
11 additions, 11 deletions
...ng/Remote Microphone Technique/MATLAB/Functions/obsFilt.m
with
11 additions
and
11 deletions
Virtual Sensing/Remote Microphone Technique/MATLAB/Functions/obsFilt.m
+
11
−
11
View file @
cbb81fe8
...
...
@@ -22,10 +22,10 @@
% where K is the number of monitoring microphones and M is
% the number of sources.
%
%
srcCsd
[numeric] (Optional): The source cross spectral density matrix.
%
This
must be a square (MxM) symmetric matrix
%
with
the cross power spectral density of the
%
sources. [Default: eye(M)]
%
Svv
[numeric] (Optional): The source cross spectral density matrix.
This
% must be a square (MxM) symmetric matrix
with
% the cross power spectral density of the
% sources. [Default: eye(M)]
%
% regFacs [numeric] (Optional): The regularisation factors used for the
% inversion of the cross-spectra of the
...
...
@@ -75,7 +75,7 @@
% for local active sound control" by W. Jung, S. J. Elliott and J. Cheer.
%
% --------------------------------------------------
function
[
oOpt
,
Sme
,
Smm
,
condNum
]
=
obsFilt
(
Pe
,
Pm
,
srcCsd
,
regFacs
,
snrVal
)
function
[
oOpt
,
Sme
,
Smm
,
condNum
]
=
obsFilt
(
Pe
,
Pm
,
Svv
,
regFacs
,
snrVal
)
% ====================================================
% Check for number of arguments
% ====================================================
...
...
@@ -90,17 +90,17 @@ function [oOpt, Sme, Smm, condNum] = obsFilt(Pe, Pm, srcCsd, regFacs, snrVal)
validateattributes
(
Pm
,
"numeric"
,
{
'nonnan'
,
'nonempty'
,
'finite'
},
mfilename
,
"Monitoring microphone pressure"
,
2
);
% Validate optional arguments
if
nargin
>
2
&&
~
isempty
(
srcCsd
)
validateattributes
(
srcCsd
,
"numeric"
,
{
'2d'
,
'nonnan'
,
'finite'
},
mfilename
,
"Source cross spectral density matrix"
,
3
)
if
nargin
>
2
&&
~
isempty
(
Svv
)
validateattributes
(
Svv
,
"numeric"
,
{
'2d'
,
'nonnan'
,
'finite'
},
mfilename
,
"Source cross spectral density matrix"
,
3
)
% Check for correct dimensions
if
diff
(
size
(
srcCsd
))
if
diff
(
size
(
Svv
))
error
(
"The source power spectral density matrix must be a square matrix"
);
elseif
size
(
srcCsd
,
1
)
~=
size
(
Pe
,
1
)
elseif
size
(
Svv
,
1
)
~=
size
(
Pe
,
1
)
error
(
"The number of rows of the source power spectral density matrix must be equal to the number of sources"
);
end
else
srcCsd
=
eye
(
size
(
Pe
,
2
));
Svv
=
eye
(
size
(
Pe
,
2
));
end
if
nargin
>
3
&&
~
isempty
(
regFacs
)
...
...
@@ -134,7 +134,7 @@ function [oOpt, Sme, Smm, condNum] = obsFilt(Pe, Pm, srcCsd, regFacs, snrVal)
% Calculate optimal filters
% ====================================================
% Calculate needed quantities
tmpVal
=
srcCsd
*
Pm
'
;
tmpVal
=
Svv
*
Pm
'
;
Sme
=
Pe
*
tmpVal
;
% Virtual-Monitor mics cross-spectra
Smm
=
Pm
*
tmpVal
;
% Monitor-Monitor mics cross-spectra
...
...
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