
Controle Baseado em Dados
Universidade Federal do Pará
| Objeto | Símbolo |
|---|---|
| Estado | \(\mathbf{x} \in \mathbb{R}^n\) |
| Dinâmica discreta / contínua | \(\mathbf{x}_{k+1} = \mathbf{F}(\mathbf{x}_k)\) / \(\dot{\mathbf{x}} = \mathbf{f}(\mathbf{x})\) |
| Observável genérico (escalar) | \(g(\mathbf{x})\) |
| Vetor de observáveis escolhidos | \(\mathbf{g}(\mathbf{x}) = [\,g_1(\mathbf{x}),\ \ldots,\ g_p(\mathbf{x})\,]^T\) |
| Operador de Koopman (discreto / contínuo) | \(\mathcal{K}\) / \(\mathcal{L}\) |
| Matriz que o representa (discreto / contínuo) | \(\mathbf{K}\) / \(\mathbf{L}\) |
| Autofunção e autovalor | \(\varphi_j(\mathbf{x})\) e \(\nu_j\) |
Aviso
No exemplo deste material, \(\lambda\) e \(\mu\) são parâmetros do sistema. Por isso, os autovalores de Koopman são denotados por \(\nu\).
Um observável é qualquer função escalar do estado:
\[ g : \mathbb{R}^n \to \mathbb{R} \]
Exemplos, com \(\mathbf{x} = [x_1,\ x_2]^T\):
Tempo discreto: avaliar o observável um passo à frente.
\[ (\mathcal{K}g)(\mathbf{x}) = g\big(\mathbf{F}(\mathbf{x})\big) \qquad\Longleftrightarrow\qquad g(\mathbf{x}_{k+1}) = (\mathcal{K}g)(\mathbf{x}_k) \]
Tempo contínuo: a taxa de variação do observável ao longo da trajetória (regra da cadeia).
\[ \frac{d}{dt}\,g\big(\mathbf{x}(t)\big) = \nabla g(\mathbf{x}) \cdot \mathbf{f}(\mathbf{x}) =: (\mathcal{L}g)(\mathbf{x}) \]
Nota
O operador age sobre funções, não sobre o estado.
Para quaisquer observáveis \(g_1\), \(g_2\) e escalares \(\alpha\), \(\beta\):
\[ \mathcal{K}(\alpha g_1 + \beta g_2)(\mathbf{x}) = \alpha\, g_1(\mathbf{F}(\mathbf{x})) + \beta\, g_2(\mathbf{F}(\mathbf{x})) = \alpha\,(\mathcal{K}g_1)(\mathbf{x}) + \beta\,(\mathcal{K}g_2)(\mathbf{x}) \]
Estratégia prática: procurar um subespaço invariante de dimensão finita
Se existir, a restrição do operador a esse subespaço é uma matriz \(p \times p\).
Sistema não linear de 2ª ordem, em tempo contínuo:
\[ \dot{x}_1 = \mu\, x_1, \qquad \dot{x}_2 = \lambda\,\left(x_2 - x_1^2\right) \]
Incluir a não linearidade como um novo observável:
\[ \mathbf{g}(\mathbf{x}) = \begin{bmatrix} g_1(\mathbf{x}) \\ g_2(\mathbf{x}) \\ g_3(\mathbf{x}) \end{bmatrix} = \begin{bmatrix} x_1 \\ x_2 \\ x_1^2 \end{bmatrix} \]
A pergunta decisiva:
A derivada de cada \(g_i\) é uma combinação linear de \(g_1\), \(g_2\) e \(g_3\)?
Aplicando \(\mathcal{L}g = \nabla g \cdot \mathbf{f}\) a cada observável:
\[ \mathcal{L}g_1 = \mu\, x_1 = \mu\, g_1 \]
\[ \mathcal{L}g_2 = \lambda\, x_2 - \lambda\, x_1^2 = \lambda\, g_2 - \lambda\, g_3 \]
\[ \mathcal{L}g_3 = 2x_1 \cdot \mu x_1 = 2\mu\, x_1^2 = 2\mu\, g_3 \]
Todas as derivadas ficaram dentro de \(\{g_1,\ g_2,\ g_3\}\): o subespaço é invariante.
\[ \frac{d}{dt} \underbrace{\begin{bmatrix} x_1 \\ x_2 \\ x_1^2 \end{bmatrix}}_{\mathbf{g}} = \underbrace{\begin{bmatrix} \mu & 0 & 0 \\ 0 & \lambda & -\lambda \\ 0 & 0 & 2\mu \end{bmatrix}}_{\mathbf{L}} \begin{bmatrix} x_1 \\ x_2 \\ x_1^2 \end{bmatrix} \]
\[ \mathbf{g}(\mathbf{x}_{k+1}) = \mathbf{K}\,\mathbf{g}(\mathbf{x}_k), \qquad \mathbf{K} = e^{\mathbf{L}T_s} \]
\(\mathbf{L}\) é triangular superior: os autovalores estão na diagonal.
\[ \nu_1 = \mu, \qquad \nu_2 = \lambda, \qquad \nu_3 = 2\mu \]
Nota
Produtos de observáveis geram combinações dos autovalores originais.
Uma autofunção é um observável que evolui como um modo linear puro:
\[ \mathcal{L}\varphi = \nu\,\varphi \quad \Longrightarrow \quad \varphi\big(\mathbf{x}(t)\big) = \varphi\big(\mathbf{x}(0)\big)\, e^{\nu t} \]
No subespaço, \(\varphi(\mathbf{x}) = \mathbf{w}^T\mathbf{g}(\mathbf{x})\), em que \(\mathbf{w}\) é autovetor à esquerda de \(\mathbf{L}\):
\[ \mathbf{w}^T\mathbf{L} = \nu\,\mathbf{w}^T \]
Para \(\nu = \mu\) e \(\nu = 2\mu\), sai direto:
\[ \varphi_1(\mathbf{x}) = x_1, \qquad \varphi_3(\mathbf{x}) = x_1^2 \]
Tentativa: \(\mathbf{w} = [\,0,\ 1,\ a\,]^T\)
\[ \mathbf{w}^T\mathbf{L} = \left[\,0,\ \ \lambda,\ \ -\lambda + 2\mu a\,\right] = \lambda\,\left[\,0,\ \ 1,\ \ a\,\right] \]
\[ -\lambda + 2\mu a = \lambda a \quad \Longrightarrow \quad a = -\frac{\lambda}{\lambda - 2\mu} \]
Definindo \(b = \dfrac{\lambda}{\lambda - 2\mu}\):
\[ \boxed{\ \varphi_2(\mathbf{x}) = x_2 - b\,x_1^2\ } \]
\[ \mathcal{L}\varphi_2 = \dot{x}_2 - 2b\,x_1\dot{x}_1 = \lambda x_2 - \lambda x_1^2 - 2b\mu\, x_1^2 \]
\[ = \lambda x_2 - (\lambda + 2b\mu)\,x_1^2 \]
Com \(b(\lambda - 2\mu) = \lambda\), temos \(\lambda + 2b\mu = \lambda b\):
\[ \mathcal{L}\varphi_2 = \lambda\left(x_2 - b\,x_1^2\right) = \lambda\,\varphi_2 \quad \checkmark \]
As autofunções evoluem de forma desacoplada:
\[ \varphi_1(t) = \varphi_1(0)\,e^{\mu t}, \qquad \varphi_2(t) = \varphi_2(0)\,e^{\lambda t} \]
Voltando às variáveis originais:
\[ x_1(t) = x_1(0)\,e^{\mu t} \]
\[ x_2(t) = b\,x_1(t)^2 + \left(x_2(0) - b\,x_1(0)^2\right)e^{\lambda t} \]
A solução do sistema não linear saiu sem integrar nenhuma EDO não linear.
O conjunto de nível \(\varphi_2 = 0\) é a parábola
\[ x_2 = b\,x_1^2 \]
Dica
Autofunções são as coordenadas certas: em \((\varphi_1, \varphi_2)\), o sistema não linear vira dois modos lineares desacoplados.
Se \(\lambda = 2\mu\):
É o análogo, no espaço levantado, do caso de autovalores repetidos em sistemas lineares.
Quando o conjunto não fecha, é preciso aproximar dentro de um conjunto finito de observáveis escolhidos.
mu = -0.05; lambda = -1;
b = lambda/(lambda - 2*mu);
L = [mu 0 0; 0 lambda -lambda; 0 0 2*mu];
% Sistema nao linear (referencia)
f = @(t,x) [mu*x(1); lambda*(x(2) - x(1)^2)];
x0 = [1.5; -1]; tf = 60;
[t, x] = ode45(f, [0 tf], x0, odeset('RelTol',1e-10,'AbsTol',1e-12));
% Sistema levantado linear: g(t) = expm(L t) g(0)
g0 = [x0(1); x0(2); x0(1)^2];
g = zeros(3, numel(t));
for k = 1:numel(t)
g(:,k) = expm(L*t(k))*g0;
end
% Comparacao no plano de fase
x1g = linspace(-2, 2, 200);
plot(x(:,1), x(:,2), 'k', 'LineWidth', 2); hold on;
plot(g(1,:), g(2,:), 'r--', 'LineWidth', 1.5);
plot(x1g, b*x1g.^2, 'b:', 'LineWidth', 1.5);
grid on; xlabel('x_1'); ylabel('x_2');
legend('Nao linear (ode45)', 'Koopman (linear)', 'Variedade lenta');
fprintf('Erro maximo: %.2e\n', max(abs(x.' - g(1:2,:)), [], 'all'));S. L. Brunton, B. W. Brunton, J. L. Proctor, J. N. Kutz. Koopman invariant subspaces and finite linear representations of nonlinear dynamical systems for control. PLoS ONE, 11(2): e0150171, 2016.
S. L. Brunton, J. N. Kutz. Data-Driven Science and Engineering, capítulo sobre teoria de Koopman.
Um sistema não linear \(x_{k+1}=f(x_k)\) pode ser representado exatamente por um operador linear \(\mathcal{K}\), agindo sobre observáveis \(\phi(x)\) — ao custo de dimensão infinita (Koopman, 1931).

\(\mathcal{K}\) age sobre observáveis \(\phi:\mathcal{X}\to\mathbb{R}\) por \[(\mathcal{K}\phi)(x) = \phi(f(x))\] “Compor com \(f\)” é linear em \(\phi\), mesmo com \(f\) não linear.
O preço: \(\mathcal{K}\) atua num espaço de funções, de dimensão infinita, não sobre \(\mathcal{X}\) diretamente.
Se \(\mathcal{K}\varphi=\lambda\varphi\), então \(\varphi(x_{k+1})=\lambda\,\varphi(x_k)\) ao longo de qualquer trajetória — a autofunção evolui linearmente.
Expandindo \(x=\sum_i \varphi_i(x)\,v_i\) (os \(v_i\) são os modos de Koopman):
\[ x_k = \sum_i \lambda_i^k\, \varphi_i(x_0)\, v_i \]
Solução explícita, análoga a \(\dot x=Ax\), mas para o sistema não linear (Mezić, 2005).
DMD (Schmid, 2010): usa \(\phi(x)=x\), ajusta \(A\) tal que \(x_{k+1}\approx Ax_k\). Só funciona se a dinâmica já for quase linear.
EDMD (Williams; Kevrekidis; Rowley, 2015): enriquece com uma biblioteca \(\phi_1,\dots,\phi_n\) (monômios, RBFs, …) e ajusta \(K\) por mínimos quadrados:
\[ K = \arg\min_{K} \sum_{k} \| \phi(x_{k+1}) - K\, \phi(x_k) \|_2^2 \]
Com o preditor linear \(z_{k+1}=Kz_k+Bu_k\) (\(z=\phi(x)\)), técnicas lineares se aplicam a uma planta não linear:
Importante
A escolha da biblioteca de observáveis determina a qualidade do controlador — não há receita universal (Brunton et al., 2022).
Prof. Dr. Raphael Teixeira
Universidade Federal do Pará