| Contents | Index |
Discontinuities
The Saturation block imposes upper and lower limits on an input signal.
| When the input is... | Where... | The block output is the... |
|---|---|---|
Within the range specified by the Lower limit and Upper limit parameters | Lower limit ≤ Input value ≤ Upper limit | Input value |
Less than the Lower limit parameter | Input value < Lower limit | Lower limit |
Greater than the Upper limit parameter | Input value > Upper limit | Upper limit |
When the Lower limit and Upper limit parameters have the same value, the block output is that value.
The Saturation block accepts real signals of the following data types:
Floating point
Built-in integer
Fixed point
For more information, see Data Types Supported by Simulink in the Simulink documentation.
The Main pane of the Saturation block dialog box appears as follows:

The Signal Attributes pane of the Saturation block dialog box appears as follows:

Display the Data Type Assistant.
The Data Type Assistant helps you set the Output data type parameter.
See Specifying Block Output Data Types for more information.
See Block-Specific Parameters for the command-line information.
Specify the upper bound on the input signal.
Default: 0.5
Minimum: value from the Output minimum parameter
Maximum: value from the Output maximum parameter
When the input signal to the Saturation block is above this value, the output of the block is clipped to this value.
The Upper limit parameter is converted to the output data type offline using round-to-nearest and saturation.
See Block-Specific Parameters for the command-line information.
Specify the lower bound on the input signal.
Default: -0.5
Minimum: value from the Output minimum parameter
Maximum: value from the Output maximum parameter
When the input signal to the Saturation block is below this value, the output of the block is clipped to this value.
The Lower limit parameter is converted to the output data type offline using round-to-nearest and saturation.
See Block-Specific Parameters for the command-line information.
Select this parameter to cause the linearization commands to treat the gain as 1
Default: On
Select to cause the linearization commands to treat the gain as 1.
Clear to cause the linearization commands to treat the gain as 0.
Linearization commands in Simulink software treat this block as a gain in state space.
See Block-Specific Parameters for the command-line information.
Select to enable zero-crossing detection. For more information, see Zero-Crossing Detection.
Default: On
See Block-Specific Parameters for the command-line information.
Enter the discrete interval between sample time hits or specify another appropriate sample time such as continuous or inherited.
Default: -1
By default, the block inherits its sample time based upon the context of the block within the model. To set a different sample time, enter a valid sample time based upon the table in Types of Sample Time.
See also How to Specify the Sample Time in the online documentation for more information.
See Block-Specific Parameters for the command-line information.
Select to lock the output data type setting of this block against changes by the Fixed-Point Tool and the Fixed-Point Advisor.
Default: Off
Locks the output data type setting for this block.
Allows the Fixed-Point Tool and the Fixed-Point Advisor to change the output data type setting for this block.
See Block-Specific Parameters for the command-line information.
For more information, see Fixed-Point Tool and Fixed-Point Advisor in the Simulink Fixed Point documentation.
Specify the rounding mode for fixed-point operations.
Default: Floor
Rounds both positive and negative numbers toward positive infinity. Equivalent to the MATLAB ceil function.
Rounds number to the nearest representable value. If a tie occurs, rounds to the nearest even integer. Equivalent to the Fixed-Point Toolbox convergent function.
Rounds both positive and negative numbers toward negative infinity. Equivalent to the MATLAB floor function.
Rounds number to the nearest representable value. If a tie occurs, rounds toward positive infinity. Equivalent to the Fixed-Point Toolbox nearest function.
Rounds number to the nearest representable value. If a tie occurs, rounds positive numbers toward positive infinity and rounds negative numbers toward negative infinity. Equivalent to the Fixed-Point Toolbox round function.
Automatically chooses between round toward floor and round toward zero to generate rounding code that is as efficient as possible.
Rounds number toward zero. Equivalent to the MATLAB fix function.
See Block-Specific Parameters for the command-line information.
For more information, see Rounding in the Simulink Fixed Point User's Guide.
Specify the minimum value that the block should output.
Default: [] (unspecified)
This number must be a finite real double scalar value.
Note If you specify a bus object as the data type for this block, do not set the minimum value for bus data on the block. Simulink ignores this setting. Instead, set the minimum values for bus elements of the bus object specified as the data type. For information on the Minimum property of a bus element, see Simulink.BusElement. |
Simulink uses the minimum to perform:
Parameter range checking (see Checking Parameter Values) for some blocks
Simulation range checking (see Signal Ranges)
Automatic scaling of fixed-point data types
See Block-Specific Parameters for the command-line information.
Specify the maximum value that the block should output.
Default: [] (unspecified)
This number must be a finite real double scalar value.
Note If you specify a bus object as the data type for this block, do not set the maximum value for bus data on the block. Simulink ignores this setting. Instead, set the maximum values for bus elements of the bus object specified as the data type. For information on the Maximum property of a bus element, see Simulink.BusElement. |
Simulink uses the maximum value to perform:
Parameter range checking (see Checking Parameter Values) for some blocks
Simulation range checking (see Signal Ranges)
Automatic scaling of fixed-point data types
See Block-Specific Parameters for the command-line information.
Specify the output data type.
Default: Inherit: Same as input
Use data type of the driving block.
Use data type of input signal.
Output data type is double.
Output data type is single.
Output data type is int8.
Output data type is uint8.
Output data type is int16.
Output data type is uint16.
Output data type is int32.
Output data type is uint32.
Output data type is fixed point fixdt(1,16,0).
Output data type is fixed point fixdt(1,16,2^0,0).
Use a data type object, for example, Simulink.NumericType.
See Block-Specific Parameters for the command-line information.
See Specifying Block Output Data Types in the Simulink User's Guide for more information.
Select the category of data to specify.
Default: Inherit
Inheritance rules for data types. Selecting Inherit enables a second menu/text box to the right. Select one of the following choices:
Inherit via back propagation
Same as input (default)
Built-in data types. Selecting Built in enables a second menu/text box to the right. Select one of the following choices:
double (default)
single
int8
uint8
int16
uint16
int32
uint32
Fixed-point data types.
Expressions that evaluate to data types. Selecting Expression enables a second menu/text box to the right, where you can enter the expression.
Clicking the Show data type assistant button enables this parameter.
See Block-Specific Parameters for the command-line information.
See Using the Data Type Assistant in the Simulink User's Guide.
Specify whether you want the fixed-point data as signed or unsigned.
Default: Signed
Selecting Mode > Fixed point enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify the bit size of the word that holds the quantized integer.
Default: 16
Minimum: 0
Maximum: 32
Selecting Mode > Fixed point enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify the method for scaling your fixed-point data to avoid overflow conditions and minimize quantization errors.
Default: Best precision
Specify binary point location.
Enter slope and bias.
Specify best-precision values.
Selecting Mode > Fixed point enables this parameter.
Selecting Binary point enables:
Fraction length
Calculate Best-Precision Scaling
Selecting Slope and bias enables:
Slope
Bias
Calculate Best-Precision Scaling
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify fraction length for fixed-point data type.
Default: 0
Binary points can be positive or negative integers.
Selecting Scaling > Binary point enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify slope for the fixed-point data type.
Default: 2^0
Specify any positive real number.
Selecting Scaling > Slope and bias enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify bias for the fixed-point data type.
Default: 0
Specify any real number.
Selecting Scaling > Slope and bias enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
The sldemo_boiler model shows how you can use the Saturation block.
The Saturation block appears in the Boiler Plant model/digital thermometer/ADC subsystem.

The ADC subsystem digitizes the input analog voltage by:
Multiplying the analog voltage by 256/5 with the Gain block
Rounding the value to integer floor with the Quantizer block
Limiting the output to a maximum of 255 (the largest unsigned 8-bit integer value) with the Saturation block
For more information, see Exploring the Fixed-Point "Bang-Bang Control" Model in the Stateflow documentation.
Direct Feedthrough | Yes |
Sample Time | Specified in the Sample time parameter |
Scalar Expansion | Yes, of parameters and input |
Dimensionalized | Yes |
Zero-Crossing Detection | Yes, if enabled. |

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 |