next up previous contents
Next: 3 osfilter Up: 9 Non-adaptive, Visualization and Previous: 1 init_ ipwin   Contents


2 mcmixr

Purpose
Multichannel mixer, calculates the signals measured by M sensors in response to applying N signals at N different actuators.

Syntax
yn = mcmixr(h,xn,scale)



Description
Figure 9.2: A multichannel system with two actuators and three sensors.
Consider a multichannel systems with N actuators (speakers for instance) and M sensors (microphones) as that shown in Fig. 9.2. A signal applied at one of the actuators usually contribute to the response of all sensors. The response of each sensor is given by
\begin{displaymath}
y_m(n) = \sum \limits_{n=1}^{N} h_{nm} * x_{n}(n); \;\; m=1,2,\cdots,M,
\end{displaymath} (80)

where $h_{nm}$ in (9.1) is the transfer function between the $n^{th}$ actuator and $m^{th}$ sensor, and $*$ is the convolution operator. mcmixr() takes as input the multichannel transfer function $h$ and the actuator signals $x(n)$ and returns the sensors' response $y(n)$. The multichannel transfer function must be stored in a 3D matrix of dimensions $[L \times N \times M]$, where L is the number of coefficients of each transfer function, N is the number of actuators, and M is the number of sensors. If the lengths of the transfer functions are not the same, the shorter ones should be padded with zeros at the end. The input signals to the actuators $x(n)$ can either be a column vector or a matrix of N columns. If the input $x(n)$ is a column vector, the same signal is applied to all actuators. If $x(n)$ is a matrix of $N$ columns, each column is applied to the corresponding actuator in $h$. The sensors' response is returned as a matrix of $M$ columns. The third input parameter to mcmixr() is a flag, if 1, scaling of the calculated response will be performed. The input and output parameters of mcmixr() are summarized below.
Input Parameters [Size] :: 
   h     : multichannel transfer function [L1 x N x M]
   xn    : actuators' inputs [L2 x N]
   scale : if 1, scaling of output is performed 

Output parameters [Size] ::
   y     : sensors' output [L2 x M]



\epsfig{file=/home/john/winD/docs/aspt/aspt/figs/mcmixr.eps,width=0.5\textwidth}

Example
% Multichannel transfer function between two actuators
% and three sensors
h = zeros(32,2,3);
ip       = [1; zeros(31,1)];  % impulse vector		
h(:,1,1) = filter(1,[1 -.9 .9],ip);
h(:,1,2) = filter(1,[1 -.5 .5],ip);
h(:,1,3) = filter(1,[1 -.4],ip);
h(:,2,1) = filter(1,[1 -.85 .85],ip);
h(:,2,2) = filter(1,[1 -.7],ip);
h(:,2,3) = filter(1,[1 -.3 .9],ip);
xn = randn(1000,2);    % Input signal [1000 x 2]
yn = mcmixr(h,xn,0);   % output signal [1000 x 3]			

Remarks
mcmixr() supports both real and complex signals and transfer functions. Although speakers and microphones are used to describe the functionality of mcmixr(), its use is not limited to audio applications and acoustic transfer functions. Transfer functions measured between shakers and accelerometers or between voltage sources and voltmeters can also be processed using mcmixr().


next up previous contents
Next: 3 osfilter Up: 9 Non-adaptive, Visualization and Previous: 1 init_ ipwin   Contents