Documentation Center |
Phase delay of filter
[phi,w]=phasedelay(hfilt)
[phi,w]=phasedelay(hfilt,n)
phasedelay(hfilt)
[phi,w]
= phasedelay(hs)
[phi,w]
= phasedelay(hs,n)
[phi,w]
= phasedelay(hs,Name,Value)
phasedelay(hs)
phasedelay returns the phase delay based on the current filter coefficients. This section describes phasedelay operation for discrete-time filters and multirate filters. For more information about optional input arguments for phasedelay, refer to phasedelay in Signal Processing Toolbox™ documentation.
[phi,w]=phasedelay(hfilt) returns the phase response phi of the filter hfilt and the corresponding frequencies w at which the function evaluates the phase delay.
The phase delay is evaluated at 8192 points equally spaced around the upper half of the unit circle.
[phi,w]=phasedelay(hfilt,n) returns the phase delay phi of the filter hfilt and the corresponding frequencies w at which the function evaluates the phase delay. The phase delay is evaluated at n points equally spaced around the upper half of the unit circle.
phasedelay(hfilt) displays the phase delay of hfilt in the Filter Visualization Tool (FVTool).
[phi,w] = phasedelay(hs) returns the phase delay for the filter System object™ hs using 8192 samples.
[phi,w] = phasedelay(hs,n) returns the phase delay for the filter System object hs using n samples.
[phi,w] = phasedelay(hs,Name,Value) returns the phase delay with additional options specified by one or more Name,Value pair arguments.
phasedelay(hs) uses FVTool to plot the phase delay of the filter System object hs.
hfilt |
hfilt is either:
The multirate filter delay response is computed relative to the rate at which the filter is running. When you specify fs (the sampling rate) as an input argument, phasedelay assumes the filter is running at that rate. For multistage cascades, phasedelay forms a single-stage multirate filter that is equivalent to the cascade. It then computes the response relative to the rate at which the equivalent filter is running. phasedelay does not support all multistage cascades. The function analyzes only those cascades for which there exists an equivalent single-stage filter. As an example, consider a 2-stage interpolator where the first stage has an interpolation factor of 2 and the second stage has an interpolation factor of 4. In this case, an equivalent single-stage filter exists with an overall interpolation factor of 8. phasedelay uses this equivalent filter for the analysis. If a sampling frequency fs is specified as an input argument to phasedelay, the function interprets fs as the rate at which the equivalent filter is running. |
hs |
Filter System object. The following Filter System objects are supported by this analysis function: |
n |
Number of samples. For an FIR filter where n is a power of two, the computation is done faster using FFTs. Default: 8192 |
Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
'Arithmetic' |
For filter System object inputs only, specify the arithmetic used during analysis. When you specify 'double' or 'single', the function performs double- or single-precision analysis. When you specify 'fixed' , the arithmetic changes depending on the setting of the CoefficientDataType property and whether the System object is locked or unlocked. Details for Fixed-Point Arithmetic When you do not specify the arithmetic for non-CIC structures, the function uses double-precision arithmetic if the filter System object is in an unlocked state. If the System object is locked, the function performs analysis based on the locked input data type. CIC structures only support fixed-point arithmetic. |
phi |
Complex, n-element phase-delay vector. If hfilt is a vector of filters, phi is a complex, length(hfilt)-by-n matrix of phase-delay vectors whose columns correspond to each filter in hfilt. If n is not specified, the function uses a default value of 8192. For adaptive filters, phi is the instantaneous phase delay. |
w |
Frequency vector of length n, in radians/sample. w consists of n points equally spaced around the upper half of the unit circle (from 0 to π radians/sample). If hfilt is a vector of filters, w is a complex, length(hfilt)-by-n matrix of phase-delay vectors whose columns correspond to each filter in hfilt. If n is not specified, the function uses a default value of 8192. |
You can provide fs, the sampling frequency, as an input as well. phasedelay uses fs to calculate the delay response and plots the response to fs/2.
freqz | freqz | fvtool | grpdelay | phasez | phasez | zerophase | zerophase | zplane