曲相
Zero-phase response of digital filter
Syntax
[Hr,w] = zerophase(b,a)
[Hr,w] = zerophase(sos)
[Hr,w] = zerophase(d)
[HR,W] = Zerophase(...,NFFT)
[Hr,w] = zerophase(...,nfft,'whole')
[HR,W] = Zerophase(...,W)
[Hr,f] = zerophase(...,f,fs)
[Hr,w,phi] = zerophase(...)
曲相(...)
Description
[Hr,w] = zerophase(b,a)
返回零相响应Hr
,频率向量w
(在弧度/样品中)Hr
is computed, given a filter defined by numeratorb
and denominatora
。For FIR filters wherea = 1
, you can omit the valuea
从命令。评估零相响应512
equally spaced points on the upper half of the unit circle.
The zero-phase response,Hr(ω),与频率响应有关,H(ejω), by
whereφ(ω)is the continuous phase.
Note
零相响应始终是真实的,但不相当于幅度响应。前者可能是负面的,而后者不能负面。
[Hr,w] = zerophase(sos)
返回零相响应for the second order sections matrix,SOS
。SOS
is aK-by-6 matrix, where the number of sections,K, must be greater than or equal to 2. If the number of sections is less than 2,曲相
considers the input to be the numerator vector,b
。Each row ofSOS
corresponds to the coefficients of a second order (biquad) filter. Theith row of theSOS
矩阵对应于[bi(1) bi(2) bi(3) ai(1) ai(2) ai(3)]
。
[Hr,w] = zerophase(d)
返回零相响应for the digital filter,d
。利用designfilt
to generated
based on frequency-response specifications.
[HR,W] = Zerophase(...,NFFT)
返回零相响应Hr
and frequency vectorw
(radians/sample), usingnfft
frequency points on the upper half of the unit circle. For best results, setnfft
to a value greater than the filter order.
[Hr,w] = zerophase(...,nfft,'whole')
返回零相响应Hr
and frequency vectorw
(radians/sample), usingnfft
frequency points around the whole unit circle.
[HR,W] = Zerophase(...,W)
返回零相响应Hr
and frequency vectorw
(radians/sample) at frequencies in vectorw
。The vectorw
must have at least two elements.
[Hr,f] = zerophase(...,f,fs)
返回零相响应Hr
and frequency vectorf
(Hz), using the sampling frequencyfs
(in Hz), to determine the frequency vectorf
(in Hz) at whichHr
is computed. The vectorf
must have at least two elements.
[Hr,w,phi] = zerophase(...)
返回零相响应Hr
,频率向量w
(RAD/样品)和连续相分量,皮
。(Note that this quantity is not equivalent to the phase response of the filter when the zero-phase response is negative.)
曲相(...)
plots the zero-phase response versus frequency. If you input the filter coefficients or second order sections matrix, the current figure window is used. If you input adigitalFilter
, the step response is displayed inFVTool。
Note
If the input to曲相
is single precision, the zero-phase response is calculated using single-precision arithmetic. The output,Hr
,是单个精度。
Examples
See Also
FVTool|designfilt
|digitalFilter
|freqs
|freqz
|grpdelay
|invfreqz
|Phaseelay
|阶段