Digital Signal Processing Reference
In-Depth Information
where K = 2 9 , is the normalizing factor. This implementation can be carried out in
real time by employing the techniques discussed in Chapter 2, where the incoming
data are sequentially stacked at the top and the oldest data discarded. The stacking
corresponds to the length of the filter, although only half the filter coefficients are
actually stored. Alternative implementations could utilize the select-save or select-
add methods [3]. The implementation of the Hilbert demodulation scheme is
straightforward using standard Matlab
procedure
that implements the demodulation scheme in Figure 7.2 is given in Figure 7.3. In
the event of the unavailability of a high-level programming environment, the
products in (7.6) should be interpreted as a term-by-term operation (or the scalar
product; see footnote on page 20) on values corresponding to time t .
filter functions. A Matlab
function [phi] = HilbertDemod(s,c,g,h);
%
%HilbertDemod
extracts the time-dependent phase phi between signal s and reference
%
c using the Hilbert transform demodulation technique.
%
The phase phi is the absolute phase difference between s and c if
%
both c and s originated from the same signal prior to modulation
%
in s.
%
%
% Usage:
[phi] = HilbertDemod(s,c,g,h)
% Input:
s, a modulated signal of the form sin(2*pi*f*t + phi(t))
%
c, a reference signal of the form sin(2*pi*f*t)
%
g, vector of Hilbert transform coefficients of order L
%
h, vector of low-pass filter coefficients of order L
%
% Output:
phi, unwrapped demodulated phase output in degrees
%
% Notes.
(i) The carrier frequency f should be about 0.5*Fc of both filters,
%
where Fc is the cut-off frequency of the filters, and assumed to
%
be identical for both.
%
(ii) The normalization is frequency/Nyquist frequency.
%
sH = filter(g,1,s);
cH = filter(g,1,c);
sB = filter(h,1,s);
cB = filter(h,1,c);
S = sB + j*sH;
C = cB - j*cH;
D = S.*C;
phi = unwrap(angle(D))*360/pi;
return
Figure 7.3 A Matlab
function to demodulate FM or PM signals using the Hilbert transform .
Search WWH ::




Custom Search