Detect true duration on input and construct output true duration based on output type
Simulink Design Verifier
True duration of a signal — Consecutive time steps during which a signal is true
Length of the true duration of the signal — The number of time steps that constitute the true duration
Input detection phase — The phase that is complete at the final time step of the expected length of the input true duration
Output construction phase— The phase when the block constructs a true duration at the output based on the output type of the block
Delay duration — The number of time steps of delay after input detection, after which the output signal is true
The inputs and outputs of the Detector block are of Boolean type.
On input detection, the Detector block constructs an output signal based on one of the two output types that you specify:
Delayed Fixed Duration—After
the input detection is complete and after an optional delay, the output
true for a fixed number of time
steps. The true duration of the output is independent of the input.
the final time step of the input detection, the output becomes
true as long as the input signal continues
true. The true duration of the output varies
and is synchronized with the true duration of the input.
Specify whether the block can be reset to the start of the input detection by an external Boolean reset signal.
Delayed Fixed Duration (the
default) to specify a fixed true duration length for the output after
an optional delay. Select
synchronize the output true duration with that of the input.
Length of the true duration for input detection (minimum is
Delayed Fixed Duration, optionally
specify the length of the delay duration, after which the output becomes
Delayed Fixed Duration, specify
the length of the output true duration (minimum is
In the following examples, use a sample time of
In this example, with Output type set to
Fixed Duration, the input detection phase does not continue
during the output signal construction. The following block parameters
for the Detector block are set as follows:
Time steps for input detection =
Time steps for delay (optional) =
Time steps for output duration =
Scope 1 shows a scenario where the second
is not detected, because some of the
steps occur during output construction.
However, the second
true duration in Scope
2 is detected because the remaining
after the output construction satisfies the number of steps required
for input detection.
In this example, with the Output type set
Synchronized and Time steps
for input detection set to
the output becomes
true in the final step of input
detection. The output continues to be true as long as the input signal
Scope 1 shows that the output becomes true in the second time
step, which is the final time step of the input detection phase. When
the number of time steps for input detection is set to
the output is identical to the input, as you can see in Scope 2.