Skip to Main Content Skip to Search
Product Documentation

Quantizer - Discretize input at specified interval

Library

Discontinuities

Description

The Quantizer block passes its input signal through a stair-step function so that many neighboring points on the input axis are mapped to one point on the output axis. The effect is to quantize a smooth signal into a stair-step output. The output is computed using the round-to-nearest method, which produces an output that is symmetric about zero.

y = q * round(u/q)

where y is the output, u the input, and q the Quantization interval parameter.

Data Type Support

The Quantizer block accepts and outputs real or complex signals of type single or double. For more information, see Data Types Supported by Simulink in the Simulink documentation.

Parameters and Dialog Box

Quantization interval

The interval around which the output is quantized. Permissible output values for the Quantizer block are n*q, where n is an integer and q the Quantization interval. The default is 0.5.

Treat as gain when linearizing

Simulink software by default treats the Quantizer block as unity gain when linearizing. This setting corresponds to the large-signal linearization case. If you clear this check box, the linearization routines assume the small-signal case and set the gain to zero.

Sample time (-1 for inherited)

Specify the sample time of this Outport block. See How to Specify the Sample Time in the online documentation for information on specifying sample times. The output of this block changes at the specified rate to reflect the value of its input.

Examples

The sldemo_boiler model shows how you can use the Quantizer block.

The Quantizer block appears in the Boiler Plant model/digital thermometer/ADC subsystem.

The ADC subsystem digitizes the input analog voltage by:

For more information, see Exploring the Fixed-Point "Bang-Bang Control" Model in the Stateflow documentation.

Characteristics

Direct Feedthrough

Yes

Sample Time

Inherited from driving block

Scalar Expansion

Yes, of parameter

Dimensionalized

Yes

Zero-Crossing Detection

No

  


Related Products & Applications

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

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