O que é DeePC?

Data-Enabled Predictive Control: controle preditivo formulado direto sobre uma trajetória de dados, sem identificar um modelo de estado da planta.

Motivação

  • Identificar um modelo é uma etapa separada, com custo e erro próprios;
  • O DeePC substitui o modelo por uma trajetória de dados persistentemente excitante, coletada uma única vez;
  • Identificação e controle viram uma única otimização.

Excitação Persistente

Seja \(w_d=(u_d,y_d)\) uma trajetória de comprimento \(T\) de um sistema LTI controlável de ordem \(n\). Sua matriz de Hankel de profundidade \(L\):

\[ H_L(w_d) = \begin{bmatrix} w_d(1) & \cdots & w_d(T-L+1) \\ \vdots & \ddots & \vdots \\ w_d(L) & \cdots & w_d(T) \end{bmatrix} \]

\(u_d\) é persistentemente excitante de ordem \(L\) se \(H_L(u_d)\) tem posto linha completo — na prática, um PRBS longo o suficiente basta.

Lema Fundamental de Willems

Se \(u_d\) é persistentemente excitante de ordem \(L+n\), toda trajetória \((u,y)\) de comprimento \(L\) é combinação linear das colunas de \(H_L(u_d), H_L(y_d)\): existe \(g\) tal que

\[ \begin{bmatrix} H_L(u_d) \\ H_L(y_d) \end{bmatrix} g = \begin{bmatrix} u \\ y \end{bmatrix} \]

(Willems et al. 2005).

A matriz de Hankel dos dados é um modelo implícito do sistema — a ponte entre a abordagem comportamental e o controle baseado em dados (Markovsky et al. 2023).

Formulação do DeePC

Particiona-se \(H_L(u_d), H_L(y_d)\) em blocos “passado” (\(T_{\text{ini}}\) linhas) e “futuro” (\(N\) linhas), \(L=T_{\text{ini}}+N\):

\[ \min_{g,\, u,\, y} \; \sum_{k=1}^{N} \|y_k - r_k\|_Q^2 + \|u_k\|_R^2 \quad \text{s.a.} \quad \begin{bmatrix} U_p \\ Y_p \\ U_f \\ Y_f \end{bmatrix} g = \begin{bmatrix} u_{\text{ini}} \\ y_{\text{ini}} \\ u \\ y \end{bmatrix} \]

\(U_p,Y_p\) fixam \(g\) ao passado recente (estimam o estado); \(U_f,Y_f\) predizem: \(y=Y_fg\), \(u=U_fg\) (Coulson et al. 2019a).

Horizonte Deslizante

  1. Atualiza-se \((u_{\text{ini}}, y_{\text{ini}})\) com as últimas medições;
  2. Resolve-se a otimização, obtendo \(u^\ast_{1:N}\);
  3. Aplica-se só \(u^\ast_1\) e repete-se.

Nota

\(T_{\text{ini}}\) precisa ser \(\geq\) à ordem do sistema, para fixar o estado inicial implícito.

Python — Dados

Sistema de 1ª ordem \(y_{k+1}=ay_k+bu_k\), usado só para gerar dados (o DeePC nunca vê \(a,b\)):

import numpy as np
rng = np.random.default_rng(0)
a, b = 0.8, 0.5

def simulate(u, y0=0.0):
    y = [y0]
    for uk in u: y.append(a*y[-1] + b*uk)
    return np.array(y[1:])

u_d = rng.choice([-1.0, 1.0], size=200)  # PRBS
y_d = simulate(u_d)

Python — Matrizes de Hankel

def hankel(x, L):
    T = len(x) - L + 1
    return np.array([x[i:i+T] for i in range(L)])

Tini, N = 2, 10
Hu, Hy = hankel(u_d, Tini+N), hankel(y_d, Tini+N)
Up, Uf = Hu[:Tini], Hu[Tini:]
Yp, Yf = Hy[:Tini], Hy[Tini:]

Up/Yp: passado (\(T_{\text{ini}}\) amostras); Uf/Yf: futuro (\(N\) amostras).

Python — Resolver e Predizer

Nova condição inicial e um degrau futuro — a partir daqui, a, b não são usados:

u_ini = rng.choice([-1.0, 1.0], size=Tini)
y_ini = simulate(u_ini)
u_fut = np.ones(N)

A = np.vstack([Up, Yp, Uf])
r = np.concatenate([u_ini, y_ini, u_fut])
g, *_ = np.linalg.lstsq(A, r, rcond=None)
y_pred = Yf @ g
y_true = simulate(u_fut, y0=y_ini[-1])

Python — Resultado

import matplotlib.pyplot as plt
fig, ax = plt.subplots()
_ = ax.plot(y_true, "o-", label="planta real")
_ = ax.plot(y_pred, "x--", label="predição DeePC")
_ = ax.legend()
plt.tight_layout(); plt.show()

Interpretação

As curvas coincidem: o Lema Fundamental garante que Yf @ g reproduz a planta exatamente, sem nunca estimar \(a\) e \(b\).

Regularização

Com ruído, \(g\) fica mal-condicionado. Solução: penalidades (Coulson et al. 2019b)

\[ \min_{g,\, u,\, y} \; \sum_{k=1}^{N} \|y_k - r_k\|_Q^2 + \|u_k\|_R^2 \;+\; \lambda_g \|g\|_2^2 \;+\; \lambda_y \|\sigma_y\|_1 \]

  • \(\lambda_g\|g\|_2^2\): regulariza \(g\) (Tikhonov);
  • \(\sigma_y\): absorve ruído em \((u_{\text{ini}},y_{\text{ini}})\);
  • Validado em conversores de potência (Huang, Zhen, et al. 2021).

Garantias Teóricas

DeePC vs. MPC Clássico

MPC clássico DeePC
Modelo Sim, \((A,B,C,D)\) Não
Identificação Separada Embutida na otimização
Ruído Modelo já filtra Exige regularização
Garantias Maduras Em consolidação (Li et al. 2025)

Aplicações

Referências

Berberich, Julian, Johannes Köhler, Matthias A. Müller, e Frank Allgöwer. 2021. «Data-Driven Model Predictive Control with Stability and Robustness Guarantees». IEEE Transactions on Automatic Control 66 (4): 1702–17. https://doi.org/10.1109/TAC.2020.3000182.
Coulson, Jeremy, John Lygeros, e Florian Dörfler. 2019a. «Data-Enabled Predictive Control: In the Shallows of the DeePC». 2019 18th European Control Conference (ECC), 307–12. https://doi.org/10.23919/ECC.2019.8795639.
Coulson, Jeremy, John Lygeros, e Florian Dörfler. 2019b. «Regularized and Distributionally Robust Data-Enabled Predictive Control». 2019 IEEE 58th Conference on Decision and Control (CDC), 2696–701. https://doi.org/10.1109/CDC40024.2019.9029447.
Dörfler, Florian, Jeremy Coulson, e Ivan Markovsky. 2023. «Bridging Direct and Indirect Data-Driven Control Formulations via Regularizations and Relaxations». IEEE Transactions on Automatic Control 68 (2): 883–97. https://doi.org/10.1109/TAC.2022.3148374.
Fiedler, Felix, e Sergio Lucia. 2021. «On the Relationship between Data-Enabled Predictive Control and Subspace Predictive Control». 2021 European Control Conference (ECC), 222–29.
Huang, Linbin, Jeremy Coulson, John Lygeros, e Florian Dörfler. 2019. «Data-Enabled Predictive Control for Grid-Connected Power Converters». 2019 IEEE 58th Conference on Decision and Control (CDC), 8130–35. https://arxiv.org/abs/1903.07339.
Huang, Linbin, Jeremy Coulson, John Lygeros, e Florian Dörfler. 2021. «Decentralized Data-Enabled Predictive Control for Power System Oscillation Damping». IEEE Transactions on Control Systems Technology 30 (3): 1065–77. https://doi.org/10.1109/TCST.2021.3088709.
Huang, Linbin, Jianzhe Zhen, John Lygeros, e Florian Dörfler. 2021. «Quadratic Regularization of Data-Enabled Predictive Control: Theory and Application to Power Converter Experiments». IFAC-PapersOnLine 54 (7): 192–97. https://doi.org/10.1016/j.ifacol.2021.08.372.
Lazar, Mircea. 2024. «Neural Data-Enabled Predictive Control». arXiv preprint arXiv:2406.08003.
Li, Xiaojie, Mingxue Yan, Xuewen Zhang, Minghao Han, Adrian Wing-Keung Law, e Xunyuan Yin. 2025. «Efficient Data-Driven Predictive Control of Nonlinear Systems: A Review and Perspectives». Digital Chemical Engineering 14: 100219. https://doi.org/10.1016/j.dche.2025.100219.
Markovsky, Ivan, Linbin Huang, e Florian Dörfler. 2023. «Data-Driven Control Based on the Behavioral Approach: From Theory to Applications in Power Systems». IEEE Control Systems Magazine 43 (5): 28–68. https://doi.org/10.1109/MCS.2023.3291638.
Willems, Jan C., Paolo Rapisarda, Ivan Markovsky, e Bart L. M. De Moor. 2005. «A Note on Persistency of Excitation». Systems & Control Letters 54 (4): 325–29. https://doi.org/10.1016/j.sysconle.2004.09.003.