# TOMLAB  
# REGISTER (TOMLAB)
# LOGIN  
# myTOMLAB
TOMLAB LOGO

« Previous « Start

3  TOMLAB /PROPT

The PROPT MATLAB Optimal Control Software is a new generation platform for solving applied optimal control (with ODE or DAE formulation) and parameters estimation problems.

The platform was developed by MATLAB Programming Contest Winner, Per Rutquist in 2008.

3.1  Description

PROPT is a combined modeling, compilation and solver engine for generation of highly complex optimal control problems. PROPT uses a pseudospectral collocation method for solving optimal control problems. This means that the solution takes the form of a polynomial, and this polynomial satisfies the DAE and the path constraints at the collocation points.

In general PROPT has five main functions:

  • Computation of the constant matrices used for the differentiation and integration of the polynomials used to approximate the solution to the trajectory optimization problem.
  • Text manipulation to turn user-supplied expressions into MATLAB code for the cost function f and constraint function c that are passed to a nonlinear programming solver in TOMLAB, ensuring that the code is compatible with MAD (TOMLAB package for automatic differentiation to achieve floating point precision for derivatives).
  • Functionality for plotting and computing a variety of information for the solution to the problem.
  • Partial automatic linearization for the following scenarios:
    • Minimal (or maximal) time problem
    • Problems with a linear objective (pure feasibility problems are also handled)
    • Linear systems with a fixed end time Integrated support for non-smooth (hybrid) optimal control problems.
  • Integrated support for non-smooth (hybrid) optimal control problems.

3.2  Modeling

The PROPT system uses equations and expressions to model optimal control problems. It is possible to define independent variables, dependent functions, scalars and constant parameters:

 t = proptIndependent('t', [0 0 0], [10 20 40]);
 problem.variables.z1 = proptScalar(0, 500 , 10);
 problem.parameters.ki0 = [1e3; 1e7; 10; 1e-3];

States and controls only differ in the sense that controls need be continuous between phases:

 x.x1 = proptState(-inf , inf , [0; 1]);
 x.u1 = proptControl(-2 , 1 , 0);

A variety of boundary, path, event and integral constraints are shown below:

 expr.x1_i = '1';                    % Starting point for x1
 expr.x1_f = '1';                    % End point for x1
 expr.x2_f = '2';                    % End point for x2
 eq.x3min    = 'x3 > 0.5 ';          % Path constraint for x3
 eq.integral = 'quad_t *x2 - 1 = 0'; % Integral constraint for x2
 eq.final3   = 'x3_f > 0.5 ';        % Final event constraint for x3
 eq.init1    = 'x1_i < 2.0 ';        % Initial event constraint x1

3.3  Example

Minimize:

J = x3(tf


subject to:

dx1
dt
 = (1−x22)*x1x2+u 
dx2
dt
 = x1 
dx3
dt
 = x12+x22+u2 
−0.3 <= u <= 1.0 
x(t0) = [0  1  0]′ 
tf = 5 


To solve the problem with PROPT the following code can be used (with 60 collocation points). The source code file for this, proptQG.m is listed below:

File: tomlab/socs/quickguide/proptQG.m

tF = 5;
t  = proptIndependent('t', 0, tF);

clear x eq expr
x.x1 = proptState(-10, 10, 0);
x.x2 = proptState(-10, 10, 1);
x.x3 = proptState(-10, 10, 0);
x.u  = proptControl(-0.3, 1, -0.01);

expr.x1_i = '0';
expr.x2_i = '1';
expr.x3_i = '0';

eq.eq1 = proptEquation('x1_t = (1-x2.^2).*x1-x2+u');
eq.eq2 = proptEquation('x2_t = x1');
eq.eq3 = proptEquation('x3_t = x1.^2+x2.^2+u.^2');

problem = proptPhase(t, x, [], eq, expr, 60);
problem.cost = 'x3_f';
problem.linobj = 1;
problem.name = 'Van Der Pol';
problem.language = 'Matlab, vectorized';

solution = proptSolve(problem);

3.4  TOMLAB /PROPT User’s Guide

For more information about how to setup and solve an optimal control problem using TOMLAB /PROPT, see the TOMLAB /PROPT User’s Guide. It is available at http://tomopt.com/tomlab/download/manuals.php.

Also, PROPT has a dedicated webpage here: http://tomdyn.com/

« Previous « Start