JE
jeremy7710/LowpassFilter
It's a simple low pass filter with a single input and a single output.
LowpassFilter
It's a simple low pass filter with a single input and a single output.
I also try second-order and third-order lowpass filter, but they seem the same.
I use the formula from wiki:
So It look like:
double Yp;
public double firstOrder_lowpassFilter(double X, double beta)
{
double Y;
Y = beta * X + (1 - beta) * Yp;
Yp = Y;
return Y;
}
How to use?
1.You can just copy the method above.
2.Use .dll in library folder.
3.Download the project and add in to your project.
Example
You can open project in example folder.
It's a simple lowpass filter demo.
Just keep cliking "GO" button, and output will go closer to the input value you just enter.
Reference:
https://en.wikipedia.org/wiki/Low-pass_filter
https://en.wikipedia.org/wiki/Exponential_smoothing