arXiv:2610.27970eess.SYOct 2026

Manuscript Offprint

arXiv:2610.27970

Neural Closed-Loop Identification of Nonlinear Systems with Stability and Generalization Guarantees

Laura Meroi, Mahrokh G. Boroujeni, Leonardo Massai, Giancarlo Ferrari-Trecate

Abstract

Neural networks are expressive models of nonlinear dynamics, but identifying such systems from closed-loop data raises two difficulties: the feedback loop correlates inputs with measurement noise, biasing standard open-loop estimators, and the identified model must be stabilized by the data-collection controller, so that its closed-loop behavior matches the true plant's. We derive a complete parameterization of all nonlinear systems stabilized by a given controller, generalizing the classical dual-Youla parameterization to the nonlinear setting. Building on this characterization, we propose Internal Controller Identification (ICI), a computationally tractable framework for identifying potentially unstable systems while ensuring closed-loop stability by construction; in the linear case, our indirect method reduces to an open-loop identification problem, for which standard consistency results apply. The framework accommodates contextual information, letting a single certified model identify a family of systems, and supports a PAC-Bayesian training objective that, when data are scarce and prior knowledge is available, bounds the identified operator's expected prediction loss. Experiments show that ICI identifies open-loop unstable plants where uncertified baselines diverge, outperforms direct methods under weak excitation and feedback-correlated noise, generalizes zero-shot to environments unseen during training, and, with limited data, avoids the overfitting of empirical risk minimization while providing a non-vacuous generalization bound.

Key words: Closed-loop identification; Nonlinear system identification; Neural networks; Stability of nonlinear systems; Probabilistic and Bayesian methods for system identification.

1 Introduction

Neural networks are flexible, expressive models for learning nonlinear dynamical systems from input-output data [42,38]. However, open-loop data collection is often impractical or unsafe: impossible for unstable systems, which can't be run without stabilizing feedback, and undesirable for stable ones that operate under feedback for safety, setpoint tracking, or disturbance rejection (e.g., drones or robotic manipulators). In these scenarios, data are gathered while the system operates in closed loop with a stabilizing controller, motivating closed-loop system identification [45,16,32,26]. Compared to the open-loop case, the central difficulty of this setting is the feedback-induced correlation between input signals and measurement noise [45,16]. Classical methods for closed-loop identification are typically classified into direct and indirect approaches [43].

Direct methods estimate the system and noise model independently of the feedback; in the linear case they are consistent provided the noise model is accurate, an assumption often violated by the complex disturbances of real-world systems [45,16].

Indirect methods instead exploit knowledge of the controller and target the closed-loop mapping, eliminating the noise contribution at the plant input and reducing the problem to open-loop identification [45,16,31]; in the linear case this yields consistency even under a misspecified noise model, and it is the route we follow.

A third family, joint input-output methods, simultaneously estimates the plant and controller from data jointly modeled as the output of a white-noise-driven system [43]; however, these methods are largely confined to the linear setting, do not extend naturally to general nonlinear plants, and additionally exhibit theoretically unbounded variance in the small-noise regime [1].

  • This work was supported as a part of NCCR Automation, a National Centre of Competence in Research, funded by the Swiss National Science Foundation (grant number 51NF40_225155) and the NECON project (grant number 200021_219431)

Email addresses: laura.meroi@epfl.ch (Laura Meroi), mahrokh.ghoddousiboroujeni@epfl.ch (Mahrokh G. Boroujeni), l.massai@epfl.ch (Leonardo Massai), giancarlo.ferraritrecate@epfl.ch (Giancarlo Ferrari-Trecate).

Preprint submitted to Automatica

21 October 2026

For LTI systems, one commonly used framework for indirect identification is the dual-Youla parameterization. This formulation is constructed using coprime factorizations of the known controller and of the nominal plant stabilized by it, augmented by a Youla parameter that is optimized to minimize the discrepancy from the true system. Through this structure, the parameterization characterizes the complete set of all plants stabilized by the given controller [24]; as its name suggests, it is dual to the Youla-Kučera parameterization, which instead characterizes all controllers that stabilize a given plant [48]. A fundamental advantage of this approach is that any identified model is inherently stabilized by the controller, naturally preserving closed-loop stability properties observed in the true system [16]. Furthermore, in the linear case, the Youla parameter reduces to a stable rational transfer function; since the underlying function space is infinite-dimensional, it is truncated to a finite order in practice, yielding a tractable optimization.

Extensions to nonlinear plants under linear control exist (see [4] for a review, and [9,17] for coprime-factorization parameterizations) but face two obstacles: coprime factorizations exist only for subclasses of nonlinear systems and are hard to compute [4], and the parameterization requires optimizing over stable nonlinear operators and their inverses, which complicates the optimization, a difficulty also noted for Youla-based nonlinear controller learning [19]. Existing methods thus fall short of a computationally practical framework.

More recently, [32] proposed an alternative approach for closed-loop identification of nonlinear systems. While effective in practice, this method has two key limitations: (i) the closed-loop system of the learned model and controller may become unstable, and (ii) it assumes a predefined parametric form for the system, limiting flexibility. This leaves closed-loop identification of expressive, nonlinear models a critical, yet not sufficiently explored, challenge.

A further challenge is that real-world systems rarely operate in a single environment: friction, payload, or terrain vary, so the data are generated by a family of related plants. Identification across operating conditions is classically addressed by linear parameter-varying (LPV) methods, also in closed loop [47,44], but restricted to LPV model classes without closed-loop stability guarantees; meta- and in-context learning estimate a single meta-model for a class of systems [15,37], again without certificates.

A distinct concern is finite-sample reliability: closed-loop data collection is costly, safety-critical, and biased by the controller, so guarantees from limited data are valuable. Such guarantees can be obtained through PAC-Bayes theory [35,2], a powerful tool for certifying highly parameterized models, applied beyond supervised learning to meta-learning [41] and optimal control [5]. PAC-Bayesian bounds exist for open-loop identification of stochastic LTI systems [12,14] and stable recurrent models [13]; their use in closed-loop identification, under strict closed-loop stability constraints on the learned model, remains unexplored.

Contributions. We propose a computationally tractable framework for closed-loop identification of nonlinear, potentially open-loop unstable systems while guaranteeing stability of the interconnection with the data-collection controller. In particular: (i) we introduce the Internal Controller Identification (ICI) framework, a complete parameterization of all and only the nonlinear systems stabilized by a given controller, which generalizes the dual-Youla parameterization, guarantees closed-loop stability by construction, and reduces to a consistent open-loop problem in the linear case; (ii) we derive finite-sample generalization guarantees, introducing an informative prior over the parameters of the learnable operator and a tractable PAC-Bayesian bound on its expected prediction loss, optimized with Stein Variational Gradient Descent (SVGD); (iii) we develop context-aware identification, where bounded context wrappers let a single model identify an entire family of environments and generalize to members never observed during training, with the closed-loop stability certificate intact; (iv) we conduct a systematic experimental evaluation covering open-loop unstable plants, weak excitation, feedback-correlated noise, and partial observation, against closed-loop baselines.

A preliminary version of this work appeared in the conference paper [7], which introduced the base ICI parameterization and its stability guarantee. The present paper adds the context-aware formulation (Section 3.3), the PAC-Bayesian generalization framework and its SVGD-based training (Section 5), the four-experiment study (Section 6), and complete proofs.

References (40)