Bonassi_2024_NeuralDeePC_arXiv_2406.08003

📄 来源 PDF:Bonassi_2024_NeuralDeePC_arXiv_2406.08003.pdf

正文(按页提取)

第 1 页

4
2
0
2

n
u
J

2
1

]

C
O
.
h
t
a
m

[

1
v
3
0
0
8
0
.
6
0
4
2
:
v
i
X
r
a

Neural Data–Enabled Predictive Control

Mircea Lazar ∗

∗ Eindhoven University of Technology, Eindhoven, Netherlands
(e-mail: m.lazar@tue.nl)

Abstract: Data–enabled predictive control (DeePC) for linear systems utilizes data matrices
of recorded trajectories to directly predict new system trajectories, which is very appealing for
real-life applications. In this paper we leverage the universal approximation properties of neural
networks (NNs) to develop neural DeePC algorithms for nonlinear systems. Firstly, we point out
that the outputs of the last hidden layer of a deep NN implicitly construct a basis in a so-called
neural (feature) space, while the output linear layer performs affine interpolation in the neural
space. As such, we can train off-line a deep NN using large data sets of trajectories to learn the
neural basis and compute on-line a suitable affine interpolation using DeePC. Secondly, methods
for guaranteeing consistency of neural DeePC and for reducing computational complexity are
developed. Several neural DeePC formulations are illustrated on a nonlinear pendulum example.

Keywords: Predictive control, Data–driven control, Nonlinear systems, Neural networks.

1. INTRODUCTION

Data–enabled predictive control (DeePC) (Coulson et al.,
2019) is a direct data–driven control algorithm that utilizes
data matrices to predict system trajectories and compute
control actions without first identifying a parametric sys-
tem model or predictor. This is very appealing for practical
applications of model predictive control (MPC), as it sim-
plifies the MPC design and implementation. For a detailed
discussion on direct versus indirect data-driven methods
for controller design we refer to (Markovsky et al., 2023).

A unique feature of the DeePC algorithm is that it
assigns to any given predicted/future input trajectory
and past inputs and outputs a set of predicted/future
output trajectories, as explicitly pointed out in (Lazar and
Verheijen, 2022, Equation (8)). This is in contrast with
MPC or subspace predictive control (SPC) (Favoreel et al.,
1999), which assign a unique predicted output trajectory
to every predicted input trajectory. As shown in (Fiedler
and Lucia, 2021), in the case of noise free data, the set of
trajectories spanned by the DeePC prediction equations
collapses to the same unique trajectory as MPC and SPC.
However, in the case of noisy data, when SPC yields an
unbiased, least squares optimal output trajectory, the set
of trajectories spanned by the DeePC prediction equations
is richer, and it includes the SPC one. Hence, under
suitable regularization (D¨orfler et al., 2023), DeePC can
outperform MPC and SPC in the noisy data case, by
optimizing the bias/variance trade–off.

Currently, the design, implementation and stability anal-
ysis of linear DeePC are well understood, see, for ex-
ample, the recent surveys (Markovsky et al., 2023; Ver-
heijen et al., 2023) and the references therein. However,
since most real-life applications are nonlinear, there is
an increasing interest in developing DeePC formulations
for nonlinear systems. Several promising results in this
direction include using data–driven trajectory lineariza-
tion techniques (Berberich et al., 2022), kernel functions

(Huang et al., 2024) or basis functions expansion of input–
output predictors (Lazar, 2023). On the other hand, many
indirect data–driven predictive control (DPC) algorithms
exist for nonlinear systems, which typically parameterize
system dynamics or multi–step input–output predictors
using deep neural networks (NNs), see, e.g., (Masti et al.,
2020; Bonassi et al., 2021; Zarzycki and (cid:32)Lawry´nczuk, 2022;
Lazar et al., 2023). An advantage of using deep NNs is that
one does not have to choose a specific kernel or basis func-
tion for representing the predictors, as the universal ap-
proximation theorem for deep NNs is valid for any Tauber-
Wiener activation function (Chen and Chen, 1995). Also,
there are many efficient toolboxes for training NNs (Nelles,
2020; Ljung et al., 2020) and systematic guidelines for
choosing the number of hidden neurons can be found in,
e.g., (Trenn, 2008). However, similarly to linear MPC or
SPC, indirect neural DPC formulations assign to every
future input trajectory a unique future output trajectory,
corresponding to a nonlinear-least-squares-optimal neural
predictor. Once trained off–line, such predictors are used
on–line for prediction without exploiting newly measured
data for improving predictions. Therefore, it would be
of interest to develop neural-networks-based DeePC al-
gorithms that exploit on–line measurements to optimize
predictions. Alternatively, stochastic MPC methods with
on-line NN model updates, see, e.g., (Pohlodek et al.,
2023), could be considered.

In this paper we therefore develop a neural DeePC algo-
rithm for nonlinear systems by merging direct and indi-
rect approaches to data-driven control (Markovsky et al.,
2023). Firstly, we point out that the outputs of the last
hidden layer of a deep NN are implicitly forming a basis
in a so-called neural (feature) space (see, e.g., (Widrow
et al., 2013)), while the output linear layer performs affine
interpolation in the neural space. As such, we can train
off-line a deep NN using large data sets of trajectories
to learn the neural basis and compute on-line a suitable
affine interpolation using DeePC. We show that for linear

第 2 页

activation functions the original DeePC formulation is re-
covered, i.e., DeePC corresponds to a linear NN mapping.

The developed neural approach to DeePC has some de-
sirable features compared to kernel-functions-based ap-
proaches (Huang et al., 2024), e.g., it decouples the di-
mension of the space in which on-line computations are
performed from the number of data points. Moreover,
compared to (Huang et al., 2024; Lazar, 2023) it does not
require choosing a special kernel or basis function (i.e., any
Tauber-Wiener activation function can be chosen (Chen
and Chen, 1995)). Another contribution of this paper is the
Neural -DeePC-3 formulation defined in Problem 7, which
provides a very efficient regularization method for DeePC,
i.e., auxiliary variables are restricted to RpN (number of
outputs times the prediction horizon) compared with reg-
ularization methods in (D¨orfler et al., 2023; Lazar, 2023)
that employ auxiliary variables in RT with T >> pN the
number of data points.

2. PRELIMINARIES

Throughout this paper, for any finite number q ∈ N≥1
of vectors or functions {ξ1, . . . , ξq} we will make use
q ]⊤. As the
of the operator col(ξ1, . . . , ξq) := [ξ⊤
data generating system, we consider an unknown MIMO
nonlinear system with inputs u ∈ Rm and measured
outputs y ∈ Rp. For example, such a system could be
represented using a controllable and observable discrete-
time state-space model:

1 , . . . , ξ⊤

x(k + 1) = ˜f (x(k), u(k)),
y(k) = ˜h(x(k)),

k ∈ N,

(1)

where x ∈ Rn is an unknown state and ˜f , ˜h are suitable,
unkown functions. Given an initial condition x(0) and a
sequence of inputs u[0,T −1] := {u(0), . . . , u(T − 1)}, the
system (1) generates a corresponding output sequence
y[1,T ]
:= {y(1), . . . , y(T )}, which could be affected by
measurement noise.

Indirect nonlinear data–driven predictive control, see, e.g.,
(Masti et al., 2020; Lazar et al., 2023), typically uses a
multi-step predictor of the NARX type, i.e.,

y[1,N ](k) := F(uini(k), yini(k), u[0,N −1](k)),

(2)

where F := col(f1, . . . , fN ) and

uini(k) := col(u(k − Tini), . . . , u(k − 1)) ∈ RTinim,
yini(k) := col(y(k − Tini + 1), . . . , y(k)) ∈ RTinip,
and where Tini ∈ N≥1 defines the order of the NARX
dynamics (different orders can be used for inputs and
outputs, but for simplicity we use a common order).
Typically, the map F is parameterized using deep neural
networks. Above, u[0,N −1](k) := {u(0|k), . . . , u(N − 1|k)}
and y[1,N ](k) := {y(1|k), . . . , y(N |k)} denote the sequence
of predicted inputs and outputs at time k, respectively,
based on measured data uini(k), yini(k). Note that since
each fi is a MIMO predictor, it is the aggregation of several
MISO predictors, i.e., fi = col(fi,1, . . . , fi,p) where each
fi,j predicts the j-th output, i.e., for i = 1, . . . , N
yj(i|k) = fi,j(uini(k), yini(k), u[0,N −1](k)),
y(i|k) = col(y1(i|k), . . . , yp(i|k)),
where j = 1, . . . , p and p is the number of outputs.

(3)

Fig. 1. Illustration of a deep MLP NN.

For any k ≥ 0 (starting time instant in the data vector)
and j ≥ 1 (length of the data vector obtained from system
(1)), define

¯u(k, j) := col(u(k), . . . , u(k + j − 1)),
¯y(k, j) := col(y(k), . . . , y(k + j − 1)).

Then we can define the Hankel matrices:

Up := [¯u(0, Tini) . . . ¯u(T − 1, Tini)] ,
Yp := [¯y(1, Tini) . . . ¯y(T, Tini)] ,
Uf := [¯u(Tini, N ) . . . ¯u(Tini + T − 1, N )] ,
Yf := [¯y(Tini + 1, N ) . . . ¯y(Tini + T, N )] ,
where T ≥ (m + p)Tini + mN is the number of columns of
the Hankel matrices.

(4)

2.1 Deep neural networks

In this paper we will use deep multilayer perceptron
(MLP) neural networks (Nelles, 2020) for clarity of expo-
sition, but in principle the adopted approach is applicable
to other NN types as well. To define MLP NNs we consider
arbitrary Tauber-Wiener nonlinear activation functions
(Chen and Chen, 1995) σ : R → R and linear activation
functions, i.e., σlin(s) := s. Given an arbitrary vector
x ∈ Rn we define ¯σ(x) := col(σ(x1), . . . , σ(xn)), where
xi are the elements of x. Let uN N and yN N denote the
NN inputs and outputs of suitable dimensions. Next, we
can define a MLP NN map ΦN N : Rq → Rp recursively,
i.e.,

z1 := ¯σ(W1uN N + b1),
zi := ¯σ(Wizi−1 + bi), i = 2, . . . , l,

(5)

yN N := ¯σlin(Wozl + bo),

where {(Wi, bi)}i=1,...,l are the matrices with weights and
vectors with biases, respectively, of suitable dimensions,
corresponding to each hidden layer in the deep NN and
{(Wo, bo)} are the matrix of weights and the vector of
biases of the output layer. The map ΦN N (uN N ) can then
be defined as

ΦN N (uN N ) := ¯σlin(Wozl + bo) = Wozl + bo

=: WoΦHL(uN N ) + bo,

(6)

where ΦHL : Rq → RL is the map defined by the com-
position of hidden layers. ΦHL maps the deep NN inputs
from a space of dimension q into a space of dimension
L (dictated by the number of neurons in the last hidden
layer), which we refer to as the neural space. Then the

第 3 页

total deep NN map ΦN N is obtained as an affine span in
the neural space. See Figure 1 for an illustration.
Remark 1. The definition (6) of ΦN N as the affine span of
the outputs of the hidden layer map ΦHL shows that the
hidden layers of a deep NN can be regarded as implicit ba-
sis functions generated by repeating two fundamental op-
erations: affine span and passing through a scalar nonlinear
activation function. In this way, by using a simple Tauber-
Wiener activation function σ, a deep NN can generate a
basis in the neural space, i.e., the space in which ΦHL
maps the NN inputs. Indeed, although not guaranteed in
general, the outputs of the map ΦHL are very likely to
form a basis, i.e., they are linearly independent, as shown
in, e.g., (Chen and Chen, 1995; Widrow et al., 2013).

3. NEURAL DEEPC

In order to build the neural DeePC controller, we need to
define a neural network map ΦN N : R(m+p)Tini+mN →
RpN that parameterizes the multi–step input–output
NARX predictor F in (2) and the corresponding hidden
layer map ΦHL : R(m+p)Tini+mN → RL, where 1 ≤ L ≤ T
is the number of neurons in the last hidden layer. Let
(W, b) denote all the weights and biases of all the hidden
layers. Then given the Hankel data matrix

H :=

(cid:35)

(cid:34)Up
Yp
Uf

∈ R((m+p)Tini+mN )×T ,

let H:j denote the j-th column of H and define the
corresponding transformed matrix in the neural space as
¯ΦHL := [ΦHL(H:1) ΦHL(H:2) . . . ΦHL(H:T )] ∈ RL×T .

(7)
If (W, b) are fixed, then ¯ΦHL is a data matrix and, if
(W, b) are free variables, ¯ΦHL is a matrix map/function.
The last elements that need to be defined are the input
and output vectors of the neural network, i.e.,

uN N (k) := col(uini(k), yini(k), u[0,N −1](k))
yN N (k) := y[1,N ](k).

Next, let Y, U be proper polytopic sets that represent
constraints, let ls(y, u) := ∥y − yr∥2
R be a
stage cost and lN (y) a terminal cost, taken for simplicity
as ls(y, 0), where (yr, ur) are the desired output and input
references and let lg(g(k)) be a regularization cost.
Problem 2. (N eural-DeePC-1).

Q + ∥u − ur∥2

min
Ξ(k)

lN (y(N |k)) +

N −1
(cid:88)

i=0

ls(y(i|k), u(i|k)) + λlg(g(k))



subject to constraints:

¯ΦHL
1⊤

Yf

 g(k) =

(cid:34)ΦHL(uN N (k))
1
y[1,N ](k)

(cid:35)

(y[1,N ](k), u[0,N −1](k)) ∈ YN × UN

(8a)

(8b)

(8c)

where Ξ(k) := col(y[1,N ](k), u[0,N −1](k), g(k)) are the
optimization variables and 1 is a vector of ones of the
same length as g(k),
i.e., T . In principle, the hidden
layers parameters (W, b) can also be free variables that
can be computed at every time k, but then it is difficult

to guarantee that the resulting matrix

(cid:21)

(cid:20) ¯ΦHL
1⊤

will have

full–row rank and Problem 2 becomes very complex, and
most likely not solvable in real–time on–line. Therefore,
we consider that (W, b) are computed off-lline by solving
the following nonlinear least squares (NLS) problem:
(W∗, b∗, W ∗

o) := arg min (cid:13)

(cid:13)Yf − ¯ΦN N (W, b, Wo, bo)(cid:13)
2
(cid:13)
F
(9)

where ¯ΦN N := [ΦN N (H:1) ΦN N (H:2) . . . ΦN N (H:T )].
Consider then the following least squares problem that can
be used to recompute the weights and biases of the output
layer after solving the NLS (9), i.e.

o , b∗

, bLS

(W LS
o

o ) := arg min

(cid:20) ¯ΦHL(W∗, b∗)
1⊤

(cid:13)
(cid:13)
Yf − [Wo bo]
(cid:13)
(cid:13)

(cid:21)(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
F
(10)
Notice that by solving the above least squares problem,
i.e., after training the deep neural network using gradient
descent and back propagation, we necessarily improve the
data fit cost, since the new data fit cost will be either the
same or lower.

.

Next, we define the following multi–step input–output
identified predictor:

[1,N ](k) := ΦN N (uN N (k), W∗, b∗, W LS
yNLS

o

, bLS

o ).

(11)

As mentioned in the introduction, differently from the
above predictor, the neural DeePC predictor is in general
set–valued, i.e.
yN-DeePC
[1,N ]
(cid:26)

(k) ∈

(cid:21)(cid:27)

(cid:21)

(12)

Yf g(k) :

g(k) =

(cid:20) ¯ΦHL
1⊤

(cid:20)ΦHL(uN N (k))
1

,

where the NLS optimal parameters (W∗, b∗) are used in
the map ΦHL. To analyze the relation between the above
defined multi–step input–output predictors we introduce
the following definition.
Definition 3. Two models {M1, M2} of system (1) are
called equivalent if for every constraints admissible input
sequence u[0,N −1] and initial condition it holds that

∥yM1

[1,N ] − y[1,N ]∥ = ∥yM2

[1,N ] − y[1,N ]∥,

(13)

where y[1,N ] is the true system (1) output.

Notice that one way to establish model equivalence is to
show that yM1
[1,N ]. Next, define

[1,N ] = yM2

Sg :=
(cid:40)(cid:20) ¯ΦHL
1⊤

(cid:21)† (cid:20)ΦHL(uN N (k))

(cid:21)

1

+ ˆg : ˆg ∈ N

(cid:18)(cid:20) ¯ΦHL
1⊤

(cid:21)(cid:19)(cid:41)

,

where N (·) denotes the null-space and M † denotes the
pseudo–inverse of M .
Theorem 4. Consider the nonlinear least squares opti-
mal prediction model (11) and the neural DeePC pre-
diction model (12) defined using the same set of data
{Up, Yp, Uf , Yf } generated using system (1) and the
(cid:21)
(cid:20) ¯ΦHL
1⊤

same map ΦHL(W∗, b∗). Assume that the matrix
(cid:21)
(cid:20) ¯ΦHL
1⊤

has full row–rank. Let E := Yf −(cid:2)W LS
matrix of residuals of the least squares problem (10). Then

be the

bLS
o

(cid:3)

o

第 4 页

the neural DeePC prediction model (12) is equivalent with
the nonlinear least squares optimal prediction model (11)

if and only if E ˆg = 0 for all ˆg ∈ N

(cid:18)(cid:20) ¯ΦHL
1⊤

(cid:21)(cid:19)
.

Proof. From (12), it follows that
(cid:20) ¯ΦHL
1⊤

g(k) =

(cid:21)
(cid:20)ΦHL(uN N (k))
1

(cid:21)

and thus all variables g(k) that satisfy this system of
equations satisfy g(k) ∈ Sg. Therefore, all predicted
outputs generated by neural DeePC satisfy
yN-DeePC
[1,N ]

Problem 6. (N eural-DeePC-2).

min
Ξ(k)

lN (y(N |k)) +

N −1
(cid:88)

i=0

ls(y(i|k), u(i|k)) + λlg(ˆg(k))

(cid:21)

(cid:21)

ˆg(k) =

subject to constraints:
(cid:20) ¯ΦHL
1⊤
(cid:32)(cid:20) ¯ΦHL
1⊤

(cid:20)0
0

Yf

1

(cid:21)† (cid:20)ΦHL(uN N (k))

(14a)

(14b)

(cid:21)

(cid:33)

+ ˆg(k)

= y[1,N ](k)

(k) ∈
(cid:32)(cid:20) ¯ΦHL
1⊤

{Yf

(cid:21)† (cid:20)ΦHL(uN N (k))

(cid:21)

(cid:33)

+ ˆg

: ˆg ∈ N

1

(cid:18)(cid:20) ¯ΦHL
1⊤

(cid:21)(cid:19)

}

(y[1,N ](k), u[0,N −1](k)) ∈ YN × UN

(14c)

(14d)

Then it holds that
(cid:18)

Yf ˆg =

E + (cid:2)W LS

o

(cid:3)

bLS
o

= E ˆg + (cid:2)W LS

o

(cid:3)

bLS
o

(cid:21)(cid:19)

ˆg

(cid:20) ¯ΦHL
1⊤
(cid:20) ¯ΦHL
1⊤

(cid:21)

ˆg = E ˆg.

Since (W LS

o

, bLS

o ) = Yf

yN-DeePC
[1,N ]

(k) = Yf

(cid:20) ¯ΦHL
1⊤

it follows that

(cid:21)†

(cid:20) ¯ΦHL
1⊤
(cid:21)† (cid:20)ΦHL(uN N (k))

if and only if E ˆg = 0 for all ˆg ∈ N

(cid:21)

= yNLS

[1,N ](k)

1
(cid:18)(cid:20) ¯ΦHL
1⊤

(cid:21)(cid:19)

. (cid:50)

In general the matrix of residuals E will not be identically
zero, even in the case of noise free data, and thus, it is
necessary to use a suitable regularization cost in neural
DeePC, that penalizes the deviation of yN-DeePC
from
[1,N ]
yNLS
[1,N ]. To this end, define the vector of variables
(cid:21)
(cid:20) ¯ΦHL
1⊤

(cid:21)† (cid:20)ΦHL(uN N (k))

gNLS(k) :=

1

[1,N ]

(k) → yNLS

and the regularization cost lg(g(k)) := ∥g(k) − gNLS(k)∥2
2
in (8a). Indeed, in this case for λ → ∞ in (8a) we have
that yN-DeePC
[1,N ](k). For a finite, sufficiently
large value of λ > 0 neural DeePC will optimize the
bias/variance trade–off with respect to the NLS optimal
predictor (11).
Remark 5. It is relatively straightforward to observe that
the original DeePC algorithm for linear (or affine) systems
can be recovered as a special case of neural DeePC, i.e.,
Problem 2. Indeed, by choosing σ = σlin for all the neurons
in all the hidden layers, there exists a set of weights and
biases {(Wi, bi))}i=1,...,l (the weights should be set equal
to 0 or 1, and the biases should be set to 0) such that
ΦHL(uN N ) = uN N and thus ¯ΦHL = H. Hence, the
original DeePC algorithm corresponds to a linear neural
network map with the hidden layer parameters fixed to
specific (0 or 1) values.

3.1 Computationally efficient neural DeePC formulations

The regularization cost lg(g(k)) := ∥g(k) − gNLS(k)∥2
2 is
highly nonlinear and has a non–sparse structure, which
leads to a computationally complex Problem 2. Therefore,
consider the alternative formulation of neural DeePC.

[1,N ]

(k) → yNLS

where Ξ(k) := col(y[1,N ](k), u[0,N −1](k), ˆg(k)) are the
optimization variables and lg(ˆg(k)) := ∥ˆg(k)∥2
2. It is
clear that the neural DeePC formulation in Problem 6 is
equivalent with the one in Problem 2, as the predicted
outputs y[1,N ](k) are equivalently parameterized in the
two problems. Moreover, when λ → ∞ in Problem 6
we obtain ˆg(k) → 0 and thus yN-DeePC
[1,N ](k).
However, in this case, the regularization cost is greatly
simplified, which improves computational efficiency.
Still, since both g(k) and ˆg(k) are vectors in RT , where T
is the data length that can be large, especially for nonlinear
systems. Therefore we propose next an alternative formu-
lation of Problem 6, where we aim to substitute Yf ˆg(k)
by a new vector of variables ˜g(k) ∈ RpN . Note that if Yf
has full row–rank, we can parameterize ˆg(k) as Y†
f ˜g(k).
We point out that this approach is novel also compared to
the regularization methods proposed in (Lazar, 2023).
Problem 7. (N eural-DeePC-3).

min
Ξ(k)

lN (y(N |k)) +

N −1
(cid:88)

i=0

ls(y(i|k), u(i|k)) + λlg(˜g(k))

(cid:21)

Y†

subject to constraints:
(cid:20) ¯ΦHL
1⊤
(cid:20) ¯ΦHL
1⊤

f ˜g(k) = 0
(cid:21)† (cid:20)ΦHL(uN N (k))

Yf

1

(15a)

(15b)

(cid:21)

+ ˜g(k) = y[1,N ](k)

(y[1,N ](k), u[0,N −1](k)) ∈ YN × UN

(15c)

(15d)

where Ξ(k) := col(y[1,N ](k), u[0,N −1](k), ˜g(k)) are the
optimization variables and lg(˜g(k)) := ∥˜g(k)∥2
2.

In Problem 7 the free variables of DeePC are now mapped
into the predicted output space of dimension pN , which is
typically much smaller than T . The price to pay is less free
variables for optimizing the bias/variance trade–off and it
is necessary that the output data matrix Yf has full row–
rank. In the formulation of Problem 7, when λ → ∞, we
have that ˜g(k) → 0 and thus yN-DeePC
[1,N ](k). To
avoid numerical instability, slack variables can be added
on the right hand side of (15b) and penalized in the cost
function, as also done in linear DeePC.

(k) → yNLS

[1,N ]

第 5 页

Formulation
N eural-DeePC-1
N eural-DeePC-2
N eural-DeePC-3

JIAE
24.51
24.62
24.62
Table 1. Performance & mean CPU time.

Jtrack
3759
3777
3776

JISE
16.24
16.32
16.32

Ju
401
401
401

CPU (s)
91
24
0.39

4. ILLUSTRATIVE EXAMPLE

Consider the following pendulum model (Dalla Libera and
Pillonetto, 2022):

J ¨θ = u − b ˙θ −

1
2

M Lg sin(θ),

(16)

where u and θ are the system input torque and pendulum
angle, while J = M L2
3 kg m2, M = 1kg and L = 1m are
the moments of inertia, mass and length of the pendulum.
Moreover, g = 9.81m/s2 is the gravitational acceleration,
and b = 0.1N s/m is the damping coefficient. One can
model the pendulum dynamics using a state-space model
discretized using Forward-Euler at Ts = 0.033s as

(cid:21)

(cid:20)x1(k + 1)
x2(k + 1)

=

−

(cid:34)

1 −

bTs
J

Ts
(cid:34) M LgTs
2J

(cid:21)

(cid:35) (cid:20)x1(k)
0
x2(k)
1

+

(cid:35)

(cid:34) Ts
J
0

u(k)

(cid:35)

,

sin(x2(k))
0

(17)

y(k) = x2(k),

where x1(k) is the angular velocity ˙θ and x2(k) is the
angle θ. We implemented and compared the performance
and computational complexity of the 3 developed neural
DeePC formulations, using the same data set, prediction
horizon N = 10 and tracking cost function weights Q =
200 and R = 0.5. For all regularization costs we have
used λ = 1e + 4 = 104. For tuning the regularization
weight parameter λ we can make use of the Hanke-
Raus heuristic (Hanke and Raus, 1996) and (Lazar and
Verheijen, 2022, Proposition II.1), which shows that linear
DeePC with Π-regularization (D¨orfler et al., 2023) can be
equivalently written as a regularized least squares problem.
The important difference with linear DeePC is that the
control input sequence uN N (k) no longer depends linearly
on g(k) and as such, the input related stage cost function
must be omitted in the tuning procedure.

To generate the output data an open-loop identification
experiment was performed using a multisine input con-
structed with the Matlab function idinput, with the pa-
rameters Range [−4, 4], Band [0, 1], Period 1000, NumPe-
riod 1 and Sine [25, 40, 1]. The data length is 1000 and
Tini = 5 is used, as estimated in (Dalla Libera and
Pillonetto, 2022). An MLP NN was defined in PyTorch
with one hidden layer with 30 neurons and with tanh
activation function. The network was trained to find the
optimal weights and biases using the Adam optimizer.
The resulting map ΦHL is used to generate a matrix
¯ΦHL ∈ R30×990, since N = 10, the data length is 1000 and
we used Hankel matrices to generate (Up, Yp, Uf ). The
resulting ¯ΦHL matrix has full row–rank and a minimal
singular value of 0.0188.

To compare the performance and computational complex-
ity of all the derived data-driven predictive controllers
we report the following performance indexes in Table 1:
the integral squared error JISE = (cid:80)Tsim
k=1 ∥y(k) − r(k)∥2
2,
the integral absolute error JIAE = (cid:80)Tsim
k=1 ∥y(k) − r(k)∥1,
the input cost Ju = (cid:80)Tsim
k=1 ∥u(k)∥1 and the tracking cost
Jtrack = (cid:80)Tsim
2 (u(k)−ur(k))∥2
2.
The mean CPU time in seconds is also given in Ta-

2 (y(k)−yr(k))∥2

k=1 ∥Q 1

2+∥R 1

Fig. 2. Tracking performance for N eural-DeePC-1.

Fig. 3. Tracking performance for N eural-DeePC-3.

ble 1. All the predictive control optimization problem were
solved with fmincon and a standard laptop with Intel(R)
Core(TM) i7-8750H CPU 2.20GHz, 16GB RAM.

The closed–loop trajectories corresponding to N eural-
DeePC-1 are plotted in Figure 2. We observe that all the
neural DeePC controllers perform well, since the obtained
data is representative, the trained NN map is very accu-
rate, and there is no noise. Neural -DeePC-1 has slightly
better performance, especially with respect to tracking
performance. However, its computational complexity is
much higher, which is expected, since it has 990 additional
optimization variables compared to an indirect formula-
tion and it uses a non-sparse regularization cost. Simi-
lar observations can be made for Neural -DeePC-2, which
ends up being about 4 times faster than Neural -DeePC-1.
The Neural -DeePC-3 formulation (implemented with slack

020406080100120140160180-1-0.500.51ReferenceNeural-DeePC-1020406080100120140160180-3-2-10123Control input050100150200250300350-1-0.500.51ReferenceNeural-DeePC-3050100150200250300350-3-2-10123Control input

第 6 页

variables in (15b) with their squared 2-norm penalized in
the cost function by 1e+4) matches the performance of the
other Neural -DPC formulations, while achieving a much
faster computation time, which is promising for real–life
applications.

The performance of Neural -DeePC-3 on a more challeng-
ing sinusoidal reference with increasing frequency is shown
in Figure 3. In this case we have implemented Problem 7
without any slack variables, which led to occasional warn-
ings, but delivered a very promising average CPU time of
0.0748 seconds.

5. CONCLUSIONS

In this paper we have constructed a formulation of data–
enabled predictive control for nonlinear systems using deep
neural networks. This was enabled by the key observation
that the last hidden layer within a deep neural network im-
plicitly constructs a basis for the neural network outputs.
In the case of linear DeePC, the basis is simply formed
by the system trajectories, which can be equivalently rep-
resented via a deep neural network with linear activation
functions in the hidden layers. Future work will deal with
data generation, training methods and architecture design
for deep NNs with guarantees that the last hidden layer
forms a representative basis in the space of output trajec-
tories of dynamical systems.

ACKNOWLEDGEMENTS

The author gratefully acknowledges the assistance of MSc.
Mihai-Serban Popescu with constructing and training in
PyTorch the deep NNs and with generating the corre-
sponding map ΦHL for the illustrative example.

REFERENCES

Berberich, J., Koehler, J., Muller, M.A., and Allgower,
F. (2022). Linear tracking MPC for nonlinear systems
Part II: The data-driven case. IEEE Transactions on
Automatic Control.

Bonassi, F., da Silva, C.F.O., and Scattolini, R. (2021).
Nonlinear mpc for offset-free tracking of systems learned
by gru neural networks. IFAC-PapersOnLine, 54(14),
54–59. 3rd IFAC Conference on Modelling, Identifica-
tion and Control of Nonlinear Systems MICNON 2021.
Chen, T. and Chen, H. (1995). Universal approximation to
nonlinear operators by neural networks with arbitrary
activation functions and its application to dynamical
systems. IEEE Transactions on Neural Networks, 6(4),
911–917.

Coulson, J., Lygeros, J., and D¨orfler, F. (2019). Data-
Enabled Predictive Control: In the Shallows of the
DeePC. In 18th European Control Conference, 307–312.
Napoli, Italy.

Dalla Libera, A. and Pillonetto, G. (2022). Deep prediction

networks. Neurocomputing, 469, 321–329.

D¨orfler, F., Coulson, J., and Markovsky, I. (2023). Bridg-
ing direct and indirect data-driven control formulations
via regularizations and relaxations. IEEE Transactions
on Automatic Control, 68(2), 883–897.

Favoreel, W., Moor, B.D., and Gevers, M. (1999). SPC:
Subspace predictive control. IFAC Proceedings Volumes,

32(2), 4004–4009.
Beijing, China, 5-9 July.

14th IFAC World Congress 1999,

Fiedler, F. and Lucia, S. (2021). On the relationship
between data–enabled predictive control and subspace
predictive control.
In IEEE Proc. of the European
Control Conference (ECC), 222–229. Rotterdam, The
Netherlands.

Hanke, M. and Raus, T. (1996). A general heuristic
for choosing the regularization parameter in ill-posed
problems. SIAM Journal of Scientific Computing, 17(4),
956–972.

Huang, L., Lygeros, J., and D¨orfler, F. (2024). Robust
and kernelized data-enabled predictive control for non-
linear systems. IEEE Transactions on Control Systems
Technology, 32(2), 611–624.

Lazar, M. and Verheijen, P.C.N. (2022). Offset–free
data–driven predictive control.
In 2022 IEEE 61st
Conference on Decision and Control (CDC), 1099–1104.
Lazar, M. (2023). Basis functions nonlinear data-enabled
predictive control: Consistent and computationally effi-
cient formulations. arXiv, 2311.05360.

Lazar, M., Popescu, M.S., and Schoukens, M. (2023).
Nonlinear data-driven predictive control using deep sub-
space prediction networks. In 2023 62nd IEEE Confer-
ence on Decision and Control (CDC), 3770–3775.

Ljung, L., Andersson, C., Tiels, K., and Sch¨on, T.B.
(2020). Deep learning and system identification. IFAC-
PapersOnLine, 53(2), 1175–1181.
21st IFAC World
Congress.

Markovsky, I., Huang, L., and D¨orfler, F. (2023). Data-
driven control based on the behavioral approach: From
theory to applications in power systems. IEEE Control
Systems Magazine, 43(5), 28–68.

Masti, D., Smarra, F., D’Innocenzo, A., and Bemporad,
A. (2020). Learning affine predictors for mpc of non-
linear systems via artificial neural networks.
IFAC-
PapersOnLine, 53(2), 5233–5238.

Nelles, O. (ed.) (2020). Nonlinear System Identification
From Classical Approaches to Neural Networks, Fuzzy
Models, and Gaussian Processes. Lecture Notes in Con-
trol and Information Sciences. Springer, Cham, Switzer-
land. Second Edition.

Pohlodek, J., Alsmeier, H., Morabito, B., Schlauch, C.,
Savchenko, A., and Findeisen, R. (2023). Stochastic
model predictive control utilizing bayesian neural net-
works. In 2023 American Control Conference (ACC),
603–608.

Trenn, S. (2008). Multilayer perceptrons: Approximation
IEEE

order and necessary number of hidden units.
Transactions on Neural Networks, 19(5), 836–844.

Verheijen, P., Breschi, V., and Lazar, M. (2023). Hand-
book of linear data-driven predictive control: Theory,
implementation and design. Annual Reviews in Control,
56, 100914.

Widrow, B., Greenblatt, A., Kim, Y., and Park, D. (2013).
The no-prop algorithm: A new learning algorithm for
multilayer neural networks. Neural Networks, 37, 182–
188.

Zarzycki, K. and (cid:32)Lawry´nczuk, M. (2022). Advanced pre-
dictive control for gru and lstm networks. Information
Sciences, 616, 229–254.

第 7 页

(本页无文本内容)