Engee documentation

Inport FIR Decimation

Polyphase thinning with FIR filter. The FIR filter coefficients are set via the input port.

blockType: SubSystem

Path in the library:

/Signal Operations/Filters/MultirateFilters/Inport FIR Decimation

Description

The Inport FIR Decimation block performs efficient polyphase thinning using an integer downsampling factor on the first measurement.

Conceptually, FIR thinning (as shown in the schematic) consists of an anti-aliasing FIR filter followed by downsampling.

The FIR filter filters the data in each channel of the input signal with a direct-form FIR filter. The following downsampling reduces the samples of each channel of filtered data by taking each -th sample and discarding samples that follow it, where is the value of the thinning factor, which is set in the Decimation factor parameter. The resulting discrete-time signal has a sampling frequency that is times smaller than the original one.

fir decimation 1 en

The Inport FIR Decimation block differs from the Dialog FIR Decimation block only by the fact that the FIR filter coefficients are set through the input port. For more detailed information about the block operation and implemented algorithms see Details and Algorithms.

Ports

Input

# In — input data
scalar | vector | matrix

Details

Input data for a block specified as a scalar, vector or matrix.

Data types

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

Complex numbers support

Yes

# Num — coefficients of the numerator of the filter transfer function
vector

Details

Port for input of FIR filter numerator coefficients as a vector.

The transfer function of the FIR filter is defined as:

For operation as an effective smoothing filter, the coefficients generally correspond to a low-pass filter with a normalised cut-off frequency value of no more than , where is the decimation factor.

Data types

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

Complex numbers support

Yes

Output

# Out — output data after thinning
scalar | vector | matrix

Details

Output data after thinning, returned as a scalar, vector or matrix.

Block behaviour depends on the value of Rate options parameter:

  • Enforce single-rate processing - when this value is selected, the block keeps the input sampling rate and thins the signal, reducing the output frame size by times.

  • Allow multirate processing - when this value is selected, the block thins the signal so that the output sample rate is times smaller than the input sample rate.

The output frame size is the same as the input frame size.

Data types

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

Complex numbers support

Yes

Parameters

Main

# Decimation factor — decimation coefficient

Details

Specify the integer coefficient . The block reduces the sampling rate of the input sequence by this factor.

Default value

2

Program usage name

DF

Tunable

No

Evaluatable

Yes

# Filter structure — FIR filter structure
Direct form | Direct form transposed

Details

Specify the structure of the FIR filter: Direct form or `Direct form transposed'.

Values

Direct form | Direct form transposed

Default value

Direct form

Program usage name

FS

Tunable

No

Evaluatable

Yes

# Input processing — input signal processing type
Columns as channels (frame based) | Elements as channels (sample based)

Details

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

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

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

For more information, see Signal processing by frames and counts.

Values

Columns as channels (frame based) | Elements as channels (sample based)

Default value

Columns as channels (frame based)

Program usage name

IP

Tunable

No

Evaluatable

Yes

# Rate options — the method by which the block decimates the input data
Enforce single-rate processing | Allow multirate processing

Details

Specify the method by which the block should thin out the input data. Options to choose from:

  • 'Enforce single-rate processing` — when this method is selected, the unit saves the sampling rate of the input signal and decimates the signal, reducing the size of the output frame in once. To select this method, the Input processing parameter must have the value Columns as channels (frame based).

If the Rate options parameter is set to `Enforce single-rate processing', then the Inport FIR Decimation block can be used inside trigger subsystems.

  • `Allow multirate processing' — when this method is selected, the unit decimates the signal in such a way that the output sampling rate in times less than the entrance one.

Dependencies

To use this parameter, set the Input processing parameter to Columns as channels (frame based).

Values

Enforce single-rate processing | Allow multirate processing

Default value

Enforce single-rate processing

Program usage name

ROF

Tunable

No

Evaluatable

Yes

# Rate options — the method by which the block decimates the input data
Allow multirate processing

Details

The block decimates the data using the 'Allow multirate processing' method — the output sampling rate in times less than the entrance one.

Dependencies

To use this parameter, set the Input processing parameter to Elements as channels (sample based).

Values

Allow multirate processing

Default value

Allow multirate processing

Program usage name

ROS

Tunable

No

Evaluatable

Yes

# Allow arbitrary frame length for fixed-size input signals — allow arbitrary frame size for fixed-size input signals

Details

Specify whether fixed-size input signals (whose size does not change during simulation) can have an arbitrary frame size, and the frame size does not have to be a multiple of the decimation factor. The block uses this parameter only for fixed-size input signals and ignores it if the input signal has a variable size.

For fixed-size input signals:

  • If the Allow arbitrary frame length for fixed-size input signals checkbox is selected, then the size of the signal frame does not have to be a multiple of the decimation factor. If the input signal is not a multiple of the decimation factor, then the output is usually a variable-size signal. Therefore, in order to support an arbitrary input size, the block must also support variable-size operations, which can be enabled by checking the Allow arbitrary frame length for fixed-size input signals checkbox.

  • If the Allow arbitrary frame length for fixed-size input signals checkbox is unchecked, the input frame size must be a multiple of the decimation factor.

Dependencies

To use this parameter, set the Input processing parameter to Columns as channels (frame based), and the Rate options parameter to Enforce single-rate processing.

Default value

false (switched off)

Program usage name

AllowArbitrary

Tunable

No

Evaluatable

Yes