Skip to Main Content Skip to Search
Product Documentation

filt - Specify discrete transfer functions in DSP format

Syntax

sys = filt(num,den)
sys = filt(num,den,Ts)
sys = filt(M)

Description

In digital signal processing (DSP), it is customary to write transfer functions as rational expressions in z−1 and to order the numerator and denominator terms in ascending powers of z−1. For example:

The function filt is provided to facilitate the specification of transfer functions in DSP format.

sys = filt(num,den) creates a discrete-time transfer function sys with numerator(s) num and denominator(s) den. The sample time is left unspecified (sys.Ts = -1) and the output sys is a TF object.

sys = filt(num,den,Ts) further specifies the sample time Ts (in seconds).

sys = filt(M) specifies a static filter with gain matrix M.

Any of the previous syntaxes can be followed by property name/property value pairs of the form

'Property',Value

Each pair specifies a particular property of the model, for example, the input names or the transfer function variable. For information about the available properties and their values, see the tf reference page.

Arguments

For SISO transfer functions, num and den are row vectors containing the numerator and denominator coefficients ordered in ascending powers of z−1. For example, den = [1 0.4 2] represents the polynomial 1 + 0.4z−1 + 2z−2.

MIMO transfer functions are regarded as arrays of SISO transfer functions (one per I/O channel), each of which is characterized by its numerator and denominator. The input arguments num and den are then cell arrays of row vectors such that:

If all SISO entries have the same denominator, you can also set den to the row vector representation of this common denominator.

Tips

filt behaves as tf with the Variable property set to 'z^-1'. See tf entry below for details.

Examples

Create a two-input digital filter with input names 'channel1' and 'channel2':

num = {1 , [1 0.3]};
den = {[1 1 2] ,[5 2]};
H = filt(num,den,'inputname',{'channel1' 'channel2'})

This syntax returns:

Transfer function from input "channel1" to output:
        1
-----------------
1 + z^-1 + 2 z^-2
 
Transfer function from input "channel2" to output:
1 + 0.3 z^-1
------------
 5 + 2 z^-1
 
Sampling time: unspecified

See Also

ss | tf | zpk

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS