solution strategies for dynamic optimization problems

Upload: louissigne

Post on 06-Mar-2016

23 views

Category:

Documents


0 download

DESCRIPTION

Solution Strategies for Dynamic Optimization Problems

TRANSCRIPT

  • sop

    Dynamic Optimization

    Dr. Abebe Geletu Winter Semester 2011/2012

    Ilmenau University of Technology Department of Simulation and Optimal Processes

    (SOP)

    www.tu-ilmenau.de/simulation Seite 1

  • sop Seite 2 www.tu-ilmenau.de/simulation

    Course Content Topics 1. Introduction 2. Mathematical Preliminaries - review of calculus of several variables, - numerical methods of linear and nonlinear equations 3. Numerical Methods of Differential and Differential Algebraic Equations - Euler methods, Rung Kuttat Methods, Collocation on finite elments 4. Modern Methods of Nonlinear Constrained Optimization Problems - necessary Optimality Conditions (KKT conditions) - the sequential quadratic programming (SQP) method - the interior point method (Optional) 5. Direct Methods for Dynamic Optimization Problems - An overview of the maximum principle - Direct methods Collocation on finite elements 6. Introduction to Model Predictive Control (Optional) Prerequisites: Programming under MATLAB, (Knowledge of C/C++ is advantageous)

  • sop Seite 3 www.tu-ilmenau.de/simulation

    Course Content References: J. T. Betts: Practical Methods for Control Using Nonlinear Programming. SIAM 2001. R. D. Rabinet III, et al. Applied Dynamic Programming for Optimization of Dynamical

    Systems. SIAM 2005. M. Papageorgiou: Optimierung. Oldenburg. 1996. J. Nocedal, S. J. Wright: Numerical Optimization, Springer 2006. D. E. Kirk: Optimal Control Theory, McGraw-Hill, 1992. Chiang: Elements of Dynamic Optimization, McGraw-Hill, 1992. Additional references will be cited for individual topics. Software and Resources The Matlab ODE Toolbox The Matlab Optimization Toolbox The Open Modelica Simulation Environment: http://www.openmodelica.org General Pseudospectral Optimal Control Software (GPOS): http://www.gpops.org GAMS

  • sop

    Chapter 1: Introduction

    www.tu-ilmenau.de/simulation Seite 4

    "A system is a self-contained entity with interconnected elements, process and parts. A system can be the design of nature or a human invention."

    A system is an aggregation of interactive elements.

    A system has a clearly defined boundary. Outside this boundary is the environment surrounding the system. The interaction of the system with its environment is the most vital aspect. A system responds, changes its behavior, etc. as a result of influences (impulses) from the environment.

    1.1 What is a system?

  • sop www.tu-ilmenau.de/simulation Seite 5

    1.2. Some examples of systems Water reservoir and distribution network systems

    Thermal energy generation and distribution systems Solar and/or wind-energy generation and distribution systems Transportation network systems Communication network systems Chemical processing systems Mechanical systems Electrical systems Social Systems Ecological and environmental system Biological system Financial system Planning and budget management system etc

  • sop Seite 6 www.tu-ilmenau.de/simulation

    Space and Flight Industries

    Dynamic Processes: Start up Landing Trajectory control

  • sop Seite 7 www.tu-ilmenau.de/simulation

    Chemical Industries Dynamic Processes: Start-up Chemical reactions Change of Products Feed variations Shutdown

  • sop Seite 8 www.tu-ilmenau.de/simulation

    Industrial Robot

    Dynamic Processes:

    Positionining

    Transportation

  • sop www.tu-ilmenau.de/simulation Seite 9

    1.3. Why System Analysis and Control?

    study how a system behaves under external influences predict future behavior of a system and make necessary preparations understand how the components of a system interact among each other identify important aspects of a system magnify some while subduing others, etc.

    1.3.1 Purpose of systems analysis:

  • sop www.tu-ilmenau.de/simulation Seite 10

    Strategies for Systems Analysis

    System analysis requires system modeling and simulation

    A model is a representation or an idealization of a system. Modeling usually considers some important aspects and processes of a system. A model for a system can be: a graphical or pictorial representation a verbal description a mathematical formulation indicating the interaction of components of the system

  • sop www.tu-ilmenau.de/simulation Seite 11

    1.3.1A. Mathematical Models The mathematical model of a system usually leads to a system of equations describing the nature of the interaction of the system.

    The model equations can be: time independent steady-state model equations time dependent dynamic model equations In this course, we are mainly interested in dynamical systems.

    These equations are commonly known as governing laws or model equations of the system.

    Sytems that evolove with time are known as dynamic systems.

  • sop www.tu-ilmenau.de/simulation Seite 12

    Linear Differential Equations Example RLC circuit (Ohms and Kirchhoffs Laws)

    BuAxx +=

    Examples of Dynamic models RLC Circuit

    vuLBC

    LLR

    Avi

    vi

    CC

    =

    =

    =

    =

    =

    ,0

    1 ,

    01

    1 ,x , x

    vLvi

    C

    LLR

    vi

    CC

    +

    =

    0

    1

    01

    1

  • sop

    Nonlinear Differential equations

    Example: Cart mounted inverted one-bar pendulum position of the cart : position of the cart center the angle Nonlinear Model Equations (Using Newton and DLamberts Laws)

    www.tu-ilmenau.de/simulation Seite 13

    )),(),(()( ttutxftx =

    Examples of Dynamic Models Inverted Pendulum

    x11, yx

    1

    ( )2

    111

    11112

    111111

    2

    11111111

    34

    sincos

    sincos)(

    lmI

    glmlmIxlm

    lmFlmxmm

    =

    =++

    +=++

  • sop www.tu-ilmenau.de/simulation Seite 14

    1.3.1B Simulation

    studies the response of a system under various external influences input scenarios

    for model validation and adjustment may give hint for parameter estimation

    helps identify crucial and influential characterstics (parameters) of a system

    helps investigate: instability, chaotic, bifurcation behaviors in a systems dynamic as caused by certain external influences helps identify parameters that need to be controlled

  • sop www.tu-ilmenau.de/simulation Seite 15

    1.3.1B. Simulation ... In mathematical systems theory, simulation is done by solving the governing equations of the system for

    various input scenarios.

    This requires algorithms corresponding to the type of systems model equation.

    Numerical methods for the solution of systems of equations and differential equations.

  • sop www.tu-ilmenau.de/simulation Seite 16

    1.4 Optimization of Dynamic Systems

    A system with degrees of freedom can be always manuplated to display certain useful behavior. Manuplation possibility to control Control variables are usually systems degrees of freedom.

    We ask: What is the best control strategy that forces a system to display required characterstics, output, follow a trajectory, etc?

    Optimal Control Methods of Numerical Optimization

  • sop Seite 17 www.tu-ilmenau.de/simulation

    Optimal Control of a space-shuttle

    0 1 2 Force Propulsive:)(

    Speed:)(Position:)(

    2

    1

    tutxtx

    kg) 1( Mass: =mm

    Initial States: m/s1)0( m,2)0( 21 == xx

    The shuttle has a drive engine for both launching and landing.

    Objective: To land the space vehicle at a given position , say position 0, where it could be halted after landing. Target states: Position , Speed 01 =

    Sx 02 =Sx

    What is the optimal strategy to bring the space-shuttle to the desired state with a minimum energy consumption?

  • sop Seite 18 www.tu-ilmenau.de/simulation

    Optimal Control of a space-shuttle

    0 1 2

    Force Propulsive:)(Speed:)(Position:)(

    2

    1

    tutxtx

    kg) 1( Mass: =mmModel Equations:

    )()()()()(

    2

    21

    txmtamtutxtx

    ==

    =Then

    )(1)(

    )()(

    2

    21

    tum

    tx

    txtx

    =

    =

    uxx

    xx

    +

    =

    10

    0010

    2

    1

    2

    1

    Hence BuAxx +=Objectives of the optimal control:

    Minimization of the error: )();( 2211 txxtxxSS

    Minimization of energy: )(tu

  • sop Seite 19 www.tu-ilmenau.de/simulation

    Problem formulation:

    Performance function: [ ] [ ] [ ]{ }

    ++0

    2222

    211)(

    )()(2)(21min dttutxxtxx SS

    tu

    Model (state ) equations: uxx

    xx

    +

    =

    10

    0010

    2

    1

    2

    1

    Initial states:

    0;0

    1)0(;2)0(

    21

    21

    ==

    ==SS xxxx

    Desired final states:

    How to solve the above optimal control problem in order to achieve

    the desired goal? That is, how to determine the optimal trajectories

    that provide a minimum energy consumption so

    that the shuttel can be halted at the desired position?

    )(),( *2*1 txtx )(* tu

  • sop Seite 20 www.tu-ilmenau.de/simulation

    Optimal Operation of a Batch Reactor

  • sop Seite 21 www.tu-ilmenau.de/simulation

    Optimal Operation of a Batch Reactor

    Some basic operations of a batch reactor feeding Ingredients adding chemical catalysts Raising temprature Reaction startups Reactor shutdown

    Chemical ractions: CBAorder1st order 2nd

    Initial states: 0)0(,0)0(mol/l,1)0( === CBA CCC

    Objective: What is the optimal temperature strategy, during the operation of the reactor, in order to maximize the concentration of komponent B in the final product? Allowed limits on the temperature: KTK 398298

  • sop Seite 22 www.tu-ilmenau.de/simulation

    Mathematical Formulation: Objective of the optimization: )(max

    )( fBtTtC

    BC

    BAB

    AA

    CTkdt

    dC

    CTkCTkdt

    dC

    CTkdt

    dC

    )(

    )()(

    )(

    2

    22

    1

    21

    =

    =

    =

    =

    =

    RTEkTk

    RTEkTk

    2202

    1101

    exp)(

    exp)(

    KTK 398298 0)0(,0)0(mol/l,1)0( === CBA CCC

    ftt 0

    Model equations:

    Process constraints: Initial states: Time interval: This is a nonlinear dynamic optimization problem.

  • sop www.tu-ilmenau.de/simulation Seite 23

    1.5 Optimization of Dynmaic Systems

    ( )( )( )

    0 0

    1

    2

    min max

    0 f

    min J(x, u)

    x(t) f x(t), u(t) , x(t ) x

    g x(t), u(t) 0

    g x(t), u(t) 0u u ut t t .

    with

    = =

    =

    a DAE system

    General form of a dynamic optimization problem

    DynOpt

  • sop www.tu-ilmenau.de/simulation Seite 24

    1.6. Solution strategies for dynamic optimization problems

    Solution Strategies

    Indirect Methods Direct Methods

    Dynamic Programming

    Maximum Principle

    Simultaneous Method Sequential Method

    State and control discretization

    Nonlinear Optimization

    Solution Nonlinear Optimization Algorithms

  • sop Seite 25 www.tu-ilmenau.de/simulation

    Solution strategies for dynamic optimization problems Indirect methods (classical methods)

    Calculus of variations ( before the 1950s)

    Dynamic programming (Bellman, 1953)

    The Maximum-Principle (Pontryagin, 1956)1 Lev Pontryagin

    Direct (or collocation) Methods (since the 1980s)

    Discretization of the dynamic system

    Transformation of the problem into a nonlinear optimization problem

    Solution of the resulting problem using optimization algorithms

  • sop www.tu-ilmenau.de/simulation Seite 26

    1.7. Nonlinear Optimization formulation of dynamic optimization problem

    u

    min max

    min f (x,u)

    withF(x,u) 0G(x,u) 0u u u .

    =

    After discretization of DynOpt and appropriate renaming of variables we obtain a non-linear programming problem (NLP)

    Dynamic OptimizationDr. Abebe GeletuWinter Semester 2011/2012Ilmenau University of TechnologyDepartment of Simulation and Optimal Processes (SOP)Foliennummer 2Foliennummer 3Foliennummer 4Foliennummer 5Foliennummer 6Foliennummer 7Foliennummer 8Foliennummer 9Foliennummer 10Foliennummer 11Foliennummer 12Foliennummer 13Foliennummer 14Foliennummer 15Foliennummer 16Foliennummer 17Foliennummer 18Foliennummer 19Foliennummer 20Foliennummer 21Foliennummer 22Foliennummer 23Foliennummer 24Foliennummer 25Foliennummer 26