Products & Services Solutions Academia Support User Community Company

Learn more about Communications Blockset   

Ideal Rectangular Pulse Filter - Shape input signal using ideal rectangular pulses

Library

Comm Filters

Description

The Ideal Rectangular Pulse Filter block upsamples and shapes the input signal using rectangular pulses. The block replicates each input sample N times, where N is the Pulse length parameter. After replicating input samples, the block can also normalize the output signal and/or apply a linear amplitude gain.

If the Pulse delay parameter is nonzero, then the block outputs that number of zeros at the beginning of the simulation, before starting to replicate any of the input values.

Inputs and Outputs

The input can be either a scalar or a frame-based column vector. double, single, and fixed-point data types are supported.

The vector size (in frame-based mode), the pulse length, and the pulse delay are mutually independent. They do not need to satisfy any conditions with respect to each other.

Normalization Methods

You determine the block's normalization behavior using the Normalize output signal and Linear amplitude gain parameters.

After the block applies the scaling specified in the Normalization method parameter, it multiplies the scaled signal by the constant scalar value specified in the Linear amplitude gain parameter.

The output is scaled by . If the output of this block feeds the input to the AWGN Channel block, specify the AWGN signal power parameter to be 1/N.

Dialog Box

Pulse length

The number of samples in each output pulse; that is, the number of times the block replicates each input value when creating the output signal.

Pulse delay

The number of zeros that appear in the output at the beginning of the simulation, before the block replicates any input values.

Input sampling mode

The type of input signal: Frame-based or Sample-based.

Normalize output signal

If you select this, then the block scales the set of replicated values before applying the linear amplitude gain.

Normalization method

The quantity that the block considers when scaling the set of replicated values. Choices are Sum of samples and Energy per pulse. This field appears only if you select Normalize output signal.

Linear amplitude gain

A positive scalar used to scale the output signal.

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 storing the result. The filter coefficients do not obey this parameter; they always round to Nearest.

For more information, see Rounding Modes in the Signal Processing Blockset User's Guide or Rounding Mode: Simplest in the Simulink Fixed Point documentation.

Overflow mode

Select the overflow mode for fixed-point operations. The filter coefficients do not obey this parameter; they are always saturated.

Coefficients

Choose how you specify the word length and the fraction length of the filter coefficients (numerator and/or denominator). See Filter Structure Diagrams in Signal Processing Blockset Reference Guide 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 binary-point 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 binary-point 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 power-of-two slope and a bias of zero.

  • The filter coefficients do not obey the Rounding mode and the Overflow mode parameters; they are always saturated and rounded to Nearest.

Product output

Use this parameter to specify how you would like to designate the product output word and fraction lengths. See Filter Structure Diagrams and Multiplication Data Types in Signal Processing Blockset Reference Guide 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 power-of-two slope and a bias of zero.

Accumulator

Use this parameter to specify how you would like to designate the accumulator word and fraction lengths. See Filter Structure Diagrams and Multiplication Data Types 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 power-of-two slope and a bias of zero.

Output

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 power-of-two slope and a bias of zero.

Lock scaling against changes by the autoscaling tool

Select this parameter to prevent any fixed-point scaling you specify in this block mask from being overridden by the autoscaling tool in the Fixed-Point Tool.

Examples

If Pulse length is 4 and Pulse delay is the scalar 3, then the table below shows how the block treats the beginning of a ramp (1, 2, 3,...) in several situations. (The values shown in the table do not reflect vector sizes but merely indicate numerical values.)

Normalization Method, If AnyLinear Amplitude GainFirst Several Output Values
None (Normalize output signal cleared) 10, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,...
None (Normalize output signal cleared) 100, 0, 0, 10, 10, 10, 10, 20, 20, 20, 20, 30, 30, 30, 30,...
Sum of samples10, 0, 0, 0.25, 0.25, 0.25, 0.25, 0.5, 0.5, 0.5, 0.5, 0.75, 0.75, 0.75, 0.75,..., where 0.25*4=1
Sum of samples100, 0, 0, 2.5, 2.5, 2.5, 2.5, 5, 5, 5, 5, 7.5, 7.5, 7.5, 7.5,...
Energy per pulse10, 0, 0, 0.5, 0.5, 0.5, 0.5, 1.0, 1.0, 1.0, 1.0, 1.5, 1.5, 1.5, 1.5,..., where (0.5)^2*4=1^2
Energy per pulse100, 0, 0, 5, 5, 5, 5, 10, 10, 10, 10, 15, 15, 15, 15,...

See Also

Upsample, Integrate and Dump

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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