ICS 3103
–COMMUNICATION SYSTEMS
Discrete Time Signals and
Systems
LECTURE 5
Karanja Mwangi Ph.D
1
Discrete Time signals-1
A discrete-time signal is an indexed sequence
of real or complex numbers. (function of an
integer-valued variable, n, that is denoted by
x(n). x(n) is generally referred to as a function
of time.
A discrete-time signal is undefined for non-
integer values of n. Therefore, a real-valued
signal x(n) can be represented graphically in
the form of a “lollipop plot” as follows
2
Discrete Time signals -2
lollipop plot showing the graphical
representation of a discrete-time signal x(n)
3
Discrete Time signals-3
Discrete signals can be
from source itself
As sampled from Continuous Time signal
Discrete signals can exist …Temperature of Juja taken in
the month of April each year …Thus the sampling time
becomes once a year and the data becomes discrete in
nature
Year = n 2010 2011 2012 2013 2014 2015
Temperatur
36 31 39 26 40 36
e : x(n)
4
Discrete Time signals-4
Discrete signals can
Sampled from Continuous Time signal
If we consider a Discrete time cosine wave say
This wave can be taken as an array of samples taken at
intervals
NB: A discrete-time
signal is undefined
for non-integer
values of n … thus
we cannot have for
n= 2.3 or 4.5…or
10.5
5
Discrete Time signals-4b
A Continuous Time signal converted to a discrete time
signal through sampling operation in Digital signal
processing system
6
Discrete Time signals-5
Graphical {Lollipop Plot} of Discrete Cosine wave
7
Analog-to-Digital (A/D)
conversion -1a
pulse code modulation (PCM)
has 3 processes
1. Sampling
2. Quantization
3. Binary encoding
Analog-to-Digital (A/D)
conversion -1b- Sampling
In sampling theory: The theorem developed by
Harry Nyquist and published in his 1928 paper entitled "Certain
Topics in Telegraph Transmission Theory."The Nyquist
theorem”
If the highest frequency in the signal is B
(hertz), the signal can be reconstructed
from its samples if it is sampled at a rate
not less than 2B samples per second.
fNyquist = 2fMax Where,
fNyquist = Nyquist frequency
fMax = The max frequency that appears in the
signal
Nyquist theorem forms the basis for pulse code
modulation (PCM) and most of loseless compression
Analog-to-Digital (A/D)
conversion -1c –sampling
Two important sampling aspects of the A/D Convertor are its
sampling rate and resolution.
Sampling Rate/Frequency -Fs
Sampling Rate (samples per second) or Frequency (Hertz )
𝟏
fs = 𝑻
fs = Sample Rate/Frequency
T = Period of the sample or the time it takes
before sampling again
Analog-to-Digital (A/D)
conversion -1d - sampling
resolution. The resolution of the ADC is the number of
bits it uses to digitize the input samples. For an n bit
ADC the number of discrete digital levels that can be
produced is 2n
For Example , a 12 bit digitizer can resolve 212 or 4096
levels. Thus 12 bit converter, it has a resolution of 212
- 1 or 4095
let’s say that a sine wave with a voltage range of 5 needs to be
read. The ADC has a bit size of 12-bit. .. N (Total level
size of ADC) will be 4096
Step Size = 5V/4096 =You will find that the step size will
be around 0.00122V (or 1.22mV).
Analog-to-Digital (A/D)
conversion -1e- sampling
the digital system will be able to tell when the voltage
changes on an accuracy of 1.22mV.
If the ADC was a very small bit length, let’s say only 2
bits, then the accuracy would reduce to only 1.25V,
which is very poor as it will only be able to tell the
system of four voltage levels (0V, 1.25V, 2.5V, 3.75V
and 5V).
Analog-to-Digital (A/D)
conversion -1f-sampling
Table below shows common bit length and their number of
levels. It also shows what the step size would be for a 5V
reference. You can see how accurate it gets as the bit length
increases.
Analog-to-Digital (A/D)
conversion -1g-sampling
The dynamic range of an A/D Convertor is the ratio of the
biggest signal it can handle to the smallest signal it can resolve
expressed in decibels dB
calculated as DR= 6.021*N + 1.763 dB where N= is the
number of bits i.e 12 bit DR= 74dB
What is the dynamic range for A/D Convertor of bit size
8?
Analog-to-Digital (A/D)
conversion -1h-sampling
If the sampling rate is slow and the frequency of the signal is
high, the A/D Convertor will not be able to reconstruct the
original analog signal which will cause the system to read
incorrect data (Aliasing). A good example is shown in Figure
below.
Aliasing means that when a digital image/signal is
reconstructed, it differs greatly from the original image/signal
caused from sampling.
An example of how aliasing happens. (Source: Tony R. Kuphaldt - Lessons in
Electric Circuits)
Analog-to-Digital (A/D)
conversion -1i-sampling
Always a good idea to add an anti-aliasing filter (low-
pass filter) before the A/D conversion and sampling
begins, as it can prevent unexpected high frequencies to
make it to the system.
The low pass filter eliminates the high frequency
components present in the input analog signal to ensure
that the input signal to sampler is free from the
unwanted frequency components.This is done to avoid
aliasing of the message signal.
A low-pass filter (LPF) is a filter that passes signals with a
frequency lower than a selected cutoff frequency and attenuates
signals with frequencies higher than the cut off frequency
To transmit a message in continuous-time signal, we
only need to transmit its samples.
Note that the sample values are still not digital as they
can have any values in the infinite range.
Exercise on sampling -1
A complex low-pass signal has a
bandwidth of 200 kHz. What is the
minimum sampling rate for this signal?
Solution
The bandwidth of a low-pass signal is between 0 and f,
where f is the maximum frequency in the signal.
Therefore, we can sample this signal at 2 times the
highest frequency (200 kHz). The sampling rate is
therefore 400,000 samples per second.
Exercise on sampling -2
A complex bandpass signal has a
bandwidth of 200 kHz. What is the
minimum sampling rate for this signal?
Solution
We cannot find the minimum sampling rate in this case
because we do not know where the bandwidth starts or
ends. We do not know the maximum frequency in the
signal.
Analog-to-Digital (A/D)
conversion -2a-Quantization
pulse code modulation has 3
processes
Sampling
Quantization
Encoding
Analog-to-Digital (A/D)
conversion -2b
The result of sampling is a series of pulses with
amplitude values between the maximum and minimum
amplitudes of the signal. The set of amplitudes can be
infinite with non-integral values between two limits
To convert an analog signal into a digital signal:
We divide the amplitudes of the signal into several
levels.
We then approximate (round off) the amplitude of
each sample to the nearest level.
This process is called quantization.
Analog-to-Digital (A/D)
conversion -2c-Quantization
Sampling results in a series of pulses of varying
amplitude values ranging between two limits: a min
and a max.
The amplitude values are infinite between the two
limits.
We need to map the infinite amplitude values onto a
finite set of known values.
This is achieved by dividing the distance between min
and max into L zones, each of height
= (max - min)/L
Analog-to-Digital (A/D)
conversion -2d-Quantization
The midpoint of each zone is assigned a
value from 0 to L-1 (resulting in L values)
Each sample falling in a zone is then
approximated to the value of the midpoint.
Analog-to-Digital (A/D)
conversion -2e-Quantization
Assume we have a voltage signal with
amplitutes Vmin=-20V and Vmax=+20V.
We want to use L=8 quantization levels.
Zone width = (20 - -20)/8 = 5
The 8 zones are: -20 to -15, -15 to -10, -10
to -5, -5 to 0, 0 to +5, +5 to +10, +10 to
+15, +15 to +20
The midpoints are: -17.5, -12.5, -7.5, -2.5,
2.5, 7.5, 12.5, 17.5
Analog-to-Digital (A/D)
conversion -2f-Quantization
Assigning Codes to Zones
Each zone is then assigned a binary code.
The number of bits required to encode the zones, or
the number of bits per sample as it is commonly
referred to, is obtained as follows:
nb = log2 L
Given our example, nb = 3
The 8 zone (or level) codes are therefore: 000, 001,
010, 011, 100, 101, 110, and 111
Assigning codes to zones:
000 will refer to zone -20 to -15
001 to zone -15 to -10, etc
Quantization and encoding of a sampled signal
Analog-to-Digital (A/D)
conversion -
This scheme of transmitting data by
digitizing and then using pulse
codes to transmit the digitized data
is known as Pulse-Code Modulation
(PCM).
Quantization Error
When a signal is quantized, we introduce an
error - the coded signal is an approximation
of the actual amplitude value.
The difference between actual and coded
value (midpoint) is referred to as the
quantization error.
The more zones, the smaller which results
in smaller errors.
BUT, the more zones the more bits required
to encode the samples -> higher bit rate
Quantization error and Noise !
Quantization Error and
SNQR
Signals with lower amplitude values will suffer more
from quantization error as the error range: /2, is fixed
for all signal levels.
Non linear quantization is used to alleviate this
problem. Goal is to keep SNQR fixed for all sample
values.
Two approaches:
The quantization levels follow a logarithmic curve.
Smaller ’s at lower amplitudes and larger ’s at
higher amplitudes.
Companding: The sample values are compressed at
the sender into logarithmic zones, and then
expanded at the receiver. The zones are fixed in
height.
Bit rate and bandwidth
requirements of PCM
The bit rate of a PCM signal can be calculated
form the number of bits per sample x the
sampling rate
Bit rate = nb x fs
A digitized signal will always need more
bandwidth than the original analog signal.
Price we pay for robustness and other
features of digital transmission.
4.30
Example
We want to digitize the human voice.
What is the bit rate, assuming 8 bits per
sample?
Solution
The human voice normally contains frequencies from 0
to 4000 Hz. So the sampling rate and bit rate are
calculated as follows:
PCM Decoder
To recover an analog signal from a
digitized signal we follow the following
steps:
We use a hold circuit that holds the
amplitude value of a pulse till the next
pulse arrives.
We pass this signal through a low pass
filter with a cutoff frequency that is equal
to the highest frequency in the pre-
sampled signal.
The higher the value of L, the less
4.32
distorted a signal is recovered.
Components of a PCM decoder
Example
We have a low-pass analog signal of 4
kHz. If we send the analog signal, we
need a channel with a minimum
bandwidth of 4 kHz. If we digitize the
signal and send 8 bits per sample, we
need a channel with a minimum
bandwidth of 8 × 4 kHz = 32 kHz.
Block diagram of A/D
conversion
Original Sampled Quantized Pulse
signal signal signal code
Quantizatio
Sampling Coding
n
Analog Analog Digital Digital
& & & &
Continuous Discrete Discrete Continuous
Importance of sampling theorem
.
.
.
.
ASSIGNMENT FOR READING -1
on A/D conversion
# What is the difference between discrete time signal and
digital signal
# Difference between Pulse Code Modulation (PCM) and
Delta Modulation (DM)- Compare them and Contrast
#An analog signal in the range 0 to +10 V is to be converted to an 8-
bit digital signal. What is the resolution of the conversion in volts?
What is the digital representation of an input of 6 V? What is the
representation of an input of 6.2 V? What is the error made in the
quantization of 6.2 V in absolute terms and asa percentage of the
input? As a percentage of full scale? What is the largest possible
quantization error as a percentage of full scale?
Ans. 0.0392 V; 10011001; 10011110; −0.0064 V; −0.1%;
−0.064%; 0.196%
https://global.oup.com/us/companion.websites/9780195323030/student/pdf/DataConverters.pdf )
ASSIGNMENT FOR READING -2
Differentiate between this modes of Pulse Modulation