PROPT Parametric Sensitivity Control
From TomWiki
Jump to navigationJump to search
This page is part of the PROPT Manual. See PROPT Manual. |
Optimal Parametric Sensitivity control of a fed-batch reactor
Problem description
From the paper: J.D. Stigter, K.J. Keesman, 2004, "Optimal Parametric Sensitivity control of a fed-batch reactor", Automatica, 40, 4, pp. 1459-1464.
Programmer: Gerard Van Willigenburg (Wageningen University)
% Copyright (c) 2009-2009 by Tomlab Optimization Inc.
Problem setup
toms t
t_f = 250; % Fixed final time
p = tomPhase('p', t, 0, t_f, 25);
setPhase(p)
tomStates x1 x2 x3 x4
tomControls u
% Initial state amd maximum control
xi = [0; 0; 0; 0];
umax = 20;
x = [x1; x2; x3; x4];
% Initial guess
x0 = {icollocate(x == xi)
collocate(u == umax)};
% Box constraints
cbox = {collocate({0 <= u <= umax; 0 <= x1 <= 100})};
% Boundary constraints
cbnd = initial(x == xi);
% Bio kinectic parameters
mu_m = 2.62e-4; Y = 0.64; K_S = 1.0;
X = 4e3; muXY = mu_m*X/Y;
% Sensitivity parameters
q = [1 3e-2]/250;
% Odes: state and state sensitivity dynamics
Kx1 = K_S+x1; Kx12 = Kx1*Kx1;
ceq = collocate({
dot(x1) == -muXY*x1/Kx1 + u
dot(x2) == muXY*(x1-K_S*x2)/Kx12
dot(x3) == -muXY*K_S*x3/Kx12-x1/Kx1
dot(x4) == q(1)*x2*x2+q(2)*x3*x3});
% Objective
objective = -final(x4);
Solve the problem
options = struct;
options.name = 'Optimal Parametric Sensitivity';
solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);
% Plot intermediate results
subplot(2,1,1);
ezplot([x1; x2; x3]); legend('x1','x2','x3');
title('Optimal Parametric Sensitivity controls states');
subplot(2,1,2);
ezplot(u); legend('u');
title('Optimal Parametric Sensitivity controls'); drawnow;
Problem type appears to be: lpcon Time for symbolic processing: 0.20428 seconds Starting numeric solver ===== * * * =================================================================== * * * TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31 ===================================================================================== Problem: --- 1: Optimal Parametric Sensitivity f_k -205.617761338544000000 sum(|constr|) 0.000000048671862886 f(x_k) + sum(|constr|) -205.617761289872130000 f(x_0) 0.000000000000000000 Solver: snopt. EXIT=0. INFORM=1. SNOPT 7.2-5 NLP code Optimality conditions satisfied FuncEv 1 ConstrEv 192 ConJacEv 192 Iter 89 MinorIter 2466 CPU time: 0.280802 sec. Elapsed time: 0.279000 sec.