Importing a Filter Design
Import Filter Panel
The Import Filter panel allows you to import a filter. You can access this region by clicking the Import Filter button in the sidebar.
The imported filter can be in any of the representations listed in the Filter Structure pull-down menu. You can import a filter as second-order sections by selecting the check box.
Specify the filter coefficients in Numerator and Denominator, either by entering them explicitly or by referring to variables in the MATLAB® workspace.
Select the frequency units from the following options in the Units menu, and for any frequency unit other than Normalized, specify the value or MATLAB workspace variable of the sampling frequency in the Fs field.
To import the filter, click the Import Filter button. The display region is automatically updated when the new filter has been imported.
You can edit the imported filter using the Pole/Zero Editor panel.
Filter Structures
The available filter structures are:
Direct Form, which includes direct-form I, direct-form II, direct-form I transposed, direct-form II transposed, and direct-form FIR
Lattice, which includes lattice allpass, lattice MA min phase, lattice MA max phase, and lattice ARMA
The structure that you choose determines the type of coefficients that you need to specify in the text fields to the right.
Direct-form
For direct-form I, direct-form II, direct-form I transposed, and direct-form II transposed, specify the filter by its transfer function representation
The Numerator field specifies a variable name or value for the numerator coefficient vector
b
, which containsm+1
coefficients in descending powers of z.The Denominator field specifies a variable name or value for the denominator coefficient vector
a
, which containsn+1
coefficients in descending powers of z. For FIR filters, the Denominator is1
.
Filters in transfer function form can be produced by all of the Signal Processing Toolbox™ filter design functions (such as fir1
, fir2
, firpm
, butter
, yulewalk
). See Transfer Function for more information.
Importing as second-order sections. For all direct-form structures, except direct-form FIR, you can import the filter in its second-order section representation:
The Gain field specifies a variable name or a value for the gain G, and the SOS Matrix field specifies a variable name or a value for the L-by-6 SOS matrix
whose rows contain the numerator and denominator coefficients bik and aik of the second-order sections of H(z).
Filters in second-order section form can be produced by functions such as tf2sos
, zp2sos
, ss2sos
, and sosfilt
. See Second-Order Sections (SOS) for more information.
Lattice
For lattice allpass, lattice minimum and maximum phase, and lattice ARMA filters, specify the filter by its lattice representation:
For lattice allpass, the Lattice coeff field specifies the lattice (reflection) coefficients,
k(1)
tok(N)
, whereN
is the filter order.For lattice MA (minimum or maximum phase), the Lattice coeff field specifies the lattice (reflection) coefficients,
k(1)
tok(N)
, whereN
is the filter order.For lattice ARMA, the Lattice coeff field specifies the lattice (reflection) coefficients,
k(1)
tok(N)
, and the Ladder coeff field specifies the ladder coefficients,v(1)
tov(N+1)
, whereN
is the filter order.
Filters in lattice form can be produced by tf2latc
. See Lattice Structure for more information.