Engee documentation

Allpole Filter

A single-pole filter model.

blockType: AllpoleFilter

Path in the library:

/Signal Operations/Filters/Filter Implementations/Allpole Filter

Description

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

This unit filters each channel of the input signal regardless of time. Parameter Input processing allows you to specify whether the block considers 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 block Allpole Filter, can be changed by selecting one of the following parameter values Filter structure:

  • Direct form — straight form;

  • Direct form transposed — transposed direct form;

  • Lattice AR — lattice autoregression (AR).

Determination of initial states

Block Allpole Filter by default, it sets the values of the internal states of the filter to zero, 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 parameter Initial states.

The table shows the acceptable parameter values. Initial states.

Initial conditions Description

A scalar.

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

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

Each vector or element of the matrix sets 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 delay elements in the filter and one column for each input channel.

Ports

Output

# Out — Output signal
scalar

Details

The filtered output signal returned as a vector or matrix.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Fixed

Complex numbers support

Yes

Input

# In — Input signal
vector | the matrix

Details

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, then the first dimension is the channel length (or frame size), and the second dimension is the number of channels. If there is a one-dimensional signal at the Input, then it is interpreted as one channel.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Fixed

Complex numbers support

Yes

# Den — filter coefficients
vector-string

Details

Port for entering the coefficients of the filter transfer function.

Dependencies

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

Data types

Float64

Complex numbers support

I don’t

Parameters

Main

# Coefficient source — option for the method of setting coefficients
Dialog parameters | Input port

Details

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

Values

Dialog parameters | Input port

Default value

Dialog parameters

Program usage name

CoefficientSource

Tunable

No

Evaluatable

No

# Filter structure — filter structure
Direct form | Direct form transposed | Lattice AR

Details

Selecting the filter structure. Options to choose from:

  • Direct form — straight form;

  • Direct form transposed — transposed direct form;

  • Lattice AR — lattice autoregression (AR).

Values

Direct form | Direct form transposed | Lattice AR

Default value

Direct form

Program usage name

FilterStructure

Tunable

No

Evaluatable

No

# Coefficients — filter coefficients

Details

Specify the coefficients of the filter transfer function as a row vector.

Dependencies

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

Default value

[1 0.1]

Program usage name

Coefficients

Tunable

No

Evaluatable

Yes

# Input processing — input signal processing type
Columns as channels | Elements as channels

Details

Specify whether the block performs processing based on a sample or a frame. Options to choose from:

  • Elements as channels — each element of the input signal is considered as an independent channel (sampling-based processing).

  • Columns as channels — Each column of the input signal is considered as an independent channel (frame-based processing).

Values

Columns as channels | Elements as channels

Default value

Columns as channels

Program usage name

InputProcessing

Tunable

No

Evaluatable

No

# Initial states — initial filter states
Real number

Details

Initial conditions of the filter states. For information on how to set initial states, see Determination of initial states.

Default value

0

Program usage name

InitialStates

Tunable

No

Evaluatable

Yes

Additional Info

Data type support

Details

Block Allpole Filter 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 two-digit fixed-point number with an exponent and a zero offset.

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

The direct form

The state data type in the block mask for this structure is not specified, since the output states have the same data types as the output ones.

allpole filter 1

allpole filter 2

transplated straight form

States are complex if either the inputs or the coefficients are complex.

allpole filter 3

allpole filter 4

grid AR

allpole filter 5

allpole filter 6