Main Content

thiran

Generate fractional delay filter based on Thiran approximation

Description

example

sys = thiran(tau,Ts) discretizes the continuous-time delay tau using a Thiran filter to approximate the fractional part of the delay. Ts specifies the sample time of the filter, which is returned as a discrete-time transfer function model. The Thiran fractional-delay filter has the following form:

H(z)=aNzN+aN1zN1++a0a0zN+a1zN1++aN.

The coefficients a0, ..., aN are given by:

ak=(1)k(Nk)i=0NDN+iDN+k+i,k:1,2,,Na0=1

where D = τ/Ts and N = ceil(D) is the filter order. See [1].

Examples

collapse all

Approximate and discretize a time delay of 2.4 s with a sample time of 1 s.

sys = thiran(2.4,1)
sys =
 
  0.004159 z^3 - 0.04813 z^2 + 0.5294 z + 1
  -----------------------------------------
   z^3 + 0.5294 z^2 - 0.04813 z + 0.004159
 
Sample time: 1 seconds
Discrete-time transfer function.

The time delay is not an integer multiple of the sample time. Therefore, the approximation sys is a discrete-time transfer function of order 3.

Discretize a time delay of 2.5 s with a sample time of 0.5 s.

sys = thiran(2.5,0.5)
sys =
 
   1
  ---
  z^5
 
Sample time: 0.5 seconds
Discrete-time transfer function.

Here, the time delay is an exactly five times the target sample time. Therefore, sys is a pure discrete delay of order 5.

Input Arguments

collapse all

Time delay to discretize, specified as a positive scalar value. thiran assumes that tau is in seconds.

Sample time of discretized approximation of time delay, specified as a positive scalar value. thiran assumes that Ts is in seconds.

Output Arguments

collapse all

Discretized approximation of time delay, returned as a discrete-time transfer function (tf) model with sample time Ts.

  • If tau is an integer multiple of Ts, then sys represents the pure discrete delay zN, with N = tau/Ts.

  • Otherwise, sys is a discrete-time, all-pass, infinite impulse response (IIR) filter of order ceil(tau/Ts).

The filter is a discrete-time, all-pass, infinite impulse response (IIR) filter of order ceil(tau/Ts). The unit sys.TimeUnit is 'seconds'.

Tips

  • thiran approximates and discretizes a pure time delay. To approximate a pure continuous-time time delay without discretizing, use pade. To discretize continuous-time models having time delays, use c2d.

References

[1] T. Laakso, V. Valimaki, “Splitting the Unit Delay”, IEEE Signal Processing Magazine, Vol. 13, No. 1, p.30-60, 1996.

Version History

Introduced in R2010a

See Also

| |