Comparing data-driven and ideal prediction model in MPC controller

72 Views Asked by At

I have implemented a nonlinear MPC controller for a system with assumed unknown dynamics, where the prediction model is given by a discrete NARX model according to

$$y_{k+1} = f(w_k) = f(x_k, x_{k-1}, y_k, y_{k-1}, y_{k-2})$$

for $y_{k+1} \in \mathbb{R}^{1 \times 1}$, with 2 input delays, described by $x$, and 3 output delays, denoted $y$. Here $f(\cdot)$ is approximated from available input and output data. This results in the following state space model:

$$x_{k+1} = \begin{bmatrix} y_{k+1} \\ y_{k} \\ y_{k-1} \\ u_{k-1} \end{bmatrix} = \begin{bmatrix} f(w_k) \\ y_{k} \\ y_{k-1} \\ u_{k-1} \end{bmatrix} $$

In order to compare the performance of the data-driven MPC controller, I want to compare it to an MPC controller that uses the ODE's as prediction model, as I have this available. The ODE's are discretized and implemented as a discrete difference model according to

$$z_{k+1} = g(z_k, u_k)$$

where $z_{k+1} \in \mathbb{R}^{3 \times 1}$. The prediction is obtained using that

$$ y_{k+1} = C^{T}z_{k+1}$$

where $C = \begin{bmatrix}1 & 0 & 0 \end{bmatrix}$.

I now need to formulate a NARX model using the exact prediction model. The question is now, in order to make the two controllers as comparable as possible, should the state space representation using the exact prediction model be as follows

$$x_{k+1} = \begin{bmatrix} y_{k+1} \\ y_{k} \\ y_{k-1} \\ u_{k-1} \end{bmatrix} = \begin{bmatrix} C^{T}g(z_k, u_k) \\ y_{k} \\ y_{k-1} \\ u_{k-1} \end{bmatrix} $$

Does this make sense, considering the fact that $g(z_k, u_k)$ does not depend on the entire NARX state vector as in the approximated model?

1

There are 1 best solutions below

0
On BEST ANSWER

For both scenarios, i.e., data-driven and model-based, you will have different states, outputs, and inputs. That is, for the data-driven case, let's say your MPC controller is $\mathcal{D}$ that generates the input $u_k$. Here, you have the following system $$ \begin{array}{ccl} x_{k+1} &=& \left[\begin{array}{c} f(w_k) \\ y_k \\ y_{k-1} \\ u_{k-1} \end{array}\right] \\ y_{k+1} &=& f(w_k). \end{array} $$

For the model-based scenario, let's say your MPC controller is $\mathcal{M}$ (with the same structure as $\mathcal{D}$ but having dependence on the model) that generates the input $\hat{u}_k$. Here, your system is the following $$ \begin{array}{ccl} \hat{x}_{k+1} &=& \left[\begin{array}{c} C^T z_{k+1} \\ \hat{y}_k \\ \hat{y}_{k-1} \\ \hat{u}_{k-1} \end{array}\right] \\ z_{k+1} &=& g(z_k,\hat{u}_k) \\ \hat{y}_{k+1} &=& C^T z_{k+1}. \end{array} $$

Now you can compare them in terms of energy exerted by both controllers, i.e., $$ \sum_{k=1}^T \|u_k\|_2 \quad \text{vs.} \quad \sum_{k=1}^T \|\hat{u}_k\|_2. $$ If you stabilizing or regulating, you can see the transients of $x_k$ vs. $\hat{x}_k$, etc.