Home > mpt > extras > control > mpt_optControl.m

# mpt_optControl

## PURPOSE

MPT_OPTCONTROL Solves the CFTOC problem for a given LTI system

## SYNOPSIS

function ctrlStruct=mpt_optControl(sysStruct,probStruct,Options)

## DESCRIPTION

MPT_OPTCONTROL Solves the CFTOC problem for a given LTI system

ctrlStruct = mpt_optControl(sysStruct,probStruct)
ctrlStruct = mpt_optControl(sysStruct,probStruct,Options)

---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------
Solves a finite horizon optimal control problem for a given LTI problem:
x(k+1)=Ax(k)+Bu(k)
y(k)=Cx(k)+Du(k)

With objective function:
min_u ||P_N x_n||_p + \sum_{i=}^horizon (||Qx||_p + ||Ru||_p)
s.t.
ymin<= y <=ymax, umin<=u<=umax, dumin<=u(t)-u(t-1)<=dumax
bndA*x<=bndb

---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
sysStruct            - System structure in the sysStruct format
probStruct           - Problem structure in the probStruct format
Options.verbose      - level of verbosity
Options.lpsolver     - which LP solver to use (help mpt_solveLP)
Options.qpsolver     - which QP solver to use (help mpt_solveQP)
Options.step_size    - length of step over a facet
Options.debug_level
Due to numerical problems tiny regions are sometimes difficult to
calculate, i.e. are not identified at all. This may create "gaps"
in the computed control law. For the exploration, these will be
jumped over and the exploration in the state space will continue.
"debug_level" can have three values:

0: No debug done
1: A tolerance is given to find gap in the region partition,
small empty regions inside the region partition will be discarded.
Note that this is generally not a problem, since the feedback law
is continuous and can therefore be interpolated easily.
Correction to the calculation of the outer hull.
2: Zero tolerance to find gap in the region partition, empty regions
if they exist, will be detected, i.e. the user will be notified.
Correction to the calculation of the outer hull.

Note: If Options is missing or some of the fields are not defined, the default
values from mptOptions will be used

---------------------------------------------------------------------------
OUTPUT
---------------------------------------------------------------------------
ctrlStruct    - Controller structure with following fields:
Pn,Fi,Gi    - for region Pn(i).H*x <= Pn.K(i) computed input is U=Fi{i}*x+Gi{i}
Ai,Bi,Ci    - cost associated to each region (x'Aix + x'Bi + Ci)
Pfinal      - Defines the feasible state space partition (i.e. union of
all regions) as Phard.H*x<=Phard.K
dynamics    - dynamics active in region Pn(i)
activeConstraints  - Cell Array which stores the active constraints
of the optimizer in each region.

## CROSS-REFERENCE INFORMATION

This function calls:
• length LENGTH Returns number of regions over which the explicit control law is defined
• end END Returns the last element in a given polytope array
• length LENGTH Returns number of elements in a polytope array
• size SIZE Returns size of the given polytope object
• mpt_error MPT_ERROR Function called if MPT toolbox is not initialized
• mpt_evalSystem MPT_EVALSYSTEM Extracts data from sysStruct and probStruct structures
• mpt_verifySysProb MPT_VERIFYSYSPROB Verifies system and problem structures
• mpt_blockingMatrices MPT_BLOCKINGMATRICES Constructs matrices for the CFTOC problem for move blocking strategies
• mpt_constructMatrices MPT_CONSTRUCTMATRICES Constructs matrices for the finite time constrained optimal control problem
• mpt_mplp MPT_MPLP Explicitly solves the given linear program (LP)
• mpt_mpqp MPT_MPQP Explicitly solves the given quadratic program (QP)
This function is called by:
• mpt_iterative MPT_ITERATIVE Computes a time-optimal or low-complexity explicit controller for LTI systems
• mpt_oneStepCtrl MPT_ONESTEPCTRL Computes low complexity controller for LTI systems
• mpt_control MPT_CONTROL Main control routine. Computes explicit controller for a given problem

Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003