== Another Low-pass filter ==
 
== Another Low-pass filter ==
Leaving aside the sophisticated design methods based on Z transformation with its extensive math, this idea uses another approach based on a recursive equation. You calculate each output-signal sample as the sum of the input signal and the previous output signal with corresponding coefficients. A recursive equation defines a single-pole lowpass filter as: Y[n]=X[n]×a0+Y[n–1]×b1, where X[n] and Y[n] are input and output values of sample [n], Y[n–1] is an output value of the previous sample [n–1], and a0 and b1 are weight coefficients that decrement δ controls. The coefficients have the value of 0<δ<1, a0=1–δ, and b1=δ. Physically, δ is the amount of decay between adjacent output samples when the input signal drops from a high level to a low level. You can directly specify the value of δ or find it from the desired time constant of the filter, d, which is the number of samples it takes the output to rise to 63.2% of the steady-state level for a lowpass filter. A fixed relationship exists between d and δ: δ=e–1/d, where e is the base of natural logarithms. The preceding equations yield Y[n]=Y[n–1]+(1–δ)×(X[n]–Y[n–1]).