zp2ctf
Convert zero-pole-gain filter parameters to cascaded transfer function form
Since R2024a
Description
[
computes the second-order Cascaded Transfer Functions (CTF) of a filter system described by its zeros B,A
] = zp2ctf(z,p
)z
and poles
p
.
[
specifies additional options using name-value arguments.B,A
] = zp2ctf(___,Name=Value
)
Examples
Input Arguments
Output Arguments
More About
Algorithms
The zp2ctf
function computes the numerator and denominator
coefficients of the cascaded-transfer-function sections from the zeros, poles, and gain of the
filter system. For an Nth-order filter system, there are (L!)2 possible combinations [1]. The variable
L is the nearest integer greater than or equal to N/2 or N/4 for second-order or fourth-order sections, respectively.
Customize the sorting criteria for pairing of the zeros and poles in the cascaded sections
by specifying Direction
to start with the poles and zeros closest to the
origin of the z-plane ("up"
), or closest to the unit circle
("down"
). Perform gain scaling across the cascaded sections by specifying
Scale
. Customize the order of the cascaded sections by setting
SectionOrder
to either 2
or 4
to
generate either second-order or fourth-order cascaded sections, respectively.
The output arguments B
and A
contain the
second-order or fourth-order cascaded transfer function coefficients of the filter system
distributed in L
rows.
Each row of
A
andB
lists the coefficients in each section.The function returns the first column of
A
as 1, thusA(1)=1
whenA
is a row vector.If you specify to return
gS
,zp2ctf
normalizes the numerator coefficients so that the first column ofB
is 1, and returns the overall system gain ingS
. Thus,B(1)=1
whenB
is a row vector.If you do not specify to return
gS
,zp2ctf
first normalizes the numerator coefficients so that the first column ofB
is 1, and then uniformly multipliessgn(gS)*gS^(1/L)
to the normalized numerator coefficients, so that the first column ofB
issgn(gS)*gS^(1/L)
. Thus,B(1)=gS
whenB
is a row vector.
If you specify second-order sections or do not specify
SectionOrder
, thezp2ctf
function returns the L-by-3 matricesB
andA
, where the last two columns correspond to the z–1 and z–2 terms for each cascaded section of the filter system.If you specify fourth-order sections, the
zp2ctf
function returns the L-by-5 matricesB
andA
, where the last two columns correspond to the z–3 and z–4 terms for each cascaded section of the filter system.
References
[1] Lyons, Richard G. Understanding Digital Signal Processing. Upper Saddle River, NJ: Prentice Hall, 2004.
Extended Capabilities
Version History
Introduced in R2024a
See Also
filterAnalyzer
| scaleFilterSections
| sos2ctf
| zp2sos
| zp2ss
| zp2tf