Detector

Detect true duration on input and construct output true duration based on output type

Library

Simulink Design Verifier

  • Detector block

Temporal Operators Terminology

  • 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

Description

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 signal becomes true for a fixed number of time steps. The true duration of the output is independent of the input.

  • Synchronized—In the final time step of the input detection, the output becomes true and stays true as long as the input signal continues to be true. The true duration of the output varies and is synchronized with the true duration of the input.

Parameters

External reset

Specify whether the block can be reset to the start of the input detection by an external Boolean reset signal.

Output type

Select Delayed Fixed Duration (the default) to specify a fixed true duration length for the output after an optional delay. Select Synchronized to synchronize the output true duration with that of the input.

Time steps for input detection

Length of the true duration for input detection (minimum is 1).

Time steps for delay (optional)

For Delayed Fixed Duration, optionally specify the length of the delay duration, after which the output becomes true.

Time steps for output duration

For Delayed Fixed Duration, specify the length of the output true duration (minimum is 1).

Examples

In the following examples, use a sample time of 1 second.

Delayed Fixed Duration

In this example, with Output type set to Delayed 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 = 2

  • Time steps for delay (optional) = 1

  • Time steps for output duration = 2

Scope 1 shows a scenario where the second true duration is not detected, because some of the true time steps occur during output construction.

However, the second true duration in Scope 2 is detected because the remaining true duration after the output construction satisfies the number of steps required for input detection.

Synchronized

In this example, with the Output type set to Synchronized and Time steps for input detection set to 2, the output becomes true in the final step of input detection. The output continues to be true as long as the input signal is true.

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 1, the output is identical to the input, as you can see in Scope 2.

Introduced in R2011a