Signal Processing Toolbox | ![]() ![]() |
Construct a discrete-time, second-order section, direct form II filter object
Syntax
Description
Hd = dfilt.df2sos(s)
returns a discrete-time, second-order section, direct form II filter object, Hd
, with coefficients given in the s
matrix.
Hd = dfilt.df2sos(b1,a1,b2,a2,...)
returns a discrete-time, second-order section, direct form II object, Hd
, with coefficients for the first section given in the b1
and a1
vectors, for the second section given in the b2
and a2
vectors, etc.
Hd = dfilt.df2sos(...,g)
includes a gain vector g
. The elements of g
are the gains for each section. The maximum length of g
is the number of sections plus one. If g
is not specified, all gains default to one.
Hd = dfilt.df2sos
returns a default, discrete-time, second-order section, direct form II filter object, Hd
. This filter passes the input through to the output unchanged.
Note
If a(1) is not equal to 1, the 1/a(1) block is included as shown below. If a(1) is equal to 1, the 1/a(1) block is replaced by a direct connection.
|
Examples
Specify a second-order section, direct form II dfilt
object for a Butterworth filter converted to second-order sections, with the following code:
[z,p,k] = butter(30,0.5); [s,g] = zp2sos(z,p,k); Hd = dfilt.df2sos(s,g) Hd = FilterStructure: 'Direct form II, second-order-sections' sosMatrix: [15x6 double] ScaleValues: 2.5160e-008
See Also
dfilt
, dfilt.df1sos
, dfilt.df1tsos
, dfilt.df2tsos
![]() | dfilt.df2 | dfilt.df2t | ![]() |