Scaling for control.impulse_response discrete time · python-control/python-control · Discussion #977

Hi @cdboschen

This is typically tied to the common problem of defining the dirac function as a standalone unit sample function however that is not the definition of a unit impulse function. Hence, there is no right or wrong, it's just the definition. The discrete version is the Kronecker delta and both have only mathematical meaning under an integral or summation sign because they are technically generalized functions (or tempered distributions and so on depending on who you are hanging out with). They are not functions of time. And they should have the property

$$ \sum_{j}\delta_{ij} a_{j} = a_i $$

Because an impulse does not carry the value of 1 throughout the whole sample but when summed up (again only under summation sign) equals to unity mimicking the dirac delta

$$ \int _{-\infty }^{\infty }f(x),\delta (dx)=f(0) $$

That's why it is not a proper function of $\mathbb{z}$, similar to the dirac delta. Thus you have to scale it with the sampling period to keep that unity behavior. What you want is the unit sample function response and can be done by supplying [1, 0, 0, 0...] which is exactly what it is.

Regarding your comment on scaling, yes it totally makes sense in the mapping of an ODE from continuous time IF we were doing that. If I have a discrete time system then there is no further mapping and any connection to some continuous time system should already be in the scaling for that function.

By mentioning that there is a continuous time system, we don't mean that we always start from a continuous one and derive all discrete-time models from. What I meant over #812, is that there is an "equivalence-class" between such systems that you can argue about an impulse response of all such systems which should result in the same behavior.

And we note that an impulse response is the integration of the step response.

I think you meant the other way around.

In control software generally you don't need to include $T$ in discrete transfer functions. The software takes care of it by the dt keyword. So if you want a discrete backwards euler integrator tf(1, [1, 0], dt=dt) is sufficient and it will arrange things for you (I haven't checked it but should). Hence you don't need to add it yourself or if you want to model everything then you should keep track of $T$ everywhere.

Note that if this is an integrator, then either it is your interpretation since you already have the information that it is linked to continuous time integrator or it is an information that you have beforehand. However suppose someone hands you a Tustin approximation of it $\frac{T}{2} \frac{z+1}{z-1}$ and did not tell you that, then you would not know if it is an integrator or something else. Hence we have to be a bit careful about talking about continuous equivalences and behaviors and etc.

I am not suggesting that your argument is wrong or inaccurate but I am trying to portray how the convention is typically constructed.