Boolean signal change detector
Simscape / Electrical / Control / General Control
The Change Detector block outputs a Boolean response of
true when it detects a change in the Boolean input signal that
meets one of these change criteria:
Rising edge — The input goes from false to true.
Falling edge — The input goes from true to false.
Either edge — The input goes from true to false or from false to true.
u— Boolean input
Input Boolean signal. If false,
0. If true,
y— Change report
Output is true,
1, when the block detects a change that corresponds
to the specified criteria (rising, falling, or either edge). Otherwise,
output is false,
Change detection— Change criteria
Rising edge(default) |
Criteria for change detection.
Initial condition— Initial Boolean value
0(default) | 1
Initial value of the previous input. If the input at the start of simulation is different from the initial condition value, the block detects an edge.
Sample time (-1 for inherited)— Block sample time
-1(default) | 0 | positive scalar
Time between consecutive block executions. During execution, the block produces outputs and, if appropriate, updates its internal state. For more information, see What Is Sample Time? and Specify Sample Time.
For inherited discrete-time operation, specify
discrete-time operation, specify a positive integer. For continuous-time operation,
If this block is in a masked subsystem, or other variant subsystem that allows you to switch between continuous operation and discrete operation, promote the sample time parameter. Promoting the sample time parameter ensures correct switching between the continuous and discrete implementations of the block. For more information, see Promote Parameter to Mask.