Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
1
3
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.
4
Basic element of DSP system
A/D
converterDSP
Analog
input signal
Analog
output signalD/A
converter
5
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(numbers)
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.
6
(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)
Classification of Signals:
Ir(x,y,t)
I(x,y,t)= Ig(x,y,t)
Ib(x,y,t)
7
(3) Real valued or comples value signalS1(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 randomdeterministic signal// can be described by mathematical equation.
8
Continuous-time sinusoidal signal
( ) cos( )
A:amplitude , θ:phase
Ω:analog frequency in rad
1Ω=2πF , F= , T:period
x t A t
T
Discrete-time sinusoidal signal
( ) cos( )
n:sampler number , w=2πf
1f= , N:period
x n A wn
N
( ) x(n)
w
F f
T N
x t
The concept of frequency in CT and DT signals
9
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.
10
(1) Periodic of discrete-sinusoidal signal
x(n) is periodic only if its frequency in Hertz is rational number.
integer k
integer Nf
:
( ) cos( ) ................. (1)
( ) cos( ( ) ) cos( )
cos( 2 ) ................. (2)
for: (1)=(2)
2 2 k= 1, 2,......
kf=
N
proof
x n A wn
x n N A w n N A wn wN
A wn fN
fN k
Note: analog sinusoidal signal always periodic.
11
Determine which of the following sinusoids are periodic and compute
their fundamental period:
(a) cos(0.01πn)
0.01 10.01 2 ( )
2 200
periodic with period N=200
kw f f rational
N
0 50 100 150 200 250 300 350 400-1
-0.5
0
0.5
1
12
(b) cos(30πn/105)
30 30 12 ( )
105 2 (105) 7
periodic with period N=7
kw f f rational
N
0 5 10 15 20 25 30-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
13
(c) sin(3n)
33 2 (not rational)
2
periodic
w f f
non
0 50 100 150 200 250 300-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
14
x(n)=cos(πn/6) cos(πn/3)
1
2
1cos( )cos( ) cos( ) cos( )
2
1 1 3( ) cos( )cos( ) cos( ) cos( ) cos( ) cos( )
3 6 2 3 6 3 6 2 6 6
3 3 3 1cos( ) 2 = ( rational, N =4)
6 6 12 4
1cos( ) 2 ( rational, N =12
6 6 12
x y x y x y
n n n n n n n nx n
nw f f
nw f f
1 2
)
x(n) periodic with period=LCM(N , N ) LCM(4,12) 12
0 10 20 30 40 50 60-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
15
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 25 2 ( ) 1.256
2 5F F T peiod
F
0 0.5 1 1.5 2 2.5 3-3
-2
-1
0
1
2
3
16
(2) Discrete time sinusoid whose radian frequencies are
separated by integer multiples of 2π are identical
1 1
2 2
2 1
2 1 1
1
:
( ) cos( ) .................. (1)
( ) cos( )
2
( ) cos(( 2 ) ) cos( 2 )
= cos( ) ....................(2)
(1)=(2)
2
2
1
2
o
o
proof
x n A w n
x n A w n
w w k
x n A w k n A w n kn
A w n
w w k
w f
1
2
example:
x(n)=cos( )o
f
for
w n
17
-20 -10 0 10 200
0.5
1w=0
-20 -10 0 10 20-1
0
1w=30
-20 -10 0 10 20-1
0
1w=60
-20 -10 0 10 20-1
0
1w=90
-20 -10 0 10 20-1
0
1w=120
-20 -10 0 10 20-1
0
1w=150
-20 -10 0 10 20-1
0
1w=180
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).
18
-20 -10 0 10 200
0.5
1w=360
-20 -10 0 10 20-1
0
1w=390
-20 -10 0 10 20-1
0
1w=420
-20 -10 0 10 20-1
0
1w=450
-20 -10 0 10 20-1
0
1w=480
-20 -10 0 10 20-1
0
1w=510
-20 -10 0 10 20-1
0
1w=540
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 …………
19
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
20
21
22
( ) cos( ) ( ) cos( ) ( )
( ) ( ) ( )
1( ) cos( ) cos(2 )
cos(2 ) cos(2 )
frequency=analog frequency*sampling time
for on
*
c
*
a s s
a s
s
s
s
s
s
s s
s
x t A t x nT A nT x n
x t x nT x n
x n A nT
nt nT
F
Ff
A FnF
FA
F T w T
n A nfF
dig a
F
it l
tinuous: ( , )
0.5 0.5for discrete sinsuoidal signals:
F
f
w
the infinit analog frequency is mapping into finite digital frequency.
23
max
max
fold
2 rate
2 alias
1 1
2 2
2 2
ing
F
2
=2
s
s
s
s
s
s
F F N
f
F FF
FF
yquits
F F
F
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.
24
signal signal
= 2 F = 2 f
rad Hz
sec
Continuous time Discrete time
w
rad cycles
sample sample
0.5 0.5
w
F f
, * s
s
Ff T
F
* ,s
s
F f FT
25
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:
s 1 2F =40 Hz , F =10 Hz , F =50 Hz
11( ) ( ) cos(2 10 )
40
12( ) ( ) cos(2 50 ) cos(5 ) cos(5 2 )
40 2 2
= co
cos( )2
coss(5 2 )2
1(
( )2
) 2( )
: 1( ) 2( )
a s
a s
n
n
x n x nT n
x n x nT n n n k
n
x n x n
but x t x t
comment : The frequen2 1 s
cy F = 50 Hz is an alias of F = 10 Hz at F = 40 Hz
foldF = 20 Hz , 20
2
0.540s
sF Ff Hz
F
26
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
……
……
k o s
aliased base s
aliased base
F =F + k F ,k= 1, 2,.........
F =F + k F
f =f + k
foldF = 20 Hz , 20
2
0.540s
sF Ff Hz
F
Note: All sinusoidal with frequency
27
f=F/Fs=50/40=1.25 , fbase=1.25-1=0.25Hz
f=F/Fs=10/40=0.25Hz
F1=10+1(40)=50 Hz
k o s
aliased base s
aliased base
F =F + k F ,k= 1, 2,. ........
F =F + k F
f =f + k
28
ss
s
F1 1 sampling freq.t=nT = n F analog freq.=
F F n #of samples
29
30
An analog signal contains frequencies up to 10 kHz
s
base fold
s 1
F4 kHz < 5kHz
2
or F 8 kHz < 2F 10 kHz
aliasing happe
F =F kF 5 (1)4 1
ns
al
fo
iase
ld
d kHz
F
(a) What range of sampling frequencies allow
exact reconstruction of this signal from its samples?
max2 2(10) 20 kHz
20 kHz
s
s
F F
F
(b) If Fs=8 kHz .Examine what happens to the
frequency F1=5kHz ?
31
An analog signal contains frequencies up to 100 Hz
sfold
F125 Hz , f =0.5
2foldF
(a) What is the Nyquist rate of this signal ?
max2 2(100) 200 HzsF F
(b) If Fs=250 sample/sec ,what is the highest frequency that
can be represented uniquely at this sampling.
32
An analog signal x(t)=sin(480*pi*t)+3sin(720*pi*t)
is sampled 600 times per second
sF 600300 Hz
2 2foldF
(a) What is the Nyquist sampling rate?
1 2
, max
480 720240 Hz , 360 Hz
2 2
2 2(360) 720 Hzs N
F F
F F
(b) Determine the folding frequency.
(c) Find x(n) .
( ) ( ) sin(480 ) 3sin(720 )
1 1 =sin(480 ) 3sin(720 ) =sin(0.8 ) 3sin(1.2 )
600 600
=sin(0.8 ) 3sin( 0.8 ) sin(0.8 ) 3sin(0.8 )
a s s sx n x nT nT nT
n n n n
n n n n
= 2sin(0.8 )n
0 500 1000 1500 2000-4
-3
-2
-1
0
1
2
3
4
33
(d) If x(n) is pass through an ideal D/A converter ,
what is the reconstructed signal y(t).
( ) ( ) ( ) 2sin(0.8 600) 2sin(480 )s
s
ty t x tF x t t
T
34
Sampling Theorem
Sampling x(t) by multiplying x(t) by train of impulses
x(n)=x(t)P(t)
35
1 ( )
1 1 1 1 1....... ( 2 ) ( ) ( ) ( ) ( 2 ) .......
s s
n
s s s s s
X (f) = X f nfT
X f f X f f X f X f f X f fT T T T T
36
Anti-aliasing Filter
37
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
(b) Sketch the spectrum for the sampled signal from 0 to 20 kHz
1cos(2 ) ( ) ( )
2
5cos(2 1000 ) 2.5 ( 1000) ( 1000)
o o of t f f f f
t f f
1( )
1 1 1 1 1....... ( 2 ) ( ) ( ) ( ) ( 2 ) .......
s s
n
s s s s s
X (f) = X f nfT
X f f X f f X f X f f X f fT T T T T
38
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.
39
- 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.
Quantization
After quantizationBefore quantization
40
x(t)=(0.9)t , 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
0011
0100
0101
0101
0110
0110
max min 1 0Q. step= 0.1
1 11 1
x x
L
41
Q ua ntization error : ( ) ( ) ( )q qe n x n x n
2 2error
max minQuantization step =1
x x
L
0.1 0.1
2 2error
42
Quantization of sinusoidal signal
2 2
2 2
0 0
2 2
2
2
2
1 1P ( ) ( sin )
2 2
( ) for ( T t T )2
1 1P ( ( )) ( )
2 2
1
2 2
2
2
sig
q
T T
q q
T T
T
T
S t dt A wt dt
e t tT
e t dt t dtT T T
t dtT T
A
Average power of sinusoidal signal :
Average power of quantized signal :
2
12
43
Signal to quantization noise ratio
2
12
2
max min
2
2
2
2
2
the signal toquantization noise ratio & #13;
P
P
( )
2
12
3
2
P
1
2
P 2
2
2
sig
q
sig
q
A
SQNR
x x A A A
L L L
A
SQNRA
L
L
44
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?
2 2
s
sfold
log10242 1024 log 1024 log 2 10 bits/sample
log 2
1F ( )(10,000) 1000 sample/sec
sec sec 10
FF 500 Hz
2
b bL b
sample sample bit
bit
(b) What is the Nyquist rate .
1 2
, max
600 1800300 Hz , 900 Hz
2 2
2 2(900) 1800 Hzs N
F F
F F
45
(c) Find x(n) .
1 1( ) ( ) 3cos(600 ) 2cos(1800 )
1000 1000
3cos(0.6 ) 2cos(1.8 )
3cos(0.6 ) 2cos( 0.2 )
3cos(0.6 ) 2cos(0.2 )
a sx n x nT n n
n n
n n
n n
(d) What is the resolution.
max min 5 ( 5) 10
1 1024 1 1023
x x
L
46
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 ?
max min
10
10
6.35 ( 6.35)0.02 636 2
1 1
log 6369.3 10
log 2
bx xL
L L
b bits
47
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 ?
max min
8
fold
(a) bit rate= * (8)(20) 160 bits/secsec sec
1 1(b)
1 2 1 255
20(c) F = =10 Hz
2
s
bit bit sampleb F
sample
x x
L
48
Homework#1 Deadline: Tue: 08/03/2011