# Is any time-domain vector stored on a digital machine always intrinsically causal? [closed]

Reading up on causality, I understand the mathematical definition, in so far as that a causal system, is one where the output depends only on the current time, and possibly the past time, but never the future times.

I have also seen that we can 'make a (transfer) system causal' by 'shifting it in time by an appropriate amount'.

I do not necessarily understand the above statement, and would like to see a simple example of two of such a thing happening. (That is, plot it when its non-causal, and re-plot it when it is causal).

For example, if I have a length $N$ impulse response, stored in a vector on my machine, how does it 'know' that this is causal or non-causal? It seems as though the time-axis would always start at $n=0$, where the first point in my vector is.

• This question is essentially unanswerable. An impulse response is just a sequence of numbers, and unless you identify which of these numbers corresponds to $n = 0$, it is not possible to say whether this impulse response is that of a causal system or not. $\mathbf y = [1, -1, 2]$ is a causal response if $y = 1, y = -1, y = 2$ and noncausal if $y[-1] = 1, y = -1. y = 2$ – Dilip Sarwate Oct 14 '13 at 18:16
• @DilipSarwate So, if we are given an $N$ length vector on a digital machine, and we are told $n=0$ is at the first sample, it is causal. If however we are told that the first sample is at $n < 0$, then and only then do we apply a phase term to the vector, so as to make it causal. Would this be a correct assessment? – TheGrapeBeyond Oct 14 '13 at 18:36
• ...why the downvote? – TheGrapeBeyond Oct 14 '13 at 19:05
• Applying a "phase term" to the vector, whatever you mean by that phrase, cannot change a noncausal impulse response to a causal impulse response. If $y[-1] = 1, y = -1, y = 2$ is the given noncausal impulse response, then $[1e^{j\theta_1}, -1e^{j\theta_2}, 2e^{j\theta_3}]$ is just as noncausal as $[1, -1, 2]$ as long as the middle term continues to be associated with $n=0$. – Dilip Sarwate Oct 14 '13 at 19:07
• @DilipSarwate What I mean is, if the first term is associated with $n<0$, then if we re-associate the first term with $n=0$, we will have to multiply the vector with the phase term. Isn't that correct? – TheGrapeBeyond Oct 14 '13 at 19:09

Causality is not so much a characteristic of a signal as it is a characteristic of a system. For example, a non-causal system can have an output at time $t$ which depends on the input at time $t+1$. When thinking in terms of time, a non-causal system breaks our intuition because it has to "see the future" in order to operate.

Let's say that I want to create an audio effect that is a sort of "reverse echo." In other words, I want to hear an echo of the sound before the sound event actually occurs. This would be an example of non-causal processing because at any given time, the output depends on input which has not yet occurred. This is not a problem in the case of a recorded audio signal because we already have all of the time samples available to us, so we can "look ahead" and use this "future information" right now.

But what if I wanted to implement this "reverse echo" effect in a live performance? I obviously can't "look ahead" to grab samples out of the future, but I can wait until all of the samples I need are available to me, and then apply the processing. This would produce the exact same output signal as if I had done the non-causal processing mentioned above, but with one significant difference: my output would be delayed.

Given a signal $y$ which depends on input $x$ as

$$y[n] = a_2 x[n-1] + a_1 x[n] + a_0 x[n+1]$$

we can make a causal version of $y$, which we will call $y^\prime$, by simply delaying $y$ by one time step:

$$y^\prime[n] = y[n-1] = a_2 x[n-2] + a_1 x[n-1] + a_0 x[n]$$

We have not altered the signal in any way, besides to shift its time indexing. Any shift in phase can be seen as a direct result of the delay, and cannot be reversed by multiplying some phase term.

• Thank you nispio. (In the second equation, shouldn't that be $y[n-1]$ btw?) So if I understand correctly, when people say "this was an anti-causal system, so we delayed it", there is literally nothing that was done to the actual data vector itself, right? – TheGrapeBeyond Oct 15 '13 at 14:32
• @nispio: +1. Nice simple but illustrative example. – Jason R Oct 15 '13 at 15:08
• Fixed the typo. Thanks. There are different ways to deal with a non-causal system which depend on the application. However, in general I think that your statement is accurate; the data itself is completely unaltered. – nispio Oct 15 '13 at 15:14
• Thank you it is beautiful post. May you please give an example or two of those ways of dealing with non-causal system you mentioned? – TheGrapeBeyond Oct 15 '13 at 15:25
• To be honest, I threw that in as a blanket statement to imply that delaying the output is not a guaranteed drop-in replacement for a non-causal system. For example, applying delayed non-causal processing as part of a feedback loop could easily lead to system instability. Just because you can turn a non-causal system into a causal one, doesn't mean that it is the right thing to do. – nispio Oct 15 '13 at 16:06