evaluate

Purpose

Returns the optimal control action

Syntax

u = controller.evaluate(x0)
[u, feasible] = controller.evaluate(x0)
[U, feasible, openloop] = controller.evaluate(x0)

Description

u = controller.evaluate(x0) evaluates the explicit MPC solution for the initial condition x0 and returns the first element of the optimal sequence of control inputs. If x0 is outside of the controller's domain, u will be NaN.

[u, feasible] = controller.evaluate(x0) also returns the boolean flag indicating whether x0 is inside of the controller's domain.

[u, feasible, openloop] = controller.evaluate(x0) also returns the open-loop predictions of states, inputs and outputs in openloop.X, openloop.Y, and openloop.Y, respectively. Value of the optimal cost is returned in openloop.cost.

Input Arguments

x0

Initial state.

Class: double

Output Arguments

u

Optimal control action.

Class: double

feasible

True if a feasible control actions exists for x0, false otherwise.

Class: logical

openloop

Structure containing open-loop predictions and value of the optimal cost.

Class: struct


© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk