This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Discrete-time, second-order section, direct-form II filter


Hd = dfilt.df2sos(s)
Hd = dfilt.df2sos(b1,a1,b2,a2,...)
Hd = dfilt.df2sos(...,g)
Hd = dfilt.df2sos


Hd = dfilt.df2sos(s) returns a discrete-time, second-order section, direct-form II filter, 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, Hd. This filter passes the input through to the output unchanged.

    Note   The leading coefficient of the denominator a(1) cannot be 0.

The resulting filter states column vector is


For filters with more than one section, each section is a separate column in the vector.


Specify a second-order sections, direct-form II discrete-time filter with coefficients from a sixth order, lowpass, elliptical filter using the following code:

[z,p,k] = ellip(6,1,60,.4);   % Obtain filter coefficients
[s,g] = zp2sos(z,p,k);        % Convert to SOS
Hd = dfilt.df2sos(s,g)

Introduced before R2006a

Was this topic helpful?