![](/uploads/1/2/5/8/125846991/423714351.jpeg)
![Matlab Program For Uniform Quantization Encoding Matlab Program For Uniform Quantization Encoding](/uploads/1/2/5/8/125846991/425858949.jpg)
- Digital Communication Tutorial
May 11, 2013 But even though his signal may take on only 4001 discrete values, it is still digitized at 64 bits. Of course he can convert that to 8 bits (256 discrete values) if he wants. An analog signal would be continuous, like the voltage you'd get from measuring an electronic circuit (ignoring the quantization you get at the charge of a single electron). Quantization means the ADC converts the analog signal amplitude with infinite. Program 7.5.1 MATLAB function for uniform quantization encoding function I,.
- Digital Communication Resources
- Selected Reading
The sampling rate of a signal should be higher than the Nyquist rate, to achieve better sampling. If this sampling interval in Differential PCM is reduced considerably, the sampleto-sample amplitude difference is very small, as if the difference is 1-bit quantization, then the step-size will be very small i.e., Δ (delta).
Delta Modulation
The type of modulation, where the sampling rate is much higher and in which the stepsize after quantization is of a smaller value Δ, such a modulation is termed as delta modulation.
Features of Delta Modulation
Following are some of the features of delta modulation.
- An over-sampled input is taken to make full use of the signal correlation.
- The quantization design is simple.
- The input sequence is much higher than the Nyquist rate.
- The quality is moderate.
- The design of the modulator and the demodulator is simple.
- The stair-case approximation of output waveform.
- The step-size is very small, i.e., Δ (delta).
- The bit rate can be decided by the user.
- This involves simpler implementation.
Delta Modulation is a simplified form of DPCM technique, also viewed as 1-bit DPCM scheme. As the sampling interval is reduced, the signal correlation will be higher.
Delta Modulator
The Delta Modulator comprises of a 1-bit quantizer and a delay circuit along with two summer circuits. Following is the block diagram of a delta modulator.
The predictor circuit in DPCM is replaced by a simple delay circuit in DM.
From the above diagram, we have the notations as −
- $x(nT_{s})$ = over sampled input
- $e_{p}(nT_{s})$ = summer output and quantizer input
- $e_{q}(nT_{s})$ = quantizer output = $v(nT_s)$
- $widehat{x}(nT_{s})$ = output of delay circuit
- $u(nT_{s})$ = input of delay circuit
Using these notations, now we shall try to figure out the process of delta modulation.
$e_{p}(nT_{s}) = x(nT_{s}) - widehat{x}(nT_{s})$
---------equation 1
$= x(nT_{s}) - u([n - 1]T_{s})$
$= x(nT_{s}) - [widehat{x} [[n - 1]T_{s}] + v[[n-1]T_{s}]]$
---------equation 2
Further,
$v(nT_{s}) = e_{q}(nT_{s}) = S.sig.[e_{p}(nT_{s})]$
---------equation 3
$u(nT_{s}) = widehat{x}(nT_{s})+e_{q}(nT_{s})$
Where,
- $widehat{x}(nT_{s})$ = the previous value of the delay circuit
- $e_{q}(nT_{s})$ = quantizer output = $v(nT_s)$
Hence,
$u(nT_{s}) = u([n-1]T_{s}) + v(nT_{s})$
---------equation 4
Which means,
The present input of the delay unit
= (The previous output of the delay unit) + (the present quantizer output)
Assuming zero condition of Accumulation,
$u(nT_{s}) = S displaystylesumlimits_{j=1}^n sig[e_{p}(jT_{s})]$
Accumulated version of DM output = $displaystylesumlimits_{j = 1}^n v(jT_{s})$
---------equation 5
Now, note that
$widehat{x}(nT_{s}) = u([n-1]T_{s})$
$= displaystylesumlimits_{j = 1}^{n - 1} v(jT_{s})$
---------equation 6
Delay unit output is an Accumulator output lagging by one sample.
From equations 5 & 6, we get a possible structure for the demodulator.
A Stair-case approximated waveform will be the output of the delta modulator with the step-size as delta (Δ). The output quality of the waveform is moderate.
Delta Demodulator
The delta demodulator comprises of a low pass filter, a summer, and a delay circuit. The predictor circuit is eliminated here and hence no assumed input is given to the demodulator.
Following is the diagram for delta demodulator.
From the above diagram, we have the notations as −
- $widehat{v}(nT_{s})$ is the input sample
- $widehat{u}(nT_{s})$ is the summer output
- $bar{x}(nT_{s})$ is the delayed output
A binary sequence will be given as an input to the demodulator. The stair-case approximated output is given to the LPF.
Low pass filter is used for many reasons, but the prominent reason is noise elimination for out-of-band signals. The step-size error that may occur at the transmitter is called granular noise, which is eliminated here. If there is no noise present, then the modulator output equals the demodulator input.
Advantages of DM Over DPCM
- 1-bit quantizer
- Very easy design of the modulator and the demodulator
However, there exists some noise in DM.
- Slope Over load distortion (when Δ is small)
- Granular noise (when Δ is large)
Adaptive Delta Modulation (ADM)
In digital modulation, we have come across certain problem of determining the step-size, which influences the quality of the output wave.
A larger step-size is needed in the steep slope of modulating signal and a smaller stepsize is needed where the message has a small slope. The minute details get missed in the process. So, it would be better if we can control the adjustment of step-size, according to our requirement in order to obtain the sampling in a desired fashion. This is the concept of Adaptive Delta Modulation.
Following is the block diagram of Adaptive delta modulator.
The gain of the voltage controlled amplifier is adjusted by the output signal from the sampler. The amplifier gain determines the step-size and both are proportional.
ADM quantizes the difference between the value of the current sample and the predicted value of the next sample. It uses a variable step height to predict the next values, for the faithful reproduction of the fast varying values.
Library
Quantizers
dspquant2
Description
The Uniform Decoder block performs the inverse operation of the Uniform Encoder block, and reconstructs quantized floating-point values from encoded integer input. The block adheres to the definition for uniform decoding specified in ITU-T Recommendation G.701.
Inputs can be real or complex values of the following six integer data types:
uint8
, uint16
, uint32
, int8
, int16
, or int32
.The block first casts the integer input values to floating-point values, and then uniquely maps (decodes) them to one of 2B uniformly spaced floating-point values in the range [-V, (1-21-B)V], where you specify B in the Bits parameter (as an integer between 2 and 32) and V is a floating-point value specified by the Peak parameter. The smallest input value representable by B bits (0 for an unsigned input data type; -2B-1 for a signed input data type) is mapped to the value -V. The largest input value representable by B bits (2B-1 for an unsigned input data type; 2B-1-1 for a signed input data type) is mapped to the value (1-21-B)V. Intermediate input values are linearly mapped to the intermediate values in the range [-V, (1-21-B)V].
To correctly decode values encoded by the Uniform Encoder block, the Bits and Peak parameters of the Uniform Decoder block should be set to the same values as the Bits and Peak parameters of the Uniform Encoder block. The Overflow mode parameter specifies the Uniform Decoder block's behavior when the integer input is outside the range representable by B bits. When you select Saturate, unsigned input values greater than 2B-1 saturate at 2B-1; signed input values greater than 2B-1-1 or less than -2B-1 saturate at those limits. The real and imaginary components of complex inputs saturate independently.
When you select Wrap, unsigned input values,
u
, greater than 2B-1 are wrapped back into the range [0, 2B-1] using mod-2B arithmetic.Signed input values,
u
, greater than 2B-1-1 or less than -2B-1 are wrapped back into that range using mod-2B arithmetic.The real and imaginary components of complex inputs wrap independently.
The Output type parameter specifies whether the decoded floating-point output is single or double precision. Either level of output precision can be used with any of the six integer input data types.
Examples
See example model ex_uniform_decoder.
In this example, the input to the block is the
uint8
output of a Uniform Encoder block. This block has comparable settings: Peak = 2
, Bits = 3
, and Output type = Unsigned
. (Comparable settings ensure that inputs to the Uniform Decoder block do not saturate or wrap. See the example on the Uniform Encoder block reference page for more about these settings.)The real and complex components of each input are independently mapped to one of 23 distinct levels in the range
[-2.0,1.5]
.Parameters
Specify the largest amplitude represented in the encoded input. To correctly decode values encoded with the Uniform Encoder block, set the Peak parameters in both blocks to the same value.
Specify the number of input bits, B, used to encode the data. (This can be less than the total number of bits supplied by the input data type.) To correctly decode values encoded with the Uniform Encoder block, set the Bits parameters in both blocks to the same value.
Specify the block's behavior when the integer input is outside the range representable by B bits. Out-of-range inputs can either saturate at the extreme value, or wrap back into range.
Specify the precision of the floating-point output,
single
or double
.References
General Aspects of Digital Transmission Systems: Vocabulary of Digital Transmission and Multiplexing, and Pulse Code Modulation (PCM) Terms, International Telecommunication Union, ITU-T Recommendation G.701, March, 1993
Supported Data Types
Port | Supported Data Types |
---|---|
Input | |
Output |
|
See Also
Data Type Conversion | Simulink |
Quantizer | Simulink |
Scalar Quantizer Decoder | DSP System Toolbox |
Uniform Encoder | DSP System Toolbox |
udecode | Signal Processing Toolbox |
uencode | Signal Processing Toolbox |
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
![](/uploads/1/2/5/8/125846991/423714351.jpeg)