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
039885ea
Commit
039885ea
authored
9 months ago
by
Achilles Kappis
Browse files
Options
Downloads
Patches
Plain Diff
Changed variable name of srcCsd to Svv in obsFiltEst.m
parent
cbb81fe8
Branches
Branches containing commit
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/obsFiltEst.m
+12
-12
12 additions, 12 deletions
...Remote Microphone Technique/MATLAB/Functions/obsFiltEst.m
with
12 additions
and
12 deletions
Virtual Sensing/Remote Microphone Technique/MATLAB/Functions/obsFiltEst.m
+
12
−
12
View file @
039885ea
...
@@ -28,10 +28,10 @@
...
@@ -28,10 +28,10 @@
% matrix must be NxM, where N is the number of
% matrix must be NxM, where N is the number of
% virtual microphones and M the number of sources.
% virtual microphones and M the number of sources.
%
%
%
srcCsd
[numeric] (Optional): The source cross spectral density matrix.
%
Svv
[numeric] (Optional): The source cross spectral density matrix.
This
%
This
must be a square (MxM) symmetric matrix
% must be a square (MxM) symmetric matrix
with
%
with
the cross power spectral density of the
% the cross power spectral density of the
%
sources. [Default: eye(M)]
% sources. [Default: eye(M)]
%
%
% --------------------------------------------------
% --------------------------------------------------
% Output
% Output
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
% Notes
% Notes
%
%
% --------------------------------------------------
% --------------------------------------------------
function
[
est
,
err
,
errSqr
,
normErrSqr
,
See
]
=
obsFiltEst
(
Pm
,
O
,
Pe
,
srcCsd
)
function
[
est
,
err
,
errSqr
,
normErrSqr
,
See
]
=
obsFiltEst
(
Pm
,
O
,
Pe
,
Svv
)
% ====================================================
% ====================================================
% Check for number of arguments
% Check for number of arguments
% ====================================================
% ====================================================
...
@@ -82,17 +82,17 @@ function [est, err, errSqr, normErrSqr, See] = obsFiltEst(Pm, O, Pe, srcCsd)
...
@@ -82,17 +82,17 @@ function [est, err, errSqr, normErrSqr, See] = obsFiltEst(Pm, O, Pe, srcCsd)
Pe
=
NaN
;
Pe
=
NaN
;
end
end
if
nargin
>
3
&&
~
isempty
(
srcCsd
)
if
nargin
>
3
&&
~
isempty
(
Svv
)
validateattributes
(
srcCsd
,
"numeric"
,
{
'2d'
,
'nonnan'
,
'finite'
},
mfilename
,
"Source cross spectral density matrix"
,
3
)
validateattributes
(
Svv
,
"numeric"
,
{
'2d'
,
'nonnan'
,
'finite'
},
mfilename
,
"Source cross spectral density matrix"
,
3
)
% Check for correct dimensions
% Check for correct dimensions
if
diff
(
size
(
srcCsd
))
if
diff
(
size
(
Svv
))
error
(
"The source power spectral density matrix must be a square matrix"
);
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"
);
error
(
"The number of rows of the source power spectral density matrix must be equal to the number of sources"
);
end
end
else
else
srcCsd
=
eye
(
size
(
Pe
,
2
));
Svv
=
eye
(
size
(
Pe
,
2
));
end
end
...
@@ -110,7 +110,7 @@ function [est, err, errSqr, normErrSqr, See] = obsFiltEst(Pm, O, Pe, srcCsd)
...
@@ -110,7 +110,7 @@ function [est, err, errSqr, normErrSqr, See] = obsFiltEst(Pm, O, Pe, srcCsd)
% Sum of squared estimation errors
% Sum of squared estimation errors
if
nargout
>
2
if
nargout
>
2
for
eIdx
=
size
(
Pe
,
1
):
-
1
:
1
for
eIdx
=
size
(
Pe
,
1
):
-
1
:
1
errSqr
(
eIdx
)
=
err
(
eIdx
,
:)
*
srcCsd
*
err
(
eIdx
,
:)
'
;
errSqr
(
eIdx
)
=
err
(
eIdx
,
:)
*
Svv
*
err
(
eIdx
,
:)
'
;
end
end
errSqr
=
errSqr
.'
;
errSqr
=
errSqr
.'
;
...
@@ -119,7 +119,7 @@ function [est, err, errSqr, normErrSqr, See] = obsFiltEst(Pm, O, Pe, srcCsd)
...
@@ -119,7 +119,7 @@ function [est, err, errSqr, normErrSqr, See] = obsFiltEst(Pm, O, Pe, srcCsd)
% Normalised squared errors
% Normalised squared errors
if
nargout
>
3
if
nargout
>
3
for
eIdx
=
length
(
errSqr
):
-
1
:
1
for
eIdx
=
length
(
errSqr
):
-
1
:
1
See
(
eIdx
)
=
Pe
(
eIdx
,
:)
*
srcCsd
*
Pe
(
eIdx
,
:)
'
;
See
(
eIdx
)
=
Pe
(
eIdx
,
:)
*
Svv
*
Pe
(
eIdx
,
:)
'
;
normErrSqr
(
eIdx
)
=
errSqr
(
eIdx
)/
See
(
eIdx
);
normErrSqr
(
eIdx
)
=
errSqr
(
eIdx
)/
See
(
eIdx
);
end
end
...
...
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