Package liba
Class lpf
java.lang.Object
liba.lpf
Low Pass Filter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal doublealpha()get coefficient for Low Pass Filterfinal lpfgen(double fc, double ts) generate for Low Pass Filterfinal doubleiter(double x) compute for Low Pass Filterfinal doubleoutput()get output for Low Pass Filterfinal lpfzero()zeroing for Low Pass Filter
-
Constructor Details
-
lpf
public lpf(double fc, double ts) construct a newlpfobject- 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
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
zeroing for Low Pass Filter- Returns:
lpf
-