Learning Objectives
- ▸Understand the principles of predictive coding and differential quantization
- ▸Analyze the DPCM encoder and decoder architecture
- ▸Investigate the effect of predictor order on signal reconstruction
- ▸Evaluate quantization error and signal-to-noise ratio (SNR)
- ▸Compare DPCM performance against standard PCM
- ▸Study slope overload and granular noise phenomena
Theoretical Background
DPCM Principle
Differential Pulse Code Modulation (DPCM) exploits the correlation between adjacent samples in a signal. Instead of encoding the absolute amplitude of each sample, DPCM encodes the difference between the actual sample and a predicted value based on previous samples.
Prediction Error:
e(n) = x(n) - x̂(n)
where x(n) is input, x̂(n) is predicted value
First-Order Predictor
The simplest predictor uses the previous reconstructed sample:
x̂(n) = α · x̃(n-1)
α: prediction coefficient (typically 0.8-0.95)
System Architecture
Advantages over PCM
- Reduced bit rate for same SNR
- Smaller dynamic range of error signal
- Better utilization of quantizer levels
- Effective for correlated signals (audio, video)
Key Insight
Since adjacent samples are correlated, the variance of the prediction error is typically much smaller than the variance of the original signal, allowing fewer bits for quantization.
Interactive DPCM Simulation
SNR
-- dB
Quantization Error
--
Compression Ratio
--:1
Prediction Gain
-- dB
Original vs Reconstructed Signal
Quantization Error Signal
Real-time DPCM Encoder/Decoder Block Diagram
Experimental Procedure
Experiment 1: Basic DPCM Operation
- Set the input signal to Sine Wave and frequency to 3x
- Set quantization bits to 4 bits and prediction coefficient to 0.85
- Observe the original signal (blue) and reconstructed signal (red) in the top plot
- Note the quantization error in the bottom plot - it should be small and centered around zero
- Record the SNR value displayed in the metrics panel
Experiment 2: Effect of Prediction Coefficient
- Maintain 4-bit quantization and sine wave input
- Vary the prediction coefficient (α) from 0.0 to 0.99
- At α = 0.0, DPCM behaves like standard PCM (no prediction)
- Observe how SNR improves as α increases toward 0.9
- Plot SNR vs. Prediction Coefficient for your lab report
Experiment 3: Quantization Effects
- Set α = 0.85 and input signal to Sawtooth Wave
- Reduce quantization bits from 8 to 2 in steps of 1
- Observe the onset of slope overload (steep sections cannot be tracked)
- Observe granular noise in flat sections with high quantization
- Determine the minimum bits required for intelligible reconstruction
Experiment 4: Signal Correlation Analysis
- Compare performance between highly correlated (sine) and less correlated (sawtooth) signals
- Calculate prediction gain for each signal type
- Verify that DPCM performs better on correlated signals
- Test with "Simulated Speech" which has natural correlation properties
Lab Report Guidelines
Required Sections
- 1 Objective: State the purpose of studying DPCM
- 2 Theory: Explain predictive coding with equations
- 3 Procedure: Document your experimental steps
- 4 Results: Include screenshots of plots at key settings
- 5 Analysis: Discuss SNR trends and error patterns
- 6 Conclusion: Summarize findings on DPCM efficiency
Key Questions to Address
1. Why does DPCM provide better SNR than PCM for the same bit rate?
2. What happens when the prediction coefficient exceeds 1.0?
3. How does slope overload occur and how can it be mitigated?
4. Calculate the theoretical prediction gain for a first-order Markov process.
5. Compare DPCM with Delta Modulation (DM). When is DM preferred?
Submission Checklist
- • SNR vs. Prediction Coefficient plot (Exp. 2)
- • Bit rate vs. Reconstruction quality analysis (Exp. 3)
- • Comparison table: PCM vs DPCM performance
- • Answers to all 5 questions above