Performs a constrained PWAS approximation of a pwag control function with L1 norm minimization




Given a linearSystem object, a constraints object and a control function represented as a pwag object, this function returns a pwas object which approximates the pwag control function and satisfies (at its best) the constraints. The approximation is obtained by minimizing the L1 norm of the difference between the optimal function U and the approximated one Upwas:

$$ \min_{U_{pwas}} \{ || U \textrm{--} U_{pwas} ||\} \qquad (1) $$

where $|| . ||$ denotes the L1 norm.

Any pwas function can be expressed as a weighted sum of basis functions in the form:

$$ U_{pwas}(x,w) = \sum_{j=1}^{Nbs} w_j \varphi_j(x) $$

where $\varphi_j(x)$ can be the alpha, beta or psi basis and Nbs is the number of vertices of the simplicial partition. The above functional (1) can be recast as a function of weights w in this way:

$$ \min_w \{ || U \textrm{--} \sum_{j=1}^{Nbs} w_j \varphi_j || \} \qquad (2) $$

In order to perform the minimization, the L1 norm is approximated by replacing the integral (which appears in the definition of the norm) by a sum of the functions computed in the vertices of the simplicial, irregular and mixed partition. In this way, actually, we minimize the 1-norm of a vector of points (which are the differences between optimal and approximated control in all vertices). The minimization of such a norm can be performed with an LP problem in this way:

$$ \min_{\epsilon,w} \sum_{k=1}^{N_v} \epsilon_k \qquad (3) $$

subject to:

$$ U(v_k) \textrm{--} \sum_{j=1}^{Nbs} w_j \varphi_j(v_k) \leq \epsilon_k \qquad (4) $$

$$ \textrm{--} U(v_k) + \sum_{j=1}^{Nbs} w_j \varphi_j(v_k) \leq \epsilon_k \qquad (5) $$

for k = 1, ..., Nv, being Nv the number of vertices of the simplicial, irregular and mixed partition.

The pwas approximated function is moreover requested to satisfy the constraints specified in constraints object. Such constraints involve system inputs, states or both. Moreover they could be applied not only for the current time instant but also for the following, within a given prediction horizon. All these constraints can be recast as constraints involving only Upwas, in the form

$$ G_u U_{pwas} <= W_u \qquad (6) $$

or as constraints involving Upwas and the state x:

$$ G_x U_{pwas} <= W_x + S x \qquad (7) $$

or as constraints involving Upwas, the state x and the optimal control function in future time instants (as provided by MPC technique):

$$ G U_{pwas} <= W + S x + G2 U_{next} \qquad (8) $$

Constraints (4) and (5) are imposed on all vertices of the simplicial partition, while constraints (6) are imposed on all vertices of simplicial, irregular and mixed partition lying inside the feasibility domain. The vertices of the irregular partition are the vertices of the partition of the pwag object, the vertices of the mixed partition are the vertices of the partition obtained by intersecting the simplicial with the irregular partitions. The feasibility domain is the domain in which the pwag function is defined. Constraints (5) and (6) could not be satisfied at all, due to constraints (4) and to the different partition structure. For these reason they are softened with a slack variable sigma, whose value is minimized in the optimization problem (3), which becomes

$$ \min_{\epsilon,\sigma,w} \{ \sum_{k=1}^{N_v} \epsilon_k + \tau \sum_{k=1}^{N_\sigma} \sigma_k \} \qquad (9) $$

subject to (4), (5) and

$$ \sigma_k >= 0 \qquad (10) $$

for k = 1, ..., $N_{\sigma}$.

You can choose if use a slack variable for each vertex or a unique slack variable. Constraints (6), (7) and (7) can be written in dependence of weights w and slack variable sigma in this form:

$$ A [w \ \sigma]' <= B \qquad (11) $$

Some other equality constraints can be enforced, if requested, of type:

$$ A_{eq} w = B_{eq} \qquad (12) $$

These constraints can enforce either that Upwas is equal to U in a region around the origin, or that Upwas is zero in the origin. These constraints can help achieving stability for regulation to origin problems.

At the end, this function finds a pwas function approximating the optimal one by solving (9) subject to (4), (5), (10), (11) and (12).

NOTE This function has been tested properly only with alpha bases. Some parts of the function are in phase of development.


[Upwas sigma] = L1Approx(Upwas, U, linSys, constr, options)

Input Upwas is a pwas object defining just the pwas function space (i.e. domain, partion) and type of basis function.

U is a pwag object defining the optimal control function.

linSys is a linearSystem object defining the system which is controlled by pwag controller U.

constr is a constraints object defining the constraints you want the pwas approximated controller to satisfy.

options is a structure with following fields:

Output Upwas is the approximated pwas function object.

sigma is another pwas object defining the slack variable sigma.



Copyright is with: