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)
   details     - contains additional information:
      activeConstraints  - Cell Array which stores the active constraints 
                           of the optimizer in each region.

 see also MPT_CONTROL, MPT_OPTINFCONTROL

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003