Polybench® Reference
Creates pseudo-boolean pulses or triggers depending on signal levels, with the possibility to use hysteresis.

Level detector

Overview

Use this operator to get triggers of signals. The operator allows to set specific detection levels and can output a One Shot trigger, or a trigger of a defined period of time.
To prevent noisy state switching, this operator has various hysterisis options.

Operator ports

Input S: Floating point values

Output S_bool: Floating point values

Properties

Find more information about changing properties here: link

TriggerLevel
type: Real value
The input level at which the output will trigger to True (1.0).


ResetLevel
type: Real value
The input level at which the detection will be reset (depending on the method).


Method
type: Select from the list
Choose the trigger method from the drop-down list.
Select one of those presets:
HoldTimePeriod
After a trigger the output value is kept constant for the specified amount of time.
SchmittTrigger
After a trigger the output value is kept constant until the input signal crosses the Reset value.


HoldTimeInTime
type: Real value
The number of seconds, the output remains in triggered (1.0) state (applicable with Method HoldTimePeriod only).


HoldTimeInSamples
type: Integer value
The number of sample periods, the output remains in triggered (1.0) state (applicable with Method HoldTimePeriod only).


Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.' or '$' characters.

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: link

TriggerLevel
type: See description
The input level at which the output will trigger to True (1.0).


ResetLevel
type: See description
The input level at which the output state will be reset (depending on the method).

Details

The Level Detector is a key component in creating triggers of specific phenomena in your signals. The Level Detector offers ways to set an hysteresis in the detection. In fact, this operator combines a so called One Shot operator (create a pulse of shortest possible time) and a Schmitt-trigger operator (use hysteresis in level detection).

The output of the Level Detector has pseudo-boolean values, which are 0 for False and 1 for True. A One Shot trigger is a pulse with the duration of one sample period, with a value of 1 (pseudo-true).

The detection is carried out for each channel individually, if you have multiple channels connected at the input.

For more information about triggers and pseudo-boolean values, and an example of the use of the Level Detector, please see here: link.

Below is a simple demonstration of getting a trigger from a signal. Since the trigger is only one sample period long, a feedbacked Adder can be used to count the triggers.