Coder Social home page Coder Social logo

iirj's Introduction

iirj

An IIR filter library written in JAVA.

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

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

Just run: mvn install to add it to your local maven respository or just point your project to Maven Central:

Maven central

[http://search.maven.org/#artifactdetails%7Cuk.me.berndporr%7Ciirj%7C1.1%7Cjar]

Android Studio

dependencies {
    compile group: 'uk.me.berndporr', name:'iirj', version: '1.1'
}

Documentation

  • 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 frequency responses install octave, copy the script 'src/test/resources/filtertest.m' in these subdirectories and run it from there. You should see the different frequency reponses for high/low/stop/bandpass. You can try out different filter parameters by modifiing the test scripts and re-run 'mvn test'.

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]

Maven Central

iirj's People

Contributors

berndporr avatar

Watchers

James Cloos avatar Sunghoon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.