# Simple Impulse Response

I am trying to find the impulse response to this system: At first it looks easy enough, $$y(n)=x(n)(-1)^n$$, set $$x(n)=\delta(n)$$, which makes $$h(n)=(-1)^n$$. But something seems wrong.

What am I missing?

(considering that $$(-1)^n=\cos(\pi n)=e^{j\pi n}$$, this system seems more complicated than it looks. It seems like $$y(n)$$ is $$x(n)$$ with a 180$$^\circ$$ phase shift.)

• hint: which kinds of systems can be fully described by impulse responses? Oct 24 '18 at 18:36
• Is this homework? Were you told that the system has an impulse response? Oct 24 '18 at 18:41
• Another hint: Draw $\delta(n)$ for $n=-10,-9,\ldots,9,10$ on a piece of paper. Below it, draw $(-1)^n$. Multiply point by point, and you got your answer. Now, as you suggest, this system is a bit more complicated than it seems: Repeat the same exercise, but now for $\delta(n-1)$ and $\delta(n+1)$, and so on. The result will tell you something about the system.
– MBaz
Oct 24 '18 at 19:38
• Also please note that setting the input $x[n] = \delta[n]$, your output (which you call $h[n]$) will not be $h[n] = (-1)^n$ but will be $h[n] = \delta[n] (-1)^n = \delta[n]$, as a matter of fact... Oct 24 '18 at 20:16
• and if your input is $x[n]=\delta[n-1]$ your output will be $-\delta[n-1]$. so your system is not time-invariant. it may be linear (the "L") but is not the "TI". Oct 25 '18 at 0:25

as the comments to your question mention you have not done the first step: system classification

1. Is the system linear? We have to input three different signal in the system and compare the outputs: the two signals $$x_1$$ and $$x_2$$ and the sum signal $$x_{1+2} = x_1 + x_2$$

\begin{align} y_1 &= (-1)^t x_1 \\ y_2 &= (-1)^t x_2 \\ y_{1+2} &= (-1)^t (x_1 + x_2) \\ \end{align}

and even at this point it is easy to see that $$y_1 + y_2 = y_{1+2}$$ that means the system is linear

1. Is the system time variant? it's usually very easy to say yes here when your system is a function of the time (or n in your case) $$z(t) = (-1)^t$$ Mathematically you have to input a single signal $$x(t)$$ at two points in time and check if the system gives you different outputs at different times:

\begin{align} y_1 &= (-1)^t x(t) \\ y_2 &= (-1)^t x(t-\Delta t) \\ \end{align}

to compare 1 and 2 you have to time shift the output of the first system to make sure they overlap the way you want.

\begin{align} y_1 &= (-1)^t x(t) \\ y_{1-\Delta t} &= (-1)^{t - \Delta t} x(t - \Delta t) \\ y_2 &= (-1)^t x(t-\Delta t) \\ \end{align}

the comparison shows that those two are not the same, which means your system changes over time

\begin{align} (-1)^{t - \Delta t} x(t - \Delta t) &= (-1)^t x(t-\Delta t) \\ (-1)^{t - \Delta t} &= (-1)^t \\ (-1)^{ - \Delta t} &= 1 \\ \end{align}

this is not true in general, that means your system is linear and time variant and you can not use the description of a LTI System. But there's a definition of the impulse response of a time variant system that you could use:

Time-varying "impulse response"

\begin{align} y(t) = \int h(\tau, t) x(t - \tau) d\tau \end{align}

since your system is memory less and kausal (i don't think there's a trivial mathematical proof for those two properties but it is easy to see), your time variant impulse response is rather simple:

\begin{align} h(\tau, t) = \delta(\tau) (-1)^t \end{align}

which leads to the collapse of the integral in the time variant convolution (just check the rules for integration over the dirac function if you don't remember them):

\begin{align} y(t) = \int \delta(\tau) (-1)^t x(t - \tau) d\tau \\ y(t) = (-1)^t x(t) \end{align}

And the last line ( and basically your first line) is the best description for linear memory less time variant systems - a simple multiplication with a time variant function or in general just:

\begin{align} y(t) = x(t) z(t) \\ \end{align}

bye bye stackexchange you managed to annoy me enough in my first two answers for me to decide not to come back.

• This is a discrete-time system and your mention of dirac impulse $\delta(t)$ makes no sense. Please correct it. Oct 25 '18 at 11:50
• it doesn't have to be
– user38202
Oct 25 '18 at 13:11
• yes it does have to! $\delta[n]$ is the discrete-time unit impulse (aka Kronecker delta) which is a sequence $\delta[n] = [...,0,0,1,0,0,...]$ of an integer variable $n$. But the Dirac impulse $\delta(t)$ is a generalized singularity function (distribution) of a continuous variable $t$. The discrete-time impulse response is defined $h[n] = \mathcal{T}\{ \delta[n]\}$ while the continuous-time impulse response is defined as $h(t) = \mathcal{T}\{ \delta(t)\}$. Using $\delta(t)$ in discrete-time context makes no sense. Oct 25 '18 at 13:16
• yeah but that's only true if n is discrete which besides you nobody ever defined. But to make you happy i changed all my time variables to t.
– user38202
Oct 25 '18 at 13:26
• Look carefully at the question. It says at the last line that $$(-1)^n = \cos(\pi n) = e^{ j \pi n}$$ which is only true for INTEGER $n$ in general, and FALSE for continuous $n$ in general. So is it still only me who thinks that $n$ should be an integer and the system under concern is a discrete-time system? So what's your next step to make all of us happier ? Oct 25 '18 at 13:38