digital delay line
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.{{Citation |last1=Laakso |first1=Timo I. |title=Splitting the unit delay [FIR/all pass filters design] |date=January 1996 |magazine=IEEE Signal Processing Magazine |volume=13 |issue=1 |pages=30–60 |doi=10.1109/79.482137 |last2=Välimäki |first2=Vesa |last3=Karjalainen |first3=Matti A. |last4=Laine |first4=Unto K.|bibcode=1996ISPM...13...30L }} The Dattorro scheme is an industry standard implementation of digital filters using fractional delay lines.{{Citation |last1=Smith |first1=Julius O. |title=Computational Acoustic Modeling with Digital Delay |date=June 5, 2008 |url=http://ccrma.stanford.edu/realsimple/Delay/Delay_lines.html |website=Center for Computer Research in Music and Acoustics |access-date=2007-08-21 |last2=Lee |first2=Nelson}}
Theory
The standard delay line with integer delay is derived from the Z-transform of a discrete-time signal delayed by samples{{Cite web |title=Delay Lines |url=https://ccrma.stanford.edu/~jos/pasp/Delay_Lines.html |access-date=2023-07-06 |website=ccrma.stanford.edu}}:
In this case, is the integer delay filter with:
The discrete-time domain filter for integer delay as the inverse zeta transform of is trivial, since it is an impulse shifted by {{Cite web |title=INTRODUCTION TO DIGITAL FILTERS WITH AUDIO APPLICATIONS |url=https://ccrma.stanford.edu/~jos/filters/ |access-date=2023-07-06 |website=ccrma.stanford.edu}}:
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 delay , which can be modelled as the sum of an integer component and a fractional component which is smaller than one sample:{{Equation box 1|border|indent=:|title=(Fractional) Delay Line - Domain|equation={{NumBlk||
|{{EquationRef|Def. 1}}}}|cellpadding=6|border colour=#0073CF|background colour=#F5FFFA}}This is the domain representation of a non-trivial digital filter design problem: the solution is an any time-domain filter that represents or approximates the inverse Z-transform of .
Filter design solutions
= Naive solution =
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 delayed by samples, or seconds{{Cite web |title=Ideal Bandlimited (Sinc) Interpolation |url=https://ccrma.stanford.edu/~jos/Interpolation/Ideal_Bandlimited_Sinc_Interpolation.html |access-date=2023-07-06 |website=ccrma.stanford.edu}}:
In this case, is the continuous-time domain fractional delay filter with:
\text{constant phase delay.} \end{cases}
The naive solution for the sampled filter is the sampled inverse Fourier transform of , which produces a non-causal IIR filter shaped as a Cardinal Sine shifted by :
The continuous-time domain is shifted by the fractional delay while the sampling is always aligned to the cartesian plane, therefore:- when the delay is an integer number of samples , the sampled shifted degenerates to a shifted impulse just like in the theoretical solution.
- when the delay is a fractional number of samples , the sampled shifted produces a non-causal IIR filter, which is not implementable in practice.
File:Sampling of continuous-time domain sinc function at various fractional delay values.gif
= Truncated causal FIR solution =
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:- Windowing the truncated impulse response, therefore smoothing it. Note that in this case we have to add a further shift in order to align the window and the and provide symmetric filtering{{Cite journal |last=Harris |first=F.J. |date=1978 |title=On the use of windows for harmonic analysis with the discrete Fourier transform |url=http://dx.doi.org/10.1109/proc.1978.10837 |journal=Proceedings of the IEEE |volume=66 |issue=1 |pages=51–83 |doi=10.1109/proc.1978.10837 |s2cid=426548 |issn=0018-9219|url-access=subscription }}.
- General Least Square (GLS) Method: iteratively adjusts the frequency response by windowing a Least Square Integral Error design, which minimises the square integral error between ideal and truncated frequency responses of the filter, defined as:
- Lagrange Interpolator (Maximally Flat Fractional Delay Filter):{{Cite journal |last=Hermanowicz |first=E. |date=1992 |title={{as written|Expl|icity [sic]}} formulas for weighting coefficients of maximally flat tunable FIR delays |url=https://digital-library.theiet.org/content/journals/10.1049/el_19921239 |journal=Electronics Letters |language=en |volume=28 |issue=20 |pages=1936 |doi=10.1049/el:19921239|url-access=subscription }} adds "flatness" constraints to the first N derivatives of the Least Square Integral Error. This method is of particular interest because it has a closed form solution:
File:Block Diagram for the Explicit Formula for Lagrange Interpolation Coefficients.png}}]]
What follows is an expansion of the formula above displaying the resulting filters of order up to :class="wikitable"
|+ |
|
| | | |
N = 1
| | | - | - |
N = 2
| | | | - |
N = 3
| | | | |
= All-pass IIR phase-approximated solution =
Another approach is designing an IIR filter of order with a Z-transform structure that forces it to be an all-pass while still approximating a delay:
The reciprocally placed zeros and poles of respectively flatten the Frequency response, while the phase is function of the phase of . Therefore, the problem becomes designing the FIR filter , that is finding its coefficients as a function of D (note that always), so that the phase approximates best the desired value .The main solutions are:
- Iterative minimization of Least Square Phase Delay Error, which is defined as:
- Thiran All-Pole Low-Pass Filter with Maximally Flat Group Delay.{{Cite journal |last=Thiran |first=J.-P. |date=1971 |title=Recursive digital filters with maximally flat group delay |url=https://ieeexplore.ieee.org/document/1083363 |journal=IEEE Transactions on Circuit Theory |volume=18 |issue=6 |pages=659–664 |doi=10.1109/TCT.1971.1083363 |issn=0018-9324|url-access=subscription }} This yields a closed solution for finding the coefficients for positive delay :
What follows is an expansion of the formula above displaying the resulting coefficients of order up to :
class="wikitable"
|+ ! colspan="5" |Thiran All-Pole Low-Pass Filter Coefficients Formula Expansion{{Cite web |last=Välimäki |first=Vesa |date=1998 |title=Discrete Time Modeling of Acoustic Tubes Using Fractional Delay Filters |url=http://users.spa.aalto.fi/vpv/publications/vesan_vaitos/ |access-date= |website=}} |
|
| | | |
N = 1
|1 | | - | - |
N = 2
|1 | | | - |
N = 3
|1 | | | |
Commercial history
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 {{convert|200|ft|-1}} 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 ({{Inflation|index=US|value=3800|start_year=1972|fmt=eq|cursign=$}}).{{cite web |author=Nalia Sanchez |date=July 29, 2016 |title=Remembering the Watkins Glen Festival |url=https://www.eventideaudio.com/blog/jgoldbach/remembering-watkins-glenn-festival |access-date=February 20, 2020 |website=Eventide Audio |mode=cs2}}{{Cite web |title=DDL 1745 Digital Delay |url=https://www.eventideaudio.com/rackmount/ddl-1745/ |access-date=2023-07-22 |website=Eventide Audio |language=en-US}}
See also
References
Further reading
- {{Cite journal |last1=Valimaki |first1=Vesa |last2=Laakso |first2=Timo |last3=Karjalainen |first3=Matti |last4=Laine |first4=Unto |date=1996 |title=Splitting the Unit Delay |url=https://www.academia.edu/97506981 |journal=IEEE Signal Processing Magazine |volume=13 |issue=1 |pages=30–60 |doi=10.1109/79.482137 |bibcode=1996ISPM...13...30L |via=IEEE Explore}}
- {{Cite journal |last=Harris |first=Frederic J. |date=January 1978 |title=On the use of windows for harmonic analysis with the discrete Fourier transform |url=https://ieeexplore.ieee.org/document/1455106 |journal=Proceedings of the IEEE |volume=66 |issue=1 |pages=51–83 |doi=10.1109/PROC.1978.10837 |s2cid=426548 |via=IEEE Explore|url-access=subscription }}
External links
- [https://ccrma.stanford.edu/~jos/filters/ Introduction to Digital Filters] by Julius Smith
- [https://ccrma.stanford.edu/~jos/sasp/ Spectral Audio Signal Processing] by Julius Smith
- [https://ccrma.stanford.edu/~jos/pasp/ Physical Audio Signal Processing] by Julius Smith
- [http://users.spa.aalto.fi/vpv/publications/vesan_vaitos/ Discrete-Time Modeling of Acoustic Tubes Using Fractional Delay Filters] by Valimaki Vesa