Home > mpt > extras > control > mpt_iterativePWA.m

# mpt_iterativePWA

## PURPOSE

MPT_ITERATIVEPWA Computes a time-optimal or low-complexity explicit controller for PWA systems

## SYNOPSIS

function ctrlStruct=mpt_iterativePWA(sysStruct,probStruct,Options)

## DESCRIPTION

```MPT_ITERATIVEPWA Computes a time-optimal or low-complexity explicit controller for PWA systems

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

---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------
Computes the solution of a minimum-time problem for a given PWA system
x(k+1) = A_i x(k) + B_i u(k) + f_i
y(k)   = C_i x(k) + D_i u(k) + g_i
for i such that guardX(i) x(k) + guardU(i) u(k) <= guardC(i)
s.t.
(ymin, ymax, umin, umax, dumin, dumax)

---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
sysStruct           - System structure in the sysStruct format
probStruct          - Problem structure in the probStruct format

Options.iterative=0
Use reduced-switching policy (0=no, 1=yes)
Options.maxiterations=100
Maximum number of iterations
Options.lyapunov_type
a string which denotes which Lyapunov function should be computed to
testify stability of one-step controllers:
'any'  - first a PWQ function is computed, if it fails, a PWA
Lyapunov function will be computed as well
'pwq'  - only PWQ Lyapunov function
'pwa'  - only PWA Lyapunov function
'none' - do not compute any Lyapunov function; no closed-loop
stability is guaranteed
Options.verbose
Level of verbosity (see help mpt_init for more details)
Options.PWA_savemode=0
Saving intermediate results in fesibility iterations.
Options.PWA_warmend=0
Loads an intermediate result and finishes the controller calculations.
(without trying to extend the feasible region).
Loads intermediate result from iteration n. (0=Uses last iteration.)
Options.PWA_savefile='PWA_save'
Specifies filename prefix for result files.
Filename is appended with iteration number.
Options.PWA_savefilelast='PWA_lastsave'
Specifies filename for info about last sucessful iteration.
Options.PWA_warmstart=0 (Not implemented yet)
Loads intermediate result (latest or n), and continues feasibility iteration.
Options.PWA_maxTsetTime=Inf
Interrupts the feasibility iterations after specified time, and continues with
current feasible set.
Options.details
If set to 1, provides some details about the solution in
truct.details. (default value controlled by mptOptions.details)

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 + Bi*x + Ci)
Note that Ai and Bi are zero matrices, Ci contains the
step distance to the origin
Pfinal      - The maximum control invariant set as a polytope or a polyarray
dynamics    - Dynamics active in region Pn(i)
details     - Details about the solution

## CROSS-REFERENCE INFORMATION

This function calls:
• length LENGTH Returns number of regions over which the explicit control law is defined
• chebyball CHEBYBALL Computes center and radius of the largest ball inscribed in a polytope
• dimension DIMENSION Returns dimension of the given polytope
• double DOUBLE Function used to access internal properties of the given polytope
• end END Returns the last element in a given polytope array
• fliplr FLIPLR Flips array of polytopes
• isfulldim ISFULLDIM Checks if a polytope is full dimensional
• isminrep ISMINREP Checks if a given polytope is in minimal representation
• le LE Checks if polytope P is a subset of polytope Q
• length LENGTH Returns number of elements in a polytope array
• merge MERGE merges polytopes together
• minus MINUS Pontryagin difference
• polytope POLYTOPE Default constructor for the POLYTOPE object
• projection PROJECTION Projection of a polytope or a polytope array
• reduce REDUCE Reduces the polytope by removing redundant inequalities
• reduceunion REDUCEUNION Removes redundant elements from a polytope array
• regiondiff REGIONDIFF Region difference
• regiondiffXU REGIONDIFFXU Computes region difference in lifted XU space
• size SIZE Returns size of the given polytope object
• union UNION convex union computation
• unique UNIQUE Removes redundant entries from a polytope array
• mpt_computePWATset MPT_COMPUTEPWATSET Computes a stabilizing control invariant set (+ controllers) around the origin
• mpt_getPWALyapFct MPT_GETPWALYAPFCT Calculates PWA Lyapunov function
• mpt_getPWQLyapFct MPT_GETPWQLYAPFCT Calculates PWQ Lyapunov function
• mpt_removeOverlaps MPT_REMOVEOVERLAPS Removes overlaps from (a set of) polyhedral partitions with associated linear cost
• mpt_error MPT_ERROR Function called if MPT toolbox is not initialized
• mpt_isnoise MPT_ISNOISE Checks if noise object is not empty
• mpt_lti2pwa MPT_LTI2PWA Converts an LTI system to a PWA system
• mpt_statusbar Status bar function
• mpt_sysStructInfo MPT_SYSSTRUCTINFO Returns information about system structure
• mpt_verifySysProb MPT_VERIFYSYSPROB Verifies system and problem structures
• mpt_constructMatrices MPT_CONSTRUCTMATRICES Constructs matrices for the finite time constrained optimal control problem
• mpt_iterative MPT_ITERATIVE Computes a time-optimal or low-complexity explicit controller for LTI systems
• 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_maxCtrlSet MPT_MAXCTRLSET Computes the maximal robust control invariant set C_inf
• 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