# What is meant by Impulse Response [duplicate]

I have read in all books that:

Impulse(n) = 1 when n=0 , 0 otherwise


So when we state impulse response of signal x(n) I do not understand what is its actual meaning -

Does it means that for n=1,2,3,4... value of :

x(n) . Impulse(0)


Hence in that case if n >= 0 we would always get y(n)(output) as x(n) as:

x(n) . Impulse(0) = x(n) . 1


Its a known fact that anything into 1 would result in same i.e. the input.

But in many DSP problems I see that impulse response (h(n)) is = (1/2)n(u-3) for example. I am not able to understand what then is the function and technical meaning of Impulse Response.

Please correct my understanding on same.

• There is a difference between Dirac's (or Kronecker) impulse and an impulse response of a filter. You should check this great answer by Jason R. – jojek Jul 25 '14 at 16:44
• @jojek, Just one question: How is that exposition is different from "the books"? – Val Jul 26 '14 at 9:28

Suppose you have given an input signal to a system:

$$x(n)=\begin{cases} 1, & \mbox{if } n=0 \\ 0, & \mbox{if } n\ne 0 \end{cases}$$

Then the output response of that system is known as the impulse response.

In your example $h(n) = \frac{1}{2}u(n-3)$. This means that if you apply a unit impulse to this system, you will get an output signal $y(n) = \frac{1}{2}$ for $n \ge 3$, and zero otherwise.

• +1 Finally, an answer that tried to address the question asked. – Dilip Sarwate Jul 26 '14 at 11:26
• @DilipSarwate You should explain where you downvote (in which place does the answer not address the question) rather than in places where you upvote. – Val Jul 26 '14 at 11:34

I believe you are confusing an impulse with and impulse response.

For digital signals, an impulse is a signal that is equal to 1 for n=0 and is equal to zero otherwise, so: Impulse(0) = 1;

Impulse(1) = Impulse(2) = ... = Impulse(n) = 0; for n~=0

This also means that, for example h(n-3), will be equal to 1 at n=3. n=0 => h(0-3)=0; n=1 => h(1-3) =h(2) = 0; n=2 => h(1)=0; n=3 => h(0)=1

The equivalente for analogical systems is the dirac delta function.

An impulse response is how a system respondes to a single impulse. This is a straight forward way of determining a systems transfer function. In your example, I'm not sure of the nomenclature you're using, but I believe you meant u(n-3) instead of n(u-3), which would mean a unit step function that starts at time 3. This means that after you give a pulse to your system, you get: y(n) = (1/2)u(n-3) Which gives: n y

1 0

2 0

3 1/2

4 1/2

...

For more information on unit step function, look at Heaviside step function.

A system $\mathcal{G}$ is said linear and time invariant (LTI) if it is linear and its behaviour does not change with time or in other words:

Linearity $$\mathcal{G}[k_1i_1(t)+k_2i_2(t)] = k_1\mathcal{G}[i_1]+k_2\mathcal{G}[i_2]$$ Time Invariance (a delay in the input corresponds to a delay in the output)

$$y(n-r) = \mathcal{G}[i(n-r)]$$

where $i$'s are input functions and k's are scalars and y output function. Now in general a lot of systems belong to/can be approximated with this class.

The important fact that I think you are looking for is that these systems are completely characterised by their impulse response. The impulse is the function you wrote, in general the impulse response is how your system reacts to this function: you take your system, you feed it with the impulse and you get the impulse response as the output.

Now you keep the impulse response: when your system is fed with another input, you can calculate the new output by performing the convolution in time between the impulse response and your new input. That is why the system is completely characterised by the impulse response: whatever input function you take, you can calculate the output with the impulse response.

Another important fact is that if you perform the Fourier Transform (FT) of the impulse response you get the behaviour of your system in the frequency domain.

Considering this, you can calculate the output also by taking the FT of your input, the FT of the impulse response, multiply them (in the frequency domain) and then perform the Inverse Fourier Transform (IFT) of the product: the result is the output signal of your system.

• How does this answer the question raised by the OP? – Dilip Sarwate Jul 26 '14 at 10:03
• @DilipSarwate sorry I did not understand your question – Francesco Boi Jul 26 '14 at 12:38

Have just complained today that dons expose the topic very vaguely. I advise you to read that along with the glance at time diagram. Basically, if your question is not about Matlab, input response is a way you can compute response of your system, given input $\vec x = [x_0, x_1, x_2, \ldots x_t \ldots]$. That is a vector with a signal value at every moment of time. That is a waveform (or PCM encoding) of your known signal and you want to know what is response $\vec y = [y_0, y_2, y_3, \ldots y_t \ldots]$. This is a vector of unknown components. Again, every component specifies output signal value at time t. The idea is that you can compute $\vec y$ if you know the response of the system for a couple of test signals and how your input signal is composed of these test signals. You should be able to expand your $\vec x$ into a sum of test signals (aka basis vectors, as they are called in Linear Algebra).

I advise you to look at Linear Algebra course which teaches that every vector can be represented in terms of some chosen basis vectors $\vec x_{in} = a\,\vec b_0 + b\,\vec b_1 + c\, \vec b_2 + \ldots$. Here, a is amount of vector $\vec b_0$ in your signal, b is amount of vector $\vec b_1$ in your signal and so on. There is noting more in your signal. It is just a weighted sum of these basis signals. You may call the coefficients [a, b, c, ..] the "specturm" of your signal (although this word is reserved for a special, fourier/frequency basis), so $[a, b, c, ...]$ are just coordinates of your signal in basis $[\vec b_0 \vec b_1 \vec b_2]$. The point is that the systems are just "matrices" that transform applied vectors into the others, like functions transform input value into output value. once you have measured response of your system to every $\vec b_i$, you know the response of the system for your $\vec x.$ That is it, by virtue of system linearity. That is, suppose that you know (by measurement or system definition) that system maps $\vec b_i$ to $\vec e_i$. Your output will then be $\vec x_{out} = a \vec e_0 + b \vec e_1 + \ldots$! Voila! However, the impulse response is even greater than that. It allows to know every $\vec e_i$ once you determine response for nothing more but $\vec b_0$ alone!

The basis vectors for impulse response are $\vec b_0 = [1 0 0 0 ...], \vec b_1= [0 1 0 0 ...], \vec b_2 [0 0 1 0 0...]$ and etc. That is, your vector [a b c d e ...] means that you have a of [1 0 0 0 0] (a pulse of height a at time 0), b of [0 1 0 0 0 ...] (pulse of height b at time 1) and so on. The system system response to the reference impulse function $\vec b_0 = [1 0 0 0 0]$ (aka $\delta$-function) is known as $\vec h = [h_0 h_1 h_2 \ldots]$. It looks like a short onset, followed by infinite (excluding FIR filters) decay. This is a picture I advised you to study in the convolution reference. Here is why you do convolution to find the output using the response characteristic $\vec h.$ As you see, it is a vector, the waveform, likewise your input $\vec x$. These signals both have a value at every time index. The reaction of the system, $h$, to the single pulse means that it will respond with $[x_0, h_0, x_0 h_1, x_0 h_2, \ldots] = x_0 [h_0, h_1, h_2, ...] = x_0 \vec h$ when you apply the first pulse of your signal $\vec x = [x_0, x_1, x_2, \ldots]$. The first component of response is the output at time 0, $y_0 = h_0\, x_0$. The rest of the response vector is contribution for the future. You will apply other input pulses in the future. They will produce other response waveforms. But, the system keeps the past waveforms in mind and they add up. That is, at time 1, you apply the next input pulse, $x_1$. It will produce another response, $x_1 [h_0, h_1, h_2, ...]$. The output at time 1 is however a sum of current response, $y_1 = x_1 h_0$ and previous one $x_0 h_1$. The output of a signal at time t will be the integral of responses of all input pulses applied to the system so far, $y_t = \sum_0 {x_i \cdot h_{t-i}}.$ That is a convolution. This operation must stand for . in your example (you are right that convolving with const-1 would reproduce x(n) but seem to confuse zero series 10000... with identity 111111..., impulse function with impulse response and Impulse(0) with Impulse(n) there). I have told you that [1,0,0,0,0..] provides info about responses to all other basis vectors, e.g. [0,1,0,0,0,...], because shifted (time-delayed) input implies shifted (time-delayed) output.

Actually, frequency domain is more natural for the convolution, if you read about eigenvectors. However, because pulse in time domain is a constant 1 over all frequencies in the spectrum domain (and vice-versa), determined the system response to a single pulse, gives you the frequency response for all frequencies (frequencies, aka sine/consine or complex exponentials are the alternative basis functions, natural for convolution operator). Basically, it costs t multiplications to compute a single components of output vector and $t^2/2$ to compute the whole output vector. In the frequency domain, by virtue of eigenbasis, you obtain the response by simply pairwise multiplying the spectrum of your input signal, X(W), with frequency spectrum of the system impulse response H(W).

I hope, this will make things clear.