Integrate over time window of fixed length
Comm Filters
The Windowed Integrator block creates cumulative sums of the input signal values over a sliding time window of fixed length. If the Integration period parameter is N and the input samples are denoted by x(1), x(2), x(3),..., then the nth output sample is the sum of the x(k) values for k between nN+1 and n. In cases where nN+1 is less than 1, the block uses an initial condition of 0 to represent those samples.
This block accepts scalar, column vector, and MbyN matrix input signals. The block filters an MbyN input matrix as follows:
When you set the Input processing parameter to
Columns as channels (frame based)
, the
block treats each column as a separate channel. In this mode, the block
creates N instances of the same filter, each with its
own independent state buffer. Each of the N filters
process M input samples at every Simulink^{®} time step.
When you set the Input processing parameter to
Elements as channels (sample based)
, the
block treats each element as a separate channel. In this mode, the block
creates M*N instances of the same
filter, each with its own independent state buffer. Each filter
processes one input sample at every Simulink time step.
The output dimensions always equal those of the input signal. For information about the data types each block port supports, see the Supported Data Type table on this page.
The length of the interval of integration, measured in samples.
Specify how the block processes the input signal. You can set this parameter to one of the following options:
Columns as channels (frame based)
—
When you select this option, the block treats each column of the input
as a separate channel.
Elements as channels (sample based)
—
When you select this option, the block treats each element of the
input as a separate channel.
Select the rounding mode for fixedpoint operations. The block uses the
Rounding mode when the result of a fixedpoint
calculation does not map exactly to a number representable by the data type
and scaling storing the result. The filter coefficients do not obey this
parameter; they always round to Nearest
. For more
information, see Rounding Modes (DSP System Toolbox) or Rounding Mode: Simplest (FixedPoint Designer).
Select the overflow mode for fixedpoint operations. The filter coefficients do not obey this parameter; they are always saturated.
The block implementation uses a DirectForm FIR filter with all tap weights set to one. The Coefficients parameter controls which data type represents the taps (i.e. ones) when the input data is a fixedpoint signal.
Choose how you specify the word length and the fraction length of the filter coefficients (numerator and/or denominator). See Filter Structure Diagrams (DSP System Toolbox) for illustrations depicting the use of the coefficient data types in this block:
When you select Same word length as
input
, the word length of the filter coefficients
match that of the input to the block. In this mode, the fraction
length of the coefficients is automatically set to the binarypoint
only scaling that provides you with the best precision possible
given the value and word length of the coefficients.
When you select Specify word length
,
you are able to enter the word length of the coefficients, in bits.
In this mode, the fraction length of the coefficients is
automatically set to the binarypoint only scaling that provides you
with the best precision possible given the value and word length of
the coefficients.
When you select Binary point scaling
,
you are able to enter the word length and the fraction length of the
coefficients, in bits. If applicable, you are able to enter separate
fraction lengths for the numerator and denominator
coefficients.
When you select Slope and bias scaling
,
you are able to enter the word length, in bits, and the slope of the
coefficients. If applicable, you are able to enter separate slopes
for the numerator and denominator coefficients. This block requires
poweroftwo slope and a bias of zero.
The filter coefficients do not obey the Rounding
mode and the Saturate on integer
overflow parameters; they are always saturated and
rounded to Nearest
.
Use this parameter to specify how you would like to designate the product output word and fraction lengths. See Filter Structure Diagrams (DSP System Toolbox) and Multiplication Data Types (DSP System Toolbox) for illustrations depicting the use of the product output data type in this block:
When you select Same as input
, these
characteristics match those of the input to the block.
When you select Binary point scaling
,
you are able to enter the word length and the fraction length of the
product output, in bits.
When you select Slope and bias scaling
,
you are able to enter the word length, in bits, and the slope of the
product output. This block requires poweroftwo slope and a bias of
zero.
Use this parameter to specify how you would like to designate the accumulator word and fraction lengths. See Filter Structure Diagrams (DSP System Toolbox) and Multiplication Data Types (DSP System Toolbox) for illustrations depicting the use of the accumulator data type in this block:
When you select Same as input
, these
characteristics match those of the input to the block.
When you select Same as product output
,
these characteristics match those of the product output.
When you select Binary point scaling
,
you are able to enter the word length and the fraction length of the
accumulator, in bits.
When you select Slope and bias scaling
,
you are able to enter the word length, in bits, and the slope of the
accumulator. This block requires poweroftwo slope and a bias of
zero.
Choose how you specify the output word length and fraction length:
When you select Same as input
, these
characteristics match those of the input to the block.
When you select Same as accumulator
,
these characteristics match those of the accumulator.
When you select Binary point scaling
,
you are able to enter the word length and the fraction length of the
output, in bits.
When you select Slope and bias scaling
,
you are able to enter the word length, in bits, and the slope of the
output. This block requires poweroftwo slope and a bias of
zero.
Select this parameter to prevent any fixedpoint scaling you specify in this block mask from being overridden by the autoscaling tool in the FixedPoint Tool.
Port  Supported Data Types 

In 

Out 

If Integration period is 3
and the input
signal is a ramp (1
, 2
, 3
,
4
,...), then some of the sums that form the output of this block
are as follows:
0+0+1 = 1
0+1+2 = 3
1+2+3 = 6
2+3+4 = 9
3+4+5 = 12
4+5+6 = 15
etc.
The zeros in the first few sums represent initial conditions. With the Input
processing parameter set to Elements as
channels
, then the values 1, 3, 6,... are successive values of the
scalar output signal. With the Input processing parameter set to
Columns as channels
, the values 1, 3, 6,... are organized
into output frames that have the same vector length as the input signal.