Homework 3
Homework 3
Objectives
This practice is intended to enable a good understanding of the sampling concept,
applied for the voice signal in telephony. The rules that have to be considered when
sampling the voice signal in order to allow the reconstruction of the original signal from
samples are explained. The original, sampled and reconstructed signals are analyzed both
in time and frequency domain, in order to evaluate the quality of the reconstructed signal.
The effects of aliasing errors and of interference on the reconstructed signal are studied.
The Feedback 58-001 USB system together with the TDM/PCM principles work board
are used for the practical study of sampling. The signals can be observed both using the
virtual instruments in the Discovery IMS environment and using a physical oscilloscope.
(LPF) restore the continuity of the signal in the 2 domains offering at the output an analog
signal. The sampling and its inverse operation (LPF for reconstruction) are discussed in
this chapter.
26 Sampling of the voice signal for telephony – 3
Sampling
The sampling is a process through which an analog signal, continuous in the time
domain, is represented by a series of discrete values (the samples of the signal). The
samples are taken at equally spaced moments in time by closing/opening a switch (as
shown in Fig. 3.2). The sampling process is a basic operation for any application of
storage or transmission of analog signals in discrete/digital format.
The periodical opening/closing of the sampling switch can be implemented by
controlling the switch actions through a periodical signal containing rectangular pulses.
The result at the output of the sampling circuit is a series of periodical pulses, having the
amplitudes modulated by the input analog signal, as shown in Fig. 3.3.
Using a mathematical approach, the sampling process can be seen as a product
between the analog input signal and the pulse train signal. The circuit in Fig. 3.2 is similar
to the simple balanced AMDSB-SC modulator from Fig. 1.6.a), therefore the sampling
process can also be seen as a pulse amplitude modulation (PAM) process.
While for AM the signal which controls the switch has a duty cycle of 50% (it is
either a sine or clock signal), for sampling the pulses in the control signal usually have a
duty cycle (much) lower than 50%. The sampling circuit actually copies the input signal
to the output when the switch is closed (when the pulse is active) and gives 0 at the output
in the rest of the time. Given the objective for digital transmission – to convert each
sample to a numerical value – it is desirable not to have significant variations in the level
of the input signal while the sampling switch is closed. The usage of narrow pulse widths
reduces the time window in which the input signal is copied at the output resulting in
limited variations of the signal level during this short time interval.
A periodical rectangular signal can be written using the Fourier series expansion as:
x t a0 an cos 2 nf s t (3.1)
n 1
Equation (3.1) suggests that the rectangular signal x t – with pulse frequency
fs – is obtained by adding an infinity of cosine waves (with frequencies at integer
pulses(t)
analog(t) sampled(t)
analog
(input) t
sampling
pulses
t
PAM
(output) t
Fig. 3.3. Time representation of the signals involved in the sampling process
f a
multiples of the fundamental frequency, s , and different amplitudes, n ) to a DC
a a
component, 0. The amplitudes n of the cosine waves can be calculated using the
equation [rs1]:
2
an Asin n d (3.2)
n
In equation (3.2), A represents the amplitude of the pulses in the rectangular signal and
d is the duty cycle of the pulses. Given that the sine function crosses 0 at each integer
t
T=1/fs
...
0 fs 2fs 3fs 4fs 5fs f
Fig. 3.4. Time and spectral representations of the sampling pulse-train signal
-fmax 0 fmax f
0 fs 2fs 3f s f
0 fmax fs 2fs 3f s f
fs - fmax fs + fmax
3.1 – Theoretical background 29
Fig. 3.5. Spectra of the analog signal (top), sampling pulses (middle) and sampled signal (bottom)
to restore the original analog signal from its samples. The sampling theorem (also known
as the Nyquist theorem or the Shannon sampling theroem) [rs1] establishes the rule for
the proper choice of the sampling frequency.
The sampling theorem:
f
A bandlimited analog signal, with the highest frequency max , is uniquely
determined by its samples and can be reconstructed from them using an ideal low-pass
f
filter, if the sampling frequency, s , is higher than the double of the maximum frequency
in the spectrum of the original analog signal:
fs 2 fmax. (3.3)
In order to reject the high frequency side-lobes and keep only the copy of the original
f
spectrum, the cut-off frequency of the reconstruction low-pass filter, c, must fulfill the
following criterion:
0 fc f
0 fmax f
Fig. 3.6. Reconstruction of the analog signal from its samples – spectral representations
Given that f f
s 2 max , a good choice for the cut-off frequency of the ideal
30 Sampling of the voice signal for telephony – 3
LPF is half the value of the sampling frequency. However, in practical applications ideal
LPFs are not available. The real LPFs have a non ideal frequency response characteristic.
Therefore a guard frequency band must be ensured between the spectrum of the original
f
signal (which extends to the right up to max f) and the closest higher frequency side-lobe
(which extends to the left up to fs fmax ). For practical aplications, it is recommended to
choose the sampling frequency slightly higher than twice the maximum frequency in the
spectrum of the original signal in order to allow the non-ideal filter to separate the useful
components from the higher frequency replicas:
-fmax 0 fmax f
fs < 2fmax
0 fs 2fs 3fs f
aliasing
voice) can also be considered a form of distortion as it only exists in the presence of the
signal.
Fig. 3.8. Block diagram of the system for the study of basic sampling
33
3.2 – Experimental models
For the study of sampling of the voice signal for telephony, the Discovery IMS
provides 4 practical application models: Basic sampling, Aliasing errors, Interference
and Spectrum analysis.
Basic sampling model
The model used for the study of basic sampling, presented in Fig. 3.8, consists
of a sampling block and a low-pass reconstruction filter. The sampling block takes 2
input signals: the signal to sample (from the oscillator Osc 1) and a sampling clock.
The frequency and amplitude of the sine wave produced by the oscillator Osc 1
can be adjusted from the tuning knobs shown in Fig. 3.8. The 2 knobs for frequency
adjustment (‘Low’ and ‘High’) allow the user to set frequency values in the range 200
Hz – 12 kHz. The frequency meter below the Osc 1 block displays the current value of
the frequency of the sine wave produced by the oscillator Osc 1. The 2 knobs for
amplitude setting (‘Output Coarse’ and ‘Fine’) allow amplitudes of the sine wave to be
varied in the range 0 – 2.1 V.
The frequency of the sampling pulses is fixed at the standard sampling rate for
the telephony voice – 8 kHz. The only parameter that can be adjusted for the sampling
pulses is the duty cycle – adjustable through an active button in the block diagram –
Select Sample Time. The available values for the duty cycle are 1/2, 1/4 and 1/8.
The low-pass filter at the output of the block diagram reconstructs the signal
from samples and has no adjustable parameters.
The virtual instrument (oscilloscope) can be connected to any of the following
test points:
TP1 – input signal, TP5 – sampling pulses,
TP7 – sampled signal, TP8 – reconstructed signal.
The signals can also be observed using a physical oscilloscope at the test points with the
same numbers, on the physical workboard. Given that the virtual instruments in the
Discovery IMS are not very precise – especially for measuring amplitudes – it is
recommended to use the physical oscilloscope where precision measurements are
required.
Aliasing errors model
The model used for the study of aliasing errors, presented in Fig. 3.9, is similar
to that used for the basic sampling principles, with the only noticeable difference that the
duty cycle of the sampling pulses can no longer be adjusted (it is set to the default value
of 1/2). The frequency and amplitude of the input signal can still be adjusted from the
tuning knobs on the workboard. The available test points are the same as in the case of
the basic sampling model.
Interference model
The model used for the study of the effects of interferences, presented in Fig.
3.10, keeps the main elements from the model for the study of basic sampling and adds
a source of interference which inserts a disturbing signal between the sampling block
34 Sampling of the voice signal for telephony – 3
and the reconstruction low-pass filter. A second frequency meter is connected at the
output of the system (TP8).
Fig. 3.9. Block diagram of the system for the study of aliasing errors
Fig. 3.10. Block diagram of the system for the study of the effect of interference
35
Fig. 3.11. Block diagram of the spectrum analysis model
3.3 – Practice and exercises
A new test point is available: TP4 – where the interference signal can be viewed.
In this model the signal visible at TP7 is a sum between the sampled signal and the
interference. The interference is produced by another oscillator on the workboard (Osc
4) and its amplitude can be adjusted from the knob ‘Output Osc4/Itf’ between 1 and 2 V.
Spectrum analysis model
The spectrum analysis model, presented in Fig. 3.11, adds some improvements
to the model used for the study of aliasing errors. The main improvement is the
availability of a spectrum analyzer as a virtual instrument (the virtual instrument can be
switched between oscilloscope and spectrum analyzer). An additional frequency meter
is connected to the output of the system. The available test points and adjustable settings
are the same as in the case of the aliasing errors model.
3. For each of the following frequencies of the input signal, measure and write down
the amplitude of the reconstructed signal:
fIN [kHz] 0.3 0.8 1 2 2.4 2.5 2.7 3 3.2 3.4 3.8
AOUT [V] 2 2 2 1,6 1.6 1,6 1,2 0,8 0,4 0,2 0,1
Draw the characteristic of the amplitude of the reconstructed signal with respect to
the frequency of the input signal. Explain the variation of the amplitude values.
4. Set the frequency of the input signal to 1 kHz. Measure the amplitude of the
reconstructed signal for each of the available values of the duty cycle for the
sampling pulses. Compare the measured values with the amplitude of the input
signal. Explain the differences.
-duty cycle affects the amplitudes…………………………………………………
5. Measure the gap between consecutive samples (TP7) for each of the available values
of the duty cycle. What usage can be made of these gaps?
-daca ele sunt destul de mari cee ace putem face e sa adaugam un semnal si putem
combina un semnal cu celalalt
36 Sampling of the voice signal for telephony – 3
Run the aliasing errors model.
6. Set the amplitude of the input signal to 2 V. For each of the following frequencies
of the input signal, measure and write down the values of the amplitude and
frequency of the output signal:
fIN 1 2 2.5 3 3.5 4 4.5 5 5.5 6 7
[kHz]
fOUT 1 0,2 2,5 3.03 3,05 3,05 3,05 5 2,5
[kHz] 0,2 3,03
AOUT 0,75 0,70 0,65 0,25 0,2 0,1 0,1 0,5
[V] 0,7 0,65 0,25
Based on the measured values draw the fOUT fIN characteristic. Explain the
A
variations. What about the amplitude ( OUT ) variations?
Run the Interference model
7. Set the amplitude of the interference (Osc 4) to minimum. Observe the reconstructed
signal at the output, while slowly increasing the amplitude of interference (up to the
maximum value). Is the reconstructed signal a good approximation of the input or is
it influenced by the interference? Why?
Run the spectrum analysis model. Set the virtual instrument to spectrum
analyzer.
8. For each of the following values of the frequency of the input signal use the spectrum
analyzer to view the signals at TP1, TP7 and TP8: 2 kHz, 3 kHz, 4kHz, 5 kHz, 6
kHz. Write down the significant frequency components in each case and specify for
the components with frequencies lower than 4 kHz if they represent the useful signal
or aliasing components.
Questions:
1) Which is the standard sampling rate for the telephony voice? For what
reasons was this value chosen?
The standard sampling rate for telephony voice is 8kHz or 8000 samples per
second. This value was chosen for several reasons: bandwidth limitation,
voice frequency range, compatibility, and cost-effectiveness. Overall, the
8kHz sampling rate for telephony voice is a well-established standard that
meets the requirements of voice transmission while also being practical and
cost-effective.
2) How does the duty cycle of the sampling pulses influence the outcome of
the sampling and reconstruction process? Which of the available duty cycles
should be preferred in a telephony application? Why?
3) Above which value of the input frequency the output frequency does no
longer match that at the input?
37
4) Where is likely for the telephone signal to encounter cross-talk?
Cross-talk can occur at any point in the telephone network where multiple
signals are present in close proximity to each other. To minimize cross-talk,
telephone companies use various technique such as proper cable shielding,
twisted pair wiring, and signal filtering.
References:
[rs1] Oppenheim, A; Willsky, A; Nawab, H, Signals and Systems 2nd edition,
1996, Prentice-Hall.
[rs2] Feedback Instruments, Teknikit Telephony Training System – Student’s
Workbook 58-001-USB(WB), 2003, FI Ltd. Crowborough UK