validateattributes(Pe,"numeric",{'nonempty','finite','nonnan'},mfilename,"Tranfer function matrix from primary sources to error/virtual the microphones.",1);
validateattributes(Pm,"numeric",{'nonempty','finite','nonnan','ncols',size(Pe,2)},mfilename,"Tranfer function matrix from primary sources to the monitoring microphones.",2);
validateattributes(Px,"numeric",{'nonempty','finite','nonnan','ncols',size(Pe,2)},mfilename,"Tranfer function matrix from primary sources to the reference microphones.",3);
validateattributes(Ge,"numeric",{'nonempty','finite','nonnan','nrows',size(Pe,1)},mfilename,"Plant response matrix from the secondary sources to the error/virtual microphones",4);
validateattributes(Gm,"numeric",{'nonempty','finite','nonnan','nrows',size(Pm,1)},mfilename,"Plant response matrix from the secondary sources to the monitoring microphones",5);
% Validate optional arguments
ifnargin>5&&~isempty(GeEst)
validateattributes(GeEst,"numeric",{'finite','nonnan','nrows',size(Pe,1),'ncols',size(Ge,2)},mfilename,"Estimated plant response matrix from the secondary sources to the error/virtual microphones",6);
else
GeEst=Ge;
end
ifnargin>6&&~isempty(GmEst)
validateattributes(GmEst,"numeric",{'finite','nonnan','nrows',size(Pm,1),'ncols',size(Ge,2)},mfilename,"Estimated plant response matrix from the secondary sources to the monitoring microphones",7);
validateattributes(gRegFac,"numeric",{'scalar','nonnegative','finite','nonnan','real'},mfilename,"Reference signal cross spectral density matrix regularisation factor.",11);
validateattributes(Peval,{'numeric'},{'2d','ncols',size(Pe,2)},mfilename,"Primary path transfer functions to evaluation positions",13);
else
Peval=[];
end
ifnargin>13&&~isempty(Geval)
ifisempty(Peval)
error("'Peval' cannot be empty if 'Geval' is provided.");
end
validateattributes(Geval,{'numeric'},{'2d','ncols',size(Ge,2)},mfilename,"Secondary path transfer functions to evaluation positions (plant responses)",14);
The *Remote Microphone Technique* (RMT) was introduced by Roure and Albarrazin \[[1](#references)\] to control a sound field at locations remote from sensors. The sound field is estimated at a remote position based on the measurements at the physical sensors through an observation filter, constituting the transfer function from the physical sensors to the remote location termed *virtual microphone*. An optimal, in the least-squares sense, observation filter is estimated in a preliminary *identification phase* and consequently used during the control phase.
More information on the formulation used in the development of this project can be found in the [*Documentation*]() file.
## Dependencies
The implementations are dependent on functions from the [Utilities](https://gitlab.com/in-nova/in-nova/-/tree/main/Utilities/MATLAB?ref_type=heads). The necessary files are listed below:
- ptsOnSphere.m
- twoPtDist.m
- rotMat3d.m
## Examples
A condensed example of a very simple estimation case is shown below and more examples can be found in the [*Documentation*](https://gitlab.com/in-nova/in-nova/-/tree/main/Documentation/latex?ref_type=heads), along with a complete description of all the functions.
```matlab
% Place primary sources, physical and virtual microphones
ePos=virtMicGeo("Grid",2,0,0,0,11^2,"xy");% Virtual/error mic positions on a grid
% Calculate transfer functions
Pm=ptSrcField(vPos,mPos,7.5e2);% Primary-to-monitoring transfer function (f = 750 Hz)
Pe=ptSrcField(vPos,ePos,7.5e2);% Primary-to-virtual transfer function (f = 750 Hz)
% Perform estimation and acquire the normalised square estimation error
[~,~,~,~,~,~,normSqrErr]=obsFilt(Pe,Pm,[],1e2);% Use regularisation factor 100
```
#### Acknowledgments
None.
## References
[1] A. Roure, A. Albarrazin, *"The remote microphone technique for active noise control"*, Inter-Noise and Noise-Con Congress and Conference Proceedings, Active99, Fort Lauderdale FL, pp. 1233-1244(12).