Professional Documents
Culture Documents
Kraemer Thomas F1978
Kraemer Thomas F1978
that storage requirements for the sonar signal can be reduced by a factor
of at least eight.
A Study of Time Series Interpolation and Decimation
With Signal Processing Applications
by
A THESIS
submitted to
in partial fulfillment of
the requirements for the
degree of
Master of Science
thesis. I am also grateful for the support given by the Naval Torpedo
I. Introduction 1
Problem Definition 2
Review of Sampling Theory 2
An Important Question 5
Results of Literature Survey 7
Definition of a Decimator 27
Definition of an Interpolator 28
Evaluation of the z-transform on the unit circle
resulting from interpolation and decimation . . 31
Comments About Aliasing 33
The AI lasing Theorem 34
Summary 36
Figure Page
I. Introduction
to digital convertor system can be used to sample this signal at equal intervals
in time and convert these samples into a form suitable for manipulation by a
only the samples. The reciprocal of the time between samples is known as
frequency. For example, it may be desired to compute the value of the original
and the process of eliminating sample points is called decimation. The two
interpolation and decimation systems are defined and analyzed. A sonar signal
Problem Definition:
-00
The signal is sampled to produce the sequence
where T is the sampling period. The z-transform of the sequence x(n) can be
defined as
00
X(z) E x(n)
n = -00
T -111c2, , then
1A
X(exp(jwT)) = T x(w) ,
continuous time signal can be recreated uniquely from the samples x(n)
00 sin( (t - kT))
Ex k
k = -00
(Ir
T (t - kT))
be computed from x(n) without resampling the analog signal. This equation is
A
x(t), will theoretically guarantee that the signal can be reconstructed from
MAU ....
IA**
IP*
(a)
Time(units)
C
CX
(b)
T 2T 3T 4T 5T 6T 7T 8T
Time (units)
(c)
0 T 2T 3T 411-'
Time (units)
the set of sample values. However, if a band limited signal is sampled at twice
the bandwidth of the signal, then it can be shown that the original signal
x(t) can be reconstructed from the reduced set of sample values provided
An Important Question:
perform interpolation and decimation. Analog methods are inherently real time.
That is if a signal is input to an analog system, then the output signal will
be in the same time reference as the input. When using digital techniques
amount of time between each sample in a sequence. Thus any digital compu-
tation performed on the sequence must result in an output value for every
input value to be a real time digital process. For this reason any digital
For example, an analog signal can be sampled at twice its highest frequency,
digitally filtered, and then decimated. Alternately, the signal could be analog
bandpass filtered, and then sampled at a lower rate. Most analog filters have
Principle Results:
filter output.
A typical sonar signal was sampled at more than twice the highest frequency
sonar sequence. A decimator and filter are designed which retained every
results for any further signal processing. For example, a fast Fourier transform
the fast Fourier transform of the decimated sequence requires about 10,000
and sampling rate increase or interpolation has been examined from several
first reducing the sampling rate of an arbitrary signal, filtering, and then
increasing the sampling rate back to the original frequency [3] . Crochiere
low-pass filter.
give some desired response for a given input. It is possible to only approximate
finite impulse response systems. Much has been published concerning the
has been published for designing optimum linear-phase finite impulse response
pass, high pass, band pass and band stop filters as well as differentiators
and Hilbert transformers. Many examples of its use are shown in books by
Pe led and Liu [10] and Rabiner and Gold [11] . The theory behind the
and Gold.
Definition of a system:
conditions in the system are not allowed. The word unique is required in
part. For example, the complex number z may equal x + j y where x and y are
r = I -Vx2 + y2
w = tan-1 ( y
x
Furthermore, if only the tangent of w is known then y/x can take on two values.
10
if and only if
n= 1, 2,
Given a system with the mapping of eq. (1) then the system is
g(n-m), n = 0, 1, 2, ...
for all positive integers m where f(n-m) = 0 for n-m< 0.
Definition of an Eigenfunction:
such that
Theorem 1:
e( n) = zn (5)
Proof:
Let
zn g(n) .
From the linearity assumption we may multiply the input and output by the
constant z
z-nizno z-mg(n)
Or
(n-m) -1.z-mg(n) (6)
e(n-m)--, g(n-m) .
From the definition of a system, the output function is unique for any
z-mH(z)zn = H(z)z("m)
12
Therefore an eigenfunction is
e(n) = zn . Q.E.D.
Theorem 2:
e(n) = zn, then H(z) as defined in eq.(4) may be called the system's
Proof:
d(n)- * h(n),
d(n-m)--*h(n-m),
zm d(n-m)-o.zmh(n-m),
Using the linearity assumption again and multiplying the input and output by
znz-n ( = 1).
znz-nzmd(n_m)-.), znz-nzmh(n_m)
znd(n_m)z-(n-m).4, znh(n_m)z-(n-m)
n
Ld(n-m)z-(n-m) = 1 .
rti ao
Thus
Letting k = n - m, then
oo
zn-5 zn E h(k) z-k
k=0
equivalently
where u(k) is the input sequence, k = 0,1,2, ... and y(n) is the output
sequence.
impulse response such that I h(i) 170 for some i > Q where Q is any positive
integer.
will never have more than N terms since h(i) = 0 for i >N. Thus a finite
impulse response system can be realized by the direct evaluation of eq. (13).
15
Theorem 3:
Y(z) = z-mF(z)
Proof:
+ f(0)z-m + f(1)z-m-1 + .
= z-mF(z) Q.E.D.
16
Theorem 4:
Proof:
function H(z) as shown in Fig: 2. Two axes represent the real and imaginary
part of the complex variable z and the third axis represents the magnitude
Real(z)
(units)
unit circle
cylinder
2.7- Real(z)
Imag(z)
0
N 'Tr IOW271T
(d) Real(z)
(c)
0 m- 31-r 2.-Tr
2 2
Unit circle (radians)
the tan -1 function is multiple valued. If imag(H(z)) and real( H(z)) are known
then arg(H(z)) can be one of many angles each differing by a multiple of 360°.
is plotted as shown in Fig. (2c). The z-plane is plotted as shown in Fig. (2d).
The location of the zero values of IH(z)I are called "zeroes" and are
in z. The theory of polynomi als requires H(z) = H*(z*) where the symbol
zero must be located at z = zi*. Also for a sequence of length N there will
Definition of a Filter:
The output of this system is the sum of the last N input values.
average of the last N input values, hence the name averaging filter.
Theorem 5:
gives
H(exp(jw)) =
sin(wN/2)
exp(- jw(N -1)/2)
sin(w/2)
sin(wN/2)
I H(exp(jw)) I =
sin(w/2)
This function is zero for the angles w = 2-rr m/ N for m = 1,2, ..., N-1.
This exhaust all possible zeroes for the z-transform H(z) and so
N-1
H(z) = TT (z-1 - exp(-2 rr m/N)) Q.E.D.
m=1
are any integer constants and n is the index value of the input sequence,
Fig. 3 (a) Unit circle plot and (b) Unit circle magnitude plot of the
z-transform of the impulse response of an averaging filter where h(n) = 1
for n = 0, 1, 2, 3, 4, 5, and 6 and h(n) = 0 for all other values of n.
Unit circle magnitude plot is the function I sin(w7/2)/sin(w/2)I .
22
Theorem 6:
Proof:
demonstrated in Fig. 4.
Imag(z) (units)
1-46. e iv/41)
.0
... 4
s*. -... H (a)
- ....
Real(z) (units)
where k and N are finite integers. For k = 0 this expression reduces to the
simple averaging filter given by eq. (19). The z-transform of this expression
N-1
H(z) = -n- exp( j2-rr m/N)) (22)
m =0
m k mod(N)
The zeroes of this filter are evenly spaced around the unit circle
any integer.
25
Theorem 7:
)4k) = X(z)
k/N)
, k = 0,1, , N-1 (24)
z = exp(-j2
N-1 ((w_airr4)4.1
X(exp(jw)) =
,
E L exp(i(wv)(y)
k=0 2-n-)
(25)
Proof:
the unit circle ( eq. (24)) then a closed form expression is available ( eq. (25))
to determine the value of the z-transform at all other points on the unit circle.
filter (eq. (21)) then one term of the discrete Fourier transform is computed.
N- 1
m=0, 1, 2, ...
gk(m) = E X(n) expH2Tt kn/N) ,
n=0
where t(n) = x(n+m). The above relation can be related to the relationship
reduce the amount of computation, gk(m) is computed only for m = 0, 2M, 3M,
a hopping discrete Fourier transform. It will be seen in the next section that
Definition of a Decimator:
Theorem 8:
1/m
M m=0 z= exp(-j2TT m/m)
M-1
= E X( exp(-j2-rtm/M) zl/M)
M m=0
Proof:
Now let
y(n) = w(nM)
M-1 co
1
TA E E fx(n) exp(j2irmn /M) z-n/Mi
m=0n=0
1
1
))
M
m=0
E iz = expH2-rrm/M) zl/M1 Q.E.D.
Definition of an interpolator:
Theorem 9:
Y(z) = X(z)
lz z
(30)
= X(zL)
Proof:
COP
= X(zL) Q.E.D.
in Fig. 5. Notice that L-1 zero values are inserted between each sample
x(n)
(units)
(a) 3 (index)
Y(n)
(units)
2 3 4 5 6 7 8 9 10 11 12 (index)
(c)
by 4. Three
Fig.. 5 (a} Original sequence x(n). (b) x(n) interpolated
decimated by 2.
each sample. (c) y(n)
zero values areinserted between
Notice that this is equivalent to interpolating x(n) by 2.
31
and decimation:
sequence y(n) then on the unit circle, evaluating eq. (30) with
z = exp(jw)
Y(z) and X(z) is not simple. Evaluating eq. (28) on the unit circle gives
4 and decimation by 3.
32
Imag(z)
(units)
Real( z)
(units)
ft Y(2) =X(z4)
(6) trics) E
3 ,..:w
r%e
-lawns/3
Z 1/3\
two or more terms in eq. (32) are non-zero for some value of w.
at most only one term in the summation of eq. (32) is non-zero for
discussed in Appendix A.
34
some regions on the unit circle. This concept leads to the following theorem.
Theorem 10:
1 < 24ri () =
M 2 -1 -err < w <1r
and
1wI MIf 2 J
to X(z), then
Y(exp(jw)) =
1
X(exp(j( wi + ))) for m even and 0 < w <Tr
or m odd and -tr <w c 0
1
X(exp(j ( -w, + ))) for m even and -it'w< 0
I M or m odd and 0.c.w<"tr
Proof:
°b
CC
.
o
,°
e o
,(s
0,
4
0.
Aeb
e (r eb 0"`Z<s,
<t)ck0
4c o(s,
06
1b..ko
4, ock
ckoc
66.
e
o )4
N°C 6 1`
be'
Nti ai
of 6
36
An Example:
choice of filter cut off points the sequence in Fig. (8d) looks very
Summary:
processing.
(a)
y(n)
(units) 0
0
(b)
0 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 (index)
v(n)
(units)
(c) ?
3 4
1)
5 8
4poQvvqYYqTqPp4
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 (index)
0 1 2
u(n)
(units)
0
(d)
0 1 3 4 5 (index)
Fig. 8 (a) Original sequence. (b) x(n) interpolated by 4. (c) typical response when y(n)
is low pass filtered. (d) v(n) decimated by 3.
38
connected to the next point with a straight line segment. The magnitude
Fig. (10a) shows the 4096 point sequence resulting from decimating the
the 8192 point sequence due to aliasing. To make it satisfactory, all of the
unwanted components on the unit circle must be filtered so that they will
A 128 point FIR filter was designed using the Remez exchange
w2 = Iii/8 . This filter will pass the region of interest and allow the
reasonably good attenuation, in this case -60 dB, Theorem 10 will apply.
This is justifiable since the apparatus used to collect and convert the
data has limited accuracy . Fig. (12) shows the resulting decimated
only 1024 samples points need to be stored. From these samples, the
bkai.maikddii
(a) 8192.
(minx)
RE OF
5T
INTS1fLE.4ION
-cr
A c.
.1)
ik
-8o
(b) 0 (RADIALS)
UNIT cIfts-LE
Fig. 9 (a) Original 8192 point sequence. (b) Z-transform on the unit circle, Only a small region cnnfoins desired
information. All other regions are noise.
a.-1
W 11 V IfVT W
(b) -80
0
N
Fig. 10 (a) Original sequence decimated by 2. (b) Z-transform of decimated sequence on the unit circle. The
components which summed due tQ aliasing are labeled with letters. Letters with hats are the same magnitude as the
corresponding letter in Fig. 9 ,.
z
3
0
(4) rr
UN Fr c-t 01-c-LE. 8
(KAPIANs)
V)
A
odt
-43.5
71r,
tom- c,i RILE (p.fDilkir4.5)
(b)
Fig. a (a) Magnitude response of 128 point FIR filter. (b) Linear phase response of filter. The magnitude
function is plotted with both positive and negative values to achieve a linear phase plot. If the magnitude of
H(z) were plotted, then the phase would change by Tr ,radians every time H(z) passes through a zero.
w
0 10'2-4
ciNocA
O
0 TI
UNIT GIRO -LE (Ike.piNm)
fig. 12 (a) Sequence resulting after filtering the original sequence with q 128 point FIR filter and then decimating
by 8. (b) Z-transform of sequence on the unit circle. Letters correspond to those in figure ') The information in
the region of interest has been preserved with a fewer number of samples.
44
signal rather than sampling the signal and then digitally filtering and
decimating it. The cost and inflexibility of the analog filter along with
of digital filtering.
is very problem dependent. For example, in the laboratory where the data
for the previous example was acquired, only an analog and digital computer
are available. Since all processing of data can be done in non-real time
filters can be hard to implement on the analog computer whereas an FIR filter
can typically be designed in less than one-half hour. If real time processing is
methods could provide the only solution since the digital hardware available
Summary:
in Chapter 2.
46
between the unit circle and the Fourier transform domain of continuous
for a given sequences z-transform is over only a small segment of the unit
system.
sonar signal. Aliasing effects resulting from decimation without the use of a
bandpass filter are shown. The effect on aliasing using a finite impulse
response filter is demonstrated. The filter was designed in such a way that
signals outside of the band of interest are attenuated below the original
signal noise source level. It is shown that the band limited signals studied
used here depends critically on the effectiveness, of the filter used to reduce
47
the signal outside the band of interest below the source noise level .
1.) A means should be developed for measuring the error between a given
2.) A study should be made of the minimization of the error criteria of 1.)
References:
4.) L.R. Rabiner and R.E. Crochiere, "A Novel Implementation for
Narrow-band FIR Digital Filters," IEEE Trans. Acoustics, Speech,
Signal Processing, Vol. ASSP-23, pp. 457-464, Oct.,1975.
9.) J.H. McClellan, T.W. Parks and L.R. Rabiner, "A Computer Program
for Designing Optimum Linear-Phase Digital Filters," IEEE Trans.
Audio Electroacoustics, Vol. AU-21, pp. 506-525, Dec.,1973.
10.) A. Pe led and B. Liu, Digital Signal Processing Theory, Design and
Implementation, John Wiley and Sons, 1976.
11.) L.R. Rabiner and B. Gold, Theory and Application of Digital Signal
Processing, Prentice-Hall, 1975.
49
12.) G.A. Nelson and L.L. Pfeifer, R.C. Wood, "High Speed Octave
Band Filtering," IEEE Trans. on Audio and Electroacoustics,
Vol. AU-20, p. 59, March, 1972.
15.) G. Oetken, T.W. Parks, H.W. Schuss ler, "New Results in the
Design of Digital Interpolators," IEEE Trans. on Audio, Speech,
Signal Processing, Vol. ASSP-23, June, 1975.
19.) R.W. Schafer and L.R. Rabiner, "Digital Signal Processing Approach
to Interpolation," Proceedings of the IEEE, Vol. 61, pp. 692-702,
June, 1973.
0 otherwise
the output will affect the calculation of the present value of the output.
FIR systems require only past values of the input to compute the present
output.
N-1
v(n) = E h(m) w(n-m)
m= 0
where h(m), m = 0,1, ..., N-1 are the filter coefficients and N is the
duration of the impulse response. Since only the past values of the input
realized when the filter is used for interpolation and decimation in comparison
to using IIR filters. In decimation only every Mth output point must be
sequence only every Lth point is nonzero where L is the interpolation ratio.
With an IIR system these computational savings are not possible since every
values of decimation, FIR filters may require less computation since only
have non-linear phase characteristics which can distort the original signal.
features of FIR filters and discuss the various methods for designing FIR filters.
52
The impulse response for a FIR filter system with linear phase
has the property that h(n) = h(N-1-n), n = 0, 1, ..., N-1. This can
(N/2)-1 N-1
H(z)= E h(n) z-n + E h(n) z-n
n=0 n= N/2
(N/2)-1 (N/2)-1
= E h(n)z-n + E h(N-1-n)z-(N-1-n)
n=0 n= 0
(N/2)-1
H(z) = E h(n) [z-n + z-(N-1-n)]
n=0
assuming N is odd
E
H(z) =(((N-1)/2)-1
n=0
h( 2)
h(n)) [z n + z--(N-1-n)]
(N/2)-1 N-1
H(exp(jw)) = exp(-jw((N-1)/2)) ( E 2 h(n) cos( w ( n - --n--))
n=0 4 )
H(exp(jw)) = exp(-jw((N-1)/2))
N-3
( N-1
(2)-1
E 2 h(n) cos( w( n-
n=0
53
In both cases the terms in brackets are real implying a linear phase
The symmetry condition discussed above for a linear phase FIR filter
also implies certain things about the zeroes of the filter's z-transform.
nomial may be factored to find its zeroes. There will be N-1 zeroes since
is symmetrical, H(z-1) = z(N-1) H(z). This means that H(z) and H(z-1) are
are identical to the zeroes of H(z-1) except at the points z = 0 and z =c0.
it must also have a mirror image zero at z = (1 /r)exp( -jw). Since the impulse
response is real and hence the coefficients of the polynomial are real, every
location. Zeroes of an FIR filter not on the unit circle must appear in groups
sample delay and are not suitable for implementing digital high pass filters.
passband and stopband regions, the desired amplitudes in the pass and stopbands,
and a relative weighting between ripple size in the passband and stopbands.
The algorithm solves for a set of coefficients such that their z-transform
given in [1] .
some desired response on the unit circle. These methods are discussed
in the literature.
even though the window is optimum, the filter may not be optimum.
sampled at evenly spaced intervals around the unit circle. If some regions
filter to minimize the deviation of its response from the desired response.
larger there would be more than two values of x(n) involved in the computation.
If N is smaller then only one value of x(n) would be involved in the computation
impulse response when convolved with y(n) will linearly interpolate x(n)
A causal impulse response can also be defined which has the same shape
but delayed.
sin2(wl../2))
I H(exp(jw)) I = jc
si n2(w /2)
Q-1
y(k) = E h(iL + (kM)modulo(L) ) x(integer(kM/L) i)
i=0
be deduced
h(m) may be a multi-bandpass filter. The effect of such a filter may
X(exp(jw))
Y(exp(j WI))
that it covers the entire unit circle from W = 0 to -1-/Y , hence the name
Y(0) = /4,0 0 Y n
01
The functions 0(N) and D(Y) are simple complex demodulator systems where
the output is the input times exp(-j n Tr), where n is the input index. The
that
w2 ( 1-2/M2) , and
wl
w2 Ll Tr/ Mi
where L1, L2, M1, and M2 are the integer valued interpolation and decimation
ratios of two different interpolator decimator stages then the function N(w)
This method is totally general in the sense that it will work for
any sequence and for any segment of the unit circle. Difficulties arise
For large values of M, very sharp lowpass filters must be designed which
other coefficient is zero in addition to the first and last coefficients being
zero. For example, a 26 point filter will require only seven non-zero values.
Assume that the sequence has been manipulated such that it is bandlimited
to#W2. The sequence is passed through an octave band filter and the highest
octave remains after filtering extending from art /4 to.rf /2. This sequence
7,3
-10
a
a
a_ .10
a
ti -40
-a
a
a
a -6
a
(a)
-rr -rr
4
Unit Circle (radians)
X(z)
(units)
Original data
(b)
2-
Unit circle (radians)
Y(z)
(units)
/ighest
octave
(c) band t
arr-
Unit circle (radians)
X(z)-Y(z)
(units)
Residue
data
(d) 1
-rr
o IT
4
Unit circle (radians)
Fig. i4 (a) Typical response of an octave band filter. (b) Original data
bandlimited to-K/4. (c)Highest octave band after filtering X(z).
by 2. and
(d) Residue after subtraction. Resulting signal may be decimated
the filtering process repeated to yield the next octave band.
64
22
n = 0, 2, 4, ..., N-1 -2 , N-1 +0 , N-5, N-3, N-1 .
of the filter.
65
yr
0 7 8 (index)
(b)
.11.
1.0
p
C
0
a.
-a o.
N
a
E
8
(c) 0 2.43
Unit circle (radians)
Fig. 15 (a) Nine-point half-band filter. (b) zero plot of half-band filter.
(c) Unit circle magnitude plot of half-band filter.
66
Hilbert Filtering for Decimation: CI 1]
z-transform evaluated on the unit circle between wand 2tris exactly zero.
V(exp(jw)) = 0 w S 2n-
The sequence v(n) must be a complexed valued one since the z-transform
or
Therefore the signal )1(n) may be obtained from x(n) by filtering it with
67
h(n) = - h(N-n-1).
X(z)
(b)
a 2.1r-
Unit circle (radians)
V(z)
(c)
a (radians)
Unit circle
W(z)
(d)
unit circle (radians)
Fig. 16 (a) Typical. Hilbert filter sequence. (b) Unit circle magnitude plot
of a sequence. (c) Result of summing the sequence with its Hilbert filtered
version. (d) Decimation of the sequence by 8.
69
Proof:
M-1
Y(exp(jw)) = (1/M) E X(exp(j(w-2 k)/M)) -ft <w <-rf
k=0
term k = M m/2 when m is even and k = m/2 when m is odd, since X(exp(jw))
2-rr lm + 11 is zero.
for IwI< 32-T
M 12)
and
I w I> VT)
rearranging the exponent
Substituting these values of k into eq.(32) and
gives,
and 0< w < -rr
Y(exp(jw)) = (1/M)X(exp(j(w1 + w/M))) for m evenand -grr< w <0
or m odd
Q.E.D.