For some time now it has been conventional ‘wisdom’ that using time based digital integration may cause amplitude errors in the result and that these get worse as the frequency increases. As a result of this, integration using Omega arithmetic has been prevalent by using Fourier Transforms of the signal. This, of course, remains a valid approach and is particularly useful if the data is already in the frequency domain, which was its prime purpose.

It has also been conventional wisdom that a higher order integrator is ‘better’. Now, a rectangular integrator is a zero order integrator and a trapezium integrator is a first order integrator. So according to the ‘second wisdom’ the trapezoidal integrator should produce better results than the rectangular integrator. This is not the case. As will become evident, further studies into wide band integrators have shown this amplitude degredation is limited to what are refered to as ‘odd order’ integrators, in particular integrators such as the Trapeziodal integrator. Even order integrators, such as the rectangle integrator, do not have this frequency related degredation. What remains valid is that using a higher even order integrator is more accurate than that of a lower even order integrator.

First let us illustrate the problem using a trapezoidal integrator. Figure 1 below is the result of using a trapezium integrator on a 100Hz sinewave of amplitude and sampled at 1024 samples/second which is well below half the Nyquist frequency. The second graph (Figure 2) is the same except at 300Hz. In both case the blue curve is the mathematically exact result and the black curve is the trapezoidal integration. In both cases the Trapezoidal integration has a loss of amplitude with this loss being worse as the frequency increases towards the Nyquist frequency (Sample Rate/2).

Recently, a new set of wide band even order integrators up to 6^{th} order has been introduced into Prosig’s DATS software. These are accurate over the entire frequency range and are comparable to the omega arithmetic algorithm in terms of accuracy. The examples in Figure 3 below show the same two cases as above except that a 4^{th} order wide band integrator has been used in place of the trapezium integrator. There is excellent agreement. The slight apparent discrepancies in the higher frequency case are in fact due to an effective delay as discussed later.

**Ideal Integrator**

As a start consider the frequency response characteristics of an ideal integrator. It is readily shown that the desired frequency response of an ideal integrator is

That is, the modulus is given by and the phase by

For example

In the following it is helpful to know the relationship between the phase and any time delay. Now the quantity known as the **phase delay,** , is simply the time delay equivalent to the particular phase at each frequency, for example

, in seconds is defined as seconds, where is in radians and is in radians/sec. Alternatively in degrees and Hz we have seconds. The phase delay gives the time delay at each frequency. If the phase delay is linear, that is, if it is a straight line versus frequency, then it means that all frequencies are delayed by the same amount. Specifically, if the phase is in the form then the phase consists of the constant angle plus a time delay to the whole signal of seconds. Note that the special case of constant phase may be expressed as .

For completeness, there is a similar phase related delay known as the **group delay**, , which is defined by seconds when is in radians and is in radians/sec or when is in degrees and $f$ is in Hz. This is most useful when dealing with modulated signals, but in the special case where the phase is linear, that is , then the group delay also gives the delay of the signal.

The transfer function for the Trapezium integrator, which is an order 1 integrator, is shown in Figure 5. The transfer function of all odd order integrators is similar to that of the trapezium integrator. For these the modulus function is like the ideal integrator up to about the quarter sample rate. After that it increasingly diverges.

Ignoring the zero frequency phase, which is artificially set to zero by the software, then the phase is a straight line. The phase delay is half of a sample period of the signal together with a constant minus 90^{0}. That is the result is the integrated signal delayed by half a sample time. Obviously the trapezium integrator is limited in its frequency range.

The Rectangular integrator (Figure 6) is an order 0 integrator and does not suffer the amplitude error. It has the same phase delay of half of a sample period together with a constant minus 90^{0}.

The effects are shown in the integrated sine waves in Figure 7 & 8. With a sample rate of 1000 samples/second at 60Hz (12% of Nyquist frequency) the results of either a rectangular or a trapezoidal integrator are identical for practical purposes, but at 350Hz (70% of Nyquist frequency), the results are very different. Note that the apparent beating in the 350Hz case is just that, apparent. It is the effect of the lower number of samples per period and that the software draws straight lines between points.

To illustrate the half order delay a sine wave was digitally integrated using rectangular integration and is shown in Figure 9 (red curve) compared to direct generation of the integrated sine wave (blue curve). That is, the blue curve is the ‘correct’ one in amplitude and time, the integrated signal is ‘delayed’.

To compensate for the delay the integrated curve was ‘advanced’ by adjusting its start time ('*base'* in DATS terms) by one half of a sample period. The result is shown in Figure 10 without the computer drawn straight lines joining successive points. It is clear that the digitally integrated signal produces the integrated values at the midpoints.

In summary, if we seek to integrate the time history or similar then we should use even order integrators. These will give a result that lags the ‘true’ integration by half a sample time. If we have a signal in the frequency domain then we should use the Omega arithmetic option, which does not have the minor delay.

#### Dr Colin Mercer

#### Latest posts by Dr Colin Mercer (see all)

- Is That Tone Significant? – The Prominence Ratio - September 18, 2013
- A Guide To Digital Filtering - June 4, 2013
- Wide Band Integrators – What Are They? - June 15, 2012

Dear Dr. Colin,

Please, forgive my poor English.

I’m just trying to introduce myself into FFT calculations and I have an elementary question to you.

As an example, suppose I have a time history of velocities signals (after integration of accelerations) and I take a FFT of these signals, say, up to the Nyquist frequency.

The real parts of my imaginary vector will return to me the amplitudes and the imaginary ones will return me the phases. So now, I will have the amplitudes related with the several frequencies. However, I would like to know how to obtain the transformation of these amplitudes in terms of my field (primary) variable, that is, in terms of velocities, so that I can get the spectrum in terms of velocities. In this case It will be possible to perform inverse FFTs for single values, that is for each frequency of the spectrum?

Thanks,

Luiz Eduardo

Hi Luiz,

Not quite sure I understand your question So apologies if I answer the wrong question.

There are several aspects to clarify.

Firstly when you Fourier transform your velocity signal into real and imaginary parts, these R & I are not the amplitude and phase of the various frequency components. The amplitude, [latex]A(f)[/latex], is the square root of the sum of the squares of [latex]R(f)[/latex] and [latex]I(f)[/latex] ie [latex]A(f) = \sqrt{R(f)^2 + I(f)^2}[/latex]. The phase [latex]\Phi(f)[/latex], is [latex]\arctan{\frac{I(f)}{R(f)}}[/latex].

The Fourier transform gives those set of amplitudes and phases that are acting for the entire time of the signal you transformed. By implication if you had a signal of length T seconds, then the Fourier processing makes the assumption that your signal of length T repeats indefinitely (actually to both [latex]+\infty[/latex] and [latex]-\infty[/latex]). Just for amusement imagine your signal of length T seconds is wrapped around a circle. If you walk along a circle you never get to the end; one direction you can call it towards [latex]+\infty[/latex] and the other direction towards [latex]-\infty[/latex], and you never reach the end. This is another view of periodicity. Fourier transforms use the circular functions cosine and sine.

With your amplitudes and phases one can visualise this as a set of cosines of the form [latex]{A(f) * \cos[ 2 * \pi * f + \Phi(f)] }[/latex] that act for the entire duration.

Colin

Dear Dr. Colin,

First of all, I would like to thank you very much for your attention.

Of course you are right. In fact, the FORTRAN routine I´m using gives me the result back by means of two vectors. One of then brings the amplitudes. The other one, the phases. It makes use of the preliminary vectors where real and imaginary parts are stored during data manipulation. This is only a particularity of the routine I´m using.

I´m sorry to neglect clarity by the time I sent you the question.

In fact, the matter is related with the back transformation of each value of the power spectrum obtained while running FFT routine, into primary variable value (velocity, in this case).

I´m just back transforming each value of the power spectrum, as soon as they are obtained, by means of the IFFT equation (from that point).

I would like to know if the association I´m doing is correct.

Best regards,

Luiz Eduardo