# 9. Driving functions for WFS¶

In the following, the driving functions for WFS in the frequency and temporal domain for selected source models are presented. The temporal domain functions consist of a filtering of the source signal and a weighting and delaying of the individual secondary source signals. This property allows for a very efficient implementation of WFS driving functions in the temporal domain. It is one of the main advantages of WFS in comparison to most of the NFC-HOA, SDM solutions discussed above.

## 9.1. Plane Wave¶

npw = 0, -1, 0  # direction of plane wave
omega = 2 * np.pi * 1000  # frequency
xref = 0, 0, 0  # 2.5D reference point
array = sfs.array.circular(200, 1.5)
grid = sfs.util.xyz_grid([-1.75, 1.75], [-1.75, 1.75], 0, spacing=0.02)
d, selection, secondary_source = \
sfs.fd.wfs.plane_25d(omega, array.x, array.n, npw, xref=xref)
twin = sfs.tapering.tukey(selection, alpha=.3)
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
sfs.plot2d.amplitude(p, grid, xnorm=xref)
sfs.plot2d.secondary_sources(array.x, array.n, grid=grid) Fig. 9.1 Sound pressure for a monochromatic plane wave synthesized with 2.5D WFS (9.10). Parameters: $$\n_k = (0, -1, 0)$$, $$\xref = (0, 0, 0)$$, $$f = 1$$ kHz.

By inserting the source model of a plane wave (7.1) into (5.2) and (6.5) it follows

(9.1)$D(\x_0,\w) = 2 w(\x_0) A(\w) \i\wc \scalarprod{\n_k}{\n_{\x_0}} \e{-\i\wc \scalarprod{\n_k}{\x_0}},$
(9.2)$D_\text{2.5D}(\x_0,\w) = 2 w(\x_0) A(\w) \sqrt{2\pi|\xref-x_0|} \sqrt{\i\wc } \scalarprod{\n_k}{\n_{\x_0}} \e{-\i\wc \scalarprod{\n_k}{\x_0}}.$

Transferred to the temporal domain via an inverse Fourier transform (2.2), it follows

(9.3)$d(\x_0,t) = 2 a(t) * h(t) * w(\x_0) \scalarprod{\n_k}{\n_{\x_0}} \dirac{t - \frac{\scalarprod{\n_k}{\x_0}}{c}},$
(9.4)\begin{aligned} d_\text{2.5D}(\x_0,t) =& 2 a(t) * h_\text{2.5D}(t) * w(\x_0) \sqrt{2\pi|\xref-x_0|} \\ &\cdot \scalarprod{\n_k}{\n_{\x_0}} \dirac{t - \frac{\scalarprod{\n_k}{\x_0}}{c}}, \end{aligned}

where

(9.5)$h(t) = \mathcal{F}^{-1}\left\{\i\wc \right\},$

and

(9.6)$h_\text{2.5D}(t) = \mathcal{F}^{-1}\left\{ \sqrt{\i\wc }\right\}$

denote the so called pre-equalization filters in WFS.

The window function $$w(\x_0)$$ for a plane wave as source model can be calculated after [SRA08] as

(9.7)$w(\x_0) = \begin{cases} 1 & \scalarprod{\n_k}{\n_{\x_0}} > 0 \\ 0 & \text{else} \end{cases}$

## 9.2. Point Source¶

xs = 0, 2.5, 0  # position of source
omega = 2 * np.pi * 1000  # frequency
xref = 0, 0, 0  # 2.5D reference point
array = sfs.array.circular(200, 1.5)
grid = sfs.util.xyz_grid([-1.75, 1.75], [-1.75, 1.75], 0, spacing=0.02)
d, selection, secondary_source = \
sfs.fd.wfs.point_25d(omega, array.x, array.n, xs, xref=xref)
twin = sfs.tapering.tukey(selection, alpha=.3)
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
normalization = 4 * np.pi
sfs.plot2d.amplitude(normalization * p, grid)
sfs.plot2d.secondary_sources(array.x, array.n, grid=grid) Fig. 9.2 Sound pressure for a monochromatic point source synthesized with 2.5D WFS (9.10). Parameters: $$\xs = (0, 2.5, 0)$$ m, $$\xref = (0, 0, 0)$$, $$f = 1$$ kHz.

By inserting the source model for a point source (7.6) into (5.2) it follows

(9.8)$D(\x_0,\w) = \frac{1}{2\pi} A(\w) w(\x_0) \i\wc \left(1 + \frac{1}{\i\wc|\x_0-\xs|} \right) \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}}{|\x_0-\xs|^2} \e{-\i\wc |\x_0-\xs|}.$

Under the assumption of $$\wc |\x_0-\xs| \gg 1$$, (9.8) can be approximated by [Sch16], eq. (2.118)

(9.9)$D(\x_0,\w) = \frac{1}{2\pi} A(\w) w(\x_0) \i\wc \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}}{|\x_0-\xs|^2} \e{-\i\wc |\x_0-\xs|}.$

It has the advantage that its temporal domain version could again be implemented as a simple weighting- and delaying-mechanism.

To reach at 2.5D for a point source, we will start in 3D and apply stationary phase approximations instead of directly using (6.5) – see discussion after [Sch16], (2.146). Under the assumption of $$\frac{\omega}{c} (|\x_0-\xs| + |\x-\x_0|) \gg 1$$ it then follows [Sch16], eq. (2.137), [Sta97], eq. (3.10, 3.11)

(9.10)\begin{aligned} D_\text{2.5D}(\x_0,\w) =& \frac{1}{\sqrt{2\pi}} A(\w) w(\x_0) \sqrt{\i\wc} \sqrt{\frac{|\xref-\x_0|}{|\xref-\x_0|+|\x_0-\xs|}} \\ &\cdot \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}} {|\x_0-\xs|^{\frac{3}{2}}} \e{-\i\wc |\x_0-\xs|}, \end{aligned}

whereby $$\xref$$ is a reference point at which the synthesis is correct. A second stationary phase approximation can be applied to reach at [Sch16], eq. (2.131, 2.141), [Sta97], eq. (3.16, 3.17)

(9.11)\begin{aligned} D_\text{2.5D}(\x_0,\w) =& \frac{1}{\sqrt{2\pi}} A(\w) w(\x_0) \sqrt{\i\wc} \sqrt{\frac{d_\text{ref}}{d_\text{ref}+d_\text{s}}} \\ &\cdot \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}} {|\x_0-\xs|^{\frac{3}{2}}} \e{-\i\wc |\x_0-\xs|}, \end{aligned}

which is the traditional formulation of a point source in WFS as given by eq. (2.27) in [Ver97] . Now $$d_\text{ref}$$ is the distance of a line parallel to the secondary source distribution and $$d_\text{s}$$ the shortest possible distance from the point source to the linear secondary source distribution.

The default WFS driving functions for a point source in the SFS Toolbox are (9.9) and (9.10). Transferring both to the temporal domain via an inverse Fourier transform (2.2) it follows

(9.12)$d(\x_0,t) = \frac{1}{2{\pi}} a(t) * h(t) * w(\x_0) \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}}{|\x_0-\xs|^2} \dirac{t-\frac{|\x_0-\xs|}{c}},$
(9.13)\begin{aligned} d_\text{2.5D}(\x_0,t) =& \frac{1}{\sqrt{2\pi}} a(t) * h_\text{2.5D}(t) * w(\x_0) \sqrt{\frac{|\xref-\x_0|}{|\x_0-\xs|+|\xref-\x_0|}} \\ &\cdot \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}} {|\x_0-\xs|^{\frac{3}{2}}} \dirac{t-\frac{|\x_0-\xs|}{c}}, \\ \end{aligned}
(9.14)\begin{aligned} d_\text{2.5D}(\x_0,t) =& \frac{1}{\sqrt{2\pi}} a(t) * h_\text{2.5D}(t) * w(\x_0) \sqrt{\frac{d_\text{ref}}{d_\text{ref}+d_\text{s}}} \\ &\cdot \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}} {|\x_0-\xs|^{\frac{3}{2}}} \dirac{t-\frac{|\x_0-\xs|}{c}}. \end{aligned}

The window function $$w(\x_0)$$ for a point source as source model can be calculated after [SRA08] as

(9.15)$w(\x_0) = \begin{cases} 1 & \scalarprod{\x_0-\xs}{\n_{\x_0}} > 0 \\ 0 & \text{else} \end{cases}$

## 9.3. Line Source¶

xs = 0, 2.5, 0  # position of source
omega = 2 * np.pi * 1000  # frequency
array = sfs.array.circular(200, 1.5)
grid = sfs.util.xyz_grid([-1.75, 1.75], [-1.75, 1.75], 0, spacing=0.02)
d, selection, secondary_source = \
sfs.fd.wfs.line_2d(omega, array.x, array.n, xs)
twin = sfs.tapering.tukey(selection, alpha=.3)
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
normalization = (np.sqrt(8 * np.pi * omega / sfs.default.c)
* np.exp(1j * np.pi / 4))
sfs.plot2d.amplitude(normalization * p, grid)
sfs.plot2d.secondary_sources(array.x, array.n, grid=grid) Fig. 9.3 Sound pressure for a monochromatic line source synthesized with 2D WFS (9.17). Parameters: $$\xs = (0, 2.5, 0)$$ m, $$\xref = (0, 0, 0)$$, $$f = 1$$ kHz.

For a line source its orientation $$\n_\text{s}$$ has an influence on the synthesized sound field as well. Let $$|\vec{v}|$$ be the distance between $$\x_0$$ and the line source with

(9.16)$\vec{v} = \x_0-\xs - \scalarprod{\x_0-\xs}{\n_\text{s}} \n_\text{s},$

where $$|\n_\text{s}| = 1$$. For a 2D or 2.5D secondary source setup and a line source orientation perpendicular to the plane where the secondary sources are located this automatically simplifies to $$\vec{v} = \x_0 - \xs$$.

By inserting the source model for a line source (7.12) into (5.2) and (6.5) and calculating the derivate of the Hankel function after http://dlmf.nist.gov/10.6.E6 it follows

(9.17)$D(\x_0,\w) = -\frac{1}{2}A(\w) w(\x_0) \i\wc \frac{\scalarprod{\vec{v}}{\n_{\x_0}}}{|\vec{v}|} \Hankel{2}{1}{\wc |\vec{v}|},$
(9.18)$D_\text{2.5D}(\x_0,\w) = -\frac{1}{2}g_0 A(\w) w(\x_0) \sqrt{\i\wc} \frac{\scalarprod{\vec{v}}{\n_{\x_0}}}{|\vec{v}|} \Hankel{2}{1}{\wc |\vec{v}|}.$

Applying $$\Hankel{2}{1}{\zeta} \approx -\sqrt{\frac{2}{\pi\i}\zeta} \e{-\i\zeta}$$ for $$z\gg1$$ after [Wil99], eq. (4.23) and transferred to the temporal domain via an inverse Fourier transform (2.2) it follows

(9.19)$d(\x_0,t) = \sqrt{\frac{1}{2\pi}} a(t) * h(t) * w(\x0) \frac{\scalarprod{\vec{v}}{\n_{\x_0}}}{|\vec{v}|^{\frac{3}{2}}} \dirac{t-\frac{|\vec{v}|}{c}},$
(9.20)$d_\text{2.5D}(\x_0,t) = g_0 \sqrt{\frac{1}{2\pi}} a(t) * {\mathcal{F}^{-1}\left\{\sqrt{\frac{c} {\i\w}}\right\}} * w(\x0) \frac{\scalarprod{\vec{v}}{\n_{\x_0}}}{|\vec{v}|^{\frac{3}{2}}} \dirac{t-\frac{|\vec{v}|}{c}},$

The window function $$w(\x_0)$$ for a line source as source model can be calculated after [SRA08] as

(9.21)$w(\x_0) = \begin{cases} 1 & \scalarprod{\vec{v}}{\n_{\x_0}} > 0 \\ 0 & \text{else} \end{cases}$

## 9.4. Focused Source¶

xs = 0, 0.5, 0  # position of source
ns = 0, -1, 0  # direction of source
omega = 2 * np.pi * 1000  # frequency
xref = 0, 0, 0  # 2.5D reference point
array= sfs.array.circular(200, 1.5)
grid = sfs.util.xyz_grid([-1.75, 1.75], [-1.75, 1.75], 0, spacing=0.02)
d, selection, secondary_source = \
sfs.fd.wfs.focused_25d(omega, array.x, array.n, xs, ns, xref=xref)
twin = sfs.tapering.tukey(selection, alpha=.3)
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
sfs.plot2d.amplitude(p, grid)
sfs.plot2d.secondary_sources(array.x, array.n, grid=grid) Fig. 9.4 Sound pressure for a monochromatic focused source synthesized with 2.5D WFS (9.23). Parameters: $$\xs = (0, 0.5, 0)$$ m, $$\n_\text{s} = (0, -1, 0)$$, $$\xref = (0, 0, 0)$$, $$f = 1$$ kHz.

As mentioned before, focused sources exhibit a field that converges in a focal point inside the audience area. After passing the focal point, the field becomes a diverging one as can be seen in Fig. 9.4. In order to choose the active secondary sources, especially for circular or spherical geometries, the focused source also needs a direction $$\n_\text{s}$$.

The driving function for a focused source is given by the td-reversed versions of the driving function for a point source (9.12) and (9.13) as

(9.22)$D(\x_0,\w) = \frac{1}{2\pi} A(\w) w(\x_0) \i\wc \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}}{|\x_0-\xs|^2} \e{\i\wc |\x_0-\xs|}.$

The 2.5D driving functions are given by the td-reversed version of (9.13) for a reference point after [Ver97], eq. (A.14) as

(9.23)\begin{aligned} D_\text{2.5D}(\x_0,\w) =& \frac{1}{\sqrt{2\pi}} A(\w) w(\x_0) \sqrt{\i\wc} \sqrt{\frac{|\xref-\x_0|}{||\x_0-\xs|-|\xref-\x_0||}} \\ &\cdot \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}} {|\x_0-\xs|^{\frac{3}{2}}} \e{\i\wc |\x_0-\xs|}, \end{aligned}

and the time reversed version of (9.14) for a reference line, compare [Sta97], eq. (3.16)

(9.24)\begin{aligned} D_\text{2.5D}(\x_0,\w) =& \frac{1}{\sqrt{2\pi}} A(\w) w(\x_0) \sqrt{\i\wc} \sqrt{\frac{d_\text{ref}}{d_\text{ref}-d_\text{s}}} \\ &\cdot \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}} {|\x_0-\xs|^{\frac{3}{2}}} \e{\i\wc |\x_0-\xs|}, \end{aligned}

where $$d_\text{ref}$$ is the distance of a line parallel to the secondary source distribution and $$d_\text{s}$$ the shortest possible distance from the focused source to the linear secondary source distribution.

Transferred to the temporal domain via an inverse Fourier transform (2.2) it follows

(9.25)$d(\x_0,t) = \frac{1}{2{\pi}} a(t) * h(t) * w(\x_0) \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}}{|\x_0-\xs|^2} \dirac{t+\frac{|\x_0-\xs|}{c}},$
(9.26)\begin{aligned} d_\text{2.5D}(\x_0,t) =& \frac{1}{\sqrt{2\pi}} a(t) * h_\text{2.5D}(t) * w(\x_0) \sqrt{\frac{|\xref-\x_0|}{||\x_0-\xs|-|\xref-\x_0||}} \\ &\cdot \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}} {|\x_0-\xs|^{\frac{3}{2}}} \dirac{t+\frac{|\x_0-\xs|}{c}}, \\ \end{aligned}
(9.27)\begin{aligned} d_\text{2.5D}(\x_0,t) =& \frac{1}{\sqrt{2\pi}} a(t) * h_\text{2.5D}(t) * w(\x_0) \sqrt{\frac{d_\text{ref}}{d_\text{ref}-d_\text{s}}} \\ &\cdot \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}} {|\x_0-\xs|^{\frac{3}{2}}} \dirac{t+\frac{|\x_0-\xs|}{c}}. \end{aligned}

In this document a focused source always refers to the td-reversed version of a point source, but a focused line source can be defined in the same way starting from (9.17)

(9.28)$D(\x_0,\w) = -\frac{1}{2}A(\w) w(\x_0) \i\wc \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}}{|\x_0-\xs|} \Hankel{1}{1}{\wc |\x_0-\xs|}.$

Transferred to the temporal domain via an inverse Fourier transform (2.2) it follows

(9.29)$d(\x_0,t) = \sqrt{\frac{1}{2\pi}} a(t) * h(t) * w(\x0) \frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}}{|\x_0-\xs|^{\frac{3}{2}}} \dirac{t+\frac{|\x_0-\xs|}{c}}.$

The window function $$w(\x_0)$$ for a focused source can be calculated as

(9.30)$w(\x_0) = \begin{cases} 1 & \scalarprod{\n_\text{s}}{\xs-\x_0} > 0 \\ 0 & \text{else} \end{cases}$
  Whereby $$r$$ corresponds to $$|\x_0-\xs|$$ and $$\cos\varphi$$ to $$\frac{\scalarprod{\x_0-\xs}{\n_{\x_0}}}{|\x_0-\xs|}$$.