DIFFERENTIATING AND INTEGRATING SIGNALS NUMERICALLY
By Dr Colin Mercer, Technical Director, Prosig
Differentiation and integration are often used to compute between accelerations, velocities and displacements. These relatively straightforward mathematical operations may cause surprises when carried out numerically. The available frequency range over which reliable results are obtained is surprisingly small. This brief note illustrates the problems which may occur and indicates techniques to resolve the problems.
The basic method of differentiating a signal numerically is to estimate the local slope of the curve. The three simplest schemes use differences between values. If Δt is the time step between adjacent samples the three most well known schemes are
forward differences dxj+0.5 = (xj+1 - xj) / Δt,
backward differences dxj-0.5 = (xj - xj-1) / Δt,
central differences dxj = (xj+1 - xj-1) / (2Δt).
The forward difference and backward difference forms have a problem in that they actually estimate the slope at the midpoint between samples. Hence the use of the subscripts j+0.5 and j-0.5 respectively. Thus in practice the simplest practical scheme is to use the central difference form.
What is often not appreciated is that any differentiation process is the equivalent of applying a filter to the data. The ideal differentiator* has a frequency characteristic of D(iω) = (0 +iω). In modulus and phase form this is (ω, 90°). Thus on a normalised frequency axis the modulus should be a straight line from 0 to p and the phase should be at 90º.
[footnote - * this is known as a Hilbert Transformer but for the present purposes this is not significant].
To find the actual frequency response function use a broadband Gaussian Random Signal, differentiate it, form the Cross Spectral Density of the differentiated signal and the original signal and divide this by the Auto Spectral Density of the original signal.
![]() |
![]() |
![]() |
![]() |
![]() |





