4
$\begingroup$

I was watching this video on spatially invariant systems:

And I found the definition a bit confusing, or seems vacuous, because isn't $T[x(n_1 - k_1, n_2 - k_2)] = y(n_1 - k_1, n_2 - k_2)$ always true by definition?

$\endgroup$
  • 2
    $\begingroup$ This is the problem with the notational convention in signal processing... Here $x(n_1,n_2)$ doesn't refer to the value of $x$ at a specific point $(n_1,n_2)$ but to the entire signal $x$. So $x(n_1-k_1,n_2-k_2)$ means the signal $x$ translated by $(k_1,k_2)$. The transformation $T$ acts on the signal as a whole, not pointwise. $\endgroup$ – Rahul Dec 31 '16 at 16:27
  • 1
    $\begingroup$ Could you elaborate in an answer with some examples? Thanks! $\endgroup$ – qed Dec 31 '16 at 17:16
4
$\begingroup$

Spatial invariance simply means that shifting the input signal results in an equally shifted output signal. So if the response to an arbitrary signal $x(n_1,n_2)$ is $y(n_1,n_2)$, and the response to a shifted version of the same input signal $x(n_1-k_1,n_2-k_2)$ is $\tilde{y}(n_1,n_2)$, then the system is shift invariant if and only if

$$\tilde{y}(n_1,n_2)=y(n_1-k_1,n_2-k_2)\tag{1}$$

Any system that can be described by the following convolution sum is shift-invariant:

$$y(n_1,n_2)=\sum_{l_1}\sum_{l_2}h(l_1,l_2)x(n_1-l_1,n_2-l_2)\tag{2}$$

where $h(n_1,n_2)$ is the system's impulse response.

EDIT: As requested in the comments, here are some simple examples of shift-variant systems:

  1. $y(n_1,n_2)=x(2n_1,n_2)$
  2. $y(n_1,n_2)=n_1\cdot x(n_1,n_2)$
  3. $y(n_1,n_2)=x(-n_1,-n_2)$

Let's look at the examples above in more detail:

  1. \begin{align*} y(n_1 - d_1, n_2 - d_2) &= x(2(n_1 - d_1), n_2 - d_2) \\ & \ne x(2n_1 - d_1, n_2 - d_2) \end{align*}

  2. \begin{align*} y(n_1 - d_1, n_2 - d_2) &= (n_1 - d_1) & \cdot x(n_1 - d_1, n_2 - d_2) \\ &\ne n_1 & \cdot x(n_1 - d_1, n_2 - d_2) \end{align*}

  3. \begin{align*} y(n_1 - d_1, n_2 - d_2) &= x(-(n_1 - d_1), -(n_2 - d_2)) \\ & \ne x(-n_1 - d_1, -n_2 - d_2) \end{align*}

$\endgroup$
  • $\begingroup$ Could you add an example? Thanks! $\endgroup$ – qed Jan 1 '17 at 13:04
  • $\begingroup$ @qed: Have a look at my edited answer. $\endgroup$ – Matt L. Jan 1 '17 at 13:17
  • $\begingroup$ Ok, what is $\tilde{y}$ in your example? $\endgroup$ – qed Jan 1 '17 at 13:42
  • $\begingroup$ @qed: As I said in my answer, it's the response to a shifted version of the input signal. Since any system described by the convolution sum (2) is shift-invariant, the condition (1) is satisfied, i.e., $\tilde{y}$ equals the shifted response. $\endgroup$ – Matt L. Jan 1 '17 at 13:48
  • $\begingroup$ There are some confusions here. (1) I assume the $k_1, k_2$ used in the summation are quite different from the $k_1, k_2$ used for shifting? (2) There seems to be two interpretations of $y$ here: either as a function of $n_1, n_2$ or as a function of $x(n_1, n_2)$. The second interpretation is not defined, hence the difference between the two is unclear. $\endgroup$ – qed Jan 1 '17 at 13:57
1
$\begingroup$

My answer is too late but anyway ...

I was watching this exact slide and got as confused as you! Then I came across your question. I don't fully get Matt L's answer. After some thinking I realized that the main cause of the confusion is how we view the system $T[]$.

I came up with the following explanatory example:

If $T[x(n)]=nx(n)$, what does it mean? It means that the system will multiply the input by $n$. Thus, if we give the system another input function $z(n)$, it will output $nz(n)$.

Thus:

For $x(n)=n$, $T[x(n)]=nx(n)=n\cdot n$.

For $z(n)=n-\tau$, $T[z(n)]=nz(n)=n\cdot(n-\tau)$.

In addition, if $T[]$ is spatially invariant, then $T[x(n-\tau)]=(n-\tau)(n-\tau)$.

However, note that $z(n)$ is indeed $x(n-\tau)$, and the output is $n\cdot(n-\tau)$ rather than $(n-\tau)(n-\tau)$. Thus, $T[]$ is spatial variant.

In general, if the modification applied by the system to the input involves the time $n$, then the system is spatially varying.

$\endgroup$

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.