The figure below shows a spectrum on the left that consists of several poorly-resolved (that is, partly overlapping) bands. The extensive overlap of the bands makes the accurate measurement of their intensities and positions impossible, even though the signal-to-noise ratio is very good. Things would be easier if the bands were more completely resolved, that is, if the bands were narrower.

Here use can be made of

Here's how it works. The figure below shows, in Window 1, a computer-generated peak (with a Lorentzian shape) in red, superimposed on the

Click to enlarge

The second derivative is amplified (by multiplying it by an adjustable constant) so that the negative sides of the inverted second derivative (from approximately X = 0 to 100 and from X = 150 to 250) are a mirror image of the sides of the original peak over those regions. In this way, when the original peak is added to the inverted second derivative, the two signals will approximately cancel out in the two side regions but will reinforce each other in the central region (from X = 100 to 150). The result, shown in Window 2, is a substantial (about 50%) reduction in the width, and a corresponding increase in height, of the peak. This effect is most dramatic with Lorentzian-shaped peaks; with Gaussian-shaped peaks, the resolution enhancement is less dramatic (only about 20 - 30%).

The reduced widths of the sharpened peaks make it easier to distinguish overlapping peaks. In the example on the right, the raw signal (blue line) is actually composed of three overlapping Lorentzian peaks at x=200, 300, and 400, but the peaks are so wide - their halfwidths are 200, which is greater than their separation - that they blend together in the raw data, forming a wide asymmetrical peak with a maximum at x=220. The result of derivative sharpening (red line) clearly shows the underlying component peaks

Note that the baseline of either side of the resolution-enhanced peak is not quite flat, especially for a Lorentzian peak, because the cancellation of the original peak and the inverted second derivative is only approximate; the adjustable weighting factor k is selected to minimize this effect. Peak sharpening will have little or no effect on the baseline, because if the baseline is linear, its derivative will be zero, and if it is gradually curved, its second derivative will be very small compared to that of the peak.

This
technique has been used in various forms of spectroscopy and
chromatography for many years (references
74-76), even in some cases using analog electronics.
Mathematically, the technique is a simplified version of a
converging Taylor
series expansion, in which only the *even order*
derivative terms in the expansion are taken and for which their
coefficients alternate in sign. The above example is the simplest
possible version that includes only the first two terms - the
original peak and its negative second derivative. Somewhat better
results can be obtained by adding a *fourth* derivative
term, with two adjustable factors k_{2} and k_{4}:

where Y'' and Y'''' are the 2nd and 4th derivatives of Y. The
result is a 21% reduction in width for a Gaussian peak, as shown
in the figure on the left (Matlab/Octave
script), and a 60% reduction for a Lorentzian peak (script). This is the
algorithm that was used in the overlapping peak example above.
(It's possible to add a sixth
derivative term, but the series converges quickly and the results are only
slightly improved, at the cost of increased complexity of *three*
adjustable factors).

S_{j} = Y_{j} +
k_{1}Y'_{j}

With
the
correct first derivative weighting factor, kIf one stage of derivative addition does not do the trick, try one of the double exponential routines described below. Furthermore, this appears to be a general behavior and it works similarly for

The symmetrized peak Sj resulting from thew first-derivative addition procedure can still be further sharpened by the even-derivative techniques described above, assuming that the signal-to-noise ratio of the original is good enough.

A useful property of all these derivative addition algorithms is that they do not change the

Because differentiation and smoothing are both linear techniques, the superposition principle applies and the amplitude of a sharpened signal is directly proportional to the amplitude of the original signal, which allows quantitative analysis applications employing any of the standard calibration techniques). As long as you apply the same signal-processing techniques to the standards as well as to the samples, everything works.

Peak sharpening can be useful in automated peak detection and measurement to increase the ability to detect weak overlapping peaks that appear only as shoulders in the original signal. Click for animated example. Peak sharpening can be useful before measuring the areas under overlapping peaks, because it's easier and more accurate to measure the areas of peaks that are more completely separated.

Some other limitations of the power law method:

- it only works if the peaks of interest make a distinct maximum (it's not effective for side peaks that are so small that they only form
shoulders; theremustbe a valley between the peaks);- the baseline must be zero for best results;
- for noisy signals there is a decrease in signal-to-noise ratio because the smaller width means fewer data points are contributing to the measurement (smoothing can help).

- the method introduces
severe non-linearityinto the signal, changing the ratios between peak heights (as is evident in the figure above right) and complicating further processing, especially quantitative measurement calibration.|

However, there is an easy way to compensate for this
non-linearity in quantitative analysis application: after the raw
data have been raised to the power ** n** and peaks
heights and/or areas have been measured, the resulting peak
measures can be simply raised to the power 1/

The
self-contained function PowerMethodDemo.m demonstrates
the power method for measuring the area of small
shouldering peak that is partly overlapped by a much
stronger interfering peak (Graphic).
It shows the effect of random noise, smoothing, and any uncorrected
background under the peaks.

**Combining sharpening methods.** The
power method is independent of, and can be used in conjunction
with, the derivative methods discussed above. However,
because the power method is non-linear, the *order *in
which the operations are performed is important. The first step
should be the first-derivative symmetrization if the signal is
exponentially broadened, the second step should be even-derivative
sharpening, and the power method should be used last. The reason
for this order is that the power method depends on, but can not
create, a *valley *between highly overlapped peaks. The
derivative methods may be able to create a valley between peaks if
the overlap is not too severe. Moreover, when used last, the power
method reduces the severity of baseline oscillations that are a
residue of the even-derivative sharpening (particularly noticeable
on a Lorentzian peak). The Matlab scripts SharpenedGaussianDemo2.m (Graphic) and SharpenedLorentzianDemo2.m
(Graphic on right) make
this point for Gaussian and Lorentzian peaks respectively,
comparing the result of even-derivative sharpening alone with
even-derivative sharpening followed by the power method (and
preforming the power method two ways, taking the square of the
sharpened peak or multiplying it by the original peak). For both
the Gaussian and Lorentzian original peak shapes, the final
sharpened results are fit to Gaussian models to show the changes
in peak parameters. The result is that the combination of methods
yields the narrowest final peak and the closest to Gaussian shape.
Of course, the linearity issues of the power method, if used,
remain.

**Deconvolution**. Another signal processing technique that
can increase the resolution of overlapping peaks is *deconvolution*,
which is treated in more detail here.
It is applicable in the situation where the original shape of the
peaks has been broadened and/or made asymmetrical by some
broadening process or function. If the broadening process can be
described mathematically or measured separately, then
deconvolution from the observed broadened peaks is in principle
capable of extracting the underlying peaks shape.

SPECTRUM, the freeware signal-processing application for Mac OS8 and earlier, includes this resolution-enhancement algorithm, with adjustable weighting factor and derivative smoothing width.

The symmetrization of exponentially modified Gaussians (EMG) by the weighted addition of the first derivative is performed by the template PeakSymmetricalizationTemplate.xlsm (graphic). PeakSymmetricalizationExample.xlsm is an example application with sample data already typed in. There is also a demo version that simulates its own signal and allows you to determine the accuracy of the technique by internally generated overlapping peaks with specified resolution, asymmetry, relative peak height, noise and baseline: PeakSharpeningAreaMeasurementEMGDemo2.xlsm (graphic). These spreadsheets also allows further second derivative sharpening of the resulting symmetrical peak.

PeakDoubleSymmetrizationExample.xlsm performs the symmetrization of a doubly exponential broadened peak. It has buttons to interactively adjust the two first-derivative weighting. Two variations (1, 2) include data for two overlapping peaks, for which the areas are measured by perpendicular drop.

EffectOfNoiseAndBaselineNormalVsPower.xlsx demonstrates the effect of the power method on area measurements of Gaussian and exponentially broadened Gaussian peaks, including the different effect that random noise and non-zero baseline has on the power sharpening method. It shows that higher values of power (cell O9) reduce the peak width, makes the EMG peak more Gaussian, reduces the effect of the background (cell B6), and reduces the noise (cell B5) on the baseline but increases it near the peak maximum. Smoothing (cell B7) has little effect on the average peak area, but improves the reproducibility of the power method in the presence of noise.

Here's a simple example that creates a signal consisting of four partly-overlapping Gaussian peaks of equal height and width, applies both the derivative sharpening method and the power method, and compares a plot (shown below) comparing the original signal (in blue) to the resolution-enhanced version (in red):

y=exp(-(x-4).^2)+exp(-(x-9).^2)+exp(-(x-12).^2)+exp(-(x-13.7).^2);

y=y+.001.*randn(size(x));

k1=

SharpenedSignal=ProcessSignal(x,y,0,35,3,0,1,k1,k2,0,0);

figure(1)

plot(x,y,x,SharpenedSignal,'r')

title('Peak sharpening (red) by the derivative method')

figure(2)

plot(x,y,x,y.^6,'r')

title('Peak sharpening (red) by the power method')

Left: Derivative method. Right: Power method

.
SharpenedOverlapDemo.m is
a script that automatically determines the optimum degree of
even-derivative sharpening that minimizes the errors of
measuring peak areas of two
overlapping Gaussians by the perpendicular
drop method using the autopeaks.m
function. It does this by applying different degrees of
sharpening and plotting the area errors (percent difference
between the true and measured errors) vs the sharpening
factor, as shown on the right. It also shows the height of the
valley between the peaks (yellow line). This demonstrates that
(1) the optimum sharpening factor depends upon the width and
separation of the two peaks and on their height ratio, (2)
that the degree of sharpening is not overly critical, often
exhibiting a broad optimum region, (3) that the optimum for
the two peaks is not necessarily exactly the same, and (4)
that the optimum for area measurement usually does not occur
at the point where the valley is zero. (To run this script you
must have gaussian.m, derivxy.m, autopeaks.m,
val2ind.m, and halfwidth.m
in the path. Download these from https://terpconnect.umd.edu/~toh/spectrum/).

The power method (right) is effective as long as there is a valley between the overlapping peaks, but it introduces non-linearity, which must be corrected later, whereas the derivative method preserves the original peak areas and the ratio between the peak heights. PowerLawCalibrationDemo demonstrates the linearization of the power transform calibration curves for two overlapping peaks by taking the n^{th}
power of data, locating the valley between them, measuring the
areas by the perpendicular drop method, and then taking the 1/n
power of the measured areas (graphic).

**The symmetrize.m function. **The symmetrization of
asymmetric peaks by the weighted addition of the first
derivative is performed by the function ySym = symmetrize(t,y,factor,smoothwidth,type,ends);
"t" and "y" are the independent and dependent variable vectors,
"factor" is the first derivative weighting factor, and
"smoothwidth", "type", and "ends" are the SegmentedSmooth parameters for
the internal smoothing of the derivative. To perform a segmented
symmetrization, "factor" and "smoothwidth" can be vectors. In
version 2, symmetrize.m smooths only the derivative, not the
entire signal. SymmetrizeDemo.m
runs all five examples in the symmetrize.m help file, each in a
different figure window.

First derivative symmetrization can be followed by an application of even derivative sharpening for further peak sharpening, as demonstrated for the exponentially modified Gaussians (EMG) by the self-contained Matlab/Octave function EMGplusfirstderivative.m and for the exponentially modified Lorentzian (EML) by EMLplusfirstderivative.m. In both of these, figure 1 shows the symmetrization and Figure 2 shows the additional 2nd and 4th derivative sharpening. Both of these routines report the before and after halfwidth and area of the peak, and they measure the resulting symmetry of the processed peak two ways: (a) by the ratio of the leading edge and trailing edge slopes (ideally -1.000) and (b) by the R2 of the least-squares fit to the initial Gaussian and Lorentzian shapes peak shape before exponential broadening respectively (ideally 1.000).

SymmetizedOverlapDemo.m demonstrates the optimization of the first derivative symmetrization for the measurement of the areas of two overlapping exponentially broadened Gaussians, shown on the left. It plots and compares the original (blue) and sharpened peaks (red), then tries first-derivative weighting factors from +10% to -10% of the correct tau value in line 14) plots absolute peak area errors vs factor values. You can change the resolution by changing either the peak positions in lines 17 and 18 or the peak width in line 13. Change height in line 16. Must have derivxy.m, autopeaks.m, and halfwidth.m in the path.

**Segmented derivative peak sharpening**.
If the peak widths vary substantially across the signal, you
can use the *segmented *version SegmentedSharpen.m, for which the input
arguments factor1, factor2, and SmoothWidth are *vectors*.
The script DemoSegmentedSharpen.m,
shown on the right, uses this function to sharpen four
Gaussian peaks with gradually increasing peak widths from left
to right with increasing degrees of sharpening, showing that
the peak width is reduced
by 20% to 22% compared to the original. DemoSegmentedSharpen2.m
shows four peaks of the *same *width sharpened to
increasing degrees. For asymmetrical peaks
whose exponential broadening varies across the signal, you can
use the symmetrize.m function described above in the same way:
specify "factor" and "smoothwidth" as vectors, just
like the segmented sharpening. And if peak widths and/or
exponential factors increase or decrease regularly across the
signal, you can simplify the calculation of these vectors by
giving only the number of segments ("NumSegments"), the first
value, "startv", and the last value, "endv", like so:

`vstep=(endv-startv)/NumSegments;`

`vector=startv:vstep:endv;`

where "vector" is the vector to use as an input argument for the symmetrize and SegmentedSharpen functions.

**Double exponential symmetrization** in
Matlab/Octave is performed by the function DEMSymm.m. It is demonstrated by the script DemoDEMSymm.m and its two variations (1, 2), which creates two overlapping double exponential
peaks from Gaussian originals, then calls the function
DEMSymm.m to perform the symmetrization, using a three-level plus-and-minus
bracketing technique to help you to determine the best values
of the two weighting factors by trial and error. In the
example on the left, there are three red and three green
bracketing lines produced by *taus *that are different
by 10%; in this case the middle of the three bracketing lines
is the optimum value.

If you attempt to symmetrize an asymmetrical peak with symmetrize.m, and the result is still asymmetrical, it's possible that the remaining asymmetry is at least approximately exponential with a different*tau*, so in
that case the application of DEMSymm.m will likely produce a more symmetrical final result.

The power method (right) is effective as long as there is a valley between the overlapping peaks, but it introduces non-linearity, which must be corrected later, whereas the derivative method preserves the original peak areas and the ratio between the peak heights. PowerLawCalibrationDemo demonstrates the linearization of the power transform calibration curves for two overlapping peaks by taking the n

First derivative symmetrization can be followed by an application of even derivative sharpening for further peak sharpening, as demonstrated for the exponentially modified Gaussians (EMG) by the self-contained Matlab/Octave function EMGplusfirstderivative.m and for the exponentially modified Lorentzian (EML) by EMLplusfirstderivative.m. In both of these, figure 1 shows the symmetrization and Figure 2 shows the additional 2nd and 4th derivative sharpening. Both of these routines report the before and after halfwidth and area of the peak, and they measure the resulting symmetry of the processed peak two ways: (a) by the ratio of the leading edge and trailing edge slopes (ideally -1.000) and (b) by the R2 of the least-squares fit to the initial Gaussian and Lorentzian shapes peak shape before exponential broadening respectively (ideally 1.000).

SymmetizedOverlapDemo.m demonstrates the optimization of the first derivative symmetrization for the measurement of the areas of two overlapping exponentially broadened Gaussians, shown on the left. It plots and compares the original (blue) and sharpened peaks (red), then tries first-derivative weighting factors from +10% to -10% of the correct tau value in line 14) plots absolute peak area errors vs factor values. You can change the resolution by changing either the peak positions in lines 17 and 18 or the peak width in line 13. Change height in line 16. Must have derivxy.m, autopeaks.m, and halfwidth.m in the path.

where "vector" is the vector to use as an input argument for the symmetrize and SegmentedSharpen functions.

If you attempt to symmetrize an asymmetrical peak with symmetrize.m, and the result is still asymmetrical, it's possible that the remaining asymmetry is at least approximately exponential with a different

ProcessSignal, a Matlab/Octave command-line function that performs smoothing, differentiation, and peak sharpening on the time-series data set x,y (column or row vectors). Type "help ProcessSignal". Returns the processed signal as a vector that has the same shape as x, regardless of the shape of y. The syntax is

Processed=ProcessSignal(x,y, DerivativeMode, w, type, ends,Sharpen, factor1, factor2, SlewRate, MedianWidth)

iSignal (Version 7) is a downloadable interactive multipurpose signal processing Matlab function that includes resolution enhancement for time-series signals, using both the even-derivative method (sharpen function) and the first-derivative symmetrization method, with keystrokes that allow you to adjust the derivative weighting factors and the smoothing continuously while observing the effect on your signal dynamically. The E key turns the even-derivative resolution enhancement function on and off. View the code here or download the ZIP file with sample data for testing. iSignal calculates the sharpening and smoothing settings for Gaussian and for Lorentzian peak shapes using the Y and U keys, respectively, using the expression given above. Just isolate a single typical peak in the upper window using the pan and zoom keys, press P to your on the peak measurement mode, then press Y for Gaussian or U for Lorentzian peaks. You can fine-tune the sharpening with the F/V and G/B keys and the smoothing with the A/Z keys. (The optimum settings depends on the width of the peak, so if your signal has peaks of widely different widths, one setting will not be optimum for all the peaks. In such cases, you can use the segmented sharpen function, SegmentedSharpen.m).

* Before Peak Sharpening in
iSignal After peak sharpening in
iSignal*

iSignal 5.95 can also use the power transform method (press the

The latest version of iPeak, the Matlab interactive peak detection and measurement program, now includes

*Real-time* peak sharpening in
Matlab is discussed in Appendix
Y**.**

Last updated March, 2023. This page is part of "