Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

Digital Signal

Processing
Course Code: ECEL213
Course Instructor: Dr Pramila
Outline

• Introduction to Digital Signal Processing

• Understanding details of discrete time signals

• Understanding details of discrete time systems

• Examples of Discrete time system


Introduction to Signal Processing
Signal: Application of Digital Signal Processing
• Speech processing
Examples of Signals • Signal transmission on telephone channels
• Signal- Speech, ECG, EEG • Image processing and transmission
• Image

Image Signal-pattern of variation in


brightness across the image

 Signal x(t) is a dependent variable which is function of time.


 Time is independent variable
Introduction to Signal Processing
Types of Signals:
Continuous-time signals: voltage, current, temperature, speed, . . .

Discrete-time signals: daily minimum/maximum temperature, lap intervals in races, sampled continuous signals, . . .

Continuous-time signal Discrete-time signal

 Signal x(t) is a dependent variable which is function of


Note: t- for continuous time signal and
time.
n for discrete time signal
 Time is independent variable
Representation of Discrete Time Signals
 Graphical Representation

 Functional Representation

 Tabular Representation

 Sequence Representation

1. Graphical Representation
Example: Unit step function

2. Functional Representation

x(n) = -5; n=-2


-2; n=-1
0; n=0
Representation of Discrete Time Signals
• Tabular Representation

n -2 -1 0 1 2 3
x(n) -4 -3 0 4 2 3

• Sequence Representation

For finite duration: For Infinite duration:


x(n) = {-4, -3, 0, 4, 2, 3} x(n) = {. . . -4, -3, 0, 4, 2, 3, . . . }

Arrow denotes the value at n=0


If no arrow- Starting value is value at n=0
Standard Discrete Time Signals
• Digital Impulse Signal or Unit Sample Sequence:

Mathematically it is defined as:

• Shifted unit impulse function δ(n-K) is defined as:


• δ(n-K) = 1 for n=K

Example: δ(n-2)
Delayed signal of δ(n)
2 n
Standard Discrete Time Signals

• Unit Step Signal:

:
Mathematically
it is defined u(n)
as = 1 for n>=0
0 for n<0

Graphical Representation
• Shifted unit step signal u(n-K) is defined as:
• u(n-K) = 1 for n=K

Example: u(n-2)

Delayed signal of u(n)


Standard Discrete Time Signals
• Unit Ramp Signal:

Mathematically it is defined as:


r(n) = n for n>=0
0 for n<0
Graphical Representation??

• Shifted ramp signal r(n-K) is defined as:


• r(n-K) = n for n=K

Example: r(n-2)

Delayed signal of r(n)


Standard Discrete Time Signals

• Exponential Signal: (Real exponential sequence)

Mathematically it is defined as:

𝒙 𝒏 = 𝑪α𝒏 for n>=0


When a>1; x[n]-Increasing exponential signal
0 for n<0

Where C and α are in general complex numbers (for real exponential sequence C and α are real)
𝒙 𝒏 = 𝑪𝒆β𝒏 Where α = 𝒆β

When 0<a<1; x[n]- Decreasing exponential signal


Discrete Time Sinusoidal Signals
Mathematically it is defined as:

x(n)=Asin(ω0 𝑛 + θ)

Real Sinusoidal sequence


Graphical

For θ=0

Periodicity of Discrete-time signal


𝟐𝝅
𝑵= ∗𝐦
ω𝟎
Complex Exponential Signals
Mathematically it is defined as:

x[n] = 𝑎𝑛 𝑒 𝑗(ω0𝑛+θ)

x[n] = 𝑎𝑛 [𝑐𝑜𝑠(ω0 𝑛 + θ)+jsin (ω0 𝑛 + θ)]

=Re{x n }+Img{x[n]}
Complex exponential sequence (a) Real
part (b) Imaginary part (for 0<a<1)

Exponentially Increasing cosinusoidal sequence for 𝑎>1

Exponentially decreasing sinusoidal sequence for 0<a<1


Properties of Discrete Sequences

 Periodic
 Absolutely summable
 Square summable
• Energy signal
• Power signal
Examples- Energy and Power Signal

• x[n]=u[n]
• x[n]=exp(-an)u[n]
• x[n]=nu[n]
Determine signal is energy signal or power signal?
Properties of Discrete Sequences-Periodic and
Aperiodic
 Periodic

Example: 𝐱 𝐧 = 𝑒 𝑗ω0𝑛

Periodicity of Discrete-time signal


𝟐𝝅
𝑵= ∗𝐦
ω𝟎
Examples: Periodic and Aperiodic
Find: sequences given below are periodic or aperiodic. If the sequence is periodic; find the fundamental period
of each sequence.


Q1. x n = sin 𝑛
3


Q2. x n = 𝑐𝑜𝑠 𝑛
5

2π 2π
Q3. x n = sin 𝑛 + 𝑐𝑜𝑠 𝑛
3 5

Q4. x n = 𝑐𝑜𝑠 5𝑛


Q5. x n = 𝑒𝑗 4 𝑛
Classification of Discrete Sequences-
Symmetric and Asymmetric Signals
 Symmetric Signals-Even Signals
Let 𝐱 𝐧 is Discrete time signal
If 𝐱 −𝐧 = 𝐱 𝐧 for all n

Example: Cosine sequence

 Asymmetric Signals-Odd Signals


Let 𝐱 𝐧 is Discrete time signal
If 𝐱 −𝐧 = −𝐱 𝐧 for all n

Example: Sine Sequence


Q. Determine even and odd pat of the signal defined
1. x[n]=5^n
π
𝑗 𝑛
2. X[n]= 2𝑒 5
Classification of Discrete Signals-Causal and
Non-causal Signals
 Causal Signals
Let 𝐱 𝐧 is Discrete time signal
If 𝐱 𝐧 = 𝟎 𝐟𝐨𝐫 𝐧 < 𝟎
𝐱 𝐧 is only defined for n>=0

Example: unit-step sequence

 Non-Causal Signals
Let 𝐱 𝐧 is Discrete time signal
If 𝐱 𝐧 defined for n<0

 Anti-Causal Signals
Basic Operation on Sequences
Scaling

Time-reversal

Time-Shifting
Time Delay
Time Advance

Addition

Multiplication
Discrete Systems
Discrete Input Discrete Discrete Output
Sequence Systems S Sequence

System Properties:

Linearity
Memory-less System/Static:
A memory-less system depends only
S is a linear system if for any pair of sequences { x1(n) } and { x2(n) }
on the current input value:
S { a · x1(n)+ b · x2(n) } = a · S { x1(n) } + b · S { x2(n) } .
Y(n) = f(x(n) )
Time-invariant system

System S is a time-invariant system if for any delay/time advance n0


{ y (n) } = S { x (n) } ⇐⇒ { y (n − d) } = S { x (n − d) } .

Causality: A causal system cannot look into the future:


y [n] = f(x( n) , x (n − 1) , x (n − 2) , . . .)
Properties of Discrete-Time Systems
Linearity
S is a linear system if for any pair of sequences { x1(n) } and { x2(n) }
S { a · x1(n)+ b · x2(n) } = a · S { x1(n) } + b · S { x2(n) } .

Example:

Determine if the systems described by the following input-output equations are linear or non-linear
𝑎 𝑦 𝑛 = 𝑛𝑥[𝑛]

𝑏 𝑦 𝑛 = 𝑥[𝑛2 ]

𝑐 𝑦 𝑛 = 𝑥2 𝑛

𝑑 𝑦 𝑛 = 𝐴𝑥 𝑛 + 𝐵

𝑒 𝑦 𝑛 = 𝑒 𝑥[𝑛]
Properties of Discrete-Time Systems
System Properties:

Time-invariant system

System S is a time-invariant system if for any delay/time advance n0


{ y (n) } = S { x (n) } ⇐⇒ { y (n − d) } = S { x (n − d) } .

Examples:
Properties of Discrete-Time Systems

Memory-less System/Static:

A memory-less system depends only on the current input value:


Y(n) = f(x(n) )

Example:
Memory-less

With Memory
Properties of Discrete-Time Systems

Causal and Non-Causal systems:

A causal system cannot look into the future:


y [n] = f(x( n) , x (n − 1) , x (n − 2) , . . .)
Properties of Discrete-Time Systems

Stable and Unstable systems:

A system is BIBO stable if and only if every bounded input produces a bounded output.

𝑥 𝑛 ≤ 𝑀 < ∞, 𝑦 𝑛 ≤𝑁<∞

If for some bounded input sequence x[n], output is unbounded; then this system is unstable.

𝑦 𝑛 = 𝑦 2 𝑛 − 1 + 𝑥[𝑛]
Examples
Examples
n
The accumulator system yn = Σ xk
k=−∞

and Back-ward difference system


y n = x n −x n−1 , are causal, linear, time-invariant system with memory,

M-point moving average system

1
M −1 x n−M +1 + ···+ xn−1 + x n The average filtering is used in stock
yn = Σ x n−k = market analysis for determining slowly
M M varying trend from data that contents
k=0
high frequency fluctuations. In this case,
and the exponential averaging system a possible approach is to average data
∞ over an interval in order to smooth out
y n = α ·x n + (1 −α) ·yn−1 = α Σ (1 −α) k ·x n−k . the fluctuations and keep only trend.
k=0
Examples
y n = x 2 (n) , y n = log2 x n
time-invariant non-linear memory-less systems

xn, n ≥ 0
yn = = x n ·u n
0, n < 0
linear but not time-invariant systems
y n = x ⌊n/4⌋
y n = x n . R e (eωjn)

y n = 1 (xn−1 + x n+1 )
2 linear time-invariant non-causal systems
9
sin(πkω)
yn = Σ x n+k · ·[0.5 + 0.5 ·cos(πk/10)]
πkω
k=−9
Interconnection of Discrete-Time Systems

(a) Cascade and (b)Parallel connection


Analysis of Discrete time Linear Time-Invariant
Systems
Concept of Convolution

The response y(n,k) of the system to the input unit sample sequence at n=k

y(n,k)= h(n,k)

If input is scaled by an amount x(k), the response y(n,k)=x(k)h(n-k)

Any arbitrary input x(n)


y 𝑛 = 𝑘=−∞ 𝑥 𝑘 ℎ(𝑛 − 𝑘)
Convolution
Example:
Impulse response of a LTI system is h(n) and x(n) is the input to the system;
Determine the response of the system

Q1.
ℎ 𝑛 = {1,2, 1, −1}

𝑥 𝑛 = {1,2, 3, 1}

Q2. ℎ 𝑛 = 𝑎𝑛 𝑢 𝑛 ; 𝑎 <1
Ans 1.
𝑥 𝑛 = 𝑢[𝑛]
Convolution Properties

For arbitrary sequences {x[n]}, {h[n]}, { y [ n ] } and scalars a, b:


 Convolution is associative
({x[n]} ∗{h[n]}) ∗{ y [ n ] } = { x[n]} ∗({h[n]} ∗{y [ n ] })
 Convolution is commutative
{ x[n]} ∗{h[n]} = {h[n]} ∗{x[n]}
 Convolution is linear
{ x[n]} ∗{a ·h[n] + b ·y [ n ] } = a ·({x[n]} ∗{h[n]}) + b ·({x[n]} ∗{ y [ n ] } )
 The impulse sequence is neutral under convolution
{ x[n]} ∗{δ n } = {δ n } ∗{ x[n]} = { x[n]}
 Sequenceshifting is equivalent to convolving with a shifted impulse
{x[n-d]} = { x[n]} ∗{δ[n-d]}
Causal Linear Time-Invariant Systems

if the output at tim e n = n0 is to depend only on the present and past inputs, then,
clearly, the impulse response of the system must satisfy the condition
Stability of Linear Time-Invariant Systems

Example: ℎ 𝑛 = 𝑎𝑛 𝑢 𝑛 ; 𝑎 <1

𝑥 𝑛 = 𝑢[𝑛]
Constant-coefficient difference equations

The Causal linear time-invariant systems of the form

N xn b0 yn
yn = b0 ·x n − Σ ak ·y n−k z −1
−a1
k=1 y n−1

z −1
−a2
Block diagram representation y n−2
of sequence operations:
x ′n z −1
−a3
xn x n + x ′n y n−3
Addition:
Multiplication xn a ax n
by constant: The a k and bm are
constant coefficients.
xn x n−1
Delay: z −1
or
xn x n−1 x n−2 x n−3
M z −1 z −1 z −1
yn = Σ bm ·x n−m b0 b1 b2 b3
m=0

yn

or the combination of both: xn b0 − a0 yn

z −1 z −1
b1 −a1
N M x n−1 y n−1
y ( n ) = Σ -ak ·yn−k + Σ bm ·x n−m
z −1 z −1
k=0 m=0 b2 −a2
x n−2 y n−2

z −1 z −1
b3 −a3
x n−3 y n−3

Direct form I
Direct form I and II implementations
xn b0 a−1 yn x n b0 yn
0 − a0

z −1 z −1 z −1
b1 −a1 −a1 b1
x n−1 y n−1

z −1 z −1 = z −1 a0=1
b2 −a2 −a2 b2
x n−2 y n−2

z −1 z −1 z −1
b3 −a3 −a3 b3
x n−3 y n−3
Direct form I Direct form II

 The block diagram representation of the constant-coefficient difference equation is called the direct form I
implementation.

 The number of delay elements can be halved by using the commutativity of convolution to swap the two
feedback loops, leading to the direct form II implementation of the same LTI system.
Fourier transform
We define the Fourier integral transform and its inverse as

F{g(t)}(f ) = G(f ) = ∫ g(t) ·e−2πjft dt
−∞

F − 1 {G( f )}(t) = g(t) = ∫ G ( f ) ·e2πjft df
−∞

Many equivalent forms of the Fourier transform are used in the literature. There is no strong consensus on whether the
forward transform uses e−2π j f t and the backwards transform e2πj f t , or vice versa. The above form uses the ordinary
frequency f , whereas some authors prefer the angular frequency ω = 2πf :


F{h(t)}(ω) = H(ω) = α ∫ h(t) · e∓ jωt dt
−∞


−1 ± jωt
F {H(ω)}(t) = h(t) = β ∫ H(ω)· e dω
−∞

This substitution introduces factors α and β such that αβ = 1/(2π). Some authors set α = 1
and β = 1/(2π), to keep the convolution theorem free of a constant prefactor; others prefer the
unitary form α = β = 1/√ 2π, in the interest of symmetry.
Properties of Fourier transform
Properties of the Fourier transform
x(t) X(f ) and y(t) Y (f )
are pairs of functions that are mapped onto each other by the Fourier
transform, then so are the following pairs.
Linearity:
ax(t) + by(t) a X ( f ) + bY (f )

Time scaling: 1 f
x(at) X
|a| a

Frequency scaling: 1 t
X(af )
|a| x a
Time shifting:
−2πjf ∆ t
x(t −∆t) X ( f ) ·e

Frequency shifting:
2πj ∆ f t
x(t) ·e X ( f −∆ f )

Parseval’s theorem (total energy):


∞ ∞
∫ |x(t)|2dt = ∫ | X ( f )|2df
−∞ −∞
Z- Transform

• Z-Transform

• Important properties
Z- Transform
• Convolution of two sequences

• Correlation of two sequences

• Multiplication of two sequences


Z- Transform
• Parseval’s Relation

• Initial Value Theorem


Properties of Z- Transform
Rational Z- Transform

Example: Pole –Zero Plot of x[n]= anu[n] for 0<=n<=M-1


Pole Location and Time-Domain Behavior for
Causal Signals

Example: x[n]= anu[n] ROC: |Z|>|a|


System Function of a Linear Time-Invariant
System

Example: y[n]= (½)y(n-1)+2x(n)


Frequency Domain Analysis of Discrete-time
Signals
Discrete-time Fourier transform
Frequency domain representation of discrete time signals-

Fourier analysis: Mathematical tool that is useful in the analysis and design of LTI systems.

Fourier Series Fourier Transform


• Only for periodic • For Non-Periodic
signals Signals
• For Power signal • For finite energy
signals

These signal representations basically involve the decomposition


of the signals in terms of sinusoidal (or complex exponential)
components. With such a decomposition, a signal is said to be (a) Analysis and
represented in the frequency domain. (b) synthesis of the white light (sun
light) using glass prisms.
Discrete-time Fourier transform
The Fourier Series for Continuous-Time Periodic Signals

A linear combination of harmonically related complex exponentials of the form:

The Dirichlet conditions are :


1. The signal x(t) has a finite number of discontinuities in
any period .
Is periodic with fundamental period Tp=1/F0 2 . The signal x(t) contains a finite number of maxima and
minima during any period .
3. The signal x(t) is absolutely integrable in any period ,
that is.
Power Density Spectrum of Periodic Signals
Power Density Spectrum of Periodic Signals

Parseval's relation for power signals


Fourier transform
The Fourier Transform for Continuous-Time Aperiodic Signals

(a) Aperiodic signal x(t) and (b) periodic signal


Xp(t) constructed by repeating x(t) with a period Tp

Thus the Fourier coefficients are samples of X(F) taken at


multiples of fo and scaled by F0 (multiplied by 1/T p).
Fourier transform
The Fourier Transform for Continuous-Time Aperiodic Signals

Example:

Dirichlet conditions

Dirichlet conditions are


sufficient but not necessary for
FT
Frequency Analysis of Discrete time signals
Frequency domain representation of discrete time signals-Discrete time Fourier
Transform

Energy Density Spectrum of Aperiodic Signals

L e t x(t) be any finite energy signal with Fourier transform X ( F ) . Its energy is

This is P a r s e v a l’s relation for aperiodic, finite


energy signals and expresses the principle of
conservation of energy in the time and frequency
domains.
Frequency Analysis of Discrete time signals
Frequency domain representation of discrete time signals-

Fourier series for Discrete-time Periodic signals:

𝑥 𝑛 + 𝑁 = 𝑥[𝑛]

𝑁−1

𝑥𝑛 = 𝑐𝑘 𝑒 𝑗2𝜋𝑘𝑛/𝑁
𝑘=0

Power Density Spectrum of Periodic signals:


Frequency Analysis of Discrete time signals
Example:

Discrete-time periodic square-wave signal


Frequency Analysis of Discrete time signals
Frequency domain representation of discrete time signals-Discrete time Fourier Transform

Fourier Transform for Discrete-time Aperiodic signals:

𝑥 𝑛 + 𝑁 ≠ 𝑥[𝑛]
frequency range for a discrete-time signal is unique over
the frequency interval of (-π, π) or, equivalently, (0, 2π)

𝑋ω = 𝑥[𝑛]𝑒 −𝑗ω𝑛 X(ω) is periodic with period 2π


𝑛=−∞

X(ω) –represents decomposition of x[n] into its


frequency components
Frequency Analysis of Discrete time signals
Fourier Transform for Discrete-time Aperiodic signals:

𝑋ω = 𝑥[𝑛]𝑒 −𝑗ω𝑛
𝑛=−∞

frequency range for a discrete-time signal is unique over


the frequency interval of (-π, π) or, equivalently, (0, 2π)

X(ω) is periodic with period 2 π


Frequency Analysis of Discrete time signals
Frequency domain representation of discrete time signals-Discrete time Fourier
Transform

Fourier Transform for Discrete-time Aperiodic signals:

Example: Determine the sequence x[n] for


Frequency Analysis of Discrete time signals
Fourier Transform for Discrete-time Aperiodic signals:

does not converge uniformly for all w. However, the sequence {X(k)}
has a finite energy Ex = wc/pi
Frequency Analysis of Discrete time signals
Frequency domain representation of discrete time signals-Discrete time Fourier Transform

Energy Density Spectrum of Aperiodic Signals 𝑥 𝑛 + 𝑁 ≠ 𝑥[𝑛] 𝑋ω = 𝑥[𝑛]𝑒 −𝑗ω𝑛


𝑛=−∞

Parseval's relation for discrete-time aperiodic


signals with finite energy
Example: Determine and sketch the energy density spectrum Sxx(w) of the signal
Example: Determine the Fourier transform and the energy density spectrum of the sequence
Frequency Analysis of Discrete time signals
A set of equally spaced (harmonically related) frequencies

compare this result with the expression for the Fourier series coefficients
for the periodic rectangular wave, we find that
Frequency domain representation of LTI-
Discrete time systems

You might also like