First, we can speak of a causal filter or a causal function (or sequence, or signal).
In general, a filter is causal if its output at present time ($n$) never depends on the input at future times ($n+m$, with $m>0$). Let us restrict to LTI filters (and we assume discrete time) - so that the filter is fully specified by an impulse response function $h(n)$.
In that case, the above property can be concisely stated as follows:
- A LTI discrete-time filter is causal iff $h(n)=0$ for $n<0$
This motivates the definition of a causal signal.
- A discrete-time function (signal, sequence) $g(n)$ is causal iff $g(n)=0$ for $n<0$
Notice that this later definition does not involve filters (it's just motivated by them). And notice that the two can be combined in:
- A LTI discrete-time filter is causal iff its response function $h(n)$ is a causal function.
In your assertion regarding the second link ("it is causal because both $x_n$ and $y_n$ are $0$ for $n<0$") you seem to be confusing both meanings. To determine that a filter is causal, one does not look for the causality of inputs or ouputs ($x_n$ and $y_n$) but for the causality of the response function $h_n$
Further, instead of $h(n)$ we can work with its Z-transform $H(z)$; we have $y[n] = x[n] \star h[n] \implies Y(z)=H(z) \, X(z)$. But, remember the relation "signal" $\leftrightarrow$ "Z transform" is not one-to-one unless the ROC (region of convergence) is also specified. A single $H(z)$ can have several corresponding $h[n]$("anti-transform"), for different ROCs. Alternatively, instead of giving a ROC, we might be given a causal (or anticausal) condition. In particular, if we are given a (rational) $H(z)$ and we are told that $h(n)$ is causal, then the ROC must extend outwards from the biggest pole. For an explanation of this, see any Signal Processing textbook, or here.
In your example, $Y(z)= z X(z)$, so $H(z)=z$. To analyze this you can reason in two ways:
1) In terms of zeros and poles. $H(z)$ has a zero at $z=0$ and a pole at infinity. Hence, because there is a single ROC (all the plane), and it extends inwards from the pole, hence there can be only one valid $h(n)$ which must be anti-causal.
(I insist: here you could deduce from $H(z)$ that the filter was anti-causal; but normally you can't; say, if $H(z)=z/(z-1)$ you'd have two possible $h[n]$, one causal, one anticausal).
2) Explicitly, formally. By inspection, $H(z)=\sum_{n} h(n) z^{-n} = z \implies h(n)=\delta(n+1)$ Which is anticausal.
You are using a time-invariant system right now and it is called a computer! At least, in most cases, a computer is designed to be a time-invariant system.
A system $y(t) = \cdots$ can be memoryless and time-varying (e.g. $y(t) = tx(t)$), with memory and time-varying (e.g. $y(t) = t+x(t-1)$), memoryless and time-invariant (e.g. $y(t) = x(t)$), and with memory and time-invariant (e.g. $y(t) = x(t)+x(t-1)$).
Also, all you have said about your particular system and your calculations in that context are correct.
Best Answer