# Steered-Response Power Phase Transform

Steered-Response Power Phase Transform (SRP-PHAT) is a popular algorithm for acoustic source localization,[1] well-known for its robust performance in adverse acoustic environments.[2] The algorithm can be interpreted as a beamforming-based approach that searches for the candidate position that maximizes the output of a steered delay-and-sum beamformer.

## Algorithm

### Steered-Response Power

Consider a system of ${\displaystyle M}$ microphones, where each microphone is denoted by a subindex ${\displaystyle m\in \{1,\dots ,M\}}$. The discrete-time output signal from a microphone is ${\displaystyle s_{m}(n)}$. The steered-response power (SRP) at a spatial point ${\displaystyle \mathbf {x} =[x,y,z]^{T}}$ can be expressed as

${\displaystyle P(\mathbf {x} )\triangleq \sum _{n\in \mathbb {Z} }\left\vert \sum _{m=1}^{M}s_{m}(n-\tau _{m}(\mathbf {x} ))\right\vert ^{2},}$

where ${\displaystyle \mathbb {Z} }$ denotes the set of integer numbers and ${\displaystyle \tau _{m}(\mathbf {x} )}$ would be the time-lag due to the propagation from a source located at ${\displaystyle \mathbf {x} }$ to the ${\displaystyle m}$-th microphone.

The SRP can be rewritten as

${\displaystyle P(\mathbf {x} )={\frac {1}{2\pi }}\sum _{m_{1}=1}^{M}\sum _{m_{2}=1}^{M}\int _{-\pi }^{\pi }\Phi _{m_{1},m_{2}}(e^{j\omega })S_{m_{1}}(e^{j\omega })S_{m_{2}}^{*}(e^{j\omega })e^{j\omega \tau _{m_{1},m_{2}}(\mathbf {x} )}d\omega ,}$

where ${\displaystyle ()^{*}}$ denotes complex conjugation, ${\displaystyle S_{m}(e^{j\omega })}$ represents the discrete-time Fourier transform of ${\displaystyle s_{m}(n)}$ and ${\displaystyle \Phi _{m_{1},m_{2}}(e^{j\omega })}$ is a weighting function in the frequency domain (later discussed). The term ${\displaystyle \tau _{m_{1},m_{2}}(\mathbf {x} )}$ is the discrete time-difference of arrival (TDOA) of a signal emitted at position ${\displaystyle \mathbf {x} }$ to microphones ${\displaystyle m_{1}}$ and ${\displaystyle m_{2}}$, given by

${\displaystyle \tau _{m_{1},m_{2}}(\mathbf {x} )\triangleq \left\lfloor f_{s}{\frac {\|\mathbf {x} -\mathbf {x} _{m_{1}}\|-\|\mathbf {x} -\mathbf {x} _{m_{2}}\|}{c}}\right\rceil ,}$

where ${\displaystyle f_{s}}$ is the sampling frequency of the system, ${\displaystyle c}$ is the sound propagation speed, ${\displaystyle \mathbf {x} _{m}}$ is the position of the ${\displaystyle m}$-th microphone, ${\displaystyle \|\cdot \|}$ is the 2-norm and ${\displaystyle \lfloor \cdot \rceil }$ denotes the rounding operator.

### Generalized Cross-Correlation

The above SRP objective function can be expressed as a sum of Generalized Cross-Correlations (GCCs) for the different microphone pairs at the time-lag corresponding to their TDOA

${\displaystyle P(\mathbf {x} )=\sum _{m_{1}=1}^{M}\sum _{m_{2}=1}^{M}R_{m_{1},m_{2}}(\tau _{m_{1},m_{2}}(\mathbf {x} )),}$

where the GCC for a microphone pair ${\displaystyle (m_{1},m_{2})}$ is defined as

${\displaystyle R_{m_{1},m_{2}}(\tau )\triangleq {\frac {1}{2\pi }}\int _{-\pi }^{\pi }\Phi _{m_{1},m_{2}}(e^{j\omega })S_{m_{1}}(e^{j\omega })S_{m_{2}}^{*}(e^{j\omega })e^{j\omega \tau }d\omega .}$

The phase transform (PHAT) is an effective GCC weighting for time delay estimation in reverberant environments, that forces the GCC to consider only the phase information of the involved signals:

${\displaystyle \Phi _{m_{1},m_{2}}(e^{j\omega })\triangleq {\frac {1}{\vert S_{m_{1}}(e^{j\omega })S_{m_{2}}^{*}(e^{j\omega })\vert }}.}$

### Estimation of source location

The SRP-PHAT algorithm consists in a grid-search procedure that evaluates the objective function ${\displaystyle P(\mathbf {x} )}$ on a grid of candidate source locations ${\displaystyle {\mathcal {G}}}$ to estimate the spatial location of the sound source, ${\displaystyle {\textbf {x}}_{s}}$, as the point of the grid that provides the maximum SRP:

${\displaystyle {\hat {\mathbf {x} }}_{s}=\arg \max _{\mathbf {x} \in {\mathcal {G}}}P(\mathbf {x} ).}$

## Modified SRP-PHAT

Modifications of the classical SRP-PHAT algorithm have been proposed to reduce the computational cost of the grid-search step of the algorithm and to increase the robustness of the method. In the classical SRP-PHAT, for each microphone pair and for each point of the grid, an unique integer TDOA value is selected to be the acoustic delay corresponding to that grid point. This procedure does not guarantee that all TDOAs are associated to points on the grid, nor that the spatial grid is consistent, since some of the points may not correspond to an intersection of hyperboloids. This issue becomes more problematic with coarse grids since, when the number of points is reduced, part of the TDOA information gets lost because most delays are not anymore associated to any point in the grid.

The modified SRP-PHAT[3] collects and uses the TDOA information related to the volume surrounding each spatial point of the search grid by considering a modified objective function:

${\displaystyle P'(\mathbf {x} )=\sum _{m_{1}=1}^{M}\sum _{m_{2}=1}^{M}\sum _{\tau =L_{m_{1},m_{2}}^{l}(\mathbf {x} )}^{L_{m_{1},m_{2}}^{u}(\mathbf {x} )}R_{m_{1},m_{2}}(\tau ),}$

where ${\displaystyle L_{m_{1},m_{2}}^{l}(\mathbf {x} )}$ and ${\displaystyle L_{m_{1},m_{2}}^{u}(\mathbf {x} )}$ are the lower and upper accumulation limits of GCC delays, which depend on the spatial location ${\displaystyle \mathbf {x} }$.

### Accumulation limits

The accumulation limits can be calculated beforehand in an exact way by exploring the boundaries separating the regions corresponding to the points of the grid. Alternatively, they can be selected by considering the spatial gradient of the TDOA ${\displaystyle \nabla _{\tau _{m_{1},m_{2}}}(\mathbf {x} )=[\nabla _{x\tau _{m_{1},m_{2}}}(\mathbf {x} ),\nabla _{y\tau _{m_{1},m_{2}}}(\mathbf {x} ),\nabla _{z\tau _{m_{1},m_{2}}}(\mathbf {x} )]^{T}}$, where each component ${\displaystyle \gamma \in \left\{x,y,z\right\}}$ of the gradient is:

${\displaystyle \nabla _{\gamma \tau _{m_{1},m_{2}}}(\mathbf {x} )={\frac {1}{c}}\left({\frac {\gamma -\gamma _{m_{1}}}{\|\mathbf {x} -\mathbf {x} _{m_{1}}\|}}-{\frac {\gamma -\gamma _{m_{2}}}{\|\mathbf {x} -\mathbf {x} _{m_{2}}\|}}\right).}$

For a rectangular grid where neighboring points are separated a distance ${\displaystyle r}$, the lower and upper accumulation limits are given by:

${\displaystyle L_{m_{1},m_{2}}^{l}(\mathbf {x} )=\tau _{m_{1},m_{2}}(\mathbf {x} )-\|\nabla _{\tau _{m_{1},m_{2}}}(\mathbf {x} )\|\cdot d}$
${\displaystyle L_{m_{1},m_{2}}^{u}(\mathbf {x} )=\tau _{m_{1},m_{2}}(\mathbf {x} )+\|\nabla _{\tau _{m_{1},m_{2}}}(\mathbf {x} )\|\cdot d,}$

where ${\displaystyle d=(r/2)\min \left({\frac {1}{\vert \sin(\theta )\cos(\phi )\vert }},{\frac {1}{\vert \sin(\theta )\sin(\phi )\vert }},{\frac {1}{\vert \cos(\theta )\vert }}\right)}$ and the gradient direction angles are given by

${\displaystyle \theta =\cos ^{-1}\left({\frac {\nabla _{z\tau _{m_{1},m_{2}}}(\mathbf {x} )}{\|\nabla _{\tau _{m_{1},m_{2}}}(\mathbf {x} )\|}}\right),}$
${\displaystyle \phi =\arctan _{2}\left(\nabla _{y\tau _{m_{1},m_{2}}}(\mathbf {x} ),\nabla _{x\tau _{m_{1},m_{2}}}(\mathbf {x} )\right).}$