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 channel of the input signal 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 for the parameter Rate options the value is set Enforce single-rate processing.
Ports
Output
#
OUT_1
—
output after interpolation
scalar | vector | the matrix
Details
The output after interpolation, returned as 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 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 in such a way that the output sampling rate in times the input sampling rate.
| Data types |
|
| Complex numbers support |
Yes |
Input
#
IN_1
—
input data
scalar | vector | the matrix
Details
Input data for the block, specified as a vector or matrix.
| Data types |
|
| Complex numbers support |
Yes |
#
Num
—
coefficients of the numerator of the filter transfer function
vector
Details
The input port of the coefficients of the FIR filter numerator in the form of a vector.
Transfer function The FIR filter is set as
To work as an effective reconstruction filter, the coefficients usually correspond to a low-pass filter with a value of the normalized cutoff frequency no greater than the value of the inverse value 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 parameter Coefficient source value Input port.
| Data types |
|
| Complex numbers support |
Yes |
Parameters
Main
#
Coefficient source —
the method of setting coefficients
Dialog parameters | Input port
Details
If the parameter is set to Dialog parameters, then the filter coefficients are set in the parameter settings window. If the parameter is set to Input port, then the filter coefficients are set via the input port Num.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
FIR filter coefficients —
coefficients of the low-pass FIR filter
String
Details
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 for the parameter Coefficient source meaning Dialog parameters.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Interpolation factor —
the interpolation coefficient
Real number
Details
Specify the integer coefficient . The block increases the sampling rate of the input sequence according to this factor.
| 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 |
No |
#
Rate options —
the method by which the block interpolates the input data
Allow multirate processing | Enforce single-rate processing
Details
Specify the method by which the block should interpolate 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 interpolates the signal, increasing the size of the output frame in once. To select this method, the parameter Input processing must have a valueColumns as channels (frame based). -
Allow multirate processing— when selecting this method, the unit interpolates the signal in such a way that the output sampling rate in times higher than the input sampling rate.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
# Output buffer initial conditions — initial conditions
Details
This parameter appears only if the block is configured for multi-speed processing, i.e. for the parameter Rate options the value is set Allow multirate processing in this case, there is a delay in data transmission in the block. The amount of delay during multi-speed, multitasking depends on the value of the parameter. Input processing.
| Input processing | Delay |
|---|---|
|
selections |
|
frames ( samples per frame) |
When the block shows a delay, the initial conditions are zero by default. Alternatively, you can use the parameter Output buffer initial conditions to specify a matrix of initial conditions containing one value for each channel, or a scalar initial condition that the block applies to all channels. The block divides the initial conditions Output buffer initial conditions on Interpolation factor and outputs scaled initial conditions until the first filtered input sample is available.
The initial conditions are stored in the output data type and scaling.
Additional information about the delay in the block FIR Interpolation It is given in the Delay time section.
Dependencies
To use this parameter, set for the parameter Rate options meaning Allow multirate processing.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
Additional Info
Frame-based processing
Details
If for the parameter Input processing the value is set Columns as channels (frame based), then 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 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 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 for the parameter Rate options the value is set
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
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 interpolates each channel in time. The sample period at the output in times shorter than the sample period at the input: at the same time, the sizes of the input and output data remain identical.
Delay time
Details
If for the parameter Input processing the value is set Columns as channels (frame based), and for the parameter Rate options — Enforce single-rate processing, then the block FIR Interpolation it always has zero latency. Zero delay means that the block transmits the first filtered input sample received at a given time. , as the first output sample. The first output sample is then followed by the interpolated values, the second filtered input sample, and so on.
The only time when the block FIR Interpolation demonstrates the delay, this is if for the parameter Rate options the value is set Allow multirate processing. The amount of delay during multi-speed, multitasking depends on the value of the parameter. Input processing.
| Input processing | Delay |
|---|---|
|
selections |
|
frames ( samples per frame) |
When the block shows a delay, the initial conditions are zero by default. Alternatively, you can use the parameter Output buffer initial conditions to specify a matrix of initial conditions containing one value for each channel, or a scalar initial condition that the block applies to all channels. The block divides the initial conditions Output buffer initial conditions on Interpolation factor and outputs scaled initial conditions until the first filtered input sample is available.
When the block is in sample-based processing mode, it outputs scaled initial conditions at the beginning of each channel, followed immediately by the first filtered input sample, then interpolated values, and so on.
When the block is in frame-based processing mode and uses an initial default value of zero, the first the output lines contain zeros, where — the size of the input frame. The first filtered input sample (the first filtered row of the input matrix) appears in the output as selection. Then follows the interpolated values, the second filtered input sample, and so on.
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 — 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.
The identity for multidimensional interpolation is presented here.
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 .