EC503
EC503
OCW
Digital Signal Processing
Credit: 3
Prepared by:
Semester: 5th
COURSE OBJECTIVES:
1. To analyze the Z-transform with the help of properties of ROC, Poles and Zeros , inverse z-transform
using Contour integration - Residue Theorem, Power Series expansion and Partial fraction expansion.
2. To introduce students with transforms for analysis of discrete time signals and systems.
3. To understand the digital signal processing, sampling and aliasing.
4. To use and understand implementation of digital filters.
5. To study filter design techniques.
6. To study Discrete Fourier Transforms.
7. To study Fast Fourier Transforms.
8. To study fixed point and floating point digital signal processors.
COURSE OUTCOMES:
1. Able to analyze discrete time systems in frequency domain and their region of convergence using Z
Transforms.
2. Able to define discrete systems in the Frequency domain using Fourier analysis tools like DFT, FFT.
3. Able to interpret the properties of discrete time signals in frequency domain.
4. Able to analyze discrete time signals and systems in frequency domain.
5. Able to describe the digital signal processing, sampling and aliasing.
6. Able to understand to implement digital filters.
PREREQUISITE:
Prerequisites for Digital Signal Processing are required a thorough understanding of various signals, systems,
and the methods to process a digital signal and also the knowledge of arithmetic of complex numbers and a
good grasp of elementary calculus. The questions reflect the kinds of calculations that routinely appear in
Signals. The candidates are expected to have a basic understanding of discrete mathematical structures. The
candidates will be required to do arithmetic only on integers, simple fractions, and simple radicals. In addition,
you need to know the representation of sine, cosine, in exponential form.
Subject Name: Digital Signal Processing
Semester: 5th
What is DSP?
DSP, or Digital Signal Processing, as the term suggests, is the processing of signals by digital means. A signal
in this context can mean a number of different things. Historically the origins of signal processing are in
electrical engineering, and a signal here means an electrical signal carried by a wire or telephone line, or
perhaps by a radio wave. More generally, however, a signal is a stream of information representing anything
from stock prices to data from a remote-sensing satellite.
Module I
Introduction to Z-Transforms
Introduction
A linear system can be represented in the complex frequency domain (s-domain where s = + j) using the
LaPlace Transform.
x(t)
h(t) y(t) = x(t) * h(t)
H(s)
X(s) Y(s) = X(s)H(s)
The Inversion integral is a contour integral in the complex plane (seldom used, tables are used instead)
1 j
L1X ( s) xt X s st ds
2j s j
x(t, Ts)
y(t)
x(t) Reconstruct
Sample Analog Re-Sample
(Ts sec.) System (Ts sec.)
Where:
Subject Name: Digital Signal Processing
Semester: 5th
and
y n y n * Ts y (t ) t n*T
s
Analyzing this equivalent system using standard analog tools will establish the z-Transform.
Sampling
Substituting the Sampled version of x(t) into the definition of the LaPlace Transform we get
Lx(t , Ts ) X T s xt , Ts st dt
t 0
But
xt , Ts xt * pt n * Ts
n 0 (For x(t) = 0 when t < 0 )
Therefore
X T s xn * Ts * t n * Ts st dt
t 0
n0
Now interchanging the order of integration and summation and using the sifting property of -functions
X T s xn * Ts t n * Ts st dt
t 0
n 0
X T s xn * Ts nTs s
n 0 (We are assuming that the first sample occurs at t = 0+)
X z xn z n
n 0
c X z z
1
n 1
xn dz
2j (This is a contour integral in the complex z-plane)
(The use of this integral can be avoided as tables can be used to invert the transform.)
Subject Name: Digital Signal Processing
Semester: 5th
To prove that these form a transform pair we can substitute one into the other.
1 n k 1
xk c xn z z dz
2j n 0
Now interchanging the order of summation and integration (valid if the contour followed stays in the region
of convergence):
1
xk
2j n 0
xn c z k n 1dz
If “C” encloses the origin (that’s where the pole is), the Cauchy Integral theorem says:
z k n 1dz o for n k
c 2j for n k
And we get xk = xk
z
U(t) |z| > 1
z 1
Tz
t |z| > 1
z 12
T 2 z z 1
t2 |z| > 1
z 13
z
at |z| > at
z aT
z * sin T
sin(t) |z| > 1
z 2 z * cosT 1
2
z * z cosT
cos(t) |z| > 1
z 2 z * cosT 1
2
Semester: 5th
where C is a closed
contour that includes
z=0
Signal z-Transform
Superposition
Time Shifting
Time
inversion
Time (convolution)
Convolution
Frequency
Differentiation
Summation
Example:
n k io if n k
if n k This is the “Unit Pulse” at n = k (assume k > 0)
z n k z n
n 0
F z
2z
Example: z 2z 12 , determine fn
A. By Infinite Series
Subject Name: Digital Signal Processing
Semester: 5th
F z
2z
z 4 z 2 5z 2
3
Now divide (long division) with the polynomials written in descending powers of z
2z-2+8z-3+22z-4+52z-5+114z-6+…
Z3-4z2+5z-2|2z
2z-8+10z-1-4z-2
8-10z-1+04z-2
8-32z-1+40z-2-16z-3
22z-1-36z-2+016z-3
22z-1-88z-2+110z-3-44z-4
52z-2-094z-3+044z-4
52z-2-208z-3+260z-4-104z-5
114z-3-216z-4+104z-5
F z f n z n 2z - 2 8z -3 22z - 4 52z -5 114z - 6
n0
n 0 1 2 3 4 5 6 …
fn 0 0 2 8 22 52 114 …
Note that this method does NOT give a closed form for the answer, but it is a good method for finding the
first few sample values or to check out that the closed form given by another method at least starts out
correctly.
F z
2z kz kz kz
1 2 3 2
z 2z 1 z 2 z 1 z 1
2
To find k1 multiply both sides of the equation by (z-2), divide by z, and let z2
2z k z z 2 k3 z z 2
k1 z 2
z 12
z 1 z 12
2 k z 2 k3 z 2
k1 2
z 12
z 1 z 12
Subject Name: Digital Signal Processing
Semester: 5th
2 k2 z 2 k z 2
k1 3
z 12 z 2
z 1 z 2 z 12 z 2
or
k1 = 2
Similarly to find k3 multiply both sides by (z-1)2, divide by z, and let z1
k z 1
2
k2 z 1 k3 z
2
1
z 2 z2 Equation A
And
k3 = -2
Finding k2 requires going back to Equation A above and taking the derivative of both sides
k z 1
2
k2 z 1 k3 z
2
1
z 2 z2
k2 = -2
F z
2z 2z 2z
z 2 z 1 z 12
3. According to Time shifting property of z-transform, if X(z) is the z-transform of x(n) then
what is the z-transform of x(n-k)?
a) zkX(z)
Subject Name: Digital Signal Processing
Semester: 5th
b) z-kX(z)
c) X(z-k)
d) X(z+k)
4. If X(z) is the z-transform of the signal x(n) then what is the z-transform of anx(n)?
a) X(az)
b) X(az-1)
c) X(a-1z)
d) None of the mentioned
6. If X(z) is the z-transform of the signal x(n), then what is the z-transform of the signal x(-n)?
a) X(-z)
b) X(z-1)
c) X-1(z)
d) None of the mentioned
7. X(z) is the z-transform of the signal x(n), then what is the z-transform of the signal nx(n)?
a) -z(dX(z))/dz
b) zdX(z)/dz
c) -z-1dX(z)/dz
d) z-1(dX(z))/dz
8. What is the set of all values of z for which X(z) attains a finite value?
a) Radius of convergence
b) Radius of divergence
c) Feasible solution
d) None of the mentioned
10. What is the ROC of the z-transform of the signal x(n)= anu(n)+bnu(-n-1)?
a) |a|<|z|<|b|
b) |a|>|z|>|b|
c) |a|>|z|<|b|
d) |a|<|z|>|b|
Subject Name: Digital Signal Processing
Semester: 5th
References:
Module II
Discrete Fourier Transform
It is required to know the frequency domain sampling i.e. X(ω). So, relationship between sampled Fourier
transform and DFT is established in the following manner.
Similarly, periodic sequences can fit to this tool by extending the period N to infinity [3].
Let a non-periodic sequence be,
x(n) = lim 𝑥N(n)
N→∞
Defining its Fourier transform,
……(1)
Here, X(ω) is sampled periodically, at every δω radian interval. As X(ω) is periodic in 2π radians, we require
samples only in fundamental range. The samples are taken after equidistant intervals in the frequency range
0≤𝜔≤2𝜋. Spacing between equivalent intervals is δω = 2𝜋/𝑁 radian [2].
Now evaluating, ω = 2𝜋/𝑁.𝑘
……(2)
where k=0,1,……N-1
After subdividing the above, and interchanging the order of summation
Subject Name: Digital Signal Processing
Semester: 5th
…………(3)
…………. (6)
………… (7)
Where n=0,1,…,N-1
Here, we got the periodic signal from X(ω). 𝑥(𝑛) can be extracted from 𝑥𝑝(𝑛) only, if there is no aliasing in
the time domain. 𝑁≥𝐿, N= period of 𝑥𝑝(𝑛) L= period of 𝑥(𝑛) [2]
, where k=0,1,2…………N-1
where n=0,1,2…………N-1
Example1:
Subject Name: Digital Signal Processing
Semester: 5th
Example2:
Twiddle Factor
It is denoted as WN and defined as 𝑊𝑁=𝑒−𝑗2𝜋/𝑁. Its magnitude is always maintained at unity. Phase of WN= -2π/
N. It is a vector on unit circle and is used for computational convenience. Mathematically, it can be shown as
[1]
Semester: 5th
Therefore
Properties of DFT
Linearity
It states that the DFT of a combination of signals is equal to the sum of DFT of individual signals. Let us take
two signals x1(n) and x2(n), whose DFT s are X1(ω) and X2(ω) respectively [2]. So, if
𝑥1(𝑛)→𝑋1(𝜔) and 𝑥2(𝑛)→𝑋2(𝜔)
Then 𝑎𝑥1(𝑛)+𝑏𝑥2(𝑛)→𝑎𝑋1(𝜔)+𝑏𝑋2(𝜔)
where a and b are constants.
Symmetry
The symmetry properties of DFT can be derived in a similar way as we derived DTFT symmetry properties.
We know that DFT of sequence x(n) is denoted by X(K). Now, if x(n) and X(K) are complex valued sequence,
then it can be represented as under
𝑥(𝑛)=𝑥𝑅(𝑛)+𝑗𝑥1(𝑛), 0≤𝑛≤𝑁−1
Frequency Shift
Convolution
Subject Name: Digital Signal Processing
Semester: 5th
Multiplication
Time Differencing
Conjugation
Circular Operations
Mod N arithmetic may be used to de.ne operations on signals that are appropriate for the DFT. The circular
reflection of x [n] is x [((-n)) N] : The circular shift of x [n] by any integer n0 is x [((n - n0))N] [1] : From
circular shift, we de.ne the circular convolution of x1 [n] and x2 [n] is
Periodic and circular convolution are similar, but apply to different circumstances, Periodic convolution
requires periodic signals and produces a periodic signal; circular convolution requires finite duration signals
and produces a finite duration signal.
for 0 ≤n ≤N-1,Circular shift and periodic convolution may also be applied to X [k], it is important that circular
shift and convolution appear in several of the DFT properties above [2].
The Fast Fourier Transform
The discrete (or digitized) version of the Fourier transform is called the Discrete Fourier Transform (DFT).
This transform takes digitized time domain data and computes the frequency domain representation. While
normal Fourier theory is useful for understanding how the time and frequency domain relate, the DFT allows
us to compute the frequency domain representation of real-world time domain signals. This brings the power
Subject Name: Digital Signal Processing
Semester: 5th
of Fourier theory out of the world of mathematical analysis and into the realm of practical measurements. The
Agilent 54600 scope with Measurement/Storage Module uses a particular algorithm, called the Fast Fourier
Transform (FFT), for computing the DFT. The FFT and DFT produce the same result and the feature is
commonly referred to as simply the FFT.
The FFT function uses 1000 of these points (every fourth point) to produce a 500 point frequency domain
display. This frequency domain display extends in frequency from 0 to feff /2, where feff is the effective
sample rate of the time record in Figure 1 (a) & (b)
Figure 1
(a) The sampled time domain waveform.
(b) The resulting frequency domain plot using the FFT.
The effective sample rate is the reciprocal of the time between samples and depends on the time/div setting of
the scope. For the Agilent 54600 series, the effective sample rate is given by:
So for any particular time/div setting, the FFT produces a frequency domain representation that extends from 0
to feff /2 (Figure 3b). When the FFT function is active, the effective sample rate is displayed when the time/div
knob is turned or the ± key is pressed. Note that the effective sample rate for the FFT can be much higher than
the maximum sample rate of the scope. The maximum sample rate of the scope is 20 MHz, but the random-
repetitive sampling technique places samples so precisely in time that the sample rate seen by the FFT can be
as high as 20 GHz.
The default frequency domain display covers the normal frequency range of 0 to feff /2. The Center Frequency
and Frequency Span controls can be used to zoom in on narrower frequency spans within the basic 0 to feff /2
range of the FFT. These controls do not affect the FFT computation, but instead cause the frequency domain
points to be plotted in expanded form.
Subject Name: Digital Signal Processing
Semester: 5th
Aliasing
The frequency feff /2 is also known as the folding frequency. Frequencies that would normally appear above
feff /2 (and, therefore, outside the useful range of the FFT) are folded back into the frequency domain display.
These unwanted frequency components are called aliases, since they erroneously appear under the alias of
another frequency. Aliasing is avoided if the effective sample rate is greater than twice the bandwidth of the
signal being measured.
The frequency content of a triangle wave includes the fundamental frequency and a large number of odd
harmonics with each harmonic smaller in amplitude than the previous one. In Figure 4a, a 26 kHz triangle
wave is shown in the time domain and the frequency domain. Figure 2b shows only the frequency domain
representation. The leftmost large spectral line is the fundamental. The next significant spectral line is the third
harmonic. The next significant spectral line is the fifth harmonic and so forth. Note that the higher harmonics
are small in amplitude with the 17th harmonic just visible above the FFT noise floor. The frequency of the
17th harmonic is 17 x 26 kHz = 442 kHz, which is within the folding frequency of feff /2, (500 kSa/sec) in
Figure 2b. Therefore, no significant aliasing is occurring.
Figure 2a:
The time domain and frequency domain displays of a 26kHz triangle wave.
Subject Name: Digital Signal Processing
Semester: 5th
Figure 2b:
Frequency spectrum of a triangle wave.
Figure 2c:
With a lower effective sample rate, the upper harmonics appear as aliases.
Figure 2d:
With an even lower effective sample rate, only the
fundamental and third harmonic are not aliased.
Subject Name: Digital Signal Processing
Semester: 5th
Figure 4c shows the FFT of the same waveform with the time/div control turned one click to the left, resulting
in an effective sample rate of 500 kSa/sec and a folding frequency of 250 kSa/sec. Now the upper harmonics of
the triangle wave exceed the folding frequency and appear as aliases in the display. Figure 4d shows the FFT
of the same triangle wave, but with an even lower effective sample rate (200 kSa/sec) and folding frequency
(100 kSa/sec). This frequency plot is severely aliased.
Often the effects of aliasing are obvious, especially if the user has some idea as to the frequency content of the
signal. Spectral lines may appear in places where no frequency components exist. A more subtle effect of
aliasing occurs when low level aliased frequencies appear near the noise floor of the measurement. In this case
the baseline can bounce around from acquisition to acquisition as the aliases fall slightly differently in the
frequency domain.
Aliased frequency components can be misleading and are undesirable in a measurement. Signals that are
bandlimited (that is, have no frequency components above a certain frequency) can be viewed alias-free by
making sure that the effective sample rate is high enough. The effective sample rate is kept as high as possible
by choosing a fast time/div setting. While fast time/div settings produce high effective sample rates, they also
cause the frequency resolution of the FFT display to degrade.
If a signal is not inherently bandlimited, a lowpass filter can be applied to the signal to limit its frequency
content (Figure 3). This is especially appropriate in situations where the same type of signal is measured often
and a special, dedicated lowpass filter can be kept with the scope.
Figure 3: A lowpass filter can be used to band limit the signal, avoiding aliasing.
Leakage*
Subject Name: Digital Signal Processing
Semester: 5th
The FFT operates on a finite length time record in an attempt to estimate the Fourier Transform, which
integrates over all time. The FFT operates on the finite length time record, but has the effect of replicating
the finite length time record over all time (Figure 4). With the waveform shown in Figure 4a, the finite length
time record represents the actual waveform quite well, so the FFT result will approximate the Fourier integral
very well.
Figure 4
(a) A waveform that exactly fits one time record.
(b) When replicated, no transients are introduced.
However, the shape and phase of a waveform may be such that a transient is introduced when the waveform
is replicated for all time, as shown in Figure 5. In this case, the FFT spectrum is not a good approximation for
the Fourier Transform.
Figure 5
(a) A waveform that does not exactly fit into one time record.
(b) When replicated, severe transients are introduced, causing leakage in the frequency domain.
Subject Name: Digital Signal Processing
Semester: 5th
Since the scope user often does not have control over how the waveform fits into the time record, in general,
it must be assumed that a discontinuity may exist. This effect, known as LEAKAGE, is very apparent in the
frequency domain. The transient causes the spectral line (which should appear thin and slender) to spread
out as shown in Figure 6.
Figure 6
Leakage occurs when the normally thin spectral line spreads out in the frequency domain.
Semester: 5th
a. True
b. False
9. Frequency selectivity characteristics of DFT refers to
Subject Name: Digital Signal Processing
Semester: 5th
References:
1. J.G.Proakis & D.G.Manolakis, Digital Signal Processing-Pearson Ed.
2. Prof. Dan Cobb, Digital Signal Processing Lecture Notes.
3. S.K.Mitra, Digital Signal processing – A Computer Based Approach-TMH.
Module III
Filter Design
The solution to the problem of leakage is to force the waveform to zero at the ends of the time record so that
no transient will exist when the time record is replicated. This is accomplished by multiplying the time record
by a WINDOW function. Of course, the window modifies the time record and will produce its own effect in
the frequency domain. For a properly designed window, the effect in the frequency domain is a vast
improvement over using no window at all.1 Four window functions are available in the Agilent 54600 scopes:
Hanning, Flattop, Rectangular and Exponential.
The Hanning window provides a smooth transition to zero as either end of the time record is approached.
Figure 1a shows a sinusoid in the time domain while Figure 1b shows the Hanning window which will be
applied to the time domain data. The windowed time domain record is shown in Figure 9c. Even though the
overall shape of the time domain signal has changed, the frequency content remains basically the same. The
spectral line associated with the sinusoid spreads out a small amount in the frequency domain as shown in
Figure 2
Subject Name: Digital Signal Processing
Semester: 5th
Figure 1
(a) The original time record.
The shape of a window is a compromise between amplitude accuracy and frequency resolution. The Hanning
window, compared to other common windows, provides good frequency resolution at the expense of
somewhat less amplitude accuracy.
The FLATTOP window has fatter (and flatter) characteristic in the frequency domain, as shown in Figure 3.
(Again, the figure is expanded in the frequency axis to show clearly the effect of the window.) The flatter top
on the spectral line in the frequency domain produces improved amplitude accuracy, but at the expense of
poorer frequency resolution (when compared with the Hanning window).
Figure 2
The Hanning Window has a relatively narrow shape in the frequency domain.
Subject Name: Digital Signal Processing
Semester: 5th
Fig. 3: The flattop window has a wider, flat-topped shape in the frequency domain.
The Rectangular window (also referred to as the Uniform window) is really no window at all; all of the
samples are left unchanged. Although the uniform window has the potential for severe leakage problems, in
some cases the waveform in the time record has the same value at both ends of the record, thereby eliminating
the transient introduced by the FFT. Such waveforms are called SELF-WINDOWING. Waveforms such as
sine bursts, impulses and decaying sinusoids can all be self-windowing.
A typical transient response is shown in Figure 4a. As shown, the waveform is self-windowing because it dies
out within the length of the time record, reducing the leakage problem.
Figure 4
(a) A transient response that is self-windowing.
Semester: 5th
If the waveform does not dissipate within the time record (as shown in Figure 4b), then some form of window
should be used. If a window such as the Hanning window were applied to this waveform, the beginning
portion of the time record would be forced to zero. This is precisely where most of the transient's energy is, so
such a window would be inappropriate.
A window with a decaying exponential response is useful in such a situation. The beginning portion of the
waveform is not disturbed, but the end of the time record is forced to zero. There still may be a transient at
the beginning of the time record, but this transient is not introduced by the FFT. It is, in fact, the transient
being measured. Figure 4c shows the exponential window and Figure 12d shows the resulting time domain
function when the exponential window is applied to Figure 4b. The exponential window is inappropriate
for measuring anything but transient waveforms.
Selecting a Window
Most measurements will require the use of a window such as the Hanning or Flattop windows. These are
the appropriate windows for typical spectrum analysis measurements. Choosing between these two
windows involves a tradeoff between frequency resolution and amplitude accuracy. Having used the time
domain to explain why leakage occurs, now the user should switch into frequency domain thinking. The
narrower the passband of the window's frequency domain filter, the better the analyzer can discern between
two closely spaced spectral lines. At the same time, the amplitude of the spectral line will be less certain.
Conversely, the wider and flatter the window's frequency domain filter is, the more accurate the amplitude
measurement will be and, of course, the frequency resolution will be reduced. Choosing between two such
window functions is really just choosing the filter shape in the frequency domain.
The rectangular and exponential windows should be considered windows for special situations. The
rectangular window is used where it can be guaranteed that there will be no leakage effects. The
exponential window is for use when the input signal is a transient.3
FIR Filter design using window function :
Windowing of a simple waveform like cos ωt causes its Fourier transform to develop non-zero values
(commonly called spectral leakage) at frequencies other than ω. The leakage tends to be worst (highest) near ω
and least at frequencies farthest from ω.
If the waveform under analysis comprises two sinusoids of different frequencies, leakage can interfere with the
ability to distinguish them spectrally. If their frequencies are dissimilar and one component is weaker, then
Subject Name: Digital Signal Processing
Semester: 5th
leakage from the stronger component can obscure the weaker one's presence. But if the frequencies are similar,
leakage can render them irresolvable even when the sinusoids are of equal strength. The rectangular window
has excellent resolution characteristics for sinusoids of comparable strength, but it is a poor choice for
sinusoids of disparate amplitudes. This characteristic is sometimes described as low dynamic range.
At the other extreme of dynamic range are the windows with the poorest resolution and sensitivity, which is
the ability to reveal relatively weak sinusoids in the presence of additive random noise. That is because the
noise produces a stronger response with high-dynamic-range windows than with high-resolution windows.
Therefore, high-dynamic-range windows are most often justified in wideband applications, where the
spectrum being analyzed is expected to contain many different components of various amplitudes.
In between the extremes are moderate windows, such as Hamming and Hann. They are commonly used
in narrowband applications, such as the spectrum of a telephone channel. In summary, spectral analysis
involves a trade-off between resolving comparable strength components with similar frequencies and resolving
disparate strength components with dissimilar frequencies. That trade-off occurs when the window function is
chosen.
Need of Windowing in FIR Filter
the Kaiser or Hanning, are used to design FIR filters, not IIR. Windows are also used for spectral analysis, but
I think you are only asking about them with regard to filter design.
The reason there are so many types of windows is that each generates a slightly different frequency response
and time domain response, as shown here.
Direct Form I
The direct form I is derived by rearranging above equation for a0=1a0=1
y[k]=∑m=0Mbmx[k−m]+∑n=1N−any[k−n]y[k]=∑m=0Mbmx[k−m]+∑n=1N−any[k−n]
Subject Name: Digital Signal Processing
Semester: 5th
It is now evident that we can realize the recursive filter by a superposition of a non-recursive and a recursive
part. With the elements given above, this results in the following block-diagram
Semester: 5th
Semester: 5th
1. Direct-Form Realization
r
Y ( z)
L z i
i
H ( z) i 0
m
1 k j zj
X ( z)
j 1
r m
y (nT ) Li x(nT iT ) k j y (nT jT )
i 0 j 1
Semester: 5th
j 1 H1 ( z ) j 1
H 2 (z)
Y ( z) H ( z) X ( z) H1 ( z) H 2 ( z) X ( z)
Denote V ( z) H 2 ( z) X ( z) Y ( z) H1 ( z)V ( z)
Implement H2(z) and then H1(z) ?
Why H2 is implemented?
1 m
(1)V ( z ) X ( z ) k1 z V ( z ) k m z V ( z) (
2)
(1 k1 z 1 k m z m )V ( z ) X ( z )
1
V ( z) m
X ( z)
1 k jz j
j 1
H2 is realized!
Semester: 5th
Solved Maths:
2. Cascade Realization
Subject Name: Digital Signal Processing
Semester: 5th
1 2 3 1 2 3
Factorize 1 0.3z 0.6 z 0.7 z (1 a1 z )(1 a 2 z )(1 a3 z )
1 0.3z 1 0.6 z 2 0.7 z 3 1 a1 z 1 1 a 2 z 1 1 a3 z 1
H ( z)
(1 0.2 z 1 ) 3 10
.2
z1
10
.21
z 10
.21
z
H (1 ) ( z ) H ( 2) ( z ) H ( 3) ( z )
General Form
i 1 (1 ai z 1 ) j 1 (1 b j z 1 )(1 b j z 1 )
N1 N2 * *
M
H ( z ) kz
(1 ck z 1 )l 1 (1 d l * z 1 )(1 d l * z 1 )
D 1 D 2
k
1
1 q i z 1 1 (b j b j * ) z 1 b j b j * z 2
1 c k z 1 1 ( d l d l * ) z 1 d l d l * z 2
M D1
1 D2
1 el z 1
H ( z ) Ai z i Bk lC
i 0
k 1 1 C z 1 l 1 (1 d l z 1 )(1 d l * z 1 )
k
If r m realize the realize the complex
real poles congugate poles
Example 9-1
(1 z 1 ) 3
H ( z)
1 1
(1 z 1 )(1 z 1 )
2 8
Subject Name: Digital Signal Processing
Semester: 5th
Cascade:
1 z 1 1 z 1
H ( z) (1 z 1 )
1 1
(1 z 1 ) (1 z 1 )
2 8
Parallel
(1 z 1 ) 3 ( z 1) 3
H ( z)
1 1 1 1 1 1
(1 z )(1 z ) z ( z )( z )
2 8 2 8
In order to make deg(num)<deg(den)
Partial-Fraction
H ( z) ( z 1)3
Expansion for s
z 1 1
z 2 ( z )( z )
2 8
A B C D
2
z z z 1/ 2 z 1/ 8
Subject Name: Digital Signal Processing
Semester: 5th
z 2 ( z 1)3 (1)3
A lim zH ( z ) 16
z 0 z 2 ( z 1 / 2)( z 1 / 8) z 0 ( 1 )( 1 )
2 8
H ( z) ( z 1)3 4
C lim ( z 1 / 2) lim 2
z 1 / 2 z z 1 / 2 z ( z 1 / 8) 3
H ( z) ( z 1)3 343
D lim ( z 1 / 8) lim 2
z 1 / 8 z z 1 / 8 z ( z 1 / 2) 3
A 13
lim H ( z ) lim ( B) H ( z)
4
z 0 z 0 z z 3 15 45
4
lim zH ( z ) lim ( A Bz ) 2 8
z 0 z 0
A 16
d (H ( z) z) 4
lim B z2 4
z 0 dz C 4/3
8 / 9
1 3 / 2
d ( z 1) 3 z
B lim 2
z 0 dz 1 1 343 / 3 343 8
( z )( z ) D
2 8 1 15 / 8 3 15
z
112 8
4 8 343 8
B 2[ 4 ] 112
45 9 3 15
Example 9-2: System having a complex conjugate pole pair at z ae j
Transfer function
z2 1
H ( z)
( z ae j )( z ae j ) (1 ae j z 1 )(1 ae j z 1 )
z2 1
2
z 2a(cos ) z a 2 1 2a(cos ) z 1 a 2 z 2
Subject Name: Digital Signal Processing
Semester: 5th
1
H (e j 2r )
1 2a(cos )e j 2r a 2 e j 4r
| H (e j 2r ) | and
H (e j 2r ) ?
How the distance between the pole and the unit circle influence |H| and H ?
H
circle influence ?
1 a
Semester: 5th
Semester: 5th
t= nT, t0 = nT- T
nT
y (nT ) y (nT T ) x( )d
nT T
y (nT T ) y (nT T , nT )
Constant ( [nT T , nT ])
Y ( z ) z 1Y ( z ) z 1TX ( z )
Y ( z) z 1T
H ( z)
X ( z ) 1 z 1
Trapezoidal Integration
Constants
Subject Name: Digital Signal Processing
Semester: 5th
nT nT x(nT T ) x(nT )
nT T
x( )d
nT T 2
d
T
( x(nT T ) x(nT ))
2
T T
y(nT ) y(nT T ) x(nT ) x(nT T )
2 2
T
y (nT ) y (nT T ) Tx(nT T ) [ x(nT ) x(nT T )]
2
difference
between
two
dicrete time
int egrators
or
T T
Y ( z ) z 1Y ( z ) X ( z ) z 1 X ( z )
2 2
T 1 z 1
H ( z)
2 1 z 1
Frequency Characteristics
Rectangular Integrator
z 1T
H r ( z)
1 z 1
jT Te jT Te jT / 2 Te jT / 2
H r (e )
Frequency Response
1 e jT e jT / 2 e jT / 2 2 j sin T / 2
1
s 2
T
j 2r Te jr / s r
H r (e )
T 2r
Or
2 j sin r
Amplitude Response
T 1
Ar (r ) 0r (sin r 0)
2 sin r 2
Phase Response
1
r (r ) e jr j r 0r
2 2
Subject Name: Digital Signal Processing
Semester: 5th
Trapezoidal Integrator
T 1 z 1
H t ( z)
2 1 z 1
Frequency Response
1 sin r 0
t (r ) 0r
2 2 cosr 0
Versus Ideal Integrator
Ideal (continuous-time ) Integrator
1
H ( j ) 2f 2rf s
j
1
H (r )
j 2rf s
1
A(r ) (r )
2rf s 2
when T=1 second (Different plots and relationships will result if T is different.)
Subject Name: Digital Signal Processing
Semester: 5th
Semester: 5th
dy
x(t ) y(t )
dt
Determine a digital equivalent.
Solution
(1) Block Diagram of the original system
(2) An equivalent
(3) Transfer Function Derivation
T 1 z 1
Y ( z) ( X ( z ) Y ( z ))
2 1 z 1
T 1 z 1 T 1 z 1
1 Y ( z) X ( z)
1
1
2 1 z 2 1 z
Y ( z) T (1 z 1 )
H ( z)
Z ( z ) ( T 2) ( T 2) z 1
Semester: 5th
Derivation:
Impulse Response of analog filter
m
ha (t ) L ( H a ( s)) k i e sit
1
i 1
z-transform of ha(nT)
Semester: 5th
m
Z (ha (nT )) ha (nT ) z n
k i (e siT ) n z n
n 0 n 0 i 1
m m m
1 ki
k i ( e si T z ) n k i
i 1 n 0 i 1 1 e siT z 1 i 1 1 e siT z 1
Impulse-Invariant Design Principle
(3) Characteristics
H ( z ) z e jT H a ( j )
(1) when T0
frequency response of digital filter
T 0 H ( z ) z e jT H a ( j )
Semester: 5th
1
H a ( s) T 2s
(5) Design Example s 1
Solution: m 1, K1 1, s1 1
m
Ki 1 2
H ( z) T siT 1
2 2 1
i 1 1 e z 1 e z 1 e 2 z 1
Semester: 5th
Derivation
Given: Ha(s) transfer function of analog filter
Xa(s) Lapalce transform of input signal of analog Filter
T sampling period
Find H(z) z-transfer function of digital filter
ya (t ) L1[ H a ( s) X a ( s)]
z-transfer function of digital filter T
(5) Design Equation
G
H ( z) Z {[L1 ( H a ( s ) X a ( s))] t nT }
X ( z)
special case X(z)=1, Xa(s) = 1 (impulse)
Semester: 5th
A: Find
L1[ H a ( s) X a ( s)] ya (t ) (output of analog filter)
ya (nT ) ya (t ) t nT
B: Find
C: Find Z ( ya (nT ))
D: H ( z) GZ ( ya (nT ))
0.5( s 4)
H a ( s)
Example 9-5 ( s 1)( s 2)
Find digital filter H(z) by impulse - invariance.
Solution of design:
Find
L1[ H a ( s) X a ( s)] ya (t )
X a ( s) 1
0.5( s 4) 1.5 1
H a ( s)
( s 1)( s 2) s 1 s 2
ya (nT ) ya (t ) t nT
Find
Find Z ( ya (nT ))
1.5 1
Z ( ya (nT )) T 1
2T 1
1 e z 1 e z
H ( z ) GZ ( ya ( nT ))
1.5 1
G T 1
2T 1
1 e z 1 e z
Subject Name: Digital Signal Processing
Semester: 5th
use G = T
1.5T T
H ( z)
1 e T z 1 1 e 2T z 1
Implementation
Answer: c
Explanation: We know that the difference equation of an FIR system is given by
Semester: 5th
c) Lattice structure
d) All of the mentioned
Answer: d
Explanation: There are several structures for implementing an FIR system, beginning with the simplest
structure, called the direct form. There are several other methods like cascade form realization, frequency
sampling realization and lattice realization which are used for implementing and FIR system.
4. In cascade form of realization, how many bits should be used to represent the FIR filter coefficients in order
to avoid the quantization effect on filter coefficients?
a. 5 to 10
b. 12 to 14
c. 20 to 24
d. 28 to 40
Answer: b
Explanation:
No explanation is available for this question!
Answer: a
Explanation: The structure of the direct form realization, resembles a tapped delay line or a transversal system.
6. What is the condition of M, if the structure according to the direct form is as follows?
a) M even
b) M odd
c) All values of M
d) Doesn’t depend on value of M
Subject Name: Digital Signal Processing
Semester: 5th
Answer: b
Explanation: When the FIR system has linear phase, the unit sample response of the system satisfies either the
symmetry or asymmetry condition, h(n)= ±h(M-1-n)
For such a system the number of multiplications is reduced from M to M/2 for M even and to (M-1)/2 for M
odd. Thus for the structure given in the question, M is odd.
7. By combining two pairs of poles to form a fourth order filter section, by what factor we have reduced the
number of multiplications?
a) 25%
b) 30%
c) 40%
d) 50%
Answer: d
Explanation: We have to do 3 multiplications for every second order equation. So, we have to do 6
multiplications if we combine two second order equations and we have to perform 3 multiplications by directly
calculating the fourth order equation. Thus the number of multiplications are reduced by a factor of 50%.
8. The desired frequency response is specified at a set of equally spaced frequencies defined by the equation:
a) π/2M(k+α)
b) π/M(k+α)
c) 2π/M(k+α)
d) None of the mentioned
Answer: c
Explanation: To derive the frequency sampling structure, we specify the desired frequency response at a set of
equally spaced frequencies, namely ωk=2π/M(k+α) ,k=0,1…(M-1)/2 for M odd
k=0,1….(M/2)-1 for M even
α=0 or 0.5.
9. The realization of FIR filter by frequency sampling realization can be viewed as cascade of how many
filters?
a) Two
b) Three
c) Four
d) None of the mentioned
Subject Name: Digital Signal Processing
Semester: 5th
Answer: a
Explanation: In frequency sampling realization, the system function H(z) is characterized by the set of
frequency samples {H(k+ α)} instead of {h(n)}. We view this FIR filter realization as a cascade of two filters.
One is an all-zero or a comb filter and the other consists of parallel bank of single pole filters with resonant
frequencies.
10. What is the system function of all-zero filter or comb filter?
Answer: d
Explanation: The system function H(z) which is characterized by the set of frequency samples is obtained as
11. The zeros of the system function of comb filter are located:
a) Inside unit circle
b) On unit circle
c) Outside unit circle
d) None of the mentioned
2) In the frequency response characteristics of FIR filter, the number of bits per coefficient should be
_________in order to maintain the same error.
a. Increased
b. Constant
c. Decreased
d. None of the above
Answer: b
Explanation: The system function of the comb filter is given by the equation
Subject Name: Digital Signal Processing
Semester: 5th
12. What is the system function of the second filter other than comb filter in the realization of FIR filter?
Answer: c
Explanation: The system function H(z) which is characterized by the set of frequency samples is obtained as
13. Where does the poles of the system function of the second filter locate?
Answer: b
Explanation: The system function of the second filter in the cascade of an FIR realization by frequency
sampling method is given by
14. When the desired frequency response characteristic of the FIR filter is narrowband, most of the gain
parameters {H(k+α)} are zero.
a) True
b) False
Answer: a
Explanation: When the desired frequency response characteristic of the FIR filter is narrowband, most of the
Subject Name: Digital Signal Processing
Semester: 5th
gain parameters {H(k+α)} are zero. Consequently, the corresponding resonant filters can be eliminated and
only the filters with nonzero gains need be retained.
15. Which of the following filters have a cascade realization as shown below?
a) IIR filter
b) Comb filter
c) High pass filter
d) FIR filter
Answer: d
Explanation: The system function of the FIR filter according to the frequency sampling realization is given by
the equation
The above system function can be represented in the cascade form as shown in the above block diagram.
16. In FIR filters, which among the following parameters remains unaffected by the quantization effect?
a. Magnitude Response
b. Phase Characteristics
c. Both a and b
Subject Name: Digital Signal Processing
Semester: 5th
Answer: IIR
Explanation:
No explanation is available for this question!
18. In linear phase realization, equal valued coefficients are taken common for reducing the requisite number
of ________.
a. adders
b. subtractors
c. multipliers
d. dividers
Answer: multipliers
Explanation:
No explanation is available for this question!
19. How is/are the roundoff errors reduced in the digital FIR filter?
a. By representation of all products with double-length registers
b. By rounding the results after acquiring the final sum
c. Both a and b
d. None of the above
Semester: 5th
c. Both a and b
d. None of the above
Answer: Low
Explanation:
No explanation is available for this question!
23. In tapped delay line filter, the tapped line is also known as ________
a. Pick-on node
b. Pick-off node
c. Pick-up node
d. Pick-down node
Referrences:
1) Digital Signal Processing : Principles, Algorithms, and Applications 4 Edition (English, Paperback,
Dimitris G Manolakis, John G. Proakis)
Subject Name: Digital Signal Processing
Semester: 5th
Module IV
Finite word length effect Introduction
Introduction:
Practical digital filters must be implemented with finite precision numbers and arithmetic. As a result, both the
filter coefficients and the filter input and output signals are in discrete form. This leads to four types of finite
word length effects. Discretization (quantization) of the filter coefficients has the effect of perturbing the
location of the filter poles and zeroes. As a result, the actual filter response differs slightly from the ideal
response. This deterministic frequency response error is referred to as coefficient quantization error. The use of
finite precision arithmetic makes it necessary to quantize filter calculations by rounding or truncation. Round
off noise is that error in the filter output that results from rounding or truncating calculations within the filter.
As the name implies, this error looks like low-level noise at the filter output. Quantization of the filter
calculations also renders the filter slightly nonlinear. For large signals this nonlinearity is negligible and round
off noise is the major concern. However, for recursive filters with a zero or constant input, this nonlinearity
can cause spurious oscillations called limit cycles. With fixed-point arithmetic it is possible for filter
calculations to overflow. The term overflow oscillation, sometimes also called adder overflow limit cycle,
refers to a high-level oscillation that can exist in an otherwise stable filter due to the nonlinearity associated
with the overflow of internal filter calculations.
Subject Name: Digital Signal Processing
Semester: 5th
Coefficient Quantization
The coefficient quantization results in FIR filter changing its transform function. The position of FIR filter
zeros is also changed, whereas the position of its poles remains unchanged as they are located in z=0.
Quantization has no effect on them. The conclusion is that quantization of FIR filter coefficients cannot cause
a filter to become instable as is the case with IIR filters. Even though there is no danger of FIR filter
destabilization, it may happen that transfer function is deviated to such an extent that it no longer meets the
specifications, which further means that the resulting filter is not suitable for intended implementation. The
FIR filter quantization errors cause the stopband attenuation to become lower. If it drops below the limit
defined by the specifications, the resulting filter is useless. Transfer function changes occurring due to FIR
filter coefficient quantization are more effective for high-order filters. The reason for this is the fact that
spacing between zeros of the transfer function get smaller as the filter order increases and such slight changes
of zero positions affect the FIR filter frequency response.[2]
We have seen that a digital filter, or a general digital signal processing system, operates on an input sampled-
data signal to produce an output sampled-data signal by means of a computational algorithm. Since the
sampled-data signals are represented by number sequences, these are quantized and encoded using binary
codes, and the processor algorithm can be implemented either in software using a general purpose computer or
in dedicated hardware. The latter approach is becoming increasingly popular due to the advances in very large
scale intergration (VLSI) and the resulting availability of integrated circuit modules and special purpose
hardward with sufficient memory size, complexity and speed so as to render the hardware implementation of
digital filters, operating in real time, an attractive technique.
Now, regardless of the type of implementation, the numbers processed by the digital system are ultimately
stored in (memory) registers with finite capacity. Therefore, all digital networks operate with only a finite
number of binary digits (bits); thus resulting in an inherent limitation on the accuracy of processing. In this
chapter, we discuss the effect of using finite word-lengths to represent the numbers and the arithmetic
operations, on the accuracy of digital signal processors in general and digital filters in particular .
The errors due to the use of finite word-lengths to represent the pertinent numbers can be of the following
types:
Input signal quantization effects
These are errors due to the representation of the input signal by a set of values with discrete amplitudes and
subsequently by binary numbers with finite word-lengths. Typical word-lengths are 32 or 64 bits.
Semester: 5th
4.1
by a quantized discrete-amplitude value and subsequently in binary form by a finite number of bits. We recall
that the solution to the approximation problem leads to a transfer function of the general form (4.1) in which
the coefficients (ar, br) are assumed capable of being represented to an arbitrary degree of accuracy. However,
prior to implementation, these coefficients are quantized and each represented by a finite number of bits; again
typically 32 or 64 bits. Consequently, the filter response may deviate considerably from the desired
characteristic. Moreover, the error due to coefficient quantization may cause the poles of the transfer function
in (4.1) to change their positions in the z-plane, perhaps moving to points on the unit circle or exterior to it and
causing the filter to become unstable.
Semester: 5th
Figure 4.1 Error probability density functions in fixed-point arithmetic: (a). rounding, (b) truncation with
two's complement and (c) truncation with one's complement or signed magnitude[1]
Figure4 .2 Error probability density functions in floating-point arithmetic: (a) rounding, (b) truncation with
two's complement and (c) truncation with one's complement or signed-magnitude[1]
Subject Name: Digital Signal Processing
Semester: 5th
Figure 4.3 (a) The output fq(t) of a quantizer with input f(t). (b) The quantization error
4.2
If rounding is used in the quantization of the samples f(nT), then the maximum possible quantization error is
±q/2. Figure 4.3(a) shows the output of a quantizer (prior to encoding) with the input as the original
continuous signal f(t). Figure .3(b) shows the corresponding quantization error, and the amplitude of the
error signal lies between −q/2 and q/2. The amplitudes of the quantized signal are called the decision
amplitudes. It is generally reasonable to assume that the round-off error ε is white noise with uniform
probability density p(ε) as shown in Figure 4.4(a). The variance (power) of the error signal can be taken as a
measure of the degradation suffered by the signal due to quantization. When the quantizing step is very
Subject Name: Digital Signal Processing
Semester: 5th
small compared with the signal variations, the error signal can be considered equivalent to the sum of basic
error signals, each approximated by a straight line segment as shown in Figure 4.4(b). The average power
(variance) of a basic error signal of width τ is
or
……………………….4.3
Now, after quantization, the input to the filter is
………………………………….4.4
Since the filter is a linear system, its output is the sum of two components: one due to the signal f(nT) and
the other due to the quantization error ε(nT). Thus, the error is also filtered by the transfer function H(z) of
the filter. Since the error ε(nT) is assumed white noise with zero mean and variance q2/12, then the steady
state output component due to ε(nT) is a zero-mean wide-sense stationary process with power spectral
density given, in the z-domain, by
……………………………………4.5
so that
………………………4.6
Here, we have neglected the effect of coefficient quantization and round-off accumulation since their effect on the
response due to ε(nT) is much smaller than that due to f(nT). Thus, the output mean-square error (output noise power)
is given by
………………………………….4.7
where {h(nT)} is the impulse response sequence of the filter, which is assumed causal. Alternatively, the mean square
value of the output error due to input quantization may be obtained from (4.5) and Parseval's relation in the z-domain
………………………….4.8
where the integration is carried out over a closed contour c enclosing all the singularities of H(z). The integral can be
evaluated using the method of the residues, numerically, algebraically or by a computer programme.
Subject Name: Digital Signal Processing
Semester: 5th
Figure 4.4 (a) Probability density of round-off error. (b) A basic error signal approximation
Now, let each member of the quantized sequence fq(nT) be represented by an l-bit binary number. Then, the
maximum number of quantized amplitudes which can be encoded into binary form is 2l. It follows that the range of
amplitudes A which can be encoded lies in the range
…………………………………………4.9
Therefore, any amplitude value exceeding q2 cannot be represented, and the signal is clipped which results in
l
degradation.
Subject Name: Digital Signal Processing
Semester: 5th
…………………………………………4.10
If rounding is used in the quantization operation, the error signal is
…………………………………………4.11
Now, define the peak power of a coder as the power of the sinusoidal signal with the maximum possible amplitude Am
which the coder can pass without clipping (see Figure 4.5). Thus, the peak power is given by
…………………………………………4.12
The coding dynamic range Rc is defined as the ratio of the peak power to the quantization noise power. Hence, using
(4.3) and (4.12) we have
…………………………………………4.13
or
……………………………… 4.14
For example, an 6-bit coder has a dynamic range of about 50 dB while a 16-bit coder has a dynamic range of about 96
dB.
Figure 4.5 Pertinent to the definition of the coding dynamic range of the A/D converter
If the range of amplitudes of the input signal exceeds the coder dynamic range, then scaling of the signal
prior to quantization can be applied to reduce the amplitude range; thus eliminating clipping. Consequently,
in the model of quantization expressed by (4.4), a scaling factor K is incorporated such that
…………………………………………4.15
where
…………………………………………4.16
The signal to noise ratio in this case is given by
Subject Name: Digital Signal Processing
Semester: 5th
……………………….4.17
where is the power of the scaled signal, and is the quantization noise power. It is found that negligible clipping
results with the choice
……………………………………4.14
so that
……………………………………4.19
and using (4.2) the above expression becomes
……………………………………4.20
Thus, for an 6-bit A/D converter, the signal to noise ratio is about 45 dB, whereas for a 16-bit converter it is about 100
dB.
……………………………………4.21
while in the floating-point form
……………………………………4.22
with
……………………………………4.23
Similarly br becomes
……………………………………4.24
……………………………………4.25
……………………………………4.26
Subject Name: Digital Signal Processing
Semester: 5th
It now follows that the filter characteristics deviate from the desired ones. To study this effect we can compute the
frequency response of the actual filter with l-bit rounded coefficients, that is using the actual transfer function
………………….4.27
to evaluate
………………….4.28
The result is then compared with the desired theoretical response H(exp(jωT)) of the original design obtained from
the solution to the approximation problem. Naturally, the longer the word used to represent the numbers, the closer
the actual response to the desired one.
An alternative approach to the study of the above effects is to calculate the movements of the poles and
zeros of the transfer function due to coefficient rounding, then apply sensitivity theory to examine the
changes in the filter response. Let the poles H(z) be pi(i = 1, 2, … N) and the poles of Hq(z) be at (pi +
Δpi). Then it has been shown [20] that the variation in the typical pole position is given by
………………….4.29
where Δar is the change in the coefficient due to rounding, which is either αr or ar αr. Similar results can
be obtained for the movement of the zeros. From these perturbations, the deviations in the overall filter
response can be examined.
In addition to altering the frequency response, coefficient quantization can also affect the stability of an IIR
filter. If the poles happen to be close to the unit circle in the z-plane, coefficient quantization can cause their
positions to be sufficiently perturbed so as to move to points on the unit circle or exterior to it, thus
producing instability. It has been shown
that for an Nth order low-pass IIR filter operating at a sampling frequency of 1/T with distinct poles at (
), stability is guaranteed if the number of bits satisfies the, rather pessimistic,
inequality
Subject Name: Digital Signal Processing
Semester: 5th
………………….4.30
Example 4.1
Consider the transfer function
That is
so that l > 6.21 and we take l = 7.0. As noted before, the estimate is somewhat pessimistic, particularly since
it is based on quantization by truncation rather than rounding.
Generally, the effect of coefficient quantization is more significant for a high degree filter realized in direct
form, than the corresponding cascade or parallel realizations. Therefore the parallel or cascade form should
be used for high degree filters since the saving in the required word-length is quite significant.
Finally, we note that due to coefficient quantization, the output sequence will differ from the desired one.
The analysis of the resulting errors will be undertaken in the next section, in conjunction with round-off
accumulation.
To begin with, we shall examine the effect of round-off accumulation due to product quantization without
taking into account the effect of coefficient quantization. Then the combined errors due to both effects are
studied. In our discussion, we concentrate on the case of fixed-point arithmetic.
Subject Name: Digital Signal Processing
Semester: 5th
………………….4.
31 corresponds to the difference equation
………………….4.32
where the sampling period T has been dropped for convenience. In fixed-point arithmetic the result of
multiplying two l-bit numbers is a 2l-bit product; this is rounded to an l-bit word. In dealing with this type of
product quantization error we assume that the signal levels throughout the filter are much larger than the
quantizing step q. This allows us to treat product quantization errors at the output of the multipliers as
uncorrelated (statistically independent) random variables, each being white noise with power spectral
density q2/12. Therefore, the total error ε(n) is the sum of all those due to the multiplications. If μ is the
number of coefficients ar which are neither 0 or 1, and v is the number of coefficients br which are neither
0 nor 1, then the total number of multiplications is (μ + v).
Therefore the total error is
………………….4.33
………………….4.34 so that
………………….4.35
………………….4.36
Subject Name: Digital Signal Processing
Semester: 5th
………………….4.37
………………….4.38
which describes a linear discrete system with input ε(n) and output e(n). Hence, taking the z-transform of
(4.36) we can form the transfer function
………………….4.39a or
………………….4.39b
where D(z−1) is the denominator of the filter transfer function H(z). It follows that D(z−1) is the part of the
transfer function which contributes to the error noise in the filter output. We can, therefore, construct a
model of the filter which takes account of product round-off error accumulation as shown in Figure 4.6.
Figure 4.6 A model of an IIR filter, in direct form, taking round-off error accumulation into account
Semester: 5th
………………….4.40
Example 4.2
Calculate the output noise due to round-off accumulation, for the filter described by the transfer function
Solution
The integral is evaluated by summing the residues due to the poles inside the contour of integration, which in
this case is the unit circle. This gives
The poles of the integrand inside the unit circle are those at z = 0.4 and z = 0.5. The corresponding residues
are
Semester: 5th
………………….4.41
In this case, the round-off accumulation noise can be calculated using 4.40 with D(z−1) = 1 and N = 0. Thus,
the
average output noise power is
That is
………………….4.42
As explained in Chapter 4, this method proceeds by expressing the transfer function in the form
………………….4.44
with the possibility of one first-order factor for an odd-degree function; this is of the same form in (4.44) with
α2k = β2k = 0.
The realization is then the cascade connection of the sections described by the second-order terms (and a
possible first-order one) which realize each typical transfer function given by (4.44). Without taking round-
off errors into account, the realization takes the form shown in Figure 4.5. To include round-off errors in the
analysis, the model of Figure 4.4 is used for each transfer function described by (4.44) and the results are
connected in cascade. This gives the model of Figure 4.7. The quantization error inputs εk(n) produce noise
power components at the outputs resulting in a total noise power given by
………………………………………………………… 4.45
Examination of the model in Figure 4.7 shows that each noise input εk(n) produces an output ek(n) such
that an
error transfer function may be formed as
Subject Name: Digital Signal Processing
Semester: 5th
……………4.46a and
……………4.46b
Hence, using Parseval's theorem and a relation similar to (4.40) the kth quantization error component
produces a noise power given by
….. 4.47a
and
……………………….4.47b
where the lower asterisk denotes replacement of z by z−1 and μk is the number of multiplications in the kth
section. μk = 5 for a general second-order section and μk = 3 for a general first-order one. Finally the total
output noise power is obtained from (4.46) and (4.47).
Figure 4.7 A model for an IIR filter, in cascade form, taking round-off error accumulation into account
Example 4.3
Find the output noise power due to round-off accumulation in the cascade realization of the transfer function
of Example 4.2. [1]
Subject Name: Digital Signal Processing
Semester: 5th
Solution. Let us realize the transfer function as a cascade of two first-order sections. This is possible
because both poles are real. Thus
where
The two poles inside the unit circle are at z = 0.4 and z = 0.5. The corresponding residues are −5.9524 and
4.333. Thus
Comparison with the direct realization in Example 4.2, it is seen that for this transfer function, the cascade
form produces lower round-off noise, for the same quantizing step.
Semester: 5th
……………………….4.48 with
……………………….4.49
As before, we can develop the model of Figure 4.6 which gives the parallel form of realization taking the
round-off noise into account.
Figure 4.6 A model for an IIR filter, in parallel form, taking round-off error accumulation into account[1]
Subject Name: Digital Signal Processing
Semester: 5th
Each noise error input εk(n) produces a quantization noise power component at the output. The total
output round-off noise power is
……………………….4.50 where
Example 4.4
Find the output round-off noise power in the parallel realization of the same transfer function of Examples
4.2 and 4.3.
Solution
which can be realized as two first-order sections in the parallel form, because both poles are real. Thus
where
Thus
and
Subject Name: Digital Signal Processing
Semester: 5th
so that
which is even smaller than in the cascade form, for this transfer function.
We now repeat the same analysis of the previous section with the additional assumption that the filter
coefficients are also rounded . Here also, it is assumed that fixed-point arithmetic is used.
…………………4.52 where
…………………4.53
……………….4.54
……………….. 4.55
………………….4.56
………….……….4.57
Now, with the assumption that the input sequence {f(n)} is zero-mean and wide-sense stationary, it has an
autocorrelation sequence {Rff(n)} and power spectral density ϕff(z). It follows that the output sequence
{g(n)} is also zero-mean and wide-sense stationary with power spectral density ϕgg(z) given by (4.147) as
……….4.58
It can be shown that {u(n)}, as defined by (4.53), is also zero-mean and wide-sense stationary with an
autocorrelation function given by
……….4.59
Subject Name: Digital Signal Processing
Semester: 5th
The output quantization error Δ(n) which includes both coefficient quantization and product round-off
accumulation, is also zero-mean and wide-sense stationary with autocorrelation
……….4.61
………………….4.62
(4.61) is absent and expressions (4.61) to (4.62) reduce to (4.40) obtained before. However, if there is no
round-off error, then the second term in (4.61) is absent. It follows that the total noise at the output, due to
internal quantization, is the sum of two components, one is due to round-off accumulation and the other due
to coefficient rounding to l bits. The component due to round-off accumulation is uncorrelated with either
the input sequence
{f(n)} or the theoretical output sequence {g(n)}. A model for the direct realization of the transfer function
incorporating these errors can be easily obtained from (4.61) and (4.62). This is shown in Figure 4.9, of
which Figure
4.6 is a special case.
Figure 4.9 A model for an IIR filter in direct form, taking into account both round-off accumulation and
coefficient quantization[1]
Subject Name: Digital Signal Processing
Semester: 5th
With H(z) factored as in (4.43), the model in Figure 4.9 can be applied to each factor Hk, with M = N = 2 (or
1). The notation in (4.21) to (4.36) is used for the quantized coefficients for each second- or first-order
section. Thus, with
………………….4.63
we may construct the model in Figure 4.10 of which Figure 4.7 is a special case when coefficient quantization
is neglected.
Figure 4.10 A model for an IIR filter in cascade form taking into account both round-off accumulation and
coefficient quantization
Subject Name: Digital Signal Processing
Semester: 5th
Thus, for the cascade realization, the power spectral density of the output error is given by
………………….4.64
Finally, the total output noise power is obtained from (4.62) and (4.64). We also note that for zero coefficient
rounding, (4.64) when used in (4.62) reduces to (4.47).
With H(z) expressed as in (4.46), the model in Figure 4.9 can be applied to each second-order (or first-order)
term Hk(z). The notation in (4.21) to (4.26) is used for the quantized coefficients of each term. Thus, with
………………….4.65
we may construct the model in Figure 4.11 of which Figure 4.4 is a special case when coefficient
quantization is absent. Thus, for the parallel form of realization, the power spectral density of the output
error is given by
Subject Name: Digital Signal Processing
Semester: 5th
…..4.66
where μk is the number of multiplications in the kth section. The total output noise power is obtained from
(4.66) and (4.62). For no coefficient quantization, the result reduces to (4.51).
Figure 4.11 A model for an IIR filter in parallel form taking into account both round-off accumulation and
coefficient quantization[1]
Semester: 5th
Consider the second-order section as the basic building block in the realization of a digital transfer function
[1]. For the section shown in Figure 4.12 described by the difference equation
………………….4.68
………………….4.69
so that for stability p1, 2 must be inside the unit circle in the z-plane. This condition can be expressed in a
(β1, β2)- plane as shown in Figure 4.13. For complex poles, the domain of stability is bounded by the
parabola
………………….4.71
………………….4.72
That is
………………….4.73 or
……………………..4.74
In this case the domain of stability is the triangle defined by the three straight lines
Subject Name: Digital Signal Processing
Semester: 5th
Now, even for zero input, and even if the stability conditions are satisfied, self-sustained oscillations may
occur. The zero-input difference equation is obtained by setting f(n) = 0 in (4.67); thus
or
………………………………….4.76
Subject Name: Digital Signal Processing
Semester: 5th
When using fixed-point arithmetic in the adder of Figure 4.12 overflow may occur. For example, the transfer
characteristic of the two's complement adder is shown in Figure 4.14. Clearly overflow will occur if the
adder receives at its input numbers whose sum is outside the range (−1, 1). The condition for no overflow is
obtained from (4.76) as
………………………………….4.77 so that
………………………………….4.78
and since g(n − 1) and g(n − 2) are constrained to be less than unity, then a necessary and sufficient condition
for the
absence of overflow is
………………………………….4.79
This defines a square in the (β1, β2)-plane within the triangle of stability as shown in Figure 4.13. It has
been shown that if (4.79) is not satisfied the adder will operate in a non-linear fashion, producing a filter
output even when the input is zero. This output can be either a constant or a periodic signal which
is generally called an overflow oscillation. The solution to this problem is to use saturating adders. The
transfer characteristic of such an adder is shown in Figure 4.15 and does not allow the result to exceed the
specified dynamic range.
Semester: 5th
If the input to a digital filter is zero or a constant, the arithmetic round-off errors cannot be treated as
uncorrelated random processes in the manner given in Section 4.4. Instead, the round-off noise is dependent
on the input signal, and even when the input is switched-off there will be an output determined by this
round-off noise. This results in self-sustained oscillations known as limit cycles. These are now illustrated
by a first-order filter described by the first- order difference equation
………………………………….4.81
………………………………….4.82
Taking α = 0.94, the initial condition g(−1) = 11 and assuming that the input is switched-off, that is f(n) = 0,
we have
………………………4.83
The output is calculated assuming infinite precision arithmetic, then rounded to the nearest integer, giving
the values in Table 4.1. These show that although the exact value of g(n) decays exponentially, the rounded
value reaches a steady state value of 6. This is what is meant by the limit cycle response to zero input. If we
repeat the calculations in Table 4.1 with α in 4.60 being −0.94 we obtain Table 4.2 revealing that the
rounded value of g(n) oscillates between 6 and −6. The range [−6, 6] is called the dead-band and the
phenomenon is called the dead-band effects.
Subject Name: Digital Signal Processing
Semester: 5th
Table 4.1 Output of (4.83) calculated assuming infinite precision arithmetic and rounded to the nearest
integer
0 10.34 10
1 9.719 6 9
2 9.136 424 6
3 6.566 236 6 6
4 6.072 944 2 6
5 7.566 567 6 6
0 −10.34 −10
1 9.719 6 9
2 −9.136 424 −6
3 6.566 236 6 6
4 −6.072 944 2 −6
5 7.566 567 6 6
In general, for a first-order filter, the dead-band [−D, D] is obtained from
………………………………….4.84
where:
The analysis of limit-cycles in a second-order section shows that it has two modes of auto- oscillations. The
first is similar to the first-order case resulting in either a constant output or oscillations with ωN/2. In the
second mode, the filter behaves as though it possessed a pair of conjugate poles on the unit circle.
Subject Name: Digital Signal Processing
Semester: 5th
It must be observed that limit-cycle oscillations occur due to quantization before storage in the registers.
They generally have small amplitudes in well-designed systems with a sufficiently large number of bits and
a sufficiently small quantizing step. Therefore they are generally smaller in amplitude than possible
overflow oscillations in the absence of logic saturation devices. An upper bound on limit cycle amplitudes
can be easily obtained by noting that the quantization error signal is bounded by
………………………………….4.85
………………………………….4.86
which is, in fact, too pessimistic. A more realistic estimate of the limit cycle amplitudes is given by
………………………………….4.87
where H(exp(jωT)) is the transfer function of the filter section. For example, a second- order section
described by
……………………….4.88
Subject Name: Digital Signal Processing
Semester: 5th
has poles as
……………………….4.89
……………………….4.90
Semester: 5th
Semester: 5th
Module V
Application of DSP
Subband coding
The Subband coding is basically the decomposing the input signal into different frequency bands
and after the input is decomposed to its constituents, we can use the coding technique best suited to
each constituent to improve the compression performance Each component may have different
perceptual characteristics.
Idea: Split signal into Msignals x1[n], x2[n], …, xM[n] such that each signal can be more
easily/effectively compressed.
Goal: signals x1[n], x2[n], …, xM[n] should be made such that –Each xi[n] is uncorrelated…
•then using SQ on each is a viable (though still suboptimal) approach –Some xi[n] have smaller
dynamic range •Then can use fewer bits for a given desired distortion –Should be a clear way to
exploit psychological effects (for audio and video) or other effects that imply some xi[n] are
If we use the same number of bits for each of y[n] and z[n], we are transmitting
twice as many samples, doubling the bit rate.
• We can avoid this by sending every other value of y[n] and z[n] (e.g., even
numbered elements)
Analysis
Semester: 5th
downsampling)
• Justification for subsampling: Nyquist rule (range of frequencies of output of the
filter is less than input to the filter)
Synthesis
Encoding scheme
Semester: 5th
Semester: 5th
Semester: 5th
Fig [3
TMS320C6713
: DSK Features ]
Semester: 5th
Semester: 5th
Semester: 5th
CO-PO Mapping:
COs PO PO PO PO PO PO PO PO PO PO PO PO
1 2 3 4 5 6 7 8 9 10 11 12
CO1 3 3 1 1 1 2 1 2 2 2 2 3
CO2 3 2 2 1 2 3 1 2 2 1 2 3
CO3 3 3 1 3 2 3 1 2 2 1 2 3
CO4 3 2 1 3 1 3 1 3 1 1 1 3
CO5 3 2 1 1 1 1 1 1 1 2 2 1
CO6 3 3 3 1 3 3 2 3 3 2 3 2