Biomedical Engineering Reference
In-Depth Information
only frequencies below the Nyquist frequency of the resultant downsampled signal.
This is usually achieved by lowpass filtering the original signal before downsam-
pling. If the original signal s 0 is sampled at frequency F s 0
and the desired frequency
is F s 1 =
q for an integer q , then the frequency band of the signal s 0 needs to be
reduced to the range
F s 0 /
1
2 q F s 0 )
(
0
,
. In practice, one needs to set the cut-off frequency of
1
2 q F s 0 )
the lowpass filter smaller then
, because the filter roll-off is finite. In MATLAB
Signal Processing Toolbox the downsampling with anti-aliasing filtering is imple-
mented in function decimate .
The opposite process of increasing the sampling rate ( interpolation ) can be accom-
plished in many ways, without the explicit use of filters. However, the interpolation
can also be carried out in the following way. If the sampling frequency has to be
increased by integer factor p then between each two samples of the original signal
s 0 one needs to insert p
1 zeros, and then filter the resulting signal with a lowpass
filter. The cut-off frequency of the filter should be set below the Nyquist frequency
of the original signal, to remove all the high frequency components introduced to the
signal by the discontinuities at the inserted samples. In MATLAB Signal Processing
Toolbox the filter interpolation is implemented as function interp .
Finally, using a combination of the above described procedures it is possible to
change sampling rate by rational factor q . First the signal is interpolated to p times
higher sampling frequency and then downsampled by q . In MATLAB Signal Pro-
cessing Toolbox the algorithm is implemented as function resample .
2.1.3 Matched filters
In many applications one would like to detect in the signal some specificstruc-
tures, matching the template s and treating the other signal components as noise.
Formally, the signal may be described as composed of the template— s and additive
noise v :
v (2.9)
The matched filter is the linear filter that maximizes the output signal-to-noise
ratio. The solution is the filter with transfer function h which is complex conjugate
time reversal of
x
=
s
+
h given by [Turin, 1960]:
h
=
Ks
(2.10)
R v , R v is covariance matrix of the noise, H denotes Hermitian
(conjugate) transpose. In MATLAB matched filtering with template s of signal x and
noise v can be realized with the following code:
s H R 1
v
1
where K
=
s
R= cov(v);
K= Rˆ(-1)./sqrt(s'*Rˆ(-1)*s);
h_hat=K*s;
h=fliplr(h_hat');
y=filter(h,1,x);
where y is the output of the filter.
 
Search WWH ::




Custom Search