Robotics · Analysis and simulation · 24 September 2026
Abstract: control frequency is part of the design
A proportional-derivative controller can stabilize a continuous model yet fail when updated at discrete intervals. We study an ideal force-controlled mass, derive the exact held-command map, and determine the sampling interval ensuring asymptotic stability in the model. We then compare this map with forward Euler and a one-sample delay. The goal is to understand which system we are actually analyzing before trusting a simulation plot.
The analysis requires linear differential equations, 2×2 matrices, and eigenvalues. It is neither a new robotics algorithm nor an industrial benchmark: it is an educational derivation with executed code, relevant to motion axes and local manipulator models. It excludes contact, friction, elasticity, saturation, and certification. This simplicity isolates sampling effects without mixing them with the kinematics of a complete robot.
1. Mass, force, and gains: units first
Let q be displacement from the reference in meters, v velocity in m/s, m mass in kg, and u force in newtons. The reference is constant and set to zero. Assume exact position and velocity measurements and an ideal actuator. Gain k_p has units N/m and k_d has units N·s/m. A sign error is decisive: proportional force must oppose displacement and derivative force must oppose velocity.
In continuous time, m>0, k_p>0, and k_d>0 yield poles with negative real parts. For m=1 kg, k_p=100 N/m, and k_d=10 N·s/m, the polynomial is s²+10s+100 and the poles are −5 ± j√75 s⁻¹. Natural frequency is 10 rad/s and damping ratio is 0.5. The system converges with oscillations. This result concerns a force continuously changing with state, not a force frozen between readings.
2. Integrating the plant with a held command
The digital controller reads q_k and v_k at t_k=kh, computes u_k, and holds this force for h seconds. This is a zero-order hold, ZOH. Acceleration is constant between samples, allowing integration without numerical approximation: velocity changes linearly and position quadratically. The h²u_k/(2m) term is essential; removing it changes the map. MathWorks documentation explicitly distinguishes this exact discretization for staircase inputs from alternative approximations.
The matrix entries do not all share units: the upper-right entry multiplies velocity to produce position and therefore has time units; the lower-left entry has units s⁻¹. Eigenvalues are dimensionless and describe evolution between samples. Changing from meters to millimeters changes the state representation, not the eigenvalues of a consistently rescaled transformation.
3. An exact condition, not a rule of thumb
Asymptotic stability of a discrete linear system requires every eigenvalue strictly inside the unit circle. We use the quadratic Jury criterion presented in Kamran Iqbal’s textbook and apply it to our example. Let τ be the trace and δ the determinant of A_h. The characteristic polynomial is z²−τz+δ. The following three inequalities are necessary and sufficient for real coefficients; equality does not give asymptotic stability.
The first constraint holds automatically for positive h and k_p. The second bounds the period relative to derivative gain, and the third relative to the gain ratio. Both bounds have units of seconds. For our parameters both equal 0.2 s. The delay-free model is therefore asymptotically stable for 0<h<0.2 s. We are not recommending robot control at 5 Hz: we have calculated a boundary for this ideal mass and these gains.
A less intuitive consequence concerns k_d: increasing it does not indefinitely extend the permissible period. Bound 2k_d/k_p grows, but 2m/k_d shrinks. At fixed m and k_p, their minimum is maximized where they meet, k_d=√(mk_p). Here that is 10 N·s/m. This optimizes the model’s sampling margin, not transient response, noise, or accuracy; different objectives can favor different gains.
4. The boundary and false comfort from an eigenvalue
Exactly at h=0.2 s, the matrix is [[−1,0],[−20,−1]]. It has a double eigenvalue −1 but is not diagonalizable. Writing A=−I+N with N²=0 gives A^k=(−1)^k(I−kN). A term grows linearly with k. A spectral radius of one therefore does not imply all trajectories remain bounded. With nonzero initial q, velocity alternates sign and grows in magnitude.
Near this boundary, floating-point arithmetic and nearly coincident eigenvalues make a tolerance-free automatic comparison misleading. In the run, the computed boundary value is about 1.000000024. We do not interpret it as a new physical threshold: the analytical result determines the edge case. The script excludes the boundary from its binary grid check and compares the other 299 positions against the derived inequality.
5. Why Euler gives a different answer
Forward Euler on the continuous closed-loop system uses E_h=I+hA_c. In our example its discrete poles are 1−5h ± j√75h; their squared modulus is 1−10h+100h². The condition becomes 0<h<0.1 s, half the ZOH limit. At h=0.15 s, Euler is unstable while the held-force mass is stable. This is not a contradiction: the approximate integrator and the sampled physical system have different matrices.
Even exactly discretizing the whole continuous loop with exp(A_c h) answers another question: it returns samples of feedback that keeps updating between readings. Since the continuous poles are stable, their exponentials remain inside the unit circle for every positive h. Concluding that the digital controller is stable for every period would be wrong. Discretize the plant with held input, then close the sampled feedback loop.
6. One sample of delay changes the model order
Suppose the newly computed command is applied only at the next sample. Force during the current interval is u_(k−1). The state must remember this force: y_k=[q_k,v_k,u_(k−1)]ᵀ. The model becomes third order. Subtracting a constant from frequency or reusing the previous boundary is insufficient; the new matrix must be analyzed. Here delay is exactly h, with no jitter or fractional delay.
The numerical comparison shows a substantial effect: at h=0.1 s the delay-free spectral radius is about 0.707, while one-sample delay raises it to about 1.441. A stable choice in the first model becomes unstable in the second. This is not a delay measurement from a real bus or AI runtime; it is controlled sensitivity obtained by changing one structural assumption.
| h (s) | Exact ZOH | Euler | Delay h |
|---|---|---|---|
| 0.02 | 0.905539 | 0.916515 | 0.914089 |
| 0.1 | 0.707107 | 1.000000 | 1.440965 |
| 0.15 | 0.790569 | 1.322876 | 1.848672 |
| 0.18 | 0.905539 | 1.562050 | 2.082966 |
| 0.2 | 1.000000 | 1.732051 | 2.236068 |
| 0.22 | 2.014344 | 1.907878 | 2.387195 |
7. Experiment, transients, and reproducibility
The code uses Python 3.14.0 and NumPy 2.5.3, without randomness. The grid contains 300 periods from 0.001 to 0.300 s. Trajectories start at q_0=0.01 m and v_0=0, run to the last sample within three seconds, and use h in {0.02, 0.15, 0.22} s. No ODE is integrated with a hidden step: each update uses the exact map directly. Figures use Matplotlib 3.11.2.

The unstable case can reach enormous displacements because the model allows unlimited force and travel. Those values are not predictions of real motion: they show recurrence divergence and that local assumptions would soon cease to represent a machine. Stable cases can still have substantial transients. Spectral radius determines asymptotic behavior, not maximum error or effort. Comparing radii across periods also requires care: one sample does not represent the same physical duration.
import numpy as np
m, kp, kd = 1., 100., 10.
for h in [.02, .1, .15, .18, .2, .22]:
A = np.array([[1-h*h*kp/(2*m), h-h*h*kd/(2*m)],
[-h*kp/m, 1-h*kd/m]])
print(h, max(abs(np.linalg.eigvals(A))))
8. What changes when AI enters the loop
A vision model updating a reference slowly differs from a model directly closing the force loop. The first can separate slow planning from fast regulation; in the second, inference latency becomes part of control dynamics. Interpreting an experiment requires specifying where the AI model sits, when its output becomes available, and which command stays active during the wait. Mean inference time alone does not describe this sequence.
Velocity noise, filters, jitter, missed samples, mass variation, saturation, and contact remain to be analyzed. For example, filtering velocity reduces some noise components but introduces states and delay; the two-state formula cannot be applied automatically. Likewise, variable h gives products of different matrices; checking each matrix separately does not generally prove product stability. These are distinct problems requiring dedicated models and experiments.
Industrial and collaborative robotics is a direction EL-AI intends to explore. This article contributes an analytical method without attributing installed robots or hardware results to the company. The practical conclusion is to write down the measurement-computation-application sequence, derive its map, and verify that map’s stability and transients. A convincing simulation of the wrong system still answers the wrong question.
Sources, code, and editorial limits
Kamran Iqbal, Stability of Sampled-Data Systems (2023). MathWorks, Continuous-Discrete Conversion Methods.
Sources accessed 24 September 2026. Derivation and example developed for this article with AI assistance; no peer review or certification claimed. Code, results, and instructions. JSON data. Illustrative ImageGen cover: not an actual EL-AI machine or site.

