0% found this document useful (0 votes)
13 views

Chapter 1 Introduction To Signals - QS - Archive

Uploaded by

lamyatkam2002615
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Chapter 1 Introduction To Signals - QS - Archive

Uploaded by

lamyatkam2002615
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 127

ELEC1010 Electronic & Information Technology

Chapter 1 --
Introduction to Signals

P.1
ELEC1010 Electronic & Information Technology

Lecture 2

Introduction to Signals and Systems

P.2
What Is Signal?
• Signal: A pattern or variation that contains information.
A signal can be what we see, hear, touch, smell, taste and visualize.
Examples: Audio, image and video signals.

P.3
Signal is Everywhere
A signal can be contained in what we do not sense directly
Radio, cellular phone, and wireless LAN signal

Car Camera
Signals in science (Physics)
Gamma ray from the universe High-energy particle tracks

P.4
Signal Conveys Information
X-ray
Hang Seng Index Electrocardiogram

Movie

Signals carry information.


Signals may bring stimulations and enjoyment.
P.5
Representation of Signal
• Before we discuss how to process signals we need to
discuss how we represent (describe) signals.

• Often, signal is the variation of some physical quantity


over time.
Variation of the Hang Seng Index Sound Signal – Variation of Acoustic Pressure
over one year over 1/20 of a second

50 msec

P.6
Representation of Signal
• Signal can be variations of some physical quantity over
space.

Lena – The standard picture in image processing.


• Brightness of pixels (picture elements)
over two-dimensional space.

P.7
Representation of Signal
• Signal can be variations of some physical quantity over
space.

_______________________

• Brightness of pixels (picture elements) • Brightness of pixels along the selected


over two-dimensional space. red line ( one-dimensional space).

P.8
Representation of Signal
• Signal can also be variations over both space and time.
Example: video

https://www.youtube.com/watch?v=FCY7E0oHW6Y

But in engineering, it is often very important for us to


think of signals as functions of frequency. (to be
discussed in lecture 3)
P.9
Discussion

P.10
Analog Signals
• Analog signals are signals that vary continuously over time
with arbitrary continuous values.

• Many real-life quantities such as length, weight, force, acoustic


pressure, electrical current, etc., are viewed as analog signals.

Analog Signal –
Acoustic Pressure; Electrical Current

time
P.11
Digital Signals
• Digital signals are signals that are defined only at discrete
time instances and can take on a finite set of values.

• All the signals processed by modern computers are processed


as digital signals.

Digital Signal –
Student attendance at lecture
Hang Seng Index at end of day
MP3 Music file

P.12
Conversion Between Analog and Digital Signals

• We frequently convert between analog and digital signals (e.g.


to process analog audio signals by the computer).

Example: Sampling of Analog Music Signal for storage in a Digital CD

In sampling there is some


Analog Music Digital Music on CD approximation involved

P.13
Signals as Input and Output of Systems
• In scientific and engineering studies, everything can be modeled
as systems with signals as input and signals as output

Input Output
Signals System Signals

Examples:

System Input Output


iPhone radio signal audio signal
human auditory acoustic signal perception of sound
digital camera light signal digital image
bank account deposit/withdrawal account balance
interest rate
P.14
Human being as systems
• Thinking, Fast and Slow is a 2011 popular science
book by psychologist Daniel Kahneman. The book's
main thesis is a differentiation between two modes of
thought: "System 1" is fast, instinctive and emotional;
"System 2" is slower, more deliberative, and more
logical.
• System 1: Fast, automatic, frequent, emotional, stereotypic,
unconscious. Examples (in order of complexity) of things system 1 can
do:
• determine that an object is at a greater distance than another
• localize the source of a specific sound
• complete the phrase "war and ..."
• display disgust when seeing a gruesome image Nobel Memorial Prize in
• solve 2+2=? Economic Sciences (2002)
• read text on a billboard
• drive a car on an empty road
• think of a good chess move (if you're a chess master)
• understand simple sentences
• associate the description 'quiet and structured person with an eye
for details' with a specific job

https://en.wikipedia.org/wiki/Daniel_Kahneman P.15
Human being as systems
• System 2: Slow, effortful, infrequent, logical, calculating, conscious.
Examples of things system 2 can do:
• prepare yourself for the start of a sprint
• direct your attention towards the clowns at the circus
• direct your attention towards someone at a loud party
• look for the woman with the grey hair
• try to recognize a sound
• sustain a faster-than-normal walking rate
• determine the appropriateness of a particular behavior in a social
setting
• count the number of A's in a certain text
• give someone your telephone number
• park into a tight parking space
• determine the price/quality ratio of two washing machines Nobel Memorial Prize in
• determine the validity of a complex logical reasoning Economic Sciences (2002)
• solve 17 × 24

https://en.wikipedia.org/wiki/Daniel_Kahneman P.16
Signals Bring Interactions Among Systems
• Output signals from one system is often the input to another
system.
• Signals transfer information from one system to another system
and bring interactions among systems.

Glucose
Solar Radiation System 2:
System 1:
Photosynthesis
The Sun
in Plants
Electricity
System 3:
Solar Panel

Electrical Audible
Radio Signal
System 4: System 5: Signal System 6:
Wave
Radio Receiver Signal Processor
Transmitter Antenna & Speaker

P.17
Cell Phone – A Complex System in your Hand
• A system can be complex!
• E.g. The cell phone is a system that contains several sub-
systems (i.e. systems within a system), and many sub-sub-
systems within the sub-systems. The cell phone represents one
of the most complex systems ever invented (yet so compact,
multi-functional and popular!).

Small Power
Signal RF RF

Power
Management

Analog
Baseband

Digital Baseband
(DSP + MCU)

P.18
Discussion

P.19
Summary – Lecture 2
• We discussed analog and digital signals and systems.

• In the next four lectures for this chapter, we focus on


analog signals, and introduce two fundamental concepts for
the understanding of signals and their processing by
systems – spectrum and filtering.

• In Chapters 2, 3 and 4, we will discuss digitalization of


signals and how digital signals are processed.
Digitalization is the foundation of the modern information
age.

• Next, we start by looking at the sound signal as an example.


P.20
ELEC1010 Electronic & Information Technology

Lecture 3

Sound Signal, Frequency and Harmonics

P.21
What is Sound Signal?
• What is sound? What is in the sound signal that
determines what we hear?
• Sound is an audio signal that we hear through variations in
the air pressure that reaches our ears.
• Atmospheric pressure is ~100,000 Pa (Pascal: measure of
pressure, 1 Newton per square meter). Variation of as little as 1 Pa
would be a deafening sound to our ear!
• Let’s play a sound signal and plot this signal as a function
of time:

P.22
Manipulating Sound Signals
Let’s slow down and speed up how fast we play this sound
signal:

What is the difference in our perception of the sound? The


pitch of the music that we hear is changed along with the
speed we play back the music.

How do we explain this difference in perception?

P.23
Zooming in the plot of the Sound Signal
• When we zoom into the plot of the original sound signal to the
~20 ms time scale, we find different repetitive patterns at
different parts of the music:
Audio Signal over
9 seconds

A 20-millisecond A different 20-


piece of the signal millisecond piece of
the signal

10 ms 20 ms 10 ms 20 ms

• We find that the whole piece of music is actually a sequence of


sound bites, each lasting a fraction of a second with a
recognizable repetitive patterns.
P.24
Examples of Graphing Sound Signals
• When we plot different sound bites from different sources, we see
they are all made up of repetitive patterns, or oscillations. The
pattern may repeat quickly or slowly, look simple or complex, and
have a small or large amplitude.

time A tuning fork

time A guitar

time A singing bird

20 ms
P.25
Perception of Pitch of a Sound Signal
• It is the frequency in the repetitive pattern in each sound
bite that leads to our perception of a pitch. The faster the
pattern repeats, the higher the pitch.
• Speeding up or slowing down the music leads to a different
perception of the “pitch” of the sound that we hear.
Speeded Up by 1.5x

A 20-millisecond
piece of the signal

10 ms 20 ms

Slowed down by 2x
10 ms 20 ms

10 ms 20 ms
P.26
Discussion

P.27
Periodic Signal
• A signal that oscillates with a repetitive pattern is called a
periodic signal.

• Period: The repeating interval of a periodic signal, often


notated by T, as shown below:
Period T

time

You typically find a repeating interval from a fraction of 1 ms to


several ms in the sound signal we hear.
P.28
Fundamental Frequency
• Engineers also describe a periodic signal by its fundamental
frequency, f, which is the reciprocal of the period T :

f = 1/T

• The fundamental frequency is the repetition rate of the signal.


• Because period T has units of time (seconds), the unit of
frequency f is 1/seconds (or Hertz (Hz)).

e.g. A period T = 1 ms gives a fundamental frequency f = 1 kHz

P.29
A Simple Periodic Signal - Sinusoidal Signal
• We will now illustrate the perception of pitch by the
simplest periodic signal - the sinusoidal signal. (e.g. sound
of a tuning fork, or a person whistling) . A sinusoidal signal
is also called a sine wave

• A sinusoidal signal that repeats with period T is shown


below:
A sine wave

amplitude
Time

period frequency = 1/T


P.30
Mathematics: Sinusoidal Function in time
Mathematics of
a sine wave: A sin (2p ∙f ∙t)
signal amplitude time
(how large
sinusoidal function signal frequency f = 1/T
a signal is)
(the shape of (how frequent in time
the periodic signal) the periodic signal oscillates)
A sin (2pf t)
4
T = 4 ms
3

A
2
1. amplitude A = 3
1

0
t 2. period T = 4 ms
0 1 2 3 4 5 6 7 8 9
-1
3. frequency f = 250 Hz
-2

-3

-4
P.31
Simple example on Sinusoidal Signal
Suppose a sinusoidal signal has

Period T = 2.55 ms = 2.55 x 0.001 s

then,

Frequency f = 1/T = 1/(2.55 x 0.001 s) = 392 Hz

392 Hz is in fact the G note in music, or a “So” on the C scale


P.32
Discussion

P.33
Sine Waves of Different Frequencies Give us Different Pitches
Every music note we know has a specific pitch or fundamental frequency:
A 1

0.5 261.63 Hz Do
0
C4
-0.5
(middle C) t/sec
-1
0 1 2 3 4 5 6 7 8
-3
x 10

A1
0.5
293.66 Hz Re
0

-0.5
D4
-1
0 1 2 3 4 5 6 7 8
t/sec
-3
x 10

A1
0.5

0
329.63 Hz Me
-0.5 E4
-1
0 1 2 3 4 5 6 7 8
x 10
-3 t/sec
P.34
Sine Waves of Different Frequencies Give us Different Pitches

A1
0.5
349.23 Hz Fa
0
F4
-0.5

-1
0 1 2 3 4 5 6 7 8
t/sec
-3
x 10
A1
0.5
392.00 Hz So
0
G4
-0.5

-1
0 1 2 3 4 5 6 7 8
t/sec
-3
x 10
A1
0.5
440.00 Hz la
0

-0.5
A4
-1
0 1 2 3 4 5 6 7 8
t/sec
-3
x 10 P.35
Combining Different Notes in Time Gives Us a Song!
A 1

0.5
494.00 Hz t
0
B4
-0.5

-1
0 1 2 3 4 5 6 7 8
-3
t/sec x 10

Combining the notes together we get a piece of music! Listen


1

0.5

-0.5

-1
0 200 400 600 800 1000 1200 1400 1600 1800 2000

Me Me Far So So Far Me Re Do Do Re Me Me Re Re

We have specified this piece of music as a sequence of music notes!

P.36
Example: Fundamental Frequencies in a piano
• Different keys on the piano keyboard produce sounds at specific
pitches, called notes, labeled A to G (for the simple scale).

middle C

P.37
Quality of a Musical Tone

• The simple sinusoidal signals we played do not sound like


piano notes at all! Their tone sounds “pure” and does not
have any “richness!”

• In general, when the same note is played or sung by a


guitar, a piano, a violin, a flute, you, and me, it sounds
different even if it is at the same pitch (fundamental
frequency) and has the same loudness (amplitude). Why?

P.38
Sound: Pitch, Loudness and Timbre
• Our ears distinguish sounds primarily by distinguishing
three attributes of the sound signal: pitch, loudness, and
timbre.
• The fundamental frequency of a sound signal leads to
our perception of the pitch. The higher the fundamental
frequency, the higher the pitch.

• The larger the amplitude of the oscillation, the louder is


the sound. Perception of loudness is on a logarithmic
scale.
(logarithmic scale spans wide range of values from 100 = 1,
101 = 10, 102 = 100, … e.g. if a person’s whisper has
loudness measured at 100, then a thunderstorm loudness
may be measured at 1010). 60-70 dB is normal conversation
194 dB - a 1 pascal sound

• Timbre refers to the quality of the sound. Timbre is


determined by the details of the repetitive pattern of the
sound signal. P.39
Example: same note sung by different persons
• Different sequences of sound bites give us our perception of
speech and music!
period 4 ms

A note sung by Ming Time (ms)

0 4 8 12
• Note the different
repeating structures
period 4 ms

The same note sung by


Time (ms)
Mei

0 4 8 12
P.40
So pure sinusoidal signals only have simple periodic
variations. But periodic signals generated by piano and
voices are generally more complex!
1.5
T T
1

0.5

0
0 1 2 3 4 5 6 7 8 9
-0.5

-1

-1.5

• What is in the complex pattern that leads to our perception


of timbre or richness?
• Are there some simple ways to understand and describe
the more complex periodic signals?
P.41
Harmonics --- multiples of the Fundamental Frequency
• We can answer many of our questions by introducing the
concept of harmonics. It is the harmonics that produce
different repetitive patterns of the same period and give
us the perception of timbre or richness in sound.
• Harmonics are sine waves at n (an integer) times the
fundamental frequency. (n = 1, 2, 3, …)
• Adding harmonics together does not affect the
fundamental frequency f and period T = 1/f, because all
harmonics repeat at the same time period T.
• Periodic signals with different repetitive patterns
contains different amount/amplitudes of harmonics.
• It is the harmonics that give us the perception of timbre in
sound
P.42
Summary –Lecture 3
• Sound is the variation in acoustic pressure that reaches
our ears.
• The pitch of sound is determined by the fundamental
frequency of the sound signal.
• The quality, or timbre, of sound is determined by the
amount of different harmonics. (We will discuss more on
harmonics in Lecture 4.)
• The human auditory system primarily responds to the
different sine waves in the sound signal.

P.43
ELEC1010 Electronic & Information Technology

Lecture 4

Signals as Sum of Sine Waves

P.44
Fundamental Frequency and Harmonics
• We introduced the fact that our ear basically responses to the
sine waves in sound signals.

For any sinusoidal signal with frequency f,


sinusoidal signals with frequencies of “integer x f” are
known as its harmonics.

(e.g. f = 250 Hz, 2f = 500 Hz, 3f = 750 Hz, 4f = 1000 Hz)

(e.g. 375 Hz = 1.5f is not a harmonic of f)

Sinusoidal signal with frequency “f” is the “1st harmonic.”


(“f” is also known as the “fundamental frequency.”)

Sinusoidal signal with frequency “2f” is the “2nd harmonic.”

Sinusoidal signal with frequency “3f” is the “3rd harmonic,” and so forth.

P.45
Examples of Harmonics
1.5 1.5 3T3= 4 ms
T = 4 ms
1 1

0.5 0.5

0 0
0 1 2 3 4 5 6 7 8 9 0 2 4 6 8
-0.5 -0.5

-1 -1

-1.5 -1.5

Fundamental = f = 1/4ms = 250 Hz 3rd harmonic = 3f = 3 x 1/4ms = 750 Hz

1.5 2T2 = 4 ms 1.5 4T4= 4 ms


1 1

0.5 0.5

0 0
0 1 2 3 4 5 6 7 8 9 0 2 4 6 8
-0.5 -0.5

-1 -1

-1.5 -1.5

2nd harmonic = 2f = 2 x 1/4ms = 500 Hz 4th harmonic = 4f = 4 x 1/4ms = 1000 Hz

P.46
Example: Making complex periodic signals
• Adding harmonics does not change the fundamental
frequency (period) of a signal, i.e. the signal still repeats
with period T
• In the example below, we add together a sine wave at
250 Hz with its 2nd harmonic (sine wave at 500 Hz) of
equal amplitude:
Example:
T = 4 ms 2T2 = 4 ms

Fundamental = f = 1/4ms = 250 Hz 2nd harmonic = 2f = 2 x 1/4ms = 500 Hz


P.47
Example: Making complex periodic signals
• At each point, we add the value of the two sine waves. The result is
a more complex waveform. But the fundamental frequency (period
T) remains the same.
Point1 Point 2
1.5

0.5
• At Point 1,
0
Red Signal =1
-0.5
0 1 2 3 4 5 6 7 8 9
Green Signal = 0
-1
Resultant Signal = 1 + 0 = 1
-1.5

2 • At Point 2,
1.5 Red Signal = 0.7
1 Green Signal = -1
0.5 Resultant Signal = 0.7 + (-1) = -0.3
0
0 1 2 3 4 5 6 7 8 9
-0.5

-1

-1.5

-2
P.48
Example - Adding different amounts of harmonics
• We can add different amounts of harmonics. The fundamental
frequency remains the same.
1
1st harmonic +
0.8

0.6
2nd harmonic
1st harmonic 0.4
1.5

0.2

(Fundamental 0
1

-0.2

frequency) -0.4
0.5

-0.6 + 0

-0.8

-1 -0.5
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

-1

-1.5
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

0.5

0.4

1st harmonic +
0.3

0.2

2nd harmonic 0.1

2nd harmonic+
-0.1

-0.2

-0.3

-0.4

3rd harmonic
-0.5
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

1.5

0.5

0.25

0.2

0.15

0.1
+ 0

3rd harmonic
0.05

-0.05

-0.1 -0.5
-0.15

-0.2

-0.25
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

-1

-1.5
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

P.49
Harmonics and “Timbre/Quality” of Sound

• It is the sum of the harmonics that produces the complex patterns that
we observe in sound signals.
• While the pitch of the sound we hear is determined by the fundamental
frequency of the repetitive pattern, the “quality” of the sound is
determined by the relative amounts (amplitudes) of the harmonics!
• A tone with only the 1st harmonic (i.e. the fundamental) is a “pure”
tone! Its signal is a pure sine wave (e.g. a tuning fork, a nice whistle)

1.5

0.5

0
0 2 4 6 8
-0.5

-1

-1.5

• A tone with many strong harmonics is a “rich” tone!


So a guitar produces a different distribution of harmonics than
a piano or a violin or a flute or any musical instrument or you or me!
P.50
Discussion

P.51
Frequency Domain Representation of Signals
• Since it is the sine waves that matter to our ear, it is helpful to have a
simple way to describe what sine waves there are in the signal.
• So, instead of drawing a sine wave in the time domain, we can represent
the fact that we have a sine wave at 261.63 Hz with amplitude of 1 by
drawing an arrow with amplitude 1 at the corresponding location on a
frequency axis.
Time Domain Representation: Waveform
1

0.5

A 0

-0.5

-1
0 1 2 3 4 5 6 7
-3
8
t/sec
Axis: time x 10

Domain conversion is done by using Fourier Transform

amplitude Frequency Domain Representation: Spectrum Do


1

261.63 Hz Axis: frequency


P.52
Waveform vs. Frequency Spectrum….

..and if we have a sine wave at 293.66 Hz. We draw


an arrow at 293.66 Hz
Waveform
1
A
0.5

-0.5

-1
t/sec
0 1 2 3 4 5 6 7 8
-3
x 10

amplitude
Spectrum
1 Re

293.66 Hz

P.53
Waveform vs. Frequency Spectrum……

…or 329.63 Hz Waveform


A 1

0.5

-0.5

-1
0 1 2 3 4 5 6 7 8
-3
x 10

t/sec

amplitude Spectrum
1 Me

329.63 Hz

P.54
And if we have a fundamental frequency plus its harmonics….

0.8
1
Signal x1(t) Spectrum X1(f)
0.6

0.4
1st + 2nd harmonics
1st harmonic 0.2

(Fundamental -0.2
0 1.5
“1st”
1

frequency) -0.4

“2nd”
-0.6

-0.8
0.5 1
-1
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01 + 0

-0.5

-1

0.5
-1.5
0.4 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

2nd harmonic 0.3

0.2 250 500 Hz


0.1

-0.1

-0.2

-0.3
Signal x2(t) Spectrum X2(f)
1st +2nd+3rd harmonics
-0.4

-0.5

“1st”
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

1.5

“2nd”“3rd”
1

0.5
1
+ 0

-0.5

0. 25

0. 2

0. 15

0. 1

0. 05
-1
0

3rd harmonic
-0. 05

-0. 1

-0. 15

-0. 2

-0. 25
-1.5
0 0. 001 0. 002 0. 003 0. 004 0. 005 0. 006 0. 007 0. 008 0. 009 0. 01 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

250 500 750 Hz


We can readily explain how the two signals are different by referring
to their spectra! P.55
Spectrum as Energy at Different Frequencies
• The spectrum represents, over the time interval of concern, the
amplitude, or the amount of energy, in the signal at different
frequencies.
• For example, the spectrum below tells us that when we pluck
the “C” note on the guitar, the energy is concentrated at the 1st,
2nd and 3rd harmonics.

“guitar”
2.5 3.83 ms
2

1.5
“1st” “2nd” “3rd”
1

0.5
1
0
0 1 2 3 4 5 6 7 8 9
-0.5

-1

-1.5

-2
261 522 783 Hz
-2.5

time (ms)
P.56
Discussion

P.57
Spectrum as Variable over Time
• What do we mean by “over the time interval of concern?”
• Consider the fact that for a piece of musical instrument, not the
same note is played all the time, and even as a specific note is
played, the amplitudes of different harmonics actually varies as a
function of time. We can plot how the harmonics change with time
in what is called a spectrogram, as illustrated below:
Trumpet Clarinet

Most energy in 5th harmonic


2nd harmonic
is the strongest

time
P.58
Spectrum as Variable over Time
2nd harmonic
is the strongest

time

P.59
Spectrum and Spectrogram

• The spectrogram plots how much of each harmonic there is in the


signal at different times after a note is played. Each harmonic is a
sine wave at frequency n x f.

• It is the details in how the harmonics change over time that give us
the full perception of how a trumpet is different from a clarinet.

• So a spectrum is like a cross-section of the spectrogram at a given


time. A spectrum can also be viewed as an average of many
cross-sections of the spectrogram.

• That interval of averaging depends on the context of discussion.

P.60
Spectrum as a Distribution
• So, if we average the spectrogram of the trumpet and the clarinet
over a very long time such that many different notes are
played, the energy will be spread over a broad range of
frequencies and the spectrum will appear as a continuous
distribution.
• Often, when we talk about the spectrum of a signal, we refer to
this average distribution of signal energy at different frequencies
over a very long time.

A Generic Spectrum A Generic Spectrum


of the Trumpet of Human Speech

1,000 5,000 10,000 Hz 100 500 1,000 4,000 8,000 Hz

P.61
Property of Signals from Their Spectra
• The spectrum allows us to discuss the properties of the
signal in a generic way. For example:
- Human speech spectrum has negligible energy at
frequency > 4,000 Hz.
- Female speech has higher frequencies than male speech.
- Also, there is no energy at very low frequency.
Speech Spectrum
of Males

Speech Spectrum
of Females

100 500 1,000 4,000 8,000 Hz


P.62
Summary – Lecture 4

• Harmonics are sine waves that have frequencies at integer


multiples of the fundamental frequency.

• When we add harmonics together, we create complex periodic


patterns at the same fundamental frequency.

• Instead of representing a signal by drawing a waveform as a


function of time (in the time domain), we frequently represent a
signal by showing the amplitude of sine waves (or distribution of
energy) in the signal as a function of frequency (in the frequency
domain).

• We may show how this distribution changes as a function of time in


the form of a spectrogram, or the averaged distribution over a
long time in the form of a generic spectrum.
P.63
ELEC1010 Electronic & Information Technology

Lecture 5

Spectrum – Representation of Signals in the


Frequency Domain

P.64
Representing Signals in the Frequency Domain

Engineers use two equivalent ways to represent signals!


• Time-domain representation: plot the entire periodic
amplitude variations over time
• Frequency-domain representation: plot the amplitudes of
the sine waves at different frequencies

• We have shown that we can add harmonics together to


create complex waveform patterns. We can actually show a
stronger statement mathematically –

“Any periodic patterns can be created by adding up different


amounts of harmonics! This is known as Fourier series
decomposition.” We will not discuss the details.

P.65
Any Signal as a Sum of Sine Waves
• We can go one step further - we can simply take any chunk
of signal x(t) over an interval T, and we can treat the signal
as if it is periodic with period T, and we can find the set of
harmonic sine waves that will sum up to this signal
X(f) Amplitude of sine
x(t) waves at different
harmonic frequencies

=
f 2f 3f 4f 5f Hz
T time
1/T 2/T 3/T 4/T 5/T

y(t)
Y(f)

=
time T1 f1 2f1 3f1 4f1 5f1 6f1 7f1 8f1 Hz
P.66
Brief introduction to Fourier Transformation
• Fourier showed that any periodic signal s(t) can be written as
a sum of sine waves with various amplitudies, frequencies
and phases
𝑠 𝑡 = 𝑎0 + 𝑎1 sin(2𝜋𝑓 + 𝜙1 ) + 𝑎2 sin(4𝜋𝑓 + 𝜙2 )+ 𝑎3 sin(6𝜋𝑓 + 𝜙3 ) + ⋯

where 𝑎𝑖 's are amplitudes, 𝜙𝑖 's are phase shifts, and 𝑓 is the
fundamental frequency. The higher order frequencies 2f, 3f,
etc. are called harmonics.
1 1 1
𝑠 𝑡 = sin(2𝜋𝑓) + 3 sin(6𝜋𝑓)+ 5 sin(10𝜋𝑓) + 7 sin(14𝜋𝑓) + ⋯

https://mriquestions.com/fourier-transform-ft.html
P.67
Example Fourier transform pairs

https://mriquestions.com/fourier-transform-ft.html
P.68
Why Describing Signals in the Frequency Domain?
• Sine wave is what we see and hear. The tones we hear are
acoustic waves at different frequencies. The colors we see are
light waves at different frequencies (We will briefly discuss
electromagnetic waves at the end of this chapter).

• Modern communications systems are often based on


manipulations in the frequency domain – modulation, multiplexing,
etc. (We will discuss these topics in Chapter 5).

• We frequently use the spectrum


analyzer in the laboratory to analyze
the spectrum of a signal.

P.69
Spectrum Analyzer of a Real-Time Signal in Action
• In the Internet demo below, we can see a spectrum analyzer
in action analyzing a real time music. The spectrum
analyzer cuts up the music in time into “chunks” and
generates the spectrum of each chunk
http://en.wikipedia.org/wiki/File:My_Songo_Real_Time_Analysis.ogg

A real-time analysis of a song. This spectrum


analyzer output features frequency on X
(horizontal), magnitude on Y (vertical), and
moves through time in sequence with the song

We can see a similar demo here. The result is a spectrogram in


the form of a waterfall
https://www.youtube.com/watch?time_continue=22&v=qD1QdIrWofQ
P.70
Showing Spectrogram in 2-D or 3-D
• Without use of animation, we can also show a spectrogram as
a 2-D or 3-D plot below. In the 2-D plot, we use color to
indicate the amplitude of individual frequencies at different
times
A Speech Spectrogram in 2D Plot
A Trumpet Spectrogram in 3D Plot

Speech Spectrum as a function of time. Red means


large amplitude and Blue means small amplitude.

P.71
Spectrogram and Spectrum
• As described earlier, we can regard spectrum as a cross-section of
the spectrogram at a specific time.
• We can also regard the spectrum as the average distribution of
energy among different frequencies over a time interval.

Spectrum of the word ‘Ri’

P.72
Spectrogram of different instruments

https://www.youtube.com/watch?v=VRAXK4QKJ1Q
P.73
Spectrogram and Spectrum
• For the remainder of this course, we will forget about the
spectrogram and use spectrum to specify the distribution of
signal at different frequencies in a generic sense.
• Not only that the concept of spectrum is applied to acoustic and
electrical signals, it is widely applied to the understanding of
electromagnetic wave. Radiation from the sun, for example, is
made up of electromagnetic waves at various frequencies.

Spectrum of Typical
Human Speech
(In a generic sense,
averaged over a “long”
period of time)

3,000 4,000 Hz

P.74
Discussion

P.75
The Electromagnetic Spectrum
• The universe is filled with electromagnetic waves at a wide
range of frequency spectrum.

• The light we see are electromagnetic waves that reaches our


eyes. We see different colors when there are different
mixtures of frequencies in the electromagnetic waves.

• Heat from the sun reaches earth through infrared radiation,


which is electromagnetic waves at frequencies that our eyes do
not see but which produces warmth that our body can feel.

• The radio wave we use to transmit cell phone signals, X-ray,


light, are all electromagnetic waves at different frequencies.

P.76
What is Electromagnetic Wave?
• When charged particles (e.g. electrons) accelerate or
decelerate, electromagnetic wave (EM) wave is generated and
radiated at the speed of light, which is the highest speed
anything can travel at:
c  3 x 108 m/s
• Unlike sound, EM wave can travel in vacuum.
• How do we know of the presence of an EM wave? The radiated
EM wave exerts a force on remote charged particles! For the
case of visible light, the EM wave leads to our perception of
color.
• Like the gravity, electromagnetic force is one of the four
fundamental forces in physics. We do not see gravity, but we
see its effect!

P.77
Newton and the Spectrum of Light
• Newton, by the use of a prism, showed that sunlight can be
decomposed into different colors. He went on to show that
different light colors behave as waves of different frequencies /
wavelengths.
• Wavelength and frequency of visible light and all EM waves are
related by:
Wavelength (l) x frequency (f) = speed of light (c  3 x 108 m/s)
• The higher the frequency, the shorter the wavelength

P.78
• Nature is filled with EM waves over a broad spectrum.
• Radio wave has a wavelength of 1 km to 1 cm.
• Visible light, has a wavelength of around 0.5 mm.

Solar Radiation
Spectrum

P.79
Radio Spectrum as a Valuable Commodity
• For a little over 100 years, engineers have learned to use radio
wave, with frequency from ~100 KHz to ~30 GHz, to transmit
information. (For about 40 years, we have also used light waves
with frequency ~ 200 THz for communications … and microwave
with frequency ~ 2.4 GHz for cooking.)
• Today, many applications use different parts of the radio
spectrum to transmit information at the same time (radio and TV
broadcast, cell phone, walkie-talkie, GPS, Wi-Fi, Bluetooth, etc.).
• Use of radio spectrum is regulated by the government
• Some of you may be aware that mobile operators paid a lot of
money to bid for the spectrum for offering 4G mobile services.
• The next slide shows the allocation of radio spectrum by the U.S.
government as an example.

P.80
Spectrum Allocation
in the United States
• The high level allocation is shown
to the right. You may wonder how 1 GHz
different services use different
frequencies to communicate. We
will return to this question in
Chapter 5.
• The detailed table is extremely
complex, as shown below
1 MHz

100KHz

P.81
Summary – Lecture 5
• Engineers and scientists frequently talk about signals in terms of their
spectrum.

• In the laboratory, we use the spectrum analyzer to analyze the


frequency components in signals. A spectrum analyzer takes “chunks” of
the signal and compute the amounts of different sine waves contained in
them.

• The concept of spectrum is also applied to the understanding of


electromagnetic wave, through which signals are transmitted across the
universe and by mankind.

• Visible light, radio, microwave, X-ray, are all part of the electro-magnetic
spectrum

• Different parts of the radio spectrum are used by different


communications systems.
P.82
ELEC1010 Electronic & Information Technology

Lecture 6

Systems as Filters of Signals

P.83
Systems and Bandwidth
• As explained earlier, anything that processes signals can be
modeled as a system. Both signals and systems can be
thought of in the frequency domain.
• Physical systems inherently respond only to frequencies within
specific ranges. For example, the range of frequencies that
human can hear is approximately between 20 Hz and
20,000 Hz. This range of frequencies is called the audible
spectrum. Sound above 20,000 Hz is known as ultrasound.
Sound below 20 Hz is known as infrasound.
• The “width” of the audio “band” is approximately 20,000 Hz.
This is the bandwidth of the human ear as a system.
• Likewise, human eyes can see visible light which are
electromagnetic waves with frequencies between 400 and 800
Terahertz. This is the bandwidth of the human visual system.

P.84
Spectral Response of Human Ears
• For the same loudness, our ears hear the frequency range of 1
kHz to 5 kHz better than other frequencies.
• For lower and higher frequencies, e.g., below 60 Hz and above
10 kHz, our ears attenuate the signal and they sound weaker!
• In fact, we can describe the sensitivity of our ear to different
frequencies by a typical “spectral response curve”

“Ear response” Our ears response less


Hear very gradually (attenuate the
well! sound signal!)

Hear poorly …
f (Hz)
1 10 100 1k 10 k 100k

20 Audible “band” 20 k
or “spectrum”
P.85
Signal Processing in the Frequency Domain
• We can conveniently view systems as filters in the frequency
domain with a spectral response curve H, so that if spectrum
of the input is X, the spectrum of the output (Y) would be the
product of H and X. (H, X, Y are all functions of frequency)

input spectrum • filter spectral response = output spectrum


or XH=Y

X H Y (= HX)

P.86
Example: Mixer and Equalizer
• Mixer and Equalizer are audio equipment we use to
increases or decreases the sound level (amplitude) of
different frequencies in order to make different sound effects
or to compensate for effect of your speaker, transmission
wire, etc.

A professional mixer device in a


Mixer is also available on many software
recording studio
audio players
P.87
Equalizer illustrated
In this example, the equalizer boosts up the amplitude of the low
frequency (200 Hz) and attenuated the higher frequency (5 kHz)
amplitude amplitude

1 1
Equalize
3/4 3/4
1/2 1/2
1/4 1/4

200 1k 5k 25k f (Hz) 200 1k 5k 25k f (Hz)


log scale log scale

P.88
Lowpass, Bandpass and Highpass Filters
• Engineers frequently build three types of generic filters – the
lowpass, bandpass and highpass filters. They are the basic
building blocks of all signal processing systems. They can be
implemented as electrical circuits or in computer programs.

• They are defined in ideal forms, but there are fundamental


reasons that the ideal form cannot be perfectly realized, neither by
circuits nor by computer programs. In real systems, we build
practical filters that are as close to the ideal form as possible
subject to different criteria.

P.89
Lowpass filters
ideal
1 practical

0
fc
Bandwidth

• A lowpass filter only allows signal with low frequencies to


pass through.
• fc is the designed “cutoff frequency.” Sine waves with f < fc
can pass through. Sine waves with f > fc are blocked.
• The filter bandwidth is fc.

P.90
Operations with an Ideal Lowpass Filter

input (X) ● filter (H) = output (Y)


Discrete frequencies
1

0
0 1kHz 0 1kHz 0 1kHz

input (X) filter (H) output (Y)


Continuous
1

0
0 1kHz 0 1kHz 0 1kHz

P.91
Operations with a Practical Lowpass Filter

input (X) ● filter (H) = output (Y)

0
0 1kHz 0 1kHz 0 1kHz

input (X) filter (H) output (Y)

0
0 1kHz 0 1kHz 0 1kHz

P.92
Lowpass Filtering of Telephone Voice Spectrum
• The traditional telephone network often uses a lowpass filter with
cutoff frequency of ~3 KHz to filter the voice signal coming in from
the telephone line.

lowpass
filter junk

f/Hz f/Hz
0 3K 10k 20k 0 3K 10k 20k

• By lowpass filtering the signal, we suffer some distortion but as the


voice signal has little energy at high frequency, the distortion is
tolerable. In exchange, we have less costly communications
equipment which can now universally assume that the maximum
voice signal frequency is 4 KHz only. We also prevented junk
signals at high frequencies from getting into the network.
P.93
Bandpass Filters
ideal
1
practical

f/Hz
fL fH

Bandwidth
• A bandpass filter only allows signals within the designed
frequency range to pass through.
• fL and fH are lower and upper cutoff frequencies. Signals with
fH > f > fL can pass through. Other frequencies are blocked.
• fH – fL is the filter bandwidth (e.g. ears as bandpass filters have
a typical bandwidth of from 20 Hz to 20 KHz; tuner for an analog
TV has a filter bandwidth of 6 MHz to extract the audio and video
signal from the desired radio channel)
P.94
Selecting Channels with Bandpass Filters
e.g. In a radio, we select a channel at a particular frequency band by using a
(bandpass) filter.
“ideal”
input (X) ● filter (H) = output (Y)
20KHz
Signal
1 1 1 from a
desired
channel

0 0 0
0.98MHz 1MHz 1MHz 1MHz
too long
to draw
input (X) filter (H)
“practical” output (Y)
20KHz
1 Garbage/
interference

0
0 1MHz 0 1MHz 0 1MHz
P.95
Different Bandpass Filters select Different Channels
By tuning the passband of the filter, we can select different radio signals

filter A (HA) output A (YA)

1 Q

input (X) 0
P QR S V

filter B (HB) output B (YB)

1 S

P.96
• We can easily understand what systems do by looking at them
as filters which multiply the input signal in the frequency domain.

input (X) ● filter (H) output (Y)

2
1 1

0 0 0
0 1kHz 0 1kHz 0 1kHz

output (Y)
2

0
0 1kHz
P.97
Discussion

P.98
Signal Processing Software
• How signal processing technology help us modify a
music?

• Using signal processing techniques in the frequency


domain:

– (1) Lowpass Filtering


– (2) Highpass Filtering + ChatGPT
– (3) Bandpass Filtering

P.99
Time-domain Signal of a Music

• enlarge a
portion of the
audio signal

P.100
Spectrum of the Music Signal
20 log10 (A) • If we convert the signal from the time
Amplitude
domain to the frequency domain, the
104
spectrum reveals many frequency
components

102

100 20 kHz

10-2

10-4

P.101
Lowpass Filtering
This part of the signal are filtered out.

3 kHz cutoff frequency

Original After lowpass filtering

P.102
Lowpass Filtering

After lowpass filtering (with 3 kHz cutoff frequency)

P.103
Highpass Filtering
This part of the signal are filtered out.

7 kHz
cutoff
frequency
After highpass filtering

P.104
Bandpass Filter
Bandpass filtering (a simulation on the telephone channel
that only passes up to about 3 kHz)
i.e. the telephone voice bandwidth is ~3 kHz; the mobile
voice bandwidth is ~4 kHz This part of the signal are kept.

1kHz 3kHz After bandpass filtering


P.105
Highpass and Bandpass Filtering

After highpass filtering After bandpass filtering


(with 7 kHz cutoff frequency) (with 1kHz and 3 kHz cutoff frequency)

P.106
Summary – Lecture 6
• Systems can be viewed as filters which process sine waves in the
input signal in the frequency domain.

• Lowpass, bandpass and highpass filters are basic building


blocks of all signal processing systems. Practical filters are
approximation of ideal filters.

• We saw examples of lowpass filtering and bandpass filtering in the


telephone access network and in the radio tuner.

• We looked at signal processing results using Python.

(check Canvas to find the data and program to generate all figures in this lecture)

P.107
ELEC1010 Electronic & Information Technology

Lecture 7

Frequency Translation

P.108
Early Analog Cellular Systems (1G)
• 1st Generation (1G) cellular phones operated with carrier
frequencies below 1 GHz. They were analog systems, meaning
that speech signals were transmitted as analog waveforms:
Year of 1G launching Countries/Cities
1979 Japan
1981 Europe
1983 USA
1985 UK
• Multiple users in the cell talked to the same base station at the
same time using FDMA (Frequency Division Multiple Access)
• 1G (analog) systems had problems with call quality. It was also
very insecure. Snoopers could tap calls with a simple radio
scanner, and eavesdrop ID from your phone to charge calls to
your account.
• 1G was completely phased out in HK by 1998!
P.109
Amplitude Modulation (AM)
• In AM, we simply multiply the baseband signal with a high
frequency carrier radio wave. The amplitude of the modulated
radio wave reflects the amplitude of the baseband signal.

sAM (t ) = x(t )sin 2p f ct


Carrier frequency

• We are “modulating”, or adjusting the amplitude of a radio


frequency (RF) carrier with the baseband.
• Both AM radio broadcast and the picture part of analog TV use
amplitude modulation to transmit information signal.

Baseband
signal

Radio wave
carrier

P.110
Amplitude Modulation (AM)
• fc is the carrier frequency. Different AM radio broadcast stations,
for example, use different carrier frequencies.
• Station AM864 in Hong Kong, for example, uses a carrier
frequency of 864 KHz.

Frequency Network Site Power (kilo Watt)


567 kHz RTHK3 Golden Hill 20 kW
621 kHz RTHK Putonghua Channel Golden Hill 20 kW
675 kHz RTHK6 (BBC World Service) Peng Chau 1 kW
783 kHz RTHK5 Golden Hill 20 kW
864 kHz HKCR AM864 Peng Chau 10 kW
1044 kHz Metro Plus Peng Chau 10 kW

P.111
Frequency Mixing
• Multiply two signals together is also called mixing, because
the resulted signal will contain frequencies that is a mixture,
meaning the sums and differences, of the frequencies in the
original signals
• Consider multiplying two sine waves of frequencies f1 and f2
together. The result is two new sine waves, one at frequency
(f1 + f2), another at frequency (f1– f2), because:
sin (2p f1t) x sin (2p f2t)
= ½ cos (2p (f1–f2) t) - ½ cos (2p (f1+f2) t)
• Assume f1 is the “carrier” frequency, and f2 the “baseband”
(message) frequency in AM modulation system. f1 is usually
much larger than f2. By mixing the baseband signal with the
carrier, we have shifted it to two high frequencies.
P.112
AM Modulation (example 1)
• Suppose an audio message in the baseband is a
simple sine wave (e.g. a pure tone) at f2 = fm = 1 kHz

sin (2p fm t) = sin (2p 1000 t)

and the carrier frequency is, say, f1 = fc = 1 MHz

sin (2p fc t) = sin (2p 106 t)

“before modulation” “after modulation”


999 kHz 1.001 MHz

100 1k 10k 100k 1M 100 1k 10k 100k 1M


P.113
Modulated Signal Bandwidth

999 kHz 1.001 MHz


e.g. 1 kHz signal
1 MHz carrier

2 kHz bandwidth
f/Hz
100 1k 10k 100k 1M
• The modulated signal has frequency components on both
sides of the carrier frequency. Each side is called a sideband.

P.114
Demodulation – Recovering the Baseband
• In principle, demodulation (un-do the modulation) can be
done by multiplying the modulated signal by the carrier again.
(fc–fm) mixes with fc gives 2fc –fm and fm
(fc+fm) mixes with fc gives 2fc+fm and fm
• If the high-frequency components of 2fc–fm and 2fc+fm are
filtered away (low-pass filtering), then what is left is the
baseband signal fm!
“before demodulation” “after demodulation”

100 1k 10k 100k 1M 100 1k 10k 100k 1M 2MHz


• In practice, there are different ways for demodulation, such
as by looking at the amplitude envelop of the modulated
carrier alone, as shown in the next slide:
P.115
Conveying Information via RF Envelope

• Assume that the baseband signal is always non-negative, the


amplitude envelope of the modulated RF carrier would tell us
what the baseband signal is.

baseband signal *Assume that it is


(information) positive only; if not, we
can add a constant to it modulated
RF carrier

t “envelope”
+ve

1 t
0 t “multiply” -ve
-1
original
RF carrier

P.116
Modulation (example 2)
• When we sing a song or when we talk, the frequency
components changes quickly with time and the baseband
spectrum appears as a continuous frequency spectrum.
A continuous baseband
spectrum singing a song, or
making a speech

f
1 5 10 kHz

After modulation, the resulted spectrum will have the


baseband spectrum and its mirror image around the carrier
frequency

P.117
Modulation (example 2)
“Before modulation” “after modulation” modulated signal
(assumed baseband (modulated signal bandwidth =
bandwidth ~ 10 kHz) bandwidth ~ 20 kHz) baseband
bandwidth x2
Mirror
image
“multiply”

0 10k 0.99M 1M 1.01M


Freq(Hz) Freq(Hz)

1
0 t
-1
RF carrier e.g. sin(2𝜋106t)
P.118
Multiple Frequency Channels
• Modulation moves the different baseband signals to different
carrier frequencies.
• Multiple channels can therefore be transmitted at the same time
as each occupies a different “frequency band” and won’t interfere
with each others.
• In principle, we can shift a modulated signal back to baseband by
mixing with the carrier frequency and filtering away the high
frequency components at the receiver. In practice, there are
different ways of doing demodulations effectively.
• This way of allowing multiple users/applications to access the
frequency spectrum is known as frequency-division multiple-
access (FDMA). This concept is central in many systems
(wireless or wired). Using FDMA, the government can allocate
different bands to different applications.

P.119
FDMA:
Modulating multiple signals with different carriers
Bandwidth of baseband
“Before modulation” = 10 kHz = 0.01 MHz
three different carriers
at 1, 1.04 and 1.08 MHz
(three individual audio
baseband signals all
occupy the same
frequency band)

100 1k 10 k 100 k 1M

“after modulation”(modulated signals each occupies a separate


frequency band)
Bandwidth of modulated
signal = 20 kHz = 0.02 MHz

1.00 M 1.04 M 1.08 M


P.120
FDMA IN THE AUDIO
FREQUENCY BAND AS AN
EXAMPLE!!
HOW DOES IT SOUND LIKE?

P.121
Martin Luther King’s Speech Centered at
Different Frequencies

P.122
Martin Luther King’s Speech Centered at
Different Frequencies

P.123
Hillary Clinton’s Speech Centered at
Different Frequencies

P.124
Hillary Clinton’s Speech Centered at
Different Frequencies

P.125
P.126
Summary – Lecture 7
• Described the principle of Amplitude Modulation (AM)
• Illustrated the spectrum of a modulated signal
• Explained how modulation and demodulation can be done in
principle by frequency mixing
• Illustrated how frequency mixing is used to attain Frequency
Division Multiple Access (FDMA)

P.127

You might also like