====== Filter ====== {{:en:mervis-ide:35-help:b86.png}} ===== Block name ===== B86_FILTER ===== ST call ===== PROGRAM TEST FILTER VAR REAL1,REAL2,REAL3 :REAL; FB: LIB.CORE.V1_0.B86_FILTER; END_VAR FB(IN:= REAL1, INDT:=REAL2, OUT=>REAL3); END_PROGRAM ===== Library ===== LIB\CORE ===== Version ===== V1.0 ===== Description ===== The block is an analogue filter of the input signal in time. ===== Inputs ===== |Input|Type|Description |Default value| |IN |REAL|Input signal, distorted by noise, fluctuations, etc. |0 | |INA |REAL|DO NOT USE |0 | |INDT |REAL|Effective filtering time. Set //DT = 10-30//% of the period of the useful signal //(Tperiod = 900s => DT = 90-270s)//|90 | ===== Outputs ===== |Output|Type|Description | |OUT |REAL|Filtered signal| ===== Function ===== The block is an analogue filter. There is weighted average at the output out, where older values are less important, they are weighed with lower factor. The importance is set by the //indt// parameter according to //q=1/(1+4Dt/t)// (aka exponential decay). {{:en:mervis-ide:35-help:b86_sin.png?900}} B86 Filter – Sine wave with period //T=10 s//. //X// is a white noise signal. {{:en:mervis-ide:35-help:b86_3.png?900}} B86 Filter – //x// - sine wave with white noise, //y// - filtered signal with parameter **//indt = 3//**. {{:en:mervis-ide:35-help:b86_6.png?900}} B86 Filter – //x// - sine wave with white noise, //y// -  filtered signal with parameter **//indt = 6//**. {{:en:mervis-ide:35-help:b86_9.png?900}} B86 Filter – //x// - sine wave with white noise, //y// -  filtered signal with parameter **//indt = 9//**. {{:en:mervis-ide:35-help:b86_20.png?900}} B86 Filter – //x// - sine wave with white noise, //y// -  filtered signal with parameter **//indt = 20//**. Increasing of the //indt// parameter out of recommended bounds increases the output signal delay. The original sine signal is flattened at the same time, which causes its lower amplitude. ===== Application example ===== {{:en:mervis-ide:35-help:b86_example.png}}\\ The filter is used for e.g. outside temperature signal filtering where the outside temperature sensor is influenced by an exhaust air from an air-handling unit. It makes the weather-based controls more stable.