Analog and digital worlds: Part 2. Fourier analysis in signals and data treatment

The most direct scope of Fourier Transform (FT) is to give an alternative representation of a signal: from the original domain to the corresponding frequency domain. The original domain can be time, space or any other independent variable that can be used as the domain of the function. This subject has been treated in Part 1 [1]. In particular, the FT of a signal, also referred to as the frequency spectrum of a signal, has been used to calculate the lowest sampling frequency that provides a correct representation of the signal itself. At the beginning of this contribution, it is illustrated how to implement the so-called windowing process to periodic sequences. Then, the meaning of the operations denominated convolution and deconvolution is discussed. It is shown how FT provides a very effective path to the execution of these operations in the alternative domain by employing the convolution theorem. Finally, the application of convolution and deconvolution operations to experimental signals associated with the ‘spontaneous’ convolution of two concurrent events is analysed by different examples.


Introduction
In Part 1 of this series [1], we dealt with a widespread mathematic tool: Fourier Transform (FT).When it is applied to a numerical sequence of data, rather than to a function, it is known as Discrete Fourier Transform (DFT) [2][3][4][5][6][7][8][9].As a result of this, DFT has become an essential part of modern techniques such as infrared (FT-IR), microwave, nuclear magnetic resonance (FT-NMR), faradic impedance spectroscopies, mass spectrometry in the form of ion cyclotron resonance (ICR) spectroscopy and other instrumental methods [6,7].
The computational details of DFT are most often a sort of black box to the user, since they are directly executed by the software of an instrument.As a result, the operator may ignore the way of how the final instrumental response is obtained.In the case of FT-based instrumentation, little or even no expertise at all is requested to the user to obtain the output signal.However, aiming at the most suitable treatment of data and signals of different nature, a completely 'passive' approach does not always constitute the best choice.In Ref. [1], we dealt with more or less trivial examples of original signals that are transformed by means of FT into their corresponding frequency spectra, leading to equivalent signals represented in the frequency domain.It often happens that such a transformation into the frequency spectrum is the best way to obtain useful information.Actually, sometimes, it is the unique way for performing such an analysis.
Furthermore, in many cases, the execution of operations on the frequency spectra is definitely simpler than on the original signals.Some of these cases are described in the present article, such as convolution and deconvolution.In particular, performing deconvolution of signals in the original domain may require long times and high computational loads, while, by using FT, this operation is much faster and more easily accomplished.
When manipulating signals, the term convolution is often used as a synonym of signal filtering, or digital signal filtering [2,3,5,9].This is a branch of science that was born in the frame of (digital) electronics and is nowadays a very important issue in all experimental sciences.For chemists, the meaning of signal filtering is often restricted to the low-pass filtering operation, which means removal of the high frequency content of the signal.However, filtering can be also used to perform many other operations, ranging from the simple differentiation to more complex elaborations.
The result of convolution may be 'hidden' within a signal that results from 'mixing' of different physical phenomena.In this case, deconvolution is the mathematical operation that may separate the individual contributions to the overall signal.It is evident that the analysis of the effects of the individual components may lead back to the identification of the characteristics of the corresponding individual sources.
FT algorithm operates on a finite number of data, i.e., on finite sequences.When an infinite length signal is submitted to FT, it must therefore be properly truncated, i.e., sectioned.However, FT implicitly ascribes periodic character to the selected section.The isolated segment is viewed by the FT algorithm as the period of an infinite sequence, not necessarily coincident with that of the original signal, as depicted in Fig. 1.The procedures to properly truncate the whole original sequence (windowing) therefore constitute the beginning of the present contribution.
It is worth noticing that this Part 2 should be considered as the prosecution of Part 1 [1].For this reason, arguments already discussed there will be considered as if they were treated here, in the previous pages.This also holds for the meaning of some symbols.

Windowing
As previously emphasized, FT requires the consideration of a finite number of points that are representative of a periodic signal.This implies that it is necessary to truncate the original sequence, i.e., to look at it through a window.In other words, windowing is necessary in order to deal with a finite length sequence, consisting of a finite number of points, N.
Actually, in chemistry, the observed phenomena are usually of finite length, and their measurement leads to finite sequences.In general, these sequences are considered by FT in the same way as the results of the truncation of periodic signals.Considering cosines and sines as the set of basis functions [1], Eq. ( 1) expresses the periodic character of the resulting transformation (see Ref. [1] for the meaning of symbols): Noteworthy, as was discussed in Ref. [1], to many purposes it is sufficient to consider the modulus of the Fig. 1 a A single period accounts for the whole periodic sequence; b a fraction of one single period does not spectrum of x, which is generally referred to as the magnitude spectrum1 : Figure 2a reports the points obtained by sampling and truncating a cosine function to generate a (finite) sequence: the length of the window, i.e., of the truncation interval, is an integer multiple of the cosine period, so that the plot of the vector modulus versus frequency only exhibits one component with amplitude different from 0 (Fig. 2b).On the basis of the spectrum in Fig. 2b and of the corresponding plot of phase versus frequency, the cosine periodic sequence in Fig. 2a is reconstructed.
In the windowing operation outlined in Fig. 2a, the weight attributed to the points that are selected on the cosine function is either 1, for the points within the window, or 0, for the points outside the window.This corresponds to the so-called rectangular window, reported in Fig. 3a.Since the truncation interval is a multiple of a period of the windowed cosine, two adjacent segments do not show discontinuities.
On the other hand, the windowed interval in Fig. 2c, where the rectangular window in Fig. 3a is once more used, is not an integer multiple of the cosine period.As a result, in Fig. 2d, more or less high values are found for the amplitudes of any frequencies of the spectrum.Spurious frequencies arise, due to the discontinuities between adjacent windowed sequences.This undesired effect, called spectral leakage, is due to the fact that a periodic function different from a cosine is actually processed by the DFT operation.The sharp discontinuities at the extremes of two adjacent periods of the reconstructed periodic function are approximated by DFT through high-frequency components.However, the smoothness of the sine and cosine functions are poorly suited to account for sharp changes, so that the reconstructed signal exhibits spurious oscillations in the proximity of the discontinuity, ascribed to the socalled Gibbs phenomenon. 2he Gibbs phenomenon may be reduced by using a window suitable to smooth the discontinuities at the beginning and end of the truncated sequence.Such a window performs effective apodization. 3Reduction of the amplitudes of the spurious frequency components may be realised by properly weighting the points of the truncated sequence. 4Windows doing this most often represent preferable alternatives to the rectangular window in Fig. 3a.As an example, Fig. 2e shows a cosine function truncated in the same way as in Fig. 1c.Here, however, each point of the resulting sequence is weighted by the Hanning window (see Fig. 3c), which smooths the extremes of the windowed segment, so that the leakage is strongly reduced.The resulting spectrum, reported in Fig. 2f, better accounts for frequencies that 'do count' in the description of the original signal, closer to the only frequency present in Fig. 2b.Much lower values are instead assumed by spurious frequencies, with respect to Fig. 2d.As will be shown in the following sections, this is strictly related to the shape of the spectra of the rectangular and of the Hanning windows, reported in Fig. 3b and d, respectively.
Summarising, Fig. 3 shows two different windows through which to look at the original signal: a rough rectangular window (Fig. 3a), which has been invoked for truncation of the sequences in Fig. 2a, c, and a Hanning window (Fig. 3c).In Fig. 3b, d, the magnitude spectra corresponding to the two windows are shown.The presence of spurious oscillations, more evident in Fig. 3b than in Fig. 3d, constitutes a key point of the spectra of the window.In fact, the lower the amplitude of the oscillations, the lower the alteration of the windowed signal.

Convolution
The analysis of the convolution operation further evidences the potentialities of FT.As it was mentioned in the ''Introduction'', it often happens that a measured signal results from a peculiar 'mixing' of individual signals relative to different sources.In many cases, convolution accounts for the way on how two 'pure' signals combine with each other to give the resulting signal.Furthermore, convolution of two sequences may be intentionally performed to reach a variety of goals.In mathematic terms, convolution is a multistep operation, consisting of:  The mathematic formulation of convolution of two sequences x and p is expressed by Eq. ( 3): where the symbol stands for the convolution operation, where x and p are supposed to be equal to 0 outside Q and P points, respectively, and where the number of points of the p sequence is P = 2M ? 1.If the number of points of the x sequence is Q, the number of points of the resulting y sequence is equal to L = P ?Q -1.Actually, y may be prolonged by zeroes left and right the L points.
The example of Fig. 4  The overlap integral of p and x sequences is correspondingly computed (multiplication and sum in steps 3 and 4) and the values of the convolution sequences y are obtained.
For example, for k = 0, Eq. 3 gives: and so on, until, for k = 5:

The convolution theorem
We cited above that it is much more advantageous to perform some mathematic operations on signals in the alternative domain of the frequencies than in the original domain.In the case of the convolution operation, we take advantage of the convolution theorem, sketched in Fig. 5, which can be summarized as follows: the spectrum expressing convolution between two sequences can be obtained through the multiplication of the relevant spectra, frequency by frequency. 5n detail, given two sequences x and p, the convolution theorem requires the following steps6 : 1. Calculation on the relevant spectra: and H(h) = FT[p(k)]; 2. Multiplication of the two spectra frequency by frequency to give the spectrum Y(h) = X(h) 9 H(h); 3. Inverse transform of the spectrum Y(h): A graphical example of the application of the convolution theorem involving two sequences, x and p, is reported in Fig. 6.
Figure 6 highlights the equivalence between the convolution of x and p in the original domain using Eq. 3 (upper portion of the figure) and the result of applying the three steps of the convolution theorem (lower portion of the figure).
According to the scheme in Fig. 5 and to the relevant discussion, Eq. ( 4) expresses the mathematic steps corresponding to the application of the convolution theorem: where x and p are supposed to be equal to 0 outside Q and P points, respectively; y will be equal to 0 outside an interval consisting of L = P ?Q -1 points.

Digital filters
In Fig. 6, the sequence x is convolved with sequence p, typically a filter, to produce the sequence y.filtering is a very profitable operation in the case of the presence of random noise.This may be identified with the random errors in many cases, since random noise affects the signal introducing spurious high-frequency components.
Differently structured noises are met with in different frames, which are differently named (white noise, pink noise, red or Brownian noise, blue noise, etc.) based on the shape of the noise spectrum [11].
Figure 7 sketches a low-pass filtering operation, performed using a rectangular transfer function (this shape is often referred to as boxcar), with the consequent effect on a measured sequence affected by high frequency noise.
Coherently with the convolution theorem (Fig. 5), the path followed to perform the low-pass filtering operation is highlighted by the blue arrows in Fig. 7: the measured sequence in the original domain is transformed into the corresponding spectrum in the frequency domain.In turn, this latter one is multiplied, point by point, by the boxcar transfer function.From the resulting filtered spectrum, it is clear that the boxcar transfer function does not alter the frequency components of the spectrum until a given value, defined as the cutoff frequency.The information content necessary to reconstruct the 'clean' sequence is supposedly found at frequency values lower than the cutoff frequency, while the coefficients of the higher frequencies can be set to 0. This is actually a very coarse filtering method that, however, is quite often used, even leading to satisfactory results when the components of the noise to filter off are well separated from the useful ones.In these cases, the cutoff frequency is located in a region of the spectrum where the magnitude values are equal or very close to 0, and lower frequencies constitute the whole 'useful' portion of the signal.
In the dashed frame in Fig. 7, the inverse FT of the boxcar transfer function, namely the sinc filter, 7 is Fig. 7 The original noisy signal is either directly convolved with a sinc function or, through the convolution theorem, its spectrum is multiplied by a rectangular transfer function (adapted from Ref. [12]) Fig. 8 Results obtained by low-pass filtering the measured sequence of Fig. 7 with different transfer functions (adapted from Ref. [12]) included.An alternative path can be followed to obtain the same filtered sequence, which consists in convolving the measured sequence with a sinc filter.This gives reason of the fact that if the cutoff frequency of the boxcar transfer function is located where the magnitude values are different from zero, artefacts in the filtered sequence are introduced.The higher the magnitude values in proximity to the cutoff, the higher the intensities of the side lobes in the sinc filter.In this case, the frequencies are truncated too abruptly, and the side lobes present in the sinc filter induce oscillations in the filtered sequence, due to Gibbs phenomenon.
Some examples of other simple transfer functions used to perform low-pass filtering are shown in Fig. 8, together with the resulting filtered sequences.The transfer functions in Fig. 8 are among the simplest ones within the big number of transfer functions that can be used for this purpose.
In conclusion, the design of the most suitable low-pass filters or of the corresponding transfer functions aims at introducing as few as possible artefacts in the signal bearing useful information, as it would be recorded whether the noise were not present.
As mentioned above, in addition to those performing low-pass filtering, many other filters have been designed to differently manipulate the input x sequence, such as bandpass filters, differentiating filters and integrating filters.As an example, Fig. 9 sketches the transfer function of a differentiating filter (Fig. 9b), together with the result (Fig. 9c) obtained by its application to a couple of peaks (Fig. 9a).
We are aware of the possibility that confusion arises from what written so far about windowing and filtering, since the description of both operations has induced to often shift from the original domain to the frequency domain and vice versa.In an attempt to make the matter as clear as possible, Scheme 1 gives an idea of the computational analogies and of the deep differences between the two operations at the same time.Actually, both windowing and filtering make use of the convolution theorem.However, they are completely different operations which are applied to completely different purposes, using similar tools in 'reverse order'.
It does not seem redundant to schematically summarise the issue, even running the risk of repeating some concepts.Let us recall that windowing is used to truncate a sequence before calculating the relevant spectrum, and that the windowed sequence is given by the point-by-point multiplication between the sequence x and the window p. Due to the reversible character of the FT operation, the reverse of what shown in Fig. 5 also holds: the convolution between the spectra of x and of p corresponds to the spectrum of the sequence obtained by multiplying point by point x and p.Therefore, the convolution theorem can be applied to windowing, which means that the spectrum of the windowed sequence can also be obtained by convolving the sequence spectrum with the window spectrum.For this reason, knowing the shape of both the window and the window spectrum allows one to understand what happens both in the original and in the frequency domains.Making reference to Figs. 2 and 3, this accounts for the effect of the oscillations in Fig. 3b (spectrum of the rectangular window) on the corresponding spectrum of Fig. 2d.The side lobes of the window spectrum cause the arising of spurious frequencies in the spectrum of the windowed sequence, which are in turn responsible for the Gibbs phenomenon, i.e., for the spurious oscillations in the reconstructed sequence.

Smoothing filters
A common way to perform low-pass filtering consists of convolving the signal with a short length filter that 'moves' along the signal itself, piece by piece, one point at a time, filtering off the high frequencies.Similar filters are known as moving average (smoothing) filters.A sequence consisting of a given number of points of the signal is convolved with an equally long sequence constituting the filter.Such an operation is nothing but the already discussed convolution between the x sequence expressing the signal and the p sequence of the filter.However, the widespread use of this operation and of the relevant denomination deserves a specific treatment.
In this frame, a number of filters are widely employed.Focusing on low-pass filters, the most common one is the rectangular filter.The way that the smoothing average lowpass filter operates is illustrated in Fig. 10.The moving filter constitutes itself the convolution sequence p.In practice, using a rectangular 5-point-long p sequence, every y filtered point is obtained by re-calculation as the mean value of 5 points, which corresponds to a convolution of five points of the original sequence x with the filtering sequence p.Assuming 0 index for the point of p coincident with the point of x to recalculate, p values are set to 1 for the index assuming integer values from -2 to ?2 and to 0 outside this interval.As noticed above, according to Eq. ( 3), 5 points at a time of the sequence x are subsequently convolved with the 5-point-long p sequence constituting the filter, to give the y-filtered sequence.Noteworthy, the number of points of p in the moving average operation is always odd, in a way that, for each k value, y accounts for the average value calculated including the same number of points both on the left and on the right of x(k).Since a convolution operation is performed, also in this case the convolution theorem can be applied.The transfer functions that result for different numbers of points constituting the rectangular convolution filter are reported in Fig. 11.
In view of the plots in Fig. 11, treating the moving average filtering as a convolution operation does not seem redundant with respect to the calculation of the simple ''mean of 3, 5, 11, 25 or 31 subsequent points''.Since the plotted transfer functions are the spectra of rectangular filters, it is not surprising that they have the same shape as the window spectrum reported in Fig. 3b.Making reference to Scheme 1, however, in the windowing operation the spectrum of the window is convolved with the spectrum of the sequence, while in this case the spectrum of the window (transfer function) is multiplied by the spectrum of the sequence, exactly as it happens in filtering.In fact, moving average smoothing corresponds to low-pass filtering, as described in the lower part of Scheme 1.
All the plots in Fig. 11 represent transfer functions relative to low-pass filters, aimed at cutting off the highest frequencies.The smoothing operation involving an increasing number of points may 'filter too much', only considering lower and lower frequencies.In the limit, a p sequence that is as long as the signal only gives the mean value of the signal itself.In contrast, a p sequence consisting of 1 point does not filter anything, only 'copying' the x sequence into the y one.In addition to moving average, many other smoothing filters have been proposed in the literature, whose detailed description is outside the aims of the present contribution.In an article published in 1964 in the journal Analytical Chemistry, a number of different, still widely used and quite effective, filtering sequences were proposed by Abraham Savitzky and Marcel Golay, which are known as Savitsky-Golay filters [13].This article is still one of the most widely cited contributions in the field of analytical chemistry [14].
A Gaussian curve also represents a possible convolution filter alternative to the rectangular one, suitable for smoothing purposes.Gaussian smoothing may be modulated through the standard deviation of the Gaussian curve [15].Compared to the rectangular moving average filter, a Gaussian filter provides for gentler smoothing.Figure 12 compares the transfer functions, in terms of magnitude, for a rectangular filter with width 5 and for a Gaussian filter with standard deviation of 3.Both filters attenuate the high frequencies more than the low ones, but the Gaussian filter transfer function shows no oscillations, which implies absent or poor leakage.The Gaussian filter and the corresponding transfer function are a Gaussian and (half a) Gaussian, respectively.This implies that side lobes are absent in the filter spectrum, which minimises the spurious oscillations arising in the filtered signal.Limited evidence of Gibbs phenomenon is present [15].

Spontaneous convolutions
In addition to many cases of data treatment in which a convolution of two sequences is intentionally performed to different purposes, convolution often occurs 'spontaneously'.While some signals arise by a simple sum of two or more components, other signals are the result of convolution.In other words, it may happen that the signal recorded actually results from a 'blend' of two or even more components.Each one of them accounts for one 'phenomenon' which, by convolution with each other, generates the measured signal.
A typical example may be observed in UV-Vis spectroscopy, due to the effect of the finite width of the exit slit of a monochromator on the spectrum of a substance.As is sketched in Fig. 13a, the polychromatic light, by traversing the diffraction grid, is 'decomposed' in such a way that radiations at different wavelengths are addressed to different directions, according to different deflection angles.
The selection of the radiation entering the sample occurs through a slit, and only the radiations along the directions that cross the slit reach the sample.For a given dispersion, the narrower the slit, the narrower the selected range of wavelengths.With such a system, true monochromatic radiation would only be obtained by an infinitesimal slit width, which would, however, lower to zero the intensity of the radiation.The compromise implies that a finite interval of wavelengths should be accepted to pass across the slit and to reach the sample.As a result, broadening of the absorption bands is observed.Figure 13b reports the theoretical spectrum, recorded by an ideal selection of one single radiation wavelength at a time, and Fig. 13c reports the square function accounting for the slit.The broadened recorded spectrum, reported in Fig. 13d, results from the convolution of the theoretical spectrum with the square function accounting for the slit.
Similarly to the finite width of a slit in a spectrometer, the width of the tip of the probe affects the resolution in an atomic force microscopy (AFM) image.In fact, the shape of the tip is convolved with the true surface profile, leading to record a 'smoothed' image, as is sketched in Fig. 14.
A further example of an analytical signal which can be expressed as the convolution of two functions is given by a chromatographic peak.Its shape, around which a huge amount of literature has been written, may be expressed by convolution of the injection profile of the species with the impulse response of the chromatographic system.This represents the peak shape under the condition that a Dirac delta or impulse function, d, [1,2] represents the injection profile.
In addition to the examples reported above, many other cases may be cited, in the fields of electrochemistry, of NMR and X-ray spectroscopies, of crystallography, seismology, image processing, and remote sensing.

Deconvolution
In cases like those of the previous examples, it may be profitable to separate the individual contributions to the overall measured signal, in order to achieve UV-Vis spectra, AFM images or chromatographic peaks that are not 'polluted' by undesired effects.This allows the achievement of more correct information about the observed sample and about the physical laws determining the responses.Since 'mixing' comes out from a convolution operation, it may be fruitful to operate deconvolution, Re-examining the example of the UV-Vis spectrum reported in the previous section, the ideal spectrum in Fig. 13b may be obtained by deconvolving the slit sequence in Fig. 13c from the recorded spectrum in Fig. 13d.The convolution operation does not present particular computational difficulties, except for eventual computational load, even when performed in the original domain [see Eq. ( 3)].Conversely, deconvolution requires the solution of a system of linear equations that becomes increasingly difficult at increasing the number of points constituting the sequences.On the other hand, in view of the convolution theorem reported in Eq. ( 4), the following equations hold: and where -1 is the symbol used to indicate the deconvolution operation.
A sophisticated example of the potentialities of convolution and deconvolution operation is found in an 'exercise' of Donald Smith [16].In Fig. 15, two impulses located at the relevant E 1/2,r & E°, with intensity proportional to the concentration of the corresponding electroactive species (Fig. 15c), are convolved with the socalled 'Nernstian broadening', i.e., 1/cosh 2 (j/2), j representing the distance of the polarising potential from E 1/2,r .(Fig. 15b). 8In turn, additional convolution with t -1/2 (indicated, not shown), accounting for linear semiinfinite diffusion, leads to the well-known linear sweep voltammetric response (Fig. 15a) [17].The two impulses may be the starting point or, conversely, they may be the final goal, resulting from subsequent deconvolution of t -1/2 and of the plot in Fig. 15b from the signal in Fig. 15a.
Fig. 15 From impulses to 'Nernstian broadened' sequences and to linear sweep voltammetric response, by subsequent convolution operations.The opposite path is followed by the relevant deconvolutions (adapted from Ref. [16]) 8 E 1/2,r , the so-called half-wave potential, is a good experimental approximation of the standard potential in the case of a reversible charge transfer, differing from E°as far as the activity coefficient and the diffusion coefficient of the species of the redox couple involved are different from one another; cosh(x) = (e x ?e -x )/2.
The result of deconvolution is fascinating, making an overall response coincide with impulses located at E 0 1/2,r , an experimental approximation of E°of the two redox couples involved (Fig. 15c).The self-deconvolution operation, leading to impulses, is a potentially dangerous one, involving computational criticisms arising, for instance, by calculation of ratios between very small numbers,9 by strong effect of noise or of rounding.
References [18,19] report further possible manipulations of simulated and experimental, reversible or non reversible voltammetric responses, by convolution and deconvolution procedures.

Further FT-based manipulations of signals
It very often happens that signals obtained by an analytical technique, like spectroscopy, electrochemistry, chromatography or others, consist of peaks or of bands that are severely overlapped to each other.Similarly to the electrochemical case illustrated above, once the shape of the single peak or band is known, deconvolution by the function accounting for the proper shape could lead, in principle, to single impulses.Figure 16 shows an example in which a deconvolution algorithm based on FT allows to obtain very satisfactory resolution of overlapped peaks [20].
Another quite appealing operation is made possible by applying subsequent FT and FT -1 operations through the trigonometric interpolation [21].Due to the property of FT of bearing a number of sine and cosine components equal to the number of points of the analysed sequence, a signal consisting of N points exhibits a spectrum consisting of the same number of points.Going back to the original domain by FT -1 , a sequence with N points is reconstructed.However, the addition to the spectrum of a number of 'fictitious' frequency components, with amplitude equal to 0, does not alter it, since it does not modify the frequency content of the original signal.On the other hand, by inverse transform, a signal consisting of a higher number of points is reconstructed.The extreme values of the interval of the original signal are not altered, nor the shape changed, since no operation on the frequencies that describe the actual signal is performed.The points in the reconstructed signal are closer to each other, allowing a more precise representation of the signal itself, i.e., a better location of the abscissa of relative maxima.Such an interpolation operation is also called zero-filling and is illustrated in Fig.Additional complete, orthogonal sets of functions or sequences: further transform methods In manipulating a set of data or signals, different aims may be sought, such as calculating the spectrum of a signal, filtering the signal, compacting a large amount of data, etc.It has been already evidenced [1] that the transform techniques make use of a set of basis functions that are suitable to represent the original signal by a proper linear combination.Therefore, making the best choice of the basis set is crucial.
FT is the best known and widespread transform technique in the frame of the analysis of signals, using sines and cosines as the orthogonal basis set.However, this does not always constitute the best choice for the purpose.It is evident, in fact, that the intrinsically smooth cosine and sine functions are not very suitable to account for sharp changes or discontinuities.The representation of a square wave is a typical example.Figure 18 reports what is obtained by using a higher and higher number of sine terms, which forces the Gibbs phenomenon to be less and less evident, becoming, however, effective only when quite a high number of terms is employed.
It is evident that the more similar the shape of the set of basis functions to that of the signal, the lower the number of terms necessary to achieve best fit of the signal itself.The reader is necessarily directed to dedicated literature to find meanings and properties of additional basis sets, suitable to represent signals with peculiar trends through the relevant transform techniques [6,22,23].Among these, which are called according to names of mathematicians developing the algorithms, let us cite Rademacher, Walsh, Hadamard, Hilbert, and Haar transforms.In particular, the Haar basis set constitutes the first, simplest wavelet, from which the Wavelet Transform method has opened an unprecedented wide field of powerful signal processing techniques [23].

•Figure 4
Figure 4 reports these steps in graphical form, through which convolution is realised.

Fig. 4
Fig. 4 Graphical representation of the steps involved in the convolution of two sequences p and x to give the sequence y Fig. 5 Schematic representation of the convolution theorem

Fig. 9
Fig. 9 Example of the application to a couple of peaks (a) of the transfer function of a differentiating filter (b), together with the resulting differentiated sequence (c) (adapted from Ref. [12])

Fig. 10 Fig. 11
Fig. 10 Scheme of the moving average filter

Fig. 12 Fig. 13
Fig. 12 Magnitude spectra of a rectangular filter with width 5 (a) and of a Gaussian filter with standard deviation of 3 (b)

Fig. 14
Fig. 14 Schematic representation of the convolution of the tip shape with the surface profile in AFM

Fig. 16 aFig. 17
Fig. 16 a Simulated partially overlapped differential pulse polarographic signals; b noise is superimposed on (a); c experimental differential pulse polarographic response for a mixture of cadmium Fig.17A photodiode array only records 128 points around the Mn triplet located at 403 nm.The resolution of 100 lm of the rough detector system is unsatisfactory; trigonometric interpolation is of notable help (adapted from Ref.[21])

Fig. 18
Fig. 18 Left column the individual components in the Fourier series, right column the partial sum of terms in the Fourier series