Derivation of A Discrete-Time Lowpass Filter: Finn Haugen Finn@techteach - No
Derivation of A Discrete-Time Lowpass Filter: Finn Haugen Finn@techteach - No
Finn Haugen
[email protected]
March 21, 2008
1
y(s)
=
u(s)
Tf s + 1
(1)
(2)
(3)
Taking the inverse Laplace transform of both sides of this equation gives
the following dierential equation (because multiplying by s means
time-dierentiation in the time-domain):
+ y(t) = u(t)
Tf y(t)
(4)
(5)
Exact
slope,
y(t k)
y(tk )
y(t k )
y(tk-1 )
Slope with
Eulers
Backward
method
tk-1
tk
y(tk ) y(tk1 )
h
(6)
It is illustrated in Figure 1.
Tf
y(tk ) y(tk1 )
+ y(tk ) = u(tk )
h
(7)
Tf
h
y(tk1 ) +
u(tk )
Tf + h
Tf + h
(8)
(9)
h
Tf +h
(10)
which has a given value once you have specified the filter time-constant Tf
and the time-step h is given. (9) is the formula for the filter output. It is
ready for being programmed. This filter is frequently denoted the
exponentially weighted moving average (EWMA) filter, but we can just
denote it a first order lowpass filter.
According to (9) the present filter output y(tk ) is a function of the present
filter input u(tk ) and the filter output at the previous discrete time,
y(tk1 ). Therefore, the filter output must be stored in the program so that
it is available at the following execution if the filter algorithm.
It is important that the filter time-step h is considerably smaller than the
filter time-constant, otherwise the filter may behave quite dierently from
the original continuous-time filter (1) from which it is derived. h should be
selected as
Tf
(11)
h
5