Hysteresis band filter#

float uz_signals_hysteresisband_filter(float input, float upper_limit, float lower_limit)#

Passes the input signal through if it is inside the hysteresis band limited by the upper or lower limit, otherwise the output is zero.

Parameters:
  • input – Any input signal

  • upper_limit – Upper limit of the hysteresis band

  • lower_limit – Lower limit of the hysteresis band (needs to be smaller than the upper limit)

Returns:

float filtered signal

Example#

Listing 64 Example function call to filter the input#
1#include "uz_signals.h"
2int main(void) {
3   float input = 2.0f;
4   float upper_limit = 0.5f;
5   float lower_limit = 0.2f;
6   float output = uz_signals_hysteresisband_filter(input, upper_limit, lower_limit);
7}

Description#

Passes the input through if it is inside a hysteresis band limited by the upper and lower limit values. Otherwise the output is 0.

Figure made with TikZ

Fig. 265 hysteresis band filter