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

METU Computer Engineering

Ceng 384– Spring 2013


Week 2a
Signals and Systems
for Computer Engineers
Some slides, figures
and partial text are borrowed
from Lathi’s “Signal Processing &
Linear Systems” and Oppenheim &
Willsky’s “Signals and Systems”.

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 1


What is a signal?
METU Computer Engineering

 Wikipedia: “a signal is
any time-varying or
spatial-varying quantity”
 A signal is a function of
an independent variable
(i.e., time or space).
 A signal is a flow of
information in time or
space.

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 2


Example Signals
Speech:
METU Computer Engineering

 1 dimensional signal
 A function of time, f(t)

 Image:
 2 dimensional signal y
 A function of space: f(x,y)
x

 Video:
 3 dimensional signal
 A function of space&time: f(x,y,t) y
t

Apr-14 F. Y. Vural & S. Kalkan - CEng 384


x 3
More Example Signals
The universe
METU Computer Engineering


 4 dimensional signal?
 A function of space&time: f(x,y,z,t)?

 Neural Signals:
 n+1 dimensional signal for a
neuron with n inputs:
 f(x1, .., xn,t)

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 4


Properties of Signals
METU Computer Engineering

Important properties:
1: Peak amplitude
2: Peak-to-peak amplitude
4: Period T

Energy of a signal:

𝐸𝑥 = 𝑥 𝑡 2 𝑑𝑡
−∞
Power of a signal: time average of energy, or
energy per unit time
𝑇/2
1 2
𝑃𝑥 = lim 𝑥 𝑡 𝑑𝑡
𝑇→∞ 𝑇
−𝑇/2
Apr-14 F. Y. Vural & S. Kalkan - CEng 384 5
Types of Signals
METU Computer Engineering

 Continuous-time vs. discrete-time signals


 The independent variable is continuous or discrete
𝑥(𝑡) 𝑥𝑛

𝑥 𝑡 = 𝑓1 (𝑡) 𝑥 𝑛 = 𝑓2 𝑛

 Most of the information in the physical world is a


continuous-time signal
 E.g., pressure, temperature, force, velocity…
http://netlecturer.com/NTOnLine/T13_SIGNALS/p01types.htm

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 6


Types of Signals (cont’d)
METU Computer Engineering

Continuous-time Signals Discrete-time Signals


 𝑥 𝑡 = 𝑓(𝑡)  𝑥 𝑛 =𝑔 𝑛

∞ ∞
𝐸𝑥 = 𝑥 𝑡 2 𝑑𝑡 2
𝐸𝑥 = 𝑥𝑛
−∞
−∞

http://netlecturer.com/NTOnLine/T13_SIGNALS/p01types.htm

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 7


Types of Signals
METU Computer Engineering

 Digital vs. analog signals

 The signal amplitude is either continuous or discrete

http://netlecturer.com/NTOnLine/T13_SIGNALS/p01types.htm

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 8


Types of Signals (cont’d)
METU Computer Engineering

 Periodic vs. aperiodic signals


 Continuous: 𝑥 𝑡 = 𝑥 𝑡 + 𝑇 for all t
 Discrete: 𝑥 𝑛 = 𝑥[𝑛 + 𝑁] for all n.

 Energy vs. power signals


 A signal with finite energy is an energy signal.
 A signal with finite and non-zero power is a power signal.
 Q: Then, is a periodic signal power signal or energy
signal? http://netlecturer.com/NTOnLine/T13_SIGNALS/p01types.htm

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 9


Types of Signals (cont’d)
METU Computer Engineering

 Deterministic vs. random signals


 Based on the predictability of the signal over time/space.
 E.g., can we predict x(t+1) given x(−∞)…x(t)?

 Even vs. odd signals


 Even: 𝑥 𝑡 = 𝑥 −𝑡 𝑜𝑟 𝑥 𝑛 = 𝑥[−𝑛]
 Odd: 𝑥 𝑡 = −𝑥 −𝑡 𝑜𝑟 𝑥 𝑛 = −𝑥[−𝑛]

Figures from: Peter Chung, ICL.


Apr-14 F. Y. Vural & S. Kalkan - CEng 384 10
Basic Operations with Signals
METU Computer Engineering

 Amplitude scaling:
 𝑥1 𝑡 = 𝑐 × 𝑥2 (𝑡)
 How about scaling
of DT signals?

 Time scaling:
 𝑥1 𝑡 = 𝑥2 (𝑐 × 𝑡)

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 11


Basic Operations with Signals
METU Computer Engineering

 Time shift:
 𝑥1 𝑡 = 𝑥2 𝑡 + 𝑡0

 Addition:
 𝑥1 𝑡 = 𝑥2 𝑡 + 𝑥3 𝑡

 More operations can be defined.


Apr-14 F. Y. Vural & S. Kalkan - CEng 384 12
Basic Operations with
Sinusoidal Signals
METU Computer Engineering

 How to draw e.g. 𝐴𝑐𝑜𝑠 𝑤𝑜 𝑡 + 𝜙 .


 First scale
𝜙
 Then shift the time axis by - 𝑤0
.
 Then scale the amplitude

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 13


Types of Signals (cont’d)
METU Computer Engineering

 Complex signals:
 𝑥 𝑡 = 𝐴 × 𝑒 𝑠𝑡
 𝑥 𝑛 = 𝐴 × 𝑧𝑛
 where 𝐴, 𝑠, 𝑧 are complex numbers

Figures from: Peter Chung, ICL.


Apr-14 F. Y. Vural & S. Kalkan - CEng 384 14
Complex Numbers (Cont’d)
METU Computer Engineering

 𝑒 𝑗𝜃 = 𝑐𝑜𝑠𝜃 + 𝑗 𝑠𝑖𝑛𝜃

 A special case:
 Euler’s Identity:
 𝑒 𝑗𝜋 + 1 = 0
 e => Euler’s number,
base of natural
logarithms (~ 2.71828)

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 15


Complex Numbers (Cont’d)
METU Computer Engineering

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 16


METU Computer Engineering

 How 𝑒 𝑗𝑥 looks like:

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 17


Complex exponential with non-
zero real part
METU Computer Engineering

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 18


Fundamental Period (CT)
METU Computer Engineering

 𝜔0 : Fundamental frequency
of 𝑒 𝑗𝜔0 𝑡
 𝑇0 : Fundamental period
 𝑇0 is the smallest number that
satisfies: 𝑒 𝑗𝜔0 𝑇 = 1
2𝜋
 𝑇0 = 𝜔0

 Properties:
 Larger 𝜔0 => higher rate of
oscillation
 𝑒 𝑗𝜔0 𝑡 is periodic for any value
of 𝜔0 .
Apr-14 F. Y. Vural & S. Kalkan - CEng 384 19
Fundamental Period (DT)
METU Computer Engineering

 Ω0 : Fundamental frequency of 𝑒 𝑗Ω0 𝑡


 𝑁0 : Fundamental period

 Properties:
 Larger Ω0 => higher rate of oscillation?
 NO: since 𝑒 𝑗 Ω0+2𝜋 𝑛 = 𝑒 𝑗2𝜋𝑛 𝑒 𝑗Ω0𝑛 = 𝑒 𝑗Ω0𝑛
 i.e., Ω0 can take values in 2𝜋 ranges.
Why is it different from CT?
 𝑒 𝑗Ω0𝑡 is periodic for any value of Ω0 ?
Ω0 𝑚
 NO: 𝑁0 Ω0 = 𝑚2𝜋 => =
2𝜋 𝑁0
 𝑚, 𝑁: integers.
Apr-14 F. Y. Vural & S. Kalkan - CEng 384 20
METU Computer Engineering 𝑥 𝑛 = cos(0 ⋅ 𝑛) 𝑥 𝑛 = cos(𝜋𝑛/8) 𝑥 𝑛 = cos(𝜋𝑛/4)

𝑥 𝑛 = cos(𝜋𝑛/2) 𝑥 𝑛 = cos(𝜋𝑛) 𝑥 𝑛 = cos(3𝜋𝑛/2)

𝑥 𝑛 = cos(7𝜋𝑛/4) 𝑥 𝑛 = cos(15𝜋𝑛/8) 𝑥 𝑛 = cos(2𝜋𝑛)

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 21


METU Computer Engineering

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 22


Rehearse your trigonometry
knowledge
METU Computer Engineering

 A simple exercise
 What is sin b / tan b?

 sin b / tan b =

Bill Cosby

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 23


Rehearse your trigonometry
knowledge
METU Computer Engineering

 They will help you in


this course
 … and may be in your
‘social life’ ;)

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 24


Today
METU Computer Engineering

 Signals
 Unit impulse and step signals

 Systems
 And their properties

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 25


Unit Impulse & Step Functions
[Discrete]
METU Computer Engineering

Unit Impulse Unit Step


1, 𝑛=0 1, 𝑛≥0
𝛿[𝑛] = 𝑢[𝑛] =
0, 𝑛≠0 0, 𝑛<0

Summation

Difference
Apr-14 F. Y. Vural & S. Kalkan - CEng 384 26
Unit Impulse & Step Functions
[Continuous]
METU Computer Engineering

Undefined at t=0.

Unit Impulse Unit Step

𝛿(𝑡) 1, 𝑡>0
𝑢(𝑡) =
0, 𝑡<0

Integral

Differentiation
Apr-14 F. Y. Vural & S. Kalkan - CEng 384 27
METU Computer Engineering

SYSTEMS

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 28


Systems
METU Computer Engineering

Qing Hu, MIT


Apr-14 F. Y. Vural & S. Kalkan - CEng 384 29
Example Systems
METU Computer Engineering

Qing Hu, MIT


Apr-14 F. Y. Vural & S. Kalkan - CEng 384 30
Example Systems
METU Computer Engineering

Qing Hu, MIT


Apr-14 F. Y. Vural & S. Kalkan - CEng 384 31
METU Computer Engineering

 Different systems can be described similarly, in


the same form.

Qing Hu, MIT


Apr-14 F. Y. Vural & S. Kalkan - CEng 384 32
Why study systems?
METU Computer Engineering

 “A very rich class of systems are described by differential and


difference equations.
 Such an equation, by itself, does not completely describe the
input-output behavior of a system: we need auxiliary
conditions (initial conditions, boundary conditions).
 In some cases the system of interest has time as the natural
independent variable and is causal. However, that is not
always the case.
 Very different physical systems may have very similar
mathematical descriptions.”
Qing Hu, MIT

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 33


Systems can be combined
METU Computer Engineering

 Concatenation x y
System 1 System 2
or Series or Cascade

System 1
x y
 Parallel +
System 2

x y
 Feedback + System 1

System 2
 …

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 34


System Properties: Causality
METU Computer Engineering

 A systems is causal if the output at any time t


depends only on the input up to time t.

 Are these causal?


1. 𝑦 𝑡 = sin 𝑡 − 1 + 𝑥(𝑡)
2. y 𝑛 = 𝑥 𝑛 + 1 × sin(𝑛)
3. y 𝑡 = 𝑥(2 × 𝑡)
4. 𝑦[𝑛] = 𝑥[−𝑛]
5. 𝑦 𝑡 = 𝑥 𝑡 − 1 × cos(𝑡 + 1)
Apr-14 F. Y. Vural & S. Kalkan - CEng 384 35
System Properties: Linearity
METU Computer Engineering

 Given:
 𝑦1 𝑡 = 𝐻{𝑥1 𝑡 } and 𝑦2 𝑡 = 𝐻 𝑥2 𝑡
 If 𝛼𝑦1 𝑡 + 𝛽𝑦2 (𝑡) = 𝐻{𝛼𝑥1 𝑡 + 𝛽𝑥2 (𝑡)}
then, the system 𝐻{} is linear.
 This is due to:
 Superposition: 𝐻 𝛼𝑥1 𝑡 + 𝛽𝑦2 𝑡 =
𝐻 𝛼𝑥1 𝑡 + 𝐻 𝛽𝑥2 𝑡
 Scaling: 𝐻 𝛼𝑥1 𝑡 = 𝛼𝐻{𝑥1 𝑡 }

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 36


Linear and Non-linear Systems
METU Computer Engineering

 More generally:
 If 𝑥𝑘 𝑡 → 𝑦𝑘 𝑡 then 𝑘 𝑎𝑘 𝑥𝑘 (𝑡) → 𝑘 𝑎𝑘 𝑦𝑘 (𝑡)
 The discrete case is similar.

 Are the following linear?


1. 𝑦 𝑡 = 2𝑥(𝑡)
2. 𝑦 𝑡 = 𝑥(𝑡) + 1
3. 𝑦 𝑡 = 𝑥 𝑡 2
4. 𝑦 𝑛 = 𝑛/(𝑥[𝑛 − 1])2
Apr-14 F. Y. Vural & S. Kalkan - CEng 384 37
System Properties: Time-invariance
METU Computer Engineering

 A system is time-invariant if:


 Shifting time shifts the output as well, i.e.:
 𝑦 𝑡 = 𝐻{𝑥 𝑡 } implies 𝑦 𝑡 + 𝛿 = 𝐻{𝑥 𝑡 + 𝛿 }

 Are these time-invariant?


1. 𝑦 𝑡 = 𝑥 𝑡 + 1
2. 𝑦 𝑡 = 𝑥 𝑡 × 𝑡
3. 𝑦 𝑛 = 𝑛 × 𝑥 𝑛 2

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 38


System Properties: Memory
METU Computer Engineering

 A system is said to be memoryless if the


output at time 𝑡0 depends on only at the input
at time 𝑡0 .
 i.e., 𝑦 𝑡 = 𝑓(𝑥 𝑡 ).
 Are the following memoryless?
1. 𝑦 𝑡 = 𝑥 𝑡 + 𝑡 − 1
2. 𝑦 𝑡 = 𝑥(𝑡 − 1)
3. 𝑦 𝑛 = 𝑛𝑘=−∞ 𝑥[𝑘]
4. 𝑦 𝑛 = 𝑥[−𝑛]
Apr-14 F. Y. Vural & S. Kalkan - CEng 384 39
System Properties: Invertibility
METU Computer Engineering

 A system is invertible if distinct inputs lead to


distinct outputs.
 E.g., 𝑦(𝑡) = 2𝑥(𝑡) is invertible whereas
𝑦(𝑡) = 𝑥 𝑡 2 is not.
 Invertibility is an important property that we
seek in systems
 Especially in transmitting information

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 40


System Properties: Stability
A system is said to be stable if small changes in input
METU Computer Engineering

do not lead to divergence in output.


 Put differently, in stable systems, bounded inputs
lead to bounded outputs.
 Tip for checking stability:
 Replace x(t) with a constant and see whether the output is
constant.

 Are the following stable?


1. 𝑦 𝑡 = 𝑥 𝑡 2 − 3𝑥(𝑡)
2. 𝑦 𝑡 = 𝑡 × 𝑥(𝑡)
Apr-14 F. Y. Vural & S. Kalkan - CEng 384 41
Summary
Properties
METU Computer Engineering

Signals Systems
 Periodic Signals  Memory

 Energy vs. Power Signals  Stability

 Odd vs. Even Signals  Time-invariance

 Exponential Signals  Linearity

 Complex Signals  Causality

 Invertibility

Apr-14 F. Y. Vural & S. Kalkan - CEng 384 42

You might also like