while digital controllers update at sample times tk=kTs,
xk+1=Ad(p,Ts)xk+Bd(p,Ts)uk+Ed(p,Ts)dk.
Under a zero-order hold,
Ad=eATs,Bd=∫0TseAτBdτ.
Discretization is therefore not a clerical conversion. Sampling time interacts with plant eigenvalues, actuator bandwidth, delay, estimator quality, computational cost, and the number of decision variables in an optimal-control transcription.
A lighter or more flexible plant may introduce a faster mode. The old sample time can then become inadequate. A faster controller may require a more expensive processor or sensor, increasing power and cost. If sample time is fixed while the plant changes, the optimizer may select a design that is acceptable in the continuous model but unstable or poorly damped when implemented.
For a rough rule, the sample frequency should exceed the important closed-loop bandwidth by a comfortable factor. The correct factor depends on delay, filtering, phase margin, and implementation method; it must be verified rather than assumed.
import numpy as np
from scipy.signal import cont2discrete
m, c, k = 2.0, 8.0, 120.0
A = np.array([[0.0, 1.0], [-k/m, -c/m]])
B = np.array([[0.0], [1.0/m]])
C = np.eye(2)
D = np.zeros((2, 1))
for Ts in (0.001, 0.01, 0.05):
Ad, Bd, _, _, _ = cont2discrete((A, B, C, D), Ts, method="zoh")
print(f"Ts={Ts:0.3f} s, discrete poles={np.linalg.eigvals(Ad)}")
m = 2; c = 8; k = 120;
A = [0 1; -k/m -c/m];
B = [0; 1/m];
sysc = ss(A,B,eye(2),zeros(2,1));
for Ts = [0.001 0.01 0.05]
sysd = c2d(sysc,Ts,'zoh');
fprintf('Ts = %.3f s, max pole magnitude = %.5f\n', ...
Ts,max(abs(eig(sysd.A))));
end
Simulation and optimization time steps serve different purposes. A simulation step must resolve dynamic behavior accurately. A controller sample time defines information and command updates. A transcription mesh also controls optimization accuracy. These can differ, but each needs a convergence study.