SignalProcessing - SS2023 Part - 1
SignalProcessing - SS2023 Part - 1
SignalProcessing - SS2023 Part - 1
Your Professor:
Prof. Dr. Stefan J. Rupitsch
stefan.rupitsch@imtek.uni-freiburg.de
2
General remarks
Aim and scope of the lecture
The purpose of the course is to teach students how to mathematically model the propagation of
signals through electrical systems. The following topics will be covered in the course: Analog
networks, Network analysis, Convolution, Impulse response, Signal response, Frequency
response, Bode plot, Phasors, Transfer functions, Pole-zero plot, System response, Stability,
Laplace transform, Analog Filter design, Sampling, Quantizing, Analog to digital converter, Digital
to analog converter, Digital networks, Z transform, Digital filter design, Digital signal processor,
Fourier series, Fourier transform, Discrete Fourier transform, Fast Fourier transform, and
Windowing, Analysis of nonstationary signals, Kalman filter.
3
Examination Regulations and ILIAS Platform
ILIAS Course
§ Use following password to join the ILIAS course: SigProcEMES2023
4
Content - lecture
1. Introduction 6. Discrete time signals in frequency domain
6.1 Discrete Fourier transform (DFT)
2. Characteristics of signals 6.2 DFT as approximation
2.1 Overview 6.3 Fast Fourier Transform (FFT)
2.2 Characteristics of analog signals 6.4 Windowing and spectral analysis
2.3 Characteristics of discrete time signals 6.5 Analysis of non-stationary signals
3. Analog signals in frequency domain 7. Discrete time LTI-systems
3.1 Fourier series 7.1 Description in time domain
3.2 Fourier Transform 7.2 Description in frequency domain
5
Literature
§ Oppenheim, Schafer, Buck, Discrete-time Signal Processing
§ Mertins, Signal Analysis
§ Mitra, Digital Signal Processing
§ Kay, Fundamentals of Signal Processing & Modern Spectral Estimation
§ Proakis, Manolakis, Digital Signal Processing
§ Ingle, Proakis, Digital Signal Processing Using MATLAB
§ Lyons, Understanding Digital Signal Processing
§ Hamming, Digital Filters
§ Daniel Ch. von Grüningen, Digitale Signalverarbeitung, Fachbuchverlag Leipzig
§ E. Schrüfer, Signalverarbeitung, Hanser Verlag
§ Oppenheim, Schafer, Zeitdiskrete Signalverarbeitung, Pearson Studium
§ R. Scheithauer, Signale und Systeme, Teubner Stuttgart
§ Kammeyer, Kroschel, Digitale Signalverarbeitung
6
Content
1. Introduction
2. Characteristics of signals
3. Analog signals in frequency domain
4. Analog LTI systems
5. Sampling theorem and reconstruction
6. Discrete time signals in frequency domain
7. Discrete time LTI systems
8. Digital filters
9. Correlation
10. Advanced topics
7
1 Introduction - Basics
§ Forms of signals: Images, symbols, writing,
time functions (language, oscillation, Morse code etc.)
§ Technical signals
a. Time-continuous (analog) signals: time-continuous and value-continuous
b. Discrete time signals (sampling signals): discrete time, value-continuous
c. Digital signals: time-discrete and value-discrete
Notation
! time
"! = 1/& sampling rate in time domain
" = ' ( "! signal length in time domain
)! = 1/" sampling rate in frequency domain
& = ' ( )! signal length in frequency domain = bandwidth
" #
' = = ="(& number of samples (sampling points)
"! $!
* index of sampling point
8
1 Introduction - Basics
Typical steps in signal processing
§ Analog preprocessing of !(#): e.g., filtering, amplifying, amplitude limiting
§ AD-conversion of the analog signal leads to !! (%&" ).
§ The digital input signal (i.e., output of AD converter) consists of a sequence of numerical values, which are processed on a
computer or a DSP (Digital Signal Processor).
§ The calculation rule, according to which the input sequence is processed to an output sequence '! (%&" ), is called
algorithm, which is implemented in form of a program onto the DSP.
§ If the signal is given already in a digital form, then the analog preprocessing and the AD-conversion can be omitted.
§ The DA-conversion and the analog post-processing (mostly filtering) are often skipped as in many cases, the signal in its
digital form is more appropriate for storing, representing, or further processing.
digital digital
input output
9
1 Introduction - Basics
Open questions
§ Structure of a digital calculator
§ Why do analog signals have to be filtered?
§ How are these filters designed?
§ What does sampling mean and how to choose the sampling rate?
§ What is signal analysis?
10
1 Introduction - The signal processor as a digital calculator
11
1 Introduction - Applications of correlation
speed measurement system
cross correlator
rolls
paper web
§ Two sensors are arranged following each other in the direction of motion (e.g., photo detectors, capacitive/inductive sensors).
§ Statistical signal of surface pattern is recorded.
12
1 Introduction - Applications of the Fourier Transform
Fast
Fourier
amplifier A/D converter transform
Measurement resistance
13
1 Introduction - Applications of the Fourier Transform
Signal generation, like in the DTMF- (Double-tone multiple frequency) method for the telephone
§ By pushing a button, the sum of two sinus oscillations is generated for a duration of 70 ms and sent.
Frequency domain
upper frequency group
14
1 Introduction - Applications of digital filters
A/D-Converter Screen
Example
At the top: Interferences contaminated ECG-signal. Low-frequency interferences are caused by the
mechanical movement of the electrodes, higher frequency interferences are caused by the electronical
activity of the muscles. In order to eliminate these interferences, one switches a digital band-pass filter,
which suppresses the frequency domains below 0.05 Hz and above 100 Hz. Another serious
interference is the 50 Hz signal, which is injected into the electrical power supply net. This interference
is suppressed by means of a very narrow-banded band-stop filter.
15
1 Introduction - Applications in digital signal synthesis
Viterbi HW GSM
Accelerator DSP Cipher Unit
Speech DAC I
GMSK / 8PSK
ADC and Channel
Modulator
Encoding DAC Q
SRAM
* 0 #
USB R F c o n tro l
MCU MMC
Data
bus
32-Bit Core
Blue Address
tooth bus
16
1 Introduction
Special signal processing: Many tasks in signal processing can only be solved by DSP (Digital Signal Processors).
Examples are
§ Adaptive filters
§ Language and image processing
§ Data compression
§ Discrete correlators
§ Music synthesis
17
1 Introduction
Disadvantages of digital signal processing
§ Additional electrical circuits are necessary.
§ In the high frequency range: Signals in the frequency range > 20 MHz
can even nowadays hardly be processed with DSPs
à implementation with analog techniques or in digital hardware
§ Interferences due to fast switching of electric voltages and currents
à especially problematic if in the analog part, only small signals are processed
§ Noise due to quantization in AD-conversion
§ Programming of DSPs differs from programming of microcontrollers or PCs and some adaption is necessary.
§ The theory of signal processing is challenging and requires some intensive study.
18
Content
1. Introduction
2. Characteristics of signals
3. Analog signals in frequency domain
4. Analog LTI systems
5. Sampling theorem and reconstruction
6. Discrete time signals in frequency domain
7. Discrete time LTI systems
8. Digital filters
9. Correlation
10. Advanced topics
19
2 Characteristics of signals
2.1 Overview
2.1 Time-continuous signals
§ Elementary signals
§ Deterministic and stochastic signals
§ Periodic and causal signals
§ Even and odd signals
§ Real-valued and complex signals
§ Energy and power signals
§ Continuous and discrete time signals
2.3 Discrete time signals
§ Elementary discrete time signals
§ Dissection of discrete time signals into delayed, weighted elementary pulses
§ Periodic discrete time signals
§ Energy and power of a discrete time signal
§ Sampled audio signal
§ Read in and output of sampled audio signals with MATLAB
20
2 Characteristics of signals - Message
§ Signals are used for exchange of energy: for its own sake, e.g., a metabolism
21
2 Characteristics of signals - Information content of a message
The less predictable a message is, the higher is the information content for the receiver.
The relations between
§ probability of sending and receiving of a message,
§ and the information content of this message
is discussed in detail in statistical information theory.
Definition: Physical quantities that carry some information due to their values and series (mostly within the
time response) are called Signals. A signal is just a carrier of the message, which is represented in the
physical world by observable conditions and processes.
22
2 Characteristics of signals
§ If signals are given electrically, such as voltage levels, then you can process them electronically by signal processing.
23
2.1 Overview
Amplitude and time series of signals may be continuous or discrete.
time-continuous time-
discrete
24
1 Introduction - Basics
§ Forms of signals: Images, symbols, writing,
time functions (language, oscillation, Morse code etc.)
§ Technical signals
a. Time-continuous (analog) signals: time-continuous and value-continuous
b. Discrete time signals (sampling signals): discrete time, value-continuous
c. Digital signals: time-discrete and value-discrete
Notation
! time
"! = 1/& sampling rate in time domain
" = ' ( "! signal length in time domain
)! = 1/" sampling rate in frequency domain
& = ' ( )! signal length in frequency domain = bandwidth
" #
' = = ="(& number of samples (sampling points)
"! $!
* index of sampling point
25
2.1 Overview - Time-continuous signals
Continuous or analog signal: the information is continuous in amplitude and time.
26
2.1 Overview – Discrete time signals
Discrete time signal: the signal is continuous in amplitude and discrete in time.
1) Discrete time signals are generated either by sampling of analog signals or they are discrete in time by their type.
2) The sampling is done usually with a fix time interval or, at least, the time position of the sampling points must be
known (otherwise there is a loss of information).
3) If the sampling theorem and 2) are met, then there is no loss of information.
Discrete time signals: there are no values between the sample points – especially they are not 0.
sampling
& ! &(' ( )! ) )! : sampling time 1/)! : sampling frequency
27
2.1 Overview – Digital signals
§ Digital signal: the information is given discrete in both amplitude and in time.
In most cases, the time interval is fixed which is called equidistant sampling.
§ The discretization of the amplitude results in a loss of information
(but mostly, this fact can be neglected).
§ Usually, a binary digital signal or a '-binary signal with 2" possible amplitude levels is applied.
28
2.2 Time-continuous signals – Elementary signals
For analyzing complex systems, like telecommunication systems, usually simple input or test signals are used,
so-called elementary signals.
§ Elementary signals are given in an especially simple closed form.
§ They are technically easy to produce.
§ Usually, in signal theory and also in system theory, we calculate dimensionless, standardized to 1 s or 1 V.
§ Equations between quantities then become equations between numbers.
§ A dimension control is lost, but the equation becomes independent of the underlying physical effects.
We get corresponding descriptions of acoustic, electrical, hydraulic, ... signals.
29
2.2 Time-continuous signals – Elementary signals
Cosine oscillation .(!) = cos( !)
More general, the time axis might be scaled by )/(25) and
shifted by the delay 7, and the s-axis might be scaled by .:̂
!−7
.(!) = .̂ ⋅ cos 25 ⋅
)
.(!) = .̂ ⋅ cos( 25 !/) − 8# ) = .̂ ⋅ cos( 25 9# ! − 8# ) = .̂ ⋅ cos( :# ! − 8# )
Notation
)% frequency
+% = 2-)% angular frequency
" = 1/)% cycle duration
/̂ amplitude
0% = 2-1/"% phase angle at time zero
30
2.2 Time-continuous signals – Elementary signals
Complex sine oscillation, or complex exponential function
31
2.2 Time-continuous signals – Elementary signals
32
2.2 Time-continuous signals – Elementary signals
Gaussian signal
"
.(!) = e)&(
0
t
33
2.2 Time-continuous signals – Elementary signals
Rectangular function
! 1 for ! ≤ )# /2
.(!) = rect =D
)# 0 for ! > )# /2
Sinc function
1 for # = 0
2#
sin( )
( # = si(#) = &#
2# otherwise
&#
34
2.2 Time-continuous signals – Elementary signals
Dirac pulse
∞ for ! = 0
P(!) = D Special characteristic of the Dirac pulse:
0 for ! ≠ 0
* *
35
2.2 Time-continuous signals – Transformation of the time axis
36
2.2 Time-continuous signals – Real and complex signals
< $%&'!(
Example: ; ! = =e
37
2.2 Time-continuous signals – Signal forms
Are mathematically clearly
defined for each time
Sine-shaped
Non-sine-shaped
Periodic
Signal
Transient
Stochastic
Ergodic
Fluctuate in their signal
amplitudes randomly Non-ergodic
38
2.2 Time-continuous signals – Periodic signals
Sine wave Cosine wave
Instantaneous value
Instantaneous value
Periodic signals
!$ (#) = !$ (# + ')
) is called period.
time time
Rectangular wave Pulse train
The smallest positive ), which fulfills the
Instantaneous value
Instantaneous value
equation above, is called fundamental
period.
time time
Triangular wave Saw tooth wave
Instantaneous value
Instantaneous value
Example: ; ! = sin(8!) with the time time
fundamental period ) = 25/8
39
2.2 Time-continuous signals – Parameters of periodic signals
Amplitude time
Instantaneous value
§ Amplitude (only for amplitude-symmetrical signals)
Instantaneous value
§ Peak amplitude, peak to peak amplitude
§ Period duration, frequency
§ Duty cycle respectively symmetry
time time
§ Linear mean value (average value)
Symmetry
Instantaneous value
Instantaneous value
%
1
!̄ = 8 !(#) d#
&
#
|!|̄ = 8 |!(#)| d#
&
#
§ ;. ! = −;. (−!)
Example: ; ! = sin(:!)
§ All signals can be expressed as a sum of an even and an odd part, i.e.,
;- ! ;. !
41
2.2 Time-continuous signals – Non-periodic, but deterministic signals
Typical examples step ramp
value
value
pulse, monocycle (a single sine cycle)
§ Burst, Haversine (half a sine),
time time
§ Chirp / Sweep (frequency modulated,
single pulse burst
mostly sine, frequency changes mostly
linear or logarithmic)
value
value
§ Spike (outlier into a positive
or negative direction)
§ Glitch (two outliers after each other time time
in other directions) haversine sweep
value
value
Term: Transient signals
(transient = passing by) time time
42
2.2 Time-continuous signals – Stochastic signals
43
2.2 Time-continuous signals – Examples for stochastic signals
measurement signal amplitude noise
Examples
instantaneous value
instantaneous value
§ Noise
§ Data signals, language or image signals:
all signals, which contain any information
time time
instantaneous value
instantaneous value
time time
pulse position noise
instantaneous value
instantaneous value
time time
44
2.2 Time-continuous signals – Nomenclature for noise signals
§ Amplitude noise
The instantaneous values are uniformly or normally distributed around a mean value.
§ Phase noise
E.g., for binary signals: the time period between the zero crossing points fluctuate arbitrarily; this is especially
an important information for oscillators.
§ White noise
In each frequency band of the same absolute bandwidth, the noise frequencies (noise density function) are
represented with the same amplitude.
§ Pink noise
In each frequency band of the same relative bandwidth, all noise frequencies are represented with the same
amplitude.
§ Band-limited noise
Only noise frequencies within a certain frequency band occur.
45
2.2 Time-continuous signals – Parameter of stochastic signals
% ,
1
§ Signal mean value: ! = 8 ! # d# = 8 ℎ ! ! d!
&
# 1,
% ,
1
§ Variance: B ( = 8(!(#) − !)( d# = 8 ℎ(!)(! − !)( d!
&
# 1,
46
2.2 Time-continuous signals – Energy-, power- and causal signals
§ Energy signals: e.g., Rectangular signal, Sinc function, all signals, which are time- and amplitude-limited
*
\ = S ;(!) % d! < ∞
)*
§ Power signals: signals with infinite energy \, but finite mean power ]. Examples: cos(:!), sin(:!)
%/(
1
( = lim - !(#) ( d# < ∞
%→, '
1%/(
0 for ! < 0
;23 (!) = D
1 for ! ≥ 0
47
2.3 Discrete time signals
§ Any signal ;(!) is a mathematical function of the independent variable ! (time).
§ If the variable ! is continuous, a time-continuous (analog) signal will be given.
§ If ! is defined only for discrete values, a discrete time signal, a sampled signal or a sequence ;['] (' index or
generalized time variable) will be given.
§ The sequence ;['] often results from a time discretization of a time-continuous signal ;(!), which is called
sampling. The corresponding sequence gives a sampled signal ;['] with the sampling interval )3
Annotation: sampling is here supposed to be ideal, the amplitude values are not changed. Real sampling, e.g.,
by an analog-digital-conversion (ADC) gives time- and amplitude-discrete sequences. We will go into that later on.
48
2.3 Discrete time signals – Elementary discrete time signals
§ Short discrete time signals are easily characterized by just writing down their values, as for example:
§ Usually, the first value belongs to the index ' = 0, the second to ' = 1, and so on. Sometimes, it is
necessary to enlarge a sequences of finite length by some leading or subsequent zeroes.
Pay attention that in MATLAB, the elements of a vector are addressed starting with the Index „1“.
§ Unit pulse, or discrete Dirac pulse, or Kronecker’s symbol, shifted unit pulse
1 for % = 0 1 for % = G
D % = D0,# = E 1 D % − 1 = D0,- = E
0 for % ≠ 0 0 for % ≠ G
49
2.3 Discrete time signals – Elementary discrete time signals
§ Step sequence
0 for % < 0
H % =E
1 for % ≥ 0
P = 22 O#&4 = 22 O#/O4
50
2.3 Discrete time signals – Decomposition into time-shifted unit pulses
§ Decomposition of a discrete time signal in a series of weighted and time-shifted unit pulses:
each discrete time signal can be written
*
;['] = U ;[e]P[' − e]
4,)*
§ Example
51
2.3 Discrete time signals – Periodic discrete time signals
§ A discrete signal ;6['] is called periodic with period d, if the following applies: ;5 ['] = ;5 [' + d]
d is called cycle period; the smallest positive d, which fulfills above equation is called fundamental period.
§ Annotation: the discrete sine function ;['] = sin(25 9# ' )# ) in general is not a periodic signal. The
function will be only periodic, if the relation )# /)! = 9! /9# yields an integer.
52
2.3 Discrete time signals – Energy- and power signals
*
§ Energy of a discrete time signal: \ = U ;['] %
",)*
§ If the average power ] is finite, we will have a discrete time power signal.
§ For periodic discrete time signals with the period d, and also for aperiodic discrete time
signals of the finite duration d (' = 0,1, … , d − 1), the following holds:
6)8
1 %
] = U ;[']
d
",#
53
2.3 Discrete time signals – Audio signals
§ Amplitude and time continuous electrical signals can be sampled and quantized by an AD-converter,
resulting in a digital signal. Similarly, analog signals can be generated with a DA-converter from a digital
signal.
§ Important parameters are the sampling frequency 93 = 1/)3 , which is the number of samples per second,
and the word length i, which is the number of the amplitude digits of the digital signal. The correct
choosing of the sampling frequency is given by the sampling theorem.
§ A modern sound chip in a PC consists an AD- and a DA-converter with an adjustable sampling frequency,
typically between 5 and 44.1 kHz, and a word length of 8 or 16 Bits. Thereby, theoretically it reaches a sound
quality comparable to an audio CD.
§ Audio signals are often given in a Wave-Format, “.wav“, at the PC. MATLAB can read and write such data, as
well as directly transfer the digital signal to the PC sound chip (commands: wavread.m, wavwrite.m,
soand.m and soandsc.m).
54