| Simulink Reference | ![]() |
Check that the absolute value of the difference between successive samples of a discrete signal is less than an upper bound
Library
Description
The Check Discrete Gradient block checks each signal element at its input to determine whether the absolute value of the difference between successive samples of the element is less than an upper bound. The block's parameter dialog box allows you to specify the value of the upper bound (1 by default). If the verification condition is true, the block does nothing. Otherwise, the block halts the simulation, by default, and displays an error message in the Simulation Diagnostics Viewer.
The Model Verification block enabling setting on the Data Integrity diagnostics pane of the Configuration Parameters dialog box lets you enable or disable all model verification blocks, including Check Discrete Gradient blocks, in a model.
The Check Discrete Gradient block and its companion blocks in the Model Verification library are intended to facilitate creation of self-validating models. For example, you can use model verification blocks to test that signals do not exceed specified limits during simulation. When you are satisfied that a model is correct, you can turn error-checking off by disabling the verification blocks. You do not have to physically remove them from the model. If you need to modify a model, you can temporarily turn the verification blocks back on to ensure that your changes do not break the model.
Data Type Support
The Check Discrete Gradient block accepts single, double, int8, int16, and int32 input signals of any dimensions.
Parameters and Dialog Box
1) at each time step if the assertion succeeds and false (0) if the assertion fails. The data type of the output signal is Boolean if you have selected the Implement logic signals as boolean data option on the Simulation and code generation optimization pane of Simulink's Configuration Parameters dialog box. Otherwise the data type of the output signal is double.
graphic or text. The graphic option displays a graphical representation of the assertion condition on the icon. The text option displays a mathematical expression that represents the assertion condition. If the icon is too small to display the expression, the text icon displays an exclamation point. To see the expression, enlarge the icon.
Characteristics
| Direct Feedthrough |
No |
| Sample Time |
Inherited from driving block |
| Scalar Expansion |
No |
| Dimensionalized |
Yes |
| Zero Crossing |
No |
| Bus Selector | Check Dynamic Gap | ![]() |
© 1994-2005 The MathWorks, Inc.