Integrate and Dump - Integrate discrete-time signal, resetting to zero periodically

Library

Comm Filters

Description

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:

This block will work within a triggered subsystem, as long as it is used in the single-rate mode.

Transients and Delays

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:

Dialog Box

Integration period

The number of input samples between resets.

Offset

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.

Output intermediate values

Determines whether the block suppresses the intermediate cumulative sums between successive resets.

Fixed-Point Signal Flow Diagram

Fixed-Point Attributes

The settings for the following parameters only apply when block inputs are fixed-point signals.

Rounding mode

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:

Overflow mode

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:

Accumulator—Mode

Use the Accumulator—Mode parameter to specify how you would like to designate the accumulator word and fraction lengths:

Output

Use the Output parameter to choose how you specify the word length and fraction length of the output of the block:

For additional information about the parameters pertaining to fixed-point applications, see Specifying Fixed-Point Attributes.

Examples

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 BoxInput Signal PropertiesFirst 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 40, 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 40, 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).

Example of Transient and Delay

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.

See Also

Windowed Integrator, Discrete-Time Integrator (Simulink® documentation), Ideal Rectangular Pulse Filter

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS