16.01.2015 Views

DOTcvpSB: a Matlab Toolbox for Dynamic Optimization in Systems ...

DOTcvpSB: a Matlab Toolbox for Dynamic Optimization in Systems ...

DOTcvpSB: a Matlab Toolbox for Dynamic Optimization in Systems ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

TECHNICAL REPORT<br />

<strong>DOTcvpSB</strong>: application to other benchmarks<br />

Authors:<br />

Tomáš Hirmajer a , Eva Balsa-Canto, and Julio R. Banga<br />

E-mails:<br />

thirmajer@gmail.com<br />

ebalsa@iim.csic.es<br />

julio@iim.csic.es<br />

Web page of the project:<br />

http://www.iim.csic.es/~dotcvpsb/<br />

INSTITUTO DE INVESTIGACIONES MARINAS, IIM-CSIC<br />

Process Eng<strong>in</strong>eer<strong>in</strong>g Group<br />

Spanish Council <strong>for</strong> Scientific Research<br />

C/Eduardo Cabello 6, 36208 Vigo, Spa<strong>in</strong><br />

a Correspond<strong>in</strong>g author<br />

October 28, 2009


<strong>DOTcvpSB</strong>: a <strong>Matlab</strong> <strong>Toolbox</strong> <strong>for</strong> <strong>Dynamic</strong> <strong>Optimization</strong> <strong>in</strong> <strong>Systems</strong> Biology<br />

Contents<br />

1 Other benchmarks 4<br />

1.1 Simple batch reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />

1.2 Van der Pol oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />

Bibliography 7<br />

Page – 1


<strong>DOTcvpSB</strong>: a <strong>Matlab</strong> <strong>Toolbox</strong> <strong>for</strong> <strong>Dynamic</strong> <strong>Optimization</strong> <strong>in</strong> <strong>Systems</strong> Biology<br />

List of Figures<br />

1.1 Optimal control trajectories <strong>for</strong> the simple batch reactor. . . . . . . . . . . . . . . . . . . . . . . 5<br />

1.2 Optimal solution <strong>for</strong> the van der Pol oscillator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6<br />

Page – 2


<strong>DOTcvpSB</strong>: a <strong>Matlab</strong> <strong>Toolbox</strong> <strong>for</strong> <strong>Dynamic</strong> <strong>Optimization</strong> <strong>in</strong> <strong>Systems</strong> Biology<br />

List of Tables<br />

Page – 3


CHAPTER 1<br />

Other benchmarks<br />

1.1 SIMPLE BATCH REACTOR<br />

DOTcvp: cdop_SimpleBatchReactorA, B.m<br />

The simple batch reactor given <strong>in</strong> [3] was considered with the follow<strong>in</strong>g chemical reaction<br />

A → B → C (1.1)<br />

The parameters of the reactor are: e 1 = 18000 cal mol −1 ,e 2 = 30000 cal mol −1 ,k 10 = 0.535x10 11 m<strong>in</strong> −1 ,<br />

k 20 = 0.461x10 18 m<strong>in</strong> −1 , r = 2 cal mol −1 K −1 , β 1 = 0.53 mol l −1 , β 2 = 0.43 mol l −1 , α = e2<br />

e 1<br />

, c = k20<br />

k<br />

, and<br />

10<br />

α<br />

f<strong>in</strong>al timet F = 8.0 m<strong>in</strong>.<br />

The objective of the optimization is to maximize an amount of the product B at the f<strong>in</strong>al time<br />

subject to<br />

max<br />

u i,t i<br />

J 0 = x 2 (t F ) (1.2)<br />

ẋ 1 = −ux 1 (1.3)<br />

ẋ 2 = ux 1 −cu α x 2 (1.4)<br />

with the process: x(0) = [β 1 ;β 2 ] and decision: u(0) = [0.5] <strong>in</strong>itial variables. The decision variables have def<strong>in</strong>ed<br />

lower and upper bounds as follows: u ∈ [0.1;2.0]. The additional equality constra<strong>in</strong>t was def<strong>in</strong>ed. This constra<strong>in</strong>t<br />

holds the total time of simulation at the fixed value<br />

N∑<br />

t i = t F (1.5)<br />

i=1<br />

______________<br />

F<strong>in</strong>al results [s<strong>in</strong>gle-optimization; the scenario with the free time and with the piecewise constant control trajectory]:<br />

............. Problem name: SimpleBatchReactorA<br />

...... NLP or MINLP solver: FMINCON<br />

. Number of time <strong>in</strong>tervals: 6<br />

... IVP relative tolerance: 1.000000e-012<br />

... IVP absolute tolerance: 1.000000e-012<br />

. Sens. absolute tolerance: 1.000000e-012<br />

............ NLP tolerance: 1.000000e-010<br />

....... F<strong>in</strong>al state values: 1.704654e-001 6.794171e-001<br />

...... 1th optimal control: ...<br />

..... F<strong>in</strong>al size of the dt: 7.469692e-001 1.247365e+000 1.420018e+000 1.495831e+000 1.534227e+000 1.555590e+000<br />

..... F<strong>in</strong>al time [sum(dt)]: 8.000000e+000<br />

______________<br />

............ F<strong>in</strong>al CPUtime: ... seconds<br />

. Cost function [max(J_0)]: 0.67941706<br />

______________<br />

F<strong>in</strong>al results [s<strong>in</strong>gle-optimization; the scenario with the fixed time and with the piecewise constant control trajectory]:<br />

............. Problem name: SimpleBatchReactorB


<strong>DOTcvpSB</strong>: a <strong>Matlab</strong> <strong>Toolbox</strong> <strong>for</strong> <strong>Dynamic</strong> <strong>Optimization</strong> <strong>in</strong> <strong>Systems</strong> Biology<br />

...... NLP or MINLP solver: FMINCON<br />

. Number of time <strong>in</strong>tervals: 6<br />

... IVP relative tolerance: 1.000000e-012<br />

... IVP absolute tolerance: 1.000000e-012<br />

. Sens. absolute tolerance: 1.000000e-012<br />

............ NLP tolerance: 1.000000e-010<br />

....... F<strong>in</strong>al state values: 1.704776e-001 6.794113e-001<br />

...... 1th optimal control: ...<br />

______________<br />

............ F<strong>in</strong>al CPUtime: ... seconds<br />

. Cost function [max(J_0)]: 0.67941127<br />

______________<br />

F<strong>in</strong>al results [s<strong>in</strong>gle-optimization; the scenario with the fixed time and with the piecewise l<strong>in</strong>ear control trajectory]:<br />

............. Problem name: SimpleBatchReactorB<br />

...... NLP or MINLP solver: FMINCON<br />

. Number of time <strong>in</strong>tervals: 6<br />

... IVP relative tolerance: 1.000000e-012<br />

... IVP absolute tolerance: 1.000000e-012<br />

. Sens. absolute tolerance: 1.000000e-012<br />

............ NLP tolerance: 1.000000e-010<br />

....... F<strong>in</strong>al state values: 1.704362e-001 6.794368e-001<br />

...... 1th optimal control: ...<br />

...... 2th optimal control: ...<br />

______________<br />

............ F<strong>in</strong>al CPUtime: ... seconds<br />

. Cost function [max(J_0)]: 0.67943676<br />

0.175<br />

0.17<br />

u 1<br />

− piecewise constant (free time), max J 0<br />

= 0.67941706<br />

0.19<br />

0.18<br />

u 1<br />

− piecewise constant (fixed time), max J 0<br />

= 0.67941127<br />

u 1<br />

− piecewise l<strong>in</strong>ear (fixed time), max J 0<br />

= 0.67943676<br />

0.165<br />

0.16<br />

0.17<br />

Control variable<br />

0.155<br />

0.15<br />

0.145<br />

Control variable<br />

0.16<br />

0.15<br />

0.14<br />

0.14<br />

0.135<br />

0.13<br />

0.13<br />

0.125<br />

0 1 2 3 4 5 6 7 8<br />

Time<br />

0.12<br />

0 1 2 3 4 5 6 7 8<br />

Time<br />

Figure 1.1 – Optimal control profile <strong>for</strong> the free time scenario (left) and the control profile with the piecewise<br />

constant and l<strong>in</strong>ear approximation (right) <strong>for</strong> the simple batch reactor.<br />

1.2 VAN DER POL OSCILLATOR<br />

DOTcvp: cdop_VanDerPolOscillator.m<br />

The van der Pol oscillator problem is taken from [5] and has been solved by many authors [4; 2; 1]. In our<br />

case we have expanded this problem with two <strong>in</strong>equality constra<strong>in</strong>ts and one equality constra<strong>in</strong>t. The system with<br />

the <strong>in</strong>tegral term of the cost function is described with the follow<strong>in</strong>g set of differential equations with the vector of<br />

process <strong>in</strong>itial conditions: x(0) = [0;1;0] and with the <strong>in</strong>itial control trajectory: u(0) = [0.7]<br />

ẋ 1 = (1−x 2 2)x 1 −x 2 +u (1.6)<br />

ẋ 2 = x 1 (1.7)<br />

ẋ 3 = x 2 1 +x 2 2 +u 2 (1.8)<br />

The aim of the optimization is to m<strong>in</strong>imize the cost function <strong>in</strong> the fixed f<strong>in</strong>al time(t F = 5)<br />

m<strong>in</strong><br />

u i<br />

J 0 = x 3 (t F ) (1.9)<br />

subject to the <strong>in</strong>equality path constra<strong>in</strong>ts<br />

−0.4 ≤ x 1 (t) ≤ 0.0 (1.10)<br />

and equality constra<strong>in</strong>t at the end of the optimization<br />

x 2 (t F ) = −0.1 (1.11)<br />

The control trajectory has the boundaries def<strong>in</strong>ed as follows: u ∈ [−0.3;1]<br />

Page – 5


<strong>DOTcvpSB</strong>: a <strong>Matlab</strong> <strong>Toolbox</strong> <strong>for</strong> <strong>Dynamic</strong> <strong>Optimization</strong> <strong>in</strong> <strong>Systems</strong> Biology<br />

______________<br />

F<strong>in</strong>al results [s<strong>in</strong>gle-optimization]:<br />

............. Problem name: VanDerPolOscillator<br />

...... NLP or MINLP solver: FMINCON<br />

. Number of time <strong>in</strong>tervals: 30<br />

... IVP relative tolerance: 1.000000e-007<br />

... IVP absolute tolerance: 1.000000e-007<br />

. Sens. absolute tolerance: 1.000000e-007<br />

............ NLP tolerance: 1.000000e-005<br />

....... F<strong>in</strong>al state values: 1.009875e-002 -1.000017e-001 2.960991e+000<br />

...... 1th optimal control: ...<br />

______________<br />

............ F<strong>in</strong>al CPUtime: ... seconds<br />

. Cost function [m<strong>in</strong>(J_0)]: 2.96099523<br />

3<br />

x 1<br />

x 2<br />

2.5<br />

0.8<br />

2<br />

0.6<br />

State variables<br />

1.5<br />

1<br />

x 3<br />

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5<br />

Control variable<br />

0.4<br />

0.2<br />

0.5<br />

0<br />

0<br />

−0.5<br />

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5<br />

Time<br />

−0.2<br />

Time<br />

Figure 1.2 – Optimal state trajectories (left) with the upper and lower path constra<strong>in</strong>t <strong>for</strong> the state variable one<br />

(dotted l<strong>in</strong>es) and the control profile (right) <strong>for</strong> the van der Pol oscillator.<br />

Page – 6


Bibliography<br />

[1] E. Balsa-Canto, J. R. Banga, A. A. Alonso, and V. S. Vassiliadis. Restricted second order <strong>in</strong><strong>for</strong>mation <strong>for</strong><br />

the solution of optimal control problems us<strong>in</strong>g control vector parameterization. Journal of Process Control,<br />

12(2):243–255, 2 2002.<br />

[2] J. R. Banga, R. Irizarry-Rivera, and W. D. Seider. Stochastic optimization <strong>for</strong> optimal and model-predictive<br />

control. Computers and Chemical Eng<strong>in</strong>eer<strong>in</strong>g, 22:603–612(10), 1998.<br />

[3] S. Crescitelli and S. Nicoletti. Near optimal control of batch reactors. Chemical Eng<strong>in</strong>eer<strong>in</strong>g Science, 28:463–<br />

471, 1973.<br />

[4] P. Tanartkit and L. T. Biegler. Stable decomposition <strong>for</strong> dynamic optimization. Industrial and Eng<strong>in</strong>eer<strong>in</strong>g<br />

Chemistry Research, 34:1253–1266, 1995.<br />

[5] V. S. Vassiliadis. Computational Solution of <strong>Dynamic</strong> <strong>Optimization</strong> Problems with General Differential-<br />

Algebraic Constra<strong>in</strong>ts. PhD thesis, University of London, London, UK, 1993.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!