Window Function
Calculation and application of a window function to an input signal.
blockType: WindowFunction
Path in the library:
|
Description
Block Window Function It has three operating modes that allow you to apply a window function, calculate a window function, or calculate and apply a window function to an input signal. You can select the mode using the parameter Operation. In each mode, the block first creates a vector of the window function. by selecting the window function specified in the parameter Window type.
Ports
Input
#
IN_1
—
The input signal
vector | the matrix | multidimensional array
Details
An input signal specified as a vector, matrix, or multidimensional array.
If the input signal is represented by fixed-point data, it can only be signed.
This port is enabled only if for the parameter Operation the value is set Apply window to input or Generate and apply window.
This port has no name if for the parameter Operation the value is set Apply window to input.
| Data types |
|
| Complex numbers support |
Yes |
Output
#
OUT_1
—
The output signal
vector | the matrix | multidimensional array
Details
The output signal returned as a vector, matrix, or multidimensional array.
This port is enabled only if for the parameter Operation the value is set Apply window to input or Generate and apply window.
This port has no name if for the parameter Operation the value is set Apply window to input.
The output signal has the same dimensions as the input signal.
| Data types |
|
| Complex numbers support |
No |
#
Win
—
the output signal of the window function
vector
Details
The output of the window function, returned as a vector.
If for the parameter Operation the value is set Apply window to input or Generate and apply window, the vector of the window function has a length equal to the number of lines in the input signal. If for the parameter Operation the value is set Generate window, the length of the window function vector is determined by the parameter Window length.
Dependencies
To use this port, set the parameter Operation value selected Generate window or Generate and apply window.
| Data types |
|
| Complex numbers support |
No |
Parameters
Main
#
Operation —
Operating modes
Apply window to input | Generate window | Generate and apply window
Details
Block Window Function It has three operating modes, which can be selected using the parameter Operation. In each mode, the block first creates a vector of the window function. by selecting the window function specified in the parameter Window type, in discrete points. The operating modes are as follows:
-
Apply window to input— in this mode, the block calculates the vector of the window function lengths and applies it to the input signal. The output signal it always has the same dimension as the input one.If the input is a matrix of size on , the window function is multiplied element - wise by each of channels of the input matrix .
The window function is always applied to the first dimension.:
An undirected length vector It is considered as a vector of size on .
-
Generate window— in this mode, the block generates an undirected vector of the window function lengths , set by the parameter Window length. The input port for this mode is disabled. -
Generate and apply window— in this mode, the block generates a vector of the window function lengths and applies it to the input signal. The unit has two outputs:-
Out port — the output port to which the block outputs the multiplication result. , has the same dimension as the input one.
-
Port Win is the output port to which the block outputs the vector of the window function. by dimension on .
If the input is a matrix of size on , the window function is multiplied element - wise by each of channels of the input matrix .
The window function is always applied to the first dimension.:
Input one-dimensional length vector It is considered as a vector of size on .
-
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Window type —
type of window function
Bartlett | Blackman | Boxcar | Chebyshev | Hamming | Hann | Kaiser | Triang
Details
The table below lists the available types of window functions.
| Type of window function | Description |
|---|---|
|
Computes the Bartlett window function.
|
|
Computes the Blackman window function.
|
|
Calculates a rectangular window function.
|
|
Calculates the Chebyshev window function with stop band pulsation
|
|
Calculates the Hamming window function.
|
|
Computes the Hanna window function (also known as the Hanning window function).
|
|
Calculates the Kaiser window function with the Kaiser parameter
|
|
Calculates a triangular window function.
|
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Sample mode —
sampling mode
Continuous | Discrete
Details
Sampling mode for the block, continuous or discrete when it is in the mode Generate window. In the modes Apply window to input or Generate and apply window The block inherits the sampling mode from its control block.
Dependencies
To use this parameter, set for the parameter Operation meaning Generate window.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Sample Time —
the interval between the calculation steps
SampleTime (real number / vector of two real numbers)
Details
Specify the interval between the calculation steps for the block, if for the parameter Operation value selected Generate window, and for Sample mode the value is set Discrete.
If for the parameter Operation the value is set Apply window to input or Generate and apply window, the block inherits the interval between calculation steps from its control block.
Dependencies
To use this parameter, set for the parameter Sample mode meaning Discrete.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Window length —
length of the window function
Int64 integer
Details
Specify the length of the window function to be applied.
Dependencies
To use this parameter, set for the parameter Operation meaning Generate window. Otherwise, the length of the window function vector is calculated according to the length of the first measurement of the input signal.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Stopband attenuation in dB —
fading of the stop band
Real number
Details
Specify the level of relaxation of the stop strip in dB.
Dependencies
To use this parameter, set for the parameter Window type meaning Chebyshev.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Beta —
parameter the Kaiser window function
Real number
Details
Specify the parameter the Kaiser window function. Increase expands the baseband and reduces the amplitude of the side lobes of the window function in its frequency response.
Dependencies
To use this parameter, set for the parameter Window type meaning Kaiser.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Sampling —
sample type
Symmetric | Periodic
Details
The type of sample for generalized cosine window functions.
For generalized cosine window functions (Blackman, Hamming and Hann) parameter Sampling defines how the samples of the window function will be calculated — periodically or symmetrically. For example, if the parameter Sampling set to the value Symmetric, the window Hamming function of length calculated as follows:
w = hamming(M) # Симметричная (апериодическая) оконная функция
If for the parameter Sampling value selected Periodic, then the same window function is calculated as follows:
w = hamming(M+1) # Периодическая (асимметричная) оконная функция
w = w(1:M)
Dependencies
To use this parameter, set for the parameter Window type meaning Blackman, Hamming or Hann.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |