Biomedical Engineering Reference
In-Depth Information
sequence is reversed in time and run again through the filter. Due to the time reversal
property of the Fourier transform (see Sect. 1.4.4) the component X
(
f
)
of the original
signal is multiplied effectively by
e i φ ( f ) ·
e i φ ( f ) =
2
H ef f
(
f
)=
A
(
f
)
A
(
f
)
A
(
f
)
(2.8)
yielding the zero-phase double order filter. In MATLAB this technique is imple-
mented as filtfilt function. The standard filtering corresponding to equation 2.1
is implemented as a filter function.
2.1.1 Designing filters
Practical applications of filters require that they meet certain requirements. Often
the characteristics of a filter is expressed as properties of the magnitude responses
(the absolute value of the transfer function) such as: the cut-off frequency or fre-
quency band to be attenuated or passed, the amount of attenuation of the unwanted
spectral components, steepness of the filter, or the order of the transfer function.
In specifying filter characteristics a unit called decibel [dB] is commonly used.
Two levels of signal P and P 0 differ by n decibels, if
P
P 0
Termsusedinspecifyingfilter characteristics are:
n
=
10 log 10
Wp - pass band, frequency band that is to be passed through filter without alternation
Ws - stop band, frequency band which has to be attenuated
Rp - allowed pass band ripples, expressed in [dB]
Rs - required minimum attenuation in the stop band, expressed in [dB]
The requirements concerning filter characteristics are usually contradictory, e.g.,
for a given filter order the increase of steepness of the filter results in bigger ripples.
Therefore some optimization process has to be applied and the resulting filter is a
compromise between the set of the conditions. A decision must be made which of
the possible filter designs is best for the planned use.
Below we describe briefly the functions from the MATLAB Signal Processing
Toolbox that facilitate the design and the validation of the filters. In the filter design
function in MATLAB the frequencies are expressed as a fraction of the Nyquist
frequency F N (namely are scaled so that F N
=
1). FIR filters can be designed by
means of the following functions:
fir1 - allows for design of classical lowpass, bandpass, highpass, bandstop filters. It
implements an algorithm based on Fourier transform. If the ideal transfer func-
tion is H id
(
f n
)
, its inverse Fourier transform is h id
(
n
)
and w
(
n
)
is a window (by
default a Hamming window) then the filter coefficients are b
(
n
)=
w
(
n
)
h id
(
n
)
for n
[
1
,
N
]
, N is the filter order. This filter has group delay τ g
=
N
/
2.
 
Search WWH ::




Custom Search