Arbitrary group delay filter specification object
D = fdesign.arbgrpdelay(SPEC)
D = fdesign.arbgrpdelay(SPEC,SPEC1,SPEC2,...
)
D = fdesign.arbgrpdelay(N
,F
,Gd
)
D = fdesign.arbgrpdelay(...,Fs)
Arbitrary group delay filters are allpass filters you can use
for correcting phase distortion introduced by other filters. fdesign.arbgrpdelay
uses
an iterative least pth norm optimization procedure
to minimize the phase response error [1].
specifies
an allpass arbitrary group delay filter with the D
= fdesign.arbgrpdelay(SPEC
)Specification
property
set to SPEC
. See Input Arguments for a description of supported specifications.
initializes
the allpass arbitrary group delay filter specification object with
specifications D
= fdesign.arbgrpdelay(SPEC
,SPEC1,SPEC2,...
)SPEC1,SPEC2,...
. See SPEC for a description of supported
specifications.
specifies
an allpass arbitrary group delay filter. The filter order is equal
to D
= fdesign.arbgrpdelay(N
,F
,Gd
)N
, frequency vector equal to F
,
and group delay vector equal to Gd
. See SPEC for a description of the
filter order, frequency vector, and group delay vector inputs. See
the example Allpass Filter with
Arbitrary Group Delay for an example using this syntax.
specifies
the sampling frequency in hertz as a trailing scalar. If you do not
specify a sampling frequency, all frequencies are normalized frequencies
and group delay values are in samples. If you specify a sampling frequency,
group delay values are in seconds.D
= fdesign.arbgrpdelay(...,Fs
)
If your arbitrary group delay design produces the error Poorly
conditioned Hessian matrix
, attempt one or more of the following:
Set the MaxPoleRadius
IIR lp norm
design option to some number less than 1. Set this option when you design
your filter with the syntax:
design(d,'iirlpnorm','MaxPoleRadius',0.95)
MaxPoleRadius
design option.Reduce the order of your filter design.

Specification string.
The string entries are defined as follows:
Default: 

Sampling frequency. Specify the sampling frequency as a trailing positive scalar after all other input arguments. Specifying a sampling frequency forces the group delay units to be in seconds. If you specify a sampling frequency, the first element of the frequency vector must be 0. The last element must be the Nyquist frequency, Fs/2. 

Filter specification object. An allpass arbitrary group delay
filter specification object containing the following modifiable properties: Use the 
Construct a signal consisting of two discretetime windowed sinusoids (wave packets) with disjoint time support to illustrate frequency dispersion. One discretetime sinusoid has a frequency of π/2 radians/sample and the other has a frequency of π/4 radians/sample. There are 9 periods of the higher–frequency sinusoid that precede 5 periods of the lower–frequency signal.
Create the signal.
x = zeros(300,1); x(1:36) = cos(pi/2*(0:35)).*hamming(36)'; x(40:40+39) = cos(pi/4*(0:39)).*hamming(40)';
Create an arbitrary group delay filter that delays the higher–frequency wave packet by approximately 100 samples.
N = 18; f = 0:.1:1; gd = ones(size(f)); % Delay pi/2 radians/sample by 100 samples gd(6) = 100; d = fdesign.arbgrpdelay(N,f,gd); Hd = design(d,'iirlpnorm','MaxPoleRadius',0.9); % Visualize the group delay fvtool(Hd,'analysis','grpdelay');
Filter the input signal with the arbitrary group delay filter and illustrate the frequency dispersion. The high–frequency wave packet, which initially preceded the low–frequency wave packet, now occurs later because of the nonconstant group delay.
y = filter(Hd,x); subplot(211) plot(x); title('Input Signal'); grid on; ylabel('Amplitude'); subplot(212); plot(y); title('Output Signal'); grid on; xlabel('Samples'); ylabel('Amplitude');
Design an allpass filter with an arbitrary group delay.
N = 10; f = [0 0.02 0.04 0.06 0.08 0.1 0.25 0.5 0.75 1]; g = [5 5 5 5 5 5 4 3 2 1]; w = [2 2 2 2 2 2 1 1 1 1]; hgd = fdesign.arbgrpdelay(N,f,g); Hgd = design(hgd,'iirlpnorm','Weights',w,'MaxPoleRadius',0.95); fvtool(Hgd,'Analysis','grpdelay') ;
Perform multiband delay equalization outside the stopband.
Fs = 1e3; Hcheby2 = design(fdesign.bandstop('N,Fst1,Fst2,Ast',10,150,400,60,Fs),'cheby2'); f1 = 0.0:0.5:150; % Hz g1 = grpdelay(Hcheby2,f1,Fs).'/Fs; % seconds f2 = 400:0.5:500; % Hz g2 = grpdelay(Hcheby2,f2,Fs).'/Fs; % seconds maxg = max([g1 g2]); % Design an arbitrary group delay allpass filter to equalize the group % delay of the bandstop filter. Use an order 18 multiband design and specify % two bands. hgd = fdesign.arbgrpdelay('N,B,F,Gd',18,2,f1,maxgg1,f2,maxgg2,Fs); Hgd = design(hgd,'iirlpnorm','MaxPoleRadius',0.95); Hcascade = cascade(Hcheby2,Hgd); hft = fvtool(Hcheby2,Hgd,Hcascade,'Analysis','grpdelay','Fs',Fs); legend(hft,'Original Bandstop Filter','Allpass Arbitrary Group Delay Filter',... 'Delay Equalization', 'Location','North');
iirgrpdelay
— Returns
an allpass arbitrary group delay filter. The iirgrpdelay
function
returns the numerator and denominator coefficients. This behavior
differs from that of fdesign.arbgrpdelay
, which
returns the filter in secondorder sections. iirgrpdelay
accepts
only normalized frequencies.
[1] Antoniou, A. Digital Signal Processing: Signals, Systems, and Filters., New York:McGrawHill, 2006, pp. 719–771.
design
 fdesign
 iirgrpdelay