0% found this document useful (0 votes)
108 views

Chapter2 PDF

This chapter discusses digital signal processing fundamentals. It describes how an analog signal is converted to digital through sampling, quantization, and encoding. This allows the signal to be processed digitally. It then goes through digital to analog conversion and reconstruction filtering to recover the analog output signal. Digital signal processing systems offer advantages over analog systems like programmability, reliability, and flexibility. The chapter provides an overview of how digital signal processing works at a high level.

Uploaded by

russ90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Chapter2 PDF

This chapter discusses digital signal processing fundamentals. It describes how an analog signal is converted to digital through sampling, quantization, and encoding. This allows the signal to be processed digitally. It then goes through digital to analog conversion and reconstruction filtering to recover the analog output signal. Digital signal processing systems offer advantages over analog systems like programmability, reliability, and flexibility. The chapter provides an overview of how digital signal processing works at a high level.

Uploaded by

russ90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Chapter 2

Chapter 2: Digital Signal Processing Fundamentals ...................... 26


2.1 Introduction ...................................................................... 26
2.2 Overview of a DSP System ............................................... 27
2.3 Analogue to Digital Conversion Process ............................ 29
2.4 Quantisation and Encoding ............................................... 31
2.5 Sampling of Analogue Signal ............................................ 38
2.5.1 The Ideal Sampling Operation ..................................... 40
2.6 Aliasing ............................................................................ 41
2.7 Digital-to-Analogue Conversion (D/A) – Signal recovery .. 54
2.7.1 Reconstruction Filter ................................................... 57
2.7.2 Ideal D/A Converter (Sinc Interpolation)...................... 58
2.8 Summary .......................................................................... 61
Chapter 2: Problem Sheet 2

Chapter 2 25
Chapter 2: Digital Signal Processing
Fundamentals

2.1 Introduction
Digital Signal Processing (DSP) is a rapidly developing
technology for scientists and engineers. In the 1990s the digital
signal processing revolution started, both in terms of the
consumer boom in digital audio, digital telecommunications and
the wide used of technology in industry.

Due to the availability of low cost digital signal processors,


manufacturers are producing plug-in DSP boards for PCs,
together with high-level tools to control these boards. There are
many areas where DSP technology is now being used and the
current proliferation of such technology will open up further
applications.

In the medical field, DSP systems are widely utilized for


recording data analysis and the interpretation of ECG signals.

Audiologists and speech therapists are exposed to DSP systems


for both testing a person’s level of hearing and subsequently
DSP hearing aid filtering.

The professional music industry uses spectrum analysers, digital


filtering, sampling conversion filters etc and is one of the
biggest users and exploiters of DSP technology.

In summary, DSP is applied in the area of control and power


systems, biomedical engineering, instrumentation (test and
measurement), automotive engineering, telecommunications,
mobile communication, speech analysis and synthesis, audio and

Chapter 2 26
video processing, seismic, radar and sonar processing and neural
computing.

There are many advantages to using DSP techniques for variety


of applications, these include:

- high reliability and reproducibility


- flexibility and programmability
- the absence of component drift problem
- compressed storage facility

DSP hardware allows for programmable operations. Through


software, one can easily modify the signal processing functions
to be performed by the hardware. For all these reasons, there has
been vast growth in DSP theory & applications over the past
decade.

2.2 Overview of a DSP System


An analogue signal processing system is shown in Figure 2.1, in
which both the input signal and output signal are in analogue
form

Analogue signal
processor (e.g. low-
Analogue pass filter) Analogue
Input Signal Output Signal
s(t)
x(t) = s(t) + n(t)

signal noise

Figure 2.1: A general description of analogue systems whose


input and output are in analogue form.

A digital signal processing system in Figure 2.2 provides an


alternative method for processing the analogue signal.

Chapter 2 27
analogue prefilter
or antialiasing filter analogue to digital
converter
dB 3 dB x[n] s[n] dB
x(t) s(t)
A/D Digital D/A
xa(t) Converter Signal converter
Processor

1 Digital to
fs  analogue
T
discrete-time converter
Lowpass filtered signal reconstruction
fs signal filter (analogue
Sampling fs
2 filter) same as the
frequency 2 pre-filter

Figure 2.2: A general process of converting analogue signals into


digital signals and back to analogue form.

Note:

- The A/D converter converts the analogue input signal into


a digital form.
- The D/A converter converts the processed signal back into
analogue form.
- The reconstruction filter smooths out the outputs of the
D/A and removes unwanted high frequency components.
- The analogue input filter is used to band-limit the analogue
input signal prior to digitisation to reduce aliasing (see
later).
- The heart of the system in Figure 2.2 is the digital signal
processor which may be based on a DSP chip such as
Texas instruments TMS 320C60.

The digital signal processor may implement one of the several


DSP algorithms, for example digital filtering (low-pass filter)
mapping the input x[n] into the output s[n].

Digital signal processor implies that the input signal must be in a


digital form before it can be processed.

Chapter 2 28
2.3 Analogue to Digital Conversion Process
Before any DSP algorithm can be performed, the signal must be
in a digital form. The A/D conversion process involves the
following steps:

- The signal (Band-limited) is first sampled, converting the


analogue signal into a discrete-time signal
- The amplitude of each sample is quantised into one of 2 B
levels (where B is the number of bits used to represent a
sample in the A/D converter)
- The discrete amplitude levels are represented or encoded
into distinct binary words each of length B bits.

A practical representation of the A/D conversion process is


shown in Figure 2.3.

A/D converter

Sample & Hold Quantiser encoder

2B
xa(t) Logic circuit B bits

x[n]
1
Analogue Signal
(bandlimited)
close & open the digital
switch at fs Hz output

2.1.1.1.1.1.1 T
Figure 2.3: Analogue to digital conversion process

Chapter 2 29
Sample and hold (S/H) takes a snapshot of the analogue signal
every T sec and then holds that value constant for T secs until
the next snapshot is obtained.

xa(t)

Input signal

S/H output
1
fs 
T

2.1.1.1.1.1.2 T t

Figure 2.4: An example of “sample and hold” process


to convert analogue signals into digital signals.

Example:

Analogue
T = sampling Signal
period
12V x[n]

6V

0V

-6V Samples

-12V
n
Sampled Signal

Figure 2.5: An example of sampling analogue signals


to discrete-time signals. The sampling period is T.

Chapter 2 30
Example: 4-bit (B = 4) A/D converter (bipolar)

digital

5 0101

4 0100

3 0011

2 0010

1 0001

-1 1111 analogue

-2 1110

-3 1101

-4 1100
-5 1011

Input-output characteristic of 4-bit quantiser (linear)


(two’s complement notation)

2.4 Quantisation and Encoding


Before conversion to digital, the analogue sample is assigned
one of 2B values (see Figure 2.6). This process, termed
quantization, introduces an error, which cannot be removed.

Chapter 2 31
6
Quantisation
Level 5
4
3
2
1

sampling instants

6
Quantisation 5
Level 3-bit A/D
4 Converter
3 (Unipolar)

2
1
3 bits code output
LSB 1 0 1 0 1
0 0 0 1 1
0 1 1 0 0

encoder output

Figure 2.6: Quantisation of discrete-time signals

A 12 bit A/D converter (bipolar) with an input voltage range of


10V will have a least significant bit (LSB) of
20V
mV  4.9mV (resolution)
12
2 1
+10V
0111 1111 1111

12 bits Resolution (step-size)


20V
212 levels = 4096 V   4.9mV
12
2 1
1000 0000 0000

12 bits -10V

Chapter 2 32
Note:

level n+1
Quantisation error = V (one
∆V 2
level n v ∆V/2
half of an LSB)
∆V/2
∆V = 4.9 mV / 2 = 2.45 mV
level n-1

sampling instant

For an A/D converter with Binary digits the number of


quantisation level is 2B, and the interval between levels, that is
the quantisation step size (V) – resolution is given by

V V
V  B  B
2 1 2
V-full scale range of the A/D converter with bipolar signal
inputs. The maximum quantisation error, for the case where the
V
values are rounded up or down  .
2
For a sine wave input of amplitude A, the quantisation step size
becomes

2A A 2A
V 
2B -A

The quantisation error (e[n]) for each sample, is normally


assumed to be random and uniformly distributed in the interval
V
 with zero mean.
2

e[ n]  A  Aq
actual amplitude quantized amplitude
Chapter 2 33
The probability density function of the error P(e) has the form as
shown below

1
1 P( e) 
V V

V V

2 2

The quantisation noise power or variance  e 2 is hence given by


V
2
 e2   P(e)de
2
e
V Probability of quantisation

2 error is constant
1
P (e ) 
V
V
2
1
  de
2
e
V V

2
Hence,

V 2
  2
e for uniform quantisation
12

Chapter 2 34
(Note : Uniform quantisation - all steps are of equal size)

Signal-to-quantisation noise power ratio (SQNR) is defined as


P signal power
SQNR  in
PN noise power

N N
1
 x[ n]2
1
Pin 
N n 1
and PN 
N
 e[ n]
n 1
2

V 2
or  e 
2

12

Pin
SQNR( dB )  10 log
PN
N

 x [ n]2

SQNR( dB )  10 log n 1
N

 e [ n]
n 1
2

The dynamic range of the signal is defined as

R  x[ n]max  x[ n]min

The quantisation step size of resolution V is defined as


R number of levels in the
V  quantiser
L

Pin 12 Pin L2
 SQNR( dB )  10 log  10 log
( R / L) 2 R2
12

SQNR( dB)  10 log Pin  20 log L  10 log 12  20 log R

Chapter 2 35
Example:

A2
For the sine wave input, the average signal power is , i.e.
2
2
 A  rms value
 
 2

The signal-to-quantisation noise power ratio (SQNR) in decibels


is

 A2   A2 
   
SQNR  10 log 2 2   10 log 2 
 V


 
 2 A / 2B 
2 

 12   12 
 3 22B 
 10 log 
 2 

SQNR = 6.02B + 1.76 dB

The SQNR increases with the number of bits, B. In many DSP


applications, an A/D converter resolution between 12 and 16 bits
is adequate.

Number of Bits Levels SQNR


3 8 18.7 dB
4 16 25.3 dB
5 32 31.6 dB
6 64 37.7 dB
7 128 43.8 dB

Thus, the signal-to-quantisation noise ratio increases


approximately 6dB for each bit.

Chapter 2 36
Example:

Consider the ramp x(t) = t over (0, 3). For a sampling interval
of 0.2s and number of levels, L = 6, the sampled signal,
quantized (by rounding) signal, and error signal are

x[n]={0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0}

xQ[n] = {0, 0.0, 0.5, 0.5, 1.0, 1.0, 1.0, 1.5, 1.5, 2.0, 2.0, 2.0, 2.5, 2.5, 3.0, 3.0}

e[n] = {0, 0.2, -0.1, 0.1, -0.2, 0.0, 0.2, -0.1, 0.1, -0.2, 0.0, 0.2, -0.1, 0.1, -0.2, 0}

where {e[n]=x[n]-xQ[n]}

Compute the SQNR.

Method 1:

SQNRi  10 log
Pin
 10 log
 x 2 [ n]
 10 log
49.6
 22.2 dB
PN  e [ n]
2
0.3

Method 2:

SQNRs  10 log Pin  10.8  20 log L  20 log R with R  3 and N  16


1 N 1

SQNRs  10 log 
N
 x [n]  10.8  20 log 6  20 log 3  21.7dB
n 0
2

Method 3:

If x(t) forms a period of a periodic signal with T=3, we can also


find Pin and SQNRs as

1 2
T
Pin  x (t )dt  3

SQNRs  10 log3  10 log 12  20 log 6  20 log 3  21.583dB

Note: SQNRi and SQNRs differs because SQNRs is a statistical


estimate. The larger the number of samples N, the less SQNRi
and SQNRs differ.

Chapter 2 37
2.5 Sampling of Analogue Signal


 jt
Fourier Transform: X ( )  x (t ) e dt


1
 X ( )e
jt
Inverse Fourier Transform: x(t )  d
2 

 xne
Discrete Time Fourier  jn
Transform (DTFT): X ( ) 
n  

xn 
Inverse Discrete Time 1

jn
Fourier Transform X ( ) e d
(IDTFT): 2 

Suppose that an analogue signal x(t) is sampled every T seconds,


then at the output of the sampler we obtain a discrete-time signal
x(n) = x(t)|t = nT.
A/D
x(t) Sampling
1
x[n]  = T
f
X( ) freq.( f s  )
T X()   2 a
fs

1 
x(t ) 
2  
X ( )e jt d Inverse Fourier Transform
t=nT

xn 
1 

2 

X ( )e jnT d (2.1)

Chapter 2 38
Now ejnT is a periodic function of period 2. Equation (2.1)
becomes
 2 k 
xn 
1
2

k  
2 k 
X ( )e jnT d

1 
1  2 j (  k 2T ) nT

2

k   T
 
X (  k
T
)e dT

1  1  2 jnT

2  T k  
X (  k
T
)e dT

Let T = 

1  2 jn 
xn 
1 

2 
  T  X (  k T )e  d … (2.2)
 k  

We have

xn 
1 

2  
X ( ) e jn d … (2.3)

Inverse Fourier Transform for discrete signal

By comparing (2.2) and (2.3), We obtain

1  2
X ( )   X (  k ) -    , (2.4)
T k   T

Digital spectrum Analogue spectrum

It is seen that X() is periodic with period 2. The digital


spectrum is a repetition of the analogue spectrum.

Chapter 2 39
2.5.1 The Ideal Sampling Operation

An analogue signal multiplied by a periodic impulse train results


in a train of impulses that match the values of the analogue
signal at the sampling instants.

1 2
fs  or ws 
T T

Multiplication of the analogue signal and the ideal impulse train


results in the convolution of their respective spectra.

The spectrum of the sampled signal x[n] thus consists of replicas


of Xa(f) at multiples of the sampling rate fs ( f s  1 or ws  2 ).
T T

Chapter 2 40
2.6 Aliasing
Figure 2.7 illustrates the relationship between the digital
spectrum X() and the analogue spectrum X( ) for the case
X( ) = 0,    or f  f s .
T 2


Case 1: X( ) = 0,   (sampling theorem holds)
T

X()
A Analogue spectrum
𝑓𝑠
2

-/T /T  (Analogue frequency)

X()
A/T Digital spectrum

-3 -2 - 0  2 3  (Digital frequency)

fs
fs
2
Figure 2.7: Above: Frequency response of an analogue signal.
Below: Frequency response of the sampled analogue signal.


Note:  corresponds to  =  (or f 
fs
)
T 2

The digital spectrum is the same as the original analogue


spectrum and repeats at multiples of the sampling frequency fs.

Chapter 2 41
 3
Case 2: X( )  0,   , but X( ) = 0,  
T 2T

X()
A

3   3
  
2T T T 2T

X()
A/T

3 3
-3 -2  -  2 3 
2 2
aliasing

Figure 2.8: Above: Frequency response of an analogue signal whose highest


frequency component is larger than the sampling frequency.
Below: Frequency response of the sampled analogue signal.
The overlapped region represents aliasing.

If the sampling frequency, fs is not sufficiently high, the


spectrum centred on fs will fold over or alias into the base band
frequencies (Figure 2.8). Equation (2.4) tells us that aliasing can
only be avoided if the analogue signal is band limited such that
X( ) = 0,     2f    f  f s .
T T 2

Chapter 2 42
This results in the familiar sampling theorem. The minimum
sampling frequency 1 for which equation
T

1  2
X ( )  
T k  
X (  k )
T

holds is called the Nyquist frequency.

Note: It should be noted that even if X( ) is not strictly band


limited, that it has some negligible energy outside  , a small
T
enough T can be chosen so that the overlap of the components of
the summation in the above equation is below a prescribed level.
This is important when a sampling frequency is to be selected
for a particular signal.

Aliasing Examples

Example: Suppose x(t) has the spectrum X(f) as shown


below. Sketch the digital spectrum |X()| if the sampling
frequency fs = 2 kHz.
|X(f)|
1

f (kHz)
-4 -3 -2 2 3 4

|X()|
1/T

 2

-2 -

f (kHz)
-3 -2 2 3

Chapter 2 43
Example: Consider the analogue signal

x(t) = 3 cos50t + 10 sin 300t – cos 100t

What is the Nyquist rate for this signal?

The frequencies present in the signal above are

f1 = 25Hz; f2 = 150 Hz; f3 = 50 Hz

Hence, fmax = 150 Hz

fsampling > 2 fmax = 300 Hz

The Nyquist rate is fN = 2 fmax = 300 Hz.

Note: Consider x(t) = 10 sin 300t

fs  2  f = 300 Hz
x[n]
xn  10 sin 300nT 
 300 
 10 sin  n 
n

 fs 
 10 sin n 

We are sampling the analogue sinusoid at its zero-crossing


points and hence we miss the signal completely. The situation
will not occur if the sinusoid is offset by some phase (here). In
such case we have
1
xt   10 sin300t    and T 
f s , where fs = 300Hz.
xn  10 sin n   
 10sin n cos    cos n sin  
 for n = 0,1,2,..
 10 cos n sin  

Chapter 2 44
xn   1 10 sin 
n
Since cos(n) = (-1)n ,

If  = 0 or  = , the samples of the sinusoid taken at the


Nyquist rate are not all zero.

Note: x(t) = A cos(2f0t) is a continuous-time sinusoidal signal

 f 
x( n )  A cos 2 0 n (2.5)
 fs 
f f
 s  f0  s
2 2

On the other hand, if the sinusoids,

xt   A cos2f k t  (2.6)

[where fk = f0 + kfs , k = 1, 2, 3, ….]


are sampled at a rate fs, it is clear that the frequency fk is outside
the fundamental frequency range  f s  f 0  f s ; consequently the
2 2
sampled signal is

 f 
xn  A cos 2 k n
 fs 
 ( f  kf s ) 
 A cos 2 0 n 
 f s 
 f 
 A cos 2 0 n  2kn 
 fs 
 f 
xn  A cos 2 0 n (2.7)
 fs 

Chapter 2 45
which is identical to the discrete-time signal in equation (2.5). If
we are given a sequence x[n] there is an ambiguity as to which
continuous-time signal x(t) these values represent. We can say
the frequencies fk = f0+kfs are indistinguishable from the
frequency f0 after sampling and hence they are aliases of f0.

Note:

fs – sampling frequency
fs
corresponds to  = 
2
fs
is the highest frequency that can be represented uniquely
2
with a sampling rate fs
f2
is called half the sampling frequency or folding frequency.
2
f
  T  2
fs

Example: Consider the analogue signal

xt   3 cos2000t   5 sin6000t   10 cos12000t 

(a) What is the Nyquist rate for this signal?

The frequencies existing in the analogue signal are:


f1 = 1 kHz; f2 = 3 kHz; f3 = 6 kHz

Thus fmax = 6 kHz and according to the sampling theorem,


fs > 2 fmax = 12 kHz

The Nyquist rate is = 12 kHz.

Chapter 2 46
(b) Assume now that we sample this signal x(t) using a
sampling rate fs = 5 kHz (samples/sec). What is the discrete-time
signal obtained after sampling?

First Method:
fs
fs = 5000Hz   2500
2
x(t) = 3cos(2  1000t) + 5sin(2  3000t) + 10cos(2  6000t)

 1000   3000   6000 


xn  3 cos 2 n   5 sin  2 n   10 cos 2 n
 5000   5000   5000 
 1   3   6 
 3 cos 2  n   5 sin  2 n   10 cos 2  n 
 5   5   5 
 1    2    1 
 3 cos 2  n   5 sin  2 1  n   10 cos 2 1  n 
 5    5    5 
 1   2   1 
 3 cos 2  n   5 sin   2 n   10 cos 2  n 
 5   5   5 

 1   2 
xn  13 cos 2  n   5 sin 2  n 
 5   5 

The same result can be obtained using equation (2.6).

Second Method:

fs
f s  5kHz   2.5kHz
2
We have fk = f0 + kfs

f0 = fk – kfs can be obtained by subtracting from fk an integer


fs fs
multiple of fs such that   f 0  .
2 2

Chapter 2 47
fs
The frequency f1 = 1000 Hz is  (= 2500 Hz) and thus it is not
2
affected by aliasing.

However, the other two frequencies f2 & f3 are above the folding
frequency and they will be changed by the aliasing effect.

f2' = f2 – 1 fs = 3000 – 5000 = -2 kHz


f3' = f3 – 1 fs = 6000 – 5000 = 1 kHz

  1000     2000     1000  


xn  3 cos 2  n   5 sin 2   n   10 cos 2  n 
  5000     5000     5000  

This is agreement with the result obtained before.

(c) What is the analogue signal y(t) we can reconstruct from the
samples if we use ideal interpolation.

Since only frequency components at 1 kHz and 2 kHz are


present in the sampled signal, the analogue signal we can
recover is,
y(t)=13cos(2000t)-5sin(4000t)

which is obviously different from the original signal x(t).


The distortion of the original analogue signal was caused by the
aliasing effect, due to the low sampling rate used.

Chapter 2 48
Example: An analogue signal x(t) = sin(480t)+3sin(720t) is
sampled 600 times per second.

(a) Determine the Nyguist sampling rate for x(t)


(b) Determine the folding frequency (or half the sampling
frequency)
(c) What are the frequencies, in radians, in the resulting
discrete time signal x[n]?
(d) If x[n] is passed through an ideal D/A converter what is
the reconstructed signal y(t)?

(a) x(t) = sin(2 240t) + 3sin(2  360t)


f1 = 240 Hz f2 = 360 Hz
 fmax = 360 Hz FNyquist = 2  fmax = 720 Hz
(b) fs = 600 Hz ffold or f s = 300 Hz
2

(c) First Method:


 240   360 
xn  x(t ) t nT  sin  2 n   3 sin  2 n
 600   600 
 4   6 
 sin  n   3 sin  n
 5   5 
 4   4  
 sin  n   3 sin   2  n 
 5   5  
 4   4 
 sin  n   3 sin  n
 5   5 
 4 
 2 sin  n
 5 

Chapter 2 49
Second Method:

We have fk = f0 + kfs and therefore f0 = fk – k fs


fs f
  f0  s
2 2

fs
f1 = 240 Hz and is  (= 300 Hz)  not affected by aliasing
2
f
f2 = 360 Hz and is  s (= 300 Hz) affected by aliasing
2
Aliased frequency f0 = fk – k fs
= 360 – 1  600
= -240 Hz
 240    240 
xn  sin  2 n   3 sin  2 n
 600   600 
 4 
 2 sin  n
 5 

 240  n n
(d) y(n)  2 sin 2 n t  nT  
 600  f s 600

y(t )  2 sin480t 

Chapter 2 50
Note: Fourier transform – analogue signal

An analogue signal xa(t) = cos(2500t) is sampled at a rate of


fs=4kHz. Determine the resulting analogue and digital
magnitude spectra.

 e j1t  e  j1t 
FT {cos(1t )}  FT  
 2 
1
2
  1

 FT e j1t  FT e  j1t
2

1  j1t  jt 1   j1t  jt
  e e dt   e e dt
2  2 
1  j (1  ) t 1   j (1  )t
  e dt   e dt
2  2 

 dt  2 ( )
jt
e
 2 (1   )   2 (1   ) 
1 1
2 2

  (1   )   (1   )

 (  1 )   (1  )

  (  1 )   (  1 )

FT {cos(1t )}   (  1 )   (  1 )

Chapter 2 51
Hence, Fourier transform of xa(t) is X a ( f )    ( f  500)   ( f  500)
as shown below. Note that fmax = 500Hz < fs/2 = 2000Hz, so this
obeys the sampling theorem. Sampling produces copies
(aliases) of the analogue spectrum centred at multiples of 2 .

Chapter 2 52
An analogue signal x a (t )  e u(t ) is sampled.
at
Example:
Determine the resulting analogue and digital magnitude spectra.

1
Fourier transform tables gives us Xa( f )  , so
a  j 2f
1
| X a ( f ) | , as shown below. Note that | X a ( f ) | 0 at all
a 2  2f 
2

frequencies (i.e. x a (t ) is not bandlimited, or f max   , so that no


sampling frequency (no matter how high) can obey the sampling
theorem. Sampling produces copies (aliases – shown dotted) of
the analogue spectrum centred at multiples of 2 which sum to
produce the overall response (solid), and this overall response
suffers from aliasing distortion as dictated by the sampling
theorem. In order to correctly sample x a (t ) in practice, it would
first be need to be band-limited by low pass filtering x a (t ) with
some cut-off frequency f max  1 / 2 f s and then sampled at a
sampling rate of fs.

Chapter 2 53
2.7 Digital-to-Analogue Conversion (D/A) – Signal
recovery
The D/A conversion process is employed to convert the digital
signal into an analogue form after it has been digitally
processed. The reason for such conversion may be for example,
to generate an audio signal to drive a loudspeaker or to sound an
alarm. The D/A process is shown in Figure 2.9. A register is
used to buffer the D/A’s input to ensure that its output remains
the same until the D/A is fed the next digital input.

Note: The inputs to the D/A are series of impulses, while the
output of the DAC has a staircase shape as each impulse is held
for a time T sec.

Digital y[n] Low pass y(t)


Signal D/A yˆ (t )
filter
Processor 8 or 12 bits

reconstruction filter
y[n] or smoothing filter
yˆ (t )

n t

T-Sampling period T – Sampling period

Figure 2.9: Conversion process from digital signals to analogue signals.

The D/A shown in Figure 2.9 is referred to as a zero-order hold.

Chapter 2 54
By comparing its output yˆ (t ) and its input y[n], it is evident that
for each digital code fed into the D/A, its output is held for a
time T. The result is the characteristic staircase shape at the D/A
output.

The D/A output approximates the analogue signal by a series of


rectangular pulses whose height is equal to the corresponding
value of the signal pulse.

Just consider one pulse.


h(t)

1 0  t  T 1
h(t )  
0 otherwise

t
T
The corresponding frequency response is

H ( )   h(t )e  jt dt

T
T
 e  j t 
  e dt  
 j t

0   j  0
T   j2T j T

1 j
e e 2 
 [e  jT  1]  e 2
 j   j 
 
 j T 
j T  T
j T
e  T j T sin
T  2
e 2 
2
 e 2
  e 2
2 j T T
  2
 2  2

Chapter 2 55
The magnitude of H( ) is plotted in Figure 2.10.

|H()|
sin x T
x 2

 6  4  2 2 4 6
0 
7 7 7 7 7 7

Figure 2.10: Magnitude response of a rectangular pulse.

In the frequency domain, the staircase action of the DAC


sin x
introduces a type of distortion known as the or aperture
x
T
distortion, where x  .
2

Y()
input to the D/A

-4 -3 -2 - 0  2 3 4 


yˆ ( )
sin x
D/A output
x

Chapter 2 56
The amplitude of the output signal spectrum is multiplied by the
sin x
function, which acts like a lowpass filter, with the high
x
sin x
frequencies heavily attenuated. The effect is due to the
x
holding action of the DAC and, in signal recovery, introduces an
amplitude distortion.

sin x
For a zero-order hold, the function falls to about 4 dB at
x
 fs 
half the sampling frequency   giving an average error of
 
2
about 36.4%.

Aperture error can be eliminated by equalization. In practice this


can be achieved by first applying the signal, before converting it
to analogue, through a digital filter whose amplitude-frequency
x
response has a shape.
sin x
2.7.1 Reconstruction Filter

The output of the D/A converter contains unwanted high


frequency at multiples of the sampling frequency as well as the
desired frequency components. The role of the output filter is to
smooth out the steps in the D/A output thereby removing the
unwanted high frequency components. In general, the
requirements of the anti-imaging filter are similar to those of the
anti-aliasing filter.

Chapter 2 57
2.7.2 Ideal D/A Converter (Sinc Interpolation)

H ( )
^
T
y[n] y(t) y(t)
Ideal D/A

 

T T

Impulse not square pulses Ideal Lowpass filter


T
as in the case of an non-
ideal D/A

Consider just an impulse

δ (t )
T H ( ) h(t) h(t)
1

1

t
t sin
h(t )  T
t
T

If we apply the signal yˆ (t ) to the input of the filter, we obtain

y (t )  h(t ) * yˆ (t )
sin(t / T ) 
 *  y ( n ) (t  nT )
(t / T ) n 

Chapter 2 58
y(t) can be written in this form.


 sin( t / T ) 
y (t )    y n   (t  nT ) * 
n  
( t / T ) 
Using the property

x(t ) *  (t  t 0 )  x(t  t 0 )

we can obtain

 (t  nT ) 
 sin  
y (t )   yn
T (2.8)
 (t  nT )
n  
T
The original signal can be obtained by adding together an
sin x sin x
infinite number of pulses. The nth pulse here is
x x
shifted through a distance nT with respect to the origin and
multiplied (weighted) by a factor y[n]. This recovery process is
called interpolation. Figure 2.11 shows the implementation of
equation (2.8).

Chapter 2 59
y(1)
y(t) = x(t)
original signal
y(0)
y(2)

y(-1)

y(-2)

-T 0 T 2T t
Figure 2.11: Each discrete-time sample is multiplied by a shifted sinc function.
Summing these sinc functions will produce the original analogue signal.
The signal x(t) is reconstructed from the samples of xn  yn
sin x
by summation of weighted and shifted pulse.
x

Note: x(t) 12-bits A/D x[n]


(a) bit rate = fs  no of bits (fs = 8,000
= 8000 samples/sec  12 bits/sample kHz) 12

= 96000 bits/sec

(b) In the case of PCM, speech signals are filtered to remove


effectively all frequency components above 3.4 kHz and the
sampling rate is 8000 samples per sec
speech signal
x(t) 8-bits 8-bit persample
(compressed PCM)
0-3.4 kHz A/D
converter
fs = 8000 Hz
(8000 samples/sec)
Bit rate (bits per second)
= sampling frequency  bits/sample
= 8000 samples/second  8-bits/sample
= 64,000 bits/sec

Chapter 2 60
(c)
CD CD 16 bit lowpass AMP
16 bit fs= Reader D/A filter
44.1 kHz

bit rate
=1644100 bits/sec
16 bit fs = 44.1kHz
=0.7056 Mbits/sec

2.8 Summary
At the end of this chapter, it is expected that you should know:

 A block diagram of the conversion from analog to digital and


back to analog form, including descriptions of the blocks
 Analog to digital conversion, in particular amplitude
quantization and quantization error. Be able to calculate the
signal-to-quantization error ratio.
 Sampling of analog signals, in particular deriving the
mathematical relationship between the analog and digital
spectra.
 The sampling theorem and the Nyquist frequency.
 How to demonstrate the effect of aliasing using sketched
magnitude spectrum plots.
 Digital to analog conversion and the role of the reconstruction
filter. Show your understanding using both mathematical and
hand-sketched explanations.
 Calculations of aliased frequencies: f0 = fk –kfs, where fk is the
frequency outside the Nyquist frequency.

Chapter 2 61

You might also like