part a: signal processing · signal processing revolution started, both in terms of the consumer...
TRANSCRIPT
![Page 1: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/1.jpg)
Chapter 2
25
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
![Page 2: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/2.jpg)
Chapter 2
26
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
![Page 3: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/3.jpg)
Chapter 2
27
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
A digital signal processing system in Figure 2.2 provides an
alternative method for processing the analogue signal.
Analogue signal
processor (e.g. low-
pass filter) Analogue
Input Signal
Analogue
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.
![Page 4: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/4.jpg)
Chapter 2
28
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.
s[n]
xa(t)
dB 3 dB x[n]
Digital
Signal
Processor
analogue prefilter
or antialiasing filter analogue to digital
converter
Lowpass filtered
signal
x(t)
2
sf Sampling
frequency
Tf s
1
discrete-time
signal
D/A
converter
Digital to
analogue
converter
dB s(t)
2
sf
reconstruction
filter (analogue
filter) same as the
pre-filter
Figure 2.2: A general process of converting analogue signals into
digital signals and back to analogue form.
A/D
Converter
![Page 5: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/5.jpg)
Chapter 2
29
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 2B
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
2B
1
close & open the
switch at fs Hz
Analogue Signal
(bandlimited)
xa(t)
2.1.1.1.1.1.1 T
Logic circuit B bits
x[n]
digital
output
Sample & Hold Quantiser encoder
Figure 2.3: Analogue to digital conversion process
![Page 6: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/6.jpg)
Chapter 2
30
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.
Example:
S/H output
t
xa(t)
t
Tfs
1
2.1.1.1.1.1.2 T
Input signal
Figure 2.4: An example of “sample and hold” process
to convert analogue signals into digital signals.
Sampled Signal n
0V
-6V
-12V
12V x[n]
6V
T = sampling
period
Analogue
Signal
Samples
Figure 2.5: An example of sampling analogue signals
to discrete-time signals. The sampling period is T.
![Page 7: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/7.jpg)
Chapter 2
31
Example: 4-bit (B = 4) A/D converter (bipolar)
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.
5
4
3
2
1
digital
-1 1111
-2 1110
-3 1101
-4 1100
-5 1011
0101
0100
0011
0010
0001
analogue
![Page 8: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/8.jpg)
Chapter 2
32
A 12 bit A/D converter (bipolar) with an input voltage range of
10V will have a least significant bit (LSB) of
mVmVV
9.412
20
12
(resolution)
Resolution (step-size)
mVV
V 9.412
2012
1000 0000 0000
12 bits
0111 1111 1111
12 bits
+10V
-10V
212
levels = 4096
6
1
2
3
4
5
sampling instants
Quantisation
Level
1
2
3
4
5
6
1
0
0
0
0
1
1
0
1
0
1
0
1
1
0
3 bits code output
Quantisation
Level 3-bit A/D
Converter
(Unipolar)
encoder output
Figure 2.6: Quantisation of discrete-time signals
LSB
![Page 9: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/9.jpg)
Chapter 2
33
Note:
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
BB
VVV
212
V-full scale range of the A/D converter with bipolar signal
inputs. The maximum quantisation error, for the case where the
values are rounded up or down 2
V .
For a sine wave input of amplitude A, the quantisation step size
becomes
The quantisation error (e[n]) for each sample, is normally
assumed to be random and uniformly distributed in the interval
2
V with zero mean.
qAAne ][
level n+1
level n
level n-1
sampling instant
v ∆V
∆V/2
∆V/2 ∆V
Quantisation error =2
V (one
half of an LSB)
= 4.9 mV / 2 = 2.45 mV
B
AV
2
2
2A A
-A
actual amplitude quantized amplitude
![Page 10: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/10.jpg)
Chapter 2
34
The probability density function of the error P(e) has the form as
shown below
The quantisation noise power or variance 2
e is hence given by
2
2
22 )(
V
V
e deePe
2
2
21
V
V
deeV
Hence,
12
22 Ve
for uniform quantisation
V
1
2
V
2
V
VeP
1)(
Probability of quantisation
error is constant
VeP
1)(
![Page 11: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/11.jpg)
Chapter 2
35
(Note : Uniform quantisation - all steps are of equal size)
Signal-to-quantisation noise power ratio (SQNR) is defined as
N
in
P
PSQNR
12
][1
][1
22
1
2
1
2
Vor
neN
PandnxN
P
e
N
n
N
n
Nin
N
n
N
n
N
in
ne
nx
dBSQNR
P
PdBSQNR
1
2
1
2
][
][
log10)(
log10)(
The dynamic range of the signal is defined as
minmax ][][ nxnxR
The quantisation step size of resolution V is defined as
L
RV
2
2
2
12log10
12
)/(log10)(
R
LP
LR
PdBSQNR inin
RLPdBSQNR in log2012log10log20log10)(
signal power
noise power
number of levels in the
quantiser
![Page 12: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/12.jpg)
Chapter 2
36
Example:
For the sine wave input, the average signal power is 2
2A, i.e.
2
2
A rms value
The signal-to-quantisation noise power ratio (SQNR) in decibels
is
2
23log10
12
2/2
2log10
12
2log10
2
2
2
2
2
B
BA
A
V
A
SQNR
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.
SQNR = 6.02B + 1.76 dB
![Page 13: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/13.jpg)
Chapter 2
37
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:
dBne
nx
P
PSQNR
N
ini 2.22
3.0
6.49log10
][
][log10log10
2
2
Method 2:
dBnxN
SQNR
NandRwithRLPSQNR
N
n
s
ins
7.213log206log208.10][1
log10
163log20log208.10log10
1
0
2
Method 3:
If x(t) forms a period of a periodic signal with T=3, we can also
find inP and
sSQNR as
dBSQNR
dttxT
P
s
in
583.213log206log2012log103log10
3)(1 2
Note: iSQNR and
sSQNR differs because sSQNR is a statistical
estimate. The larger the number of samples N, the less iSQNR
and sSQNR differ.
![Page 14: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/14.jpg)
Chapter 2
38
2.5 Sampling of Analogue Signal
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.
deXtx tj)(2
1)( Inverse Fourier Transform
t=nT
deXnx nTj)(2
1
deXnx
enxX
jn
n
jn
)(2
1
)(
Discrete Time Fourier
Transform (DTFT):
Inverse Discrete Time
Fourier Transform
(IDTFT):
deXtx
dtetxX
tj
tj
)(2
1)(
)()(
Fourier Transform:
Inverse Fourier Transform:
A/D
Sampling
freq.(T
fs
1 )
x[n]
X()
x(t)
X()
= T
s
a
f
f 2
(2.1)
![Page 15: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/15.jpg)
Chapter 2
39
Now ejnT
is a periodic function of period 2. Equation (2.1)
becomes
TdeT
kXT
TdeT
kXT
deXnx
k
nTj
nTT
kj
k
k
k
k
nTj
)2
(1
2
1
)2
(1
2
1
)(2
1
)2
(
2
2
Let T =
de
TkX
Tnx nj
k
)2
(1
2
1 …
We have
deXnx nj
)(2
1 …
Inverse Fourier Transform for discrete signal
By comparing (2.2) and (2.3), We obtain
It is seen that X() is periodic with period 2. The digital
spectrum is a repetition of the analogue spectrum.
k T
kXT
X )2
(1
)(
- ,
Digital spectrum Analogue spectrum
(2.2)
(2.3)
(2.4)
![Page 16: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/16.jpg)
Chapter 2
40
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.
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 (T
wT
f ss
2or
1 ).
Tw
Tf ss
2or
1
![Page 17: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/17.jpg)
Chapter 2
41
2.6 Aliasing
Figure 2.7 illustrates the relationship between the digital
spectrum X() and the analogue spectrum X() for the case
X() = 0, T
or
2
sff .
Case 1: X() = 0, T
(sampling theorem holds)
Note: T
corresponds to = (or
2
sff )
The digital spectrum is the same as the original analogue
spectrum and repeats at multiples of the sampling frequency fs.
X()
A
Figure 2.7: Above: Frequency response of an analogue signal.
Below: Frequency response of the sampled analogue signal.
-/T /T (Analogue frequency)
X()
A/T
-3 -2 - 0 2 3 (Digital frequency)
2
sf fs
Analogue spectrum
Digital spectrum
𝑓𝑠
2
![Page 18: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/18.jpg)
Chapter 2
42
Case 2: X() 0, T
, but X() = 0,
T2
3
T2
3
T
T
T2
3
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, T
22 sff
Tf
.
X()
A
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.
-3 -2 2
3 -
2
3 2 3
X()
A/T
aliasing
![Page 19: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/19.jpg)
Chapter 2
43
This results in the familiar sampling theorem. The minimum
sampling frequency T
1 for which equation
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 T
, a small
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.
k T
kXT
X )2
(1
)(
|X(f)|
f (kHz)
2 4 -4 -2 3 -3
1
f (kHz)
|X()|
2 -2
-3
-
3
1/T
2 -2
![Page 20: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/20.jpg)
Chapter 2
44
Example: Consider the analogue signal
x(t) = 3 cos50t + 10 sin 300t – cos 100t
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 300t
fs 2 f = 300 Hz
n
nf
nTnx
s
sin10
300sin10
300sin10
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
ttx 300sin10 and sf
T1
, where fs = 300Hz.
sincos10
sincoscossin10
sin10
n
nn
nnx
for n = 0,1,2,..
n
x[n]
![Page 21: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/21.jpg)
Chapter 2
45
Since cos(n) = (-1)n , sin101
nnx
If = 0 or = , the samples of the sinusoid taken at the
Nyquist rate are not all zero.
Note: x(t) = A cos(2f0t) is a continuous-time sinusoidal signal
22
2cos)(
0
0
ss
s
ff
f
nf
fAnx
On the other hand, if the sinusoids,
tfAtx k2cos
[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 22
0ss f
ff
; consequently the
sampled signal is
knnf
fA
nf
kffA
nf
fAnx
s
s
s
s
k
22cos
)(2cos
2cos
0
0
nf
fAnx
s
02cos
(2.5)
(2.6)
(2.7)
![Page 22: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/22.jpg)
Chapter 2
46
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:
Example: Consider the analogue signal
ttttx 12000cos106000sin52000cos3
(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.
fs – sampling frequency
2
sf corresponds to =
2
sfis the highest frequency that can be represented uniquely
with a sampling rate fs
2
2fis called half the sampling frequency or folding frequency.
sf
fT 2
![Page 23: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/23.jpg)
Chapter 2
47
(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 = 5000Hz 25002sf
x(t) = 3cos(2 1000t) + 5sin(2 3000t) + 10cos(2 6000t)
nnn
nnn
nnn
nnnnx
5
12cos10
5
22sin5
5
12cos3
5
112cos10
5
212sin5
5
12cos3
5
62cos10
5
32sin5
5
12cos3
5000
60002cos10
5000
30002sin5
5000
10002cos3
nnnx
5
22sin5
5
12cos13
The same result can be obtained using equation (2.6).
Second Method:
kHzf
kHzf ss 5.2
25
We have fk = f0 + kfs
f0 = fk – kfs can be obtained by subtracting from fk an integer
multiple of fs such that 22
0
ss ff
f .
![Page 24: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/24.jpg)
Chapter 2
48
The frequency f1 = 1000 Hz is 2
sf (= 2500 Hz) and thus it is not
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
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(2000t)-5sin(4000t)
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.
nnnnx
5000
10002cos10
5000
20002sin5
5000
10002cos3
![Page 25: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/25.jpg)
Chapter 2
49
Example: An analogue signal x(t) = sin(480t)+3sin(720t) 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 2
sf = 300 Hz
(c) First Method:
n
nn
nn
nn
nntxnxnTt
5
4sin2
5
4sin3
5
4sin
5
42sin3
5
4sin
5
6sin3
5
4sin
600
3602sin3
600
2402sin)(
![Page 26: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/26.jpg)
Chapter 2
50
Second Method:
We have fk = f0 + kfs and therefore f0 = fk – k fs
22
0
ss ff
f
f1 = 240 Hz and is 2
sf (= 300 Hz) not affected by aliasing
f2 = 360 Hz and is 2
sf (= 300 Hz) affected by aliasing
Aliased frequency f0 = fk – k fs
= 360 – 1 600
= -240 Hz
n
nnnx
5
4sin2
600
2402sin3
600
2402sin
(d)
nny
600
2402sin2)(
600
n
f
nnTt
s
tty 480sin2)(
![Page 27: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/27.jpg)
Chapter 2
51
Note: Fourier transform – analogue signal
An analogue signal xa(t) = cos(2500t) is sampled at a rate of
fs=4kHz. Determine the resulting analogue and digital
magnitude spectra.
)(22
1)(2
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2)}{cos(
11
)()(
1
11
11
11
11
dtedte
dteedtee
eFTeFT
eeFTtFT
tjtj
tjtjtjtj
tjtj
tjtj
)()(
)()(
11
11
)()()}{cos( 111 tFT
)()( 11
)(2
dte tj
![Page 28: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/28.jpg)
Chapter 2
52
Hence, Fourier transform of xa(t) is )500()500()( fffX a
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.
![Page 29: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/29.jpg)
Chapter 2
53
Example: An analogue signal )()( tuetx at
a is sampled.
Determine the resulting analogue and digital magnitude spectra.
Fourier transform tables gives us fja
fX a2
1)(
, so
22 2
1|)(|
fafX a
, as shown below. Note that 0|)(| fX a at all
frequencies (i.e. )(txa is not bandlimited, or maxf , 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 )(txa in practice, it would
first be need to be band-limited by low pass filtering )(txa with
some cut-off frequency sff 2/1max and then sampled at a
sampling rate of fs.
![Page 30: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/30.jpg)
Chapter 2
54
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.
The D/A shown in Figure 2.9 is referred to as a zero-order hold.
)(ˆ ty
n t
T-Sampling period T – Sampling period
Digital
Signal
Processor
D/A Low pass
filter
y[n]
8 or 12 bits
)(ˆ ty y(t)
y[n]
reconstruction filter
or smoothing filter
Figure 2.9: Conversion process from digital signals to analogue signals.
![Page 31: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/31.jpg)
Chapter 2
55
By comparing its output )(ˆ ty 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.
The corresponding frequency response is
2
2sin
2
2
2
]1[1
)()(
222
2
222
00
T
T
eT
Tj
eee
T
j
eeee
j
j
edte
dtethH
TjTjTj
Tj
TjTjT
jTj
TtjT
tj
tj
h(t)
1
T
t
otherwise
Ttth
0
01)(
![Page 32: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/32.jpg)
Chapter 2
56
The magnitude of H() is plotted in Figure 2.10.
In the frequency domain, the staircase action of the DAC
introduces a type of distortion known as the x
xsin or aperture
distortion, where 2
Tx
.
|H()|
2
T
7
6 7
4 7
2 0 7
2 7
4 7
6
Figure 2.10: Magnitude response of a rectangular pulse.
x
xsin
Y()
input to the D/A
-4 -3 -2 - 0 2 3 4
)(ˆ y
D/A output x
xsin
![Page 33: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/33.jpg)
Chapter 2
57
The amplitude of the output signal spectrum is multiplied by the
x
xsin function, which acts like a lowpass filter, with the high
frequencies heavily attenuated. The x
xsin effect is due to the
holding action of the DAC and, in signal recovery, introduces an
amplitude distortion.
For a zero-order hold, the function x
xsin falls to about 4 dB at
half the sampling frequency
2
sf giving an average error of
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
response has a x
x
sinshape.
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.
![Page 34: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/34.jpg)
Chapter 2
58
2.7.2 Ideal D/A Converter (Sinc Interpolation)
Consider just an impulse
If we apply the signal )(ˆ ty to the input of the filter, we obtain
n
nTtnyTt
Tt
tythty
)()(*)/(
)/sin(
)(ˆ*)()(
T Impulse not square pulses
as in the case of an non-
ideal D/A
Ideal D/A y[n] y(t)
Ideal Lowpass filter
y(t) ^
T
T
)(H T
1 h(t) h(t) )(tδ
)(H
T
T
tT
t
th
sin
)(
1
t
![Page 35: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/35.jpg)
Chapter 2
59
y(t) can be written in this form.
nTt
TtnTtnyty
)/(
)/sin(*)()(
Using the property
)()(*)( 00 ttxtttx
we can obtain
nT
nTt
T
nTt
nyty)(
)(sin
)(
(2.8)
The original signal can be obtained by adding together an
infinite number of x
xsinpulses. The n
th
x
xsinpulse here is
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).
![Page 36: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/36.jpg)
Chapter 2
60
The signal x(t) is reconstructed from the samples of nynx
by summation of weighted and shifted x
xsin pulse.
Note:
(a) bit rate = fs no of bits
= 8000 samples/sec 12 bits/sample
= 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
Bit rate (bits per second)
= sampling frequency bits/sample
= 8000 samples/second 8-bits/sample
= 64,000 bits/sec
x[n]
12
x(t) 12-bits A/D
(fs = 8,000
kHz)
0-3.4 kHz
8-bit persample
fs = 8000 Hz
(8000 samples/sec)
speech signal
x(t) 8-bits
(compressed PCM)
A/D
converter
t 2T T 0 -T
y(1)
y(2) y(0)
y(-1)
y(-2)
y(t) = x(t) original signal
Figure 2.11: Each discrete-time sample is multiplied by a shifted sinc function.
Summing these sinc functions will produce the original analogue signal.
![Page 37: Part A: Signal Processing · signal processing revolution started, both in terms of the consumer ... A 12 bit A/D converter (bipolar) with an input voltage range of ... 5 32 31.6](https://reader031.vdocuments.us/reader031/viewer/2022040719/5e298836cc49543cea0cebb4/html5/thumbnails/37.jpg)
Chapter 2
61
(c)
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.
bit rate
=1644100 bits/sec
=0.7056 Mbits/sec
CD
16 bit fs=
44.1 kHz
CD
Reader
16 bit
D/A
lowpass
filter
AMP
16 bit fs = 44.1kHz