You are on page 1of 65

Topic 2: Transforms

ENGF0004: Mathematical Modelling & Analysis II


Lecture 2: Transforms

Prof. Jem Hebden


Medical Physics & Biomedical Engineering
Email: j.hebden@ucl.ac.uk

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

ENGF0004: Mathematical Modelling & Analysis II

1. Series
2. Transforms
3. Introduction to second-order PDEs
4. Hyperbolic and Elliptic PDEs
5. Vector Calculus
6. Matrices
7. Decision Statistics and Analysis
8. Discrete Statistics

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

What is a transform?

A transform is a tool for changing the way something is


represented. A transform can always be reversed.

An original something and its transformed version are


always equivalent; they contain the same information,
without anything added or taken away.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

How about converting a potato into French fries?

No – not a valid transform!

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

How about car into a robot?

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

How about converting a sofa into a bed?

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

ENGF0004: Mathematical Modelling & Analysis II

2. Transforms
2.1 Fourier transform
2.2 Delta functions
2.3 Properties of Fourier transforms
2.4 Convolution
2.5 Laplace transform

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.1 Fourier transform


2.1.1 Sinusoidal waveforms

wavelength l
amplitude

A sinusoidal waveform has amplitude (height) and


wavelength (distance between peaks). The number of
peaks per unit distance is the frequency.
Wavelength is inversely proportional to frequency.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.1 Fourier transform


2.1.1 Sinusoidal waveforms

wavelength l
amplitude

0
phase f

The phase of waveform tells us position of peaks relative to


fixed point on horizontal axis.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.1 Fourier transform


2.1.1 Sinusoidal waveforms

cosine sine

0
p/2

A sine wave has 90 (or π/2 radian) phase shift with respect
to cosine wave.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Consider a function (or set of numbers) which varies as


function of distance (x) or time (t).

f(x)

The Fourier transform is a way of representing a function


(or set) as sum of waveforms.
It yields the amplitudes, frequencies, and phases of all
waveforms which, when added together, generate that
function (or set).

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Consider a function (or set of numbers) which varies as


function of distance (x) or time (t).

f(x)

The Fourier Transform of f(x) or f(t) is written as F(u),


where u = frequency.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Amplitude A1
Frequency u1
This specific function was
generated by adding 5 + Amplitude A2
Frequency u2
waveforms of different
frequency and amplitude. + Amplitude A3
Frequency u3

+ Amplitude A4
Their phases are their Frequency u4
+
relative shifts along the x Amplitude A5
Frequency u5
axis, which we will ignore
here. f(x)

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Amplitude A1
Frequency u1
The “modulus” of F(u) is
a distribution + Amplitude A2
Frequency u2
representing waveform
amplitude as function of + Amplitude A3
frequency. Frequency u3

+ Amplitude A4
Frequency u4
+
|F(u)| Amplitude A5
Frequency u5

A2
f(x)
A3
A5 FT
A1
A4
x
u
u5 u4 u3 u2 u1

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Amplitude A1
Frequency u1
Note: the Fourier transform
(only 5 points!) contains + Amplitude A2
Frequency u2
exactly the same
information as f(x). + Amplitude A3
Frequency u3

+ Amplitude A4
Frequency u4
+
|F(u)| Amplitude A5
Frequency u5

A2
f(x)
A3
A5 FT
A1
A4
x
u
u5 u4 u3 u2 u1

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.1.2 Fourier integrals


From section 1.7.2, a periodic function can be represented
by a Fourier series in complex form:

where complex coefficients cn describing amplitudes and


phases of waves at discrete frequencies are found using:
.

The Fourier transform represents a function which is not


periodic, and as a continuous range of frequencies, which is
far more useful.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

This is achieved by replacing integer n with frequency


variable u, and cn becomes F(u):

The “inverse Fourier transform” converts set of waveforms


F(u) back into original function:

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

These beautifully simple expressions are of immense use


in engineering.

The following notation is often used:


and

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

f(x)
Example
1
Calculate the Fourier transform a
of a rectangular function:
f(x) = 1 for a/2 < x < a/2
f(x) = 0 for a/2 ≥ x ≥ a/2 -a/2
x
a/2

FT[f(x)] is obtained by inserting 1 into Fourier integral and


reducing limits of integration to ±a/2 :
=

From section 1.7.2: sin x = (e jx – ejx)/2j 

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

f(x)
Example
1
Calculate the Fourier transform a
of a rectangular function:
f(x) = 1 for a/2 < x < a/2
f(x) = 0 for a/2 ≥ x ≥ a/2 -a/2
x
a/2
FT

F(u)
a
sinc(x) = sin(x)/x

sinc(pau) = 0 when pau = ±p


 u = ±1/a
u
 “width” = 2/a
2/a

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

In general, a Fourier transform is complex: for each


frequency u, F(u) can have real (a) and imaginary (jb) parts.

At each frequency: Amplitude R = (a2 + b2)½


Phase q = tan-1(b/a)
Imaginary

b
where a + jb = R(cosq + jsinq).
R

q
a Real

Thus a and b represent cosine and sine components of


waveform.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Reminder: cos(−q) = cos(q)  cosine is even


sin(−q) = −sin(q)  sine is odd
Thus:
• Fourier transforms of even functions are real, and Fourier
series of even functions only contain cosine terms.
• Fourier transforms of odd functions are imaginary, and
Fourier series of odd functions only contain sine terms.

Note our rectangular function is even,  F(u) is real.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.1.3 Conceptual interpretation


a) Variable is time t (seconds)
 f(t) is time-varying quantity
 F(u) is function of frequency u (Hertz = s-1).
Example
f(t) = sound produced by an orchestra, recorded over short
period of time.
 |F(u)| = spectrum of audible frequencies.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

|F(u)|

FT

Depends on loudness of Depends on loudness


double base and tubas. of violins and flutes.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Audio systems often display spectral content of sound


during recording and playback (typically averaged over
discrete bands of frequencies).

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

b) Variable is distance x (metres)


 f(x) is spatially-varying quantity
 F(u) is function of spatial frequency u (m-1).
Example
f(x) = brightness along a line within an image.
 F(u) = spectrum of spatial frequencies, which depends
on “smoothness” of line.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

f(x) |F(u)|

FT

x u

A rapidly varying f(x) implies the


presence of a high frequency
component in the Fourier transform.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

In general, it is observed that:


“width” of f(x) x “width” of F(u)  constant

i.e. narrower functions have broader Fourier transforms


and vice versa.
Example F(u)
f(x)
1
1
FT
a
u
x
2/a

Product of widths = 2

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.2 Delta functions


The Dirac delta function:
d(x - x0) = 0 except when x = x0
and .
d(x)

x
x0

d(x) very useful for representing phenomena with negligible


duration or spatial extent, e.g. force of hammer blow, image
of distant star.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

The product of continuous function f(x) and delta function


d(x – x0) is only non-zero at x0 :

Note: integral of the product has “picked out” the value of


function at x = x0.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

The Fourier and inverse Fourier transforms of delta


function are:

ିଶగ௝௨௫ ିଶగ௝௨௫బ
଴ ଴ ଴ ଴
ିஶ

ିଵ ଶగ௝௨௫ ଶగ௝௫௨బ
଴ ଴ ଴ ଴
ିஶ

The result is a single-frequency waveform which has


cosine (real) and sine (imaginary) components.

The frequency of waveforms depends on position of delta


function (i.e. x0 or u0).*
* See notes for examples.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.3 Properties of Fourier transforms


a) Differentiation
It can be shown that:

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Here is the proof:

Using integration by parts:

Assuming f() = 0 so integral of f(x) is finite:

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

This can be used to generate results for higher derivatives:

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

b) Integration
It can be shown that:

where 2pcd(u) represents the Fourier transform of the


constant of integration.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

c) Multiplication by a constant
It can be shown that:

d) Translation along the x axis


It can be shown that:

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

e) Multiplication by an exponential
It can be shown that:

where a may be real, imaginary, or complex.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.4 Convolution
2.4.1 Point response function
Suppose we attempt to measure an instantaneous event
represented by δ(t).
No device can respond infinitely fast  we measure a
smooth distribution of finite width called the
point-response function p(t).
d(t) p(t)

t t

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

If we record a series of events of arbitrary amplitude, our


measurement = series of point response functions, with
corresponding amplitudes.

t t

If events are close together, we obtain overlapping point


response functions, added together.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Suppose we measure a continuous signal s(t).


Sum = m(t)

s(t)

t t

This can be considered equivalent to infinite number of


delta functions with varying amplitude dependent on s(t).

Thus measurement m(t) = infinite sum of displaced point


response functions with amplitude varying according to s(t).

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Sum = m(t)
s(t)

t t

Measurement m(t) is known as the convolution of s(t) with


p(t), represented by:

m(t )   s(t ). p(t   t ).dt


The integral denotes the sum, and (t′ - t) denotes shift of


p(t) along time axis.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.4.2 Fourier representation of convolution


The convolution of two functions is often written as:
m(t) = s(t) * p(t)

Convolution can easily be performed using Fourier


transforms. It can be shown* that:

FT[ m(t) ] = FT[ s(t) ] . FT[ p(t) ]

or M(u) = S(u) . P(u)

* See notes for proof.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.4.3 An example of convolution: smoothing


Often we need to remove noise from data by “smoothing”,
equivalent to “removal of high frequencies” from Fourier
transform.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Consider a function s(x) convolved with p(x) :


s(x) |S(u)|
FT

x u
p(x)
* FT
|P(u)|
X

x u
m(x) |M(u)| Multiply
by zero
FT-1

x u
This process is not reversible.
ENGSF0004: Mathematical Modelling & Analysis II
Topic 2: Transforms

2.5 Laplace transform


2.5.1 Laplace transform of functions

The Laplace transform is very useful for solving linear


differential equations.
The Laplace transform of y(t) is defined as:

Y (s) =  e - st y(t) dt
0

Note that the Laplace transform:


• is a function of a new variable s.
• is only defined for positive values of t, (i.e. assumed
that y(t) ≡ 0 for t < 0 ).

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms


Y (s) =  e - st y(t) dt
0

This is represented by:


The inverse Laplace transform converts Y(s) back into y(t):

Whereas Fourier transform expresses function as sum of


sinusoidal waveforms, the Laplace transform expresses as
sum of moments (e.g. mean, variance, skew, etc.).

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Examples
a) The Laplace transform of a constant: y(t) = k

Because we must assume y(t) ≡ 0 for t < 0, we consider a


“step function” rather than a constant.
The Heaviside Step Function is defined as:

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

The Laplace transform of u(t) is:

(s > 0)

If we multiply u(t) by k, it is clear that .

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

b) The Laplace transform of an exponential: y(t) = eat


ஶ ஶ
௔௧ ௔௧ ି௦௧ ௔ି௦ ௧ ሺ௔ି௦ሻ௧ ஶ

଴ ଴

Provided s > a .
Note that existence of Laplace transforms places a
condition on variable s.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

c) The Laplace transform of y(t) = t


ஶ ି௦௧

Integrate by parts:
ஶ ௗ ଵ ି௦௧ ௧ ି௦௧ ஶ ଵ ି௦௧
଴ ௗ௧ ௦ ௦ ଴ ௦

௧ ି௦௧ ଵ ି௦௧ ஶ ଵ
 ௦ ௦మ ௦మ
(s > 0)

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Tables of Laplace
transforms are widely
available.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.5.2 Laplace transform of derivatives


Laplace transforms of derivatives are related in simple way
to transform of function itself.
It can be shown* that: * See notes for proof.


These contain “initial values” = values of function and its


derivative at t = 0.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.5.3 Solving differential equations given initial conditions


Example
Solve the following, assuming y = 2 at t = 0.

a) Find Laplace transform of each term:

From table of transforms

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

b) Replace each term with its Laplace transform

c) Insert initial condition(s) and rearrange to find Y(s)

This term will simplify via the method of partial fractions to a form

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

d) Perform inverse Laplace transform

మ మ

and replace with terms found in a table:

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.5.4 The Shift Theorems


There are two theorems which are useful when finding
Laplace transforms and inverse transforms.

a) Translation of transforms
It can be shown that Laplace transform of y(t) multiplied by
factor eat is:

This is Y(s) shifted along the s axis by a.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Example

Find the inverse transform: మ .

From table:

Shift theorem:

 మ

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

b) Translation of functions
It can be shown that Laplace transform of y(t  a) is equal to
Laplace transform of y(t) multiplied by e−as:

In this case, y(t) has shifted along the t axis by a.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Example

Find the inverse transform: మ

From table:

Shift theorem:

Note that transform of sin (t − 6) is undefined when (t – 6) <


0, and therefore this solution requires t > 6 .

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.5.5 Laplace transform of a delta function


The Laplace transform of delta function d(t – t0) is derived
as follows (assuming t0 > 0):
.

The function inside integral is only non zero at t = t0 :


బ .

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

2.5.6 Convolution Theorem for Laplace transforms

The Convolution Theorem for Laplace transforms is:

where F(s) and G(s) are Laplace transforms of f(t) and g(t).

This enables some inverse transforms to be found easily


when the transform is a product of two other transforms.

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Example Find: మ

We note that మ is the product of two Laplace transforms:

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Example Find: మ

Convolution theorem: ௧ ௧
ିଵ

଴ ଴

From table: ଶ when


ିହ௧
and when

Calculate terms inside (either) integral:


ିହሺ௧ି௦)
and
ିହ௦
and

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

Example Find: మ

Insert terms inside integrals:



ିଵ ିହሺ௧ି௦)



ିଵ ିହ௦
or ଶ

Either requires integration by parts, and yield the same


answer:
ିଵ ିହ௧

ENGSF0004: Mathematical Modelling & Analysis II


Topic 2: Transforms

ENGSF0004: Mathematical Modelling & Analysis II

You might also like