PROGRAMMING WITH MATLAB
SIGNAL PROCESSING
ANKARA UNIVERSITY
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
SIGNAL
We can think of signals as functions of one or more independent
variable(s).
They transmit information about a physical system.
2
EXAMPLES OF SIGNALS
Audio signals
Variation of temperature with respect to time or location
Variation of electrical potential on heart surface with time
Medical Images (2D)
ECG Audio Signal Angiogram
CLASSIFICATION OF SIGNALS
Continuous Time and Discrete Time Signals
Deterministic and Non-deterministic Signals
Even and Odd Signals
Periodic and Aperiodic Signals
Real and Complex Signals
Finite and Infinite Length Signals
4
CONTINUOUS TIME AND DISCRETE TIME SIGNALS
A signal is said to be continuous when it is defined for all instants of time.
A signal is said to be discrete when it is defined at only discrete instants of time.
5
DETERMINISTIC AND NON-DETERMINISTIC SIGNALS
A signal is said to be deterministic if
there is no uncertainty with respect
to its value at any instant of time.
Non-deterministic signals are random in nature
hence they are called random signals.
6
EVEN AND ODD SIGNALS
A signal is said to be even when it satisfies the condition x(t) = x(-t)
A signal is said to be odd when it satisfies the condition x(t) = -x(-t)
Let x(t) = sin t
x(-t) = sin(-t) = -sin t = -x(t)
∴ sin t is odd function. 7
PERIODIC AND APERIODIC SIGNALS
A signal is said to be periodic if it satisfies the condition x(t) = x(t + T) or x(n) = x(n + N)
where
T = fundamental time period,
1/T = f = fundamental frequency.
8
SIGNAL OPERATIONS
9
SIGNAL OPERATIONS
10
11
12
13
14
15
16
CONTINUOUS-TIME SINUSOIDAL SIGNALS
17
BASIC SIGNALS
18
SYSTEMS
19
DEFINITION OF A SYSTEM
20
PROPERTIES OF SYSTEMS
• Memory
• Invertibility
• Causality
• Stability
• Linearity
• Time invariance
21
MEMORY/MEMORYLESS SYSTEMS
Memoryless System: Output given at a time depends only on the input at the same
time.
If not, system is with memory.
22
INVERTIBILITY OF SYSTEMS
23
CAUSALITY/CAUSAL SYSTEMS
• A system is causal if output at any time is dependent only on the input values at the present and past
time.
• It does not depend on future values of the input.
24
STABILITY/STABLE SYSTEMS
25
STABILITY/STABLE SYSTEMS
𝑦 𝑡 = න 𝑥 𝑡 𝑑𝑡
𝐿𝑒𝑡 𝑥 𝑡 = 𝑢(𝑡)→Unit Step Function
26
LINEARITY/LINEAR SYSTEMS
27
LINEARITY/LINEAR SYSTEMS
28
TIME INVARIANCE / TIME INVARIANT SYSTEMS
29
TIME INVARIANCE / TIME INVARIANT SYSTEMS
30
LTI (LINEAR AND TIME-INVARIANT) SYSTEMS,
THEIR IMPULSE RESPONSES AND CONVOLUTION
31
CONVOLUTION
Evaluate y[n] x[n] * h[n], where x[n] and h[n] are shown in the Figure below:
32
33
FOURIER SERIES
34
REPRESENTING A PERIODIC SIGNAL WITH COMPLEX
EXPONENTIALS
35
36
37
FOURIER TRANSFORM
38
FOURIER TRANSFORM
Fourier Transform (FT) is a mathematical method that transforms a function of time to a function of
frequency.
The output of a FT is called a frequency spectrum.
Differences Between Fourier Series and Fourier Transform:
Fourier Series is an expansion of a periodic signal as a linear combination of sines and cosines.
BUT
Fourier Transform is the process or function used to convert signals from time domain into frequency
domain.
Fourier Series is defined for periodic signals
BUT 39
Fourier Transform is also applied to aperiodic signals.
CONTINUOUS TIME FOURIER TRANSFORM FOR APERIODIC SIGNALS
40
CONTINUOUS TIME FOURIER TRANSFORM FOR APERIODIC
SIGNAL
41
CONTINUOUS TIME FOURIER TRANSFORM FOR PERIODIC
SIGNALS
42
CONTINUOUS TIME FOURIER TRANSFORM FOR PERIODIC
SIGNALS
43
DISCRETE CONTINUOUS TIME FOURIER TRANSFORM FOR
APERIODIC SIGNALS
44
DISCRETE CONTINUOUS TIME FOURIER TRANSFORM FOR
APERIODIC SIGNALS
45
DISCRETE CONTINUOUS TIME FOURIER TRANSFORM FOR
PERIODIC SIGNALS
46
SAMPLING
47
SAMPLING
• Sampling is applied to convert a continuous
time signal to discrete time signal.
• We should prevent aliasing while doing the
conversion.
• If we do not have enough samples, we cannot
recover the original signal (aliasing occurs)
• If we have more samples than is required, we
can recover the original signal but we end up
with using more storage than necessary. 48