1 - Intro To DSP

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

Introduction to

Digital Signal Processing

Prof.Dr. Hakan ÇAĞLAR


OBJECTIVES:
• To understand the basic concepts and techniques for processing signals and digital signal
processing fundamentals.
• To Understand the processes of analog-to-digital and digital-to-analog conversion and relation
between continuous-time and discrete time signals and systems.
• The representation of discrete-time signals in the frequency domain, using z- transform, discrete
Fourier transforms (DFT).
• To Understand the implementation of the DFT in terms of the FFT, as well as some of its
applications (computation of convolution sums, spectral analysis).
• To learn the basic design and structure of FIR and IIR filters with desired frequency response and
design digital filters.
• Introduce a few real-world signal processing applications.
• Multiresolution signal processing techniques and Wavelet Transform & its applications
Outlines
UNIT I:
Introduction to Digital Signal Processing: Introduction to Digital Signal Processing: Discrete
Time Signals & Sequences, Linear Shift Invariant Systems, Stability, and Causality,
Realization of Digital Filters: Solution of Difference Equations Using Z-Transform, Realization
of Digital Filters - Direct, Canonic forms.

UNIT II:
Discrete Fourier Transforms: Properties of DFT. Linear Convolution of Sequences using DFT.
Computation of DFT, Circular convolution, Fast Fourier Transforms (FFT) .
Outlines
UNIT III:

IIR Digital Filters: Analog Filter Approximations - Butterworth and Chebyshev, Design of IIR Digital filters from
Analog Filters, Bilinear Transformation Method.

UNIT IV:

FIR Digital Filters: Characteristics of FIR Digital Filters. Design of FIR Filters: using Window Techniques,
Comparison of IIR & FIR filters.

UNIT V:

Multiresolution Digital Signal Processing: Introduction, Down sampling, Decimation, Up sampling,


Interpolation, Sampling Rate Conversion, Applications of Multiresolution Signal Processing, Wavelet transform &
its applications..
TEXT BOOKS
➢ Digital Signal Processing by Alan V. Oppenheim, Ronald W. Schafer
➢ Discrete Time Signal Processing – A. V. Oppenheim and R.W. Schaffer, PHI, 2009.

➢ Digital Signal Processing, Principles, Algorithms, and Applications: John G. Proakis, Dimitris G.

Manolakis, Pearson Education / PHI, 2007.


➢ Fundamentals of Digital Signal Processing – Loney Ludeman, John Wiley, 2009

REFERENCE BOOKS:
➢ Fundamentals of Digital Signal Processing using MATLAB – Robert J. Schilling, Sandra L. Harris,
Thomson, 2007.
➢ Digital Signal Processing – S.Salivahanan, A.Vallavaraj and C.Gnanapriya, TMH, 2009.
➢ Discrete Systems and Digital Signal Processing with MATLAB – Taan S. EIAli, CRC press, 2009.
➢ Digital Signal Processing - Nagoor Khani, TMG, 2012.
Course Hours & Grading
Course Hours: Wednesday 15:00 – 18:00
Thursday 12:00 – 15:00

Office Hours: Wednesday 13:30 – 15:00

Grading:

Midterm Exam: % 30

Home works / Quiz: % 20

Final Exam: % 50
OUTCOMES

On completion of the subject the student must be able to:


• Perform time, frequency and z-transform analysis on signals and systems
• Understand the inter relationship between DFT – FFT and various transforms
• Understand the significance of various filter structures and effects of rounding errors
• Design a digital filter for a given specification
• Some real world signal processing applications & solutions
• Understand the trade-off between Multiresolution DSP techniques and Wavelet Transform
• DSP application to Speech, Image & Video Processing (coding, compression, multi rate
signal analysis)
Image & Video Coding with Wavelet Transforms

Wavelet Transform Image Coding & Compression JPEG - MPEG


Image Warping

Mobile Image Processing Ageing, Warping,


Image Warping
Voice Warping
Add EMOTIONS in the voice tone: Friendly, Cheerful, Sad, Angry, Unfriendly,
Whispering, Shouting, Terrified, Excited
AR Applications

AR based make-up, e-commerce application


Image Colour Segmentation
Computer Vision

Quality Control for industry


Street view for health applications
Chat GPT & smart personnel assistance application (speech recognition integration)
Speech Recognition / Text to Speach

Voice control TV, air conditioner, smart home IoT


Biomedical Signal Processing- Radar Signal Processing
INTRODUCTION
Anything that carries some information is called a signal. A signal is defined as a single-valued
function of one or more independent variables which contain some information.

A signal is also defined as a physical quantity that varies with time, space or any other independent
variable.

A signal may be represented in time domain or frequency domain. Human speech is a familiar
example of a signal. Electric current and voltage are also examples of signals.

A signal can be a function of one or more independent variables. (time, temperature, position,
pressure, distance etc.) 1-D, 2-D, 3-D signals (Speech, Image, Video)
The actual physical structure of the system determines the exact relation between the input x (n)
and the output y (n), and specifies the output for every input. Systems may be single-input and
single-output systems or multi-input and multi-output systems.

Signal processing is a method of extracting information from the signal that depends on the type of
signal and the nature of information it carries.

Signal processing is concerned with representing signals in the mathematical terms and extracting
information by carrying out algorithmic operations on the signal.

Digital signal processing has many advantages over analog signal processing.
Digital circuits are less sensitive to changes in component values. They are also less sensitive to
variations in temperature, ageing and other external parameters.

In a digital processor, the signals and system coefficients are represented as binary words. any
accuracy by increasing or decreasing the number of bits in the binary word.

Digital processing the sharing of a single processor by time sharing. This reduces the processing cost
per signal.

Linear phase characteristics can be achieved only with digital filters. Also multirate processing is
possible only in the digital domain.

Storage of digital data is very easy. analog signals deteriorate rapidly as time progresses and cannot be
recovered in their original form.

Digital processing is more suited for processing very low frequency signals such as seismic signals.
The digital signal processor may be a large programmable digital computer or a small microprocessor
programmed to perform the desired operations on the input signal

DSP has many applications. Some of them are: Speech processing, Communication, Biomedical,
Consumer electronics, Seismology and Image processing, computer vision…
Sampling

x(nT)
x(t)

nT

T
Typical DSP applications

Communication Systems Medical Diagnostics Security


modulation/demodulation, channel magnetic-resonance and Digital steganography, digital
equalization, echo cancellation, video ultrasonic imaging, computer watermarking, biometric identification,
codec, IP-TV, VoIP tomography, ECG, EEG, MEG, surveillance systems, signals intelligence,
AED, audiology electronic warfare
Consumer Electronics Geophysics, Astronomy, Aviation, Defense Industry
perceptual coding of audio and video Finance…. radar, radio navigation, sonar, air photo,
on DVDs, speech synthesis, speech Seismology, oil exploration, satellite imaging, multispectral data
recognition, embedded systems Stock Market, Probability & processing
estimation
Music Experimental Physics Engineering
synthetic instruments, audio effects, sensor-data evaluation control systems, feature extraction
noise reduction for pattern recognition, computer vision
From Acquisition to Interpretation:

Aquire Enhancement Compress for Encode and


Digital Signal & Noise Redc. Transmisson transmit

Sender:

Transmitted De- Displayed


Decoded compressed & Analysed
codes

Recipient:
Interpreted Received
by brain by eyes

DOÇ.DR.HAKAN ÇAĞLAR 19.02.2024 26


Digital Signal Processing Concerned fields:

◦ Digital Comunication
◦ Data Compression
◦ Speech Processing and Recognition
◦ NLP, OCR, Text Analysis
◦ Digital Image & Video Processing
◦ Computer Graphichs
◦ Computer Vision
◦ Created signals (Speech generation, computer
generated music, virtual reality...)
◦ Artificial Intelligence
◦ Radar Sonar Signal Processing
◦ Biomedical Signal Processing
History of Image Processing

1920’s - Digitized newspaper picture transmitted


through submarine cable (London New York) 1960’s - Images from space probe

19.02.2024 28
History of Image/Video Processing
Augmented Reality, Virtual Reality
Combination of real and synthetic images

29
Image type Typical bpp No. of Common
colors file formats
Binary image 1 2 JBIG, PCX, GIF, TIFF
Gray-scale 8 256 JPEG, GIF, PNG, TIFF
Color image 24 16.6  106 JPEG, PNG, TIFF
Color palette image 8 256 GIF, PNG
Video image 24 16.6  106 MPEG

19.02.2024 30
Color Images:

Red Green Blue

19.02.2024 31
Digital Image Representation:

19.02.2024 32
6 bits 4 bits 2 bits
(64 gray levels) (16 gray levels) (4 gray levels)

384
256
384x
256

192
128
192x
128

96
96x
64
64

48
32
48x
32

19.02.2024 33
Light property

Visible light ((wavelength in Nanometers = 10^(-7) cm)

λ=v/f

19.02.2024 34
Catogorize by image sources:

➢ Radiation from electromagnetic spectrum


Gamma-Ray imaging X-Ray imaging
Maging in ultraviolet band Imaging in visible & infrared band
Imaging in microwave band Imaging in radio band

➢ Acoustic
➢ Ultrasonic
➢ Electronic (electronic beams used in electron microscopy)
➢ Computer (synthetic images used for modeling and visualization)

19.02.2024 35
Gamma-Ray Imaging

Nuclear Image
• (a) Bone scan
• (b) PET (Positron emission tomography) image
Astronomical Observations.
• (c) Cygnus Loop Nuclear Reaction
• (d) Gamma radiation from a reactor valve

19.02.2024 36
X-Ray Imaging

• Medical diagnostics
(a) chest X-ray (familiar)
(b) aortic angiogram
(c) head CT

• Industrial imaging
(d) Circuit board

• Astronomy
(e) Cygnus Loop

DOÇ.DR.HAKAN ÇAĞLAR 19.02.2024 37


Imaging in Ultraviolet Band:

• Lithography
• Industrial inspection
• Microscopy (fluorescence)
(a) Normal corn
(b) Smut corn

• Lasers
• Biological imaging
• Astronomical observations
(c) Cygnus Loop

19.02.2024 38
Imaging in Visible and Infrared Bands

•Astronomy
•Light microscopy
• pharmaceuticals
(a). taxol (anticancer agent)
(b). cholesterol
• Microinspection to
materials characterization
(c). Microprocessor
(d). Nickel oxide thin film
(e). Surface of audio CD
(f). Organic superconductor

DOÇ.DR.HAKAN ÇAĞLAR 19.02.2024 39


Multispectrum Satellite Images
(Remote Sensing)

LANDSAT satellite images

19.02.2024 40
Remote Sensing: weather observation and prediction

Multispectral image of
Hurricane Andrew from
satellite images in visible and
infrared bands

19.02.2024 41
Remote Sensing: Night time lights of the world
(provides a global inventory of human settlements)

19.02.2024 42
Industry: Visual Spectrum
(automated visual inspection of manufactured goods)

(a). A circuit board: missing parts


(b). Pill container: missing pills
(c). Bottles : not filled up to an acceptable level
(d). Bubbles in product : detect unacceptable air
pockets
(e). Cereal : inspection for color
and anomalies like burned flake.
(f). Lens for human eye : inspection of damaged
implants

19.02.2024 43
Law Enforcement: Visual Spectrum

(a). Thumb print: automated search


for a potential matches
(b). Paper currency : automated
counting / reading of the serial
number for tracking and identifying
bills
(c) and (d) Automated license plate
reading

19.02.2024 44
Fingerprint Identifications
Imaging in Microwave Band:

• Radar image of mountains in southeast Tibet

• Note the clarity and detail of the image, unencumbered


by clouds or other atmospheric conditions interfere with
visual band.

19.02.2024 46
SAR imaging

19.02.2024 47
Ultrasound Imaging:

• Manufacturing
• Medicine
(a) Baby
(b) Another view of baby
(c) Thyroids
(d) Muscle layers showing lesion

19.02.2024 50
Thermal Imaging

19.02.2024 52
Sonar Imaging

19.02.2024 53
Signal processing is the science of analyzing, synthesizing, sampling, encoding, transforming,
decoding, enhancing, transporting, archiving, and generally manipulating signals in some way or
another.

These presentations are concerned primarily with the branch of signal processing that entails the
manipulation of the spectral characteristics of signals.

If the processing of a signal involves modifying, reshaping, or transforming the spectrum of the
signal in some way, then the processing involved is usually referred to as filtering.

If the filtering is carried out by digital means, then it is referred to as digital filtering.
Sampler

x(nT) xq(nT)
x(t) Quantizer Encoder xq'(nT)

Clock
x(t) x(nT)

t nT

(a) Continuous-time, nonquantized (b) Discrete-time, nonquantized

x(t) x(nT)

t nT

(c) Continuous-time, quantized (d) Discrete-time, quantized


y(nT) y'(t)
A/D sampling

8 KHz sampling rate


Some DSP Applications
Video Coding & Wavelets
Image Coding & Compression
Speech Processing & OCR
Representation of Discrete-time Signals
Discrete-time signals are signals which are defined only at discrete instants of time. For those
signals, the amplitude between the two time instants is just not defined. For discrete- time signal
the independent variable is time n, and it is represented by x (n).

There are following four ways of representing discrete-time signals:

1. Graphical representation

2. Functional representation

3. Tabular representation

4. Sequence representation
Graphical Representation

Consider a single x (n) with values

X (-2) = -3, x(-1) = 2, x(0) = 0, x(1) = 3, x(2) = 1 and x(3) = 2

This discrete-time single can be represented graphically as shown,


Functional Representation
The amplitude of the signal is written against the values of n.

So a finite duration sequence, that satisfies


the condition x(n) = 0 for n < 0 can be
represented as x(n) = {3, 5, 2, 1, 4, 7}

Another example, X (n) = 2n u (n)

n -2 -1 0 1 2 3
x (n) 3 2 0 3 1 2
The sum of two discrete-time sequences is obtained by adding the corresponding elements of
sequences
{Cn} = {an} + {bn} → Cn = an + bn
The product of two discrete-time sequences is obtained by multiplying the corresponding elements
of the sequences.

{Cn} = {an}{bn} → Cn = an bn
The multiplication of a sequence by a constant k is obtained by multiplying each element of the
sequence by that constant.
{Cn} = k{an} → Cn = kan
1. Unit Step Sequence
The discrete-time unit step sequence u(n) is defined as:

1 𝑓𝑜𝑟 𝑛 ≥ 0
u(n) = ቊ
0 𝑓𝑜𝑟 𝑛 < 0

The shifted version of the discrete-time unit step


sequence u(n – k) is defined as:

1 𝑓𝑜𝑟 𝑛 ≥ 𝑘
u(n-k) = ቊ
0 𝑓𝑜𝑟 𝑛 < 𝑘
Unit Ramp Sequence
The discrete-time unit ramp sequence r (n) is that
sequence which starts at n = 0 and increases linearly
with time and is defined as:
𝑛 𝑓𝑜𝑟 𝑛 ≥ 0
r(n) = ቊ
0 𝑓𝑜𝑟 𝑛 < 0
or r(n) = nu(n) It starts at n = 0 and increases
linearly with n.

The shifted version of the discrete-time unit ramp


sequence r(n – k) is defined as:
𝑛−k 𝑓𝑜𝑟 𝑛 ≥ 𝑘
r(n-k) = ቊ
0 𝑓𝑜𝑟 𝑛 < 𝑘
or r(n – k) = (n – k) u(n – k)
Impulse Function

The discrete-time unit impulse function (n), also called unit sample sequence,
The graphical representation of (n) and (n – k) is shown

1 𝑓𝑜𝑟 𝑛 =0 1 𝑓𝑜𝑟 𝑛 =𝑘
𝛿 (𝑛) = ቊ 𝛿 (𝑛-k) = ቊ
0 𝑓𝑜𝑟 𝑛 ≠0 0 𝑓𝑜𝑟 𝑛 ≠𝑘

a) 𝛿(n) = u(n) – u(n – 1) b) X(n) = ∑ 𝑥(𝑘)𝛿 (𝑛 − 𝑘)

c) ∑ 𝑥(𝑛)𝛿 (𝑛 − 𝑛0) = x(n0)


Real Exponential Sequence
The discrete-time real exponential sequence an is defined as:
X(n) = an for all n
Figure illustrates different types of discrete-time exponential signals.
When a > 1, the sequence grows exponentially,.
When 0 < a < 1, the sequence decays exponentially
When a < 0, the sequence takes alternating signs
Complex Exponential Sequence

The discrete-time complex exponential


sequence is defined as:
𝑥 𝑛 = 𝑎𝑛 𝑒 𝑗 𝜔0 𝑛+ Φ
=𝑎𝑛 cos( 𝜔0 𝑛 + Φ) + j 𝑎𝑛 sin( 𝜔0 𝑛 + Φ)
For |a| = 1, the real and imaginary parts of
complex exponential
For |a| > 1, the amplitude of the sinusoidal
sequence exponentially grows
For |a| < 1, the amplitude of the sinusoidal
sequence exponentially decays
Basic Operations

The basic operations on sequences are as follows:


➢ Time shifting

➢ Time reversal

➢ Time scaling

➢ Amplitude scaling

➢ Signal addition

➢ Signal multiplication

The first three operations correspond to transformation in independent variable n of a


signal. The last three operations correspond to transformation on amplitude of a signal.
Time Shifting
The time shifting of a signal may result in time delay or time advance. The time shifting
operation of a discrete-time signal x(n) can be represented by
y(n) = x(n – k)
This shows that the signal y (n) can be obtained by time shifting the signal x(n) by k units.
If k is positive, it is delay and the shift is to the right, and if k is negative, it is advance and
the shift is to the left.
Time Reversal

The time reversal also called time folding of a discrete-


time signal x(n) can be obtained by folding the
sequence about n = 0. The time reversed signal is
the reflection of the original signal. It is obtained by
replacing the independent variable n by –n.
Examples
Examples
Amplitude Scaling
The amplitude scaling of a discrete-time signal
can be represented by
y(n) = a x(n), where a is a constant.
Time Scaling
Time scaling may be time expansion or time compression. The time scaling of a discrete- time
signal x(n) can be accomplished by replacing n by (an) in it. Mathematically, it can be expressed as:
y(n) = x(a n), When a > 1, it is time compression and when a < 1, it is time expansion.
If a = 2, y(n) = x(2n). Then
y(0) = x(0) = 1
y(–1) = x(–2) = 3
y(–2) = x(–4) = 0
y(1) = x(2) = 3
y(2) = x(4) = 0
If a = (1/2), y(n) = x(n/2), then
y(0) = x(0) = 1
y(2) = x(1) = 2
y(4) = x(2) = 3
y(6) = x(3) = 4
y(8) = x(4) = 0
y(–2) = x(–1) = 2
y(–4) = x(–2) = 3
y(–6) = x(–3) = 4
y(–8) = x(– 4) = 0,
signal is expanded by 2
Signal Addition
In discrete-time domain, the sum of two signals x1(n) and x2(n) can be obtained by
adding the corresponding sample values and the subtraction of x2(n) from x1(n) can be
obtained by subtracting each sample of x2(n) from the corresponding sample of x1(n)
as illustrated below.

If x1(n) = {1, 2, 3, 1, 5} and x2(n) = {2, 3, 4, 1, –2}


Then x1(n) + x2(n) = {1 + 2, 2 + 3, 3 + 4, 1 + 1, 5 – 2} = {3, 5, 7, 2, 3}
and x1(n) – x2(n) = {1 – 2, 2 – 3, 3 – 4, 1 – 1, 5 + 2} = {–1, –1, –1, 0, 7}
Continuous time example
Time Shifting
Discrete time example

Time Shifting
Time Reversal

x(-t) is obtained from the signal x(t) by a reflection about t=0.


Discrete time example

Time Reversal
Time Scaling
Signal multiplication
The multiplication of two discrete-time sequences can be performed by multiplying their values
at the sampling instants as shown below.

If x1 (n) = {1, –3, 2, 4, 1.5} and x2 (n) = {2, –1, 3, 1.5, 2}


Then x1 (n) x2 (n) = {1 × 2,- 3 ×-1, 2 × 3, 4 × 1.5, 1.5 × 2}
= {2, 3, 6, 6, 3}
Complex Number
The complex numbers are x+jy, where x and y are real numbers and j is the imaginary unit equal to the square
root of -1, j = −1. When a single letter z= x+jy is used to denote a complex number,

Through the Euler formula, a complex number

z= x+jy

may be written in "phasor" form

z= |z| (cos 𝜃+j sin 𝜃)= |z| 𝑒 𝑗𝜃

|z| is known as the complex modulus and theta is known as the complex argument or phase. The plot above
shows what is known as an Argand diagram of the point z, where the dashed circle represents the complex
modulus |z| of z and the angle theta represents its complex argument.
The absolute square of z is defined by

𝑧 2 = 𝑧 𝑧ҧ , with 𝑧ҧ the complex conjugate, (a + jb) and (𝑎 + 𝑗𝑏) = (a − jb)

(a +jb) (a-jb) = 𝑎2 + 𝑏2

𝑧 = 𝑎2 + 𝑏2 Magnitude of complex numbers

and the argument may be computed from


𝑏
arg 𝑧 = 𝜃 = 𝑡𝑎𝑛−1 (𝑎)
Complex addition

(a+jb)+(c+jd)=(a+c)+j(b+d),

complex subtraction

(a+jb)-(c+jd)=(a-c)+j(b-d),

complex multiplication

(a+jb)(c+jd)=(ac-bd)+j(ad+bc),

and complex division

(a+jb)/(c+jd)=((ac+bd)+j(bc-ad))/(c^2+d^2)
Euler's formula and for the functional representation of x and y we have

𝑒 𝑥+𝑗𝑦 = 𝑒 𝑥 (cos 𝑦 + 𝑗 sin 𝑦 ) = 𝑒 𝑥 cos (y) + 𝑗 𝑒 𝑥 sin 𝑦 .

This decomposes the exponential function into its real and imaginary parts.

For the complex

𝑧1 = 𝑟1 (cos 𝜃1 + j sin 𝜃1 ) 𝑎𝑛𝑑 𝑧2 = 𝑟2 (cos 𝜃2 + j sin 𝜃2 )

𝑧1 𝑧2 = 𝑟1 𝑟2 (cos(𝜃1 +𝜃2 ) + j sin(𝜃1 +𝜃2 ))


Classification Of Discrete-time Signals
Both continuous-time and discrete-time signals are further classified as follows:

1. Deterministic and random signals

2. Periodic and non-periodic signals

3. Energy and power signals

4. Causal and non-causal signals

5. Even and odd signals


Deterministic and Random Signals
A signal exhibiting no uncertainty of its magnitude and phase at any given instant of time is called
deterministic signal. A deterministic signal can be completely represented by mathematical
equation

Examples: Sinusoidal sequence x(n) = cos n, Exponential sequence x(n) =𝑒 𝑗𝑛 ,


ramp sequence x(n) = n.

A signal characterized by uncertainty about its occurrence is called a non-deterministic or random


signal. A random signal cannot be represented by any mathematical equation. The behavior of
such a signal is probabilistic in nature and can be analyzed only stochastically. A typical example
of a non-deterministic signal is thermal noise.
Periodic Signal
A signal which has a definite pattern and repeats itself at regular intervals of time is called a
periodic signal, and a signal which does not repeat at regular intervals of time is called a non-
periodic or aperiodic signal.

A discrete-time signal x(n) is said to be periodic if it satisfies the condition x(n) = x(n + N) for all
integers n.

The smallest value of N which satisfies the above condition is known as fundamental period.
2𝜋
𝑁

Periodic and Non-periodic Sequences


A signal which has a definite pattern and repeats itself at regular intervals of time
is called a periodic signal, and a signal which does not repeat at regular intervals
of time is called a non-periodic or aperiodic signal.

A discrete-time signal x(n) is said to be periodic if it satisfies the condition x(n) =


x(n + N) for all integers n.

The smallest value of N which satisfies the above condition is known as


fundamental period.

Aperiodic signals are said to have a period equal to infinity.


2𝜋
The angular frequency is given by 𝜔 =
𝑁

Fundamental period N = 2𝜋/ 𝜔


Energy Signals and Power Signals
Signals may also be classified as energy signals and power signals. However there are some
signals which can neither be classified as energy signals nor power signals.

The total energy E of a discrete-time signal x(n) is defined as:

and the average power P of a discrete-time signal x(n) is defined as:


Causal and Non-causal Signals

A discrete-time signal x(n) is said to be causal if x(n) = 0 for n < 0, otherwise the signal is non-
causal. A discrete-time signal x(n) is said to be anti-causal if x(n) = 0 for n > 0.

A causal signal does not exist for negative time and an anti-causal signal does not exist for
positive time. A signal which exists in positive as well as negative time is called a non-casual
signal.

u(n) is a causal signal and u(– n) an anti-causal signal, whereas x(n) = 1 for – 2 ≤ n ≤ 3 is a non-
causal signal.
Even and Odd Signals
Any signal x(n) can be expressed as sum of even and odd components. That is

x(n) = xe(n) + xo(n), where xe(n) is even components and xo(n) is odd components of the signal.

Even (syMMetric) signal

A discrete-time signal x(n) is said to be an even (symmetric) signal if it satisfies the condition:

x(n) = x(–n) for all n; Even signals are symmetrical about the vertical axis or time origin. An even
signal is identical to its reflection about the origin.

Odd (anti-syMMetric) signal

A discrete-time signal x(n) is said to be an odd (anti-symmetric) signal if it satisfies the condition:

x(–n) = –x(n) for all n; Odd signals are anti-symmetrical about the vertical axis.
Thus, the product of two even signals or of two odd signals is an even signal, and the product of
even and odd signals is an odd signal.

Every signal need not be either purely even signal or purely odd signal, but every signal can be
decomposed into sum of even and odd parts.
Classification of Discrete-time Systems
The relation between the input x(n) and the output y(n) of a system has the form:

y(n) = Operation on x(n)

Mathematically, y(n) = T[x(n)] which represents that x(n) is transformed to y(n). In other words,
y(n) is the transformed version of x(n).

Bock diagram of discrete–time system.


Both continuous-time and discrete-time systems are further classified as follows:
1. Static (memoryless) and dynamic (memory) systems
2. Causal and non-causal systems
3. Linear and non-linear systems
4. Time-invariant and time varying systems
5. Stable and unstable systems.
6. Invertible and non-invertible systems
7. FIR and IIR systems
Static and Dynamic Systems
A system is said to be static or memoryless if the response is due to present input alone, the output depends only
on the input applied at that instant but not on the past or future values

For example, the systems defined below are static or memoryless systems.
y(n) = x(n), y(n) = 2x2(n)

In contrast, a system is said to be dynamic or memory system if the response depends upon past or future inputs or
past outputs. A summer or accumulator, a delay element is a discrete- time system with memory.

For example, the systems defined below are dynamic or memory systems.

y(n) = x(2n) y(n) = x(n) + x(n – 2), y(n) + 4y(n – 1) + 4y(n – 2) = x(n)

Any discrete-time system described by a difference equation is a dynamic system. A purely resistive electrical circuit
is a static system, whereas an electric circuit having inductors and/or capacitors is a dynamic system.
Causal and Non-causal Systems

A system is said to be causal if the output of the system at any instant n depends only on the
present and past values of the input but not on future inputs, i.e., for a causal system, the
impulse response or output does not begin before the input function is applied
Causal systems are real time systems. They are physically realizable.
The impulse response of a causal system is zero for n < 0, since (n) exists only at n = 0,
h(n) = 0 for n<0
The examples for causal systems are:
y(n) = nx(n)
y(n) = x(n – 2) + x(n – 1) + x(n)
A system is said to be non-causal if the output of the system at any instant n depends
on future inputs. They produce an output even before the input is given. They do not
exist in real time. They are not physically realizable.

The examples for non-causal systems are:


y(n) = x(n) + x(2n)
y(n)=x2(n)+2x(n+2)
Linear and Non-linear Systems
A system which obeys the principle of superposition and principle of homogeneity is called a linear
system and a system not obey superposition and homogeneity is a non-linear system.

Homogeneity: system which produces an output y(n) for an input x(n) must produce an output
a*y(n) for an input a*x(n).

Superposition: system which produces an output y1(n) for an input x1(n) and y2(n) for an input
x2(n) must produce an output y1(n) + y2(n) for an input x1(n) + x2(n).

Weighted sum of inputs ax1(n) + bx2(n) where a and b are constants produces an output ay1(n) +
by2(n) which is the sum of weighted outputs.

T [ax1(n) + bx2(n)] = aT [x1(n)] + bT [x2(n)]


Shift-invariant and Shift-varying Systems
Time-invariance is the property of a system which makes the behaviour of the system
independent of time. This means that the behaviour of the system does not depend
on the time at which the input is applied. For discrete-time systems, the time invariance
property is called shift invariance.

A system is said to be shift-invariant if its input/output characteristics do not change


with time,

If T [x(n)] = y(n) Then T [x(n – k)] = y(n – k)

A system not satisfying the above requirements is called a time-varying system (or
shift- varying system).
BIBO Stable
A bounded signal is a magnitude is always a finite value, i.e. 𝑥(𝑛) = 𝑀𝑥 where M is
finite number. For example a sine wave is a bounded signal. A system is bounded-
input, bounded-output (BIBO) stable, The output of such a system does not diverge or
does not grow unreasonably large.
Let the input signal x(n) be bounded (finite), i.e.,

𝑥(𝑛) = 𝑀𝑥 for all n if 𝑦(𝑛) = 𝑀𝑦 ≤ ∞


BIBO stable criterion.

;
Laplace, Fourier, Z Transforms

The Laplace and Fourier transforms are continuous transforms of continuous functions. The Laplace
transform maps a function f 𝑡 to a function 𝐹(𝑠) of the complex variable s, where 𝑆 = 𝜎 + 𝑗𝜔.

𝑑𝑓 𝑡
Since the derivative 𝑓 ′ 𝑡 = maps to 𝑠𝐹(𝑠) ,the Laplace transform of a linear differential equation is
𝑑𝑡

an algebraic equation. Thus, the Laplace transform is useful for, among other things, solving linear
differential equations.

If we set the real part of the complex variable s to zero, σ=0 the result is the Fourier transform
F 𝐽𝜔 which is essentially the frequency domain representation of f 𝑡 (this is true only if Laplace
transform of f 𝑡 exists, i.e).
The Z transform is essentially a discrete version of the Laplace transform and, thus, can be useful
in solving difference equations, the discrete version of differential equations. The Z transform
maps a sequence f[n] to a continuous function F(z) of the complex variable 𝑧 = 𝑟 𝑒 𝑗Ω If we set
the magnitude of z to unity, r =1 the result is the Discrete Time Fourier Transform (DTFT) F(𝑒 𝑗𝜔 )
which is essentially the frequency domain representation of f[n]

.
Z Transforms
In mathematics and signal processing, the Z-transform converts a discrete-time signal, into a
complex frequency-domain (z-domain or z-plane) representation.

Whereas the continuous-time Fourier transform is evaluated on the Laplace s-domain's imaginary line,
the discrete-time Fourier transform is evaluated over the unit circle of the z-domain.

Z-Transforms;

Where x(n) any discrete sequence and z complex number

.
Inverse Z Transforms;

Discrete Fourier Transforms


Discrete Time Sequence Z-Transforms

𝑥(𝑛) 𝑋(𝑧)= σ∞
𝑛=0 𝑥 𝑛 𝑧
−𝑛

1
𝑥(−𝑛) 𝑋(𝑧)

𝑥 𝑛 − 𝑛0 𝑧 −𝑛0 𝑋(𝑧)

𝛿(𝑛) (Impulse Func.) Z{𝛿(𝑛)} = 1

𝛿(𝑛 − 𝑛0 ) 𝑧 −𝑛0
𝑧 1
𝑢 𝑛 (𝑈𝑛𝑖𝑡 𝑆𝑡𝑒𝑝 𝐹𝑢𝑛𝑐. ) Z{u(𝑛)} = =
𝑧−1 1−𝑧 −1
1
u(𝑛 − 𝑛0 ) 𝑧 −𝑛0 1−𝑧 −1
Discrete Time Sequence Z-Transforms
𝑧
𝑛𝑢 𝑛 (𝑟𝑎𝑚𝑝 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛) 𝑍{nu(𝑛)} = (𝑧−1)2

𝑧 1
𝑎𝑛 𝑢 𝑛 𝑍{𝑎𝑛 𝑢 𝑛 } =𝑧−𝑎 =1−𝑎𝑧 −1

𝑑𝑋(𝑧)
𝑛𝑥 𝑛 −𝑧 𝑑𝑧

𝑥(𝑛) 𝑧 𝑋(𝑧)
-‫׬‬0 𝑑𝑧
𝑛 𝑧
Example: 𝑥 𝑛 = 𝑢 𝑛

∞ ∞
𝑋 𝑧 = ෍ 𝑢 𝑛 𝑧 −𝑛 = ෍ (𝑧 −1 )𝑛 = 1 + (𝑧 −1 )1 + (𝑧 −1 )2 + (𝑧 −1 )3 + …
𝑛=0 𝑛=0
1
1 + 𝑟 + 𝑟2 + 𝑟3 + ⋯ = when 𝑟 < 1
1−𝑟

1 𝑧
𝑇ℎ𝑒𝑛 𝑋 𝑧 = =
1 − 𝑧 −1 𝑧−1
Example: 𝑥 𝑛 = 𝑎𝑛 𝑢 𝑛

∞ ∞
𝑋 𝑧 = ෍ 𝑎 𝑛 𝑢 𝑛 𝑧 −𝑛 = ෍ (𝑎𝑧 −1 )𝑛 = 1 + (𝑎𝑧 −1 )1 + (𝑎𝑧 −1 )2 + (𝑎𝑧 −1 )3 + …
𝑛=0 𝑛=0
1
1 + 𝑟 + 𝑟2 + 𝑟3 = when 𝑟 < 1
1−𝑟

1 𝑧
𝑇ℎ𝑒𝑛 𝑋 𝑧 = =
1 − 𝑎𝑧 −1 𝑧−𝑎
Linearity & Shift Theorem
𝑍{𝑎 𝑥1 𝑛 + 𝑏 𝑥2 (𝑛)} = 𝑎 𝑍 𝑥1 𝑛 + 𝑏𝑍 𝑥2 𝑛 Linearirty

Example: 𝑥 𝑛 = 𝑢 𝑛 − (0,5)𝑛 𝑢 𝑛 𝑡ℎ𝑒𝑛;


𝑧 𝑧 𝑧 𝑧
𝑍 𝑢 𝑛 = and 𝑍{ 0,5)𝑛 𝑢 𝑛 = then, 𝑋 𝑧 = −
𝑧−1 𝑧−0,5 𝑧−1 𝑧−0,5

𝐸𝑥𝑎𝑚𝑝𝑙𝑒: 𝑍 𝑥 𝑛 − 𝑚 = 𝑧 −𝑚 𝑥(𝑧)

𝑍 𝑥 𝑛−𝑚 = σ∞
𝑛=0 𝑥 𝑛 − 𝑚 𝑧
−𝑛 = 𝑥 −𝑚 𝑧 −0 + … + 𝑥 −1 𝑧 − 𝑚−1 + 𝑥 0 𝑧 −𝑚 + 𝑥 1 𝑧 −𝑚−1 + ⋯

𝑥 𝑛 𝑖𝑠 𝑎𝑠𝑠𝑢𝑚𝑒𝑑 𝑡𝑜 𝑏𝑒 𝑐𝑎𝑢𝑠𝑎𝑙 𝑥 𝑛 = 0 𝑖𝑓 𝑛 < 0, 𝑡ℎ𝑒𝑛

𝑍 𝑥 𝑛−𝑚 = 𝑧 −𝑚 𝑥 0 + 𝑥 1 𝑧 −1 + 𝑥 2 𝑧 −2 + … = 𝑧 −𝑚 𝑥(𝑧)

𝑛−5 −5 𝑧 𝑧 −4
𝑦 𝑛 = 0,5 𝑢 𝑛 − 5 𝑡ℎ𝑒𝑛; 𝑌 𝑧 = 𝑧 =
𝑧−0,5 𝑧−0,5
Inverse Z - Transforms
4𝑧 𝑧
𝑋 𝑧 =2+ − 𝑡ℎ𝑒𝑛, 𝑥 𝑛 = 2𝛿 𝑛 + 4𝑢 𝑛 − 0,5 𝑛 𝑢(𝑛)
𝑧−1 𝑧−0,5

5𝑧 4𝑧
𝑋 𝑧 = − 𝑡ℎ𝑒𝑛, 𝑥 𝑛 = 5 𝑛𝑢 𝑛 − 4𝑛 0,5 𝑛 𝑢(𝑛)
(𝑧−1)2 (𝑧−0,5)2
1 𝑗𝑎𝑛
𝐹𝑖𝑛𝑑 𝑍 𝑇𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚 𝑜𝑓 𝑥 𝑛 = cos 𝑎𝑛 𝑢 𝑛 = 𝑒 + 𝑒 −𝑗𝑎𝑛 𝑢 𝑛
2
1 𝑧 𝑧 1 𝑧 𝑧−𝑒 −𝑗𝑎 𝑧 𝑧−𝑒 𝑗𝑎
𝑋 𝑧 = ( 𝑗𝑎 + )= ( 𝑗𝑎 + )
2 𝑧−𝑒 𝑧−𝑒 −𝑗𝑎 2 𝑧−𝑒 𝑧−𝑒 −𝑗𝑎 𝑧−𝑒 −𝑗𝑎 𝑧−𝑒 𝑗𝑎

1 𝑧 2 −𝑧𝑒 −𝑗𝑎 𝑧 2 −𝑧𝑒 𝑗𝑎 1 2𝑧 2 −(𝑧𝑒 𝑗𝑎 +𝑧𝑒 −𝑗𝑎 )


= ( 2 𝑗𝑎 + 2 𝑗𝑎 ) = ( )
2 𝑧 −𝑧𝑒 −𝑧𝑒 −𝑗𝑎 +1 𝑧 −𝑧𝑒 −𝑧𝑒 −𝑗𝑎 +1 2 𝑧 2 −𝑧𝑒 𝑗𝑎 −𝑧𝑒 −𝑗𝑎 +1

1 2𝑧 2 −2𝑧𝑐𝑎𝑠(𝑎)
= ( )
2 𝑧 2 −2𝑧𝑐𝑎𝑠(𝑎)+1
𝑑
Show that; 𝑍 𝑛𝑝 = −𝑧 𝑍{𝑛𝑝−1 } where p positive integer
𝑑𝑧

𝑍 𝑛𝑝 = σ∞ 𝑝 −𝑛 and 𝑍 𝑛𝑝−1 = σ∞ 𝑛𝑝−1 𝑧 −𝑛 Diff. w.r.t to z ;


𝑛=0 𝑛 𝑧 𝑛=0

𝑑
𝑍 𝑛𝑝−1 = σ∞
𝑛=0 𝑛
𝑝−1 (−𝑛)𝑧 −𝑛−1 = −𝑧 −1 σ∞ 𝑛𝑝 𝑧 −𝑛
𝑛=0
𝑑𝑧

𝑑 𝑑
𝑍 𝑛𝑝−1 = −𝑧 −1 𝑍 𝑛𝑝 then; 𝑍 𝑛𝑝 = −𝑧 𝑍 𝑛𝑝−1
𝑑𝑧 𝑑𝑧

𝑑 𝑑 𝑑 𝑧 𝑧−1 −𝑧 𝑧
Example: 𝑍{𝑛𝑢(𝑛)} = −𝑧 𝑍 𝑛𝑝−1 = −𝑧 𝑍 𝑢(𝑛) = −𝑧 ( 𝑧−1) = −𝑧 =
𝑑𝑧 𝑑𝑧 𝑑𝑧 (𝑧−1)2 (𝑧−1)2
Change of scale
𝑧
𝑍 𝑎𝑛 𝑥 𝑛 = 𝑋( ) and 𝑍 𝑎−𝑛 𝑥 𝑛 = 𝑋(𝑎𝑧)
𝑎

𝑍 𝑎−𝑛 𝑥 𝑛 = σ∞ −𝑛
𝑛=0 𝑎 𝑥 𝑛 𝑧
−𝑛 = σ∞ 𝑥 𝑛 (𝑎𝑧)−𝑛 = 𝑋(𝑎𝑧)
𝑛=0

𝑍 𝑎𝑛 𝑛𝑢 𝑛 =?
𝑧 𝑧/𝑎 𝑎𝑧
𝑍 𝑛𝑢 𝑛 = 𝑡ℎ𝑒𝑛 𝑍 𝑎𝑛 𝑛𝑢 𝑛 = =
(𝑧−1)2 (𝑧/𝑎−1)2 (𝑧−𝑎)2
Solution of Difference Equations Using Z-
transforms.

To solve the difference equation, first it is converted into algebraic equation by taking its Z-
transform. The solution is obtained in z-domain and the time domain solution is obtained by taking
its inverse Z-transform.

The response of the system due to input alone when the initial conditions are neglected is called
the steady state response of the system.

The response of the system due to initial conditions alone when the input is neglected is called the
the transient response of the system.

When input is a unit impulse input, the response is called the impulse response of the system and
when the input is a unit step input, the response is called the step response of the system.
Example
A linear shift invariant system is described by the difference equation
𝑦(𝑛) –3/4 𝑦(𝑛−1)+ 1/8 𝑦(𝑛−2)= 𝑥(𝑛) + 𝑥(𝑛−1) with y(–1) = 0 and y(–2) = –1.
Find (a) the transient (natural) response of the system (b) the forced response of the system for a
step input and (c) the frequency response of the system.
Solution:
(a) The transient (natural) response is the response due to initial conditions only. So make x(n) =
0. Then the difference equation becomes
𝑦(𝑛) – ¾ 𝑦(𝑛−1)+ 1/8 𝑦(𝑛−2)=0
Taking Z-transform on both sides, we have
Taking inverse Z-transform on both sides, we get the natural response as:

To find the forced response due to a step input, put x(n) = u(n). So we have

We know that the forced response is due to input alone. So for forced response, the
initial conditions are neglected. Taking Z-transform on both sides of the above equation
and neglecting the initial conditions, we have
Taking the inverse Z-transform on both sides, we have the forced response for a step input.

The frequency response of the system H( ) is obtained by putting z=𝑒 𝑗𝜔 in H(z).


a) Determine the free response of the system described by the difference equation

(b) Determine the forced response for an input

Solution:

(a) The free response, also called the natural response or transient response is the response
due to initial conditions only [i.e. make x(n) = 0]. So, the difference equation is:
To determine the forced response, i.e. the steady state response, the initial conditions
are to be neglected. The given difference equation is:

Taking Z-transform on both sides and neglecting the initial conditions, we have
Partial fraction expansion of Y(z)/z gives

Multiplying both sides by z, we get;


EXAMPLE : Find the impulse and step response of the system

Solution: For impulse response, x(n) = δ (n) The impulse response of the system is:

For step response, x(n) = u(n) , The step response of the system is:

y(n)= 2u(n)- 3u(n-1) +u(n-2) -4u(n-3)


EXAMPLE 4 Solve the following difference equation

y(n) + 2y(n-1) = x(n)


1
with x(n) = ( )𝑛 u(n) and the initial condition y(–1) = 1.
3

Solution: The solution of the difference equation considering the initial condition and input
simultaneously gives the total response of the system.

The given difference equation is:


Taking inverse Z-transform on both sides, the solution of the
difference equation is:
EXAMPLE 5 Solve the following difference equation using unilateral Z-transform. with initial
conditions

Solution: The solution of the difference equation gives the total response of the system (i.e., the sum
of the natural (free) response and the forced response) with initial conditions y(–1) = 2 and y(–2) = 4.
Taking Z-transform on both sides, we have

The given difference equation is:


EXAMPLE 7 Determine the step response of an LTI system whose impulse response

h(n) is given by ℎ 𝑛 = 𝑎−𝑛 𝑢 −𝑛 ; 0 < a < 1 .

Solution: The impulse response is

We have to find the step response


The step response of the system is given by

So the step response is


Realization of Discrete- Time Systems

Systems may be continuous-time systems or discrete-time systems. Discrete-time


systems may be FIR (Finite Impulse Response) systems or IIR (Infinite Impulse
Response) systems.

FIR systems are the systems whose impulse response has finite number of samples and
IIR systems are systems whose impulse response has infinite number of samples.

Realization of a discrete-time system means obtaining a network corresponding to the


difference equation or transfer function of the system.
(a) Adder (b) Constant multiplier and (c) Unit delay element.

Adder: An adder is used to add two or more signals. The output of adder is equal to the sum of all incoming
signals.

Constant multiplier: A constant multiplier is used to multiply the signals by a constant. The output of the multiplier is
equal to the product of the input signal and the constant of the multiplier.

Unit delay element: A unit delay element is used to delay the signal passing through it by one sampling time.
EXAMPLE Construct the block diagram for the discrete-time systems by the following difference
equations:
(a) y(n) = 0.7x(n) + 0.3x (n-1), (b) y(n) = 0.5y(n-1) + 0.8 x(n) + 0.4 x (n-1)
Solution: (a) Given y(n) = 0.7x(n) + 0.3x (n -1)

The system may be realized by using the difference equation directly or by using the Z-transformed
version of that. The individual terms of the given difference equation are 0.7x(n) and 0.3x(n – 1). They
are represented by the basic elements

Taking Z-transform on both sides of the given difference equation, we have

𝑌 𝑧 = 0.7 𝑋 𝑧 + 0.3 𝑧 −1 𝑋 𝑧

The individual terms of the above equation are: 0.7 𝑋 𝑧 𝑎𝑛𝑑 0.3 𝑧 −1 𝑋 𝑧
Block diagram representation of (a) 0.7X(z)
and (b) 0.3 z–1X(z).
Realization of system described by y(n) = 0.7x(n) + 0.3x(n–1).
Given y(n) = 0.5y (n-1) + 0.8x(n) + 0.4x(n-1)

The individual terms of the above equations are 0.5y(n-1), 0.8x(n) and 0.4x(n-1).

Taking Z-transform on both sides of the given difference equation, we have

𝑌 𝑧 = 0.5 𝑧 −1 𝑌 𝑧 + 0.8 𝑋 𝑧 + 0.4 𝑧 −1 𝑋 𝑧


Realization of the system described by y(n) = 0.5y(n–1) + 0.8x(n) + 0.4x(n–1).
Structures for Realization of IIR Systems
IIR systems are systems whose impulse response has infinite number of samples. the IIR system has an
infinite memory. The convolution formula for IIR systems is given by

𝑦 𝑛 = σ∞
𝑘=0 ℎ 𝑘 𝑥(𝑛 − 𝑘)

A system whose output y(n) at time n depends on the present input and any number of past values of
input and output is called a recursive system. The past outputs are y(n – 1), y(n – 2), y(n – 3), ...
Hence, for recursive system, the output y(n) is given by

y(n) = F[y(n-1), y(n-2), ..., y(n-N), x(n), x(n-1), ..., x(n-M)]


Transfer function of llR SYSTEM

In general, an IIR system is described by the difference equation

On taking Z-transform of the above equation for y(n), we get


The system function or the transfer function of the IIR system is:

Structure for realization of LTI system are: computational complexity, memory requirements and
finite word length effects in computations. Computational complexity, the number of arithmetic
operations output value y(n), Memory requirements to store the system parameters, past inputs
and outputs, Finite-word-length effects or finite precision effects refer to the quantization effects.
Direct Form-I Structure
Direct form-I realization is the direct implementation It is the simplest and most straight forward
realization structure available. The difference equation governing the behaviour of an IIR system is

On taking the Z-transform of the above equation for y(n), we get


If IIR system is more complex, (higher order), then introduce an intermediate variable W(z) so that
Direct Form-I Structure & Direct Form-II Structure
Consider the general difference equation governing an IIR system

On taking Z-transform of the above equation and neglecting initial conditions, we get
On cross multiplying the above equations, we get

W (z) + a1z-1W (z) + a2 z-2W (z) + ... + aN z-NW (z) = X(z)

W (z) = X(z) - a1z-1W (z) - a2 z -2W (z) - ... - aN z-NW (z)


Y (z) = b0W (z) + b1z-1W (z) + b2 z-2W (z) + ... + bM z-MW (z)
EXAMPLE: Realize an IIR system

y(n) + 2y(n - 1) + 3y(n - 2) = 4x(n) + 5x(n - 1) + 6x(n - 2) using the


transposed form structure.
Solution: Taking Z-transform on both sides of the given difference equation and
neglecting initial conditions, we get
Y (z) + 2z-1Y (z) + 3z-2Y (z) = 4X(z) + 5z-1X(z) + 6z-2 X (z)
Therefore, the transfer function of the given IIR system is

a1 = 2, a2 = 3, b0 = 4, b1 = 5, b2 = 6
EXAMPLE: Obtain the direct form-I, direct form-II, cascade and parallel form realizations of the LTI
system governed by the equation
The Direct Form-I Structure
Direct form-II
Direct Form-II

You might also like