Quad 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Physics

Paper No. : 09 Electronics


Module: 8.8 Digital signal processing 2

Development Team
Prof. Vinay Gupta ,Department of Physics and Astrophysics,
Principal Investigator University of Delhi, Delhi

Dr. Monika Tomar ,Physics Department ,Miranda House


Paper Coordinator
University of Delhi, Delhi

Prof. Vinay Gupta, Department of Physics and Astrophysics, University of Delhi, Delhi
Content Writer
Dr. Ayushi Paliwal, Department of Physics, Deshbandhu College, University of Delhi, Delhi

Prof. R. P. Tondon,Department of Physics and Astrophysics,


Content Reviewer
University of Delhi, Delhi

Electronics
Physics
Digital signal processing 2
Description of Module
Subject Name Physics
Paper Name Electronics
Module Name/Title Digital signal processing 2

Module Id 8.8

Electronics
Physics
Digital signal processing 2
Learning Objectives
 Quantization of continuous amplitude signals
 Analysis of quantization errors
 Coding of quantized samples
 Digital to analog converter
 Finite-duration impulse response(FIR) and Infinite -duration impulse response(IIR)
 Recursive and non-recursive Discrete -Time systems
 Linear Time-Invariant systems charaterised by constant-coefficient difference equations

Introduction
Since a discrete signal has discrete points in time but still has continuous values in amplitude, the amplitude of
the signal must be discretized in order to store it in digital format. The values of the amplitude must be rounded
off to discrete values. If the vertical axis is divided into small windows of amplitudes, then every value that lies
within that window will be rounded off (or quantized) to the same value. For example, consider a waveform with
window sizes of 0.5 volts starting at –4 volts and ending at +4 volts. At a discrete point in time, any amplitude
between 4.0 volts and 3.5 volts will be recorded as 3.75 volts. In this example the center of each 0.5-volt window
(or quantization region) was chosen to be the quantization voltage for that region. In this example the dynamic
range of the signal is 8 volts. Since each quantization region is 0.5 volts there are 16 quantization regions included
in the dynamic range. It is important that there are 16 quantization regions in the dynamic range. Since a binary
number will represent the value of the amplitude, it is important that the number of quantization regions is a
power of two. In this example, 4 bits will be required to represent each of the 16 possible values in the signal’s
amplitude.

1. Quantization of Continuous-Amplitude Signals

The process of converting a discrete -time continuous – amplitude signal into a digital signal by
expressing each sample value as a finite number of digits is called quantization.
Let, xq(n) denotes the sequence of quantized sample at the output of quantizer,
xq(n)=Q[x(n)]
The error introduced in representing the continuous -valued signal by a finite set of discrete value levels
is called the quantization error or quantization noise. Hence quantization error is the difference the
quantized value and the actual sample value.
eq(n)= xq(n)- x(n)
Let us take an example, consider the discrete time signal

Electronics
Physics
Digital signal processing 2
x(n)= 0.9n , n0 n significant digits cannot processed by calculation
0 , n 0 Let we want one significant digit to eliminate excess digit
(truncation or rounding)

 xq(n)

 The values allowed in the digital signal are called quantization levels, whereas the distance ‘Δ’
between two successive quantization level is called quantization step size or resolution.

 The rounding quantizer assigns each sample of x(n) to nearest quantization level

The quantization error eqn is limited to -Δ/2  eq(n) Δ/2


n X(n) discrete Xq(n) Xq(n) rounding eq(n)= xq(n)-
time Truncation x(n)
0 1 1.0 1.0 0.0
1 0.9 0.9 0.9 0.0
2 0.81 0.8 0.8 -0.01

Electronics
Physics
Digital signal processing 2
3 0.729 0.7 0.7 -0.029
4 0.6561 0.6 0.7 0.0439
5 0.59049 0.5 0.6 0.00951
6 0.531441 0.5 0.5 -0.031441

If xmin and xmax represents the minimum and maximum values of x(n) and ‘L’ is number of quantization
levels then

𝑥𝑚𝑎𝑥 −𝑥𝑚𝑖𝑛
𝛥= 𝐿−1

if L Δ  quantization error and accuracy

2. Analysis of Quantization Errors

Electronics
Physics
Digital signal processing 2
To carry out the analysis, we make the following assumptions about the statistical properties of eq (n):
1. the error eq(n) is uniformly distributed over the range -∆/2 < eq(n )< ∆/2.
2. the error eqn and the error eq(m) for m≠ n are uncorrelated.
3. the eror sequence { eq (n) } is uncorrelated with the signal sequence x(n).
4. The signal sequence x(n) is zero mean and stationary.
The mean square error , Pq is
𝟏 𝝉 𝟏 𝝉
𝒑𝒒 = 𝟐𝝉 ∫−𝝉 𝒆𝟐𝒒 (𝒕)𝒅𝒕 = 𝝉 ∫𝟎 𝒆𝟐𝒒 (𝒕)𝒅𝒕

where τ denotes the time that xa(t) stays within the quantization levels

Since, eq(t)=(Δ/2τ)t, -τ  t  τ, we have

𝝉
𝟏 𝜟 𝜟𝟐
𝒑𝒒 = ∫( )𝟐 𝒕𝟐 𝒅𝒕 =
𝝉 𝟐𝜟 𝟏𝟐
𝟎

If the quantizer has ‘b’ bits of accuracy and the quantizer covers the entire range 2A, the quantization
step is Δ=2A/2b
𝑨𝟐
𝟑
Therefore, 𝒑𝒒 = 𝟐𝟐𝒃

The average power of the signal is


𝒑 𝟏 𝑻𝒑 𝑨𝟐
𝒙= (𝑨 𝒄𝒐𝒔ꭥ𝟎 𝒕)𝟐 𝒅𝒕=
𝑻𝒑 ∫𝟎 𝟐

The Quality of the output of A/D converter is Usually measured by the signal to quantization noise
ratio(SQNR), which provides the ratio of the signal power to noise power
6

Electronics
Physics
Digital signal processing 2
𝒑 𝟑
𝑺𝑸𝑵𝑹 = 𝒑𝒙 = 𝟐 𝟐𝟐𝒃
𝒒

and in dB
SQNR(dB)=10 log10SQNR=1.76+6.02b.
3. Coding of Quantized Samples

The coding process in an A/D converter assigns a unique binary number to each quantization level
L levels then 2b  L where ‘b’ is bits in words
 b  Log2L
The number of bits required in the coder is the smallest integer (b) greater than or equal to Log L. If we
have a word length of b+1 bits we can represent 2b+1 distinct binary numbers. hence b+1 Log2L.then
the step size or resolution of A/D converter is
𝑹
𝜟 = 𝟐𝒃+𝟏 B increases  higher sampling speed and finer quantization (Δ decreases) More
expensive device
4. Digital to analog converter

D/A conversion is usually performed by combining a D/A converter with a sample and hold (S/H)
followed by a low pass filter as shown below.

Digital to Analog Sample and Hold


Digital input signal
converter

Lowpass Smoothing
Analog output signal
filter

settling time -time required for the output of the D/A converter to reach and remain within a given
fraction of the final value, after application of the input code word.
The Sample and hold (S/H) approximates the analog signal by a series of rectangular pulses whose
height is equal to the corresponding value of the signal pulse.

Electronics
Physics
Digital signal processing 2
Response of S/H
As shown, the approximation is basically a staircase function which takes the signal sample from the
D/A converter and holds it for T seconds. when the next sample arrives, it jumps to the next value and
hold it for T seconds and so on. We have already studied LTI system in terms of h(n) .it is convenient to
subdivide the class of LTI into two types:
Finite-duration impulse response(FIR) and Infinite -duration impulse response(IIR)
FIR system has an impulse response that is zero outside of the some finite time interval i.e.,
h(n)=0, n<0 and n>=M
The convolution formula for such a system reduces to
y(n)=∑𝑀−1
𝑘=0 ℎ(𝑘) ∗ 𝑥(𝑛 − 𝑘) (1) y(n) is simply a weighted linear combination of input samples
x(n-k), where weights by values of impulse response h(k).
Hence, we say that FIR system has a finite memory of length -M samples. (eqn.(1) involves additions,
multiplications, and a finite no. of memory locations.
FIR system is implemented directly, as implied by the convolution summation.
IIR LTI system has an infinite -duration impulse response. its output based on the convolution formula
is,

y(n)=∑𝑘=0 ℎ(𝑘) ∗ 𝑥(𝑛 − 𝑘) (2) where causality has been assumed i.e. k>0

Electronics
Physics
Digital signal processing 2
we say that the IIR system has an infinite memory. Eqn. (2) involves infinite memory locations,
multiplications & additions. we can realize IIR system using others means using difference equations,
which is practically and efficient computationally. This is very useful for implementations of digital
filters & modeling of physical systems and phenomena.
5. Recursive and non-recursive Discrete -Time systems

The system in which output y(n) is a function of several past output values and present and past inputs
is called recursive system. Thus, the output of a causal and practically realizable recrusive system can
be expressed as ,
y(n)=F[y(n-1),y(n-2),----------------y(n-N),x(n),x(n-1),----------------------,x(n-M)]
where 'F' denotes some function of its arguments
x(n) F(y(n-1),----------------------,y(n-N), y(n)
x(n),----------------------------,x(n-M))

𝑍 −1

Let we wish to compute the cumulative average of a signal x(n) in the interval 0<=k<=n, as
1
y(n)=𝑛+1 ∑𝑛𝑘=0 𝑥(𝑘),...........(A) n=0,1,2....{Here y(n) requires the storage of all the input samples x(k)
for 0<=k<=n.}
Since n is increasing, our memory requirements grow linearly with time (n).
However, y(n) can be computed more efficiently by using previous output value y(n-1).
Thus from equation (A), we have,
(n+1)y(n)=∑𝑛−1
𝑘=0 𝑥(𝑘) + x(n)

=ny(n-1) + x(n) [ From equation (A), for n→ n-1]


𝑛 1
y(n)=𝑛+1y(n-1) + 𝑛+1x(n).

Electronics
Physics
Digital signal processing 2
Therefore, Cumulative average y(n) can be computed recursively as
𝑛 1
* y(n-1) * x(n) example of recursive system
𝑛+1 𝑛+1

Here,y(n-1) is previous output value and x(n) is present input


i.e. Two multiplication, one addition and one memory location i.e. y(n-1).

For example consider a recrusive system represented by the following

𝑛 1
y(n)= y(n-1) + x(n) Difference equation (3)
𝑛+1 𝑛+1

This is represented by the following block diagram,

x(n) y(n)

+ ×
1/n+1

×
×
×
×
n
×
Eqn. (3) has time variant ×coefficients i.e. input -output equation for alinear time variant system.
In contrast if y(n) depends only on the present and past inputs, then
y(n)=F[x(n),x(n-1),-------------x(n-M)]

10

Electronics
Physics
Digital signal processing 2
such a system is called a non-recursive system.

x(n) F(x(n),x(n-1),-----------x(n-M)) y(n)

EXAMPLE
The convolution summation for a casual FIR system is,
y(n)=∑𝑀
𝑘=0 ℎ(𝑘) ∗ 𝑥(𝑛 − 𝑘)

=h(0)x(n)+h(1)x(n-1)+------------------------+h(M)x(n-M)
=F[x(n),x(n-1),-------------,x(n-M)
Hence the causal linear time-invariant FIR systems described by above formula are non recursive.
6. Linear Time-Invariant systems charaterised by constant-coefficient difference equations

suppose that we have a recursive system with an input -output equation ,


y(n)=ay(n-1) +x(n) [1st order difference equation] and a is constant
Block diagram×

x(n) y(n)

zpow(-1)

11

Electronics
Physics
Digital signal processing 2
input-output relation called a difference equation with constant coefficients and is input-output equation
for a LTI system.
If we compute successive values of y(n) for 𝑛 ≥ 0 beginning with y(0). Let we apply an input signal
x(n) to the system for 𝑛 ≥ 0.
𝑦(0) = 𝑎𝑦(−1) + 𝑥(0)
𝑦(1) = 𝑎𝑦(0) + 𝑥(1) = 𝑎2 𝑦(−1) + 𝑎𝑥(0) + 𝑥(1)
𝑦(2) = 𝑎𝑦(1) + 𝑥(2) = 𝑎3 𝑦(−1) + 𝑎2 𝑥(0) + 𝑎𝑥(0) + 𝑎𝑥(1) + 𝑥(2)
|
|
|
𝑦(𝑛) = 𝑎𝑦(𝑛 − 1) + 𝑥(𝑛)
= 𝑎𝑛+1 𝑦(−1) + 𝑎𝑛 𝑥(0) + 𝑎𝑛−1 𝑥(1) + − − − − − − − − − − 𝑎𝑥(𝑛 − 1) + 𝑥(𝑛)
Or,𝑦(𝑛) = 𝑎𝑛+1 𝑦(−1) (due to initial condition) + ∑𝑛𝑘=0 𝑎𝑘 𝑥(𝑛𝑘) (response to input sigal , x(n)) –
(5)
(𝑛 ≥ 0)
If the system is initially relaxed at time n=0, then y(-1)=0 (output of the delay) (memory should be zero).
Thus, a recursive system is relaxed if it starts with zero initial conditions. This system is at zero state and its
corresponding output is called zero-state response and is denoted by 𝑦𝑧𝑠 (𝑛) given by
𝑦𝑧𝑠 (𝑛) = ∑𝑛𝑘=0 𝑎𝑘 𝑥(𝑛 − 𝑘) , 𝑛 ≥ 0 (6)
Thus, relaxed recursive system given by equation (4) is LTI IIR system with ℎ(𝑛) = 𝑎𝑛 𝑢(𝑛). 𝑦(−1) = 0
indicates that input signal can be assumed causal. Therefore, upper limit is n because 𝑥(𝑛 = −𝑘) =
0 𝑓𝑜𝑟 𝑘 > 𝑛. This is a convolution sum involving input signal 𝑥(𝑛) convolved with impulse response
ℎ(𝑛) = 𝑎𝑛 𝑢(𝑛). Let system given by equation (4) is initially non-relaxed (i.e.,𝑦(−1) ≠ 0 & 𝑥(𝑛) =
0 for all n. Then, output of the system with zero input is called the zero -input response or natural response
denoted by 𝑦𝑧𝑖 (𝑛),
12

Electronics
Physics
Digital signal processing 2
𝑦𝑧𝑖 (𝑛) = 𝑎𝑛+1 𝑦(−1), 𝑛 ≥ 0 with 𝑥(𝑛) = 0 (7)
Recursive system with non-zero initial conditions (𝑦(−1) ≠ 0 is nonrelaxed and produce an output without
being excited i.e., 𝑥(𝑛) = 0 due to memory of systems.
Total response of the system is 𝑦(𝑛) = 𝑦𝑧𝑠 (𝑛)(𝐹𝑜𝑟𝑐𝑒𝑑 𝑟𝑒𝑠𝑝𝑜𝑛𝑠𝑒 𝑑𝑢𝑒 𝑡𝑜 𝑥(𝑛) +
𝑦𝑧𝑖 (𝑛)(𝑓𝑟𝑒𝑒 𝑟𝑒𝑠𝑝𝑜𝑛𝑠𝑒 𝑜𝑟 𝑛𝑎𝑡𝑢𝑟𝑎𝑙 𝑟𝑒𝑠𝑝𝑜𝑛𝑠𝑒 𝑑𝑒𝑝𝑒𝑛𝑑 𝑜𝑛𝑛𝑎𝑡𝑢𝑟𝑒 𝑜𝑛𝑙𝑦)
Hence, general form of possible recursive system described by linear constant-coefficient difference
equations,

𝑦(𝑛) (𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑜𝑢𝑡𝑝𝑢𝑡) =


− ∑𝑁 𝑀
𝑘=1 𝑎𝑘 𝑦(𝑛 − 𝑘) (𝑝𝑎𝑠𝑡 𝑜𝑢𝑡𝑝𝑢𝑡) + ∑𝑘=0 𝑏𝑘 𝑥(𝑛 − 𝑘) (𝑝𝑎𝑠𝑡 𝑎𝑛𝑑 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑖𝑛𝑝𝑢𝑡) (8)
Or ∑𝑁 𝑀
𝑘=0 𝑎𝑘 𝑦(𝑛 − 𝑘) = ∑𝑘=0 𝑏𝑘 𝑥(𝑛 − 𝑘) , 𝑎0 = 1 (9)
N- order of difference equation or order of system, -ve sign in equation (8) is due to convenience.
Equation (8) expresses the output of system a time ‘n’ as weighted sum of past output as well as past and
present input signals samples. To determine 𝑦(𝑛) for 𝑛 ≥ 0, we need 𝑥(𝑛) for all 𝑛 ≥ 0 and initial
conditions 𝑦(−1), 𝑦(−2),---------𝑦(−𝑁). We need to know about the past history of the response of the
system to compute the present and future outputs.
A system is linear if it satisfies the following three requirements:
1. The total response
𝑦(𝑛) = 𝑦𝑧𝑖 (𝑛)(𝑧𝑒𝑟𝑜 𝑖𝑛𝑝𝑢𝑡 𝑟𝑒𝑠𝑝𝑜𝑛𝑠𝑒 𝑥(𝑛) = 0) + 𝑦𝑧𝑠 (𝑛)(𝑧𝑒𝑟𝑜 𝑠𝑡𝑎𝑡𝑒 𝑟𝑒𝑠𝑝𝑜𝑛𝑠𝑒 𝑦(−1) = 0
2. Principle of superposition applies to zero state response (zero-state linear)
3. Principle of superposition applies to the zero input response (zero-input linear)

For relaxed system 𝑦𝑧𝑖 (𝑛) = 0[ ∵ 𝑦(−1) = 0], thus condition (2) is sufficient.

Aim: to find 𝒚(𝒏), 𝒏 ≥ 𝟎 of the system given a specific input 𝒙(𝒏), 𝒏 ≥ 𝟎 and set of initial conditions.
Solution of linear constant coefficient difference equations
The total solution of the sum of two parts:
𝑦(𝑛) = 𝑦ℎ (𝑛)(ℎ𝑜𝑚𝑜𝑔𝑒𝑛𝑜𝑢𝑠 𝑜𝑟 𝑐𝑜𝑚𝑝𝑙𝑒𝑚𝑒𝑛𝑡𝑎𝑟𝑦 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛) + 𝑦𝑝 (𝑛)(𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛)
13

Electronics
Physics
Digital signal processing 2
Homogenous solution of a difference equation -consider the following homogenous difference equation,
𝑁

∑ 𝑎𝑘 𝑦(𝑛 − 𝑘) = 0 (10)
𝑘=0

𝐴𝑠𝑢𝑚𝑚𝑖𝑛𝑔 the solution of the form, (similar to that of solving a linear constant coefficient differential
equation), we assume that solution is in the form of an exponential,
𝑦ℎ (𝑛) = 𝜆𝑛 (11)
Substituting (11) back in equation (10) we have,
𝑁

∑ 𝑎𝑘 𝜆𝑛−𝑘 = 0 , 𝑎0 = 1
𝑘=0

h is for solution to the homogenous difference equation


⇒ 𝜆𝑛−𝑁 (𝜆𝑁 + 𝑎1 𝜆𝑁−1 + 𝑎2 𝜆𝑁−2 + − − − − − − − − − − − − ∓𝑎𝑁−1 𝜆 + 𝑎𝑁 = 0
Characteristics polynomial of system in general, it has N roots which we denote as 𝜆1 , 𝜆2 − − − −𝜆𝑁 . Let
all roots are distinct. Then, most general solution is
𝑦ℎ (𝑛) = 𝐶1 𝜆1𝑛 + 𝐶2 𝜆𝑛2 + 𝐶3 𝜆𝑛3 + − − − − − − 𝐶𝑛 𝜆𝑛𝑛 (12)
These coefficients are determined by putting 𝑥(𝑛) = 0 (zero-input response of the system ) and intial
conditions.
Summary

 Quantization of continuous amplitude signals


 Analysis of quantization errors
 Coding of quantized samples
 Digital to analog converter
 Finite-duration impulse response(FIR) and Infinite -duration impulse response(IIR)
 Recursive and non-recursive Discrete -Time systems
 Linear Time-Invariant systems charaterised by constant-coefficient difference equations

14

Electronics
Physics
Digital signal processing 2

You might also like