# Differential Pulse Code Modulation (DPCM)

In the following figure we see an encoder and a decoder of a Delta Modulation System, which is a simple DPCM System with a 1-bit quantizer:

We assume that signal $$x(n)$$ is known, that $$\hat{x}(-1)=0$$ and that there is not noise in the telecommunication channel.

I want to define the predicted signal $$\tilde{x}(n)$$, the difference signal $$d(n)$$, the quantized difference signal $$\hat{d}(n)$$, the encoded signal $$c(n)$$ and the reconstructed signal $$\hat{x}(n)$$

I have written the following equations: $$d(n) = x(n) - \tilde{x}(n) \; \; \; \; (1)$$ $$\tilde{x}(n) = 0,8 \cdot \hat{x}(n-1) \; \; (2)$$ $$\hat{x}(n) = \tilde{x}(n) + \hat{d}(n) \; \; \;\;(3)$$ In addition, duo to the feedback, the error $$e(n)$$ for the reconstruction (between the initial signal on the transmitter and the reconstructed signal on the receiver) is equal to the error of the quantizer. So, I also get: $$\hat{d}(n) = d(n) + e(n) \; \; \; \; (4)$$ $$\hat{x}(n) = x(n) + e(n) \; \; \; \; (5)$$

After solving the system of the equations, it seems to me that the number of the uknowns exceeds the number of the linear independent equations. If it so, I need one more equation since not all the equations above are linear independent.

So my question is what am I missing? Thanks in advance!

Eq. $$(5)$$ in your question is really just a consequence of Eqs $$(1)$$, $$(3)$$, and $$(4)$$, so you have four independent equations. But that's all you need because there's a simple one-to-one correspondence between $$\hat{d}[n]$$ and $$c[n]$$ (given by the encoder). Note that the quantization error $$e[n]$$ is usually modeled as a zero-mean white random process with a uniform PDF.

You generally cannot compute an analytical solution of all the sequences in the coder due to the quantizer, which is of course a non-linear device. However, you can compute the sequences sample by sample by simply simulating the DPCM system as shown in the diagram in your question.

Assuming that the prediction filter has an initial state of zero (i.e., $$\tilde{x}[0]=0$$), and that the quantization step $$\Delta=1$$ for simplicity, we can easily compute all sequences given the input sequence. With an input sequence of x=[2,3,5,7] we obtain

$$\begin{array}{cccrcr} n & x[n] & \tilde{x}[n] & d[n] & \hat{d}[n] & \hat{x}[n] \\ 0 & 2 & 0.00 & 2.00 & 1 & 1.00 \\ 1 & 3 & 0.80 & 2.20 & 1 & 1.80 \\ 2 & 5 & 1.44 & 3.56 & 1 & 2.44 \\ 3 & 7 & 1.95 & 5.05 & 1 & 2.95 \end{array}$$

• Equation $(5)$ is indeed a consequence of Equations $(1)$, $(3)$, and $(4)$. I just wrote them all down for completeness. However, equations $(1)$ through $(4)$ contain 5 uknowns: $\tilde{x}(n)$, $\hat{x}(n)$, $d(n)$, $\hat{d}(n)$ and $e(n)$. I don't get how I'm gonna use the one-to-one correspondence between $\hat{d}(n)$ and $c(n)$ (which is also uknown but can be related with $d(n)$ as well) to get one more equation. Could you provide an example with some random values for the known signal x(n) and calculate the other signals by relating them with $x(n)$? – MJ13 Apr 29 '19 at 20:31
• I don't want to define $e(n)$ at all. Just the 5 signals I mentioned. – MJ13 Apr 29 '19 at 20:40
• $c[n]$ is trivially obtained from $\hat{d}[n]$, so you don't really need it in your list of unknowns. The only other equation you need is $\hat{d}[n]=Q(d[n])$ (if you want to avoid introducing $e[n]$). – Matt L. Apr 30 '19 at 7:42
• Ok. So let's assume I want to find $\tilde{x}(n)$ or $\hat{x}(n)$ first. Can you express them only related to x(n) who is known? – MJ13 Apr 30 '19 at 7:59
• Your answer makes pretty much sense. However, even If I have all the equations I need, I cant relate somehow the uknown signals with the known $x(n)$. So If you could express one of the uknowns (for instance $\tilde{x}(n)$) related only to the known signal $x(n)$ It would make everything more clear. – MJ13 Apr 30 '19 at 10:54