5

I was watching this video where the presenter remarks:

For a discrete signal, time shift corresponds to phase change in a discrete signal but not vice versa.

I was trying to figure out how this could be proved. For example, if our discrete signal is

$f[n] = A \cos(\Omega_o n + n_o)$ where $ n,n_o \in Z$

If the signal undergoes a time shift $n'$, we have

$ A \cos(\Omega_o (n + n') + n_o) = A \cos(\Omega_o n + \Omega_o n' + n_o)$

This would correspond to a phase shift only if $\Omega_o n'$ is an integer. But that means $\Omega_o$ needs to be an integer, which is not always the case.

What is the correct explanation here ?

Deve
  • 4,255
  • 17
  • 26
curryage
  • 419
  • 4
  • 16

1 Answers1

7

If you have a signal

$$f[n]=\cos(\Omega_0n)$$

and you apply a time shift of $n_0$ you get

$$f[n+n_0]=\cos(\Omega_0(n+n_0))=\cos(\Omega_0n+\Omega_0n_0)=\cos(\Omega_0n+\phi)$$

where $\phi=\Omega_0n_0$ is the phase shift.

The other way around, if you have a phase shift of $\phi$, this is not always equivalent to a time shift of the original signal:

$$g[n]=\cos(\Omega_0n+\phi)=\cos(\Omega_0(n+\phi/\Omega_0))$$

which only corresponds to an integer time shift if $\phi/\Omega_0$ is integer, i.e. if $\phi/\Omega_0=n_0$ which results in

$$g[n]=f[n+n_0]$$

EDIT: Re-reading your question, I think that the misunderstanding lies in the fact that you believe that the phase of a discrete-time signal must be integer. This is not the case. Imagine two continuous-time signals $$x(t)=\cos(\omega_0t)\quad\textrm{and}\quad y(t)=\cos(\omega_0t+\phi),\quad\phi\in\mathbb{R}$$

Note that the following holds for any value of $\phi$:

$$y(t)=x(t+\phi/\omega_0)$$

So we can always express $y(t)$ as a shifted version of $x(t)$. Now imagine that we construct two discrete-time signals by sampling $x(t)$ and $y(t)$ at times $t_n=nT$ with some real-valued $T>0$:

$$f[n]=x(nT)=\cos(\omega_0nT)=\cos(\Omega_0n)\\ g[n]=y(nT)=\cos(\omega_0nT+\phi)=\cos(\Omega_0n+\phi) $$ with $\Omega_0=\omega_0T$. Note that the phase $\phi$ is of course the same as before (and for this reason not necessarily integer). The difference between the continuous-time and the discrete-time case is now that $g[n]$ cannot in general be obtained from $f[n]$ by time-shifting because we can only shift by integers. The condition under which $g[n]$ can be obtained by shifting $f[n]$ is if $\phi/\Omega_0$ is integer because then we can write

$$g[n]=\cos(\Omega_0(n+\phi/\Omega_0))=f[n+\phi/\Omega_0]=f[n+n_0],\quad n_0\in\mathbb{Z}$$

Matt L.
  • 89,963
  • 9
  • 79
  • 179
  • I understand all of this. For a discrete signal, the phase is an integer. How can we be sure that $\phi = \Omega_o n_o$ is an integer ? – curryage Apr 23 '14 at 08:52
  • @curryage That's exactly the point. You can't be sure, that's why an arbitrary phase shift does not in general correspond to a time shift of the signal, unlike with time-continuous signals. – Matt L. Apr 23 '14 at 08:55
  • I am confused. My previous comment was referring to the first part of your answer where you supposedly show how a time shift corresponds to a phase shift. But the computed phase is not necessarily an integer,as it must be for discrete signals. I understand the second part of your answer which shows an arbitrary phase shift does not, in general, correspond to a time shift. – curryage Apr 23 '14 at 09:14
  • 1
    @curryage I think the problem is that you think $\phi$ is an integer. In general it isn't. Note that $\Omega_0$ and $\phi$ are just real number, whereas $n$ and $n_0$ are integers. – Matt L. Apr 23 '14 at 09:17
  • For continuous signals, phase corresponds to a shift of the signal across time. If this definition also holds for discrete signals, shouldn't $\phi$ be an integer so that the shift makes sense ? – curryage Apr 23 '14 at 09:42
  • No, for sinusoidal signals you have $f(t)=\cos(\omega_0t+\phi)$ where the time-shift is $\phi/\omega_0$. For discrete-time signals you can imagine a phase shift as a sampled version of a phase shifted continuous signal. Only if $\phi/\Omega_0$ does this phase shift correspond to a time shift of the discrete-time signal. – Matt L. Apr 23 '14 at 10:36
  • For a discrete time signal - only a time shift of an integer number of samples corresponds to a linear phase with respect to frequency. Note only $n_0$ needs to be an integer - for discrete signals the phase does not need to be an integer - look at $n\Omega_0$ when $n=1$ and $\Omega_0=0.001$ you'll see that the phase isn't an integer. – David Apr 23 '14 at 13:18
  • @curryage I edited my answer, trying to address your misunderstanding. – Matt L. Apr 23 '14 at 13:29
  • 2
    @David Your remark on the linear phase is not true. Consider a symmetric (linear phase) FIR filter with an even number of coefficients. Despite the exact linear phase the filter's delay is non-integer (it is $(N-1)/2$). – Matt L. Apr 23 '14 at 13:32
  • @MattL. Yes - any symmetric or anti-symmetric FIR will have linear phase and it may not correspond to a time delay. My comment was only addressing time-delays. Your filter going to introduce passband ripple and/or stopband attenuation, so it isn't a pure time delay. In many cases it may be a good approximation though. – David Apr 23 '14 at 13:49