FIR Interpolation
Polyphase interpolation with FIR filter.
blockType: FIRInterpolation
Path in the library:
|
Description
Block FIR Interpolation performs efficient polyphase interpolation using an integer interpolation coefficient according to the first measurement.
Conceptually, interpolation with a finite impulse response filter (FIR filter) represents an increase in frequency in once, followed by the use of a reconstructive FIR filter, which is usually an approximation of an ideal interpolation filter with a limited frequency band.
Increasing the sampling rate of each input channel to a higher one is performed by adding there are no zeros between the samples. Next, the FIR filter filters each channel of the transformed data. The resulting discrete signal has a sampling frequency in times the original sampling rate.
However, the real block algorithm implements a polyphase structure of a direct-form FIR filter, an effective equivalent of the combined system shown in the diagram. For more information, see Algorithms.
Block FIR Interpolation It can be used inside trigger subsystems if the Rate options parameter is set to `Enforce single-rate processing'.
Ports
Entrance
In — input data
scalar
| vector
| the matrix
The input data for the block, specified as a vector or matrix.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
Support for complex numbers: Yes
Num — coefficients of the numerator of the transfer function of the pass filter:q[<br>] vector
The input port for the coefficients of the FIR filter numerator in the form of a vector.
Transfer function The FIR filter is defined as:
To work as an effective reconstruction filter, the coefficients usually correspond to a low-pass filter with a normalized cutoff frequency value no greater than the value of the inverse of the interpolation coefficient.
The coefficient values are configurable. That is, their values can change during the modeling process, while their properties such as size, data type, and complexity remain unchanged.
Dependencies
To use this port, set the Efficient source parameter to `Input port'.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
Support for complex numbers: Yes
Output
Out — output data after pass interpolation:q[<br>] scalar
| vector
| the matrix
The output data after interpolation, returned as a scalar, vector, or matrix.
The behavior of the block depends on the value of the Rate options parameter:
-
Enforce single-rate processing
— when this value is selected, the unit saves the input sampling rate and interpolates the signal, increasing the size of the output frame in once. -
`Allow multirate processing' — when this value is selected, the unit interpolates the signal so that the output sampling rate in times higher than the input sampling rate.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
Support for complex numbers: Yes
Parameters
Coefficient source — method for setting pass coefficients:q[<br>] Dialog parameters (default)
| Input port
If the parameter has the value Dialog parameters
, then the filter coefficients are set in the parameter settings window. If the parameter has the value `Input port', then the filter coefficients are set via the input port Num.
FIR filter coefficients — coefficients of the low-pass FIR filter
[0; -0.000129061486199961;-0.000228040316280948; 0; 0.000554613738572437; 0.000802607430267054; 0; -0.00152912350278902; -0.00203638780675590; 0; 0.00342230705979440; 0.00433928347039265; 0; -0.00673109372352446; -0.00825637814441869; 0; 0.0121125402586868; 0.0145130044012328; 0; -0.0204721583515830; -0.0241392529239787; 0; 0.0332125142618354; 0.0388230898504630; 0; -0.0529640018790903; -0.0619837024555044; 0; 0.0860610417481775; 0.102712774109103; 0; -0.154048515452570; -0.197567026018057; 0; 0.408837525145054; 0.824655115145336; 1; 0.824655115145336; 0.408837525145054; 0; -0.197567026018057; -0.154048515452570; 0; 0.102712774109103; 0.0860610417481775; 0; -0.0619837024555044; -0.0529640018790903; 0; 0.0388230898504630; 0.0332125142618354; 0; -0.0241392529239787; -0.0204721583515830; 0; 0.0145130044012328; 0.0121125402586868; 0; -0.00825637814441869; -0.00673109372352446; 0; 0.00433928347039265; 0.00342230705979440; 0; -0.00203638780675590; -0.00152912350278902; 0; 0.000802607430267054; 0.000554613738572437; 0; -0.000228040316280948; -0.000129061486199961] ( by default)
| vector
Specify the coefficients of the numerator of the FIR filter transfer function :
To work as an effective reconstruction filter, the coefficients are usually selected so as to correspond to a low-pass filter with a normalized cutoff frequency value no greater than the value of the inverse of the interpolation coefficient.
The block initializes all filter states to zero.
Dependencies
To use this parameter, set the Efficient source parameter to `Dialog parameters'.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
Support for complex numbers: Yes
Interpolation factor — interpolation factor
3 (default)
| positive scalar
Specify the integer coefficient . The block increases the sampling rate of the input sequence according to this factor.
Data types: Int8
, Int16
, Int32
, Int64
Input processing — input signal processing type
Columns as channels (frame based)
| Elements as channels (sample based)
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.
Rate options — the method by which the block interpolates input data
Enforce single-rate processing (default)
| Allow multirate processing
Specify the method by which the block should interpolate 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 interpolates the signal, increasing 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)
. -
Allow multirate processing
— when this method is selected, the unit interpolates the signal in such a way that the output sampling rate in times higher than the input sampling rate.
More detailed
Frame-based processing
If the Input processing parameter is set to Columns as channels (frame based)
, the block resamples 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 Rate options parameter to specify how the block will recalculate the input data.:
-
If the Rate options parameter is set to
Enforce single-rate processing
, then the input and output data of the block have the same sampling rate. To interpolate 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 ( ) was in times larger than the input data frame size ( ). -
If the Rate options parameter is set to `Allow multirate processing', then the input and output data of the FIR filter interpolation have the same size. However, the sampling rate of the output data in times higher than the sampling rate of the input data. In this mode, the block examines the input matrix on how independent channels. The block interpolates each column of the input signal over time, keeping the frame size constant ( = ), while the period of the output frame ( ) in times shorter than the period of the input frame ( ).
Sample-based processing
If the Input processing parameter is set to Elements as channels (sample based)
, the block considers the input matrix on how independent channels and interpolates each channel in time. The sample period at the output ( ) in times shorter than the sample period at the input ( ), while the sizes of the input and output data remain identical.
Algorithms
The FIR filter interpolation is effectively implemented using a polyphase structure.
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 interpolation 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 interpolation consists of an interpolation coefficient followed by a low-pass FIR filter. .
Replace its polyphase representation.
Here is an identity for multidimensional interpolation.
Applying the identity for interpolation moves the operation of inserting zero samples after the filtering operation. This move allows you to filter the signal at a lower rate.
You can replace the zero sample insertion operator, the delay block, and the adder with a switching switch. The switch starts at the first branch 0 and moves counterclockwise, each time getting one sample from each branch. The interpolator effectively outputs samples for each input sample received. Thus, the sampling rate at the output of the FIR filter interpolation is .