Polybench® for biosignals / reference 1.34.1
Creates pseudo-boolean pulses or triggers depending on signal levels, with the possibility to use hysteresis.

Level detector

Overview

Use this operator to detect state transitions in signals. The operator allows to set specific detection levels and can output a One Shot trigger, or a state change of a defined period of time.

To prevent noisy state switching, this operator has various hysterisis options.

This operator is often used to generate triggers (transition from 0 to 1) that are exactly 1 sample long (One Shot).

Operator ports

Input S: Floating point values

Output S_bool: Floating point values

Properties

Find more information about changing properties here: "Properties Viewer"

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 for 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 '.', '$' nor '@' characters.

For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".

Documentation
type: See description
Optional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: "Variable Parameters"

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).


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


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

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: "Pseudo-booleans and triggers".

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.