# Dielectrophoresis Particle Control

Time-Optimal Control of a Particle in a Dielectrophoretic System, Dong Eui Chang, Nicolas Petit, and Pierre Rouchon

## Problem Description

Find u over t in [0; tF ] to minimize: subject to:       % Copyright (c) 2007-2008 by Tomlab Optimization Inc.


## Problem setup

toms t
toms tf
p = tomPhase('p', t, 0, tf, 60);
setPhase(p);

tomStates x y
tomControls u

% Initial guess
x0 = {tf == 10
icollocate({
x == 1+1*t/tf
y == t/tf
})
collocate(u == 1)};

% Box constraints
cbox = {
sqrt(eps) <= icollocate(x)
sqrt(eps) <= collocate(y)
1         <= tf <= 100
-1        <= collocate(u) <= 1};

% Boundary constraints
cbnd = {initial({x == 1; y == 0})
final({x == 2})};

% ODEs and path constraints
ceq = collocate({
dot(x) == y.*u-3/4*u.^2
dot(y) == -y+u});

% Objective
objective = tf;


## Solve the problem

options = struct;
options.name = 'Dielectrophoresis Control';
solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);
t = subs(collocate(t),solution);
x = subs(collocate(x),solution);
y = subs(collocate(y),solution);
u = subs(collocate(u),solution);

Problem type appears to be: lpcon
===== * * * =================================================================== * * *
TOMLAB - Tomlab Optimization Inc. Development license  999001. Valid to 2010-02-05
=====================================================================================
Problem: ---  1: Dielectrophoresis Control      f_k       7.811292812705188400
sum(|constr|)      0.000001346838599033
f(x_k) + sum(|constr|)      7.811294159543787300
f(x_0)     10.000000000000000000

Solver: snopt.  EXIT=0.  INFORM=1.
SNOPT 7.2-5 NLP code
Optimality conditions satisfied

FuncEv    1 ConstrEv   26 ConJacEv   26 Iter   25 MinorIter  227
CPU time: 0.250000 sec. Elapsed time: 0.250000 sec.


## Plot result

figure(1);
plot(t,x,'*-',t,y,'*-',t,u,'*-');
legend('x','y','u'); 