Académique Documents
Professionnel Documents
Culture Documents
BEF 35603
2
What is signal?
It is a description of how one parameter is related to
another parameter
Signal can be natural and man made.
Example: variation of air pressure when we speak,
daily temperature, & periodic electrical signals
generated by heart.
Signal represent information.
4
What is signal processing?
Signal processing forms the basis for enhancing,
extracting, storing or transmitting useful
information.
Two conceptual schemes: Analog to digital
converter (ADC) or Digital to analog converter
(DAC)
5
Real World Applications
6
Why Digital
Easy to analyze using computers
Efficient way of storing - CD
7
Discrete Signals
Discrete signal is a sampled signal.
May arise naturally (such as daily temperature).
8
1
-1
Continuous-time signal
-1
0 4 8 12 16 20 24 28 32
Discrete-time signal
9
The origin t = 0 corresponds to n = 0.
A marker () indicates the origin n = 0.
E.g. x[n] = {1, 2, 4, 8,}.
10
Discrete Signals
x[n] is called:
right-sided if it is zero for n < N.
causal if it is zero for n < 0.
left-sided if it is zero for n > N.
anti-causal if it is zero for n 0.
11
A discrete periodic signal repeats every N samples is
described by:
N=4
3
2
y[n] { 0, 1, 2, 3, 0 , 1, 2, 3.....}
12
Signal Measures
For nonperiodic signals, the signal energy E is a
useful measure. It is defined as:
E x[n]
n
13
Signal Measures Contd..
Measures for periodic signals are based on
averages since their signal energy is .
Average value x = average sum per period.
av
N 1
1
xav
N
x[n]
n 0
14
Signals with finite energy are called energy
signals.
Signals with finite power are called power
signals.
All periodic signals are power signals
15
Example 1.0
Find the energy in the signal
x[n] = 3( 0.5 ) n , n 0.
16
Solution
This describes a one-sided decaying exponential.
Its signal energy is
2
9
E x [n] 3(0.5)
n
2
n 0
n
9(0.25) n
n 0 1 0.25
12 J
Note that
1
n 0
n
17
Example 1.1
Periodicsignal is . Given N=4, find average value
and signal power.
Solution:
18
Operations on Discrete Signals
Common operations:
Addition y[n] x1[n] x 2[n]
Multiplication. y[n] x1[n]x 2[n]
Scaling (Attenuation/Amplification) y[ n] Ax1[ n]
Time shifting
Folding
Decimation and interpolation (time scaling)
19
Operations on Discrete Signals
Time Shifting:
This is done exactly in the same way as the time-
shifting of CT signals.
20
Folding:
The signal y[n] = x[ n ] is a folded version of x[n]
(mirror image of x[n] about the origin n = 0).
21
Example 1.2
Given x n {2, 3, 4, 5, 6, 7} . Find and sketch:
1. y [n] = x [n 3]
2. f [n] = x [n + 2]
3. g [n] = x [ n]
4. h [n] = x [ n + 1]
5. s [n] = x [ n 2 ]
6. Calculate xe[n] and xo[n]
22
Solution
y[n] = x[n-3] = { 0 , 2, 3, 4, 5, 6, 7}
f[n] = x[n+2] = {2, 3, 4, 5, 6 , 7}
g[n] = x[-n] = {7, 6, 5, 4, 3, 2}
h[n] = x[-n+1] = {7, 6, 5 , 4, 3, 2} (fold x[n], then delay by 1)
s[n] = x[-n-2] = {7, 6, 5, 4, 3, 2 } (fold x[n], then advance by 2)
23
Symmetry
If a signal x[n] is identical to its mirror image
x[-n], it is called an even symmetric signal.
24
xe [n] xe [ n] xo [n] xo [n]
x [k ] 0
k
0
25
Even and Odd Parts of Signals
Even symmetry & odd symmetry are mutually
exclusive.
Any signal x[n] may be expressed as the sum
of xe[n] & xo[n].
x[n] = xe[n] + xo[n] (a)
To find xe[n] & xo[n] from x[n], x[n] is folded &
invoked symmetry to get:
x[-n] = xe [-n] + xo [-n] = xe [n] - xo [n] (b)
26
Adding equation (a) & (b):
2 xe[n] = x[n] + x[ n]
xe[n] = 0.5x[n] + 0.5x[ n]
Subtracting equation (a) & (b):
2 xo[n] = x[n] x[ n]
xo[n] = 0.5x[n] 0.5x[ n]
If x[n] has even symmetry, xo[n] will equal to zero.
If x[n] has odd symmetry, xe[n] will equal to zero.
27
Example 1.3
Answer:
28
Decimation
Sampled at ts at a continuous time signal x(t) and
convert it into a sequence of samples x[n].
Signal y[n] = x[2n] is the compressed signal x(2t)
sampled at ts.
It contains x[0], x[2], x[4], .... (alternate samples of x[n])
y[n] can be obtained directly from x(t) (not its
compressed version) if we sample it at 2ts.
It means a twofold reduction in the sampling rate.
Decimation by a factor of N is sampling x(t) at intervals
Nts & implies N-fold reduction in the sampling rate
29
Interpolation
x[n] is x(t) sampled at intervals ts.
y[n] = x[n/2] is x(t) sampled at ts/2 & has twice
the length of x[n] with one new sample between
adjacent samples of x[n].
If expression for x[n] were known, it would be
no problem to determine new sample values.
Otherwise, the best to do is interpolate between
samples.
30
May choose each new sample value as:
zero (zero interpolation)
a constant equal to the previous sample value (step
interpolation)
average of adjacent sample values (linear
interpolation)
31
Zero interpolation is known as up-sampling &
plays an important role in practical.
32
Consider two sets of operations below:
x[n] decimate by 2 x[2n]
interpolate by 2 x[n]
34
Solution :step interpolation
{1 , 2, 6, 4, 8} decimate (n2n)
{ , 6, 8} 1
interpolate (nn/2)
{ , 1, 6, 6, 8, 8} cannot recover
1
{ , 2, 6, 4, 8} interpolate (nn/2)
1 { , 1, 2, 2, 6, 6, 4, 4, 8, 8}
decimate(n2n)
1
{ , 2, 6, 4, 8} recover original signal
1
35
If a signal x[n] is interpolated by N and then
decimated by N, the original signal x[n] will be
recovered.
If a signal x[n] is first decimated by N and then
interpolated by N, x[n] may not recovered.
If both interpolation and decimation are
required, it is better to interpolate first.
36
Fractional Delay
Fractional delays (typically half-sample) can be
implemented using interpolation & decimation.
N
x[n] by N, delay by M, then decimate by N.
37
Example 1.6
Given x[n] = {2, 4, 6 , 8}. Find the signal
y[n] = x[n 0.5] using linear interpolation
38
Solution
First interpolate by 2, delay by 1 and then decimate by 2.
Linear interpolation:
g[n] = x[n/2] = {2, 3, 4, 5, 6, 7, 8, 4}
(last sample interpolated to zero).
n 1
Delay: h[n] =x g[n 1] =
2
= {2, 3, 4, , 6, 7, 8, 4}.
5
iii. Let x[n ] {3,4, 5,6}. Find y[n]=x[2n/3] assuming
step interpolation where needed.
40
Common Discrete Signals
0, n 0
unit impulse [ n]
1, n 0
unit step 0, n 0
u[n]
1, n 0
unit ramp 0, n 0
r[n] nu[n]
n, n 0
41
Numeric sequence of a discrete signal can be
obtained from summation of combination of
impulse, ramp, and step function.
42
Example 1.7
43
Properties of the Discrete Impulse
The product of x[n] with impulse [n k] results in:
x[n][n k] = x[k][n k]
x[n] [n k ] x[k ]
n
44
Signal Representation by Impulses
r[n] k [n k ]
k 0
45
u[n] may also be expressed as the cumulative sum
of [n] & r[n] may be described as the cumulative
sum of u[n]:
n
u[n] [k ]
k
n
r[ n ] u[k ]
k
46
Example 1.9
Based on question in Example 1.7
Find
i) sum of shifted impulses
ii) Sum of steps
47
Discrete Pulse Signals
(N=3)
n 1, nN
rect
2 N 0, elsewhere
(N=4)
n
n 1 , n N
tri N
N 0, elsewhere
48
rect(n/2N) has 2N + 1 samples over
N n < N.
tri(n/N) has 2N + 1 samples over N n N,
with the end samples x[N] & x[ N] being zero
49
Example 1.10
Mathematically describe the signals below in at
least two different ways
50
Discrete Systems
Collection of hardware components, or
software routines, that operates on a discrete-
time signal sequence.
Systems are modeled as transformations or
operators that map input signals to outputs
Continuous Time y t : T x t
Discrete Time y n: T x n
T . denotes the operator or transformation that
models the effect of the system on the input
signal
51
System Classes
Classes of systems are defined by which of the following
characteristics they possess
Memory-store info about the input from the past or future value.
Linearity
Time-Invariance
Causality
Stability
Linear Time-Invariant (LTI)
These characteristics place constraints on the
corresponding system operators or transformations
52
Linear vs nonlinear system
y*(n)
T
x2(n)
+ + y(n)
T a2 x2(n) a2
T
Y 1 a1
Y 2 a2 T
+
X2(n) Y(n)=2a1nX1(n)+ 2a2nX2(n)
a2
Y(n)=Y*(n)
1a. Linear vs nonlinear system
Tutorial:
Consider the linearity of the following signal:
y[n]=x2[n]=x [n] x [n]
x(n)
y(n)
x
Ans: first step: set two different input
y1(n) = x1(n) x1(n) and y2(n) = x2(n) x2(n)
second step: combine input
x(n) = a1x1(n)+a2x2(n)
Linear vs nonlinear system
Ans:
second step: combine input
x(n) = a1x1(n)+a2x2(n)
third step: check total output
Y(n) = {a1x1(n)+a2x2(n)} {a1x1(n)+a2x2(n)}
Y(n) = a12x12 (n)+2a1a2x1(n)x2(n)+a22x22 (n)
Y*(n) = a1y1(n)+a2y2(n)
= a1x12 (n)+a2x22 (n)
Y(n) Y*(n) , Non linear system
Time-Invariant vs T-Variant
Example: y[n]=0.5(x[n]+x[n-2])
y(n) = x2(n)+2x(n)
No shifting process
Dynamic system
if the output depends on past and or future inputs
y(n) = x(n-k)+2x(n)
y(n) = x(n)+2x(n-k)
y(n) = x(n)+2x(n+k)
Stability
If input is bounded by
output is bounded by
Hence the system is stable.
Stability
Example
unstable : y(n) = y2(n-1)+x(n) where y(-1)=0
If input is
Ans:
..
T .
Then
The output is a version of the impulse response that has been shifted and
scaled by same amount as the delta function on the input.
65
output can be expressed as:
in short notation:
known as convolution
66
NOTE:
Once h[n] of a system is known then given any input
x[n], we can always compute the output sequence y[n]
h[n k] = h[ (k n)]
Reflect h[k] about the origin to obtain h[ k].
Shift the origin of the reflected sequence to k = n
OR
Shift the origin of the original sequence to k = n.
Reflect h[k n] then about the new origin
67
Analysis
Discrete time system
1. CONVOLUTION: decompose or resolve the
input signal into sum of elementary signal, will be
explained in the next chapter.
Digital Digital
input output
signal signal
69
Nyquist Filter (Anti-Aliasing filter)
limits the highest analog , choose the suitable sampling rate and
prevent aliasing (Detail in Chapter 3)
Sample Hold
convert analog to discrete signal
A/D converter
convert the analog (discrete) signal to digital that is appropriate as an
input to the digital processor
DS Processor
is a large programmable digital computer or small processor
programmed to perform the desired operations on the input signal
D/A converter
as an interface to provide the analog signal to the user
FS LPF
smooth the reconstructed signal
70
Advantage of DSP over ASP
DSP ASP
Reconfiguration the Flexible; changing the Implies a redesign, testing
system operation. program and verification of the
hardware
Accuracy Much better to control Difficult to control
because of tolerance
Signal processing Allows the implementation Difficult to perform
algorithms of more sophisticated precise mathematical
algorithm operations
Cost Cheaper Expensive
Limitations in DSP
The speed of operation of ADC and digital signal processor, especially for
extremely wide bandwidths signal, requires fast-sampling-rate ADC and fast
digital signal processors.
71
"The seeking of knowledge is obligatory for every
Muslim."
Al-Tirmidhi, Hadith 74
72