All Projects → flrs → HampelFilter

flrs / HampelFilter

Licence: other
Arduino library for identifying outliers with a Hampel filter

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to HampelFilter

SensorFusion
A simple implementation of some complex Sensor Fusion algorithms
Stars: ✭ 101 (+288.46%)
Mutual labels:  arduino-library
esp8266ndn
NDN Arduino library for ESP8266 and more
Stars: ✭ 18 (-30.77%)
Mutual labels:  arduino-library
ShiftRegisterLEDMatrixLib
A library for Arduino that can control LED matrices which use shift registers to manage rows and columns.
Stars: ✭ 32 (+23.08%)
Mutual labels:  arduino-library
frt
Lightweight, easy-to-use wrapper around the Arduino_FreeRTOS_Library
Stars: ✭ 18 (-30.77%)
Mutual labels:  arduino-library
visualqc
VisualQC : assistive tool to ease the quality control workflow of neuroimaging data.
Stars: ✭ 56 (+115.38%)
Mutual labels:  outlier-detection
mpu6050
MPU6050 Arduino Library
Stars: ✭ 141 (+442.31%)
Mutual labels:  arduino-library
arduino-dataflash
Support for Atmel Dataflash for the Arduino
Stars: ✭ 23 (-11.54%)
Mutual labels:  arduino-library
Seeed Arduino UltrathinLEDMatrix
an Ultrathin 32x16 LED matrix Arduino library
Stars: ✭ 47 (+80.77%)
Mutual labels:  arduino-library
LiquidCrystal I2C Hangul
아두이노 16x2 LCD 한글 출력 라이브러리
Stars: ✭ 16 (-38.46%)
Mutual labels:  arduino-library
Seeed Arduino Pedometer
This library provides a simple demo for realize a pedometer.
Stars: ✭ 16 (-38.46%)
Mutual labels:  arduino-library
CoopThreads
Lightweight, platform agnostic, stackful cooperative threads library.
Stars: ✭ 18 (-30.77%)
Mutual labels:  arduino-library
HomeSpan
HomeKit Library for the Arduino-ESP32
Stars: ✭ 410 (+1476.92%)
Mutual labels:  arduino-library
X10RF-Arduino
Arduino Library for sending x10 messages by RF
Stars: ✭ 17 (-34.62%)
Mutual labels:  arduino-library
WiFiConnect
WiFi connection manager for ESP32 and ESP8266 with OLED support
Stars: ✭ 28 (+7.69%)
Mutual labels:  arduino-library
hologram-SIMCOM
Easily use any SIMCOM cellular module with Hologram's cloud.
Stars: ✭ 42 (+61.54%)
Mutual labels:  arduino-library
AnalogPHMeter
Arduino Library for analog pH meter.
Stars: ✭ 20 (-23.08%)
Mutual labels:  arduino-library
SomeSerial
An Arduino library to wrap multiple kind of serials.
Stars: ✭ 14 (-46.15%)
Mutual labels:  arduino-library
RF24Ethernet
OSI Layers 4&5 Wireless (not WiFi) TCP/IP networking on Arduino devices using nrf24l01+ radios
Stars: ✭ 97 (+273.08%)
Mutual labels:  arduino-library
AHT10
This is an Arduino library for Aosong ASAIR AHT10, AHT15 Digital Humidity & Temperature Sensor
Stars: ✭ 32 (+23.08%)
Mutual labels:  arduino-library
ADRepository-Anomaly-detection-datasets
ADRepository: Real-world anomaly detection datasets
Stars: ✭ 77 (+196.15%)
Mutual labels:  outlier-detection

Arduino Hampel Filter Library

This library helps to identify outliers in data on Arduino.

Description

The Hampel filter is a simple but effective filter to find outliers in data. It performs better than a median filter.

This filter is designed to be used as an Arduino library. As Arduino feeds data points into a buffer, the filter does the following:

  1. Calculate the median of the values in the buffer
  2. Determine the deviations of the values in the buffer from the median
  3. Check what the median of these deviations is
  4. Multiply this median of deviations with a user-defined threshold value
  5. Check the threshold against user-defined query values to find out if values are outliers

The source code contains comments that help understand the behavior of the library further.

Usage

The following code is a simple usage example:

HampelFilter dataBuffer = HampelFilter(0.00, 3, 3.50);

void loop() {
    dataBuffer.write(24.39);
    dataBuffer.write(-4.83);
    dataBuffer.write(2.05);

    if(dataBuffer.checkIfOutlier(6.23)) {
        Serial.println("6.23 is an outlier!");
    }
}

The sample sketch writeValuesAndFilter.ino comes with the library and explains how to use it.

Download

An archive with the library can be downloaded from the releases page.

Installation

To install the Arduino Hampel Filter library, unzip the downloaded file to the ./Arduino/libraries folder, so that the path of the HampelFilter.h file is similar to ./Arduino/libraries/HampelFilter/HampelFilter.h. It is important that the files of the library are placed in a folder named HampelFilter.

Contribution

I am happy about any contribution or feedback. Please let me know about your comments via the Issues tab on GitHub.

Acknowledgements

The initial but almost entirely reworked code for this library comes from improvements of the Arduino RunningMedian library by rkail on the Arduino Forum.

The implementation of the comb sort algorithm was taken from this Wikibooks article (checked on 2016-02-11).

The following freely available documents contain useful information about Hampel filters:

License

The Arduino Hampel Filter Library is distributed under a Simplified BSD License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].