4.4 Predictive Coding
4.4.4 The Delta Modulator (DM)
The Delta Modulator is the first of two predictive coders that we’ll talk about in this book. Being a predictive coder, it works in just the way we saw in Figure 4.27. All we’ll do here is detail how this system creates its
x
nP, and understanding that, we’ll explore in a bit of mathematical detail its inner workings.How the DM creates an
xnPThis predictive coder creates the predicted value
x
nP using a really simple idea: If you sample an incoming signal very quickly, then a good estimate of the current samplex
n is simply the previous sample valuex
n−1. That is, a good predicted value of the samplex
n isx
nP
=
x
n−1.However, as one telecommunication engineer was quick to point out, there was a problem with this idea. “If you use
x
nP=x
n−1,” she argued, “there’s no way to add backx
nP at the decoder (Figure 4.28), becausex
n−1 is a sample of the input signal, and the decoder (in the receiver end of the channel) has no way to create exactly that.”And with that the telecommunication engineers scratched their collective heads for a while, until one day one of them screamed, “I’ve got it! Have a look at this.” She pointed to the source decoder in Figure 4.28. “While the source decoder doesn’t have access to the
x
n (orx
n−1), it does have access tox
n (andx
n−1). So, we can usex
n−1 as the predicted value, rather thanx
n−1.” That seemed a good idea, and everyone was in agreement. After some time and a bit of hard work, engineers decided to usex
n−1 as the predicted value, that is,x
nP=x
n−1.Some engineers decided to fine tune this idea, and as they played around with it, they found that a slightly better choice of
x
nP isx
nP=ax
n−1, where a is a value very close to, but just a little less than, 1; specifically, they figured out that the optimal value of a wasa
R
R
x x=
( )
( )
1
0
(4.53) where Rx(k) = E [xn⋅ xn – k].The Block Diagram of the DM
Let’s now take a look at the block diagram of the DM to get an understanding of how this device is built. Both the DM and the source decoder are shown in the block diagram of Figure 4.29. The solid line shows that this DM and source decoder has the same form as the general predictive coder and source decoder of Figures 4.27 and 4.28. The dashed lines show the creation of the predictive value
x
nP
=a
x
n−1 at the DM and decoder.Let’s take some time out now and describe how, in this block diagram, the value
x
nP=ax
n−1 is created at the DM and decoder. We’ll start at the source decoder, because it’s easier. At the source decoder, the valuex
nis available at the output. So, all we do— and the dashed lines of Figure 4.29 show this—is take the availablex
n, delay it by one sample time (with thez
−1 block) and multiply it by a; and then we’ve got it:x
nP
= a
x
n−1. At the source coder, the value ofx
n is not readily available, so what the dashed lines on the coder side of Figure 4.29 do is this: (1) first makex
n by addingx
nP andE
n (this is howx
n is made at the decoder), then (2) delay thex
n that’s just made and multiply it by a to getx
nP
=a
x
n−1.The Sampler and the Quantizer in the DM
While the block diagram of the DM is well-described by Figure 4.29, and a description of how it works is also given, there are a few things about the DM that have been left unsaid, and in this section I want to say them. These are things regarding the sampler and the quantizer.
The Sampler: First, we said earlier that the idea behind the DM was that if you sampled a signal fast enough, then the previous sample
x
n−1 was a good predicted value forx
n, and we modified that slightly and came up with the predicted value ofx
nP=ax
n−1, where a is a value close to 1. What I want to explore here is: how fast does the sampler in a DM actually sample the signal x(t) such that the samplex
n−1 is a very good predicted value ofx
n? I don’t know exactly how telecommunication engineers came up with this, and I expect that it was trial and error, but ultimately when x(t) is a speech signal the sampler tends to work at four times the Nyquist rate, or eight timesQuantizer Symbol-to-bit Mapper + × + + × + xn xn xn En En En sampler ∧ ∧ ∧ ∧ bits ∧ xnp = axn–1 ∧ xnp = ax n–1 Z–1 Z–1 a received bits Bit-to-symbol Mapper modulator, channel, demodulator ... + LPF + a
Delta modulator (DM) Source decoderfor DM
–
the Nyquist rate; that is, the sampler tends to work at eight times or sixteen times the maximum frequency of the incoming signal x(t).
The Quantizer: Next, let’s consider the quantizer. The quantizer maps the predicted error,
E
n=x
n–x
nP, to an outputE
n with one of N levels. How many output levels (N) does the quantizer use? The sampling rate in a DM is so high that the previous samplex
n−1 (and the value ax
n−1) is a very good predicted value forx
n, and so the error termE
n=x
n–x
nP
=
x
n–ax
n−1 is very close to 0. Because of this, a quantizer can be built that is very good and very simple: the quantizer maps the inputE
n (close to 0) to an output withone of only two levels, either +δ or –δ where δ is a value close to 0. The exact value of δ depends on the statistics of the input samples