Package liba

Class lpf


public class lpf extends Object
Low Pass Filter
  • Constructor Summary

    Constructors
    Constructor
    Description
    lpf(double fc, double ts)
    construct a new lpf object
  • Method Summary

    Modifier and Type
    Method
    Description
    final double
    get coefficient for Low Pass Filter
    final lpf
    gen(double fc, double ts)
    generate for Low Pass Filter
    final double
    iter(double x)
    compute for Low Pass Filter
    final double
    get output for Low Pass Filter
    final lpf
    zeroing for Low Pass Filter

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • lpf

      public lpf(double fc, double ts)
      construct a new lpf object
      Parameters:
      fc - cut-off frequency unit(hz)
      ts - sampling time unit(s)
  • Method Details

    • alpha

      public final double alpha()
      get coefficient for Low Pass Filter
      Returns:
      filter coefficient [0,1]
    • output

      public final double output()
      get output for Low Pass Filter
      Returns:
      filter output
    • gen

      public final lpf gen(double fc, double ts)
      generate for Low Pass Filter
      Parameters:
      fc - cut-off frequency unit(hz)
      ts - sampling time unit(s)
      Returns:
      lpf
    • iter

      public final double iter(double x)
      compute for Low Pass Filter
      Parameters:
      x - input value
      Returns:
      output value
    • zero

      public final lpf zero()
      zeroing for Low Pass Filter
      Returns:
      lpf