I have a set of sensors, some velocity-meters and others accelerometers. To process the two groups together, I integrate the accelerometers signals (in time domain, using MATLAB's cumsum), so I'll have all sensor data now in velocity. Knowing the precise arrival time of a signal at different sensors are very important in determining the location of the signal source. Wondering if I am introducing some phase shift by integration, I tried to estimate the group delay. I am not sure what I am doing is right though. Given that the integrator can be written as:

$$y(n) = x(n) + y(n-1)$$

the filter coefficients will be

\begin{align} a&=\begin{bmatrix}1 &-1\end{bmatrix}\\ b&=\begin{bmatrix}1 & 0\end{bmatrix} \end{align}

Giving these values to the MATLAB's grpdelay function (Group delay), I get a constant value across all frequencies of half a sample.

  • Does it mean that my signal after integration is shifted by half a sample regardless of frequency ?
  • And what about zero frequency (the mean value), why is the group delay 0.5 sample at 0?
  • $\begingroup$ Isn't it possible that you have flat group delay?(linear phase response?) $\endgroup$
    – Rizias
    Nov 15, 2016 at 16:15
  • $\begingroup$ Could be. I was expecting to have a different delay at frequency 0 as the integrator is 1/s (in Laplace domain). And I don't quite understand 0.5 sample delay, is it correct ? $\endgroup$ Nov 15, 2016 at 17:07

1 Answer 1


Your integrator is a perfect accumulator, which is an unstable (marginally stable) system with a pole at $z=1$:


This means that the value of the frequency response at $\omega=0$ (corresponding to the pole at $z=1$) is undefined. Consequently, the value of the group delay at $\omega=0$ is also undefined. Note that you can write down the frequency response of an ideal accumulator using a Dirac delta impulse (see this question and its answer), but this doesn't help in finding a value of the frequency response (or the group delay) at $\omega=0$.

For $\omega\neq 0$ (or, more generally, $\omega\neq 2\pi k$), we can easily determine the frequency response and group delay of the system:

$$H(e^{j\omega})=\frac{1}{1-e^{-j\omega}}=e^{j\omega/2}\frac{1}{e^{j\omega/2}-e^{-j\omega/2}}=e^{j\omega/2}\frac{1}{2j\sin(\omega/2)},\quad\omega\neq 2\pi k\tag{2}$$

From $(2)$, we see that the phase $\phi(\omega)$ equals $\omega/2$ plus a constant term which is irrelevant for the group delay. Consequently, the group delay is given by

$$\tau_g(\omega)=-\frac{d\phi(\omega)}{d\omega}=-\frac12,\quad\omega\neq 2\pi k\tag{3}$$

which is what you found using Matlab. However, Matlab doesn't tell you what's going on at $\omega=0$, where the value of the group delay is indeed undefined.

  • $\begingroup$ A causal system with negative group delay. How come? $\endgroup$ Apr 10, 2017 at 21:17
  • 1
    $\begingroup$ @RodrigodeAzevedo: Causality does not imply non-negative group delay. Take a prediction filter as an example: it predicts future samples based on the past. $\endgroup$
    – Matt L.
    Apr 11, 2017 at 9:55
  • $\begingroup$ Yet, I would expect a differentiator, rather than an integrator, to have predictive power. $\endgroup$ Apr 11, 2017 at 10:07
  • 1
    $\begingroup$ I was thinking of the PID controller, where differentiating the input allegedly has some form of predictive power. I assume that a group delay of $-\frac 12$ means some form of prediction plus interpolation. $\endgroup$ Apr 11, 2017 at 15:21
  • 1
    $\begingroup$ @RodrigodeAzevedo: You're right about the combination of interpolation and prediction. As for the PID controller, it's not the first order difference filter that predicts, but the addition of the first-order difference to the actual value, which corresponds to a filter with coefficients $[1,0]+[1,-1]=[2,-1]$. That filter indeed has a group delay of $-1$ at DC. $\endgroup$
    – Matt L.
    Apr 11, 2017 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.