Anda di halaman 1dari 56

ADVANCED DIGITAL SIGNAL

PROCESSING

ASSOC. PROF. DR. AHMAD ZURI SHA’AMERI

Digital Signal Processing Lab


Faculty of Electrical Engineering
University Teknologi Malaysia

1
INTRODUCTION

2
DSP

DSP – Digital Signal Processing

Refers to processing of signal using


digital technology.

3
WHY PROCESS SIGNAL?

• Signals are corrupted by interference due to


noise.
• Signals are distorted due to the transmission
medium.
• Recover information present in the signal.
• Perform algorithm such as compression.

4
WHY PROCESS SIGNAL?

• Signals are corrupted by interference due to


noise.
1

0.5

-0.5

-1
0 10 20 30 40 50 60 70

-2

-4
0 10 20 30 40 50 60 70

5
WHY PROCESS SIGNAL?

• Signals are distorted due to the


transmission medium.
1

0.5

-0.5

-1
0 10 20 30 40 50 60 70

0.5

-0.5

-1
0 10 20 30 40 50 60 70
6
WHY PROCESS SIGNAL?
• Signals are distorted due to the
transmission medium.
2

-2
0 10 20 30 40 50 60 70 80 90
Transmitted Signal
2

-2
0 10 20 30 40 50 60 70 80 90
Received signal without filter
2

-2 7
0 10 20 30 40 50 60 70 80 90
Received signal with zero forcing equalizer
WHY PROCESS SIGNAL?

• Recover information present in the


signal
1

0 .8

0 .6

0 .4

0 .2

-0 .2

-0 .4

-0 .6

-0 .8

-1
0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0

8
WHY PROCESS SIGNAL?

• Data compression
• Consider image of size 800 x 600 pixel
• Size of file to store image is 800 x 600
x 3 bytes = 1.44 M byte.
• If stored as JPEG format, size of file is
about 100 k byte.

9
HISTORICAL CONTRIBUTORS

10
SIGNAL PROCESSING

Signal Processing

Analog Digital
V1(t)V (t) VV2(t)(t)
1 2

i(t)

i(t)

11
SIGNAL PROCESSING

Continuous- Continuous-
time Signal time Signal
A/D DSP D/A

Discrete-time Discrete-time
signal signal

12
ADVANTAGES &
DISADVANTAGES OF DSP
•Advantages:
• Programmability.
• Stability.
• Repeatability.
• Easier implementation of adaptive algorithms.

•Disadvantage:
• Bandwidth limitation related to the processor cycle
and algorithm complexity. 13
PROCESSING METHODOLOGY

HARDWARE SOFTWARE

PC
FPGA DSP PROCESSOR
ASIC MICROPROCESSOR
MICROCONTROLLER

14
APPLICATION OF DSP

MULTIMEDIA

COMMUNICATION SPEECH

POWER BIOMEDICAL

OCEONOGRAPHIC DSP SEISMIC APPLICATION

SONAR IMAGE/VIDEO

RADAR AEROSPACE

INDUSTRIAL

15
REVIEW OF SIGNALS &
SYSTEMS

16
TYPE OF SIGNALS

Signals

Deterministic Random

Time- Time- Stationary Non-


invariant varying stationary

17
CONTINUOUS & DISCRETE-
TIME SIGNALS

πft)
x(t)=cos(2π
−∞ ≤t ≤∞

πfnTs)
x(n)=cos(2π
−∞ ≤ n≤∞

18
PERIODIC & APERIODIC
SIGNALS

x(t)=x(t+T) −∞ ≤t ≤∞

x(t) defined within -T/2<t<T/2, and



T<∞

19
EXAMPLES OF APERIODIC
SIGNALS
x(t)=1 t=0
• Impulse function
=0 elsewhere

• Step function x (t ) = 1 t≥0


=0 t≤0
• Ramp Function x (t ) = t t≥0
=0 t≤0
• Pulse function x (t ) = 1 t 0 ≤ t ≤ t1
=0 elsewhere

x(t ) = cos(2πf1t − φ ) t 0 ≤ t ≤ t1
• Pulse sinusoid
=0 elsewhere

20
ENERGY AND POWER

• Energy
T /2 T /2
E x = ∫ x(t ) x * (t )dt = ∫ | x(t ) | 2 dt
−T / 2 −T / 2

• Power

1 T/2 1 T/2 1
Px = ∫ x(t)x *(t)dt = ∫| x(t) |2 dt = Ex
T −T / 2 T −T / 2 T

where T is the duration of the signal


21
SYSTEMS

• A system operates on a signal to produce an output.

System Impulse
Input Output
Response
x(t) y(t)
h(t)

22
CAUSALITY, STABILITY &
LINEARITY
• Causality
h(t)≠0 t≥0
=0 t<0

• Stability

∫ | h ( t ) | dt < ∞
−∞

• Linearity

T [ x0 (t )] + T [ x1 (t )] = T [ x0 (t ) + x1 (t )] x0(t) & x1(t) are 2 different inputs

y (t ) = S [T [ x (t )]] = T [ S [ x(t )]] S[ ] and T[ ] are linear transformations


23
CONVOLUTION

• Many naturally occurring phenomena can be modeled as a


convolution process.
• Definition of convolution:


y(t)=h(t)*x(t) y (t ) = ∫ h ( λ ) x (t − λ ) d λ
−∞


y(t)=x(t)*h(t) y (t ) = ∫ x ( λ ) h (t − λ ) d λ
−∞

24
SPECTRUM REPRESENTATION
OF SIGNALS
• Fourier series pair

∞ 1 T0 / 2
x(t ) = ∑ ck exp(j 2πkf0t ) ck = ∫ x(t) exp(− j2πkf0t)dt
T0 −T0 / 2
k =−∞
• x(t) periodic continuous-time • ck aperiodic discrete-frequency

• Fourier transform pair

∞ ∞

x(t) = ∫ X ( f ) exp(j 2πft)df X(f)= ∫ x (t ) exp( − j 2πft ) dt


−∞ −∞

• x(t) aperiodic continuous-time • X(f) aperiodic continuous-frequency


25
FOURIER TRANSFORM
EXAMPLE
• Given a signal x(t) as defined

x ( t ) = cos( 2π f 1 t ) -T/2<t<T/2
=0 elsewhere

26
FOURIER TRANSFORM
EXAMPLE
By performing Fourier transform

T sin(π ( f1 − f )T) T sin(π ( f1 + f )T)


X( f ) = +
2 π( f1 − f )T 2 π ( f1 + f )T

As T→ ∞

X(f) = ½ δ(f-f1)+½ δ(f+f1)

27
CONVOLUTION & FOURIER
TRANSFORM

• If the input-output relationship is a convolution, then the relationship can be


expressed as multiplication in the frequency domain.

x(t) h(t) y(t)

y(t) = h(t) * x(t)


Fourier Transform

Y(f) = H(f) . X(f)


Inverse Fourier Transform
Y(f) y(t) 28
DIFFERENTIAL EQUATIONS

• Many physical phenomena can be defined as differential equation

d2 d
2
y ( t ) + a (1) y (t ) + a ( 2 ) y (t ) = x (t )
dt dt

where y(t) is the output and x(t) is the input. The Laplace transform is
one way of solving the relationship between y(t) and x(t).

29
LAPLACE TRANSFORM

• The Laplace transform originated from the Fourier transform.


• Definition:


X ( s ) = ∫ x ( t ) e − st dt
−∞

σ + j 2πf
1
x(t) = ∫ X (s)est ds
2πj σ − j 2πf

where s is a complex variable that is defined as s=σ+jw.

30
DIFFERENTIAL EQUATION
SOLUTIONS
• Taking the Laplace transform results in

s 2Y (s) + a(1)sY (s) + a(2)Y (s) = X (s)

Y (s) 1
H (s) = = 2
X ( s ) s + a (1) s + a ( 2 )

• The transfer function H(s) defines the relationship between the input and
output in terms of the Laplace transform.

• The system impulse response h(t) can be obtained from H(s) by taking the
inverse Laplace transform.

31
TRANSFER FUNCTION

• A transfer function can be expressed as


N
N
b(0) s + b(1) s N −1
+ b(2) s N −2
+ ...... + b( N )
∑ b(n) s ( N − n )
n =0
H ( s) = =
s N + a (1) s N −1 + a(2) s N −2 + ...... + a( N ) N
∑ a (n) s ( N − n )
n =0

when defined in terms of its roots

N
(s + β ( n ) )
H (s) =
(s + β ( 0 ) )(s + β (1) )....... (s + β ( N ) ) = n∏= 0
(s + α ( 0 ) )(s + α (1) )....... (s + α ( N ) ) N (s + α ( n ) )

n=0

• Roots in the numerator are known as the zeros and in the denominator as
the poles.
32
S-PLANE

• All the possible values of the transfer function lies in the s-plane.
jω jω

4
4

σ
σ

Real poles and zeros Complex poles and zeros

• From the s-plane we can assess the stability, system impulse response and
frequency response.
33
INVERSE LAPLACE TRANSFORM
Given that
Y(s) 1 1
H(s) = = 2 =
X (s) s + a(1)s + a(2) (s +α(0))(s +α(1))

By taking the partial fraction expansion

1 A0 A1
H ( s) = = +
(s + α (0))(s + α (1)) (s + α (0)) (s + α (1))

1
Since H(s) = →h(t) = exp(−at)u(t) then
(s + a)

h (t ) = A0 exp( −α ( 0 )t ) + A1 exp( −α (1)t )

34
RELATIONSHIP BETWEEN LAPLACE
AND FOURIER TRANSFORM
• The Fourier transform can be obtained from the Laplace transform by
making the substitution s= jw= j2πf.

• A transfer function is
1
H ( s) =
(
s 2 + s + (2π100) 2 )
By making the substitution s= jw= j2πf , the Fourier transform of the
transfer function is

1 1
H( f ) = =
(− (2πf ) + j2πf + (2π100) ) (((2π100) − (2πf ) )+ j2πf )
2 2 2 2

35
RELATIONSHIP BETWEEN LAPLACE
AND FOURIER TRANSFORM
• The Fourier transform when defined in terms of the magnitude and phase is

1
H( f ) = Magnitude
((2π100) 2
− (2πf )
2 2
) + (2πf ) 2

 2πf 
φ ( f ) = − tan −1  

Phase
 (2π 100 ) − (2πf )
2 2

36
FREQUENCY RESPONSE OF
TRANSFER FUNCTION

Magnitude and phase plot of transfer function


37
DISCRETE-TIME SIGNALS

38
PERIODIC & APERIODIC
SIGNALS

• Periodic signal is

x(n)=x(n+N) -∞<n< ∞

• Non-periodic (aperiodic) signal is

x(n) defined within -N/2≤n≤N/2, and N<∞

39
EXAMPLES OF APERIODIC
SIGNALS
x(n)=1 n=0
• Impulse function
=0 elsewhere

• Step function x (n) = 1 n≥0


=0 n≤0
• Ramp Function x ( n) = n n≥0
=0 n≤0
• Pulse function x (n) = 1 n0 ≤ n ≤ n1
=0 elsewhere

x(n) = cos(2πnf1 − φ ) n0 ≤ n ≤ n1
• Pulse sinusoid
=0 elsewhere

40
ENERGY AND POWER

• Energy
N −1 N −1 2
E x = ∑ x (n) x (n) = ∑ x(n)
*

n=0 n=0

• Power

1 N −1 1 N −1 2 1
Px = ∑ x(n) x (n) = ∑ x(n) = Ex
*
N n=0 N n=0 N

where N is the duration of the signal


41
SYSTEMS

• A system operates on a signal to produce an output.

System Impulse
Input Output
Response
x(n) y(n)
h(n)

42
CAUSALITY, STABILITY &
LINEARITY
• Causality
h(n)≠0 n≥0
=0 n<0

• Stability


n = −∞
h (n ) < ∞

• Linearity

T [ x0 (n)] + T [ x1 (n)] = T [ x0 (n) + x1 (n)] x0(n) & x1(n) are 2 different inputs

y (n) = S [T [ x(n)]] = T [ S [ x (n)]] S[ ] and T[ ] are linear transformations


43
CONVOLUTION

• If h(n) is the system impulse response, then the input-output


relationship is a convolution.
•Definition of convolution:


y ( n ) = h ( n ) * x ( n ) = ∑ h (λ ) x ( n − λ )
λ = −∞


y ( n ) = x ( n ) * h ( n ) = ∑ x (λ ) h ( n − λ )
λ = −∞

44
SAMPLING

• Sampling is the process of conversion from continuous-time to


discrete-time representation.

• This is necessary if it is desired to process the signal using digital


computers.

• The discrete-time signal x(n) is obtained as a result of the product of


the continuous-time signal with a set of impulse xδ(t) with period Ts


x(n) = x(t ) xδ (t ) = ∑ x(t )δ (t − nTs )
n=−∞

45
SAMPLING

Sampling Process
46
SPECTRUM OF SAMPLED
SIGNALS

• If x(t) has a spectrum X(f), then the spectrum of a sampled signal x(n) is

 ∞ 
X (exp( j 2πf )) = FT [ x(n)] = FT [x(t ) xδ (t )] = FT  ∑ x(t )δ (t − nTs )
n=−∞ 
∞ ∞ ∞
= ∑ ∫ x(t )δ (t − nTs ) exp(− j 2πft)dt = ∑ x(n) exp(− j 2πfnTs )
n=−∞ −∞ n=−∞


= ∑ X ( f − nf s )
n = −∞

47
SPECTRUM OF SAMPLED
SIGNALS
|X(f)|

-fm fm f

|X(exp(j2πf)|

-2fs -fs -fm fm fs 2fs f

Amplitude spectra of a signal before and after sampling.


48
NYQUIST SAMPLING THEOREM

• Increasing the sampling frequency will increase the storage space and
processing time.

• Reducing the sampling frequency will result in aliasing due to the overlapping
between the desired and replicate spectrum components.

• The aliasing effect is minimized by using the Nyquist sampling theorem

f s ≥ 2 f max

49
DISCRETE-TIME FOURIER
TRANSFORM

• The discrete-time Fourier transform (DTFT) describes the frequency


representation and its inverse of the for discrete-time signals


X (exp(j 2πf )) = ∑x(n) exp(− j2πfnT )
n=−∞
s

fs / 2
1
x (n) =
fs ∫ X (e j 2πf )e j 2πfnT s df
− fs / 2

50
DIFFERENCE EQUATIONS

• Discrete-time systems are described by difference equations that can be


expressed in general form as

M M
y(n) + ∑ a(λ ) y(n − λ ) = ∑ b(λ ) x(n − λ ) (Infinite Impulse Response - IIR)
λ =1 λ =0

M
y (n) = ∑
λ
b (λ ) x (n − λ )
=0
(Finite Impulse Response - FIR)

51
SIGNAL FLOW GRAPH OF FIR

• FIR signal flow graph

z-1 z-1
x(n)

b(0) b(1) b(2)

y(n)

52
SIGNAL FLOW GRAPHS OF IIR
• Type I Realization for IIR
b(0)
x(n) y(n)
+
z-1 b(1) -a(1) z-1

z-1
z-1 b(2) -a(2)

• Type II Realization for IIR


b(0)
x(n) y(n)

-a(1) b(1)
z-1

z-1
-a(2) b(2)

53
EXAMPLES OF FIR
• Two continuous-time signals is defined as

x 0 (t ) = cos( 2π 1000t ) 0≤t ≤T


=0 elsewhere

x1 (t ) = cos(2π 2000t ) 0≤t ≤T


=0 elsewhere
• If sampled at sampling frequency 8000 Hz, the discrete-time signal is
x 0 ( n ) = cos( π n / 4 ) 0 ≤ n ≤ N −1
=0 elsewhere

x1 ( n ) = cos( π n / 2 ) 0 ≤ n ≤ N −1

=0 elsewhere
54
EXAMPLES OF FIR
• The FIR is defined as

y ( n ) = 0.0947 x ( n ) + 0.2475 x ( n − 1) + 0.3156 x ( n − 2 ) + 0.2475 x ( n − 3 ) + 0.0947 x ( n − 4 )

55
EXAMPLE OF IIR
• An IIR system is defined as

y ( n) − 2 cos( 2πf1Ts ) y ( n − 1) + y ( n − 2) = x ( n) − cos( 2πf1Ts ) x (n − 1)

• For fs=8000 Hz, it is desired to determine the output for f1=1000 and
1600 Hz if the input is an impulse function.

56

Anda mungkin juga menyukai