Home > mpt > @polytope > polytope.m

# polytope

## PURPOSE

POLYTOPE Default constructor for the POLYTOPE object

## SYNOPSIS

function [P] = polytope(varargin)

## DESCRIPTION

```POLYTOPE Default constructor for the POLYTOPE object

POLYTOPE  Defines a new POLYTOPE object

---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------

NOTE: preferred call is P=polytope(H,K)

P = POLYTOPE     Creates an empty polytope in R^1

P = POLYTOPE(Q)  Creates polytope P={x | H x <= K} from a structure Q
Structure Q has following fields:
H       - nc x nx matrix, (Note: Required field)
K       - nc x 1  vector, (Note: Required field)
normal  - is polytope in a normalized representation,
{0=no, 1=yes}, default: 0,
minrep  - is polytope in a minimal representation,
{0=no, 1=yes}, default: 0,
xCheb   - Center of a Chebyshev ball (i.e., interior point),
RCheb   - Radius of a Chebyshev ball

Note: If Q is of POLYTOPE class then P=Q (simple copy).

P = POLYTOPE(V)  Creates polytope by making a convex hull ov the given vertices V

Following calls may be used as well
P = POLYTOPE(H,K)
P = POLYTOPE(H,K,normal)
P = POLYTOPE(H,K,normal,minrep)
P = POLYTOPE(H,K,normal,minrep,xCheb,RCheb)

---------------------------------------------------------------------------
ACCESSING INTERNAL DATA OF THE POLYTOPE STRUCTURE
---------------------------------------------------------------------------

Each polytope object is internally represented by a structure with the above
mentioned fields. It is not possible, however, to access these fields directly
from the Matlab environment using the dot (.) delimiter (e.g. P.H). To
retrieve these internal data, one has to use one of the following functions:

To access the H-representation (P.H*x <= K):
[H,K] = double(P)

To access center and radius of the Chebyshev's ball:
[xCheb,RCheb] = chebyball(P)

To get information if a polytope is in normalized representation
status = isnormal(P)

To get information if a polytope is in minimal representation
status = isminrep(P)

To get information if a polytope is fully dimensional
status = isfulldim(P)

To get information if a polytope is bounded
status = isbounded(P)

To retrieve extreme points of a polytope (i.e. the V-representation)
V = extreme(P)

Consult individual help files and/or the MPT manual for more details

---------------------------------------------------------------------------
MERGING OF POLYTOPES INTO POLYARRAYS
---------------------------------------------------------------------------

Polytopes can be concatenated into arrays of polytopes (polyarrays). Each
polyarray is again a polytope object, which allows to use them in any
overloaded function which accepts individual polytope objects (check the
manual for exceptions).

Polytopes are concatenated into arrays using the [,] operator as follows:

Q = [P1, P2, P3]

The above command creates a polyarray with 3 elements (P1, P2 and P3). Each of
these elements can be a polyarray, e.g.

R = [P4, Q, [P5, P6], P7]

A polyarray can be indexed using the standard (i) operator, i.e.

Q(2) will return the second element of polyarray Q

Check help polytope/subsref and polytope/subsasgn for more details.

---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
Q           - can be either a structure (described uppon) or a matrix with vertices
H,K         - H-representation of the polytope
normal      - set to 1 if you know the pair (H,K) is already normalized, 0 otherwise
minrep      - set to 1 if you knot the pair (H,K) is already reduced, 0 otherwise
xCheb,RCheb - user provided Chebyshev's ball parameters

---------------------------------------------------------------------------
OUTPUT
---------------------------------------------------------------------------
P   - polytope

## 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
• end END Returns the last element in a given polytope array
• hull HULL Convex hull of n polytopes
• isfulldim ISFULLDIM Checks if a polytope is full dimensional
• length LENGTH Returns number of elements in a polytope array
• normalize NORMALIZE Normalizes a given polytope
• reduce REDUCE Reduces the polytope by removing redundant inequalities
• size SIZE Returns size of the given polytope object
• mpt_error MPT_ERROR Function called if MPT toolbox is not initialized
• hull HULL Converts vertices/polytope array into an H-representation polytope
This function is called by:
• mptctrl MPTCTRL Constructor for the MPT controller object
• and AND Intersection of n polytopes
• bounding_box BOUNDING_BOX Compute a bounding box for a given polytope
• domain DOMAIN Computes polytope that is mapped to an another polytope using affine map
• envelope ENVELOPE Computes envelope of n polytopes
• extreme EXTREME Calculates extreme points of a given polytope
• facetvoronoi FACETVORONOI Computes an equivalent of voronoi diagrams for facets
• horzcat HORZCAT Concatenates polytopes into a polytope array
• intersect INTERSECT Intersection of 2 polytopes or polytope arrays
• isredundant ISREDUNDANT Check if a constraint is redundant
• minus MINUS Pontryagin difference
• mldivide MLDIVIDE Set difference
• mtimes MTIMES Polytope multiplication
• plus PLUS Minkowski sum of two polytopes
• projection PROJECTION Projection of a polytope or a polytope array
• range RANGE Affine transformation of a polytope
• reduceunion REDUCEUNION Removes redundant elements from a polytope array
• regiondiff REGIONDIFF Region difference
• regiondiffXU REGIONDIFFXU Computes region difference in lifted XU space
• slice SLICE cuts a polytope (polytope array) at prespecified values
• subsasgn SUBSASGN Indexed assignments for polytope objects
• subsref SUBSREF Indexed referencing for polytope objects
• triangulate TRIANGULATE Calculates triangulation of arbitrary polytopes
• uminus UMINUS Unary minus for a polytope
• union UNION convex union computation
• uplus UPLUS Unary plus for a polytope
• vertcat VERTCAT Concatenates polytopes into a polytope array
• mpt_probStruct MPT_PROBSTRUCT Description of the problem structure
• mpt_sysStruct MPT_SYSSTRUCT System structure description
• pwa_DI PWA_DI 2nd order PWA example with 4 PWA dynamics
• pwa_car PWA_CAR 2nd order PWA model of a car moving on road with different slopes
• reachdemo1 reachability computation demo
• verifdemo1 verification demo
• mpt_computePWATset MPT_COMPUTEPWATSET Computes a stabilizing control invariant set (+ controllers) around the origin
• mpt_getCommonSOSLyapFct MPT_GETCOMMONSOSLYAPFCT Calculates Common SOS Lyapunov function for system with additive disturbance
• mpt_getPWALyapFct MPT_GETPWALYAPFCT Calculates PWA Lyapunov function
• mpt_getPWPLyapFct MPT_GETPWPLYAPFCT Calculates Piecewise Polynomial (sum of squares) Lyapunov function
• mpt_getPWQLyapFct MPT_GETPWQLYAPFCT Calculates PWQ Lyapunov function
• mpt_getReachSubset MPT_GETREACHSUBSET Computes a subset of P which enters Pfin
• mpt_infset MPT_INFSET Calculates the maximal positively invariant set for an LTI system
• mpt_infsetPWA MPT_INFSETPWA Computes (robust) positive invariant subset for PWA systems
• mpt_maxCtrlSet MPT_MAXCTRLSET Computes the maximal robust control invariant set C_inf
• mpt_reachSets MPT_REACHSETS Computes sets of reachable states for a given system / controller
• mpt_reachXU MPT_REACHXU One-step reachability computation for an affine system
• mpt_removeOverlaps MPT_REMOVEOVERLAPS Removes overlaps from (a set of) polyhedral partitions with associated linear cost
• mpt_searchTree MPT_SEARCHTREE Computes a search-tree for a given explicit solution
• mousepoly MOUSEPOLY Allows to specify polytope by mouse-clicks
• mpt_lrs MPT_LRS Matlab implementation of the LRS algorithm
• mpt_mplp_ver1 MPT_MPLP Explicitly solves the given linear program (LP)
• mpt_mplp_ver2 MPT_MPLP Explicitly solves the given linear program (LP)
• mpt_mplp_ver3 MPT_MPLP Explicitly solves the given linear program (LP)
• mpt_mplp_ver4 MPT_MPLP Explicitly solves the given linear program (LP)
• mpt_mplp_ver5 MPT_MPLP Explicitly solves the given linear program (LP)
• mpt_mplp_ver6 MPT_MPLP Explicitly solves the given linear program (LP)
• mpt_mplp_ver7 MPT_MPLP Explicitly solves the given linear program (LP)
• mpt_norm2pwa MPT_NORM2PWA transformes a linear norm into an equivalent PWA fcn representation
• mpt_optControlPWAold MPT_OPTCONTROLPWA Solves the CFTOC problem for a given PWA system
• mpt_options MPT_OPTIONS Read / modify solver settings for MPT
• mpt_prepareDU MPT_PREPAREDU Extends system and problem matrices to deal with deltaU constraints
• mpt_prepareTracking MPT_PREPARETRACKING Extends system and problem matrices to deal with tracking
• mpt_randPWASys MPT_RANDPWASYS generates random PWA systems
• mpt_sysStructInfo MPT_SYSSTRUCTINFO Returns information about system structure
• mpt_verifyProbStruct MPT_VERIFYPROBSTRUCT Verifies the probStruct structure
• mpt_verifySysStruct MPT_VERIFYSYSSTRUCT Verifies the sysStruct structure
• mpt_yalmipDU MPT_YALMIPDU Augmentes the system to cope with deltaU constraints
• mpt_yalmipTracking MPT_YALMIPTRACKING Extends system and problem matrices to deal with tracking
• sub_computeTrajectory sub_COMPUTETRAJECTORY Calculates time evolution of state trajectories subject to control
• unitbox UNITBOX Creates a unit box centered at origin
• PWAwelldefined 1.) check if the polyhedral partition covers the whole xr-ur space defined
• hys2pwa HYS2PWA Transformation of HYSDEL model into PWA model
• mpt_pwa2sys MPT_PWA2SYS Converts structure generated by hys2pwa.m to a sysStruct structure
• mpt_blockingMatrices MPT_BLOCKINGMATRICES Constructs matrices for the CFTOC problem for move blocking strategies
• mpt_boolMinTime MPT_BOOLMINTIME Computes minimum time controller for systems with discrete inputs
• 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_iterativePWA MPT_ITERATIVEPWA Computes a time-optimal or low-complexity explicit controller for PWA systems
• mpt_mixedMinTime MPT_MIXEDMINTIME Computes minimum time controller for systems with discrete and continuous inputs
• mpt_optBoolCtrl MPT_OPTBOOLCTRL Computes optimal controller for systems with discrete inputs
• mpt_optControlPWA MPT_OPTCONTROLPWA Solves the CFTOC problem for a given PWA system
• mpt_optInfControl MPT_OPTINFCONTROL Solves the infinite-time constrained optimal control problem for LTI systems
• mpt_optInfControlPWA MPT_OPTINFCONTROLPWA Solves the infinite-time constrained optimal control problem for PWA systems
• mpt_optMixedCtrl MPT_OPTMIXEDCTRL Computes optimal controller for systems discrete and continuous inputs
• mpt_simplexContr MPT_SIMPLEXCONTR Computes a piecewise affine feedback law defined over simplices
• mpt_yalmipcftoc MPT_YALMIPCFTOC CFTOC of PWA systems
• mpt_optMerge ===============================================================================
• mpt_optMergeDivCon ===============================================================================
• tg_polyreduce
• hull HULL Converts vertices/polytope array into an H-representation polytope
• mpt_plotArrangement MPT_PLOTARRANGEMENT Plots hyperplane arrangement of a polytope in H-representation
• mpt_plotSysStruct MPT_PLOTSYSSTRUCT Plots the system partitions of a PWA system
• mpt_computeTrajectory MPT_COMPUTETRAJECTORY Calculates time evolution of state trajectories subject to control
• mpt_control MPT_CONTROL Main control routine. Computes explicit controller for a given problem
• mpt_init MPT_INIT Initializes the MPT toolbox
• mpt_mpqp MPT_MPQP Explicitly solves the given quadratic program (QP)

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