| Communications Blockset™ | ![]() |
Comm Filters
The Integrate and Dump block creates a cumulative sum of the discrete-time input signal, while resetting the sum to zero according to a fixed schedule. When the simulation begins, the block discards the number of samples specified in the Offset parameter. After this initial period, the block sums the input signal along columns and resets the sum to zero every N input samples, where N is the Integration period parameter value. The reset occurs after the block produces its output at that time step.
This block supports double, single, and fixed-point input and output signals. The port data types are inherited from the signals that drive the block.
The integrate-and-dump operation is often used in a receiver model when the system's transmitter uses a simple square-pulse model. It can also be used in fiber optics and in spread-spectrum communication systems such as CDMA (code division multiple access) applications.
The input can be either a scalar or a frame-based matrix. If the input is frame-based, then it must have k*N rows for some positive integer k, and the block processes each column independently.
The output contents, dimensions, and sample time are affected by the Output intermediate values check box, as follows:
If you clear the check box, then the block outputs the cumulative sum at each reset time.
If the input is sample-based, then the output sample time is N times the input sample time and the block experiences a delay whose duration is one output sample period. In this case, the output dimensions match the input dimensions.
If the input is a frame-based (k*N)-by-n matrix, then the output is k-by-n. In this case, the block experiences no delay and the output frame period matches the input frame period.
If you select the check box, then the block outputs the cumulative sum at each time step, including the reset times. The output has the same sample time and the same matrix dimensions as the input.
This block will work within a triggered subsystem, as long as it is used in the single-rate mode.
A nonzero value in the Offset parameter causes the block to output one or more zeros during the initial period while it discards input samples. If the input is a frame-based matrix with n columns and the Offset parameter is a length-n vector, then the mth element of the Offset vector is the offset for the mth column of data. If Offset is a scalar, then the block applies the same offset to each column of data. The output of initial zeros due to a nonzero Offset value is a transient effect, not a persistent delay.
When the Output intermediate values check box is cleared, the block's output is delayed, relative to its input, throughout the simulation:
If the input is sample-based, then the output is delayed by one sample after any transient effect is over. That is, after removing transients from the input and output, you can see the result of the mth integration period in the output sample indexed by m+1.
If the input is frame-based and the Offset parameter is nonzero, then after the transient effect is over, the result of each integration period appears in the output frame corresponding to the last input sample of that integration period. This is one frame later than the output frame corresponding to the first input sample of that integration period, in cases where an integration period spans two input frames. For an example of this situation, see Example of Transient and Delay.

The number of input samples between resets.
A nonnegative integer vector or scalar specifying the number of input samples to discard from each column of input data at the beginning of the simulation.
Determines whether the block suppresses the intermediate cumulative sums between successive resets.


The settings for the following parameters only apply when block inputs are fixed-point signals.
Use this parameter to specify the rounding method to be used when the result of a fixed-point calculation does not map exactly to a number representable by the data type and scaling that stores the result:
Zero rounds the result of a calculation to the closest representable number in the direction of zero.
Nearest rounds the result of a calculation to the closest representable number, with the exact midpoint rounded to the closest representable number in the direction of positive infinity.
Ceiling rounds the result of a calculation to the closest representable number in the direction of positive infinity.
Floor, which is equivalent to truncation, rounds the result of a calculation to the closest representable number in the direction of negative infinity.
Use this parameter to specify the method to be used if the magnitude of a fixed-point calculation result does not fit into the range of the data type and scaling that stores the result:
Saturate represents positive overflows as the largest positive number in the range being used, and negative overflows as the largest negative number in the range being used.
Wrap uses modulo arithmetic to cast an overflow back into the representable range of the data type. See Modulo Arithmetic for more information.
Use the Accumulator—Mode parameter to specify how you would like to designate the accumulator word and fraction lengths:
When you select Inherit via internal rule, the block automatically calculates the accumulator output word and fraction lengths.
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 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. The bias of all signals in Signal Processing Blockset™ software is zero.
Use the Output parameter to choose how you specify the word length and fraction length of the output of the block:
When you select Same as accumulator, these characteristics match those of the accumulator.
When you select Same as input, these characteristics match those of the input to the block.
When you select Binary point scaling, enter the word length and the fraction length of the output, in bits.
When you select Slope and bias scaling, enter the word length, in bits, and the slope of the output.
For additional information about the parameters pertaining to fixed-point applications, see Specifying Fixed-Point Attributes.
If Integration period is 4 and Offset is the scalar 3, then the table below shows how the block treats the beginning of a ramp (1, 2, 3, 4,...) in several situations. (The values shown in the table do not reflect vector sizes but merely indicate numerical values.)
| Output intermediate values Check Box | Input Signal Properties | First Several Output Values |
|---|---|---|
| Cleared | Sample-based scalar | 0, 0, 4+5+6+7, and 8+9+10+11, where one 0 is an initial transient value and the other 0 is a delay value that results from the cleared check box and sample-based input. |
| Cleared | Frame-based column vector of length 4 | 0, 4+5+6+7, and 8+9+10+11, where 0 is an initial delay value that results from the nonzero offset. The output is a frame-based scalar. |
| Selected | Sample-based scalar | 0, 0, 0, 4, 4+5, 4+5+6, 4+5+6+7, 8, 8+9, 8+9+10, 8+9+10+11, and 12, where the three 0s are initial transient values. |
| Selected | Frame-based column vector of length 4 | 0, 0, 0, 4, 4+5, 4+5+6, 4+5+6+7, 8, 8+9, 8+9+10, 8+9+10+11, and 12, where the three 0s are initial transient values. The output is a frame-based column vector of length 4. |
In all cases, the block discards the first three input samples (1, 2, and 3).
The figure below illustrates a situation in which the block exhibits both a transient effect for three output samples, as well as a one-sample delay in alternate subsequent output samples for the rest of the simulation. The figure also indicates how the input and output values are organized as frame-based column vectors. In each vector in the figure, the last sample of each integration period is underlined, discarded input samples are white, and transient zeros in the output are white.

The transient effect lasts for ceil(13/5) output samples because the block discards 13 input samples and the integration period is 5. The first output sample after the transient effect is over, 80, corresponds to the sum 14+15+16+17+18 and appears at the time of the input sample 18. The next output sample, 105, corresponds to the sum 19+20+21+22+23 and appears at the time of the input sample 23. Notice that the input sample 23 is one frame later than the input sample 19; that is, this five-sample integration period spans two input frames. As a result, the output of 105 is delayed compared to the first input (19) that contributes to that sum.
Windowed Integrator, Discrete-Time Integrator (Simulink® documentation), Ideal Rectangular Pulse Filter
![]() | Integer to Bit Converter | Interlacer | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |