DSP 5
DSP 5
DSP 5
COURSE MATERIAL
Subject Name: DIGITAL SIGNAL PROCESSING
Subject Code: KEC -503
Branch/Semester: ECE / 5th
Session: 2022
2022-23(Odd-Semester)
Faculty Members
Dr. Devvrat Tyagi
Dr. Mangal Deep Gupta
KEC503
DIGITAL SIGNAL PROCESSING
UNIT-5 Syllabus
The systems that use single sampling frequency for analog-to-digital conversion
are called single-rate systems. But, in many practical applications such as
software assigned radios, teletype, facsimile, digital video and audio, different
sampling rates are used to process the various signals corresponding to their
bandwidths. Hence, multirate digital signal processing is required in digital
systems where more than one sampling rate is needed. In digital audio, the
different sampling rates used are 32kHz for broadcasting, 44.1 kHz for compact
disc and 48 kHz for audio tape. In digital video, the sampling
rates for composite video signals are 14.3181818 MHz and 17.134475 MHz for
NTSC and PAL respectively. But the sampling rates for digital component of
video signals are 13.5 MHz and 6.75 MHz for luminance and colour difference
signal. Different sampling rates can be achieved using an upsampler and
downsampler. The basic operations in multirate processing to achieve this are
decimation and interpolation. Decimation is for reducing the sampling rate and
interpolation is for increasing the sampling rate. The sampling frequency is
increased or decreased without any undesirable effects of errors due to
quantisation and aliasing. While designing multirate systems, the effects of
aliasing for decimation and pseudo-images for interpolation should be avoided.
In a digital transmission system like teletype, facsimile, low bit-rate speech,
where data has to be handled in different rates, multirate signal processing is
used. Multirate signal processing finds its application in
(i) sub-band coding of speech or image
(ii) voice privacy using analog phone lines,
(iii) signal compression by sub-sampling, and
(iv) A/D and D/A converters.
Also, it is used in the areas such as communication systems, data acquisition
and storage systems, speech and audio processing systems, antenna systems and
radar systems.
The advantages of multirate signal processing are that it reduces computational
requirement, storage for filter coefficients, finite arithmetic effects, filter order
required in multirate application and sensitivity to filter coefficient length.
Decimation by a Factor M
The process of reducing the sampling rate of a signal without resulting in
aliasing is called decimation or sampling rate reduction. If M is the integer
sampling rate reduction factor for the signal x(n), then
T’ / T = M
The new sampling rate F’ becomes
Let the signal x(n) be a full band signal, with non-zero values in the frequency
range -F/2 ≤ f ≤ F/2,where w = 2πfT.
The sequence y(k) is obtained by selecting only the Mth sample of the filtered
output which results in sampling rate reduction. If the impulse response of the
filter is h(n), then the filtered output w(n) is given by
Consider down sampling of the input signal x(n) by a factor of two. Let X(exp
jw) be a real function with an asymmetric frequency response.
effect is shown. Because of aliasing signal, distortion in y(m) will take place
and hence a low-pass filter is to be connected before the signal x(n) is passed
through the downsampler. This will limit the input signal to the downsampler to
±π/M which avoids aliasing and hence, signal distortion.
Interpolation
The process of increasing the sampling rate of a signal is interpolation
(sampling rate expansion). Letting L be an integer interpolating factor, of the
signal x(n), then
T'/T = 1/L
The sampling rate is given by
The fractional conversion can be obtained by first increasing the sampling rate
by L and then decreasing it by M. The interpolation process should be done
before the decimation process to avoid any loss of information in the signal.
Figures (a) and (b) show the process of fractional sampling rate conversion.
Time-domain Relationships
Frequency-domain Relationships
The output spectrum is given by
5.1.4 Applications of MDSP- Subband Coding of Speech signals,
Sub Band Coding (SBC) is a frequency domain coding technique in which the
input signal is decomposed into a number of sub bands so that each of these
frequency bands can be encoded separately.
5 × 16 + 5 × 8 = 120 kbits/s
4:3 compression
Reconstructed signal has no noticeable reduction is signal quality.
In applications where sub-band filtering is used, the processes are carried out in
the following sequence.
(i) The signal x(n) is split into a number of sub-band signals {vk(n)} by using
an analysis filter bank.
(ii) The sub-band signals are processed.
(iii) The processed signals are combined using synthesis filter bank to obtain the
output signal y(n).
The sub-band signals are downsampled before processing. The signals are
upsampled after processing. The structure is called Quadrature Mirror Filter
(QMF) bank. In a critically sampled filter bank, the decimation and
interpolation factors are equal and the characteristics of x(n) will be available in
y(n), provided the filter structures are properly selected. The applications of
QMF filters are
The two-channel QMF filter bank is shown in Fig. 11.38. This is a multirate
digital filter structure that employs two decimators in the signal-analysis part
and two interpolators in the signal-synthesispart. The analysis filter H0(z) is a
low-pass filter and H1(z) is a mirror image high-pass filter. In frequency
domain, H0(w) = H(w) and H1(w) = H(w – p), where H(w) is the frequency
response of a low-pass filter. As a consequence, H0(w) and H1(w) have mirror
image symmetry about the frequency
w = π/2
In time domain, the corresponding relations are
The cut-off frequency is p / 2 for these filters. The sub-band signals {vk(n)} are
downsampled. After downsampling, these signals are processed (encoded). In
the receiving side, the signals are decoded, upsampled and then passed through
the synthesis filters C0(z) and C1(z) to get the output y(n).
The low-pass filter C0(z) is selected such that C0(w) = 2H(w) and the high-pass
filter C0(w) as C1(w) = –2H(w – p). In the time domain, c0(n) = – 2h(n) and
c1(n) = – 2(–1)nh(n). The scale factor of 2 corresponds to the interpolation
factor used to normalise the overall frequency response of the QMF.
Thus, the aliasing occurring due to decimation in the analysis section of the
QMF bank is perfectly cancelled by the image signal spectrum due to
interpolation. As a result, the two-channel QMF behaves as a linear, time-
invariant system.
The encoding and decoding processes are not shown in Fig. b). For perfect
reconstruction, the QMF filter banks should be properly selected.
Schematic of an Adaptive
The most popular LMS algorithm, developed by Widrow and Hoff, is discussed
in this section. It follows the stochastic gradient algorithms and possesses less
computational complexity. The following are the most important properties of
the LMS algorithm:
(i) LMS algorithm does not require the autocorrelation matrix of the filter input
and the cross correlation between the filter input and its desired signal.
(ii) It does not use the expectation operation that is present in the steepest-
descent method.
(iii) Implementation of the algorithm is simple and does not require matrix
inversion.
(iv) Its iterative procedure involving:
(a) Computation of the output of an FIR filter produced by a set of filter
coefficients.
(b) Generation of an estimated error by comparing the output of the filter
to a desired response.
(c) Adjustment of the filter coefficients based on the estimated error.
(v) It includes a step-size parameter, μ, which controls the stability and
convergence of the algorithm.
(vi) It is a stable and robust algorithm.
(vii) The SDA contains deterministic quantities while the LMS operates on
random quantities.
where m is the step size of the adaptation (m < 1). Here, lower the value of m
slower the convergence rate, higher the value of m higher the chances of the
adaptive system becoming unstable; e(n) or (d(n)– x(n)) is the instantaneous
error at time n and x(n) is the sampled signal at time n. Replacing the gradient
of the mean square error function by a simple instantaneous squared error
function, the LMS algorithm is defined for the coefficient update as
This is known as adaptive LMS algorithm. The algorithm requires x(n), d(n)
and h(n) to be known at each iteration. The LMS algorithm requires only 2N + 1
multiplications and 2N additions per iteration for an N tap-weight vector.
Therefore, it has a relatively simple structure and the hardware required is
directly proportional to the number of weights.
A limitation of the LMS algorithm is that it does not use all the information
contained in the input data set for convergence. To overcome the problem of
slow convergence of the LMS algorithm, the recursive least square (RLS)
algorithm is implemented. The RLS algorithm uses the Newton’s adaptation
method to minimise the mean square surface. So, it computes recursively, the
inverse of the mean square error function or inverse of the input correlation
matrix. The RLS algorithm uses the matrix inversion lemma technique and it is
a recursive implementation to minimise the LS objective function. The
weighted least-squares (WLS) objective function is formulated as
where e(i) is the difference between desired signal y(i) and filtered output at
time i, using the latest set of filter co-efficient hn(k). Thus, minimizing e (n) by
differentiating Eq. (14.17) with respect to h* n(k), we have
Comparison of LMS with RLS
Let em(n) be defined as the sum of the mean square values of the forward and
backward prediction errors at the output of the mth stage lattice filter at time n
and gm(n) be the reflection coefficient
where em(n) depends on time n because the reflection coefficient gm(n) varies
with respect to time, fm–1(n – 1) and bm–1(n) are the forward predictor error
and the delayed backward prediction error respectively at the input of the mth
stage. The gradient is given by
5.2.4 Applications of Adaptive Filtering
Due to the ability of adaptive filter to operate satisfactorily in non-stationary
environments, it is considered as a part of many DSP applications where the
statistics of the incoming signals are unknown or time varying. Adaptive filter
performs a range of varying tasks, namely, system identification, noise
cancellation, signal prediction, etc. in applications like channel equalization,
echo cancellation or adaptive beam forming. Each application differs in the way
the adaptive filter chooses the input signal and the desired signal.
System Identification
The salient features required for efficient performance of DSP operations are:
Another architecture used for Programmable DSPs, is the very long instruction
word (VLIW) architecture. VLIW architecture has a number of processing
units. The VLIW is accessed from memory and is used to specify the operands
and operations to be performed by each of the data paths. The multiple
functional units share a common multi ported register file for fetching the
operands and storing the results as shown in Fig 16.3. Read wire cross bar
facilitates the parallel random access by the functional units. Execution of the
operation in the functional units is carried out concurrently with the load/store
operation of data between a RAM and the register file. The performance of this
type of architecture depends on the degree of parallelism involved in the DSP
algorithm and the number of functional units. If there are 8 functional units, the
time required for convolution can be reduced by a factor of 8 compared to a
single functional unit. The number of functional units is also limited by the
hardware cost.
Block Diagram of the VLIW
Architecture
TMS320C5X processors can address 64K words of program memory and 96K
words of data memory.
The following addressing modes are supported by TMS320C5X processors.
(i) Direct addressing
(ii) Memory-mapped register addressing
(iii) Immediate addressing
(iv) Indirect addressing
(v) Dedicated-register addressing
(vi) Circular addressing
i) Direct Addressing
The data memory used with C5X processors is split into 512 pages each of 128
words long. The data memory page pointer (DP) in ST0 holds the address of the
current data memory page. In the direct addressing mode of C5X, only lower-
order 7 bits of the address are specified in the instruction. The upper 9 bits are
taken from the DP as shown in Fig. 16.5.
ii) Memory Mapped Register Addressing
The immediate addressing mode can be used to load either a 16-bit constant or a
constant of length 13, 9 or 7. Accordingly, it is referred to as long immediate or
short immediate addressing mode. This mode is indicated by the symbol #.
Example: ADD # 56h adds 56h to ACC. Similarly, ADD# 4567h adds 4567h to
ACC.
The ARs AR0 – AR7 are used for accessing data using indirect addressing
mode. In the indirect addressing mode, out of eight ARs, the one which is
currently used for accessing data is denoted by the register ARP. The contents
of ARP can be temporarily stored in the ARB register. The indirect addressing
mode of C5X permits the AR used for the addressing to be updated
automatically either after or before the operand is fetched. Hence a separate
instruction is not required to update the AR. However, if required, the contents
of an AR can be incremented or decremented by any 8-bit constant using SBRK
and ADRK instructions. For example, SBRK #k, ADRK #k subtracts, adds the
constant k from/to the AR pointed by ARP.
If BMAR contains the value 200h, then the content of data memory location
200h is copied to data memory location 100 on the current data page.
The 8-bit CBCR enables and disables the circular buffer operation. To define
circular buffers, the start and end addresses are loaded into the corresponding
buffer registers first; next, a value between the start and end registers for the
circular buffer is loaded into AR. The corresponding circular buffer enables bit
in the CBCR should be set.
ADSP PROCESSORS
The ADSP 21xx is the first digital signal processor from Analog Devices. The
family consists of a large number of processors based on a common 16-bit
fixed-point architecture with a 24-bit instruction word.
The Analog Devices ADSP 210x and ADSP 219x are 16-bit fixed-point
processors with 24-bit instructions. The ADSP 219x is based on the ADSP 218x
architecture and the enhancements include the addition of new addressing
modes, an expanded address space, addition of an instruction cache, and deeper
pipeline (six stages, compared to three on the ADSP 218x) to enable faster
clock speeds. The ADSP 2184 combines the ADSP 2100 family base
architecture (three computational units, data-address generators and a program
sequencer) with two serial ports, a 16-bit internal DMA port, a byte DMA port,
a programmable timer, Flag I/O, extensive interrupt capabilities and on-chip
program and data memory. The ADSP 2184 integrates 20K bytes of on-chip
memory configured as 4K words (24-bit) of program RAM and 4K words (16-
bit) of data RAM. Power-down circuitry is also provided to meet the low power
needs of battery-operated portable equipment. The ADSP 2184 is available in a
100-lead LQFP package.
In addition, the ADSP 2184 supports instructions that include bit
manipulations—bit set, bit clear, bit toggle, bit test—ALU constants,
multiplication instruction (x squared), biased rounding, result free ALU
operations, I/O memory transfers, and global interrupt masking for increased
flexibility. Fabricated in a high-speed, double-metal, low-power CMOS process,
the ADSP 2184 operates with a 25 ns instruction cycle time. Every instruction
can execute in a single processor cycle. Figure 16.17 shows the functional block
diagram of the ADSP 2184 processor.
The ADSP 21xx families of DSPs contain a shadow bank register that is useful
for single-cycle context switching of the processor. The ADSP 219x are used in
low-cost applications, particularly on control applications. There are three
members in the ADSP 219x family.
The ADSP 2184 flexible architecture and comprehensive instruction set allow
the processor to perform multiple operations in parallel. In one cycle, the ADSP
2184 can
(i) receive and transmit data through the two serial ports,
(ii) receive or transmit data through the internal DMA port,
(iii) receive or transmit data through the byte DMA port, and
(iv) decrement the timer.
MOTOROLA PROCESSORS
The Motorola DSP560xx family has several kinds of 24-bit fixed-point digital
signal processors based on common core architecture. This processor family is
popularly used in digital audio applications, where its 24-bit word improves the
dynamic range and reduces quantization noise compared to 16-bit fixed-point
DSPs.
The DSP56000 and DSP56001 are the first members of the DSP560xx family
which were introduced in 1987. Motorola introduced the DSP56002 and
DSP56011 in 1992 and 1996 respectively, which were used for audio decoding
of the DVD (Digital Versatile Disc) players.
The DSP560xx has a 24-bit, fixed-point data path which features an integrated
MAC/ALU with a 24 × 24 – 48 bit multiplier, a 56-bit ALU, and two 56-bit
accumulators which provide eight guard bits each. Every operation of
DSP560xx data path uses fractional arithmetic. As DSP560xx has no integer
multiply instruction for integer multiplication to be performed by the
programmers, it is required to convert the result of a fractional multiply to
integer format by shifting a sign bit into the accumulator MSB. The data path
can shift values one bit left or right and it provides 48-bit double-precision
arithmetic. A carry bit can be updated by shifting operation and ALU operation.
The Motorola DSP561xx family is based on Motorola’s DSP56100 16-bit fixed-
point DSP core. Its architecture, instruction set and development environment
are similar to that of Motorola’s DSP560xx 24-bit fixed-point processor
family.DSP561xx processors execute at speed up to 30 MIPS and its
applications include cell phones and pagers.
The two processors in the DSP561xx family are the DSP56156 and the
DSP56166. Both the processors provide on-chip voice band A/D and D/A
converters (codes).
The factors which influence the selection of a DSP processor for a specific
application are described as follows.
Type of Arithmetic: Fixed and floating-point arithmetic are the two important
types of arithmetic used in modern digital signal processors. Fixed-point
processors are used in low-cost and high-volume applications (e.g. cell phones
and computer disk drives). Floating-point arithmetic processors are used for
application with wide and variable dynamic range requirements which are
expensive.