PROPT Coloumb Friction 1: Difference between revisions
From TomWiki
Jump to navigationJump to search
No edit summary |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 10: | Line 10: | ||
<math> J = t_f </math> | <math> J = t_f </math> | ||
subject to: | subject to: | ||
<math> \frac{d^{2}q}{dt^{2}} = u - sign(\frac{dq}{dt}) </math> | <math> \frac{d^{2}q}{dt^{2}} = u - sign(\frac{dq}{dt}) </math> | ||
<math> -2 <= u <= 2 </math> | <math> -2 <= u <= 2 </math> | ||
<math> q_0 = 0 </math> | <math> q_0 = 0 </math> | ||
<math> \frac{dq}{dt}_0 = 1 </math> | <math> \frac{dq}{dt}_0 = 1 </math> | ||
<math> q_2 = -1 </math> | <math> q_2 = -1 </math> | ||
<math> \frac{dq}{dt}_2 = 0 </math> | <math> \frac{dq}{dt}_2 = 0 </math> | ||
<source lang="matlab"> | <source lang="matlab"> | ||
Line 70: | Line 77: | ||
<pre> | <pre> | ||
Problem type appears to be: lpcon | Problem type appears to be: lpcon | ||
Time for symbolic processing: 0. | Time for symbolic processing: 0.088289 seconds | ||
Starting numeric solver | Starting numeric solver | ||
===== * * * =================================================================== * * * | ===== * * * =================================================================== * * * | ||
Line 85: | Line 92: | ||
FuncEv 1 ConstrEv 130 ConJacEv 130 Iter 23 MinorIter 676 | FuncEv 1 ConstrEv 130 ConJacEv 130 Iter 23 MinorIter 676 | ||
CPU time: 0.187201 sec. Elapsed time: 0. | CPU time: 0.187201 sec. Elapsed time: 0.179000 sec. | ||
</pre> | </pre> | ||
Line 104: | Line 111: | ||
[[File:coloumbFriction1_01.png]] | [[File:coloumbFriction1_01.png]] | ||
[[Category:PROPT Examples]] |
Latest revision as of 04:56, 14 February 2012
This page is part of the PROPT Manual. See PROPT Manual. |
Minimum-Time Control of Systems With Coloumb Friction: Near Global Optima Via Mixed Integer Linear Programming, Brian J. Driessen, Structural Dynamics Department, Sandia National Labs.
4. Numerical Examples
Problem Formulation
Find u over t in [0; t_F ] to minimize
subject to:
% Copyright (c) 2007-2008 by Tomlab Optimization Inc.
Problem setup
toms t
toms t_f
p = tomPhase('p', t, 0, t_f, 60);
setPhase(p);
tomStates q qdot
tomControls u
% Initial guess
x0 = {t_f == 1, icollocate(q == -t)};
% Box constraints
cbox = {-2 <= collocate(u) <= 2
0.001 <= t_f};
% Boundary constraints
cbnd = {initial({q == 0; qdot == 1}), final({q == -1, qdot == 0})};
% ODEs and path constraints
ceq = collocate({
dot(q) == qdot
dot(qdot) == u-sign(qdot)});
objective = t_f;
Solve the problem
options = struct;
options.name = 'Coloumb Friction 1';
constr = {cbox, cbnd, ceq};
solution = ezsolve(objective, constr, x0, options);
t = subs(collocate(p,t),solution);
q = subs(collocate(p,q),solution);
qdot = subs(collocate(p,qdot),solution);
u = subs(collocate(p,u),solution);
Problem type appears to be: lpcon Time for symbolic processing: 0.088289 seconds Starting numeric solver ===== * * * =================================================================== * * * TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31 ===================================================================================== Problem: --- 1: Coloumb Friction 1 f_k 2.070229757012032900 sum(|constr|) 0.000000001042092519 f(x_k) + sum(|constr|) 2.070229758054125600 f(x_0) 1.000000000000000000 Solver: snopt. EXIT=0. INFORM=1. SNOPT 7.2-5 NLP code Optimality conditions satisfied FuncEv 1 ConstrEv 130 ConJacEv 130 Iter 23 MinorIter 676 CPU time: 0.187201 sec. Elapsed time: 0.179000 sec.
Plot result
subplot(2,1,1)
plot(t,q,'*-',t,qdot,'*-');
legend('q','qdot');
title('Coloumb Friction 1 state variables');
subplot(2,1,2)
plot(t,u,'+-');
legend('u');
title('Coloumb Friction 1 control');