Signals Updated
Signals Updated
Biomedical Engineering
Signals
Year 2
2020, Autumn Term
I would like to extent my sincere thanks to Rea Tresa, Ben Ford, and Elisa Soliani for
their insightful comments. Their work significantly optimized the structure.
Special thanks to Haroon Chughtai. His notes greatly enlightened me when preparing
this new set.
Update Notes
1. Section 5.3.2 : Added the derivation of time shifting property.
2. Section 5.5 : Corrected math typos, rearranged the example and improved the read-
ability.
4. Section 5.6 : Refined the description of magnitude and phase spectra. An example
is adopted from the textbook.
1
CONTENTS
Contents
1 Definition, Classification and Properties of Signals 4
1.1 Definition of signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Continuous and Discrete-time Signals . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Digital Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Deterministic and Stochastic Signals . . . . . . . . . . . . . . . . . . . . . 5
1.4 Periodic Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Signal Energy and Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5.1 Energy and Power of a Generic Signal . . . . . . . . . . . . . . . . 6
2 Types of Signals 8
2.1 Periodic Complex Exponential Signals in Continuous-time Domain . . . . . 8
2.2 Periodic Complex Exponential Signals in Discrete-time Domain . . . . . . 8
2.3 The Unit Impulse in Discrete-time Domain . . . . . . . . . . . . . . . . . . 8
2.4 The Unit Step in Discrete-time Domain . . . . . . . . . . . . . . . . . . . . 9
2.5 The Unit Step in Continuous-time Domain . . . . . . . . . . . . . . . . . . 10
2.5.1 Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Fourier Series 17
4.1 Orthonormal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Fourier Basis Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5 Fourier Transform 21
5.1 From Fourier Series to Fourier Transform . . . . . . . . . . . . . . . . . . . 21
5.2 The Continuous-time Fourier Transform . . . . . . . . . . . . . . . . . . . 22
5.3 Properties of Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3.2 Time shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3.3 Conjugation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3.4 Dual property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3.5 Time scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.3.6 Parseval’s relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.3.7 Di↵erentiation in time . . . . . . . . . . . . . . . . . . . . . . . . . 26
2
CONTENTS
5.3.8 Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.4 More basic Fourier transforms . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.1 Impulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.2 Complex exponential . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.3 Cosine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.4 Sine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.5 Example of application of properties of the Fourier transform . . . . . . . . 27
5.5.1 LTI systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.6 Magnitude and Phase Spectra . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.7 Fourier Transform of Periodic Signals . . . . . . . . . . . . . . . . . . . . . 30
5.7.1 Fourier transform of a train of impulses . . . . . . . . . . . . . . . . 31
6 Sampling Theorem 32
6.1 Sampling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.2 Reconstruction Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.3 Nyquist-Shannon Sampling Theorem . . . . . . . . . . . . . . . . . . . . . 34
3
1 DEFINITION, CLASSIFICATION AND PROPERTIES OF SIGNALS
• For example, a signal s(t) can be a function of the continuous independent variable
time t 2 [↵, ] A two-dimensional signal f (x, y) can be a function of two spatial
coordinates x, y.
• When one refers to a 12-bit signal, they are referring to the number of amplitude
quantisation levels.
• Sampling a continuous signal may be done without losing any information from
the original signal. Conversely, quantisation always implies losing information.
(Fig.2)
4
1 DEFINITION, CLASSIFICATION AND PROPERTIES OF SIGNALS
• A periodic signal has the property that it is unchanged by a time shift of T , we will
say that x(t) is periodic with period T . (Fig.3)
5
1 DEFINITION, CLASSIFICATION AND PROPERTIES OF SIGNALS
We get the conclusion above from the calculation for electrical power and energy.
Let v(t) and i(t) represent the voltage and current across the resistor of resistance
R.
• The instantaneous power across the resistor is the product v(t)i(t), which is
proportional to v 2 (t).
• Often, the signals are directly related to physical quantities capturing power and
energy in a physical form.
• In continuous time: Z +1
Energy = |x(t)|2 dt
1
Z T
1
Power = lim |x(t)|2 dt
T !1 2T T
6
1 DEFINITION, CLASSIFICATION AND PROPERTIES OF SIGNALS
• In discrete time:
+1
X
Energy = |x[n]|2
1
XN
1
Power = lim |x[n]|2
N !+1 2N + 1 N
We will use the mathematical definitions above, regardless of the direct physical meaning
of each term!
7
2 TYPES OF SIGNALS
2 Types of Signals
2.1 Periodic Complex Exponential Signals in Continuous-time
Domain
x(t) = ej!0 t
• Periodic, period T = 2⇡
|!0 |
.
• The complex exponential defined above is closely related to the sinusoidal signal:
A j j!0 t A j j!0 t
x(t) = A cos(!0 t + ) = e e + e e
2 2
2⇡
which has the same period T = |!0 |
.
• The complex exponentials and sinusoidal signals have infinite energy and finite
power.
A2
Power =
2
(
1, n = 0
[n] =
6 0
0, n =
Fig. 4: The unit impulse
8
2 TYPES OF SIGNALS
(
1, n = k
[n k] =
6 k
0, n =
• For any discrete-time signal x[n], directly from the definition of [n], we have
x[n] [n k] = x[k] [n k]
This implies: any signal multiplied by the unit impulse is zeroed for all time
samples, apart from the integer time where the unit impulse is centered.
1 *
1, when k = n
X
= x[k] [n k]
n=1
= x[k]
• Any arbitrary discrete-time signal can be expressed as the sum of scaled and de-
layed impulses:
+1
X
x[n] = x[k] [n k]
k= 1
( +1
1, n 0 X
u[n] = = [n k]
0, n < 0 k=0
• The unit impulse is the discrete time derivative of the unit step.
9
2 TYPES OF SIGNALS
(
1, t > 0
u(t) =
0, t < 0
• From the definition above, the following property holds: (Fig.9, left)
Z t
u(t) = (⌧ )d⌧
1
• For continuous-time, the unit impulse in the continuous-time domain shifted by the
time delay is (t ).(Fig.9, right)
10
2 TYPES OF SIGNALS
x(t) (t t0 ) = x(t0 ) (t t0 )
Fig. 10
• We also obtain:
Z 1 Z 1
x(t) (t t0 )dt = x(t0 ) (t t0 )dt
1 1
Z 1
= x(t0 ) (t t0 )
1
= x(t0 )
• This implies that any arbitrary continuous-time signal x(t) can be represent as:
Z 1
x(t) = x(⌧ ) (t ⌧ )d⌧
1
2.5.1 Convolution
We define the following transformation between two signals (Convolution):
Z 1
y(t) = x(⌧ ) h(t ⌧ )d⌧ = x(t) ⇤ h(t)
1
+1
X
y[n] = x[k] h[n k] = x[n] ⇤ h[n]
k= 1
x(t t0 ) = x(t) ⇤ (t t0 )
x[n k] = x[n] ⇤ [n k]
11
2 TYPES OF SIGNALS
• For multiplication:
x(0) · (t) = x(t) · (t)
x[0] · [n] = x[n] · [n]
x(t0 ) · (t t0 ) = x(t) · (t t0 )
x[k] · [n k] = x[n] · [n k]
• For convolution:
x(t) = x(t) ⇤ (t)
x[n] = x[n] ⇤ [n]
x(t t0 ) = x(t) ⇤ (t t0 )
x[n k] = x[n] ⇤ [n k]
12
3 SIMPLE OPERATIONS ON SIGNALS
• Time reversal
• Time scaling
• In discrete-time domain:
3.4 Multiplication
• In continuous-time domain:
y(t) = x1 (t) · x2 (t)
• In discrete-time domain:
y[n] = x1 [n] · x2 [n]
This implies instantaneous multiplication for each time instant or each discrete time
sample.
13
3 SIMPLE OPERATIONS ON SIGNALS
~·B
A ~ = Ax · Bx + Ay · By + Az · Bz = |A|
~ · |B|cos(
~ )
• For vectors, the Euclidean norm, or norm-2, is the length of vectors in Euclidean
space: p q
~ 2= A
||A|| ~·A ~ = A = A2x + A2y + A2z
1
! p1
X
||x[n]||p = |x[n]|p , for 1 p < 1
1
– p = 1:
1
X
||x[n]||1 = |x[n]|
1
||x[n]||1 = max|x[n]|
n
• Norms are measures of the signal “strength”. Each norm is a di↵erent way of
measuring signal strength.
e.g. the norm-2 is associated to the energy.
14
3 SIMPLE OPERATIONS ON SIGNALS
15
3 SIMPLE OPERATIONS ON SIGNALS
• A possible estimate of the delay between the two signals is the time interval by
which we need to shift one of the signals so that it is maximally similar to
the other.
Normalized cross-correlation function between x1 (t) and x2 (t):
hx1 (t), x2 (t ✓)i
fc (✓) =
||x1 (t)||2 ||x2 (t)||2
R1
1
x1 (t)x2 (t ✓)dt
= qR qR
+1 2 dt · +1
1
|x 1 (t)| 1
|x2 (t ✓)|2 dt
• The ✓ value corresponding to the maximum of f (✓) is an estimate of the delay
between the two signals.
By using cross-correlation function, we are able to find the time delay between two
EMG signals. By measuring the distance between two electrodes, we can calculate
the conduction velocity.
16
4 FOURIER SERIES
4 Fourier Series
4.1 Orthonormal Functions
• Orthonormal functions has the following property:
(
0, i 6= k
h i (t), k (t)i =
1, i = k
Think the orthogonal unitary vectors defining coordinate axes (i, j, k) in Euclidean
space!
• The coefficients ai can be determined by projecting the signal into each function
{ i (t)}i=1...N :
N
X
hx(t), k (t)i = h ai i (t), k (t)i
i=1
Z 1 N
X
⇤
= ai i (t) k (t)dt
1 i=1
N
X Z 1
⇤
= ai i (t) k (t)dt
i=1 1
= ak
17
4 FOURIER SERIES
• periodic, period = T
i
• orthonormal, when 0 t T :
– i 6= k,
Z T Z T
⇤ 1 2⇡i
j 2⇡k
h i (t), k (t)i = i (t) k (t)dt = ej T
t
e T
t
dt = 0
0 T 0
– i = k, Z Z
T T
2 1
h i (t), k (t)i = | i (t)| dt = dt = 1
0 T 0
18
4 FOURIER SERIES
Derivation
If we assume:
+1
X
x(t) = ai i (t)
i= 1
+1
1 X 2⇡k
=p ak e j T t
T k= 1
• The infinite set of orthonormal functions of the Fourier series describes any periodic
signal with finite energy in a single period.
k= N
k= N
Z T Z T
2
lim |EN (t)| dt = 0, if |x(t)|2 dt < 1
N !1 0 0
Fourier series converges as the number of terms increases:
19
4 FOURIER SERIES
Fig. 14: Example of convergence of the Fourier series of a periodic square wave
20
5 FOURIER TRANSFORM
5 Fourier Transform
5.1 From Fourier Series to Fourier Transform
To find a representation of any finite energy signal, not necessarily periodic:
set the periodical of a period signal to infinity.
(
1, |t| < T1
x(t) = T
0, T1 < |t| < 2
k= 1
with
Z
1 T1 2⇡k
ck = x(t)e j T t
T T1
2 sin(k!0 T1 )
=
k!0 T
1 2 sin(!T1 )
=
T ! !=k!0
where !0 = 2⇡T
is the frequency of the
first harmonic.
21
5 FOURIER TRANSFORM
1
X 2⇡k
x̃(t) = ck e j T
t
k= 1
with
Z T
1 2
j 2⇡k t
ck = x̃(t)e T dt
T T
2
Z +1
1 jk!0 t
= x(t)e dt
T 1
| {z }
X(k!0 )
1
= X(k!0 )
T
x(t) ! X(!) is known as Fourier transform.
1
X 2⇡k
x̃(t) = ck e j T
t
k= 1
X1
1 2⇡k
= X(k!0 )ej T t
k= 1
T
1
X
1
= X(k!0 ) ejk!0 t !0
2⇡ k= 1
As T ! 1, x̃(t) ! x(t), !0 ! 0:
Z 1
1
x̃(t) = x(t) = X(!) ej!t d! (1)
2⇡ 1
22
5 FOURIER TRANSFORM
• For each value of !, the Fourier transform is a complex number representing the
projection of the signal on the complex exponential function ej!t .
• The Fourier transform exists for signals in the L2 space. These signals can
be expressed as the combination of functions ej!t .
k= 1
T 0
Fourier transform: Z +1
1
x(t) = X(!) ej!t d!
2⇡ 1
Z +1
j!t
X(!) = x(t) e dt
1
The Fourier series represent periodic signals with discrete frequencies; the Fourier
transform represents non-periodic signals with continuous frequencies.
Derivation
Given
Z +1 Z +1
j!t j!t
X1 (!) = x1 (t) e dt and X2 (!) = x2 (t) e dt
1 1
Z +1
FT {a1 x1 (t) + a2 x2 (t)} = a1 x1 (t) + a2 x2 (t) e j!t dt
1
Z +1 Z +1
j!t j!t
= a1 x1 (t)e dt + a2 x2 (t)e dt
1 1
= a1 X1 (!) + a2 X2 (!)
23
5 FOURIER TRANSFORM
Derivation
Z +1
j!t
FT {x(t t0 )} = x(t t0 ) e dt
1
Let r = t t0 :
Z +1
j!(r+t0 )
FT {x(t t0 )} = x(r) e dr
1
Z +1
j!r j!t0
= x(r) e e dr
1
Z +1
j!t0 j!r
=e x(r) e dr
1
Let r = t:
Z +1
j!t0 j!t
FT {x(t t0 )} = e x(t) e dt
1
| {z }
Fourier Transform
j!t0
=e FT {x(t)}
j!t0
=e X(!)
5.3.3 Conjugation
FT {x⇤ (t)} = X ⇤ ( !)
if x(t) is real, X( !) = X ⇤ (!).
Derivation
The Fourier transform is:
Z +1
j!t
X(!) = x(t) e dt
1
Change ! ! !:
Z +1
⇤
X ( !) = x⇤ (t) e j!t
dt
1
= FT {x⇤ (t)}
24
5 FOURIER TRANSFORM
FT FT
Example: (t) ! 1, 1 ! 2⇡ (!)
Derivation
The Fourier transform is:
Z +1
j!t
X(!) = x(t) e dt
1
Change ! ! u, Z +1
1 1 jut
FT {x(u)} = x(u)e du
2⇡ 1
Derivation
Fourier transform of x(at) is:
Z +1
j!t
FT {x(at)} = x(at)e dt
1
Replace at ! u, then t = ua , dt = a1 du
Z +1
1 j! u
FT {x(u)} = x(u)e a du
|a| 1
1 !
= X( )
|a| a
25
5 FOURIER TRANSFORM
Derivation
Start from the L.H.S:
Z +1 Z +1
2
|x(t)| dt = x(t)x⇤ (t)dt
1 1
Z +1 ✓ Z +1 ◆
1
= x(t) X ⇤ (!)e j!t
d! dt
1 2⇡ 1
Z +1 ✓ Z +1 ◆
1 ⇤ j!t
= X (!) x(t)e dt d!
2⇡ 1 1
Z +1
1
= X ⇤ (!)X(!)d!
2⇡ 1
Z +1
1
= |X(!)|2 d!
2⇡ 1
5.3.8 Convolution
FT {x(t) ⇤ h(t)} = X(!)H(!)
Derivation
Z +1 Z +1
j!t
FT {x(t) ⇤ h(t)} = x(⌧ )h(t ⌧ )e dt
1 1
26
5 FOURIER TRANSFORM
5.4.3 Cosine
x(t) = cos(t) X(!) = ⇡[ (! !0 ) + (! + !0 )]
5.4.4 Sine
⇡
x(t) = sin(t) X(!) = [ (! !0 ) (! + !0 )]
j
vR
I
vin vc
For the circuit above, the input/output relation is characterized by the following
di↵erential equation:
dvc
vc + RC = vin
dt
By taking Fourier transform (using linearity property and di↵erentiation in time
property):
1
Vc (!) + j!RCVc (!) = Vin (!) ! Vc (!) = Vin (!)
1 + j!RC
• The Fourier transforms are coefficients indicating the weights of each complex
exponential signal e j!t composing the signals.
• The above relation therefore tells us how the circuit processes the input signal
by changing the weights of the coefficients.
27
5 FOURIER TRANSFORM
• In the frequency domain, the circuit acts as a factor that multiplies each
coefficient in a frequency-dependant way.
1
Let H(!) = 1+j!RC
, this represents the frequency response of the circuit.
Let the signal input vin (t) = ej!0 t , when applying the dual property:
Vin (!) = 2⇡ (! !0 )
Therefore:
2⇡ 2⇡
Vc (!) = (! !0 ) = (! !0 ) = H(!0 )2⇡ (! !0 )
1 + j!RC 1 + j!0 RC
Take inverse Fourier transform:
j!0 t
vc (t) = H(!0 )e
The frequency response of the circuit changes the magnitude and the phase of the
complex exponential, NOT the frequency.
If the input is an impulse signal vin (t) = (t), the response of the circuit in the
frequency domain is:
1 1 t 1 t
FT {H(!)} = e RC u(t) = e ⌧ u(t) = h(t)
RC ⌧
From the example above, there is an input-output relation in the fre-
quency domain.
Y (!) = H(!)X(!)
28
5 FOURIER TRANSFORM
The output of a linear, time-invariant (LTI) system is the convolution of the input
with the impulse response, i.e. the system is fully defined by the impulse response.
• |X(!)| is magnitude, it describes the basic frequency content of a signal, i.e. the
relative magnitudes of the complex exponentials that make up x(t).
• \X(!) is phase angle, it determines the di↵erent look of signals, even if the
magnitude remains unchanged.
Examplea
A ship encounters the superposition of three wave trains, each of which can be
modeled as a sinusoidal signal.
1 2
x(t) = 1 + cos(2⇡t + 1) + cos(4⇡t + 2) + cos(6⇡t + 3)
2 3
With fixed magnitudes for these sinusoids, the amplitude of their sum may
be quite small or very large, depending on the relative phases. The
implications of phase for the ship, therefore, are quite significant.
29
5 FOURIER TRANSFORM
a
Example adopted from Signals and Systems, 2nd Edition, P424
!
\H(!0 ) = tan 1 (!RC) = tan 1 ( )
!c
where Z + T2
1 j 2⇡k t
ck = x(t)e T dt
T T
2
Derivation
Fourier series of a periodic signal x(t) with period T is:
+1
X Z + T2
j 2⇡k t 1 j 2⇡k t
x(t) = ck e T with ck = x(t)e T dt
k= 1
T T
2
30
5 FOURIER TRANSFORM
k= 1
+1
X
= ck FT {ejk!0 t }
k= 1
+1
X
= 2⇡ ck (! k!0 )
k= 1
where
2⇡
!0 =
T
Derivation
+1
X
x(t) = (t T)
n= 1
Thus:
+1
2⇡ X 2⇡
X(!) = (! k!0 ) with !0 =
T n= 1 T
31
6 SAMPLING THEOREM
6 Sampling Theorem
To obtain a discrete-time signal from a continuous-time signal, we need a C/D converter.
An ideal C/D converter applies T property, so that the sampling can be done without
loosing information.
The sampled signal xs (t) is obtained by multiplying the impulse train modulator by the
continuous-time signal xc (t):
Sampled signal, xs (t), is still defined in continuous-time, but it contains all information
in the sampled discrete-time domain.
32
6 SAMPLING THEOREM
2⇡
Fig. 16: (a)Original signal;(b) Sampled signal
where sampling frequency !s = !0 = T
.
33
6 SAMPLING THEOREM
+1
X sin(⇡(t nT )/T )
= xc (nT )
n= 1
⇡(t nT )/T
with
sin(⇡t/T ) Fig. 20: Reconstruction
hr (t) =
⇡t/T
Let xc (t) be a band-limited signal with Xc (!) = 0, |!| !N . Then xc (t) is uniquely
determined by its samples x[n] = xc (nT ), if
2⇡
!s = 2!N
T
where 2!N is the minimal sampling rate and referred to as the Nyquist rate.
34