I'm trying to teach myself the relation between simple discrete ODE's and the impulse response-step response concept.

Getting back to the question: I don't expect anyone to read the whole thing but I'm confused early on which is a good thing.

Right at the beginning of the link, the author provides an example of a leaky integrator model in which the water facet is turned on and the water goes into the bucket and there is no hole in the bucket.

Given the leaky integrator model, the author then shows how, if there is no hole in the bucket, then by setting k = infinity in the model, one can model the water level for the bucket. He then provides

  1. a plot of the input: the water going into the bucket and
  2. a plot of the output: the water level of the bucket.

My confusion stems from the plot of the input. I think that the plot of the input, rather than being a spike as is shown at time t = 1, should instead be a step response where there are spikes all the way from zero to one ? so basically a step response ?

My thinking is that, if the water is turned out at time zero, then the spike for the input is at t = 0 and remains a spike until time t = 1 ?

The output plot seems fine to me.

If I am correct about the input plot being incorrect as is, then it kind of tells me that I understand the basic impulse response-step response concept. If I'm not, then, even though I loved the example, I'm still not quite getting it.

I asked the creator of the link in an email and he-she hasn't gotten back to me yet and I would like to understand this and don't honestly know if I'll get a response ( no pun intended ).


2 Answers 2


The plots that you're confused about are just drawn poorly. They don't show a spike at $t = 1$; instead, they are supposed to represent a short pulse covering the time period from $t=0$ to $t=1$. This is why you see the water levels in the corresponding output plots start increasing at $t=0$ and then start decaying after the water input stops at $t=1$ (except for the $k = \infty$ case of course).

This could be modeled as a linear combination of the system's step response; for this input $s(t)$, the output $y(t)$ is:

$$ y(t) = y_s(t) - y_s(t-1) $$

where $y_s(t)$ is the system's step response.

While the term impulse is thrown around in the lesson, they aren't impulses in the delta-function sense; instead, they are all just short (but finite) duration, finite-height rectangular pulses.

  • $\begingroup$ Thank you Jason and Fat32. I will read both answers extremely carefully and then check one. I wish there was a facility for checking both because I often find that multiple answers of different styles are often equally useful. I really appreciate the help. This list is amazing and full of talented and generous people. $\endgroup$
    – mark leeds
    Sep 28, 2017 at 18:53
  • $\begingroup$ both of your answers were incredible. I am going to check jason's because it answered the direction question directly. yours is also so useful but for different reasons. jason: thank you. it was more terminology because I meant rectangular finite pulse. fat32: I followed the math but I may start another thread because I still have one confusion. thanks so to both of you and also to peter for great editing. $\endgroup$
    – mark leeds
    Sep 29, 2017 at 3:33

Rather than spending an efford on the link-exploration, I would instead state here the simplest and the most basic description of the impulse response and step response of causal LTI systems within the particularity of a continuous time leaky integrator. I assume that you know about linear time invariant (LTI) systems and basic differential equations.

A (continuous-time) LTI system is characterised by its impulse response $h(t)$ defined via the relationship $$h(t) = \mathcal{T} \{ \delta(t) \}$$ such that $$ \delta(t) \rightarrow \boxed{ h(t) } \rightarrow h(t)$$

Where $\delta(t)$ is the impulse that is at the input. The step response can be defined as $$s(t) = \mathcal{T} \{ u(t) \}$$ such that $$ u(t) \rightarrow \boxed{ h(t) } \rightarrow s(t)$$ where $u(t)$ is the unit-step function.

One can further relate the step response to impulse response as $$ s(t) = \int_{-\infty}^{t} h(\tau) d\tau \longleftrightarrow h(t)=s'(t)$$

Finally, for an arbitrary input $x(t)$ the corresponding output $y(t)$ of any LTI system is given by the convolution integral as: $$ y(t) = h(t) \star x(t) = \int_{-\infty}^{\infty} h(t-\tau) x(\tau) d\tau = \int_{-\infty}^{\infty} x(t-\tau) h(\tau) d\tau = x(t) \star h(t) $$

Now before coming to the leaky-integrator, we shall consider the ideal integrator:

The ideal integrar is the system with the input-output relationship as $$ y(t) = \mathcal{T}\{ x(t) \} = \int_{-\infty}^{t} x(\tau) d\tau $$

Considering that ideal-integrator is an LTI system we can regard the above integral as a convolution operator and hence deduce that the impulse response of the ideal integrator is $$h(t) = u(t)$$ then the step response will be $$s(t) = \int_{-\infty}^t u(\tau) d\tau = t u(t) = r(t)$$ $r(t)$ being the ramp function.

Note that the differential equation associated with the ideal-integrator can be obtained by diferentiating its input-output relationship with respect to time as

$$ \frac{d y(t) }{dt} = \frac{d}{dt} \int_{-\infty}^t x(\tau)d\tau $$ which results in (after following the differentiation of the integral) $$ y'(t) = x(t) $$ with properly chosen initial conditions (according to the applied input) so that the ODE (an LCCDE) represents an LTI system.

The leaky-integrator can be defined in a number of ways as the term leaky may accept multiple mathematical definitions but one of the most common has the following input-output relationship:

$$y(t) = \mathcal{T} \{x(t) \} = \int_{-\infty}^{t} e^{-\alpha (t-\tau)} x(\tau) d\tau $$ Which has the interpretation that, when $\alpha > 0$, past values of the input are ignored more and more as time goes on, when computing the current value of the output. This is achived by the decaying-exponential weighting applied to the integrator input $x(t)$.

Again considering that this is an LTI system and therefore that its output is given by a convolution integral, then we can deduce that the impulse response $h_l(t)$ of the leaky integrator is $$h_l(t) = e^{-\alpha t} u(t)$$ and the associated step response can be obtained as $$s_l(t) = \int_{-\infty}^t h_l(\tau)d\tau = \int_{-\infty}^t e^{-\alpha \tau} u(\tau) d\tau = \int_{0}^t e^{-\alpha \tau} d\tau = \frac{1}{\alpha} (1-e^{-\alpha t})$$

The associated ordinary differential equation of the leaky-integrator can be obtained similarly by diferentiating its input-output relationship with respect to time $t$ as

$$ \frac{d y(t) }{dt} = \frac{d}{dt} \int_{-\infty}^{t} e^{-\alpha (t-\tau)} x(\tau) d\tau .$$ After following the differentiation of the integral carefully one can reach $$ y'(t) = e^{-\alpha (t-t)}x(t) t' - e^{-\alpha(t+\infty)}x(-\infty) \frac{d}{dt}(-\infty) + \int_{-\infty}^{t} -\alpha e^{-\alpha (t-\tau)} x(\tau) d\tau $$ It can be seen that the first term is $x(t)$, the second term is zero and the last term is $-\alpha y(t)$, hence we deduce $$y'(t) = x(t) - \alpha y(t) \longleftrightarrow y'(t)+\alpha y(t) = x(t)$$ as the ODE that define the LTI leaky integrator.

  • 1
    $\begingroup$ For a filesystem, you sure know much about DSP! :D $\endgroup$
    – Peter K.
    Sep 28, 2017 at 14:04
  • 2
    $\begingroup$ @PeterK My memory holds a lot of books :-) $\endgroup$
    – Fat32
    Sep 28, 2017 at 14:09

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.