We have implemented a way of approximating a data set with the following lines of code based on the dx/dt of wikipedia of leaky integrator.
dy = -A * y_previous + C
y_current = y_previous + dy*delta_t
However, I am uncertain if we are allowed to call the following truly a leaky integrator. I was a bit confused how to get the general solution with Laplace transforms from the wikipage with this because of the delta_t in our implementation. I have to add that I am slightly familiar with Laplace, but not with z-transformations and I was told I needed this since it's discrete.
With delta_t being the difference in time between t_current and t_previous, which is a constant value. I think we may have created a leaky integrator due to delta_t being a constant, if I would for instance call delta_t
(alpha), C to x_t, and rewrite it a bit, it seems more similar to sources I found online (1, 2, 3):

So then with the z-transform I have determined the transfer function:

My questions are:
- Is in this case indeed the
delta_tkind of
similar to the cited sites? - So is this indeed a leaky integrator?
- What can I say about the values A and
can be for stability of the leaky integrator? Should indeed hold:

delta_twas varying over t_1 to t_N, in other words not a constant? – NonIntellego May 18 '23 at 12:08delta_tvarying such that you don't have a consistent sample rate, or is it more that the sampling rate varies over the longer term duration? In either case changingdelta_tsimply changes $\alpha$ and similarly the time constant $\tau$, which just means the bandwidth or leak rate is modified accordingly-- but it is still a leaky integrator as long as the $\alpha$ you end up with has a value between 0 and 1 not including either. – Dan Boschen May 18 '23 at 12:23