2 Introduction Signals ADCDAC
2 Introduction Signals ADCDAC
2 Introduction Signals ADCDAC
x x(0), x(1)......., x( N 1)
T
AKA_DU_EEE3203_DSP 2
Discrete-time (D-T) Signal
D-T signals are often derived by sampling a continuous-time signal (such as
speech) with an analog- to-digital (A/D) converter.
Sampling of a continuous-time signal xa(t) at a rate of Fs = l/Ts samples per
second produces the D-T signal x(n), where
x(n) xa (nTs )
In general, a D-T signal may be complex-valued. A complex signal may be
expressed in terms of its real and imaginary parts
x(n) x1 (n) jx2 (n) Re{x(n)} j Im{x(n)}
In polar form in terms of magnitude and phase x ( n) x ( n) exp j arg{x( n)}
1 Im{ x ( n)}
o Magnitude: x(n) Re 2 {x(n)} Im 2 {x( n)} and Phase: arg{x(n)} tan
Re{x(n)}
The complex conjugate of x(n)
x (n) Re{x(n)} j Im{x(n)} x(n) exp[ j arg{z (n)}]
*
AKA_DU_EEE3203_DSP 3
Elementary D-T Signals
Unit sample sequence δ(n): is defined as
1 n 0
( n)
0 n 0
Unit step sequence u(n): is defined as
1 n 0
u ( n)
0 n 0
Ramp sequence r(n): is defined as
n n 0
r ( n) nu[n]
0 n 0
Properties of elementary signals:
(i ) [n] [n] (ii ) x[n] [n] x[0] [n] (iii ) x[n] [n k ] x[k ] [n k ]
(iv) [n] u[n] u[n 1] (v) u[n] [n k ]
k 0
(vi ) x[n] x(k ) [n k ]
k
AKA_DU_EEE3203_DSP 4
Presentation of D-T Signals
Graphical presentation: Functional presentation:
1 for n 1
2 for n 2
x[n]
3 for n 3, 4
0 elsewhere
AKA_DU_EEE3203_DSP 5
Deterministic and Random D-T signals
Deterministic signals
o Values of such D-T signals are completely specified for any given integer n
o Present, past and future values of the signals are known precisely
Random signals
o Can take random values for any given integer
o Examples: Output of a noise generator, speech signal
AKA_DU_EEE3203_DSP 6
Even and Odd D-T signals
A D-T signal x(n) is even signal if x( n) x(n) for all n
AKA_DU_EEE3203_DSP 7
Periodic and Non-periodic signals
x(n) is periodic with period N if x(n N ) x(n) for all n
o N is a positive integer
o Fundamental Period: Smallest N for which above equations hold.
Fundamental period, N = 4
Ifx(n N ) x(n) for all n , x(n) is nonperiodic
2 2
Let x ( n) cos n N 6 (integer ) Note:
3 3 N
x(n) is a periodic signal with fundamental period 6
AKA_DU_EEE3203_DSP 8
Periodic and Non-periodic signals
j n 2 2
Let x(n) e 4
N 8 (integer ) Note:
4 N
Thus, x(n) is periodic with fundamental period 8
N 2 N 1 N 2 N 1 2 1 N 2
n N
Thus, x(n) is a power signal (Its energy is infinite)
x(n) = (- 0.5)nu(n)
n 2 1 4
E x(n) 0.5 0.25
2 n
n n 0 n 0 1 0.25 3
Thus, x(n) is a energy signal (Its power is zero)
x(n) = x(n) =
2ej3n x ( n ) 2 e j 3n
2 e j 3n
2
2 4(2 N 1)
N N
1 1
P lim x(n) lim 4
2
2
N 2 N 1 N 2 N 1 2N 1
n N n N
Folding / Reversal: Involves flipping the signal x(n) with respect to the index n.
AKA_DU_EEE3203_DSP 13
Manipulation of signals: Index manipulation
Time scaling: Time scaled version of x(n) is defined by y (n) x(kn)
o where k is an integer
o If k > 1, y(n) is the compressed (down-sampled) version of x(n)
o If 0 < k < 1, y(n) is the expanded (up-sampled) version of x(n)
AKA_DU_EEE3203_DSP 16
Concept of frequency in Continuous & Discrete-time Signals
Discrete-time sinusoidal signals: A discrete-time sinusoidal signal can be
expressed as
x(n) A cos( n )
Here, n is a integer variable, called the sample number
A = amplitude of the sinusoid
ω = frequency in radians/sample = 2πf, f = frequency in cycles/sample (Hertz)
θ = phase in radians
In terms of f (i.e., ω = 2πf), x(n) becomes
x(n) A cos(2 fn )
AKA_DU_EEE3203_DSP 17
Identical Discrete-time Signals
Discrete-time sinusoidal signals: Let us consider the sinusoid
x(n) cos(0 n )
Now, cos (0 2 ) n cos(0 n 2 n ) cos(0 n )
In general, the sinusoidal sequences
xk (n) cos(k n ), k 0,1, 2...
where
k 0 2 k , 0
AKA_DU_EEE3203_DSP 18
Analog-to-Digital conversion
Most of the real-world signals (e.g., speech, biomedical, seismic, radar etc.)
are analog in nature.
Analog-to-digital conversion To process analog signals by digital means
o To process analog signals by DSP, It is necessary to convert them into digital form
o This is done by converting them to a sequence of numbers having finite precision
o The procedure is called analog-to-digital (A/D) conversion
A/D conversion is a three-step process
AKA_DU_EEE3203_DSP 19
Analog-to-Digital conversion
A/D conversion involves three steps
Sampling:
o This is conversion of Continuous-Time signal into Discrete-Time signal by taking ‘samples’
at discrete-time instant.
o If xa(t) is the input to the sampler, the output is xa(nT) =x(n), where T is the sampling
interval.
Quantization:
oThis is the conversion of Discrete-Time continuous-valued signal into a Discrete-Time
Discrete-valued (Digital) signal
o The value of each signal sample is presented by a value from a finite set of possible values
o The difference between the unquantized sample x(n) and the quantized output xq(n) is
called the quantization error
Coding:
o In this process, each discrete value xq(n) is represented by a b-bit binary sequence
AKA_DU_EEE3203_DSP 20
Analog-to-Digital conversion
Three-steps in A/D conversion
AKA_DU_EEE3203_DSP 21
Sampling of analog signals
Uniform sampling of an analog signal xa(t) is described by
xa (t ) xa (nT ) x(n), n
o x(n) is the discrete-time signal obtained by sampling xa(t) every T second, T = sampling period
1
o Sampling frequency (Hz) or sampling rate (samples/second): Fs
n T
o For periodic sampling (T is constant): t nT
F s
AKA_DU_EEE3203_DSP 24
Sampling theorem
If
o The highest frequency component of an analog signal xa (t ) is Fmax B , and
o The signal is sampled at Fs 2 Fmax 2 B
Then
o The signal xa (t ) can be exactly recovered from its sample values using the
interpolation function
sin 2 Bt
g (t )
2 Bt
And n
n
o The signal xa (t ) can be expressed as: xa (t ) xa F g t F
n s s
n
Where xa xa (nT ) x(n) are the samples of xa (t )
Fs
AKA_DU_EEE3203_DSP 25
Nyquist Rate (FN = 2Fmax = 2B)
Thus, Nyquist rate FN is the minimum sampling rate required to avoid aliasing
AKA_DU_EEE3203_DSP 26
What happens when (Fs < FN)
Aliasing occurs due to under-sampling
Aliasing: Aliasing is an effect that causes different signals to become
indistinguishable (or alias of one another) when sampled using sampling rate
less than Nyquist rate FN.
Two C-T signals in the lower figures are alias to each other.
AKA_DU_EEE3203_DSP 27
Why Fs > FN is practically used?
Consider the signal xa (t ) 10sin 300 t , sampled at sampling rate of FN = 300
o Note that the frequency F of xa(t) is 150 Hz, i.e., Fs = FN
o Sampling of xa(t) gives x(n), i.e.,
n 300
x(n) xa (nT ) xa 10sin n 10sin( n) 0
Fs 300
o Here the samples of the signal are taken at its zero-crossing point which misses
the signal completely.
What to do?
o The signal can be offset in phase by some amount (θ). Thus,
10sin( n ) 10(sin n cos cos n sin ) 10sin cos n (1) n10sin
o If θ ≠ 0 or π, the samples of the signal taken at FN are not all zero.
¤ However, it is not possible to obtain the correct amplitude of the signal when θ is unknown
o An simple remedy to avoid the troublesome is to sample the analog signal at a rate higher
that FN.
AKA_DU_EEE3203_DSP 28
Sampling of signals: Math Problems
Example-1:Consider the analog signal xa (t ) 3cos100 t
(a) Determine the minimum sampling rate to avoid aliasing.
xa (t ) A cos(2 Ft ) , F = 50 Hz, so, FN 2 F 100 Hz
(b) If the signal is sampled at Fs = 200 Hz, determine the discrete-time signal obtained after
sampling n 100
x(n) xa (nT ) xa 3cos n cos n
Fs 200 2
(c) If the signal is sampled at Fs = 75 Hz, Find the discrete-time signal obtained after sampling
n 100 4 2 2
x(n) xa (nT ) xa 3cos n 3cos n cos 2 n 3cos n
Fs 75 3 3 3
(d) Determine the frequency and the signal of the sinusoid that yields samples identical to those
obtained in part (c)
For part (c): Fs = 75 Hz, f = 1/3, F of the sinusoid = Fs ×f = 25 Hz, Sinusoid, ya (t ) 3cos 50 t
(e) Comments on the results obtained in part (c) and (d)
Comment: For the sampling rate Fs = 75 Hz, F =50 Hz is an alias of F = 25 Hz
AKA_DU_EEE3203_DSP 29
Sampling of signals: Math Problems
Example-2:Consider the analog signal xa (t ) 3cos 2000 t 5sin 6000 t 10cos12000 t
(a) What is the Nyquist rate for this signal?
F1 1000 Hz , F2 3000 Hz , F3 6000 Hz , Fmax 6000 Hz , FN 2 Fmax 12000 Hz
(b) If the signal is sampled at Fs = 500 Hz, determine the D-T signal obtained after sampling.
1 3 6 1 2 1
x(n) 3cos 2 n 5sin 2 n 10cos 2 n 3cos 2 n 5sin 2 1 n 10cos 2 1 n
5 5 5 5 5 5
1 2 1 1 2 1
3cos 2 n 5sin 2 n 10cos 2 n 3cos 2 n 5sin 2 n 10cos 2 n
5 5 5 5 5 5
1 2
13cos 2 n 5sin 2 n
5 5
(c) What will be the C-T signal ya(t) constructed from x(n) using ideal interpolation
Solution: Since only the frequency components at 1 kHz and 2 kHz are present in the sampled
signal, the analog signal that can be recovered is
ya (t ) 13cos 2000 t 5sin 4000 t
AKA_DU_EEE3203_DSP 30
Quantization of continuous-valued signals
Quantization:
oThis is the conversion of Discrete-Time continuous-valued signal into a Discrete-Time
Discrete-valued (Digital) signal
o The value of each signal sample x(n) is presented by a quantized value xq(n) from a finite
set of possible values
¤ Dynamic Range: If x max and xmin are maximum and minimum value of x(n), then
xmax xmin x fs is called the dynamic range or full-scale value of A/D conversion
¤ Quantization level (L): The number of values allowed in the digital signal
¤ Quantization step /Resolution (∆): Distance between two successive quantization
levels x xmin xmax xmin Here, b is the number of bits
max
L 1 2b used in coding process
¤ Quantization error eq (n) : Difference between the quantized value xq(n) and the
actual value x(n)
eq (n) xq (n) x(n)
sampled signal
eq (n)
quantized signal
2 2
AKA_DU_EEE3203_DSP 31
Signal-to-Quantization noise Ratio (SQNR)
When sampling rate Fs satisfies the sampling theorem, quantization is the only
error in A/D conversion process.
Thus, quantization error can be evaluated by quantizing the analog signal xa(t)
instead of the D-T signal x(n) = xa(nT).
o signal xa(t) is almost linear between
the quantization levels.
o Quantization error: eq (n) xq (n) x(n)
o Let denotes the time that xa(t)
stays within the quantization levels.
o The mean-square
error power Pq is
1 1
Pq
2 2
e (t ) dt e (t )dt
2 0
q q
o since q 2 t, t
e ( t )
1 2 2 2 2
2
Pq t dt 3 t dt
0 2 4 0 12
AKA_DU_EEE3203_DSP 32
Signal-to-Quantization noise Ratio (SQNR)
o If the quantization has b bit accuracy
and quantization covers the entire
range of 2A, the step 2 A . Hence
2b
2 2
A /3 2
A
Pq 2b
12 2 3 22b
o If xa(t) is a sinusoidal signal, its
average power is
Tp
1 A2
A cos 0t dt
2
Px
Tp 0 2
o The quality of the output of the A/D
converter is usually measured by SQNR
2
P A SQNR increases approximately 6 dB for
3
SQNR x 2 2 22b every bit added to the world-length.
Pq A 2
3 2 2b
SQNR increases approximately 6 dB for
SQNR(dB) 10log10 ( SQNR) each doubling of the quantization level.
1.76 6.02b
AKA_DU_EEE3203_DSP 33
Analog-to-Digital conversion
When sampling rate Fs satisfies the sampling theorem, quantization is the only
error in A/D conversion process.
AKA_DU_EEE3203_DSP 34
Coding of quantized signals
The coding process in A/D converter assigns a unique binary number to each
quantized level
For L level conversion, at least L (L = 2b) different binary numbers are needed,
where b is the number of bits in the worldlength.
Thus, b = log2L
AKA_DU_EEE3203_DSP 35
Digital-to-Analog (D/A) conversion
D/A converter is used to convert a digital signal into an analog signal.
The task of a D/A converter is to interpolate between samples
o The sampling theorem specifies the optimum interpolation for a bandlimited signal.
o However, this type of interpolation is too complicated
o From a practical viewpoint, the simplest D/A converter is the zero-order hold (ZOH) shown
in Fig.(a).
(a) (b)
o ZOH simply holds constant value of one sample until the next one is received
o Additional improvement can be obtained by using linear interpolation as shown in Fig. (b)
AKA_DU_EEE3203_DSP 36