absorption spectrophotometry] [Appendix
Case Studies] [Peak
and Measurement] [iPeak]
downloadable software] [Interactive
the converse of Fourier convolution
the sense that division is the converse of multiplication. If you
know that m times x equals n,
where m and n are known but x
unknown, then x equals n divided by
Conversely if you know that m convoluted with
equals n, where m and n
known but x is unknown, then x equals
deconvoluted from n.
In practice, the deconvolution of one signal from another is usually performed by point-by-point division of the two signals in the Fourier domain, that is, dividing the Fourier transforms of the two signals point-by-point and then inverse-transforming the result. Fourier transforms are usually expressed in terms of complex numbers, with real and imaginary parts representing the sine and cosine parts. If the Fourier transform of the first signal is a + ib, and the Fourier transform of the second signal is c + id, then the ratio of the two Fourier transforms is
by the rules for the division
complex numbers. Many computer languages will perform this
operation automatically when the two quantities divided are
Note: The word "deconvolution" can have two meanings, which can lead to confusion. The Oxford dictionary defines it as "A process of resolving something into its constituent elements or removing complication in order to clarify it", which in one sense applies to Fourier deconvolution. But the same word is also sometimes used for the process of resolving or decomposing a set of overlapping peaks into their separate additive components by the technique of iterative least-squares curve fitting of a proposed peak model to the data set. However, that process is actually conceptually distinct from Fourier deconvolution, because in Fourier deconvolution, the underlying peak shape is unknown but the broadening function is assumed to be known; whereas in iterative least-squares curve fitting it's just the reverse: the peak shape must be known but the width of the broadening process, which determines the width and shape of the peaks in the recorded data, is unknown. Thus the term "spectral deconvolution" is ambiguous: it might mean the Fourier deconvolution of a response function from a spectrum, or it might mean the decomposing of a spectrum into its separate additive peak components. These are different processes; don't get them confused.
The practical significance of Fourier deconvolution in signal processing is that it can be used as a computational way to reverse the result of a convolution occurring in the physical domain, for example, to reverse the signal distortion effect of an electrical filter or of the finite resolution of a spectrometer. In some cases the physical convolution can be measured experimentally by applying a single spike impulse ("delta") function to the input of the system, then that data used as a deconvolution vector. Deconvolution can also be used to determine the form of a convolution operation that has been previously applied to a signal, by deconvoluting the original and the convoluted signals. These two types of application of Fourier deconvolution are shown in the two figures below.
Fourier deconvolution is used here to remove the distorting influence of an exponential tailing response function from a recorded signal (Window 1, top left) that is the result of an unavoidable RC low-pass filter action in the electronics. The response function (Window 2, top right) must be known and is usually either calculated on the basis of some theoretical model or is measured experimentally as the output signal produced by applying an impulse (delta) function to the input of the system. The response function, with its maximum at x=0, is deconvoluted from the original signal . The result (bottom, center) shows a closer approximation to the real shape of the peaks; however, the signal-to-noise ratio is unavoidably degraded compared to the recorded signal, because the Fourier deconvolution operation is simply recovering the original signal before the low-pass filtering, noise and all. (Matlab/Octave script)
Note that this process has an effect that is visually similar to resolution enhancement, although the later is done without specific knowledge of the broadening function that caused the peaks to overlap.
A different application of Fourier deconvolution is to reveal the nature of an unknown data transformation function that has been applied to a data set by the measurement instrument itself. In this example, the figure in the top left is a uv-visible absorption spectrum recorded from a commercial photodiode array spectrometer (X-axis: nanometers; Y-axis: milliabsorbance). The figure in the top right is the first derivative of this spectrum produced by an (unknown) algorithm in the software supplied with the spectrometer. The objective here is to understand the nature of the differentiation/smoothing algorithm that the instrument's software uses. The signal in the bottom left is the result of deconvoluting the derivative spectrum (top right) from the original spectrum (top left). This therefore must be the convolution function used by the differentiation algorithm in the spectrometer's software. Rotating and expanding it on the x-axis makes the function easier to see (bottom right). Expressed in terms of the smallest whole numbers, the convolution series is seen to be +2, +1, 0, -1, -2. This simple example of "reverse engineering" would make it easier to compare results from other instruments or to duplicate these result on other equipment.
When applying Fourier deconvolution to experimental data, for example to remove the effect of a known broadening or low-pass filter operator caused by the experimental system, there are three serious problems that limit the utility of the method: (1) the convolution occurring in the physical domain might not be accurately modeled by a mathematical convolution; (2) the width of the convolution - for example the time constant of a low-pass filter operator or the shape and width of a spectrometer slit function - must be known, or at least adjusted by the user to get the best results, and (3) a serious signal-to-noise degradation commonly occurs; any noise added to the signal by the system after the convolution by the broadening or low-pass filter operator will be greatly amplified when the Fourier transform of the signal is divided by the Fourier transform of the broadening operator, because the high frequency components of the broadening operator (the denominator in the division of the Fourier transforms) are typically very small, resulting in a great amplification of high frequency noise in the resulting deconvoluted signal. See the Matlab/Octave code example at the bottom of this page. (Of course, if the denominator contains any zeros, the result will be a "divide-by-zero" error and the whole operation fails). The problem of low values or zeros in the denominator can be reduced by smoothing before convolution and by constraining the Fourier deconvolution to a frequency region where the denominator is sufficiently high. You can see this amplification of high frequency noise happening in the example in the first example above. However, this effect is not observed in the second example, because in that case the noise was present in the original signal, before the convolution performed by the spectrometer's derivative algorithm. The high frequency components of the denominator in the division of the Fourier transforms are typically much larger than in the previous example, avoiding the noise amplification and divide-by-zero errors, and the only post-convolution noise comes from numerical round-off errors in the math computations performed by the derivative and smoothing operation, which is always much smaller than the noise in the original experimental signal.
In practice, the width of the physical convolution is seldom known exactly, so the deconvolution must be adjusted empirically to yield the best results. Similarly, the width of the final smooth operation must also be adjusted for best results. The results will seldom be perfect, but are often an improvement over the original.
As a method for peak sharpening, deconvolution can be compared to the methods described earlier, in particular the much simpler power method, in which the raw signal is simply raised to some positive power n. The Matlab/Octave script PowerMethod.m compares these two methods for a pair of overlapping peaks, showing that power method (with n=5) is capable of reducing the peak width and increasing the separation-to-width ratio better than deconvolution, but it does not restore the original peak positions, heights, and widths as does the deconvolution method (graphic).
SPECTRUM, the freeware signal-processing application for Mac OS8 and earlier, includes a Fourier deconvolution function.
and Octave have a built-in function for Fourier
deconv. An example of its
is shown below: the vector yc (line 6) represents a noisy
rectangular pulse (y) convoluted with a transfer function c
before being measured. In line 7, c is deconvoluted from yc,
in an attempt to recover the original y. This requires
the transfer function c be known. The rectangular signal
is recovered in the lower right (ydc), complete with the
that was present in the original signal. The Fourier
deconvolution reverses not only the signal-distorting effect of
convolution by the exponential function, but also its low-pass
noise-filtering effect. As explained above, there is significant
amplification of any noise that is added after the
by the transfer function (line 5). This script demonstrates that
there is a big difference between noise added before the
convolution (line 3), which is recovered unmodified by the Fourier
deconvolution along with the signal, and noise added after
convolution (line 6), which is amplified compared to that in the
original signal. Execution time: 0.03 seconds in Matlab; 0.3
in Octave. Download this
y(900:1100)=1; % Create a rectangular function y,
% 200 points wide
y=y+.01.*randn(size(y)); % Noise added before the convolution
c=exp(-(1:length(y))./30); % exponential trailing convolution
% function, c
yc=conv(y,c,'full')./sum(c); % Create exponential trailing rectangular
% function, yc
% yc=yc+.01.*randn(size(yc)); % Noise added after the convolution
ydc=deconv(yc,c).*sum(c); % Attempt to recover y by
% deconvoluting c from yc
% Plot all the steps
subplot(2,2,1); plot(x,y); title('original y');subplot(2,2,2); plot(x,c);title('c'); subplot(2,2,3); plot(x,yc(1:2001)); title('yc'); subplot(2,2,4); plot(x,ydc);title('recovered y')
Alternatively, you could perform the Fourier deconvolution yourself without using the built-in Matlab/Octave "deconv" function by dividing the Fourier transforms of yc and c using the built-in Matlab/Octave "fft.m" function and inverse transform the result with the built-in Matlab/Octave "ifft.m" function. Note that c must be zero-filled to match the size of yc. The results are essentially the same (except for the numerical floating point precision of the computer, which is usually negligible), and it's actually ten times faster than using the deconv function:
The script DeconvDemo3.m is similar to the above, except that it demonstrates Gaussian Fourier convolution and deconvolution of the same rectangular pulse, utilizing the fft/ifft formulation just described. The animated screen graphic is shown on the left, demonstrating the effect of changing the deconvolution width. The raw deconvoluted signal in this example (bottom left quadrant) is extremely noisy, but that noise is mostly "blue" (high frequency) noise that is easily reduced by a little smoothing. As you can see in both of the animated examples here, deconvolution works best when the deconvolution width exactly matches the width of the convolution that the observed signal has been subject to; the further off you are, the worse will be the wiggles and other signal artifacts. In practice, you have to try several different deconvolution widths to find the one that results in the smallest wiggles, which of course becomes harder to see if the signal is very noisy.
DeconvDemo4.m (on the right) shows a Gaussian deconvoluted from a Gaussian function and an attempt to recover the original peak width. This is an example of "self deconvolution", so-called because the shape of the deconvolution function is the same as the shape of the peaks in the signal, in this case both Gaussian. Typically this would be applied to a signal containing multiple overlapping peaks, in an attempt to sharpen the peaks to improve the resolution. Note that in this example the deconvolution width must be within 1% of the deconvolution width. In general, the wider the physical convolution width relative to the signal, the more accurately the deconvolution width must be matched the physical convolution width. DeconvDemo5.m (shown on the left) shows an example with two closely-spaced underlying peaks of equal width that are completely unresolved in the observed signal, but are recovered with their 2:1 height ratio intact in the deconvoluted and smoothed result. DeconvDemo6.m is that same except that the underlying peaks are Lorentzian. Note that all these scripts require functions than can be downloaded from http://tinyurl.com/cey8rwh.
In all of the above simulations, the deconvolution method works as well as it does because the signal-to-noise ratio of the "observed signal" (upper right quadrant) is quite good; the noise is not even visible on the scale presented here. In the absence of any knowledge of the width of the deconvolution function, finding the right deconvolution width depends upon experimentally minimizing the wiggles that are seen when the deconvolution width is incorrect, and a poor signal-to-noise ratio will make this much more difficult. Of course smoothing can reduce noise, especially high-frequency (blue) noise, but smoothing also slightly increases the width of peaks, which works counter to the point of deconvolution, so it must not be over used. The image on the left shows the widths of the peaks (as full width at half maximum); the width of the deconvoluted peaks (lower right quadrant) are only slightly larger than in the (unobserved) underlying peaks (upper left quadrant) either because of imperfect deconvolution or the broadening effects of the smoothing needed to reduce the high frequency noise. As a rough but practical rule of thumb, if there is any visible noise in the observed signal, it is likely that the results of self-deconvolution, of the type shown in DeconvDemo5.m, will be too noisy to be useful.
Here is another example, shown below on the left. (Download this script). The underlying signal (uyy) is a Gaussian, but in the observed signal (yy) the peak is broadened exponentially resulting in a shifted, shorter, and wider peak, and then a little constant white noise is added after the broadening convolution (cc). Assuming that the exponential broadening time constant ('tc') is known, or can be guessed or measured, the Fourier deconvolution of cc from yy successfully removes the broadening (yydc), and restores the original height, position, and width of the underlying Gaussian, but at the expense of considerable noise increase. However, the noise remaining in the deconvoluted signal is "blue" (high-frequency weighted) and so is easily reduced by smoothing and has less effect on least-square fits than does white noise. (For a greater challenge, try more noise in line 6 or a bad guess of time constant ('tc') in line 7). To plot the recovered signal overlaid with underlying signal: plot(xx,uyy,xx,yydc). To plot the observed signal overlaid with with underlying signal: plot(xx,uyy,xx,yy). To curve fit the recovered signal to a Gaussian to determine peak parameters: [FitResults,FitError]=peakfit([xx;yydc],26,42,1,1,0,10), which yields excellent values for the original peak positions, heights, and widths. You can demonstrate to yourself that with ten times the previous noise level (Noise=.01 in line 6), the values of peak parameters determined by curve fitting are still quite good, and even with 100x more noise (Noise=.1 in line 6) the peak parameters are more accurate than you might expect for that amount of noise (because that noise is blue). Remember, there is no need to smooth the results of the Fourier deconvolution before curve fitting, as seen previously.
% Deconvolution demo 2
% Underlying signal with a single peak (Gaussian) of unknown
% height, position, and width.
% Compute observed signal yy, using the expgaussian function with time
% constant tc, adding noise added AFTER the broadening convolution (ExpG)
Noise=.001; % <<<< Change the noise here
% Guess, or use prior knowledge, or curve fit one peak, to
% determine time constant (tc), then compute transfer function cc
% Use "deconv" to recover original signal uyy by deconvoluting cc
% from yy. It's necessary to zero-pad the observed signal as shown here.
% Plot the signals and results in 4 quadrants
plot(xx,uyy);title('Underlying 4 Gaussian signal, uyy');
plot(xx,cc);title('Exponential transfer function, cc')
plot(xx,yy);title('observed broadened and noisy signal, yy');
plot(xx,yydc);title('After deconvoluting transfer function, yydc')
% Try more Noise (line 6) or a bad guess of time constant (line 11)
% plot recovered signal overlaid with underlying signal:
% plot observed signal overlaid with underlying signal:
% Curve fit recovered signal to a Gaussian to determine peak parameters:
% Or curve fit observed signal with an exponentially broadened Gaussian
An alternative to the above deconvolution approach is to use iterative curve fitting (which is covered in a further section) to fit the observed signal directly with an exponentially broadened Gaussian (shape number 5):
>> [FitResults,FitError]=peakfit([xx;yy], 26, 50, 1, 5, 70, 10)
Both methods give good values of the peak parameters, but the Fourier deconvolution method is faster, because fitting the deconvoluted signal with a simple Gaussian model is faster than iteratively curve fitting the observed signal with a exponentially broadened Gaussian model. Also, if the exponential factor "tc" is not known, it can be determined by iterative curve fitting, adjusting the exponential factor ('extra') interactively to get the best fit:
which in this case gives a best fit when the exponential factor "tc" is adjusted to about 69.9.
Alternatively, you can use peakfit.m with the constrained variable exponentially broadened Gaussian (shape 31), which will automatically find the best value of "tc", but in that case the best results will be obtained if you give it a rough starting guess ("start") at least within a factor of two or so of the correct values:
>>[FitResults,FitError]=peakfit([xx;yy],0,0,1,31,70,10, [20 10 50])
FitResults = Peak# Position Height Width Area tc
1 25.006 0.99828 10.013 10.599 69.83
So the value of the exponential factor for this measurement is 69.8. In either case, if the signal is very noisy, there will be quite a bit of uncertainty in the value of the exponential factor so determined - for example, the value will vary a bit if slightly different regions of the signal are selected for measurement (e.g. by panning or zooming in ipf.m or by changing the center and window arguments in peakfit.m). See Appendix H: Fourier deconvolution vs curve fitting for another example with four overlapping Gaussians.
Segmented deconvolution. If the peak widths or tailing vary substantially across the signal, you can use a segmented deconvolution, which allows the deconvolution vector to adapt to the local conditions in different signal regions. SegExpDeconv(x,y,tc) divides x,y into a number of equal-length segments defined by the length of the vector 'tc', then each segment is deconvoluted with an exponential decay of the form exp(-x./t) where t is corresponding element of the vector tc. Any number and sequence of t values can be used. SegExpDeconvPlot.m is the same except that it plots the original and deconvoluted signals and shows the divisions between the segments by vertical magenta lines to make it easier to adjust the number and values of the segments. SegGaussDeconv.m and SegGaussDeconvPlot.m are the same except that they perform a symmetrical (zero-centered) Gaussian deconvolution. SegDoubleExpDeconv.m and SegDoubleExpDeconvPlot.m perform a symmetrical (zero-centered)exponential deconvolution. If the peak widths increase regularly across the signal, you can calculate a reasonable initial value for the vector 'tc' by giving only the number of segments (NumSegments) , the first value, startt, and the last value, endt:
iSignal version 5.7 has a Shift-V keypress that displays the menu of Fourier convolution and deconvolution operations that allow you to convolute a Gaussian or exponential function with the signal, or to deconvolute a Gaussian or exponential function from the signal, and asks you for the width or the time constant (in X units).
This page is also available in French,
courtesy of Natalie Harmann.
Revised June, 2017. This page is part
Pragmatic Introduction to Signal Processing", created
and maintained by Prof.
O'Haver , Department of Chemistry and Biochemistry, The
University of Maryland at College Park. Comments, suggestions and
questions should be directed to Prof. O'Haver at firstname.lastname@example.org.
Unique visits since May 17, 2008: