Work out control loop sample time instantly with clear inputs, formula shown and shareable results.
A digital loop should sample at least ten times per process time constant and about twenty times the desired closed-loop bandwidth, and at least twice per dead time. Sampling too slowly adds effective dead time of half a sample period, which directly erodes phase margin.
Sample time
Ts <= tau/10, Ts <= 1/(20 x closed-loop bandwidth), Ts <= theta/2
Zero-order hold adds an effective dead time of half the sample period. Extra dead time reduces phase margin, and enough of it makes the loop oscillate.
Beyond about twenty times bandwidth there is little benefit, and derivative action starts amplifying quantisation noise. Filter the measurement instead.