Upload
others
View
55
Download
0
Embed Size (px)
Citation preview
A Beginner’s Guide to Convolution and Deconvolution
David A HumphreysNational Physical Laboratory
([email protected])Signal Processing Seminar 21 June 2006
Overview
• Introduction• Pre-requisites• Convolution and correlation• Fourier transform deconvolution• Direct deconvolution• Summary
Convolution
• Finite impulse response for a system• Convolution implies history/memory of the stimulus• Convolution implies Bandwidth
Time →Time →
Dirac Impulse function δ(t)
Resultant Waveform System response
h(t)
Linear System
Prerequisites
• System must be linear• f(a)+f(b)=f(a+b)• Superposition must apply• Vout = Gain x Vin Linear system• Vout = A x V1in x V2in Nonlinear system• Linearise• Keep V2in constant
Prerequisites
• System can be described as a waveform – impulse response• Waveform must be time invariant• Shape of f(t) unchanged through translation f(t-t1)
Convolution
System response
-2
-1
0
1
2
1 3 5 7 9 11 13 15 17 19
Time
Sign
al
System response
Stimulus
-1
0
1
2
1 3 5 7 9 11 13 15 17 19
Time
Sign
al
Stimulus
-1
-0.5
0
0.5
1
1.5
2
2.5
3
1 3 5 7 9 11 13 15 17 19
Time
Sign
al
t9t8t7t6t5t4t3t2t1t0
-1
-0.5
0
0.5
1
1.5
2
2.5
1 3 5 7 9 11 13 15 17 19
Time
Sign
al
t0t1t2t3t4t5t6t7t8t9
Convolution
Result
-1
0
1
2
3
1 3 5 7 9 11 13 15 17 19
Time
Sign
al
Result
Stimulus
-1
0
1
2
1 3 5 7 9 11 13 15 17 19
Time
Sign
al
Stimulus
Measured waveform
• Convolution of stimulus and system response
Signal x(t)
Resultant waveform
y(t)
System response
h(t)
Frequency domain Time domain
τττ dthxtyt
∫+
∞−−= )()()(
∑=
−=i
jjiji hxy
0
)()()( sXsHsY =
Convolution and Correlation
• Correlation – the direction of signal is reversed
Frequency domain Time domainConvolution
τττ dthxtyt
∫+
∞−−= )()()()()()( sXsHsY =
Correlation
τττ dthxtyt
∫+
∞−+= )()()()()()( sXsHsY =
Application areas
• Optics and Image capture• Waveform capture/processing• Electronic Engineering• Communications• Acoustics
De-convolution
Deconvolution
• Estimating the underlying signal from the smoothed result• Convolution with an inverse filter
• Convolution rules apply (Linearity, Superposition, Time invariance)
• ILL-POSED PROBLEM – may not have a perfect solution
Applications
• Image analysis and correction• Instrument response correction• Waveform analysis• Oscilloscope risetime calibration• Transducer response calibration• Geological surveying• Echo cancelling/line frequency response correction
(Modem/Broadband ADSL)
Deconvolution of measured waveform
• Convolution of stimulus and system response• Deconvolution – correction for the system response
Signal x(t)
Resultant waveform
y(t)
System response
h(t)
DeconvolveSystem
responseh-1(t)
Estimate forSignal
x’(t)
h-1(t) is the inverse of the system response h(t)
Deconvolution of measured waveform
• Convolution of stimulus and system response• Deconvolution – correction for the system response
Signal x(t)
Resultant waveform
y(t)
System response
h(t)
Estimate forSignal
x’(t)
DeconvolveSystem
responseh-1(t)
Filterr(t)
h-1(t) is the inverse of the system response h(t)
Deconvolution
• Inverse problem• Ill-posed• Noise• System response errors Deconvolved
Noise
Deconvolved result
Frequency
Volta
ge
)()()(ω
ωωjH
noisejYjX +=
Deconvolution with filter
• Inverse problem• Ill-posed• Noise• System response errors• Filter added to limit noise/errors
Deconvolved Noise
Filter R(jω)System response
Deconvolved result
Frequency
Volta
ge
)()(
)()( ωω
ωω jRjH
noisejYjX +=
Realisation of Deconvolution process
• System impulse response• Direct time-domain convolution (Digital filtering - FIR)• Transform approach (e.g. Fourier transform)
22
2
)()(
)(CjH
jHjR
αωω
ω+
=
0 20 40 60 80 100 120 140 160 180 20020
10
0
10
20
30
40
50
Combined, unprocessed dataDeconvolved result: Brick wall filterDeconvolved result:Nahman filter
Time, ps
Nor
mal
ised
resp
onse
1. α is a user controlled parameter
2. C may be constant or frequency dependent e.g. ω2 maximises the smoothness of the result
x(t)A/D
converterMemory
FIRfilter
Displayedresult
Limitations
• Fourier Transform assumes a cyclic repeating signal• Fourier Transform deconvolution cannot be applied to step
waveforms directly
5 0 5 10 150.5
0
0.5
1
1.5
Time
Orig
inal
sign
al
Solution 1
• Differentiate the signal xi →xi-xi-1
• Deconvolve the signal• Integrate the signal xi →xi+xi-1
6 4 2 0 2 4 60.5
0
0.5
1
1.5
Time
Orig
inal
sign
al
6 4 2 0 2 4 60.01
0
0.01
0.02
Time
Der
ivat
ive
sign
al
Solution 2
• Append a ‘joining function’ e.g. A cos(πt/T)+B to the signal• Deconvolve the signal• Discard the joining function
5 0 5 10 150.5
0
0.5
1
1.5Original signalJoining function
Time
Orig
inal
sign
al
Direct deconvolution
• Convolution described as a summation • Deconvolution as a least-squares solution for x?• Filtering required to smooth result
∑=
−=i
jjiji hxy
0
Convolution sum
0'2
0
=⎟⎟⎠
⎞⎜⎜⎝
⎛−∑
=− i
i
jjij yhx
Least-squares representation – minimise errors
( ) 0''2' 2111 =+− ++− jjj xxxγ
Additional least-squares equations – maximise smoothness of the result
Direct deconvolution
• Large system of equations (>1000 unknowns)• Direct deconvolution of step response is possible
Summary
• Introduction• Pre-requisites• Convolution and correlation• Time and Frequency domains• Inverse problems• Fourier transform deconvolution• Direct deconvolution• Summary