Long story short, I'm simulating the behavior of a ropes for fun. I have a discrete model of a mass/spring/damper network that I've made and runs discrete simulations on it, no solver involved. Actually, it's a RLC network since I'm an electrical engineer, but I'll map the variable at the end.
For optimization purpose, I wanted to have the biggest timestep possible, which would be the biggest timestep that would guarantee stability. I'm pretty close to the answer, but I am stuck at the very end with a condition that I know is irrelevant, but can't prove it.
It goes as follow. I have my transfer function:
$$ H(z)=\frac{i}{V}= \frac{\frac{T}{L} (z^2-z )}{z^2+(\frac{T^2}{LC}+\frac{RT}{L}-2)z+(1-RT/L)}$$
To be stable, this discrete system must have it's poles within the unit circle. A pole is the value of $z$ that makes the denominator null. Solving the denominator for 0, and considering $L,R,C,T>0$, we can find
$$H(z_p)=0 \rightarrow z_p =\frac{T\sqrt{R^2C^2+2CRT+T^2-4CL} -CRT-T^2+2CL}{2CL}$$
The goal, is to find the value of $T$ that gurantee that $|z_p| \le 1$
I've went pretty far in the development to find 2 conditions.
- $T\le\sqrt{C^2R^2+4LC}-CR$
- $T^4+2CRT^3+\left(R^2C^2-6CL\right)T^2-4C^2LRT+8C^2L^2>0$
I've tested practically the first condition and this seems to be the final answer. The second condition, I don't know what to do with it. I've never been able to get a combination of values that makes it false. So I think it can be discarded somehow, but haven't found how. I'm sure there is a way of proving that it is less restrictive that condition 1.
Any help with that would be appreciated.
R,L,C,T are all positive reals values. $z_p$ could be complex.
My work is here (valid 30 days) : https://easyupload.io/m3aw35
It is actually not always positive.
Note that the expression $$ T^4+2CRT^3+\left(R^2C^2-6CL\right)T^2-4C^2LRT+8C^2L^2 $$ can be written as $$ (TRC-2CL)^2+(T^2-3CL)^2+2(TRC)(T^2)-5(CL)^2 $$ so (dividing by $(CL)^2$ and putting $a=TR/L, b=T^2/(CL)$), you would like to show that $$ (a-2)^2+(b-3)^2+2ab-5>0 $$ for $a,b>0$. Note that, given $a,b>0$, we can always choose $C=L=1$, put $T=\sqrt b$ and $R=a/\sqrt b$, so we haven't lost anything yet. The first condition can be rewritten as $T^2+2TRC\le 4CL$, i.e., $2a+b\le 4$.
Now just take $a=0.01, b=3$. The first condition will be satisfied but the second one will fail.
Edit Below is (I hope) a correct analysis of the quadratic equation.
In terms of $a,b$, the question is when the quadratic equation $f(z)=z^2+(a+b-2)z+(1-a)=0$ has no roots outside the open unit disk for $a,b>0$.
If the roots are complex, then they are complex conjugate, so, since their product $1-a$ is less than $1$, they are both less than $1$ in absolute value. Thus we are afraid only of the real roots.
If $f(1)$ or $f(-1)$ is $\le 0$, we have a real root outside the open unit interval by the intermediate value theorem (on the ray going to $+\infty$ or $-\infty$ respectively). Thus $f(1)>0$ and $f(-1)>0$ are necessary conditions. On the other hand, they are also sufficient for the absence of real roots outside $(-1,1)$. Indeed, neither $1$, nor $-1$ can then be between the roots, so if a real roots outside $(-1,1)$ exists, both roots should be on the same side of $(-1,1)$, making their product at least $1$, which is impossible since it is $1-a<1$. Thus, we just need to check that $f(1)=1+(a+b-2)+1-a=b>0$, which is always true, and $f(-1)=1-(a+b-2)+1-a=4-2a-b>0$, which is equivalent to your condition 1. So condition 1 is, indeed, necessary and sufficient for stability.