Dialog FIR Decimation
Polyphase thinning with FIR filter. The FIR filter coefficients are set in the input field.
blockType: SubSystem
Path in the library:
|
Description
Block Dialog FIR Decimation performs efficient polyphase decimation using an integer sampling rate reduction factor according to the first measurement.
Conceptually, the FIR decimator (as shown in the diagram) consists of a smoothing FIR filter, followed by a decrease in the sampling frequency.
The FIR filter filters the data in each channel of the input signal using a direct-form FIR filter. The subsequent lowering of the sampling rate reduces the samples of each channel of filtered data, taking each -Counting down and discarding the counts following it, where — this is the value of the decimation coefficient, which is set in the parameter Decimation factor. The resulting discrete-time signal has a sampling frequency reduced by times compared to the original one.
The FIR filter coefficients are set in the input field.
Note that the actual block algorithm implements a polyphase structure of a direct-form FIR filter, which is the effective equivalent of the combined system shown in the diagram. For more information, see Algorithms.
Ports
Input
#
IN_1
—
input data
scalar | vector | the matrix
Details
Input data for the block, specified as a scalar, vector, or matrix.
| Data types |
|
| Complex numbers support |
Yes |
Output
#
OUT_1
—
output after thinning
scalar | vector | the matrix
Details
The output data after thinning, returned in the form of a scalar, vector or matrix.
The block behavior depends on the parameter value Rate options:
-
Enforce single-rate processing— when this value is selected, the unit saves the input sampling rate and decimates the signal, reducing the size of the output frame in once. -
Allow multirate processing— when this value is selected, the unit decimates the signal in such a way that the output sampling rate in times less than the input sampling rate. The size of the output frame is the same as the size of the input frame.
| Data types |
|
| Complex numbers support |
Yes |
Parameters
Main
# FIR filter coefficients — coefficients of the low-pass FIR filter
Details
Specify the coefficients of the numerator of the FIR filter transfer function in descending order.
Transfer function The FIR filter is defined as follows:
To work as an effective smoothing filter, the coefficients usually correspond to a low-pass filter with a normalized cutoff frequency of no more than , where — the decimation coefficient.
The block initializes all filter states to zero.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
# Decimation factor — decimation coefficient
Details
Specify the integer coefficient . The block reduces the sampling rate of the input sequence by this factor.
| Default value |
|
| Program usage name |
|
| 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 |
|
| Default value |
|
| Program usage name |
|
| 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 |
|
| Default value |
|
| Program usage name |
|
| 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 choosing this method, the unit saves the sampling rate of the input signal and decays the signal, reducing the size of the output frame in once. To select this method, the parameter Input processing must have a valueColumns as channels (frame based).If for the parameter Rate options the value is set
Enforce single-rate processing, then you can use the block Dialog FIR Decimation inside trigger subsystems. -
Allow multirate processing— when this method is selected, the unit decays the signal in such a way that the output sampling frequency in times less than the entrance one.
Dependencies
To use this parameter, set for the parameter Input processing meaning Columns as channels (frame based).
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Rate options —
the method by which the block decimates the input data
Allow multirate processing
Details
The block thinns the data using the method Allow multirate processing — the output sampling rate in times less than the entrance one.
Dependencies
To use this parameter, set for the parameter Input processing meaning Elements as channels (sample based).
| Values |
|
| Default value |
|
| Program usage name |
|
| 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, that is, 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 check box is selected Allow arbitrary frame length for fixed-size input signals, 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 box. Allow arbitrary frame length for fixed-size input signals.
-
If the check box Allow arbitrary frame length for fixed-size input signals If the image is captured, the input frame size must be a multiple of the decimation factor.
Dependencies
To use this parameter, set for the parameter Input processing meaning Columns as channels (frame based), and for the parameter Rate options meaning Enforce single-rate processing.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
Additional Info
Polyphase subfilters
Details
The polyphase implementation of the FIR decimator splits the pulse response of the low-pass FIR filter into various sub-filters, where — the coefficient of lowering the sampling rate or decimation. For more information about the polyphase implementation, see Algorithms.
Let denotes the pulse response of the FIR filter. , and — the input signal. Thinning in removing the output signal from the filter is equivalent to a downsampling convolution:
The key to the effectiveness of polyphase filtering is that certain input values are multiplied only by selected pulse response values in a downsampling convolution. For example, if , then the input values are combined only with the filter coefficients , and the input values are — only with filter coefficients . By dividing the filter coefficients into two polyphase sub-filters, unnecessary calculations are not performed in the convolution. The outputs of convolutions with polyphase sub-filters are interleaved and summed to obtain the filter output.
Frame-based processing
Details
If for the parameter Input processing the value is set Columns as channels (frame based), then the block repeats each column of the input signal in time. In this mode, the unit can perform both single-speed and multi-speed processing. You can use the parameter Rate options to specify how the block will recalculate the input data:
-
If for the parameter Rate options the value is set
Enforce single-rate processing, then the input and output data of the block have the same sampling rate. To thin out the output data while maintaining the sampling rate of the input data, the block recalculates the data in each input data column so that the size of the output data frame has an upper bound. , where — the size of the input data frame, and — the decimation coefficient specified in the parameter Decimation factor.In this mode, if the signal has a fixed size (the frame size does not change during simulation) and the checkbox is selected Allow arbitrary frame length for fixed-size input signals, then the size of the input frame can be arbitrary and does not have to be a multiple of the decimation factor. If the check box Allow arbitrary frame length for fixed-size input signals If not set, the input frame size must be a multiple of the decimation factor.
This table provides support for an arbitrary input frame size if for the parameter Input processing the value is set
Columns as channels (frame based), and for the parameter Rate options — valueEnforce single-rate processing.The input signal The unit supports this signal Support for arbitrary input frame size Input size Output size A fixed-size signal
Yes
If the check box is selected Allow arbitrary frame length for fixed-size input signals
on
Upper limit of size on
-
If for the parameter Rate options the value is set
Allow multirate processing, then the input and output data of the FIR decimator block have the same size. However, the sampling rate of the output data in times lower than the sampling rate of the input data. In this mode, the block examines the input matrix on how independent channels. The block thinns each column of the input signal in time, keeping the frame size constant, while maintaining the period of the output frame. in times longer than the period of the input frame: .In this mode, the unit receives only fixed-size signals, and these signals can have an arbitrary frame size.
This table provides support for an arbitrary input frame size if for the parameter Input processing the value is set
Columns as channels (frame based), and for the parameter Rate options meaningAllow multirate processing.The input signal The unit supports this signal Support for arbitrary input frame size Input size Output size A fixed-size signal
Yes
Always
on
on
A variable-size signal
No
Not applicable
Not applicable
Not applicable
Sample-based processing
Details
If for the parameter Input processing the value is set Elements as channels (sample based), then the block considers the input matrix on how independent channels and thinns each channel in time. The countdown period at the exit in times longer than the input countdown period: at the same time, the sizes of the input and output data remain identical.
In this mode, the unit receives only fixed-size signals, and these signals can have an arbitrary frame size.
This table provides support for an arbitrary input frame size when for the parameter Input processing the value is set Elements as channels (sample based). Parameter Value Rate options it is automatically installed on Allow multirate processing.
| The input signal | The unit supports this signal | Support for arbitrary input frame size | Input size | Output size |
|---|---|---|---|---|
A fixed-size signal |
Yes |
Always |
on |
on |
A variable-size signal |
No |
Not applicable |
Not applicable |
Not applicable |
Delay time
Details
If the block operates in a sample-based processing mode, it always has zero delay. Zero delay means that the block transmits the first filtered input sample received at a given time. , as the first output reference. This first output sample is followed by the filtered input samples. , etc.
Algorithms
Thinning with a FIR filter is effectively implemented using a polyphase structure. For more information about the polyphase structure, see Polyphase subfilters.
To derive the polyphase structure, we begin by defining the transfer function of the FIR filter.:
where — this is the length of the FIR filter.
You can rearrange this equation as follows:
where — this is the number of polyphase components, and its value is equal to the decimation coefficient, which is set in the parameter settings window.
You can write this equation as:
where — these are the polyphase components of the FIR filter .
Conceptually, FIR filter decimation consists of a low-pass FIR filter, followed by a sample rate reduction element.
Replace its polyphase representation.
The identity for multidimensional thinning is presented here.
Applying the identity for decimation moves the operation of lowering the sampling rate before the filtering operation. This move allows you to filter the signal at a lower rate.
You can replace the delays and decimation factor at the input with a switching switch.
When the first input sample arrives, the switch feeds it to branch 0, and the decimator calculates the first output value. As new input counts arrive, the switch moves counterclockwise through the branches. , and up to branch 0, feeding one count into each branch. When the switch reaches branch 0, the decimator outputs the next set of output values. This process continues as long as the data continues to arrive. Each time the switch goes to branch 0, the decimator outputs . The decimator effectively outputs one count for each the counts he gets. Thus, the sampling rate at the output of the FIR decimator is .