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;
}
1.You can just copy the method above.
2.Use .dll in library folder.
3.Download the project and add in to your project.
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.
https://en.wikipedia.org/wiki/Low-pass_filter
https://en.wikipedia.org/wiki/Exponential_smoothing