2
$\begingroup$

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?
$\endgroup$
  • $\begingroup$ Isn't it possible that you have flat group delay?(linear phase response?) $\endgroup$ – Giwrgos Rizeakos Nov 15 '16 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$ – user1641496 Nov 15 '16 at 17:07
3
$\begingroup$

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

$$H(z)=\frac{1}{1-z^{-1}}\tag{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.

$\endgroup$
  • $\begingroup$ A causal system with negative group delay. How come? $\endgroup$ – Rodrigo de Azevedo Apr 10 '17 at 21:17
  • $\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 '17 at 9:55
  • $\begingroup$ Yet, I would expect a differentiator, rather than an integrator, to have predictive power. $\endgroup$ – Rodrigo de Azevedo Apr 11 '17 at 10:07
  • $\begingroup$ @RodrigodeAzevedo: With a group delay of $-\frac12$ the integrator doesn't actually predict much; a first order difference filter has a group delay of $+\frac12$, so it wouldn't predict anything. $\endgroup$ – Matt L. Apr 11 '17 at 15:09
  • $\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$ – Rodrigo de Azevedo Apr 11 '17 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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