# Dialogue-based generation of self-driving simulation scenarios using Large
Language Models

Antonio Valerio Miceli-Barone1
<EMAIL_ADDRESS>
Alex Lascarides1
<EMAIL_ADDRESS>
Craig Innes1
<EMAIL_ADDRESS>1 School of Informatics, University of Edinburgh

###### Abstract

Simulation is an invaluable tool for developing and evaluating controllers for
self-driving cars. Current simulation frameworks are driven by highly-
specialist domain specific languages, and so a natural language interface
would greatly enhance usability. But there is often a gap, consisting of tacit
assumptions the user is making, between a concise English utterance and the
executable code that captures the user’s intent. In this paper we describe a
system that addresses this issue by supporting an extended multimodal
interaction: the user can follow up prior instructions with refinements or
revisions, in reaction to the simulations that have been generated from their
utterances so far. We use Large Language Models (LLMs) to map the user’s
English utterances in this interaction into domain-specific code, and so we
explore the extent to which LLMs capture the context sensitivity that’s
necessary for computing the speaker’s intended message in discourse.

##  1 Introduction

Developing self-driving vehicles is a highly complicated process. In
particular, a long tail of edge cases, in which the controller’s current
policies are likely to yield bad outcomes, needs to be discovered and tackled.

Testing self-driving vehicles on public roads is expensive and potentially
dangerous (BBC News, 2018): safety-critical near-crash scenarios occur with
low probability during normal operation, and for ethical reasons they cannot
be created deliberately. Testing on closed circuits or other artificial
environments is only a partial solution since it cannot easily account for the
high variability of conditions on public roads. Simulation is a potentially
cheaper, faster and safer alternative that can complement road testing. It
allows developers to evaluate rare, dangerous or even counterfactual scenarios
(e.g. scenarios that involve road configurations or vehicle hardware
components that do not yet exist). Furthermore, some simulation methods may be
amenable to formal verification.

However, realistic simulation is hard. Over the years, many simulation
frameworks for self-driving have been developed, each focusing on different
aspects and hence different abstraction levels of the task (Hoss et al.,
2021). Each simulation framework is accompanied with an application
programming interface (API) or a domain specific language (DSL), so that users
can specify scenarios and control algorithms programmatically. Despite the
ongoing standardization efforts (ASAM e. V., 2020a, b; Thorn et al., 2018;
British Standard Institution, 2020), different frameworks still use different
interfaces, ontologies and paradigms. This creates a steep learning curve for
engineers. Ideally, we would like to have systems that allow engineers to
specify simulation scenarios with minimal specific knowledge of these details,
using natural language as an interface.

Recently, coding assistants based on Large Language Models (LLMs) have become
good enough to be of practical use (GitHub, 2021; Nijkamp et al., 2022;
GitHub, 2023; OpenAI, 2023). In this approach, the user specifies programming
problems by providing natural language instructions and optionally partial
programs, and the assistant provides program completions. The most recent
systems, such as GitHub Copilot X, OpenAI ChatGPT/GPT-4 and Anthropic Claude,
allow multiple rounds of interaction with the user through dialogue, enabling
an iterative refinement of solutions. These systems usually perform well on
common programming languages such as Python (though they can fail
systematically on unusual coding tasks that require non-trivial reasoning
(Miceli-Barone et al., 2023)). It would be desirable to leverage them to aid
the generation of scenario specifications for self-driving vehicle evaluation
from natural language descriptions. This is a non-trivial task, since in
contrast to Python, it is unlikely that these large pretrained models have
seen many scenario specifications in all the specific DSLs accompanying the
various simulation frameworks within their training data. Therefore, they
cannot be used directly in zero-shot mode.

An additional challenge occurs because typical natural language scenario
descriptions are often highly concise, with many aspects of the user’s
intended configuration remaining linguistically implicit. For example "The ego
vehicle, which is in the left lane, overtakes the car in front" does not make
explicit that this action is intended to be not at a crossroads. But a
simulator may randomly sample aspects of the scenario that are absent from the
description, and therefore may generate a crossroads, conflicting with the
user’s intent.

In this project, we explore a methodology to develop a dialogue-based coding
assistant for the generation of self-driving vehicle simulation scenarios
using LLMs. Our main objective is to generate Scenic scenarios (Fremont et
al., 2022) from English descriptions. We focus on the NHTSA-inspired pre-crash
scenarios for the Carla Autonomous Driving
challenge111https://carlachallenge.org/challenge/nhtsa/. Due to the extremely
low-resource nature of this problem (we were able to collect only $32$
examples of scenarios with an English description) we make extensive use of
in-context learning techniques. We evaluate to what extent dialogue-based
interaction can contribute to this task, under the hypothesis that it allows
the user to iteratively evaluate and refine the generated scenarios by
identifying which implicit assumptions are being violated and making them
explicit to the system.

##  2 Experiments

###  2.1 Frameworks

A Scenic scenario is a probabilistic program which defines a distribution over
scenes, which specify the initial positions and velocities of vehicles,
pedestrians and other objects on a map representing an urban environment, and
also specify their behaviours. This probabilistic formulation enables the
concise specification of a large number of test cases, in which the implicit
aspects are randomly sampled by the scenario compiler. The sampled scenes are
executed by a backend— in our work, the CARLA Urban Driving Simulator
(Dosovitskiy et al., 2017) (Figure 1).

Figure 1: A Scenic scenario generated by our model and executed in the CARLA
simulator. The description is: "Ego vehicle goes straight at 3-way
intersection and must suddenly stop to avoid collision when adversary vehicle
makes a left turn."

For scenario generation from English descriptions we use the OpenAI GPT-4
model version 0314, available through the OpenAI
API.222https://platform.openai.com/docs/api-reference GPT-4 is an instruction-
tuned LLM optimized for dialogue-based interaction.

###  2.2 Available data resources

The Scenic repository has only 32 scenario specifications with both code and
natural language
descriptions.333https://github.com/BerkeleyLearnVerify/Scenic/tree/main/examples/carla
We use 16 scenarios as training examples and 16 as test examples. Each
scenario description consists of one or two English sentences, mainly
describing behaviours and a location type where the simulated incident happens
(e.g. "on a highway", "at a 4-way crossroad", etc.), although the location may
be left implicit. The scenario code, while being probabilistic, is more
specific than the English description, as it includes ranges for initial
vehicle distances and velocities, algorithmic instructions for how to locate a
suitable starting point on the map, and agent behaviours specified by
composing elementary behaviours in a subsumption-style architecture (Brooks,
1986). Therefore, there are two levels of underspecification here: one from
the English description to the probabilistic scenario code, and another from
the probabilistic code to the executable scene. This reflects how humans
communicate with language: they often leave implicit aspects of their intended
message, especially when it can be inferred from what they have made explicit
via commonsense inference.

###  2.3 Workflow

In our experiments, we focus on a use case where a simulation scenario is
generated through multiple rounds of interaction between an engineer (the
user) and the system (the assistant).

Specifically, the user first provides a short English description of the
scenario consisting of one or two sentences in the style of the Carla
Autonomous Driving scenarios, for instance "Ego-vehicle is driving in the left
lane of a highway and must perform a lane change to avoid a slow moving or
parked vehicle on the shoulder.". The assistant queries the instruction-tuned
LLM to generate the initial code for a Scenic scenario that corresponds to the
meaning of the description. We then invoke the Scenic compiler, which will
attempt to parse the code, randomly sample a particular scene and run it in
the CARLA simulator. Since the LLM decoding process is unconstrained, the
generated code may be syntactically incorrect or it may reference unknown
behaviours, functions, or asset names, making the code non-
executable.444Scenario execution can also fail if the rejection sampling
algorithm used by Scenic fails to generate a scene that satisfies the
specified constraints within a predefined number of iterations, namely 2,000.
These issues will be detected when execution is attempted, in which case
Scenic returns an exception. In such cases, the exception message is sent back
to the LLM, concatenated to the previous generation and all its prompts (up to
the length limit of the LLM context window). This process is iterated, without
user intervention, until an executable scenario is produced or a maximum
number of rounds (specifically, 5) is reached. If this initial phase is
successful, the user observes both the code and simulation runs of multiple
scenes. The user can then judge whether they adhere to the requirements, and
if necessary ask the assistant for further variations. The user can then
express further content, and the process iterates.

For instance, assume that in the aforementioned example scenario, the
assistant generated code instantiates two slow-moving vehicles rather than
one, which violates Gricean scalar implicatures of the description Grice
(1975) (i.e., it implicates there is only one slow moving or parked vehicle)
and interferes with the termination condition555This example is taken from an
exploratory experiment that we executed. . The user may comment "Create only
one vehicle besides the ego vehicle.". This comment is appended to the LLM
context and a new scenario is generated, performing automatic iteration if
exceptions are detected, until another executable scenario is presented to the
user.

At this time, for instance, the user may notice that a crash occurs in some of
the runs because the ego-vehicle is driving too fast, and they may comment
"Execute the lane change at a speed no more than 10.", and the assistant may
respond by changing the parameter that controls the ego-vehicle’s speed in the
scenario code. If at some point during the process the assistant fails to
generate an executable scenario within the specified maximum of rounds, the
user can examine the generated code and provide hints to fix it back to the
LLM. Hopefully, the user will eventually be satisfied with the generated
scenario.

###  2.4 LLM interaction

In order to generate scenario programs from their English descriptions, we use
in-context few-shot learning (Brown et al., 2020). For the first query of a
given test scenario, we randomly sample training examples up the a total of
6,500 out of 8,000 tokens of the GPT-4 context window. Since training examples
are on average 512 tokens long, this results in about 12 examples out of 16
being selected. After appending the test scenario English description, we
query the model with softmax temperature 0.1. We extract the code from the
model response and post-process it before sending it to the Scenic compiler.
See appendix A for details on the prompting templates and code processing.

For each the following queries, the model output message and then the Scenic
exception or the user comment are appended to the prompt and training examples
are removed in order to keep the prompt length under 6,500 tokens.

##  3 Evaluation

Figure 2: Cumulative success probability over number of dialogue turns (left),
and over total number of LLM queries (right).

In our evaluation protocol, we allow for a maximum of 5 dialogue turns per
test scenario, including the initial generation. For each turn, we allow up to
5 LLM queries. When an executable scenario is generated, the user views
multiple scenes sampled by Scenic until they are satisfied (scenes usually
last 10-30 seconds), then the user either declares the scenario a success, or
provides a comment to the system until the maximum number of turns is reached.
The user can also view the generated code at each turn, but not the gold-
standard reference code. See appendix B for an example of scenario generation
with user interaction.

In this work, one of the authors acts as the user. The OpenAI API cost for
running our experiments was 19.12 USD. The code to replicate our experiments
is available on GitHub666https://github.com/Avmb/DialogLLMScenic.git.

###  3.1 Results

We generate 8 successful scenarios out of 16 (50%). We report the cumulative
success probability over the number of dialogue turns and over the total
number of LLM queries in Figure 2.

We observe that two turns of dialogue increase success probability from 37.5%
of single turn generation to 50%. When the system successfully generates a
scenario, it does so within two LLM queries, whether they happen in the first
or the second turn, with success probability increasing from 31.3% to 50%.
Additional turns or queries do not improve success probability, which is
somewhat disappointing, although even with one turn we obtain a substantial
gain over the direct generation baseline.

Qualitative analysis reveals that the system is often able to generate
executable code within one or two queries per turn, but unless it generates
the correct scenario semantics early on, it tends to struggle with details
such as the relative movement direction of cars and pedestrians. In a small
number of cases, the system keeps generating incorrect keyword or identifier
names (essentially trying to guess the syntax and standard library of Scenic)
or generates scenarios that can compile but fail in the sampling stage due to
excessively tight constraints that cause the Scenic rejection sampler to run
out of iterations. In these cases, the user can sometimes correct the model by
looking at the generated code and providing suitable hints. See appendix B for
examples of both a successful and a failed scenario generation.

##  4 Conclusions

We investigated the generation of stochastic self-driving simulation scenarios
using dialogue-based interaction between an user and a LLM. We considered a
very challenging task due to the very small number of training examples and
the use of a domain-specific language which the LLM has probably not seen
neither during its pre-training nor its instruction fine-tuning.

Using iterative model querying and multiple turns of interaction with the user
we were able to achieve success in half of our test scenarios, a substantial
improvement over the direct single-query generation baseline. While the user
still need expertise in the scenario specification language, our approach may
allow faster prototyping compared to writing scenarios from scratch.

We believe that this work constitutes a promising research direction in the
field of natural language interfaces for self-driving vehicle engineering and,
more generally, robotics. Future work may extend this approach to semi-
automatic scenario validation or formal verification, where algorithmic
evaluation criteria are also generated by the LLM through user interaction.

## Limitations

  * •

Due to time constraints, our human evaluation was conducted with only one test
subject which is also an author of this work. This might introduce bias. A
better approach would involve multiple independent evaluators.

  * •

Our approach uses a simple few-shot in-context learning setup with random
example selection. More advanced LLM example selection techniques (e.g.
similarity-based), possibly combined with example augmentation or more
advanced prompting strategies (e.g. chain-of-thought) might lead to better
performance.

  * •

The LLM processing of error messages and user comments is zero-shot. Creating
a dataset of such interactions obtained on the training examples and using
them as additional context during deployment might increase performance.

  * •

We only evaluated a single, closed-source, API-only, model. Better performance
and better usability might be achieved on open source models which may be
fine-tuned on our training examples.

## Ethics Statement

Our experiments involve the participation of a human subject (one of the
authors). Due to the nature of the experiments, we believe that there were no
plausible risks for the human subject.

Our work may enable a more extensive use of simulation in the development of
self-driving vehicles. This can have positive implications for public safety,
as it may reduce the amount of testing on public roads of early-stage
prototypes which may endanger the public (as in the case of the Uber self-
driving car crash). However, it should be remarked that simulation can never
fully replace real-world testing and post-marketing monitoring.

Our work uses a closed-source LLM which is available only as an API which may
be discontinued at any time and which has been trained on unknown data. There
may be intrinsic ethical issues with such models due to their extreme black-
box nature. We recommend that production systems should be based on open-
source models that can be independently audited and can be run on local
hardware.

## Acknowledgements

This work was supported by a grant from the UKRI Strategic Priorities Fund to
the UKRI Research Node on Trustworthy Autonomous Systems Governance and
Regulation (EP/V026607/1, 2020-2024).

## References

  * Ando and Zhang (2005) Rie Kubota Ando and Tong Zhang. 2005.  A framework for learning predictive structures from multiple tasks and unlabeled data.  _Journal of Machine Learning Research_ , 6:1817–1853.
  * Andrew and Gao (2007) Galen Andrew and Jianfeng Gao. 2007.  Scalable training of $L_{1}$-regularized log-linear models.  In _Proceedings of the 24th International Conference on Machine Learning_ , pages 33–40.
  * ASAM e. V. (2020a) ASAM e. V. 2020a.  Asam openodd.  Accessed on July 5, 2023.
  * ASAM e. V. (2020b) ASAM e. V. 2020b.  Asam openxontology.  Accessed on July 5, 2023.
  * BBC News (2018) BBC News. 2018.  Uber self-driving crash.  Accessed on July 4, 2023.
  * British Standard Institution (2020) British Standard Institution. 2020.  _PAS 1883:2020 Operational Design Domain (ODD) taxonomy for an automated driving system (ADS) - Specification_.  BSI Standards Limited, London.  Accessed on July 5, 2023.
  * Brooks (1986) R. Brooks. 1986.  A robust layered control system for a mobile robot.  _IEEE Journal on Robotics and Automation_ , 2(1):14–23.
  * Brown et al. (2020) Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020.  Language models are few-shot learners.
  * Dosovitskiy et al. (2017) Alexey Dosovitskiy, German Ros, Felipe Codevilla, Antonio Lopez, and Vladlen Koltun. 2017.  CARLA: An open urban driving simulator.  In _Proceedings of the 1st Annual Conference on Robot Learning_ , pages 1–16.
  * Fremont et al. (2022) Daniel J. Fremont, Edward Kim, Tommaso Dreossi, Shromona Ghosh, Xiangyu Yue, Alberto L. Sangiovanni-Vincentelli, and Sanjit A. Seshia. 2022.  Scenic: a language for scenario specification and data generation.  _Machine Learning_.
  * GitHub (2021) GitHub. 2021.  Github copilot.  Accessed on July 5, 2023.
  * GitHub (2023) GitHub. 2023.  Github copilot x.  Accessed on July 5, 2023.
  * Grice (1975) H. P. Grice. 1975.  Logic and conversation.  In P. Cole and J. L. Morgan, editors, _Syntax and Semantics Volume 3: Speech Acts_ , pages 41–58. Academic Press.
  * Hoss et al. (2021) Michael Hoss, Maike Scholtes, and Lutz Eckstein. 2021.  A review of testing object-based environment perception for safe automated driving.  _CoRR_ , abs/2102.08460.
  * Miceli-Barone et al. (2023) Antonio Valerio Miceli-Barone, Fazl Barez, Ioannis Konstas, and Shay B. Cohen. 2023.  The larger they are, the harder they fail: Language models do not recognize identifier swaps in python.
  * Nijkamp et al. (2022) Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong. 2022.  Codegen: An open large language model for code with multi-turn program synthesis.
  * OpenAI (2023) OpenAI. 2023.  GPT-4 technical report.
  * Rasooli and Tetreault (2015) Mohammad Sadegh Rasooli and Joel R. Tetreault. 2015.  Yara parser: A fast and accurate dependency parser.  _Computing Research Repository_ , arXiv:1503.06733.  Version 2.
  * Thorn et al. (2018) Eric Thorn, Shawn C. Kimmel, and Michelle Chaka. 2018.  A framework for automated driving system testable cases and scenarios.

##  Appendix A Prompt templates and data processing

###  A.1 Templates

For each scenario, in the initial query to the LLM, we start with a message in
the GPT-4 "system" conversation role, providing an instruction describing the
task: "You are a helpful agent that generates specifications for car driving
scenarios in the Scenic language.
Scenic is a domain-specific probabilistic programming language for modeling
the environments of cyber-physical systems like robots and autonomous cars. A
Scenic program defines a distribution over scenes, configurations of physical
objects and agents; sampling from this distribution yields concrete scenes
which can be simulated to produce training or testing data. Scenic can also
define (probabilistic) policies for dynamic agents, allowing modeling
scenarios where agents take actions over time in response to the state of the
world.
Your task is to generate Scenic scenarios, each according to its corresponding
description in English included as a docstring. Write each scenario in a
separate code box. Follow the examples below:"777This text has includes the
first paragraph of the homepage of the Scenic documentation website:
https://scenic-lang.readthedocs.io/en/latest/

Then we provide a sequence of training examples, each specified by a message
in the "example_user" role, which contains the English description of the
scenario extracted from its docstring, followed by a message in the
"example_assistant" role which contains the scenario code (without the
docstring) inside a code block with "scenic" language tag. Finally we provide
the English description of the test scenario in a message in the "user" role.
The model responds to this query with a message in the "assistant" role. We
search for a code block with "scenic" language tag in this message and we
extract the code inside it.

For subsequent queries, we append to the prompt the "assistant" message
generated by the model, followed by a message in the "user" role containing
either the Scenic exception prefixed with "An error has occurred:", or the
user comment prefixed with "Comment:". We drop examples from the top (while
keeping the "system" message) in order to keep the prompt length to less than
6,500 tokens. The prompt is retained and updated between queries, effectively
representing the dialogue state.

###  A.2 Data processing

We perform minimal data regex-based pre-processing on the scenario code before
sending it to the LLM: we remove comments, empty lines, we fix the vehicle
asset name and simulator backend names (which are sometimes incorrect due to
version mismatch between Scenic and CARLA) and we remove the map filename (it
is a waste of tokens which can be reconstructed from the map name). Similarly,
on the generated code we add the original English description as a docstring
and we add the map filename derived from the map name.

##  Appendix B Generation example

###  B.1 Successful generation

In this example, the user starts with the scenario description: "Ego vehicle
makes a right turn at 4-way intersection while adversary vehicle from lateral
lane goes straight."
The model generates the following code, which is immediately executable:

    param map = localPath(’Scenic/tests/formats/opendrive/maps/CARLA/Town05.xodr’)
    param carla_map = ’Town05’
    model scenic.simulators.carla.model
    MODEL = ’vehicle.lincoln.mkz_2017’
    EGO_INIT_DIST = [20, 25]
    param EGO_SPEED = VerifaiRange(7, 10)
    param EGO_BRAKE = VerifaiRange(0.5, 1.0)
    ADV_INIT_DIST = [10, 15]
    param ADV_SPEED = VerifaiRange(7, 10)
    param SAFETY_DIST = VerifaiRange(10, 20)
    CRASH_DIST = 5
    TERM_DIST = 70
    behaviour EgoBehavior(trajectory):
            try:
                    do FollowTrajectoryBehavior(target_speed=globalParameters.EGO_SPEED, trajectory=trajectory)
            interrupt when withinDistanceToAnyObjs(self, globalParameters.SAFETY_DIST):
                    take SetBrakeAction(globalParameters.EGO_BRAKE)
            interrupt when withinDistanceToAnyObjs(self, CRASH_DIST):
                    terminate
    intersection = Uniform(*filter(lambda i: i.is4Way, network.intersections))
    egoInitLane = Uniform(*intersection.incomingLanes)
    egoManeuver = Uniform(*filter(lambda m: m.type is ManeuverType.RIGHT_TURN, egoInitLane.maneuvers))
    egoTrajectory = [egoInitLane, egoManeuver.connectingLane, egoManeuver.endLane]
    egoSpawnPt = OrientedPoint in egoInitLane.centerline
    advManeuver = Uniform(*filter(lambda m: m.type is ManeuverType.STRAIGHT, egoManeuver.conflictingManeuvers))
    advInitLane = advManeuver.startLane
    advTrajectory = [advInitLane, advManeuver.connectingLane, advManeuver.endLane]
    advSpawnPt = OrientedPoint in advInitLane.centerline
    ego = Car at egoSpawnPt,
            with blueprint MODEL,
            with behaviour EgoBehavior(egoTrajectory)
    adversary = Car at advSpawnPt,
            with blueprint MODEL,
            with behaviour FollowTrajectoryBehavior(target_speed=globalParameters.ADV_SPEED, trajectory=advTrajectory)
    require EGO_INIT_DIST[0] <= (distance to intersection) <= EGO_INIT_DIST[1]
    require ADV_INIT_DIST[0] <= (distance from adversary to intersection) <= ADV_INIT_DIST[1]
    terminate when (distance to egoSpawnPt) > TERM_DIST

While this code largely captures the intended behaviour, the user notices that
sometimes it results in near crashes between the two vehicles. Therefore the
user starts a second turn of dialogue with the comment: "Use a higher safety
distance". The system responds with the code:

param map =
localPath(’Scenic/tests/formats/opendrive/maps/CARLA/Town05.xodr’)param
carla_map = ’Town05’model scenic.simulators.carla.modelMODEL =
’vehicle.lincoln.mkz_2017’EGO_INIT_DIST = [20, 25]param EGO_SPEED =
VerifaiRange(7, 10)param EGO_BRAKE = VerifaiRange(0.5, 1.0)ADV_INIT_DIST =
[10, 15]param ADV_SPEED = VerifaiRange(7, 10)param SAFETY_DIST =
VerifaiRange(15, 25) # Increased safety distanceCRASH_DIST = 5TERM_DIST =
70behaviour EgoBehavior(trajectory): try: do
FollowTrajectoryBehavior(target_speed=globalParameters.EGO_SPEED,
trajectory=trajectory) interrupt when withinDistanceToAnyObjs(self,
globalParameters.SAFETY_DIST): take SetBrakeAction(globalParameters.EGO_BRAKE)
interrupt when withinDistanceToAnyObjs(self, CRASH_DIST):
terminateintersection = Uniform(*filter(lambda i: i.is4Way,
network.intersections))egoInitLane =
Uniform(*intersection.incomingLanes)egoManeuver = Uniform(*filter(lambda m:
m.type is ManeuverType.RIGHT_TURN, egoInitLane.maneuvers))egoTrajectory =
[egoInitLane, egoManeuver.connectingLane, egoManeuver.endLane]egoSpawnPt =
OrientedPoint in egoInitLane.centerlineadvManeuver = Uniform(*filter(lambda m:
m.type is ManeuverType.STRAIGHT, egoManeuver.conflictingManeuvers))advInitLane
= advManeuver.startLaneadvTrajectory = [advInitLane,
advManeuver.connectingLane, advManeuver.endLane]advSpawnPt = OrientedPoint in
advInitLane.centerlineego = Car at egoSpawnPt, with blueprint MODEL, with
behaviour EgoBehavior(egoTrajectory)adversary = Car at advSpawnPt, with
blueprint MODEL, with behaviour
FollowTrajectoryBehavior(target_speed=globalParameters.ADV_SPEED,
trajectory=advTrajectory)require EGO_INIT_DIST[0] <= (distance to
intersection) <= EGO_INIT_DIST[1]require ADV_INIT_DIST[0] <= (distance from
adversary to intersection) <= ADV_INIT_DIST[1]terminate when (distance to
egoSpawnPt) > TERM_DIST

The only difference with the previous generated code is the highlighted line,
where the model increased the probabilistic range of possible distances to
initiate the brake maneuver at. Note that the LLM added a comment to the code
to document the change, even without being instructed to. The user observes
multiple runs in CARLA simulator of scenes sampled from this code (Figure 3)
and deems it satisfactory, declaring the test scenario as a success.

Figure 3: A scene from the successfully scenario generated in appendix B.1.

###  B.2 Failed generation

In this example, the user starts with the scenario description: "Ego vehicle
makes a left turn at an intersection and must suddenly stop to avoid collision
when pedestrian crosses the crosswalk."
The model generates the following code:

param map =
localPath(’Scenic/tests/formats/opendrive/maps/CARLA/Town05.xodr’)param
carla_map = ’Town05’model scenic.simulators.carla.modelMODEL =
’vehicle.lincoln.mkz_2017’EGO_INIT_DIST = [20, 25]param EGO_SPEED =
VerifaiRange(7, 10)EGO_BRAKE = 1.0PED_MIN_SPEED = 1.0PED_THRESHOLD = 20param
SAFETY_DIST = VerifaiRange(10, 15)CRASH_DIST = 5TERM_DIST = 50behaviour
EgoBehavior(trajectory): flag = True try: do
FollowTrajectoryBehavior(target_speed=globalParameters.EGO_SPEED,
trajectory=trajectory) interrupt when withinDistanceToAnyObjs(self,
globalParameters.SAFETY_DIST) and (ped in network.drivableRegion) and flag:
flag = False while withinDistanceToAnyObjs(self, globalParameters.SAFETY_DIST
+ 3): take SetBrakeAction(EGO_BRAKE) interrupt when
withinDistanceToAnyObjs(self, CRASH_DIST): terminateintersection =
Uniform(*filter(lambda i: i.is4Way or i.is3Way,
network.intersections))egoManeuver = Uniform(*filter(lambda m: m.type is
ManeuverType.LEFT_TURN, intersection.maneuvers))egoInitLane =
egoManeuver.startLaneegoTrajectory = [egoInitLane, egoManeuver.connectingLane,
egoManeuver.endLane]egoSpawnPt = OrientedPoint in
egoInitLane.centerlinetempSpawnPt = egoInitLane.centerline[-1]ego = Car at
egoSpawnPt, with blueprint MODEL, with behaviour EgoBehavior(egoTrajectory)ped
= Pedestrian right of tempSpawnPt by 5, with heading ego.heading, with
regionContainedIn None, with behaviour CrossingBehavior(ego, PED_MIN_SPEED,
PED_THRESHOLD)require EGO_INIT_DIST[0] <= (distance to intersection) <=
EGO_INIT_DIST[1]terminate when (distance to egoSpawnPt) > TERM_DIST

This code is executable, however it results in an incorrect behaviour: the
pedestrian crosses the intersection parallel to the Ego car and on its right
side of the road, hence there is no possibility for a collision. In order for
the phrase "and must suddenly stop to avoid collision when pedestrian crosses
the crosswalk" to be relevant, the pedestrian must instead either cross
perpendicularly on the near side of the intersection, or parallel on the left
side (Figure 4).

Figure 4: Failed generation example: the pedestrian is on the wrong side of
the road.

The user starts a second turn of dialogue with the comment: "Make sure the
pedestrian crosses in front of the ego car". The system generates:

param map =
localPath(’Scenic/tests/formats/opendrive/maps/CARLA/Town05.xodr’)param
carla_map = ’Town05’model scenic.simulators.carla.modelMODEL =
’vehicle.lincoln.mkz_2017’EGO_INIT_DIST = [20, 25]param EGO_SPEED =
VerifaiRange(7, 10)EGO_BRAKE = 1.0PED_MIN_SPEED = 1.0PED_THRESHOLD = 20param
SAFETY_DIST = VerifaiRange(10, 15)CRASH_DIST = 5TERM_DIST = 50behaviour
EgoBehavior(trajectory): flag = True try: do
FollowTrajectoryBehavior(target_speed=globalParameters.EGO_SPEED,
trajectory=trajectory) interrupt when withinDistanceToAnyObjs(self,
globalParameters.SAFETY_DIST) and (ped in network.drivableRegion) and flag:
flag = False while withinDistanceToAnyObjs(self, globalParameters.SAFETY_DIST
+ 3): take SetBrakeAction(EGO_BRAKE) interrupt when
withinDistanceToAnyObjs(self, CRASH_DIST): terminateintersection =
Uniform(*filter(lambda i: i.is4Way or i.is3Way,
network.intersections))egoManeuver = Uniform(*filter(lambda m: m.type is
ManeuverType.LEFT_TURN, intersection.maneuvers))egoInitLane =
egoManeuver.startLaneegoTrajectory = [egoInitLane, egoManeuver.connectingLane,
egoManeuver.endLane]egoSpawnPt = OrientedPoint in
egoInitLane.centerlinetempSpawnPt = egoInitLane.centerline[-1]ego = Car at
egoSpawnPt, with blueprint MODEL, with behaviour EgoBehavior(egoTrajectory)ped
= Pedestrian left of tempSpawnPt by 5, with heading ego.heading, with
regionContainedIn None, with behaviour CrossingBehavior(ego, PED_MIN_SPEED,
PED_THRESHOLD)require EGO_INIT_DIST[0] <= (distance to intersection) <=
EGO_INIT_DIST[1]terminate when (distance to egoSpawnPt) > TERM_DIST

The only difference here is the starting position of the pedestrian. In this
scenario the Ego car does indeed stop for some time while the pedestrian is
crossing the intersection, but restarts too soon, which in most cases results
in a collision. Moreover, the pedestrian starts and ends the crossing on the
road rather than on the sidewalk (Figure 5).

Figure 5: Failed generation example: the Ego car collides with the pedestrian,
who is also incorrectly positioned.

The user attempts to correct the behaviour with the comment: "After braking,
the ego car should wait for the pedestrian to clear the intersection before
starting to move again". The system generates:

param map =
localPath(’Scenic/tests/formats/opendrive/maps/CARLA/Town05.xodr’)param
carla_map = ’Town05’model scenic.simulators.carla.modelMODEL =
’vehicle.lincoln.mkz_2017’EGO_INIT_DIST = [20, 25]param EGO_SPEED =
VerifaiRange(7, 10)EGO_BRAKE = 1.0PED_MIN_SPEED = 1.0PED_THRESHOLD = 20param
SAFETY_DIST = VerifaiRange(10, 15)CRASH_DIST = 5TERM_DIST = 50behaviour
EgoBehavior(trajectory): flag = True try: do
FollowTrajectoryBehavior(target_speed=globalParameters.EGO_SPEED,
trajectory=trajectory) interrupt when withinDistanceToAnyObjs(self,
globalParameters.SAFETY_DIST) and (ped in network.drivableRegion) and flag:
flag = False while withinDistanceToAnyObjs(self, globalParameters.SAFETY_DIST
+ 3): take SetBrakeAction(EGO_BRAKE) while not withinDistanceToAnyObjs(self,
globalParameters.SAFETY_DIST + 3): take SetThrottleAction(0.5) interrupt when
withinDistanceToAnyObjs(self, CRASH_DIST): terminateintersection =
Uniform(*filter(lambda i: i.is4Way or i.is3Way,
network.intersections))egoManeuver = Uniform(*filter(lambda m: m.type is
ManeuverType.LEFT_TURN, intersection.maneuvers))egoInitLane =
egoManeuver.startLaneegoTrajectory = [egoInitLane, egoManeuver.connectingLane,
egoManeuver.endLane]egoSpawnPt = OrientedPoint in
egoInitLane.centerlinetempSpawnPt = egoInitLane.centerline[-1]ego = Car at
egoSpawnPt, with blueprint MODEL, with behaviour EgoBehavior(egoTrajectory)ped
= Pedestrian left of tempSpawnPt by 5, with heading ego.heading, with
regionContainedIn None, with behaviour CrossingBehavior(ego, PED_MIN_SPEED,
PED_THRESHOLD)require EGO_INIT_DIST[0] <= (distance to intersection) <=
EGO_INIT_DIST[1]terminate when (distance to egoSpawnPt) > TERM_DIST

Now the Ego car does stop but fails to restart and keeps waiting forever
(Figure 6).

Figure 6: Failed generation example: the Ego car stops but fails to restart
even though the pedestrian is far away (and still incorrectly positioned
inside the road rather than on the sidewalk).

The user now attempts to focus on the position of the pedestrian before
attempting to fix the Ego car behaviour by specifying in two different turns
of dialogue "Make sure that the pedestrian starts crossing from a sidewalk and
ends crossing at a sidewalk" and "Specify the pedestrian position as an offset
from the lane", but the system fails to fix the problem, in fact it gets
"confused" and fails to even generate an executable scenario in the last turn.
Since we exhausted the stipulated number of turns, we consider this scenario
as a failure.


# Synthesis of Data-Driven Nonlinear State Observers using Lipschitz-Bounded
Neural Networks

Wentao Tang1 *This work is supported by the author’s faculty startup
fund.1Wentao Tang is with the Department of Chemical and Biomolecular
Engineering, North Carolina State University, Raleigh, NC 27695
<EMAIL_ADDRESS>
###### Abstract

This paper focuses on the _model-free_ synthesis of state observers for
nonlinear autonomous systems without knowing the governing equations.
Specifically, the Kazantzis-Kravaris/Luenberger (KKL) observer structure is
leveraged, where the outputs are fed into a linear time-invariant (LTI) system
to obtain the observer states, which can be viewed as the states nonlinearly
transformed by an immersion mapping, and a neural network is used to
approximate the inverse of the nonlinear immersion and estimate the states. In
view of the possible existence of noises in output measurements, this work
proposes to impose an upper bound on the Lipschitz constant of the neural
network for robust and safe observation. A relation that bounds the
generalization loss of state observation according to the Lipschitz constant,
as well as the $H_{2}$-norm of the LTI part in the KKL observer, is
established, thus reducing the model-free observer synthesis problem to that
of Lipschitz-bounded neural network training, for which a direct
parameterization technique is used. The proposed approach is demonstrated on a
chaotic Lorenz system.

##  I Introduction

For nonlinear systems that arise from realistic engineering applications such
as transport-reaction processes, modern control theory relies on _state-space
representations_ for their modeling, analysis, and control [1, 2, 3]. Recent
advances in nonlinear control have highlighted the role of data-driven
(machine learning) techniques in identifying governing equations or underlying
dynamical structures [4, 5, 6], analyzing system and control-theoretic
properties [7, 8], and synthesizing model-free controllers [9, 10, 11]. In
these efforts, it is often assumed that the _state_ information is available
for analysis or control; for example, in reinforcement learning (RL)
literature, it is common to apply stochastic first-order optimization to learn
a value (cost) function or $Q$ function based on temporal actions and state
measurements. In many (if not most) control engineering applications, such as
in chemical processes, however, it is more likely that the states are not
measurable.

Hence, for nonlinear control in a state-space framework, a _state observer_ is
necessary, whereby the states are estimated based on input and output history
[12]. A recent review on model-based approaches to synthesize state observers
is found in Bernard, Andrieu, and Astolfi [13]. A classical form of state
observer for linear systems is known as Luenberger observer [14], which an
auxiliary linear time-invariant (LTI) system that uses the plant outputs as
inputs and returns state estimates. The observer states are in fact a linear
transform of the plant states [15]. The idea was extended to nonlinear systems
in the seminal work of Kazantzis and Kravaris [16]. In their Kazantzis-
Kravaris/Luenberger (KKL) observer (as named in Andrieu and Praly [17]) still
uses an LTI system to convert plant outputs to observer states, which turn out
to be the plant states transformed via a nonlinear immersion. Thus, the
observer synthesis problem reduces to the determination of this nonlinear
immersion and its inverse, via solving (model-based) partial differential
equations (PDEs). Such a KKL observer was extended from autonomous to actuated
systems in [18], where the LTI part is replaced by an input-affine one with an
additional nonlinear drift term associated with the actuated inputs.

This paper focuses on the _synthesis of KKL observer_ in a _model-free_
manner, without assuming prior knowledge on the plant dynamics. This is
motivated by two reasons: (i) many nonlinear systems that involve complex
kinetic or kinematic mechanisms are often hard to model accurately, and (ii)
it can be challenging to solve the associated PDEs, especially in high-
dimensional state space (in fact, there may not be well-posed boundary
conditions). In the recent years, there have been several works that pioneered
the use of neural networks in the observer problem. For example, Ramos et al.
[19] first trained neural networks to approximate the inverse immersion map to
reconstruct the actual states from observer states. Then, the optimization of
pole placement was considered along with the training of inverse immersion in
[20]. Niazi et al. [21] used physics-informed neural networks (PINNs) to
approach a surrogate solution to solve the PDEs. Miao and Gatsis [22]
formulated a dynamic optimization problem to minimize the accumulated squared
state observation error, whereby the optimality condition, through calculus of
variations results in neural ODEs.

It is commonly known that neural networks, when overparameterized with large
widths and depths, may cause a deteriorated capability of generalization. It
has also been argued that neural networks can be fragile to adversarial
attacks to the training data and thus must be equipped with a self-defense
mechanisms that warranty robustness [23, 24]. In particular, controlling the
Lipschitz constant of the mapping specified by the neural network has been
studied as a promising approach [25, 26, 27]. However, in these works,
estimating and minimizing the Lipschitz constant requires the use of
semidefinite programming routines, which has a high complexity when the number
of neurons is large. An alternative way, called _direct paramterizaton_ , as
recently proposed in Wang and Manchester [28], is to translate the Lipschitz
bound constraint into a special architecture of the neural layers, thus
allowing the use of typical back-propagation (BP) to train the network in an
unconstrained way.

Hence, in this work, the Wang-Manchester direct parameterization is adopted to
train Lipschitz-bounded neural networks in a KKL state observer for any
unknown nonlinear autonomous system. The paper establishes a relation between
the generalized observation error and the Lipschitz bound of the neural
network as well as the $H_{2}$-norm of the LTI observer dynamics, under a
typical white noise assumption on the plant outputs. Hence, by varying the
Lipschitz bound, the optimal observer can be synthesized.

##  II Preliminaries

We consider a nonlinear autonomous system:

$\dot{x}(t)=f(x(t)),\quad y(t)=h(x(t))$ (1)

where $x(t)\in\mathcal{X}\subseteq\mathbb{R}^{n}$ is the vector of states and
$y(t)\in\mathbb{R}^{m}$ represents the outputs. For simplicity, we will
consider $m=1$. It is assumed that $f$ and $h$ are smooth on $\mathcal{X}$ to
guarantee existence and uniqueness of solution but unknown for model-based
synthesis.

###  II-A KKL Observer

For nonlinear systems, KKL observer generalizes the notion of Luenberger
observers that were restricted to linear systems [14], providing a generic
method for state observation with mild assumptions to guarantee existence.
Specifically, the KKL observer for (1) is expressed as

$\dot{z}(t)=Az(t)+By(t),\quad\hat{x}(t)=T^{\dagger}(z(t)).$ (2)

Here the observer states $z\in\mathbb{R}^{n_{z}}$ has an LTI dynamics. The
matrices $A$ and $B$ are chosen under the requirements of (i) controllability
of $(A,B)$ should be controllable, (ii) Hurwitz property of $A$, and (iii)
sufficiently high dimension of $z$ ($n_{z}$), which should be at least $n+1$
if $(A,B)$ is complex [17] and at least $2n+1$ if $(A,B)$ is real [29]. The
mapping from the observer states $z$ to the state estimates $\hat{x}$ is a
static one, $T^{\dagger}$, which is the left-pseudoinverse of a nonlinear
immersion $T$ (i.e., a differentiable injection satisfying $T^{\dagger}\circ
T=\mathsf{id}$). This immersion $T$ should satisfy the following PDE:

$\frac{\partial T}{\partial x}(x)f(x)=AT(x)+Bh(x),\quad\forall
x\in\mathcal{X},$ (3)

where $\partial T/\partial x$ denotes the Jacobian matrix of $T$. It can be
easily verified that under the above PDE, $dT(x)/dt=AT(x)+By$, and thus
$z-T(x)$ has an exponentially decaying dynamics, as $A$ is Hurwitz.

The conditions for the existence of a KKL observer, namely the solution to its
defining PDE (3), have been established based on the condition of backward
distinguishability. In below, we denote the solution to the ODEs
$\dot{x}=f(x)$ at time $t$ with initial condition $x(0)=\xi$ as
$\Phi_{t}(\xi)$. For any open set $\mathcal{O}$ in $\mathcal{X}$, denote the
backward time instant after which the solution does not escape this region by
$\varsigma_{\mathcal{O}}(\xi)=\inf\\{t|\Phi_{t}(\xi)\in\mathcal{O}\\}$. Also
denote
$\mathcal{O}+\epsilon:=\\{\xi+\eta|\xi\in\mathcal{O},\|\eta\|<\epsilon\\}$.

######  Definition 1 (Backward distinguishability).

The system (1) is $(\mathcal{O},\epsilon)$-_backward distinguishable_ if for
any distinct $\xi,\xi^{\prime}\in\mathcal{X}$ there exists a negative
$t>\varsigma_{\mathcal{O}+\epsilon}(\xi)\wedge\varsigma_{\mathcal{O}+\epsilon}(\xi^{\prime})$
such that $h(\Phi_{t}(\xi))\neq h(\Phi_{t}(\xi^{\prime}))$.

######  Fact 1 (Existence of KKL observer, cf. Brivadis et al. [29]).

Assume that there is an open $\mathcal{O}\subseteq\bar{\mathcal{X}}$ and a
positive constant $\epsilon$ such that the system (1) is
$(\mathcal{O},\epsilon)$-backward distinguishable. Then there exists a
constant $\rho>0$ such that for all but a Lebesbue-zero-measure set of
$(A,B)\in\mathbb{R}^{(2n+1)\times(2n+1)}\times\mathbb{R}^{(2n+1)}$, if $A+\rho
I$ Hurwitz, then there exists an immersion
$T:\mathcal{O}\rightarrow\mathbb{R}^{(2n+1)}$ solving the PDEs (3).

The above theorem clarifies that as long as the spectrum of $A$ is restricted
to the left of $-\rho+i\mathbb{R}$, the LTI dynamics in the KKL observer can
be almost arbitrarily assigned. Once $(A,B)$ are chosen, the remaining
question for synthesis a KKL observer (2) is to numerically determine the
solution. In view of the computational challenge in directly solving the PDEs
(3) and the recent trend of handling the problem by neural approaches [19, 20,
21], this work will seek to approximate $T^{\dagger}$ by a neural network.
Yet, instead of using a vanilla multi-layer perceptron architecture, a
Lipschitz-bounded neural network will be adopted, which safeguards the
generalization performance of state observation, which will be discussed in
§III. This overall idea is illustrated in Fig. 1.

Figure 1: KKL observer with a Lipschitz-bounded neural network to be trained.

###  II-B Lipschitz-Bounded Neural Networks

Consider a $\nu$-layer neural network $\hat{x}=S(z,\theta)$ with all
parameters denoted as a single vector $\theta$. Without loss of generality,
assume that the activation function (element-wise applied to vectors) is
$\sigma:\mathbb{R}\rightarrow\mathbb{R}$, with slope bounded in $[0,1]$ (in
this work, rectified linear units (ReLU) are used to prevent gradient decay in
BP training). The neural network then can be expressed as

$\displaystyle
z^{\ell+1}=\sigma(W^{\ell}z^{\ell}+b^{\ell}),\enskip\ell=0,\dots,\nu-1$ (4)
$\displaystyle z^{0}=z,\quad\hat{x}=W^{\nu}z^{\nu}+b^{\nu}.$

where $W^{0},\dots,W^{\nu}$ are the weight matrices and $b^{0},\dots,b^{\nu}$
are the biases. In total there are $\nu$ activation layers inserted between
$\nu+1$ fully connected layers. $z$ represents the inputs to the neural
network and $\hat{x}$ is the output vector, as we will use such a neural
network to approximate the $T^{\dagger}$ mapping in the KKL observer.

Given a neural network with fixed parameters
$\theta=(W^{0},b^{0},\dots,W^{\nu},b^{\nu})$, a rough estimate of the
Lipschitz constant of $S$ can be obviously obtained as

$L_{S}(\theta)=\prod_{\ell=0}^{\nu}\|W^{\ell}\|_{2},$ (5)

where $\|\cdot\|_{2}$ for a matrix refers to its operator norm induced by the
$\ell_{2}$-norm of vectors, i.e., its largest singular value. To reduce the
conservativeness, Fazlyab et al. [25] leverages the control-theoretic tool of
integral quadratic constraints to formulate the Lipschitz bound condition as a
linear matrix inequality, thus estimating the Lipschitz constants and training
Lipschitz-bounded neural networks through solving semidefinite programming
problems [27]. The pertinent matrix size, however, proportionally scales with
the total number of neurons, which results in high computational complexity
unless the neural network is very small.

The recent work of Wang and Manchester [28] proposed a _direct
parameterization_ approach to accommodate Lipschitz bound by a special design
of the neural network architecture instead of imposing extra parameter
constraints. By this approach, the training of neural networks is an
unconstrained optimization problem and is thus amenable to the typical,
computationally lightweight back-propagation (BP) routine. Wang-Manchester
direct parameterization is conceptually related to, and arguably motivated by,
the theory of controller parameterization [30, 31].

######  Definition 2 ($1$-Lipschitz sandwich layer, cf. [28]).

Given parameters $X\in\mathbb{R}^{d\times d}$, $Y\in\mathbb{R}^{c\times d}$,
$s\in\mathbb{R}^{d}$, and $b\in\mathbb{R}^{d}$, a $1$-Lipschitz sandwich layer
is defined as such a mapping
$\mathsf{\Xi}:\mathbb{R}^{c}\rightarrow\mathbb{R}^{d}$ that maps any
$h\in\mathbb{R}^{c}$ into a $\mathsf{\Xi}(h;X,Y,s,b)\in\mathbb{R}^{d}$
according to the following formulas:

$\displaystyle Z$
$\displaystyle=X-X^{\top}+Y^{\top}Y,\enskip\Psi_{s}=\mathrm{diag}(e^{s})$ (6)
$\displaystyle M_{X,Y}$ $\displaystyle=\left[(I+Z)^{-1}(I-Z)\right]^{\top},$
$\displaystyle N_{X,Y}$ $\displaystyle=\left[-2Y(I+Z)^{-1}\right]^{\top},$
$\displaystyle\mathsf{\Xi}(h)$
$\displaystyle=\sqrt{2}M_{X,Y}^{\top}\Psi_{s}\sigma(\sqrt{2}\Psi_{s}^{-1}N_{X,Y}h+b).$

It turns out that the Lipschitz constant of the above-defined sandwich layer
is guaranteed to be upper bounded by $1$ [28, Theorem 3.3]. The mapping from
the input $h$ to the output $\mathsf{\Xi}(h)$ can be regarded as comprising of
an activation layer in the midst of two fully connected layers with related
parameters. The operation from $(X,Y)$ to $(M,N)$ is known as the _Cayley
transform_. The structure and the parameters of a sandwich layer is shown in
Fig. 2.

Figure 2: A sandwich layer and its parameters.

Thus, by stacking a number of such sandwich layers after a scaling by
$\sqrt{\gamma}$ and before a non-activated half-sandwich layer (meaning a
layer containing only the terms in the parentheses of $\mathsf{\Xi}$ as in
Equation (6)), a neural network with Lipschitz bound $\gamma$ can be obtained,
for any provided $\gamma>0$.

######  Definition 3 (Wang-Manchester network).

In this work, we refer to Wang-Manchester network, $S(\cdot|\theta)$, by a
neural network in the following architecture:

$\displaystyle h^{0}$ $\displaystyle=\sqrt{\gamma}z;$ (7) $\displaystyle
h^{\ell+1}$
$\displaystyle=\mathsf{\Xi}(h^{\ell};X^{\ell},Y^{\ell},s^{\ell},b^{\ell}),\enskip\ell=0,1,\dots,\nu-1;$
$\displaystyle\hat{x}$
$\displaystyle=\sqrt{\gamma}N_{X^{\nu},Y^{\nu}}h^{\nu}+b^{\nu}.$

Here the parameters include

$\theta=\\{X^{\ell},Y^{\ell},s^{\ell},b^{\ell}\\}_{\ell=0}^{\nu-1}\cup\\{X^{\nu},Y^{\nu},b^{\nu}\\}$

which can be trained in an unconstrained way using back-propagation. The
inputs and outputs of the network are $z$ and $\hat{x}$, respectively.

The above-defined Wang-Manchester network satisfies
$\|S(\cdot|\theta)\|_{\mathrm{Lip}}\leq\gamma$. In this work, the network is
defined and trained with data using PyTorch (version 2.0.1) on Google
Colaboratory, which allows the auto-differentiation of a user-defined loss
function with respect to the neural network parameters for the parameters to
be iteratively updated.

##  III Analysis on the Generalized Loss

Here we shall provide a justification for requiring a Lipschitz bound on the
neural network. We will make the following standing assumptions on the
training data collection procedure for subsequent analysis.

######  Assumption 1 (Ergodicity).

Assume that a sample trajectory is collected from the system, whose initial
state is sampled from a probability distribution $\mathcal{F}$ on
$\mathcal{X}$. The distribution $\mathcal{F}$ is time-invariant (i.e., an
eigenmeasure of the Perron-Frobenius operator), so that any point of the
trajectory comes from $\mathcal{F}$.

Suppose that The LTI dynamics of the KKL observer, $(A,B)$, is fixed. Then the
observer states can be simulated from this linear dynamics.

######  Assumption 2 (Noisy measurements).

Assume that the input signal for this LTI system is not noise-free
measurements $y=h(x)$, but instead containing a white noise of unknown
covariance $\sigma^{2}$. In other words, the simulation from $y$ to $z$ is

$\displaystyle\dot{z}=Ax+By+w,\quad\mathbb{E}[w(t)]=0,\,\forall
t\in\mathbb{R}$ (8)
$\displaystyle\mathbb{E}[w(t)w(s)]=\delta(t-s)\sigma^{2},\,\forall
t,s\in\mathbb{R}.$

In this way, the collected sample, denoted as
$\\{(x(t_{i}),z(t_{i}))\\}_{i=1}^{m}=\\{(x_{i},z_{i})\\}_{i=1}^{m}$, in fact
satisfies the following relation:

$z_{i}=\bar{z}_{i}+v_{i},\quad\delta_{i}=\int_{-\infty}^{t_{i}}g(\tau)w(t_{i}-\tau)d\tau.$
(9)

Here $g(\tau)$ is the impulse response of LTI system $(A,B)$; $\bar{z}$ is the
value of $z(t_{i})$ that would be otherwise obtained if there were no white
noises in the output measurements.

######  Assumption 3 (Sufficient decay).

After a significantly long time $t_{\epsilon}$, $\|z-T(x)\|\leq\epsilon$ for a
small enough $z$. Here $T$ is the nonlinear immersion map specified by (3).

Then, $\|\bar{z}_{i}-T(x_{i})\|\leq\epsilon$. Thus, we may write

$z_{i}=T(x_{i})+v_{i}+v_{i}^{\prime},\quad\|v_{i}^{\prime}\|\leq\epsilon.$
(10)

Now we suppose that the sample $\\{(x_{i},z_{i})\\}_{i=1}^{m}$ is used to
train a neural network $S(\cdot|\theta)$, which gives the state observations
$\hat{x}_{i}=S(z_{i}|\theta)$, and that the resulting empirical loss, if
defined as the average squared observation error, is

$\hat{R}_{S}(\theta):=\frac{1}{m}\sum_{i=1}^{m}\|\hat{x}_{i}-x_{i}\|^{2}.$
(11)

Then we get

$\hat{R}_{S}(\theta)=\frac{1}{m}\sum_{i=1}^{m}\left\|S\left(T(x_{i})+v_{i}+v_{i}^{\prime}|\theta\right)-x_{i}\right\|^{2}.$
(12)

######  Assumption 4.

Assume that the probability distribution $\mathcal{F}$ is supported by a
compact set, i.e., if $x\sim\mathcal{F}$, then $x$ should be almost surely
bounded.

It follows that both $S(\cdot|\theta)$ and $T$ should be Lipschitz continuous.
Denote their Lipschitz constants as $L_{S}(\theta)$ and $L_{T}$, respectively.
We have

$\|S\left(T(x_{i})+\delta_{i}+\delta_{i}^{\prime}|\theta\right)-S\left(T(x_{i})|\theta\right)\|\leq
L_{S}(\theta)L_{T}(\|v_{i}\|+\epsilon).$ (13)

Denote $D$ as the essential upper bound of $\|x\|$ on the distribution
$\mathcal{F}$. As such, without loss of generality, let $S(T(0))=0$. Then
$\|x-S(T(x))\|\leq(L_{S}(\theta)L_{T}+1)D$ almost surely. Combining the above
two equations, we further get

$\displaystyle\frac{1}{m}\sum_{i=1}^{m}\|x_{i}-S(T(x_{i})|\theta)\|^{2}\leq\hat{R}_{S}(\theta)$
(14)
$\displaystyle\quad+\frac{1}{m}\sum_{i=1}^{m}L_{S}(\theta)L_{T}(L_{S}(\theta)L_{T}+1)D(\|v_{i}\|+\epsilon)$
$\displaystyle\quad+\frac{1}{m}\sum_{i=1}^{m}L_{S}^{2}(\theta)L_{T}^{2}(\|v_{i}\|+\epsilon)^{2}.$

That is,

$\displaystyle\frac{1}{m}\sum_{i=1}^{m}\|x_{i}-S(T(x_{i})|\theta)\|^{2}\leq\hat{R}_{S}(\theta)$
(15)
$\displaystyle\quad+\frac{1}{m}\sum_{i=1}^{m}(L_{S}(\theta)L_{T}+1)^{2}\left(D+\|v_{i}\|+\epsilon\right)(\|v_{i}\|+\epsilon).$

The left-hand side gives an estimation of the empirical loss when observing
the states from perfect output measurements (namely when $z_{i}=T(x_{i})$,
$i=1,\dots,m$). Further expanding the last term and applying Cauchy-Schwarz
inequality, we have

$\displaystyle\frac{1}{m}\sum_{i=1}^{m}\|x_{i}-S(T(x_{i})|\theta)\|^{2}\leq\hat{R}_{S}(\theta)+(L_{S}(\theta)L_{T}+1)^{2}\times$
(16)
$\displaystyle\quad\left[\frac{1}{m}\sum_{i=1}^{m}\|v_{i}\|^{2}+(D+2\epsilon)\left(\sum_{i=1}^{m}\|v_{i}\|^{2}\right)^{1/2}+(D+\epsilon)\epsilon\right].$

Given that $v_{i}$ is the response of LTI system $(A,B)$ to a white noise of
covariance $\sigma^{2}$, $\mathbb{E}(\|v_{i}\|^{2})=h^{2}\sigma^{2}$ where $h$
is the $H_{2}$-norm of the system $(A,B)$ where $A$ is Hurwitz. Therefore,

$\mathbb{E}\left(\frac{1}{m}\sum_{i=1}^{m}\|v_{i}\|^{2}\right)=h^{2}\sigma^{2}.$
(17)

Let $\alpha$ be a small positive number. With confidence $1-\alpha/2$, a
conservative estimation for its upper bound can be found according to Markov
inequality:

$\frac{1}{m}\sum_{i=1}^{m}\|v_{i}\|^{2}\leq\frac{1}{1-\alpha/2}h^{2}\sigma^{2}.$
(18)

Therefore,

$\displaystyle\frac{1}{m}\sum_{i=1}^{m}\|x_{i}-S(T(x_{i})|\theta)\|^{2}\leq\hat{R}_{S}(\theta)+(L_{S}(\theta)L_{T}+1)^{2}\times$
(19)
$\displaystyle\quad\left[\frac{h^{2}\sigma^{2}}{1-\alpha/2}+(D+2\epsilon)\frac{h\sigma}{\sqrt{1-\alpha/2}}+(D+\epsilon)\epsilon\right].$

Finally, we note that for $x\sim\mathcal{F}$, now that
$\|x-S(T(x)|\theta)\|\leq(L_{S}(\theta)L_{T}+1)D$ almost surely, by
Hoeffding’s inequality, for any $\varepsilon>0$,

$\displaystyle\mathbb{P}\bigg{(}\bigg{|}\frac{1}{m}\sum_{i=1}^{m}\|x_{i}-S(T(x_{i})|\theta)\|^{2}-\mathbb{E}\left(\|x-S(T(x))\|^{2}\right)\bigg{|}$
(20) $\displaystyle\geq(L_{S}(\theta)L_{T}+1)^{2}D^{2}\varepsilon\bigg{)}\leq
2\exp\left(-2m\varepsilon^{2}\right).$

Thus, with confidence $1-\alpha/2$, we have

$\displaystyle\bigg{|}\frac{1}{m}\sum_{i=1}^{m}\|x_{i}-S(T(x_{i})|\theta)\|^{2}-\mathbb{E}\left(\|x-S(T(x)|\theta)\|^{2}\right)\bigg{|}$
(21)
$\displaystyle<(L_{S}(\theta)L_{T}+1)^{2}D^{2}\sqrt{\frac{\ln(4/\alpha)}{2m}}.$

Combining (19) and (21), we have the following theorem.

######  Theorem 1.

Under the afore-mentioned assumptions, the generalization loss, defined as

$R_{S}(\theta)=\mathbb{E}\left(\|x-S(T(x)|\theta)\|^{2}\right),$ (22)

is related to the empirical loss as defined in (11) by

$R_{S}(\theta)<\hat{R}_{S}(\theta)+(L_{S}(\theta)L_{T}+1)^{2}\Delta(h,\sigma,\alpha,\epsilon).$
(23)

with confidence $1-\alpha$ ($\alpha\in(0,1)$). Here

$\displaystyle\Delta(h,\sigma,\alpha,\epsilon)=$ $\displaystyle
D^{2}\sqrt{\frac{\ln(4/\alpha)}{2m}}+\frac{h^{2}\sigma^{2}}{1-\alpha/2}$ (24)
$\displaystyle+(D+2\epsilon)\frac{h\sigma}{\sqrt{1-\alpha/2}}+(D+\epsilon)\epsilon.$

The theorem shows that the Lipschitz constant of the neural network trained
plays an important role in the generalized performance of the resulting state
observer. The effect of $L_{S}(\theta)$ is mainly that of amplifying the first
and third terms defined on the right-hand side of (24), supposing that
$\sigma$ and $\epsilon$ are small enough. These two terms respectively arise
from (i) the overall upper bound of the observation error
$\|x-S(T(x)|\theta)\|$, which acts as a coefficient before the Hoeffding term
$\sqrt{\ln(4/\alpha)/2m}$, and (ii) the effect of noisy measurements on the
observer states.

######  Remark 1.

It is noted that the performance bound stated in the above theorem can be
conservative. The conclusion that $L_{S}(\theta)$ amplifies the generalization
error and measurement noise should be considered as qualitative. The theorem
also does not suggest a tractable algorithm to optimize the selection of
$(A,B)$ along with the neural network $S(\cdot|\theta)$, as the dependence of
$L_{T}$ on $(A,B)$ is highly implicit. Hence, this paper does not consider the
problem of simultaneously training $(A,B)$ and the neural network.

##  IV Case Study

Let us consider a Lorenz system in a 3-dimensional state space with chaotic
behavior. The equation is written as:

$\displaystyle\dot{x}_{1}$ $\displaystyle=10(x_{2}-x_{1}),$ (25)
$\displaystyle\dot{x}_{2}$ $\displaystyle=x_{1}(28-10x_{3})-x_{2},$
$\displaystyle\dot{x}_{3}$ $\displaystyle=10x_{1}x_{2}-(8/3)x_{3}.$

Suppose that the measurement used for state observation is $y=x_{2}$, where a
white noise exists. We assign different values to the variance of the
measurement noise and investigate how the resulting neural network should be
chosen differently. To simulate the process we will use a sampling time of
$0.01$. The LTI part of the KKL observer, $A=-\mathrm{diag}(8,4,2,1)$ and
$B=[1,1,1,1]^{\top}$ are chosen. At the beginning of the observer simulation,
$z(0)=0$ is set as the initial condition; we simulate the dynamics until
$t=500$ and randomly collect $m=2000$ time instants between $t=20$ and $t=500$
as the training data.

Consider first the case with noiseless measurement ($\sigma=0$). The sample
$\\{(x_{i},z_{i})\\}_{i=1}^{2000}$ is plotted in Fig. 3, which shows that the
data points are representative on the forward invariant set of the system, and
that the observer states $z_{i}$ indeed captures the structure of such a
Lorenz attractor in a $4$-dimensional space. Hence, we train the Wang-
Manchester network using a randomly selected $80\%$ of the sample under the
mean-squares loss metric, and validate using the remaining $20\%$ sample
points. Stochastic gradient descent (SGD) algorithm with a learning rate of
$10^{-3}$ is used for optimization. The number of epochs is empirically tuned
to $300$. The neural network has $2$ hidden layers, each containing $8$
neurons, resulting in $292$ parameters to train in total. After training, the
Lipschitz constant is evaluated a posteriori via the semidefinite programming
approach of Fazlyab et al. [25] using cvxpy, which costs approximately $1.5$
seconds (for a randomly initialized network).

(a) $x$ sample.

(b) $z$ sample. (The $z_{1}$ component is reflected by the marker color.)

Figure 3: Sample collected from the Lorenz system.

Varying the prior bound on the Lipschitz constant, the resulting training
loss, validation loss, and the posterior Lipschitz bound obtained from the
same training conditions are illustrated in Fig. 4. The following observations
can be made from these results.

  * •

As anticipated, as the set bound on the Lipschitz bound increases, the
Lipschitz constant of the trained neural network becomes higher. The Lipschitz
constants estimated a posteriori are lower than the prior bound on the Wang-
Manchester network, validating the direct parameterization approach on
constraining the slope. On the other hand, the actually posterior Lipschitz
constant has an increasingly large lag behind the prior bound; for example,
when the prior bound is $1000$, the $L_{S}$ after training does not exceed
$300$. This indicates that even for the training objective alone, there is a
“resistance” to pursue the maximally possible Lipschitz constant.

  * •

When the Lipschitz bound is small, relaxing the restriction on $L_{S}$ is
beneficial for decreasing the training loss as well as the validation loss,
showing that the Lipschitz bound is a bottleneck causing underfitting. When
$L_{S}$ is high enough, such underfitting no longer exists; instead,
overfitting will appear, with rising training and validation losses. The
overfitting phenomenon is more significant when the noise is large. Thus,
there should be optimal values to be set as the Lipschitz bound.

  * •

Depending on the noise magnitude, the deviation of posterior Lipschitz
constant from the prior bound and the emergence of overfitting phenomenon
occur at different threshold values of the Lipschitz bound. Thus, the
Lipschitz bound to be used for neural network training should be tuned
differently as the noise intensity varies. For example, at $\sigma=1$, a
suitable choice can be $\gamma=100$, whereas at $\sigma=5$ and $\sigma=10$,
$\gamma$ can be chosen as $30$ and $10$, respectively.

Figure 4: Loss and Lipschitz constants under different prior Lipschitz bounds.
(Blue wedges: training loss, blue circles: validation loss, green circles:
prior Lipschitz bound; green wedges: posterior Lipschitz bound.)

Now suppose that at the observer design stage, the Wang-Manchester network is
trained by the simulated data from a perfect digital twin of the true
dynamics, i.e., $\sigma=0$; yet, when applying the network trained to observe
the states of the physical system, the environment is noisy. In Fig. 5, the
resulting loss (mean squared state observation error) is plotted against
varying prior Lipschitz bounds under multiple values of the environment noise
magnitude. It is seen that when the noise is low, roughly speaking, increasing
$L_{S}$ leads to monotonic decrease in the observation error within a large
range. On the other hand, when the environment is highly noisy (e.g., when
$\sigma\geq 3$), the Lipschitz bound has a severe effect on the generalization
loss, and since the achievable performance is restrictive, the fine-tuning of
Lipschitz bound as a hyperparameter becomes critical.

Figure 5: Errors of noiselessly trained observers in noisy environments.

Finally, the performance of the state observer is examined. Consider using the
network trained with noiseless simulation data under the prior Lipschitz bound
$L_{S}=10$, and applying it to environments with noise $\sigma=0.1$, $0.3$,
$1.0$, $3.0$. The trajectories of the three components of estimated states by
the observer are plotted against the true states in Fig. 6, within a time
horizon of $10$ time units. Naturally, when $\sigma$ is low, the state
estimates can well track the true states and capture the trends in the correct
directions; as $\sigma$ increases, the accuracy is lowered and the signals
constructed by the observer are more noisy, occasionally yielding incorrect
directions of evolution (e.g., on $3<t<4$ or $8<t<9$, where the states swing
between the two foils of the Lorenz attractor). Overall, the state estimates
mollifies the true state trajectories, which is due to the structure of our
KKL observer – a linear filter (LTI system) as the state dynamics and a
Lipschitz-bounded neural network as the static output map.

Figure 6: Estimated states by the observers in noisy environments.

##  V Conclusions and Discussions

This work leverages the recent tools of Lipschitz-bounded neural networks for
the synthesis of nonlinear state observers in a model-free setting. The
observer, which has a Kazantzis-Kravaris structure, turns out to have a
provable generalization performance that is related to the Lipschitz constant
of the trained neural network (which represents the mapping from the observer
states to the plant states). As such, by varying the Lipschitz bound and re-
training the neural network, the optimal training result can yield the minimum
generalized state observation error. The importance of bounding the Lipschitz
constant has been demonstrated by a numerical case study on the Lorenz system.

We implicitly assumed here that a simulator of the dynamics is available, so
that the true states’ trajectories can be used to train the neural network.
However, such ground truth for supervised learning may not actually exist in
real applications, i.e., only inputs and outputs are recorded, yet a state
observation mechanism is still needed or desired for feedback control. To this
end, the author’s recent work [32] proposed a data-driven KKL observer by
appending a kernel dimensionality reduction scheme to the LTI dynamics, thus
obtaining estimates that are diffeomorphic to the states.

Also, the current approach is yet restricted to autonomous systems. For
control purposes, it should be further extended to non-autonomous ones, where
the Bernard-Andrieu observer structure [18] is anticipated. Also, the
application of such data-driven state observers to learning control-relevant
properties of nonlinear dynamical systems and controller synthesis [33, 34] is
undergoing active research.

## References

  * [1] C. Kravaris and J. C. Kantor, “Geometric methods for nonlinear process control. 1. background,” _Ind. Eng. Chem. Res._ , vol. 29, no. 12, pp. 2295–2310, 1990.
  * [2] M. Baldea and P. Daoutidis, _Dynamics and nonlinear control of integrated process systems_. Cambridge University Press, 2012.
  * [3] J. B. Rawlings, D. Q. Mayne, and M. Diehl, _Model predictive control: Theory, computation, and design_ , 2nd ed. Nob Hill, 2017.
  * [4] S. L. Brunton, J. L. Proctor, and J. N. Kutz, “Discovering governing equations from data by sparse identification of nonlinear dynamical systems,” _Proc. Natl. Acad. Sci. U.S.A._ , vol. 113, no. 15, pp. 3932–3937, 2016.
  * [5] J. Schoukens and L. Ljung, “Nonlinear system identification: A user-oriented road map,” _IEEE Control Syst. Mag._ , vol. 39, no. 6, pp. 28–99, 2019.
  * [6] Y. M. Ren, M. S. Alhajeri, J. Luo, S. Chen, F. Abdullah, Z. Wu, and P. D. Christofides, “A tutorial review of neural network modeling approaches for model predictive control,” _Comput. Chem. Eng._ , vol. 165, p. 107956, 2022\.
  * [7] H. J. van Waarde, J. Eising, M. K. Camlibel, and H. L. Trentelman, “The informativity approach to data-driven analysis and control,” _arXiv preprint arXiv:2302.10488_ , 2023.
  * [8] T. Martin, T. B. Schön, and F. Allgöwer, “Guarantees for data-driven control of nonlinear systems using semidefinite programming: A survey,” _arXiv preprint arXiv:2306.16042_ , 2023.
  * [9] Z.-S. Hou and Z. Wang, “From model-based control to data-driven control: Survey, classification and perspective,” _Inform. Sci._ , vol. 235, pp. 3–35, 2013.
  * [10] R. Nian, J. Liu, and B. Huang, “A review on reinforcement learning: Introduction and applications in industrial process control,” _Comput. Chem. Eng._ , vol. 139, p. 106886, 2020.
  * [11] W. Tang and P. Daoutidis, “Data-driven control: Overview and perspectives,” in _American Control Conference (ACC)_. IEEE, 2022, pp. 1048–1064.
  * [12] C. Kravaris, J. Hahn, and Y. Chu, “Advances and selected recent developments in state and parameter estimation,” _Comput. Chem. Eng._ , vol. 51, pp. 111–123, 2013.
  * [13] P. Bernard, V. Andrieu, and D. Astolfi, “Observer design for continuous-time dynamical systems,” _Annu. Rev. Control_ , 2022.
  * [14] D. Luenberger, “Observers for multivariable systems,” _IEEE Trans. Autom. Control_ , vol. 11, no. 2, pp. 190–197, 1966.
  * [15] D. Simon, _Optimal state estimation: Kalman, $H_{\infty}$, and nonlinear approaches_. John Wiley & Sons, 2006.
  * [16] N. Kazantzis and C. Kravaris, “Nonlinear observer design using Lyapunov’s auxiliary theorem,” _Syst. Control Lett._ , vol. 34, no. 5, pp. 241–247, 1998.
  * [17] V. Andrieu and L. Praly, “On the existence of a Kazantzis-Kravaris/Luenberger observer,” _SIAM J. Control Optim._ , vol. 45, no. 2, pp. 432–456, 2006.
  * [18] P. Bernard and V. Andrieu, “Luenberger observers for nonautonomous nonlinear systems,” _IEEE Trans. Autom. Control_ , vol. 64, no. 1, pp. 270–281, 2018\.
  * [19] L. C. Ramos, F. Di Meglio, V. Morgenthaler, L. F. F. da Silva, and P. Bernard, “Numerical design of Luenberger observers for nonlinear systems,” in _59 th Conference on Decision and Control (CDC)_. IEEE, 2020, pp. 5435–5442.
  * [20] M. Buisson-Fenet, L. Bahr, and F. Di Meglio, “Towards gain tuning for numerical KKL observers,” _arXiv preprint_ , 2022, arXiv:2204.00318.
  * [21] M. U. B. Niazi, J. Cao, X. Sun, A. Das, and K. H. Johansson, “Learning-based design of Luenberger observers for autonomous nonlinear systems,” _arXiv preprint_ , 2022, arXiv:2210.01476.
  * [22] K. Miao and K. Gatsis, “Learning robust state observers using neural ODEs,” _arXiv preprint_ , 2022, arXiv:2212.00866.
  * [23] S. Huang, N. Papernot, I. Goodfellow, Y. Duan, and P. Abbeel, “Adversarial attacks on neural network policies,” _arXiv preprint arXiv:1702.02284_ , 2017\.
  * [24] H. Zhang, Y. Yu, J. Jiao, E. Xing, L. El Ghaoui, and M. Jordan, “Theoretically principled trade-off between robustness and accuracy,” in _Int. Conf. Mach. Learn._ PMLR, 2019, pp. 7472–7482.
  * [25] M. Fazlyab, A. Robey, H. Hassani, M. Morari, and G. Pappas, “Efficient and accurate estimation of Lipschitz constants for deep neural networks,” _Advances in Neural Information Processing Systems_ , vol. 32, 2019.
  * [26] F. Latorre, P. Rolland, and V. Cevher, “Lipschitz constant estimation of neural networks via sparse polynomial optimization,” _arXiv preprint arXiv:2004.08688_ , 2020.
  * [27] P. Pauli, A. Koch, J. Berberich, P. Kohler, and F. Allgöwer, “Training robust neural networks using lipschitz bounds,” _IEEE Control Systems Lett._ , vol. 6, pp. 121–126, 2021.
  * [28] R. Wang and I. Manchester, “Direct parameterization of lipschitz-bounded deep networks,” in _International Conference on Machine Learning_. PMLR, 2023, pp. 36 093–36 110.
  * [29] L. Brivadis, V. Andrieu, P. Bernard, and U. Serres, “Further remarks on KKL observers,” _Syst. Control Lett._ , vol. 172, p. 105429, 2023.
  * [30] M. Revay, R. Wang, and I. R. Manchester, “Recurrent equilibrium networks: Flexible dynamic models with guaranteed stability and robustness,” _IEEE Trans. Autom. Control_ , 2023, in press.
  * [31] Y. Zheng, L. Furieri, A. Papachristodoulou, N. Li, and M. Kamgarpour, “On the equivalence of youla, system-level, and input–output parameterizations,” _IEEE Trans. Autom. Control_ , vol. 66, no. 1, pp. 413–420, 2020.
  * [32] W. Tang, “Data-driven state observation for nonlinear systems based on online learning,” _AIChE J._ , vol. 69, no. (in press), p. e18224, 2023.
  * [33] W. Tang and P. Daoutidis, “Dissipativity learning control (DLC): A framework of input–output data-driven control,” _Comput. Chem. Eng._ , vol. 130, p. 106576, 2019.
  * [34] ——, “Dissipativity learning control (DLC): Theoretical foundations of input–output data-driven model-free process control,” _Syst. Control Lett._ , vol. 147, p. 104831, 2021.