• Stars
    star
    114
  • Rank 308,031 (Top 7 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An efficient IIR filter library written in JAVA

iirj

An IIR filter library written in JAVA.

Highpass, lowpass, bandpass and bandstop as Butterworth, Bessel and Chebyshev Type I/II.

You can also calculate the filter coefficients with Python's scipy and then create your custom IIR filter. See the python-design subdirectory.

It's based on the IIR1 library [https://github.com/berndporr/iir1] which in turn is based on Vinnie Falco's DSPFilters [https://github.com/vinniefalco/DSPFilters].

alt tag

Usage

import uk.me.berndporr.iirj.*;

Constructor

Butterworth butterworth = new Butterworth();

Initialisation

  1. Bandstop

    butterworth.bandStop(order,Samplingfreq,Center freq,Width in frequ);

  2. Bandpass

    butterworth.bandPass(order,Samplingfreq,Center freq,Width in frequ);

  3. Lowpass

    butterworth.lowPass(order,Samplingfreq,Cutoff frequ);

  4. Highpass

    butterworth.highPass(order,Samplingfreq,Cutoff frequ);

Filtering

Sample by sample for realtime processing:

v = butterworth.filter(v)

Coding examples

See the *Test.java files for complete examples for all filter types. Run them with mvn test. These test programs write the different impulse responses of the filters to text files.

Installation

Local install

  • Clone this repository
  • Run mvn install to add it to your local maven respository

Maven central

At Maven Central click on the iirj version number and then choose the appropriate installation option, for example for Android studio.

Android Studio

dependencies {
    implementation group: 'uk.me.berndporr', name:'iirj', version: '1.5'
}

Android studio will automatically notify you if a new IIR library is available.

Documentation

  • Online: https://berndporr.github.io/iirj/
  • mvn javadoc:javadoc generates the JavaDocs
  • mvn site generates the web pages containing the documentation under target/site describing all commands in detail.

Testing

mvn test creates impulse responses in the subdirectories for the different filters: target/surefire-reports.

To see the impulse and frequency responses run:

python3 ./plot_impulse_fresponse.py <filter>

where is is bessel, butterworth, chebyshevI or chebyshevII.

The script DetectorTest uses a bandpass filter to detect the heartbeats of an ECG recording faking a matched filter which could be also seen as a 1st approximation of a wavelet. The heartrate is stored in hr.txt.

Have fun

/Bernd Porr [http://www.berndporr.me.uk]

More Repositories

1

iir1

DSP IIR realtime filter library written in C++
C++
536
star
2

py-ecg-detectors

Popular ECG R peak detectors written in python
Python
264
star
3

fir1

FIR & LMS filter implementation in C++ with Python & JAVA wrappers
C
70
star
4

kiss-fft

A compact FFT library in C with an Android JNI wrapper
C++
61
star
5

digital_signal_processing

Digital Signal Processing lecture notes
PostScript
31
star
6

iir_fixed_point

This is a compact fixed point 2nd order IIR filter implementation
C++
17
star
7

cppTimer

C++ timer: wrapper around the standard Linux C timer to make your life easier
C++
15
star
8

realtime_cpp_coding

Realtime Embedded Coding in C++ under Linux
PostScript
14
star
9

comedirecord

An oscilloscope program for COMEDI
C++
14
star
10

cppThread

Generic C++ Thread class (very thin wrapper around std::thread)
C++
12
star
11

py-iir-filter

Realtime IIR filter (sample in, sample out)
Python
10
star
12

gpio-sysfs

A C++ class for the RPI to do GPIO communication and interrupts via sysfs
C++
9
star
13

ECG-GUDB

API for transparently accessing the Glasgow University ECG database (GUDB)
Python
8
star
14

py_ofdm

Python OFDM transmitter and receiver
Python
8
star
15

deepNeuronalFilter

Deep Neuronal Filter (DNF): A closed-loop filter to remove noise from signals with the help of a noise reference signal.
C++
5
star
16

qcustomplotdemo

Demonstrates how to use Qcustomplot for both realtime and offline data plotting.
C++
5
star
17

noisy_neighbour

Evidence collection about my noisy neighbour
PostScript
4
star
18

linux-timer-demo

Linux timer demo for periodic sampling
C++
3
star
19

comedi2py

Data acquisition via C, data visualisation via python.
C++
3
star
20

limbic-system-map

A curated map of the limbic system (emotional system of the brain)
JavaScript
2
star
21

Flac2Raw

Android library which turns a compressed audio file into a raw audio file
C++
2
star
22

webcam2rgb

Turning your webcam into a simple RGB light sensor
Python
2
star
23

OculusSpatialAnchor

Oculus Quest 2 demo XrSpatialAnchor with cmake instead of Android.mk.
C++
2
star
24

rplidar_rpi

Slamtec RPLIDAR with a Raspberry PI
C++
2
star
25

sleepeeg

Python
1
star
26

ICO-learning

C++
1
star
27

pyusbdux

Python API for the USB-DUX data acquisition devices.
Python
1
star
28

fastcgi_json_cpp_api

Header-only JSON event driven communication between jQuery and C++ via nginx
C++
1
star
29

TutorialApp

Java
1
star
30

rpi_ads1115

ADS1115 Raspberry PI API using C++ callbacks. In contrast to unprecise getters this class hands over the data at a given sampling rate via a callback handler.
C++
1
star
31

RBCZigZagAI

AI based video analysis of red blood cells in oscillating microchannels
Python
1
star