1
LOGO
iugaza2010.blogspot.com
melasmer@gmail.com
Signals, Systems and Signal Processing
Signal: is a function which is dependent of some variables
which are independent variables.
signal: f(x1,x2,…) , x :time,distance,temperature,……
In DSP the independent variable is number(small n)
: f(n)
System: defined as a physical device that performs an
operation on a signal.
Processed the signal: occurs when we pass the signal through
the system.
3
Basic element of DSP system
Analog Analog
A/D D/A
input signal
converter
DSP converter
output signal
4
Advantages of Digital over analog signal processing
1) Flexibility: simply changing program.
2) Amenable to full integration
3) More accuracy
4) Less sensitivity to components(R,L,C) and environment changes
5) Dynamic range
6) Easy adjustment of processor characteristic by changing coefficients(number
In analog we change value of R,L,C .
7) Easy storage in Taps,disks,…..
Disadvantages of Digital
1) Increase complexity (A/D,D/A)
2) It has certain limitations due to A/D (fs=2fo for no aliasing)
3) Power dissipation.
5
Classification of Signals:
(1) Mono channel versus Multichannel
multichannel generated by multisource
Ex: Electrocardiograms(ECG)
(2) One dimensional versus multidimensional
If the signal is a function of one independent variable then it is
one-dimensional signal otherwise it is multidimensional.
Ex: - Any picture is 2-dim signal, f(x,y)
- Black and white TV picture is a 3-dim signal, f(x,y,t)
- for color TV :the signal is 3-dim (x,y,t) and 3-channel (R,G,B)
Ir(x,y,t)
I(x,y,t)= Ig(x,y,t)
Ib(x,y,t)
6
(3) Real valued or comples value signal
S1(t)=A sin πt real signal
S2(t)=A e(jπt) complex signal
(4) Continuous time versus discrete time signal
(a) CT + CV analog
(b) DT + CV discrete
(c) DT + DV digital
(5) Deterministic versus random
deterministic signal// can be described by mathematical equation.
7
The concept of frequency in CT and DT signals
Continuous-time sinusoidal signal
x (t ) A cos(t )
A:amplitude , θ:phase
Ω:analog frequency in rad
1
Ω=2πF , F= , T:period
T
Discrete-time sinusoidal signal
x (n ) A cos(wn ) x (t ) x(n)
n:sampler number , w=2πf w
1 F f
f= , N:period
N
T N 8
For Continuous-time sinusoidal signal:
1) xa(t) always periodic.
2) Continuous-time sinusoidal signals with different frequencies
are themselves distinct.
3) Increasing the frequency F results in an increase in the rate
of oscillation of the signal.
9
(1) Periodic of discrete-sinusoidal signal
x(n) is periodic only if its frequency in Hertz is rational number.
integer k
f
integer N
proof :
x (n ) A cos(wn ) ................. (1)
x (n N ) A cos(w (n N ) ) A cos(wn wN )
A cos(wn 2 fN ) ................. (2)
for: (1)=(2)
2 fN 2 k k= 1, 2,......
k
f=
N
10
Note: analog sinusoidal signal always periodic.
Determine which of the following sinusoids are periodic and compute
their fundamental period:
(a) cos(0.01πn)
0.01 1 k
w 0.01 2 f f ( rational )
2 200 N
periodic with period N=200
1
0.5
-0.5
-1
0 50 100 150 200 250 300 350 400
11
(b) cos(30πn/105)
30 30 1 k
w 2 f f (rational )
105 2 (105) 7 N
periodic with period N=7
1
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 5 10 15 20 25 30
12
(c) sin(3n)
3
w 3 2 f f (not rational)
2
non periodic
1
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 50 100 150 200 250 300
13
x(n)=cos(πn/6) cos(πn/3)
1
cos(x ) cos( y ) cos(x y ) cos(x y )
2
n n 1 n n n n 1 3 n n
x (n ) cos( ) cos( ) cos( ) cos( ) cos( ) cos( )
3 6 2 3 6 3 6 2 6 6
3 n 3 3 1
cos( ) w 2 f f = ( rational, N1 =4)
6 6 12 4
n 1
cos( ) w 2 f f ( rational, N 2 =12)
6 6 12
x(n) periodic with period=LCM(N1 , N 2 ) LCM(4,12) 12
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
14
-1
0 10 20 30 40 50 60
Determine which of the following sinusoids are periodic and compute
their fundamental period:
(a) x(t)=3cos(5t+π/6)
analog sinusoidal signal always periodic
5 1 2
5 2 F F T ( peiod ) 1.256
2 F 5
3
-1
-2
-3
0 0.5 1 1.5 2 2.5 3
15
(2) Discrete time sinusoid whose radian frequencies are
separated by integer multiples of 2π are identical
proof :
x 1 (n ) A cos(w 1n ) .................. (1)
x 2 (n ) A cos(w 2 n )
w 2 w 1 2 k
x 2 (n ) A cos((w 1 2 k )n ) A cos(w 1n 2 kn )
=A cos(w 1n ) ....................(2)
(1)=(2)
w w o 2 k
w o 2 f
1 1
f
2 2
for example:
x(n)=cos(w o n )
16
w=0 w=30
1 1
0.5 0
0 -1
-20 -10 0 10 20 -20 -10 0 10 20
w=60 w=90
1 1
0 0
-1 -1
-20 -10 0 10 20 -20 -10 0 10 20
w=120 w=150
1 1
0 0
-1 -1
-20 -10 0 10 20 -20 -10 0 10 20
w=180
1
0
-1
-20 -10 0 10 20
Note:
The period of the sinusoidal decreases as the frequency increases.
The rate of oscillation increase as the frequency increase.
The sequences of any two sinusoidal with frequencies in the range :
-π ≤ w ≤ π or -0.5 ≤ f ≤ 0.5 are different(unique). 17
w=360 w=390
1 1
0.5 0
0 -1
-20 -10 0 10 20 -20 -10 0 10 20
w=420 w=450
1 1
0 0
-1 -1
-20 -10 0 10 20 -20 -10 0 10 20
w=480 w=510
1 1
0 0
-1 -1
-20 -10 0 10 20 -20 -10 0 10 20
w=540
1
0
-1
-20 -10 0 10 20
Sequence that result from a sinusoid with a frequency |w| > π is identical to a
sequence obtained from a sinusoidal with frequency : -π ≤ w ≤ π
for continuous-time sinusoids result in distinct signals for Ω or F in the range
-∞< F <∞ or -∞< Ω <∞
w=360 aliased with w=0 , w=30 aliased with w=390 ………… 18
The frequency range for discrete-time sinusoids is finite with duration 2π
: choose,
0 ≤ w ≤ 2π (0 ≤ f ≤ 1) or -π ≤ w ≤ π (-0.5 ≤ f ≤ 0.5) fundamental range
19
20
21
x a (t ) A cos(t ) x (nT s ) A cos(nT s ) x (n )
x a (t ) x (nT s ) x (n )
n
t nT s
Fs
1
x (n ) A cos(nT s ) A cos(2 Fn )
Fs
F
A cos(2 n ) A cos(2 nf )
Fs
F
f F *T s w *T s
Fs
digital frequency=analog frequency*sampling time
for continuous: ( F , )
0.5 f 0.5
for discrete sinsuoidal signals:
w
the infinit analog frequency is mapping into finite digital frequency. 22
1 1
f
2 2
Fs Fs
F
2 2
Fs
Fmax
2
Fs 2Fmax N yquits rate
Fs 2F aliasing
Fs
F fold =
2
To determine the mapping of any (alias) frequency above Fs/2
into the equivalent frequency below Fs/2 ,we can use Fs/2 to
reflect or fold the alias frequency to the fundamental range.
23
Continuous time signal Discrete time signal
= 2 F w = 2 f
rad f
F
, *T s rad cycles
Hz Fs
sec sample sample
F f * Fs ,
w
Ts
F 0.5 f 0.5
24
Consider the following two analog sinusoidal signal signal:
x1(t)=cos(2π10t) , x2(t)=cos(2π50t) , Fs=40 Hz
Find the corresponding discrete sequence:
Fs =40 Hz , F1 =10 Hz , F2 =50 Hz
1
x 1(n ) x a (nT s ) cos(2 10n ) cos( n )
40 2
1
x 2(n ) x a (nT s ) cos(2 50n ) cos(5 n ) cos(5 n 2 k )
40 2 2
= cos(5 n 2 ) cos( n )
2 2
x 1(n ) x 2(n )
but : x 1(t ) x 2(t )
comment : The frequency F2 = 50 Hz is an alias of F1 = 10 Hz at Fs = 40 Hz
Fs F 20
F fold = 20 Hz , f 0.5Hz
2 Fs 40
25
Note: All sinusoidal with frequency
Fk =Fo + k Fs ,k= 1, 2,.........
Faliased =Fbase + k Fs
f aliased =f base + k
Leads a unique signal if sampled at Fs
Ex:
If Fo=10 Hz find the alias frequencies of Fo if Fs=40 Hz
F1=10+1(40)=50 Hz
F2=10+2(40)=90Hz
F3=10+3(40)=130Hz
…… Fs F 20
…… F fold = 20 Hz , f 0.5Hz
2 Fs 40 26
F1=10+1(40)=50 Hz
f=F/Fs=50/40=1.25 , fbase=1.25-1=0.25Hz
f=F/Fs=10/40=0.25Hz
Fk =Fo + k Fs ,k= 1, 2,. ........
Faliased =Fbase + k Fs
f aliased =fbase + k 27
1 1 F sampling freq.
t=nTs = n F s analog freq.=
F Fs n #of samples
28
29
An analog signal contains frequencies up to 10 kHz
(a) What range of sampling frequencies allow
exact reconstruction of this signal from its samples?
Fs 2Fmax 2(10) 20 kHz
Fs 20 kHz
(b) If Fs=8 kHz .Examine what happens to the
frequency F1=5kHz ?
Fs
Ffold 4 kHz < 5kHz
2
or Fs 8 kHz < 2F1 10 kHz
aliasing happens
F base =F aliased kF fold 5 (1)4 1kHz 30
An analog signal contains frequencies up to 100 Hz
(a) What is the Nyquist rate of this signal ?
Fs 2Fmax 2(100) 200 Hz
(b) If Fs=250 sample/sec ,what is the highest frequency that
can be represented uniquely at this sampling.
Fs
Ffold 125 Hz , f fold=0.5
2
31
An analog signal x(t)=sin(480*pi*t)+3sin(720*pi*t)
is sampled 600 times per second
(a) What is the Nyquist sampling rate?
480 720 4
F1 240 Hz , F2 360 Hz 3
2 2 2
Fs ,N 2Fmax 2(360) 720 Hz 0
-1
(b) Determine the folding frequency. -2
-3
Fs 600
300 Hz
-4
Ffold 0 500 1000 1500 2000
2 2
(c) Find x(n) .
x (n ) x a (nT s ) sin(480 nT s ) 3sin(720 nT s )
1 1
= sin(480 n ) 3sin(720 n ) = sin(0.8 n ) 3sin(1.2 n )
600 600
= sin(0.8 n ) 3sin(0.8 n ) sin(0.8 n ) 3sin(0.8 n )
= 2sin(0.8 n ) 32
(d) If x(n) is pass through an ideal D/A converter ,
what is the reconstructed signal y(t).
t
y (t ) x (tFs ) x ( ) 2sin(0.8 t 600) 2sin(480 t )
Ts
33
Sampling Theorem
Sampling x(t) by multiplying x(t) by train of impulses
x(n)=x(t)P(t)
34
1
X s (f) = X (f nf s )
T n
1 1 1 1 1
....... X (f 2f s ) X (f f s ) X (f s ) X (f f s ) X (f 2f s ) .......
T T T T T
35
Anti-aliasing Filter
36
Suppose that an analog signal is given as:
X(t)=5cos(2*pi*1000t)
and is sampled at the rate of 8000 Hz
(a) Sketch the spectrum for the original signal
1
cos(2 f ot ) (f f o ) (f f o )
2
5cos(2 1000 t ) 2.5 (f 1000) (f 1000)
(b) Sketch the spectrum for the sampled signal from 0 to 20 kHz
1
X s (f) = X (f nf s )
T n
1 1 1 1 1
....... X (f 2f s ) X (f f s ) X (f s ) X (f f s ) X (f 2f s ) ....... 37
T T T T T
Notice that the spectrum of the sampled signal contains the images of the original
spectrum that the images repeat at multiplies of the sampling frequency
fs,2fs,3fs,….. (8 kHz,16 kHz,24 kHz,…
All images must be removed since they convey no additional information.
38
Quantization
- Sampling converts the analogue signal into discrete value of samples.
- We need to encode each sample value in order to store it in b bits
memory location.
Before quantization After quantization
39
t
x(t)=(0.9) , Fs=1 sample/sec
x(n)=(0.9)n
If b=4 bits L=16 levels( choose L=11)
{0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1} , step=0.1
0000
0001
0010
0011
x max x min 1 0
0011 Q. step= 0.1
0100 L 1 11 1
0101
0101
0110
0110 40
x max x min
Quantization step =
L 1
Quantization error : eq (n ) x q (n ) x (n )
error
2 2
0.1 0.1
error
2 2
41
Quantization of sinusoidal signal
Average power of sinusoidal signal :
2 2 2
1 1 A
0 S (t )dt 2 0 dt
2 2
Psig ( A sin wt )
2 2
Average power of quantized signal :
e q (t ) t for ( T t T )
2T
2
T T
1 1
Pq (e q (t )) dt ( t ) dt
2
2T T 2T T 2T
1
2 T 2
T dt 12
2
t
2T 2T
42
Signal to quantization noise ratio
the signal toquantization noise ratio & #13;
A2
Psig 2
SQNR
Pq 2
2
12
12
x max x min A (A ) 2A
L L L
A2
SQNR
Psig
2 3 2
L
Pq 2A 2
2
2
12 L 43
X(t)= 3cos(600*pi*t) + 2cos(1800*pi*t)
Operated at 10,000 bits/sec , quantized into 1024 levels
(a) What is the sampling frequency and folding frequency?
log1024
L 2 1024 log 2 1024 log 2 2
b b
b 10 bits/sample
log 2
sample sample bit 1
Fs ( )(10, 000) 1000 sample/sec
sec bit sec 10
Fs
Ffold 500 Hz
2
(b) What is the Nyquist rate .
600 1800
F1 300 Hz , F2 900 Hz
2 2
Fs ,N 2Fmax 2(900) 1800 Hz
44
(c) Find x(n) .
1 1
x (n ) x a (nT s ) 3cos(600 n ) 2 cos(1800 n )
1000 1000
3cos(0.6 n ) 2 cos(1.8 n )
3cos(0.6 n ) 2 cos(0.2 n )
3cos(0.6 n ) 2 cos(0.2 n )
(d) What is the resolution.
x max x min 5 (5) 10
L 1 1024 1 1023
45
X(n)=6.35 cos(pi*n/10) is quantized with a resolution=0.02
How many bits are required in the A/D converter ?
x max x min 6.35 (6.35)
0.02 L 636 2b
L 1 L 1
log10 636
b 9.3 10bits
log10 2
46
Determine the bit rate and the resolution in the sampling of a seismic
signal with dynamic range of 1 volt if the sampling rate is
Fs=20 samples/s and we use an 8-bit A/D converter ? What is the
maximum frequency that can be present in the resulting digital seismic
signal ?
bit bit sample
(a) bit rate= b * Fs (8)(20) 160 bits/sec
sec sample sec
x max x min 1 1
(b) 8
L 1 2 1 255
20
(c) Ffold = =10 Hz
2
47
Homework#1
Deadline: Tue: 08/03/2011
48