Sysquake Pro – Table of Contents

Sysquake for LaTeX – Table of Contents

# Library - `lti_filter`

`lti_filter`
is a library which provides functions for the design of analog (continuous-time)
and digital (discrete-time) linear filters given as LTI (linear time-invariant)
zpk (zero/pole/gain) objects. It relies on library filter
`filter`
for the filter design and
`lti`
for LTI objects.

The following statement makes available functions defined in `lti_filter`:

use lti_filter

In order to manipulate or display the result, library `lti` must also be
imported.

## Functions

### zpkbesself

Bessel filter as zpk object.

#### Syntax

use lti_filter f = zpkbesself(n, w0) f = zpkbesself(n, [wl, wh]) f = zpkbesself(n, w0, 'high') f = zpkbesself(n, [wl, wh], 'stop') f = zpkbesself(..., Ts=ts, var=v)

#### Description

`zpkbesself` calculates a Bessel filter. The result is
given as a zpk object (zeros, poles and gain).

`zpkbesself(n,w0)`, where `w0` is a scalar, gives an
analog (continuous-time) lowpass filter of order `n` with a cutoff
frequency of `w0`.

`zpkbesself(n,[wl,wh])`, where the second input argument is a vector
of two numbers, gives an analog bandpass filter of order `2*n` with
passband between `wl` and `wh`.

`zpkbesself(n,w0,'high')` gives an analog highpass filter of order
`n` with a cutoff frequency of `w0`.

`besself(n,[wl,wh],'stop')`, where the second input argument is a vector
of two numbers, gives an analog bandstop filter of order `2*n` with
stopband between `wl` and `wh`.

Two named arguments can be specified: sampling period `Ts`,
to get a digital (discrete-time) filter, and variable `var`, string
`'s'` or `'p'` for analog filters (Laplace variable),
`'z'` or `'q'` for digital filter with forward-shift
operator, or `'z^-1'` or `'q^-1'` for digital filter
with backward-shift operator.

Cutoff frequencies are specified in rad/s for analog filters and in fraction of the Nyquist frequency (between 0 and 1) for digital filters.

#### See also

`zpkbutter`,
`zpkcheby1`,
`zpkcheby2`,
`zpkellip`,
`besself`

### zpkbutter

Butterworth filter as zpk object.

#### Syntax

use lti_filter f = zpkbutter(n, w0) f = zpkbutter(n, [wl, wh]) f = zpkbutter(n, w0, 'high') f = zpkbutter(n, [wl, wh], 'stop') f = zpk(..., Ts=ts, var=v)

#### Description

`zpkbutter` calculates a Butterworth filter. The result is
given as a zpk object (zeros, poles and gain).

`zpkbutter(n,w0)`, where `w0` is a scalar, gives an
analog (continuous-time) lowpass filter of order `n` with a cutoff
frequency of `w0`.

`zpkbutter(n,[wl,wh])`, where the second input argument is a vector
of two numbers, gives an analog bandpass filter of order `2*n` with
passband between `wl` and `wh`.

`butter(n,w0,'high')` gives an analog highpass filter of order
`n` with a cutoff frequency of `w0`.

`zpkbutter(n,[wl,wh],'stop')`, where the second input argument is a vector
of two numbers, gives an analog bandstop filter of order `2*n` with
stopband between `wl` and `wh`.

Two named arguments can be specified: sampling period `Ts`,
to get a digital (discrete-time) filter, and variable `var`, string
`'s'` or `'p'` for analog filters (Laplace variable),
`'z'` or `'q'` for digital filter with forward-shift
operator, or `'z^-1'` or `'q^-1'` for digital filter
with backward-shift operator.

Cutoff frequencies are specified in rad/s for analog filters and in fraction of the Nyquist frequency (between 0 and 1) for digital filters.

#### See also

`zpkbesself`,
`zpkcheby1`,
`zpkcheby2`,
`zpkellip`,
`butter`

### zpkcheby1

Chebyshev type 1 filter as zpk object.

#### Syntax

use lti_filter f = zpkcheby1(n, rp, w0) f = zpkcheby1(n, rp, [wl, wh]) f = zpkcheby1(n, rp, w0, 'high') f = zpkcheby1(n, rp, [wl, wh], 'stop') f = zpkcheby1(..., Ts=ts, var=v)

#### Description

`zpkcheby1` calculates a Chebyshev type 1 filter. The result is
given as a zpk object (zeros, poles and gain).

`zpkcheby1(n,rp,w0)`, where `w0` is a scalar, gives an
analog (continuous-time) lowpass filter of order `n` with a cutoff
frequency of `w0`. Ripples in the passband have a peak-to-peak magnitude of
`rp` dB, i.e. the peak-to-peak ratio is `10^(rp/20)`.

`zpkcheby1(n,rp,[wl,wh])`, where the second input argument is a vector
of two numbers, gives an analog bandpass filter of order `2*n` with
passband between `wl` and `wh`.

`zpkcheby1(n,rp,w0,'high')` gives an analog highpass filter of order
`n` with a cutoff frequency of `w0`.

`zpkcheby1(n,rp,[wl,wh],'stop')`, where the second input argument is a vector
of two numbers, gives an analog bandstop filter of order `2*n` with
stopband between `wl` and `wh`.

Two named arguments can be specified: sampling period `Ts`,
to get a digital (discrete-time) filter, and variable `var`, string
`'s'` or `'p'` for analog filters (Laplace variable),
`'z'` or `'q'` for digital filter with forward-shift
operator, or `'z^-1'` or `'q^-1'` for digital filter
with backward-shift operator.

Cutoff frequencies are specified in rad/s for analog filters and in fraction of the Nyquist frequency (between 0 and 1) for digital filters.

#### See also

`zpkbesself`,
`zpkbutter`,
`zpkcheby2`,
`zpkellip`,
`cheby1`

### zpkcheby2

Chebyshev type 2 filter as zpk object.

#### Syntax

use lti_filter f = zpkcheby2(n, rs, w0) f = zpkcheby2(n, rs, [wl, wh]) f = zpkcheby2(n, rs, w0, 'high') f = zpkcheby2(n, rs, [wl, wh], 'stop') f = zpkcheby2(..., Ts=ts, var=v)

#### Description

`zpkcheby2` calculates a Chebyshev type 2 filter. The result is
given as a zpk object (zeros, poles and gain).

`zpkcheby2(n,rs,w0)`, where `w0` is a scalar, gives an
analog (continuous-time) lowpass filter of order `n` with a cutoff
frequency of `w0`. Ripples in the stopband have a peak-to-peak magnitude of
`rs` dB, i.e. the peak-to-peak ratio is `10^(rs/20)`.

`zpkcheby2(n,rs,[wl,wh])`, where the second input argument is a vector
of two numbers, gives an analog bandpass filter of order `2*n` with
passband between `wl` and `wh`.

`zpkcheby2(n,rs,w0,'high')` gives an analog highpass filter of order
`n` with a cutoff frequency of `w0`.

`zpkcheby2(n,rs,[wl,wh],'stop')`, where the second input argument is a vector
of two numbers, gives an analog bandstop filter of order `2*n` with
stopband between `wl` and `wh`.

`Ts`,
to get a digital (discrete-time) filter, and variable `var`, string
`'s'` or `'p'` for analog filters (Laplace variable),
`'z'` or `'q'` for digital filter with forward-shift
operator, or `'z^-1'` or `'q^-1'` for digital filter
with backward-shift operator.

#### See also

`zpkbesself`,
`zpkbutter`,
`zpkcheby1`,
`zpkellip`,
`cheby2`

### zpkellip

Elliptic filter as zpk object.

#### Syntax

use lti_filter f = zpkellip(n, rp, rs, w0) f = zpkellip(n, rp, rs, [wl, wh]) f = zpkellip(n, rp, rs, w0, 'high') f = zpkellip(n, rp, rs, [wl, wh], 'stop') f = zpkellip(..., Ts=ts, var=v)

#### Description

`zpkellip` calculates a elliptic filter, or Cauer filter. The result is
given as a zpk object (zeros, poles and gain).

`zpkellip(n,rp,rs,w0)`, where `w0` is a scalar, gives an
analog (continuous-time) lowpass filter of order `n` with a cutoff
frequency of `w0`. Ripples have a peak-to-peak magnitude of `rp` dB
in the passband and of `rs` dB in the stopband (peak-to-peak ratios are
respectively `10^(rp/20)` and `10^(rs/20)`).

`zpkellip(n,rp,rs,[wl,wh])`, where the second input argument is a vector
of two numbers, gives an analog bandpass filter of order `2*n` with
passband between `wl` and `wh`.

`zpkellip(n,rp,rs,w0,'high')` gives an analog highpass filter of order
`n` with a cutoff frequency of `w0`.

`zpkellip(n,rp,rs,[wl,wh],'stop')`, where the second input argument is a vector
of two numbers, gives an analog bandstop filter of order `2*n` with
stopband between `wl` and `wh`.

`Ts`,
to get a digital (discrete-time) filter, and variable `var`, string
`'s'` or `'p'` for analog filters (Laplace variable),
`'z'` or `'q'` for digital filter with forward-shift
operator, or `'z^-1'` or `'q^-1'` for digital filter
with backward-shift operator.