Near-Optimal PID Tuning for Uncertain Nonlinear Systems

Short answer: PID gains can be tuned toward an optimum with a stability guarantee, within stated limits. A 2026 paper by Jingru Zhu, Cheng Zhao and Lei Guo tunes PID gains for a class of uncertain second-order nonlinear systems using only measured values of a performance cost, with no gradients and no exact plant model. [1] Every candidate is kept inside a stability region proven in the authors' earlier work, so the closed loop stays stable throughout tuning. [1][2] Their HRS-KW algorithm, which combines a hysteretic random search with the Kiefer-Wolfowitz finite-difference method, converges almost surely to gains whose cost is within a chosen tolerance ε of the best cost in a bounded feasible set. [1] The guarantee covers that set and the stated system class; it is not a promise of the best possible PID for any plant.
What the paper covers
"Towards Guaranteed Optimal PID Tuning for Uncertain Nonlinear Systems" was posted to arXiv on 3 June 2026 (arXiv:2606.04787). The arXiv listing notes that it was accepted by the IFAC World Congress 2026. [1]
- Plant class. Second-order multi-input multi-output systems, x1' = x2 and x2' = f(x1, x2, u) with output y = x1, where f is an uncertain, continuously differentiable function. [1]
- Controller. A classical PID, u = Ki ∫e dt + Kp e + Kd e', with e = y* - y. The paper writes the gains as K = [k0, k1, k2], which correspond to [Ki, Kp, Kd]. [1]
- Objective. Drive the output to a setpoint while minimizing a finite-horizon cost J that penalizes output error and control effort, plus a terminal cost on the final error. The cost only has to be nonnegative and continuous; a quadratic LQR-style cost is one example. [1]
- Information available to the tuner. Only the value of J for a given set of gains. Gradients and Hessians cannot be computed, because f is uncertain and the cost functions may be unknown. [1]
Where the stability guarantee comes from
The method builds on Zhao and Guo's 2022 Automatica paper, which constructs an explicit, unbounded three-dimensional set of PID gains that makes this class of uncertain systems globally stable, with the regulation error converging to zero exponentially fast. [2] The conditions are bounds on how strongly f can depend on the state and a lower bound on how strongly the input acts: the Jacobian norms with respect to x1 and x2 are at most L1 and L2, and the symmetric part of the input Jacobian is at least b times the identity. [1]
Random search needs a bounded region to sample from, so the tuner works on a compact inner approximation S of that stability region: gains with norm at most R that satisfy the stability inequalities with a margin r. [1] Every candidate the algorithm evaluates is drawn from or projected onto S, which is why stability holds during tuning and not only at the end. [1]
How HRS-KW tunes the gains
- Gradient estimate. The Kiefer-Wolfowitz step estimates the gradient of J by finite differences, perturbing each gain up and down by a small constant c. [1]
- Two candidates per iteration. A gradient candidate takes a step of size α against the estimated gradient and is projected back onto S; a random candidate is drawn uniformly from S. [1]
- Hysteretic acceptance. The better candidate replaces the current gains only if it lowers J by at least ε/2; otherwise the gains stay unchanged. [1]
The authors prove that, for any stabilizing starting gains, the gains converge almost surely to a point whose cost is at most the best cost in S plus ε, without assuming that J is convex. [1] They show the convexity assumption would fail even for a linear plant with a quadratic cost, which is why a purely local gradient method can stall. [1] The random search provides global exploration, and the authors attribute the global convergence mainly to it. [1]
A check you can reproduce
The paper's first simulation is fully specified, so you can rerun it. [1]
| Item | Value in the paper |
|---|---|
| Plant | x1' = x2, x2' = 2 sin(x1) + x2 + u, y = x1 |
| Cost | J = ∫ (e² + u²) dt over 0 to 5 s |
| Setpoint and initial state | y* = 1, x(0) = [3, 2] |
| Feasible set S1 | norm of [Ki, Kp, Kd] at most 20, Ki ≥ 0.001, Kp ≥ 2.001, (Kp - 2)(Kd - 1) ≥ Ki + 0.001 |
| Starting gains [Ki, Kp, Kd] | [8, 8, 8] |
| Algorithm settings | c = 0.001, α = 0.01, ε = 0.0001 |
| Reported result | [1.1097, 2.4056, 3.7384], J = 30.9969, reached in about 250 iterations |
We re-simulated this case with a fourth-order Runge-Kutta solver and a 0.0001 s step. The reported gains give J = 30.9965, matching the published 30.9969, and the starting gains [8, 8, 8] give J = 89.02. Two further observations from the same run:
- Optimal for the stated cost, not for tracking. With the reported gains the output is still at 0.46 at the end of the 5 s window (it reaches 1.003 by 30 s), while the starting gains are at 1.21. Because the cost weights control effort as heavily as error over a short horizon, the cheapest gains move slowly. Choose the cost and horizon to match what the loop actually has to do.
- The optimum sits on the boundary of S1. For the reported gains, (2.4056 - 2)(3.7384 - 1) = 1.1107, equal to Ki + 0.001. The authors note that their stability condition is only sufficient and that a larger stability region would keep better gains from being overlooked. [1]
In a second example (x2' = x1 - x1³ - 0.2x2 + u), the authors report that plain Kiefer-Wolfowitz became trapped at a local minimum of J = 12.2430, which they use to show why the random search step is needed. [1]
What this means for your own loop
The points below are our reading of the paper for engineers tuning similar loops.
- Check the plant class first. The guarantee needs a second-order structure, bounds L1, L2 and b, and an input that acts in a known direction. Bounding these honestly for your plant is the hard part. For multi-channel systems, see extended PID design for nonlinear multivariable systems.
- Count the experiments. Each iteration needs the cost from six perturbed runs for the gradient estimate plus the two candidates, about eight closed-loop runs from the same initial state, which is easy in simulation and expensive on hardware.
- Write the cost you mean. As the reproduction shows, the result is optimal for J and nothing else.
- Compare tuners on the same plant and cost. For a broader comparison of optimization-based tuning, see comparing optimization methods for PID tuning.
- Treat digital implementation separately. The guarantee is for continuous-time PID; for sampling effects, see sampled-data PID design for uncertain planar nonlinear systems.
Limits
- The guarantee is ε-optimality over the compact set S, not over every stabilizing gain. [1]
- The stability region used is a sufficient condition; a necessary and sufficient condition is given only for a narrower single-input class. [1]
- The choice of ε affects both convergence speed and the final cost, and the authors list convergence speed and parameter design as future work. [1]
- Results are numerical simulations; no hardware tests are reported. [1]
- A qualified engineer still has to review any controller before it runs on real equipment.
Key takeaways
- HRS-KW tunes PID gains from cost values alone and keeps every candidate inside a proven stability region. [1]
- It converges almost surely to within ε of the best cost in the feasible set, without assuming convexity. [1]
- The paper's first example reproduces: J = 30.9965 against the published 30.9969.
- Optimal means optimal for the chosen cost, horizon and feasible set, so define those carefully.
Frequently asked questions
Can PID tuning be guaranteed optimal for an uncertain nonlinear system?
For the class in Zhu, Zhao and Guo's 2026 paper, yes in a limited sense: their HRS-KW algorithm converges almost surely to gains within ε of the best cost in a bounded set of gains that is proven to stabilize the system. [1]
What is the HRS-KW algorithm?
It combines a hysteretic random search over the feasible gain set with Kiefer-Wolfowitz finite-difference gradient steps, and accepts a new candidate only if it lowers the cost by at least ε/2. [1]
What must the plant satisfy?
A second-order structure with an uncertain, continuously differentiable f, bounded sensitivity to the states (L1 and L2), and an input effect bounded below by b. These bounds define the stability region the tuner searches. [1][2]
Does the method need a plant model?
It does not need the structure of f or gradients of the cost, only cost values from closed-loop runs. It does need the bounds L1, L2 and b to build the stability region. [1]
Sources
- Zhu, J., Zhao, C., and Guo, L. "Towards Guaranteed Optimal PID Tuning for Uncertain Nonlinear Systems." arXiv:2606.04787 (2026). https://arxiv.org/abs/2606.04787
- Zhao, C., and Guo, L. "Towards a theoretical foundation of PID control for uncertain nonlinear systems." Automatica 142 (2022): 110360. https://doi.org/10.1016/j.automatica.2022.110360
If you have a model or IO data for one of your own loops, LabCD's guided workflow lets you tune and test a controller on your first model for free, with a qualified engineer approving every controller.
Want to try this on your own plant model?
Try LabCD free with your first model