For those of us who are more familiar with digital filters than their analog counterparts, a one pole lowpass filter is easy:

*y*

_{n}= (1 - β)

*x*

_{n}+ β

*y*

_{n-1}, 0 < β < 1.

But how do you filter a signal with an ordinary differential equation?

Working backwards, we should have an ODE that says

*dy*/

*dt*+

*Ay*(

*t*) =

*Bx*(

*t*) (*)

for some suitable constants

*A*and

*B*yet to be found. The differential may be approximated with a forward difference over a short time interval

*T*, so

*dy*(

*nT*)/

*dt*≈ (

*y*(

*nT*+

*T*) -

*y*(

*nT*))/

*T*. Setting

*T*equal to one sampling period, the discrete time version of (*) is

(

*y*_{n+1}-*y*_{n})/*T*+*ay*_{n}=*bx*_{n}.Perform some algebraic shuffling to and fro of the variables to obtain

*y*

_{n+1}=

*bTx*

_{n}+ (1 -

*aT*)

*y*

_{n}

and recall that the filter coefficients are 1 - β =

*bT*and β = 1 -

*aT,*hence

*bT*=

*aT*. Now we introduce a new coefficient τ > 0 for the variables in (*) and set 1/τ equal to both

*A*and

*B*. The system then is

*dy*/

*dt*= (

*x*-

*y*) / τ

where now τ plays the role of a relaxation time constant. The greater τ is, the slower the response of the filter. Also, when the input equals the output the derivative becomes zero, which is to say that the system has unit DC response as required.

## No comments:

## Post a Comment

I'm not home right now, but please leave a message and I'll get back to you in the next few years.