**Fourier convolution** is used here to determine how the
optical spectrum in Window 1 (top left) will appear when scanned
with a spectrometer whose slit function (spectral resolution) is
described by the Gaussian function in Window 2 (top right). The
Gaussian function has already been rotated so that its maximum
falls at x=0, which is necessary to prevent the result from
being shifted on the x-axis. The resulting convoluted optical
spectrum (bottom center) shows that the two lines near x=110 and
120 will not be resolved but the line at x=40 will be partly
resolved. Fourier convolution is used in this way to correct the
analytical curve non-linearity caused by spectrometer
resolution, in the "Tfit" method for
hyperlinear absorption spectroscopy.

For large signals, it is common to perform the calculation by point-by-point multiplication of the two signals in the Fourier domain. First, the Fourier transform of each signal is obtained. Then the two Fourier transforms are multiplied point-by-point by the rules for complex multiplication and the result is then inverse Fourier transformed. Fourier transforms are usually expressed in terms of "complex numbers", with real and imaginary 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 product of the two Fourier transforms is (a + ib)(c + id) = (ac - bd) + i(bc + ad). Although this seems to be a round-about method, it turns out to be faster then the shift-and-multiply algorithm when the number of points in the signal is large. Convolution can be used as a powerful and general algorithm for smoothing and differentiation. Many computer languages will perform this operation automatically when the two quantities divided are complex.

Fourier convolution can also be used as a very general algorithm for the smoothing and differentiation of digital signals, by convoluting the signal with a (usually) small set of numbers representing the convolution vector. Smoothing is performed by convolution with sets of positive numbers, e.g. [1 1 1] for a 3-point boxcar. Convolution with [-1 1] computes a first derivative; [1 -2 1] computes a second derivative; [1 -4 6 -4 1] computes the fourth derivative. Successive convolutions by Conv1 and then Conv2 is equivalent to one convolution with the convolution of Conv1 and Conv2. First differentiation with smoothing is done by using a convolution vector in which the first half of the coefficients are negative and the second half are positive (e.g.[-1 -2 0 2 1]).

**Simple whole-number convolution vectors:
**

[1 1 1]

3 point triangular smooth

5 point triangular smooth

[1 4 6 4 1]

7 point Gaussian smooth

[1 4 9 14 17 14 9 4 1]

` `**Differentiation:**

`[-1 1]
First derivative`

`[1 -2 1]
Second derivative`

** [1 -3 3 -1]**
Third derivative

` `**Results of successive convolution by two
vectors Conv1 and Conv2:
(⁕ stands for convolution)
Conv1
Conv2
Result
Description**

[1 1 1] ⁕ [1 1 1] = [1 2 3 2 1] Triangular smooth

[1 2 1] ⁕ [1 2 1] = [1 4 6 4 1] P-spline smooth

[-1 1] ⁕ [-1 1] = [1 -2 1] 2nd derivative

[-1 1] ⁕ [1 -2 1] = [1 -3 3 -1] 3rd derivative

[1 -2 1] ⁕ [1 -2 1] = [1 -4 6 -4 1] 4th derivative

[-1 1] ⁕ [1 1 1] = [1 0 0 -1) 1st derivative gap-segment

[-1 1] ⁕ [1 2 1] = [1 1 -1 -1) Smoothed 1st derivative

[1 1 -1 -1] ⁕ [1 2 1] = [1 3 2 -2 -3 -1] Same with more smoothing

[1 -2 1] ⁕ [1 2 1] = [1 0 -2 0 1] 2nd derivative gap-segment

[1 1 1 1] ⁕ [1 1 1 1] = [1 2 3 4 3 2 1] 2 passes of 4-point sliding average

` `rectangle conv rectangle = triangle or trapezoid **(depends**
on relative widths)

Gaussian conv Gaussian = Gaussian of greater width

Gaussian conv Lorentzian = Something in between **Gaussian****
****and **Lorentzian

Spreadsheets can be used to perform "shift-and-multiply" convolution for digitally sampled data sets (for example, MultipleConvolution.xlsx, MultipleConvolutionFirstDerivativeDemo.xls (screen shot), and MultipleConvolution4thDerivativeDemo.xls (screen shot) for Excel and MultipleConvolutionOO.ods for Calc). For very large data sets the performance can be much slower that Fourier convolution (which is much easier done in Matlab/Octave or in Python than in spreadsheets). Spreadsheets, however, do have the instructional advantage of showing the "shift-and-multiply" operation more clearly and explicitly.

smooths the vector y with a 5-point unweighted sliding average (boxcar) smooth, and

smooths the vector y with a 5-point triangular smooth. The optional argument 'same' returns the central part of the convolution that is the same size as y. If that optional argument is "full", then the length of the result is ones less than the sum of the lengths of the two vectors.

Differentiation is carried out with smoothing by using a convolution vector in which the first half of the coefficients are negative and the second half are positive (e.g.[-1 0 1],[-2 -1 0 1 2], or [-3 -2 -1 0 1 2 3]) to compute a first derivative with increasing amounts of smoothing. The

ans =

1 0 -2 0 1

The next example creates an exponential trailing transfer function (c), which has an effect similar to a simple RC low-pass filter, and applies it to y.

In each of the above three examples, the result of the convolution is divided by the sum of the convolution transfer function, in order to insure that the convolution has a net gain of 1.000 and thus does not effect the area under the curve of the signal. This makes the mathematical operation closer to the physical convolutions that spread out the signal in time and reduce the peak amplitude, but conserve the total energy in the signal, which for a peak-type signal is proportional to the area under the curve.

Alternatively, you could perform the convolution yourself

iSignal version 5.7 has a

July 2024. This page is part of "