A digital delay line (or simply delay line, also called delay filter) is a discrete element in a digital filter, which allows a signal to be delayed by a number of samples. Delay lines are commonly used to delay audio signals feeding loudspeakers to compensate for the speed of sound in air, and to align video signals with accompanying audio, called audio-to-video synchronization. Delay lines may compensate for electronic processing latency so that multiple signals leave a device simultaneously despite having different pathways.
Digital delay lines are widely used building blocks in methods to simulate room acoustics, musical instruments and effects units. Digital waveguide synthesis shows how digital delay lines can be used as sound synthesis methods for various musical instruments such as string instruments and wind instruments.
If a delay line holds a non-integer value smaller than one, it results in a fractional delay line (also called interpolated delay line or fractional delay filter). A series of an integer delay line and a fractional delay filter is commonly used for modelling arbitrary delay filters in digital signal processing. The Dattorro scheme is an industry standard implementation of digital filters using fractional delay lines.
x
M
In this case,y[n]=x[n-M]
\xrightarrow[]{l{Z}}
Y(z)=\overbrace{z-M
HM(z) } X(z).
z-M=HM(z)
\begin{cases}|\centerdot|=1=0dB,&zerodBgain\ \measuredangle=-\omegaM,&linearphasewith\omega=2\pifTswhereTsisthesamplingperiodinseconds[s].\end{cases}
The discrete-time domain filter for integer delay
M
HM(z)
M
Working in the discrete-time domain with fractional delays is less trivial. In its most general theoretical form, a delay line with arbitrary fractional delay is defined as a standard delay line with delayhm[n]=\begin{cases}1,&forn=M\ 0,&forn ≠ M.\end{cases}
D\inR
M\inZ
d\inR
l{Z}
HD(z)
The conceptually easiest solution is obtained by sampling the continuous-time domain solution, which is trivial for any delay value. Given a continuous-time signal
x
D\inR
\tau=DTs
y(t)=x(t-D)
\xrightarrow[]{l{F}}
Y(\omega)=\overbrace{e-j\omega
Hideal(\omega) } X(\omega).
In this case,
e-j\omega=Hideal(\omega)
\begin{cases}|\centerdot|=1=0dB,&zerodBgain\ \measuredangle=-\omegaD,&linearphase\ \taugr=-{d\measuredangle\over{d\omega}}=D,&constantgroupdelay\ \tauph=-{\measuredangle\over{\omega}}=-D,&constantphasedelay.\end{cases}
The naive solution for the sampled filter
hideal[n]
Hideal(\omega)
sinc
D
The continuous-time domainhideal[n]=l{F}-1[Hideal(\omega)]= {1\over{2\pi}}
+\pi \int\limits -\pi ej\omegaej\omegad\omega=sinc(n-D)={sin(\pi(n-D))\over{\pi(n-D)}}
sinc
D\inN
sinc
D\inR
sinc
The conceptually easiest implementable solution is the causal truncation of the naive solution above.
Truncating the impulse response might however cause instability, which can be mitigated in a few ways:h\tau[n]=\begin{cases}sinc(n-D)&for0\leqn\leqN\ 0&otherwise\end{cases} where {N-1\over{2}}<D<{N+1\over{2}} and N istheorderofthefilter.
L
sinc
h\tau[n]=\begin{cases}w(n-D)sinc(n-D)&forL\leqn\leqL+N\ 0&otherwise\end{cases} where L=\begin{cases}round(D)-{N\over{2}}&forevenN\ \lfloorD\rfloor-{N-1\over{2}}&foroddN\end{cases}
ELS={1\over{2\pi}}
\alpha\pi \int\limits -\alpha\pi w(\omega)
j\omega |H D(e )-
j\omega H D(e )|2d\omega where0<\alpha\leq1isthepassbandwidthparameter
What follows is an expansion of the formula above displaying the resulting filters of order up tohD[n]=
N \prod k=0, k ≠ n {D-k\over{n-k}} where 0\leqn\leqN
N=3
h\tau[0] | h\tau[1] | h\tau[2] | h\tau[3] | ||
N = 1 | 1-D | D | - | - | |
N = 2 | {(D-1)(D-2)\over{2}} | -D(D-2) | {D(D-1)\over{2}} | - | |
N = 3 | -{(D-1)(D-2)(D-3)\over{6}} | {D(D-2)(D-3)\over{2}} | -{D(D-1)(D-3)\over{2}} | {D(D-1)(D-2)\over{6}} |
Another approach is designing an IIR filter of order
N
D
The reciprocally placed zeros and poles of}}\;\;\;\;\; \text \;\;\;\;\; \begin |\centerdot| = 1 = 0dB & 0dB \text \\ \measuredangle_ = -N\omega + 2\measuredangle_ = -D\omega & \text D \endHD(z)={z-NA(z)\over{A(z-1)}}={aN+aN-1z-1
-(N-1) +...+a 1z +z-N
-1 \over{1+a 1z +...+aN-1z-(N-1)
-N +a Nz
A(z)andA(z-1)
|\centerdot|
A(z)
A(z)
ak
a0=1
\measuredangle | |
HD(z) |
=-D\omega
The main solutions are:
ELS={1\over{2\pi}}
\pi \int\limits -\pi w(\omega)|\underbrace{
\underbrace{-D\omega} \measuredangleID -\underbrace{(-N\omega+2\measuredangleA(z)
)} \measuredangleH
}
\Delta\measuredangle HD |2d\omega
ELS={1\over{2\pi}}
\pi \int\limits -\pi w(\omega)|{{
\Delta\measuredangle HD }\over{\omega}}|2
ak
D>0
What follows is an expansion of the formula above displaying the resulting coefficients of order up toak=
N (-1) l=0 {D+l\over{D+k+l}} where \binom{n}{k}={N!\over{k!(N-k)!}}
N=3
a0 | a1 | a2 | a3 | ||
N = 1 | 1 | -{D-1\over{D+1}} | - | - | |
N = 2 | 1 | -2{D-2\over{D+1}} | {(D-1)(D-2)\over{(D+1)(D+2)}} | - | |
N = 3 | 1 | -3{D-3\over{D+1}} | 3{(D-2)(D-3)\over{(D+1)(D+2)}} | -{(D-1)(D-2)(D-3)\over{(D+1)(D+2)(D+3)}} |
Digital delay lines were first used to compensate for the speed of sound in air in 1973 to provide appropriate delay times for the distant speaker towers at the Summer Jam at Watkins Glen rock festival in New York, with 600,000 people in the audience. New York City–based company Eventide Clock Works provided digital delay devices each capable of 200 milliseconds of delay. Four speaker towers were placed 200feet from the stage, their signal delayed 175 ms to compensate for the speed of sound between the main stage speakers and the delay towers. Six more speaker towers were placed 400 feet from the stage, requiring 350 ms of delay, and a further six towers were placed 600 feet away from the stage, fed with 525 ms of delay. Each Eventide DDL 1745 module contained one hundred 1000-bit shift register chips and a bespoke digital-to-analog converter, and cost $3,800 .[8] [9]