Time-domain aliasing and anti-aliasing effects in differentiating a band-unlimited signal

In this paper, we investigate time-domain errors occurring in the two extreme discrete-time differentiation modes of band-unlimited signals: in the full-band processing mode and in the processing mode with ideal anti-aliasing filtering (AAF) with a cut-off at the Nyquist frequency. We disclosed that regardless sampling frequency the error from AAF is greater than the aliasing error. It is found that type IV differentiators designed by three commonly known digital filter design methods approximately equally process the high frequency portion of the signal above the Nyquist frequency with nearly equal aliasing errors having a weak dependence on differentiator length. In contrast, the differentiators very differently compute the derivatives of the low frequency portion bellow the Nyquist frequency providing rather dissimilar the common differentiation accuracy. The results show that the differentiators derived by using maximal linearity constraints are more accurate than those designed by the Parks-McClellan algorithm and the impulse response truncation method.


Introduction
Despite that the philosophy of modern signal processing [1][2][3] is based mostly on signals that typically are assumed to be band-limited, there are branches of science and technology, such as material science [4,5], mechanics [6], dielectric spectroscopy [7], geophysics [8,9], etc., which face with processing time-and bandunlimited signals. As it is well known [1][2][3], sampling of a signal that is not band-limited produces aliasing distortions appearing as high frequency portion (HFP) of the signal above the Nyquist frequency generated back to the Nyquist frequency band.
In order to avoid the effect of aliasing, a common or even compulsory procedure is removing HFP by antialiasing filtering (AAF) prior to the sampling process [1][2][3] to make a band-unlimited signal to be bandlimited. Nevertheless, avoiding aliasing comes at the cost of an extra error due to loss of information (further, anti-aliasing error, referred also to as frequencytruncation error [2], cut-off error [10]) that has not received much attention in the literature. For bandlimited signals, it is common to assume [2] that the error from AAF is smaller than that caused by aliasing.
The situation is somewhat different for bandunlimited signals. It is evident that because of the unavoidably limited Nyquist frequency band, errors will always arise from the band-unlimitedness of signals to be processed. Two extreme processing modes may be identified in discrete-time processing of band-unlimited signals: (i) the full-band processing when maximum aliasing error and zero anti-aliasing error are caused by HFP generated fully back to the Nyquist frequency band, and (ii) the processing mode with ideal AAF with a cutoff frequency equal to the Nyquist frequency, when maximum anti-aliasing error and zero aliasing error appear from information loss caused by complete removing HFP. Which of these errorsaliasing or antialiasing will predominate, will depend, obviously, on how input HFP generated back after sampling to the Nyquist frequency band will be processed by the discrete-time algorithm used.
The aim of this study was experimental evaluation of the error structure in the differentiation of a bandunlimited signal in the two above mentioned extreme processing modes.
The rest of this work is organized in three sections. In Section 2, the evaluation methodology is described. The evaluation results are represented and analysed in Section 3. Section 4 contains conclusions.

Differentiation accuracy and errors
Different sources specify differentiation accuracy and errors from various points of view. For example, the accuracy of discrete-time differentiator as a discrete-time filter is commonly estimated in the frequency domain through the deviation of the magnitude response of a discrete-time differentiator from the ideallinearly increasing magnitude response [1][2][3]. In its turn, the aliasing errors are characteristically considered in the context of signal reconstruction [1][2][3]11]. However, in engineering practice, in particular, in the cases when time domain properties of an output waveform are of importance and the shape of a waveform brings information, signal accuracy in the metrological sense [12] as a closeness of agreement between a computed signal and an exact (true) signal, is of interest. In this study, we will treat the differentiation errors in the above metrological sense with respect to the exact derivatives.

Evaluation procedure
The idea behind the evaluation of the differentiation errors is to split a band-unlimited test signal into low frequency portion (LFP) and HFP and estimating differentiation errors separately for the portions and the test signal. Block diagram in Fig. 1 illustrates the idea behind the evaluation.  We choose a smooth band-unlimited function increasing monotonically in interval 0  t and decreasing monotonically in interval 0 t  , as a test signal ( Fig. 2(a)). Such choice was motivated by the fact that function (2), which sometimes is referred to as a Cauchy pulse [13], appears in several diverse applications, including material science [4,5], where the Cauchy pulse over the positive interval [0, ∞) is widely used for modelling the real part of the complex permittivity and complex compliance.
Function (2), further, the test signal, has the following LFP and HFP (see Fig. 2 and the appropriate derivatives  The signals (2) -(4) sampled at the sampling frequency corresponding to the Nyquist frequency, at which the test signal was split into LFP and HFP, are processed by discrete-time differentiators. From the computed and exact derivatives the following timedomain errors are calculated:  HFP error producing the aliasing error  complete error in the full-band processing mode which is constituted from LFP (8) and aliasing (9) errors In the processing mode with ideal AAF with a cut-off at the Nyquist frequency, HFP of the test signal is completely removed, i.e. , which in this case is originated from Therefore, one important point is that the anti-aliasing error in the case of ideal AAF is equal to HFP of exact derivative (7) with minus sign and, so, is algorithm independent and is determined only by the exact output signal and the sampling/Nyquist frequency chosen.
Similarly to the complete full-band error (11), LFP error (8) and anti-aliasing error (12) constitute the complete error in the processing mode with AAF It is easy to see from Eq. (9), that in the case when ˆ( ) high y t has the comparable amplitude and the same phase as those of exact derivative yhigh(t), the signals will cancel each other, and the amplitude of aliasing error (9) will become smaller than the amplitude of anti-aliasing error (12). This would be the case, when the full-band differentiation could be more accurate than the differentiation with AAF, at least theoretically.

Estimation of time-domain errors
In this study, we estimate the time domain errors through the appropriate mean-square errors (MSEs) calculated for M = 100 points uniformly distributed over the time interval [0, 10]. MSE (14) is directly related to energy of a time-domain error and is used as an evaluation criterion for accuracy of a differentiator: the smaller MSE is, the more accurate the differentiator is.

Discrete-time differentiators
We use type IV linear-phase differentiators with even number of coefficients [1][2][3] as promising the higher accuracy for band-unlimited applications compared with type III differentiators. The differentiators were designed by three commonly known finite impulse response (FIR) filter design methods: the impulse response truncation (IRT) method [3], the Parks-McClellan (PM) algorithm [1][2][3]14] and deriving by using maximal linearity (ML) constraints [15,16]. IRT method was selected as the simplest and most straightforward FIR filter design method. It is usually mentioned in literature [3] as one generating filters with undesirable frequency-domain characteristics because of the oscillatory nature of the frequency response near cutoff frequencies, therefore, IRT filters may be conditionally classified as the "worst" ones for frequency selective filtering provided to modify the frequency content and phase of signals according to the definite specifications [1][2][3]. Contrary to IRT method, PM algorithm has been chosen as probably the most widely used FIR filter design method generating optimal filters in sense of minimax error with a minimum number of coefficients needed to achieve the given frequency domain specification [1][2][3]. Hence, PM filters may be conditionally categorised as the "best" ones frequency selective filters. Deriving by using ML constraints has been chosen as a recognised method [15,16] preferable for filters for the applications where the time domain properties are of primary importance.

Aliasing error versus anti-aliasing error
The basic result of this study was a finding that regardless sampling frequency the anti-aliasing error in the differentiation mode with ideal AAF is greater than the aliasing error in the full-band processing mode.
In Fig. 3(a), as an example, the derivative ˆ( ) high y t computed at sampling frequency S = 4 by 12-point IRT differentiator is compared with the exact derivative yhigh(t) (7). It can be noticed, that signals ˆ( ) high y t and yhigh(t) have the comparable amplitudes with the same phases, and, so, they cancel each other making that the amplitude of aliasing error (9) smaller the amplitude of antialiasing error (12) (see Fig. 3(b)).

Variation of differentiation errors with sampling frequency
In Fig. 4, variation of differentiation MSEs with sampling frequency is shown for 12-point differentiators designed by the three above mentioned methods.
The differentiators approximately equally process HFP producing nearly equal aliasing errors Ealias, which fall into the narrow coloured lane in Fig. 4(a). Logarithmic plots of the aliasing and anti-aliasing MSEs are nearly straight lines with negative slopes having a narrow angle between the lines witnessing that Ealias and Eantialias are approximately proportional each other with a proportionality coefficient that slightly increases with growing sampling frequency. For example, at sampling frequency S = 15, the proportion / antialis alias E E is approximately 31 (see Fig. 4(a)). Hence, both the aliasing error and anti-aliasing error decay almost exponentially on the linear MSE scale with keeping the anti-aliasing error greater than the aliasing one for all sampling frequencies.  For ML differentiator, Elow decreases almost exponentially (linearly on the scale logE -S), which together with the exponentially decaying aliasing and anti-aliasing errors constitute the complete MSEs, which also have exponential nature. Consequently, increase of sampling frequency for ML differentiators leads to significant enhancement in the differentiation accuracy.
In contrast to ML differentiator, a surprising result was slowly growing Elow for IRT differentiator and approximately constant Elow for PM differentiator (see Fig. 4(a)). Thus, increase of sampling frequency for PM and IRT differentiators yields improvement of the differentiation accuracy only thanks to attenuating aliasing/anti-aliasing errors at low sampling frequencies.
Hence, the complete differentiation MSEs approximately equally (exponentially) decay at low sampling frequencies for all differentiators regardless design method due to nearly equal aliasing errors and algorithm-independent anti-aliasing error, however, a wide variety in MSEs is observed at high sampling frequencies due to essentially unlike LFP errors, which produce MSE that (see Fig. 4(b)):  slightly increases for IRT differentiator;  is constant for PM differentiator, and  nearly exponentially decays for ML differentiator. Again, it is seen that the aliasing error is smaller than the anti-aliasing error, which, as algorithm independent one, is constant at a fixed sampling frequency. PM and IRT differentiators have practically equal Ealias, while Ealias is slightly greater for ML differentiators. The aliasing errors have a weak dependence on the differentiator length indicating on approximate proportionality with the anti-aliasing errors, particularly for the longer lengths.

Variation of differentiation errors with differentiator length
Contrary to the aliasing errors, there are significant variation in MSEs of LFPs for different differentiators. Again, ML differentiators produce much more accurate LFP derivatives compared to IRT and PM differentiators. For example, at N = 18, Elow of ML differentiator is approximately 36 times smaller than those of PM and IRT differentiators (see Fig. 5(a)). Since Elow of ML differentiator is significantly smaller than Eantialias (except the very short lengths), the antialiasing error makes the main contribution in the complete error in the processing mode with AAF.
As a result, ML differentiators need a much smaller number of coefficients than PM and IRT differentiators to ensure equal accuracy. For example, a ML differentiator with 12 coefficients in the processing mode with AAF attains already EAAF = Eantialias, for which IRT and PM differentiators require more than 32 coefficients. Similarly, in the full-band processing mode,  Fig. 5(b)) for which 26 coefficients are necessary for IRT differentiator and 32 coefficients for PM differentiator. Therefore, the conditionally "best" and "worst" differentiators in the frequency selective filtering sense -PM and IRT differentiators (see Subsection 2.3) have the differentiation accuracy that is much lower than that of ML differentiators. A fact that ML differentiator is more accurate than PM differentiator has been established in [17]. It may be concluded that PM and IRT methods are not suitable for designing differentiators for smooth band-unlimited signals similar to the Cauchy pulse.

Conclusions
The paper is devoted to evaluation of the error structure in discrete-time differentiation of band-unlimited signals. We experimentally evaluate the time-domain errors occurring in the two extreme differentiation modes: in the full-band processing mode and in the processing mode with ideal AAF with a cut-off at the Nyquist frequency. It is found that a time-domain aliasing error appears in the full-band processing mode equal to the error of the computed derivative of high frequency portion (HFP) above the Nyquist frequency, whereas in the processing mode with ideal AAF an algorithm independent anti-aliasing error is produced equal to HFP of the exact derivative with minus sign. We disclosed that regardless sampling frequency the anti-aliasing error in the processing mode with ideal AAF is greater than the aliasing error in the full-band processing mode.
It is found that type IV differentiators designed by three commonly known digital filter design methods (impulse response truncation method, Parks-McClellan algorithm and deriving by using maximal linearity constraints) approximately equally process HFP producing nearly equal aliasing errors having a weak dependence on the differentiator length. At the same time, the differentiators very differently process the low frequency portion (LFP) bellow the Nyquist frequency. The maximally linear differentiators produce considerably more accurate LFP derivatives and provide the higher common differentiation accuracy compared with the differentiators designed by the Parks-McClellan algorithm and the impulse response truncation method.
This work was supported by the European Regional Development Fund under project No. 1.1.1.1/16/A/008.