ifm Vision Assistant O3M
160
15.7.5
Example: "Exponential smoothing fi lter" for "RAM write" / "RAM read"
modules
In this example, the results from the device or from a logic calculation are averaged over time (smoothed) .
The exponential smoothing filter generates a mean value via a weighted addition of the newest mean
value and the old value:
ݕ
௧
כ
ൌ ܽݕ
௧
ሺͳ െ ߙሻݕ
௧ିଵ
כ
Description of the modules used in the example:
Module number
Module
Description
1
RAM read
The value "
ݕ
௧
כ
ൌ ܽݕ
௧
ሺͳ െ ߙሻݕ
௧ିଵ
כ
" is stored in the module and is output .
2
Fixed value
The fixed value "1" is defined as part of the above formula .
3
Fixed value
The fixed value "0 .3" is defined as the smoothing value
ݕ
௧
כ
ൌ ܽݕ
௧
ሺͳ െ ߙሻݕ
௧ିଵ
כ
.
4
DIFF / MULT / ADD
The 4 components calculate the exponential smoothing according to the above
formula .
5
RAM write
The calculated value
ݕ
௧
כ
ൌ ܽݕ
௧
ሺͳ െ ߙሻݕ
௧ିଵ
כ
is stored in the module .
6
Analogue output
The calculated value
ݕ
௧
כ
ൌ ܽݕ
௧
ሺͳ െ ߙሻݕ
௧ିଵ
כ
is output at analogue output 1 .