How to prove stability of discrete time system

I am simulating the following discrete time feedback system:

Feedback

How can I prove that it is stable for

K_\mathrm{u} < 2 \frac{1}{T_\mathrm{s} K_2}

?

Code:

using ControlSystemsBase

Ts = 0.01
Ku = 100/5e6
K2 = 5e6

num = [Ku * Ts]
den = [1, -1]
P = tf(num, den, Ts) # plant, the integrator

C = K2               # controller, a constant gain
sys = feedback(P, C)

Output of the command margin:

julia> margin(sys)
(wgm = [NaN;;], gm = [Inf;;], wpm = [NaN;;], pm = [Inf;;])

Does not look like a good answer…

isstable(sys)

Your question relates to introductory control theory, any basic textbook on the subject will provide the background you need. You check the roots of the characteristic polynomial. You can prove that sys is stable for twice the gain of what you have indicated with your bound.

You also compute the margin of the wrong system, you compute margins on open-loop systems.

Fixed.