Recall that a discrete-time system is a mathematical entity that takes an input signal (usually denoted $x$) and produces an output signal (usually denoted $y$). In the study of signal processing, systems that have certain characteristics are of particular interest. Among these characteristics is time-invariance .
There is a very basic intuition behind the notion of time-invariance. In many cases, we would like a system to behave a certain way, no matter when an input may be given. To use a practical analogy, people expect their toasters to operate the same way on Tuesdays as they do on Mondays.
A system is time-invariant if a time delay for an input results in the same time delay on the output. Expressing this idea of system time-invariance mathematically is straightforward. Consider a system $H$; let $x[n]$ be some arbitrary input, and call the system's output for that input $y[n]$. $H$ is time-invariant if, for some arbitrary integer value $q$, $H[x[n-q]]=y[n-q]$:
Example: moving average system
Consider, for example, the moving average system $y[n]= \frac{1}{2}(x[n]+x[n-1])$. Is this system time invariant? To find out, let's delay the input by some value $q$, and see what the output is. We'll call the delayed input signal $x'[n]$ (=$x[n-q]$) and the new output $y'$:$y'[n]=\frac{1}{2}(x'[n]+x'[n-1])=\frac{1}{2}(x[n-q]+x[(n-1)-q])$Now the important question, is $y'[n]=y[n-q]$? That will be easy to determine, simply replace every $n$ with $n-q$ in that original $y[n]$ equation and see if it is the same as $y'[n]$: $y[n-q]=\frac{1}{2}(x[n-q]+x[n-q-1])=\frac{1}{2}(x[n-q]+x[(n-1)-q])=y'[n]\checkmark$
Example: decimation
Now let's consider a decimation system, $y[n]=x[2n]$. Is this system time-invariant? First, create a new signal that is a delayed version of $x[n]$: $x'[n]=x[n-q]$. Next, find the output corresponding to this new signal: $y'[n]=x'[2n]$. Now express this output in terms of the original input: $y'[n]=x'[2n]=x[2n-q]$. Finally, check to see if this is the same as $y[n-q]$. As $y[n-q]=x[2(n-q)]$ is not equivalent to $y'[n]$ (for $2n-1\neq 2(n-q)$ for all $n$ and $q$), the system is not time-invariant.Now practice on the system examples below; which of them are time-invariant?
- Identity: $y[n] = x[n]$
- Scaling: $y[n] = 2\, x[n]$
- Offset: $y[n] = x[n]+2$
- Square signal: $y[n] = (x[n])^2$
- Shift: $y[n] = x[n+m]\quad m\in Z$ \]
- Square time: $y[n] = x[n^2]$
- Recursive average: $y[n] = x[n]+ \alpha\,y[n-1]$
- Identity: $y[n] = x[n]$ time-invariant
- Scaling: $y[n] = 2\, x[n]$ time-invariant
- Offset: $y[n] = x[n]+2$ time-invariant
- Square signal: $y[n] = (x[n])^2$ time-invariant
- Shift: $y[n] = x[n+m]\quad m\in Z$ time-invariant
- Square time: $y[n] = x[n^2]$ not time-invariant
- Recursive average: $y[n] = x[n]+ \alpha\,y[n-1]$ time-invariant