rate-of-change
Syntax
- rate-of-change
Description
The rate-of-change operation compares each incoming sample with the previous sample and outputs the difference between them, divided by the time between the samples. This results in an output stream that is the (near) instantaneous rate of change (derivative) of the input stream.
The derivative of a signal can be useful for normalizing the signal to a common baseline before applying an operation such as threshold. For example, if a saw cut always causes a similar spike in the input value, but the resting state of the signal floats at different levels, a rate of change operation will normalize all the resting periods to 0.
Examples
- AdapterScript
var1:
- source: AIN0
- rate-of-change
info
In the above example, AIN0
is an identifier available in LabJack data sources.