# follow up to previous question “ is this an impulse response or step response”

This question is a follow up to the gorgeous explanation of how the leaky integrator model becomes a differential equation. The link to that question and answer is below.

should this be viewed as an impulse response or step response

I have two questions related to the explanation. Hopefully Fat32 will not mind answering but anyone else is great also.

1) At the bottom of the first page, the author has 2 statements that start with "such that".

The beginning of the first one is $\delta(t) = x(t) \cdots$ and the beginning of the second one is $u(t) = x_(t) \cdots$

Clearly, the equality sign in those statements does not mean the usual equality. Could that notation be clarified because I don't follow it ?

2) At the very end of the answer, the author derives the continuous time differential equation for the leaky integrator model:

$y^{\prime}(t) + \alpha \times y(t) = x(t)$.

In the link I was originally looking at, the differential equation is discrete rather than continuous but aside from that, the same equation as that immediately above. ( proportionality constant is $1/k$ rather than $-\alpha$ ). Of course, the discrete version of above would be

$dy_{t} = (- \alpha \times y_t + x_t ) dt$

Where the subscripting denotes the discrete unit of time for $t = 1, \ldots n$ and $dt$ denotes the width between these discrete units. This discrete version above is what Lesson 12 uses to generate the plots for how the level of the water in the bucket changes.

So my question is the following: Would this discrete equation directly above just be derived by discretization of what was derived by Fat32 or would the leaky integator model derivation need to change somewhere to justify discreteness ? Clearly, the notion-concept of $exponential declining memory goes away in the discrete version of the model so that makes me think that maybe a whole new derivation is required for justification ? If it is required, then I imagine it is somewhere but I can't find it. Thanks a lot.  Mark  ## 1 Answer Let me provide an answer, 1-) In the answer I have used the notation$x(t)=\delta(t)$and$x(t)=u(t)$to indicate that the input to the system is a dirac impulse and unit-step function respectively. The correct notation should be$x(t) \equiv \delta(t)$which means identical, by definition. Triple equality sign is almost always omitted and the double equality sign is used instead in signal processing context. (it's therefore not asking for the solution of an equation, which is generally understood from double equality sign). 2-) The subject of differential and difference equations is rich. According to the usual literature, continuous time-systems are described by differential equations and discrete-time systems are described by difference equations. When a continuous-time signal is sampled and the associated continuous system is transformed into a discrete-time system the corresponding differental equation is also discretized and converted into an equivalent difference equation. One application of such discretization is the usual Kalman filering equations. I've analysed the continuous-time leaky integrator model whose input-output relationship was assumed by definition as$y(t) = \mathcal{T} \{x(t) \} = \int_{-\infty}^{t} e^{-\alpha(t-\tau)} x(\tau) d\tau $. Given this definition of the system the corresponding continuous-time LCCODE is obtained as in the answer. In the web-link only the differential equation relation is provided as$ dy/dt = s - y(t)/k $where$y(t)$is the water level (the output)$s=s(t)$is the input and$1/k$is the leakage constant, the differential equation is then $$\frac{dy}{dt} + \frac{1}{k} y = s$$ or equivalently $$\frac{dy(t)}{dt} + \frac{1}{k} y(t) = s(t)$$ This differential equation is the same as$ y' + \alpha y = x$after replacing$\alpha = 1/k$and$s(t) \equiv x(t)$. On the other hand in your original question, you refer to a discrete differential equation that I cannot clearly understant whether it's a difference equation or a differential equation (the terms discrete and differential used together as a mix) or it's just another application of discretization as I defined above. However the following excerpt from the original web-reference indicates to me that: We can easily simulate this leaky integrator in discrete steps of time by changing the value of 'y' on each step according to the equation above: There is only a continuous-time differential equation and it's solution is numerically computed by the software, which is indicated as the simulation of the ODE using discrete steppings (the numerical computation) So as I understood given the continuous time differential equation $$y'(t) + \alpha y(t) = x(t)$$ one can reach the numerical version as $$\frac{d y}{dt} = -\alpha y(t) + x(t)$$ $$dy = ( -\alpha y_t + x_t) dt$$ Where$y(t)$is replaced by$y_t$just as a matter of notation. So they are the same thing. The web-link numerically solves the contiuous differential equation for various input stimulus. • Hi Fat32: I should have said difference equation rather than discrete differential equation. My use of the terminology is pathetic. I will read your answer and let you know how it goes but I think I get it already. All the leaky integrator link is doing is taking your differential equation and simulating paths by using discrete steps. This is what I meant by my use of the term discretization. So, I think the answer is that another derivation is not needed. One just discretizes the differential equation that your derived to generates paths. No need for a new derivation in the discrete case. – mark leeds Sep 29 '17 at 16:02 • Yes, difference equation is better. But when you discretize a differential equation you may refer to it as the discrete verison anyway. The given differential eq$y' + \alpha y = x$can be numerically solved by the Euler method with the iteration$y[n+1] = y[n] + T_s (-\alpha y[n] + x[n])$. The same differential equation can be discretized as$y[n]+(\alpha T_s -1)y[n-1]=T_s x[n-1]\$. – Fat32 Sep 29 '17 at 18:56
• Thanks Fat32. I will check your answer. It was great. Just a heads up that besides viewing as the discretization of the continuous case, this link below views the discrete case in its own right by defining the impulse response and the step response in the discrete case. So, I'm clear now and understanding both is great. Thanks so much for your help, wisdom and derivations. dsp.stackexchange.com/questions/33858/… – mark leeds Sep 30 '17 at 3:26
• Hi Fat32: I didn't that I was supposed to upvote, nor what it means nor what to do. I can definitely do that. No problem but let me know what to do. I have Lyons but not Signal Processing First. Given your abilities and wisdom, if you like Signal Processing first, I'll definitely get it. – mark leeds Sep 30 '17 at 14:02
• Hi Fat32: I figured out how to upvote ( I think ) and did it. your answer definitely deserves it. one more bother: on amazon, there are many different versions of signal processing first by mclellan et al. could you send me the link of the one you have. thanks so much for everything. – mark leeds Sep 30 '17 at 19:03