REVIEW 3 major objections 5 minor 33 references
Synthesis and SOS-based Stability Verification of a Neural-Network-Based Controller for a Two-wheeled Inverted Pendulum
T0 review · 3 major / 5 minor · reviewed 2026-08-05 · deepseek-v4-flash
Pith's one-line read A neural network controller trained to imitate a tube-based MPC is proven locally asymptotically stable by sum-of-squares verification, and on a physical two-wheeled inverted pendulum it stabilizes the system and outperforms a baseline LQR.
desk verdict A solid first hardware application of exact-ReLU SOS verification, but the certificate covers the linearized full-state model, not the estimator loop that actually ran, so the abstract's 'proven LAS' overstates the formal result. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing mechanism is the exact semialgebraic encoding of the ReLU network. A single ReLU neuron y = max(0, wᵀx + b) has a graph described by three polynomial (in)equalities (y ≥ 0, y − wᵀx − b ≥ 0, and y(y − wᵀx − b) = 0), and composing these across layers yields an exact description of the network's input-output relation on the set Q̄, plus of the composed loop L = φ ∘ f̄ ∘ (id, φ). Because these sets are semialgebraic, the Lyapunov decrease condition becomes a constraint enforceable by sum-of-squares polynomials, i.e., by a semidefinite program. The same encoding lets the second program certify that the found sublevel set L_γ(V) lies inside Q̄. This exactness is what distinguishes
What would settle it
Replace the linearized model (20) in the SOS loop description with the full nonlinear closed loop of Section II, including the deadband (5), backlash residual, and the estimator of Section III, and re-run programs (55) and (57): infeasibility, or any simulated trajectory starting inside the certified sublevel set L_γ(V) with γ = 1.95 that exits it, would show the certificate does not apply to the physical demonstrator. A hardware-compatible version: start the robot inside the certified RoA with a deliberately biased attitude estimate and observe whether the state leaves the certified set.
Extended reading notes
Core claim
On its own terms: the SOS-based stability verification of Refs. [12], [13], which models the ReLU network's input-output map exactly as a semialgebraic set, can certify useful stability properties for a practically implemented NNC. For the closed loop x̄⁺ = Āx̄ + B̄φ(x̄) (scaled linearized model (20) plus trained ReLU network φ), two SOS programs find a Lyapunov function V with strict decrease over Q̄ = {x̄ : α − x̄ᵀQ̄x̄ ≥ 0} and then the largest sublevel set L_γ(V) ⊆ Q̄. With α = 1.5 and γ = 1.95, V certifies local asymptotic stability, and L_γ(V) is a certified inner estimate of the region of attraction. Experiments on the physical robot show the NNC stabilizes the demonstrator and outperf
Load-bearing premise
The stability proof applies to a simplified linear model of the robot with perfect state information; the real robot's controller gets an estimated state, and unmodeled backlash, voltage deadband, and yaw motion could carry the system outside the certified region.
Editorial extensions
If this is right
- A small ReLU network can replace a tube-based MPC that is too computationally demanding for the embedded hardware, and the replacement carries a formal certificate of local asymptotic stability plus an inner region-of-attraction estimate.
- The certified region (γ = 1.95 for α = 1.5) is large enough to cover the states used in the physical experiments, giving the guarantee practical rather than symbolic value.
- In five regulation and five reference-tracking runs, the NNC improves average RMSE of position and CoG position over the LQR (e.g., xw RMSE drops from 2.79e−2 to 1.68e−2 m in regulation), while velocity and pitch-rate RMSE are larger, consistent with the learned MPC's more aggressive nonlinear behavior.
- The a posteriori comparison of Fig. 10 shows the NNC's deviation from the MPC law mostly stays within the 0.075 V disturbance bound assumed during tube-MPC design, supporting the validity of that design parameter.
- The controller output modifications (deadband compensation, active yaw control, feedforward) are what allow the real platform to match the planar, deadband-free model that the certificate applies to.
Reading between the lines
- A step the paper leaves open: the certificate covers only the nominal linearized plant with the true state as input, so folding the estimator and an error bound into the semialgebraic loop model is the natural path to a guarantee for the implemented loop.
- Because the SOS problem size scales with the number of ReLU neurons and their lifted activations, a plausible trade-off emerges between imitation fidelity (more piecewise-linear regions) and verifiability (smaller networks); retraining the same MPC with different widths and comparing the certified γ would test this.
- The comparison on the robot is against an LQR, but the certificate itself is never exercised at the RoA boundary in the experiments; a deliberate boundary-disturbance test would probe whether the certified set is tight under the unmodeled dynamics.
- The synthesis recipe (softened feasible set for data generation, output-layer correction enforcing φ(0) = 0, ReLU saturation layers) reads as a general template: any expensive stabilizing policy that can be sampled could seed a certified cheap network, including policies found by reinforcement learning.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents an end-to-end pipeline for a two-wheeled inverted pendulum (the Sigi platform): a nonlinear model (1)-(5), a state estimator (Section III), parameter identification and linearization to a control-oriented LTI model (20), and the synthesis of an LQR, a robust tube-based MPC, and a neural-network controller (NNC) that imitates the MPC (Section V). The main claimed contribution is an SOS-based verification of local asymptotic stability and an inner estimate of the region of attraction for the closed-loop system consisting of the NNC and the model (Section VI). The authors report a feasible SOS certificate with parameters α=1.5 and γ=1.95 (Section VII-B), and they provide experimental comparisons showing that the NNC outperforms a baseline LQR in regulation and reference-tracking tasks.
Significance. If the stability certificate applied to the physical closed-loop demonstrator, this would be a valuable first demonstration of SOS-based verification of a neural-network controller on a real-world problem. The paper has notable strengths: the ReLU network is modeled exactly through its semialgebraic graph, the SOS problems are solved with standard tools (SOSTOOLS/MOSEK), the identified model parameters are reported, and the experimental protocol is transparent. However, the certificate is computed for the scaled linearized model with exact full-state feedback, not for the implemented loop with the state estimator, yaw control, deadband compensation, and unmodeled nonlinearities. This gap is load-bearing because the paper's central claim—that the physical two-wheeled inverted pendulum is proven LAS under the NNC—is stronger than what the formal analysis establishes. The theoretical backing also depends on an unreviewed preprint [29], which supplies the two-step SOS Lyapunov argument. The experimental results are useful empirical evidence but do not close the formal gap.
major comments (3)
- [Section VI, Eq. (44); Section V-D; Fig. 3] The SOS certificate is obtained for the scaled LTI system x̄⁺ = Āx̄ + B̄φ(x̄) with exact full-state feedback x̄. In the implemented loop, the controller receives the estimated state x̂ from the estimator of Section III, and the control signal is modified by feedforward, active yaw control, and deadband compensation as in Eqs. (40)-(41) and Fig. 3. The statement in Section V-D that these modifications 'allow the assumptions of the control-oriented model of (20) to be met' is not supported by any quantitative bound on ||x̂−x||, any model of the residual deadband/backlash/yaw dynamics, or any argument that trajectories of the true closed loop remain inside L_γ(V). Consequently, the formal certificate does not apply to the implemented loop, and the conclusion in Section VIII that 'the two-wheeled inverted pendulum is proven to be LAS under this NNC' overstates what is proved.
- [Section V-D; Section VII-C] The verified closed-loop system is autonomous and regulation-oriented: x⁺ = f(x, φ(x)). The experimental reference-tracking task, however, uses a nonzero feedforward u_ff(k) and an active yaw controller that are not part of the certified dynamics. Even if the certificate correctly covers the nominal model, it does not certify stability or performance of the time-varying tracking loop. The empirical tracking results are not backed by the formal RoA result, and the paper should either extend the analysis to the tracking loop or clearly separate the verified claim (regulation of the nominal model) from the empirical demonstration.
- [Section VI, paragraphs after Eq. (57); Reference [29]] The proof that solving SDP (55) and then SDP (57) in succession yields a valid Lyapunov function in the sense of Definition 6.3 is delegated to the authors' unpublished preprint [29]. In particular, the text acknowledges in Section VI-B that functions parameterized by (53) 'are not necessarily candidate Lyapunov functions satisfying (42a) and (42b)', but the conditions under which the chosen bases of Table IV ensure V(0)=0 and positive definiteness are not stated. For a journal submission, the relevant theorem or a complete proof sketch should be included, or the dependency on [29] should be made explicit with the exact propositions used.
minor comments (5)
- [Tables V and VI] There are typographical artifacts in the numerical entries, e.g. '1.68eee−2' and 'e−2' formatting. Please ensure all table entries are rendered consistently.
- [Section V-C.3] The description of the two additional ReLU neurons implementing the ±2.0 V saturation is too terse; the reader cannot reconstruct the exact network weights or verify that the saturation is exactly min(max(u,−2),2). Please provide the layer equations or explicitly state the construction.
- [Section VI-D] The two-step SOS procedure's computational cost is not reported. Since one of the paper's claims is practical value, a statement of solver times and problem sizes would strengthen the exposition.
- [Section III-A, Eq. (7)] The notation B⃗ω B/I in (7) is used before its precise relation to the gyroscope measurement and the calibration procedure is described; consider reordering for clarity.
- [Section VII-C] Only five runs per controller are reported, with no statistical variability measures such as standard deviation or confidence intervals. Given the hardware variability, a brief statement of run-to-run variation would help interpret the RMSE/MAE comparisons.
Circularity Check
No circular derivation: the SOS certificate is an SDP output for the exact ReLU network on the nominal LTI model; the only self-dependency is a same-author methodology preprint [29], which is not a reduction of the claimed result to its inputs.
full rationale
The derivation chain is self-contained in the relevant sense: the authors build the control-oriented LTI model (20), synthesize an MPC, train a ReLU NNC to imitate it, and then verify the actual NNC by solving SOS SDPs (55) and (57). The Lyapunov function V and the invariant sublevel set L_gamma(V) are decision variables/outputs of those feasibility problems, not quantities fitted to the stability conclusion. The ReLU network is represented exactly through the graph constraints (47)-(51), so the verification does not rely on the MPC's assumed disturbance bound |w|max=0.075V; that bound is used only to design the tube-MPC and later checked a posteriori in Fig. 10, not to certify the NNC. No equation reduces by construction to an input: (44) is just a coordinate scaling of the nominal LTI model, and (58) fixes the region Q from the linearization as standard preprocessing, not as a predetermination of V. The only self-referential element is citation [29], a same-author unreviewed preprint used for the improved SOS formulation and for the standard implication that a decreasing V on Q together with an invariant sublevel set yields local asymptotic stability. Because that implication is generic and the SOS conditions are stated explicitly in Sections VI-B and VI-C, the application claim does not reduce to the self-citation. I also flag, as a scope limitation rather than circularity, Section V-D's assertion that the output modifications "allow the assumptions of the control-oriented model of (20) to be met" and the fact that the certificate covers only the nominal LTI model with exact full-state feedback, not the estimator loop, yaw dynamics, backlash, or deadband residual of the implemented demonstrator. That gap affects the strength of the physical-system claim but is not a circular derivation.
Assumptions & free parameters
free parameters (10)
- Motor constant K =
1.45e-3 N m A^-1
- Motor resistance R =
8.82 ohm
- Pendulum moment of inertia Jp =
3.76e-4 kg m^2
- Pendulum CoG offset lc =
0.01 m
- Voltage deadband u0 =
0.625 V
- Disturbance bound W =
|w|max = 0.075 V
- State estimator gains =
(tau_phi,k_phi)=(1,0.1), (tau_theta,k_theta)=(0.5,0.01), (tau_psi,k_psi)=(1,0.1); cutoffs in Table II
- MPC design parameters =
Npred=30, rho=0.815, rho_eps=5e3, bounds in Table III
- LQR weights =
x^TQx=25 xCoG^2 + 25 xdotCoG^2, u^TRu=7.5 u^2
- Tube controller and invariant set =
Ktube, Ptube, delta_tube from (30)-(32)
assumptions (8)
- standard math The ReLU graph semialgebraic description (47) is exact
- standard math SOS relaxation with the selected multipliers proves nonnegativity over the semialgebraic set
- domain assumption Planar, rigid-body, no-slip, no-backlash, instantaneous motor inductance model
- domain assumption Deadband compensation (41) and active yaw control enforce the control-oriented model assumptions
- domain assumption Full-state feedback from the estimator equals the true state
- domain assumption The NNC training set is representative and the NNC is a sufficiently close imitation of the MPC
- domain assumption The linearized model (20) is valid within the certified region of attraction
- domain assumption Numerical SDP solutions from SOSTOOLS/MOSEK are exact enough
Cite this review
Pith. "Pith review of Synthesis and SOS-based Stability Verification of a Neural-Network-Based Controller for a Two-wheeled Inverted Pendulum." pith.science (2026). https://pith.science/paper/OM6BXN6X
@misc{pith2026250815616,
author = {Pith},
title = {Pith review of: Synthesis and SOS-based Stability Verification of a Neural-Network-Based Controller for a Two-wheeled Inverted Pendulum},
year = {2026},
howpublished = {\url{https://pith.science/paper/OM6BXN6X}},
note = {Machine review of arXiv:2508.15616}
}
read the original abstract
This work newly establishes the feasibility and practical value of a sum of squares (SOS)-based stability verification procedure for applied control problems utilizing neural-network-based controllers (NNCs). It successfully verifies closed-loop stability properties of a NNC synthesized using a generalizable procedure to imitate a robust, tube-based model predictive controller (MPC) for a two-wheeled inverted pendulum demonstrator system. This is achieved by first developing a state estimator and control-oriented model for the two-wheeled inverted pendulum. Next, this control-oriented model is used to synthesize a baseline linear-quadratic regulator (LQR) and a robust, tube-based MPC, which is computationally too demanding for real-time execution on the demonstrator system's embedded hardware. The generalizable synthesis procedure generates an NNC imitating the robust, tube-based MPC. Via an SOS-based stability verification procedure, a certificate of local asymptotic stability and a relevant inner estimate of the region of attraction (RoA) are obtained for the closed-loop system incorporating this NNC. Finally, experimental results on the physical two-wheeled inverted pendulum demonstrate that the NNC both stabilizes the system, and improves the control performance compared to the baseline LQR in both regulation and reference-tracking tasks.
Reference graph
Works this paper leans on
-
[29]
Improved sum-of- squares stability verification of neural-network-based controllers,
A. Detailleur, G. Ducard, and C. Onder, “Improved sum-of- squares stability verification of neural-network-based controllers,” arXiv preprint, 2025. [Online]. Available: https://arxiv.org/abs/2507.10352
arXiv 2025
-
[1]
Neural networks for control systems—a survey,
K. J. Hunt, D. Sbarbaro, R. ˙Zbikowski, and P. J. Gawthrop, “Neural networks for control systems—a survey,” Automatica (Oxf.) , vol. 28, no. 6, pp. 1083–1112, Nov. 1992
work page 1992
-
[2]
Universal function approximation by deep neural nets with bounded width and ReLU activations,
B. Hanin, “Universal function approximation by deep neural nets with bounded width and ReLU activations,” Mathematics, vol. 7, no. 10, p. 992, Oct. 2019
work page 2019
-
[3]
Neural networks for fast optimisation in model predictive control: A review,
C. Gonzalez, H. Asadi, L. Kooijman, and C. P. Lim, “Neural networks for fast optimisation in model predictive control: A review,” arXiv preprint, 2024. [Online]. Available: https://arxiv.org/abs/2309.02668
arXiv 2024
-
[4]
G. Norris, G. J. J. Ducard, and C. Onder, “Neural networks for control: A tutorial and survey of stability-analysis methods, properties, and discussions,” in 2021 International Conference on Electrical, Computer, Communications and Mechatronics Engineering (ICECCME) , 2021
work page 2021
-
[5]
A comparison of verification methods for neural-network controllers using mixed-integer programs,
M. Dubach and G. Ducard, “A comparison of verification methods for neural-network controllers using mixed-integer programs,” in 2022 7th International Conference on Robotics and Automation Engineering (ICRAE), Singapore, Nov. 2022, pp. 43–48
work page 2022
-
[6]
Stability verification of neural network controllers using mixed-integer programming,
R. Schwan, C. N. Jones, and D. Kuhn, “Stability verification of neural network controllers using mixed-integer programming,” IEEE Transac- tions on Automatic Control , vol. 68, pp. 7514–7529, June 2023
work page 2023
-
[7]
C. R. Richardson, M. C. Turner, and S. R. Gunn, “Strengthened circle and Popov criteria for the stability analysis of feedback systems with ReLU neural networks,” IEEE Control Systems Letters, vol. 7, pp. 2635– 2640, June 2023
work page 2023
Show all 33 references
-
[8]
Linear systems with neural network nonlinearities: Improved stability analysis via acausal zames-falb multipliers,
P. Pauli, D. Gramlich, J. Berberich, and F. Allgower, “Linear systems with neural network nonlinearities: Improved stability analysis via acausal zames-falb multipliers,” in 2021 60th IEEE Conference on Decision and Control (CDC) , Austin, TX, USA, Feb. 2022, pp. 3611– 3618
2021
-
[9]
Stability analysis using quadratic con- straints for systems with neural network controllers,
H. Yin, P. Seiler, and M. Arcak, “Stability analysis using quadratic con- straints for systems with neural network controllers,” IEEE Transactions on Automatic Control , vol. 67, pp. 1980–1987, Apr. 2022
1980
-
[10]
A convex parameterization of robust recurrent neural networks,
M. Revay, R. Wang, and I. R. Manchester, “A convex parameterization of robust recurrent neural networks,” IEEE Control Systems Letters, vol. 5, pp. 1363–1368, Nov. 2020
2020
-
[11]
Recurrent equilibrium networks: Flexible dynamic models with guaranteed stability and robustness,
——, “Recurrent equilibrium networks: Flexible dynamic models with guaranteed stability and robustness,” IEEE Transactions on Automatic Control, vol. 69, pp. 2855–2870, July 2023
2023
-
[12]
Stability and performance verification of dynamical systems controlled by neural networks: Algorithms and complexity,
M. Korda, “Stability and performance verification of dynamical systems controlled by neural networks: Algorithms and complexity,” IEEE Con- trol Systems Letters , vol. 6, pp. 3265–3270, June 2022. 15 xw / m Regulation task: LQR run 3, NNC run 2 ˙xw / m/sθ / rad˙θ / rad/s t / s...
2022
-
[13]
Stability of non-linear neural feedback loops using sum of squares,
M. Newton and A. Papachristodoulou, “Stability of non-linear neural feedback loops using sum of squares,” in 2022 IEEE 61st Conference on Decision and Control (CDC), Cancun, Mexico, Dec. 2022, pp. 6000– 6005
2022
-
[14]
[Online]
Pololu Balboa 32U4 Balancing Robot User’s Guide, Pololu Corporation, Las Vegas, NV , 2025. [Online]. Available: https://www.pololu.com/ docs/pdf/0J70/balboa 32u4 robot.pdf
2025
-
[15]
Raspberry Pi 3 Model B+ Product Brief,
“Raspberry Pi 3 Model B+ Product Brief,” Raspberry Pi Ltd, Cambridge, United Kingdom. [Online]. Available: https://datasheets. raspberrypi.com/rpi3/raspberry-pi-3-b-plus-product-brief.pdf
-
[16]
SKROSS Reload 10 Battery Bank Datasheet,
“SKROSS Reload 10 Battery Bank Datasheet,” WorldConnect AG, Diepoldsau, Switzerland. [Online]. Available: https://www.interdiscount.ch/static-shops/products/document/ 400b76e38397fe3e4e83bfd42d5f7ea2ef16.pdf
-
[17]
[Online]
Micro Metal Gearmotors , Pololu Corporation, Las Vegas, NV , 2025. [Online]. Available: https://www.pololu.com/file/0J1487/ pololu-micro-metal-gearmotors-rev-4-2.pdf
2025
-
[18]
[Online]
LSM6DS33 Datasheet , Pololu Corporation, Las Vegas, NV , 2025. [Online]. Available: https://www.pololu.com/file/0J1087/LSM6DS33. pdf
2025
-
[19]
[Online]
MATLAB Hardware Support Packages , The MathWorks, Inc., Natick, MA, 2025. [Online]. Available: https://ch.mathworks.com/help/pdf doc/ matlab/supportpkg.pdf
2025
-
[20]
Imple- mentation of a nonlinear attitude estimator for aerial robotic vehicles,
M.-D. Hua, G. Ducard, T. Hamel, R. Mahony, and K. Rudin, “Imple- mentation of a nonlinear attitude estimator for aerial robotic vehicles,” IEEE Transactions on Control Systems Technology , vol. 22, pp. 201– 213, Jan. 2014
2014
-
[21]
J. B. Rawlings, D. Q. Mayne, and M. Diehl, Model predictive control: 16 u / V Error of NNC with respect to MPC - Regulation task (top), Reference-tracking task (bottom) t / s u / V −0.2 0 0.2 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 −0.2 0 0.2 Fig. 10: A...
2017
-
[22]
Theory and computation of dis- turbance invariant sets for discrete-time linear systems,
I. Kolmanovsky and E. G. Gilbert, “Theory and computation of dis- turbance invariant sets for discrete-time linear systems,” Mathematical Problems in Engineering , vol. 4, no. 4, pp. 317–367, Jan. 1998
1998
-
[23]
S. Boyd, L. El Ghaoui, E. Feron, and V . Balakrishnan, Linear matrix inequalities in system and control theory . New York, NY: Society for Industrial & Applied Mathematics, 1994
1994
-
[24]
Bounding and count- ing linear regions of deep neural networks,
T. Serra, C. Tjandraatmadja, and S. Ramalingam, “Bounding and count- ing linear regions of deep neural networks,” in Proceedings of the 35th International Conference on Machine Learning , vol. 80. PMLR, July 2018, pp. 4558–4566
2018
-
[25]
Adam: A method for stochastic optimization,
D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,”
-
[26]
J. P. LaSalle, The stability and control of discrete processes. New York, NY: Springer-Verlag, 1986
1986
-
[27]
On the dynamic model of a two-wheeled inverted pendulum robot,
S. Kim and S. Kwon, “On the dynamic model of a two-wheeled inverted pendulum robot,” in 2014 11th International Conference on Ubiquitous Robots and Ambient Intelligence (URAI), Kuala Lumpur, Malaysia, Nov. 2014, pp. 145–148
2014
-
[28]
Stability and performance verification of optimization-based controllers,
M. Korda and C. N. Jones, “Stability and performance verification of optimization-based controllers,” Automatica (Oxf.), vol. 78, pp. 34–45, Jan. 2017
2017
-
[30]
Semidefinite programming relaxations for semialgebraic problems,
P. A. Parrilo, “Semidefinite programming relaxations for semialgebraic problems,” Mathematical Programming , vol. 96, pp. 293–320, May 2003
2003
-
[31]
Papachristodoulou, J
A. Papachristodoulou, J. Anderson, G. Valmorbida, S. Prajna, P. Seiler, P. A. Parrilo, M. M. Peet, and D. Jagt, SOSTOOLS: Sum of squares optimization toolbox for MATLAB, http://arxiv.org/abs/1310.4716, 2021, available from https://github.com/oxfordcontrol/SOSTOOLS
2021 arXiv
-
[32]
Alvaro Detailleur received the M.Sc
MOSEK Optimization Toolbox for MATLAB - Release 10.0.47 , MOSEK ApS, MOSEK ApS, Fruebjergvej 3, Symbion Science Park, Box 16, 2100 Copenhagen O, Denmark, 2023. Alvaro Detailleur received the M.Sc. degree in robotics, systems and control from ETH Zurich, Zurich, Switzerland in ...
2023
-
[2017]
Available: https://arxiv.org/abs/1412.6980
[Online]. Available: https://arxiv.org/abs/1412.6980
Reviewed August 5, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.