# dfilt.df2tsos

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

## Syntax

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

## Description

Hd = dfilt.df2tsos(s) returns a discrete-time, second-order section, direct-form II, transposed filter, Hd, with coefficients given in the s matrix.

Hd = dfilt.df2tsos(b1,a1,b2,a2,...) returns a discrete-time, second-order section, direct-form II, transposed filter, 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.df2tsos(...,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.df2tsos returns a default, discrete-time, second-order section, direct-form II, transposed 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

$\left(\begin{array}{cc}z1\left(1\right)& z2\left(1\right)\\ z1\left(2\right)& z2\left(2\right)\end{array}\right)$

## Examples

collapse all

### Elliptic Filter as Second-Order Sections

Design a second-order sections, direct-form II, transposed discrete-time filter starting from a 6th-order lowpass elliptic filter. Specify a passband edge frequency of rad/sample, a passband ripple of 1 dB, and a stopband attenuation of 60 dB. Visualize the filter response.

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