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

Lecture 1

Signals and systems

Prof. Tadeusz Stepinski


tstepin@agh.edu.pl

POPRAWIC pszyklady

Introduction to linear time-invariant (LTI) systems


Time domain description of LTI systems
Frequency response of LTI systems
Sampling and Discrete Fourier Transform
Laplace transform and continuous filters
z-Transform and digital filter design
Correlation and spectral analysis
Hilbert Transform and wavelets

1
Feb 2020
Lecture 1

Lectures in Signals and Systems

REQUIREMENTS to pass the course

– Participate in the lectures


– Study the textbook – solve recommended problems in the book
– Solve the Matlab lab exercises (homework problems)
– Solve the MATLAB problems in the Examination (Assignments will be
provided in the end of May)
– Submit written report with solutions before June 14th

2
Feb 2020
Lecture 1

Recommended textbook
- Hwei P. Hsu, Theory and Problems of Signals and Systems,
Schaum’s Outlines, McGraw-Hill, 1995.
- Monson H. Hayes, Theory and Problems of Digital Signal
Processing, Schaum’s Outlines, McGraw-Hill, 1999.

3
Feb 2020
Lecture 1

Signals and systems

Prof. Tadeusz Stepinski

Lecture 1.

Introduction to signals and systems

• Signal classification
• Complex numbers
• Description of continuous-time signals
• Description of discrete-time signals

4
Feb 2020
Lecture 1

Lectures in Signals and Systems

Signals and systems – basic terms

5
Feb 2020
Lecture 1

Signals and Systems Defined

• A signal is any physical phenomenon which conveys information


• Systems respond to signals and produce new signals
• Excitation signals are applied at system inputs and response signals are
produced at system outputs

Input signal x(t) Output signal y(t)


Input
SYSTEM Output

6
Feb 2020
Lecture 1

System?

A system is an object with one or more input signals and one or more
outputs

System

x(t) y(t)

Insignaler Utsignaler

7
Feb 2020
Lecture 1

Signal examples
A signal carries an information

• Seismic exploration • Seismic signal

8
Feb 2020
Lecture 1

Signal transmitted via a system

9
Feb 2020
Lecture 1

Signal classification

10
Feb 2020
Lecture 1

Determinstic signals

Real valued signals

A complex valued sine

11
Feb 2020
Lecture 1

Stochastic signals (noise)

• How do we model an ECG signal?


– For example, adjusting the model features + stochastic variations

Variations that cannot be easily


modelled
(e.g. Gaussian noise)

12
Feb 2020
Lecture 1

Signal Types

13
Feb 2020
Lecture 1

Signal-to-noise ratio

• Signal-to-Noise Ratio = SNR

PS
SNR = 10 log
PN
– PS = signal power
– PN = noise power

– Measurement of SNR is problematic.


How to measure the signal without
noise?
Sound of the word “signal” with
different noise level added

14
Feb 2020
Lecture 1

Quantization

• Quantization in amplitude means that you


lose accuracy
• General: the more quantization levels the
better the image.
• The number quantization levels determined
by the number of bits in the A/D converter

– Ex. N = 8 bits represent 2^8 = 256 levels.

Amplitude quantization

15
Feb 2020
Lecture 1

Signal processing

Signal filtering to reveal information Image processing to reveal


information

16
Feb 2020
Lecture 1

Signal processing – JPEG compression

Example – Lena’s image


Original

JPEG (4:1) JPEG (100:1)

17
Feb 2020
Lecture 1

Continuous and discrete signals


Original signal
1
• Continuous-time signals 0.5
– Continuous amplitude
0
– Discrete amplitude (A/D resolution)
-0.5

-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
t/p
• Discrete-time signals (discrete time) 1
Time-discrete signal

– Continuous amplitude 0.5

-0.5

-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
t/p
Time- & amplitude-discrete signal
• Digital = discrete-time and discrete- 1

amplitude 0.5

-0.5

-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
t/p
18
Feb 2020
Lecture 1

Sampling

• Discretization of an analog signal is called sampling, and means that one reads the
signal amplitude at certain specified times.

• How is the information of the signal is sampled? Is there any information left after
sampling? (Answer later in this course)

Music signal

0.3
0.2
0.1
0
-0.1
-0.2

1 2 3 4 5 6 7 8 9 10 11
Time [ms]
Sampled music signal
0.4
0.3
0.2
0.1
0
-0.1
-0.2
-0.3
0 10 20 30 40 50 60 70 80 90 100
Samples

19
Feb 2020
Lecture 1

Conversions Between Signal Types

Sampling

Quantizing

Encoding

20
Feb 2020
Lecture 1

Periodic Sampling
• Sampling is, in general, not reversible

0.5

-0.5

-1
0 20 40 60 80 100

Fundamental issue:
• Under which conditions an analog signal can be sampled without loss so that it
can be reconstructed perfectly?

21
Feb 2020
Lecture 1

Discrete-Time Systems

In a discrete-time system events occur at points in time but not


between those points. The most important example is a digital
computer. Significant events occur at the end of each clock
cycle and nothing of significance (to the computer user) happens
between those points in time.

Discrete-time systems can be described by difference (not differential)


equations. Let a discrete-time system generate an excitation signal y[n]
where n is the number of discrete-time intervals that have elapsed since
some beginning time n = 0.

Then, for example a simple discrete-time system might be


described by

y [ n ] = 1.97 y [ n − 1] − y [ n − 2 ]

22
Feb 2020
Lecture 1

Discrete-Time Systems
The equation

y [ n ] = 1.97 y [ n − 1] − y [ n − 2 ]
says in words

“The signal value at any time n is 1.97 times the signal value at the
previous time [n -1] minus the signal value at the time before that
[n - 2].”

If we know the signal value at any two times, we can compute its
value at all other (discrete) times. This is quite similar to a
second-order differential equation for which knowledge of two
independent initial conditions allows us to find the solution for all
time and the solution methods are very similar.

23
Feb 2020
Lecture 1

Discrete-Time Systems
y [ n ] = 1.97 y [ n − 1] − y [ n − 2 ]
We could solve this equation by iteration using a computer.
yn = 1 ; yn1 = 0 ; Initial Conditions
while 1,
yn2 = yn1 ; yn1 = yn ; yn = 1.97*yn1 - yn2 ;
end

We could also describe the system with a


block diagram.

(“D” means delay one unit in discrete time.)

24
Feb 2020
Lecture 1

Discrete-Time Systems

y [ n ] = 1.97 y [ n − 1] − y [ n − 2 ]
With the initial conditions y[1] = 1 and y[0] = 0 the response is

25
Feb 2020
Lecture 1

Feedback Systems
In a feedback system the response of the system is “fed back” and
combined with the excitation is such a way as to optimize
the response in some desired sense. Examples of feedback
systems are:

1. Temperature control in a house using a thermostat


2. Water level control in the tank of a flush toilet.
3. Pouring a glass of lemonade to the top of the glass without
overflowing.
4. A refrigerator ice maker that keeps the bin full of ice
but does not make extra ice.
5. Driving a car.

Feedback systems can be continuous-time or discrete-time


or a mixture of the two.

26
Feb 2020
Lecture 1

Feedback Systems

Below is an example of a discrete-time feedback system. The


response y[n] is fed back through two delays and gains b and c
and combined with the excitation x[n]. Different values of a,
b and c can create dramatically different responses to the same
excitation.

27
Feb 2020
Lecture 1

Feedback Systems

Responses to an excitation that changes from 0 to 1 at n = 0.

28
Feb 2020
Lecture 1

Sound Recording System

29
Feb 2020
Lecture 1

Recorded Sound as a Signal Example

• “s” “i” “gn” “al”

30
Feb 2020
Lecture 1

Complex numbers

31
Feb 2020
Lecture 1

Complex Numbers (repetition)

Girolamo’s Problem

In The Great Art, published in 1545, Girolamo Cardano discusses the following problem.

No Intersection!
x + y = 10
xy = 40
12

10

To find x and y, use substitution 8

x(10 - x) = 40
6

- x 2 + 10 x - 40 = 0 2

Apply the Quadratic Formula. 5 10 15 20

- 10 ± 10 2 - 4 × (-1) × (-40)
x=
-2
= 5 ± - 15
Due to the symmetry in the problem, x and y take on ± values.
32
Feb 2020
Lecture 1

Complex Numbers, that * Thing

We can take the complex conjugate of a complex number

Example:

We can find its modulus

Example:

33
Feb 2020
Lecture 1

Complex Numbers, Modulus

Modulus

Modulus is the length of the complex number in the complex plane

real axis

imaginary axis

34
Feb 2020
Lecture 1

Complex Numbers, Euler

Euler’s formula

Example:

The modulus of

Some important cases:

35
Feb 2020
Lecture 1

Complex Numbers, Phases

Euler’s formula geometrically

real axis

phase angle

imaginary axis

Multiplying phases is beautiful

Conjugating phases is also beautiful

36
Feb 2020
Lecture 1

Mathematical Description of
Continuous-Time Signals

37
Feb 2020
Lecture 1

Typical Continuous-Time Signals

38
Feb 2020
Lecture 1

Continuous vs Continuous-Time Signals

All continuous signals that are functions of time are


continuous-time but not all continuous-time signals are continuous

39
Feb 2020
Lecture 1

Continuous-Time Sinusoids

() ( ) (
g t = Acos 2π t / T0 + θ = Acos 2π f0t + θ = Acos ω 0t + θ ) ( )
↑ ↑ ↑ ↑ ↑
Amplitude Period Phase Shift Cyclic Radian
(s) (radians) Frequency Frequency
(Hz) (radians/s)

40
Feb 2020
Lecture 1

Continuous-Time Exponentials

g ( t ) = Ae−t /τ
↑ ↑
Amplitude Time Constant (s)

41
Feb 2020
Lecture 1

Complex Sinusoids

42
Feb 2020
Lecture 1

Basic signals
sign

ì sign(t ) = 1 "t > 0 1


ï
• Sign signal í sign(t ) = -1 "t < 0 t
ïsign(0) = 0 by convention
î -1
U

• Step signal also called ìU (t ) = 1 "t > 0 1


í
î U (t ) = 0 else
Heavyside signal
t
r

r (t ) = t.U (t )
• Ramp signal 1

t
u 1

• Door signal ìP(t ) = 1 " t < 1 1


í
î P(t ) = 0 else t
-1 1

43
Feb 2020
Lecture 1

The Signum Function

⎧ 1 , t > 0⎫
⎪ ⎪
sgn ( t ) = ⎨ 0 , t = 0 ⎬
⎪−1 , t < 0 ⎪
⎩ ⎭

Precise Graph Commonly-Used Graph

The signum function, in a sense, returns an indication of the sign of its


argument.

44
Feb 2020
Lecture 1

The Unit Step Function

⎧1 , t > 0

u ( t ) = ⎨1 / 2 , t = 0
⎪0 , t < 0

The product signal g ( t ) u ( t ) can be thought of as the signal g ( t )


“turned on” at time t = 0.

45
Feb 2020
Lecture 1

The Unit Ramp Function

⎧t , t > 0 ⎫ t
ramp ( t ) = ⎨ ⎬ = ∫ u (λ ) dλ = t u (t )
⎩ 0 , t ≤ 0 ⎭ −∞

46
Feb 2020
Lecture 1

The Unit Rectangle Function

⎧ 1 , t <1/ 2⎫
⎪ ⎪
rect ( t ) = ⎨1 / 2 , t = 1 / 2 ⎬ = u ( t + 1 / 2 ) − u ( t − 1 / 2 )
⎪ 0 , t > 1 / 2⎪
⎩ ⎭

The product signal g ( t ) rect ( t ) can be thought of as the signal g ( t )


“turned on” at time t = − 1 / 2 and “turned back off” at time t = + 1 / 2.

47
Feb 2020
Lecture 1

The Unit Step and Unit Impulse

As a approaches zero, g ( t ) approaches a unit


step and g′ ( t ) approaches a unit impulse.

The unit step is the integral of the unit impulse and


the unit impulse is the generalized derivative of the
unit step.

48
Feb 2020
Lecture 1

Graphical Representation of the Impulse

The impulse is not a function in the ordinary sense because its


value at the time of its occurrence is not defined. It is represented
graphically by a vertical arrow. Its strength is either written beside
it or is represented by its length.

49
Feb 2020
Lecture 1

Properties of the Impulse

The Sampling Property


∫ g (t )δ (t − t ) dt = g (t )
−∞
0 0

The sampling property “extracts” the value of a function at


a point.
The Scaling Property

δ ( a ( t − t 0 )) =
1
δ (t − t0 )
a
This property illustrates that the impulse is different from
ordinary mathematical functions.

50
Feb 2020
Lecture 1

The Unit Periodic Impulse

The unit periodic impulse is defined by



δT (t ) = ∑ δ (t − nT ) , n an integer
n=−∞

The periodic impulse is a sum of infinitely many uniformly-


spaced impulses.

51
Feb 2020
Lecture 1

Combinations of Functions

52
Feb 2020
Lecture 1

Shifting and Scaling Functions


⎛ t − t0 ⎞
Simultaneous scaling and shifting g ( t ) → Ag ⎜
⎝ a ⎟⎠

53
Feb 2020
Lecture 1

Sums of Periodic Functions

The period of the sum of periodic functions is the least common


multiple of the periods of the individual functions summed. If the
least common multiple is infinite, the sum function is aperiodic.

54
Feb 2020
Lecture 1

Signal Energy and Power

The signal energy of a signal x ( t ) is


∫ x ( t ) dt
2
Ex =
−∞

55
Feb 2020
Lecture 1

Signal Energy and Power

Some signals have infinite signal energy. In that case


It is more convenient to deal with average signal power.
The average signal power of a signal x ( t ) is
T /2
1
∫ x ( t ) dt
2
Px = lim
T →∞ T
−T /2

For a periodic signal x ( t ) the average signal power is


1
Px = ∫ x ( t ) dt
2

T T
where T is any period of the signal.

56
Feb 2020
Lecture 1

Signal Energy and Power

A signal with finite signal energy is called an energy signal.

A signal with infinite signal energy and finite average signal power
is called a power signal.

57
Feb 2020
Lecture 1

Mathematical Description of
Discrete-Time Signals

58
Feb 2020
Lecture 1

Sampling and Discrete Time

Sampling is the acquisition of the values of a continuous-time signal


()
at discrete points in time. x t is a continuous-time signal, x ⎡⎣ n ⎤⎦ is a
discrete-time signal.

( )
x ⎡⎣ n ⎤⎦ = x nTs where Ts is the time between samples

59
Feb 2020
Lecture 1

Sampling and Discrete Time

60
Feb 2020
Lecture 1

Sinusoids

Periodic Periodic

Periodic Aperiodic

61
Feb 2020
Lecture 1

Sinusoids

62
Feb 2020
Lecture 1

Exponentials

Real α Complex α

63
Feb 2020
Lecture 1

The Unit Impulse Function

⎧1 , n = 0
δ [n] = ⎨
⎩0 , n ≠ 0

The discrete-time unit impulse (also known as the “Kronecker


delta function”) is a function in the ordinary sense (in contrast
with the continuous-time unit impulse). It has a sampling property,

∑ Aδ [ n − n ] x [ n ] = A x [ n ]
0 0
n=−∞

but no scaling property. That is,


δ [ n ] = δ [ an ] for any non-zero, finite integer a.

64
Feb 2020
Lecture 1

The Unit Sequence Function

⎧1 , n ≥ 0
u[n] = ⎨
⎩0 , n < 0

65
Feb 2020
Lecture 1

The Signum Function

⎧1 , n > 0

sgn ⎡⎣ n ⎤⎦ = ⎨0 , n = 0
⎪−1 , n < 0

66
Feb 2020
Lecture 1

The Unit Ramp Function

⎧n , n ≥ 0 ⎫ n
ramp [ n ] = ⎨ ⎬ = n u [ n ] = ∑ u [ m − 1]
⎩0 , n < 0 ⎭ m=−∞

67
Feb 2020
Lecture 1

The Periodic Impulse Function


δ N [n] = ∑ δ [ n − mN ]
m=−∞

68
Feb 2020
Lecture 1

Differencing

69
Feb 2020
Lecture 1

Periodic Functions

A periodic function is one that is invariant to the


change of variable n → n + mN where N is a period of the
function and m is any integer.

The minimum positive integer value of N for which


g [ n ] = g [ n + N ] is called the fundamental period N 0 .

70
Feb 2020
Lecture 1

Signal Energy and Power

The signal energy of a signal x [ n ] is


∑ x[n]
2
Ex =
n=−∞

71
Feb 2020
Lecture 1

Signal Energy and Power

x [ n ] = 0 , n > 31

72
Feb 2020
Lecture 1

Signal Energy and Power

Some signals have infinite signal energy. In that case


It is usually more convenient to deal with average signal
power. The average signal power of a signal x [ n ] is
1 N −1
∑ x[n]
2
Px = lim
N →∞ 2N
n=− N

For a periodic signal x [ n ] the average signal power is


1
∑ x[n]
2
Px =
N n= N
⎛ The notation ∑ means the sum over any set of ⎞
n= N
⎜ ⎟
⎝ consecutive n 's exactly N in length. ⎠

73
Feb 2020
Lecture 1

Signal Energy and Power

A signal with finite signal energy is called an energy signal.

A signal with infinite signal energy and finite average signal


power is called a power signal.

74
Feb 2020
Lecture 1

Matlab Homework

75
Feb 2020
Lecture 1

Matlab Homework

76
Feb 2020

You might also like