Engee documentation

Allpole Filter

Single pole filter model.

allpole filter

Description

The Allpole Filter block independently filters each channel of the input signal using a specified single-pole filter. The block can implement static filters with fixed coefficients as well as time-varying filters with time-varying coefficients. The coefficients of the static filter can be adjusted during the simulation.

This block filters each channel of the input signal independently of time. The Input processing parameter allows you to specify whether the block treats each element of the input signal as an independent channel (sample-based processing) or each column of the input signal as an independent channel (frame-based processing).

Filter structure support

The filter structure implemented in the Allpole Filter block can be changed by selecting one of the following values of the Filter structure parameter:

  • Direct form - direct form.

  • Direct form transposed - transposed direct form.

  • Lattice AR - lattice autoregression (AR).

Definition of initial states

The Allpole Filter block sets the values of the filter’s internal states to zero by default, which is similar to assuming that the previous input and output data are zero. To set non-zero initial conditions for filter delays, you can use the Initial states parameter.

The table shows acceptable values of the Initial states parameter.

Initial states Description

Scalar

All delay elements in the filter are specified as a scalar value.

Vector or matrix (to apply different delay elements to each channel).

Each vector or matrix element specifies a unique initial condition for the corresponding delay element in the corresponding channel:

  • The length of the vector is equal to the product of the number of input channels and the number of delay elements in the filter.

  • The matrix should have as many rows as the number of delay elements in the filter and one column for each input channel.

Support of data types

The Allpole Filter block accepts and outputs real and complex signals of any numeric data type supported by Engee. The block supports the same types for coefficients.

If the input signal has a fixed-point data type, it must be a signed integer or a signed fixed-point value with a two-degree exponent and zero offset.

The following diagrams show the filter structure and data types used in the Allpole Filter block for fixed point signals.

Direct form

Do not specify a state data type in the block mask for this structure because the output states have the same data types as the output states.

allpole filter 1

allpole filter 2

Transposed direct form

States are complex if either inputs or coefficients are complex.

allpole filter 3

allpole filter 4

Lattice AR

allpole filter 5

allpole filter 6

Ports

Input

In - input signal
vector | matrix

Input data for the block specified as a vector or matrix. Each column of the input signal is treated as a separate channel. If the input signal is two-dimensional, the first dimension is the channel length (or frame size) and the second dimension is the number of channels. If the input signal is one-dimensional, it is interpreted as a single channel.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Fixed.

Support for complex numbers: Yes.

Den - filter coefficients
`vector string

Port for input of filter transfer function coefficients.

Dependencies

To use this port, set the Coefficient source parameter to Input port.

Output

Out - output signal
scalar

A filtered output signal returned as a vector or matrix.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Fixed.

Support for complex numbers: Yes.

Parameters

Coefficient source - option for the way of specifying coefficients
Dialog parameters (by default) | Input port

If the parameter has the value Dialog parameters, the filter coefficients are set in the parameter settings window. If the parameter is set to Input port, the filter coefficients are set via the Den input port.

Filter structure - filter structure
Direct form (by default) | Direct form transposed | Lattice AR.

Selects the filter structure. Options for selection:

  • Direct form - direct form.

  • Direct form transposed - transposed direct form.

  • Lattice AR - lattice autoregression (AR).

Coefficients - filter coefficients
[1 0.1] (by default) | vector-string

Specify the coefficients of the filter transfer function as a vector-string.

Dependencies

To use this parameter, set the Coefficient source parameter to Dialog parameters.

Input processing - type of input signal processing
Columns as channels (by default) | Elements as channels.

Specify whether the block performs sample-based or frame-based processing. Options to select:

  • Elements as channels - each input signal element is treated as an independent channel (sample-based processing).

  • Columns as channels` - each column of the input signal is treated as an independent channel (frame-based processing).

Initial states - initial states of the filter
0 (by default) | scalar | vector | matrix

Initial conditions of filter states. To set the initial states, read in section [Определение начальных состояний].