Solve a System of inequalities - (fmincon or other ideas?)

3 次查看(过去 30 天)
Hi all,
I have a system of 3 inequalities (f1,f2,f3) and i'm searching to determine values of axi, ayi, azi(i=3:6). I've tried with the function Cylindrical Decomposition (Mathematica) but it seems that the problem is a bit complex for that function. After that I wanted to use Optimization tools like the function Fmincon but I don't know how...
If you have any suggestions, it would be wonderful. :))
Many thanks, Maria
Here's the code:
m = 0.5; g = 9.81; C1 = 1 ; C2 = 0.1; C3 = 0.1;
f1 = m*(g - az3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) - az5*(60*t^2*(t - 1) + 40*t^3) + 20*az6*t^3 + az4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3))< C1
f2 = -(m^2*(2*ax3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) + 2*ax5*(60*t^2*(t - 1) + 40*t^3) - 40*ax6*t^3 - 2*ax4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3))*(60*az6*t^2 - az3*(180*t*(2*t - 2) + 180*(t - 1)^2 + 60*t^2) + az4*(180*t*(2*t - 2) + 60*(t - 1)^2 + 180*t^2) - az5*(120*t*(t - 1) + 180*t^2))^2 - m^2*(120*ax6*t - ax5*(600*t - 120) + ax4*(1200*t - 480) - ax3*(1200*t - 720))*(g - az3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) - az5*(60*t^2*(t - 1) + 40*t^3) + 20*az6*t^3 + az4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3))^2 + 2*m^2*(60*ax6*t^2 - ax3*(180*t*(2*t - 2) + 180*(t - 1)^2 + 60*t^2) + ax4*(180*t*(2*t - 2) + 60*(t - 1)^2 + 180*t^2) - ax5*(120*t*(t - 1) + 180*t^2))*(60*az6*t^2 - az3*(180*t*(2*t - 2) + 180*(t - 1)^2 + 60*t^2) + az4*(180*t*(2*t - 2) + 60*(t - 1)^2 + 180*t^2) - az5*(120*t*(t - 1) + 180*t^2))*(g - az3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) - az5*(60*t^2*(t - 1) + 40*t^3) + 20*az6*t^3 + az4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3)) - m^2*(ax3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) + ax5*(60*t^2*(t - 1) + 40*t^3) - 20*ax6*t^3 - ax4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3))*(120*az6*t - az5*(600*t - 120) + az4*(1200*t - 480) - az3*(1200*t - 720))*(g - az3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) - az5*(60*t^2*(t - 1) + 40*t^3) + 20*az6*t^3 + az4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3)))/(m^3*(g - az3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) - az5*(60*t^2*(t - 1) + 40*t^3) + 20*az6*t^3 + az4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3))^3) < C2
f3 = (m^2*(2*ay3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) + 2*ay5*(60*t^2*(t - 1) + 40*t^3) - 40*ay6*t^3 - 2*ay4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3))*(60*az6*t^2 - az3*(180*t*(2*t - 2) + 180*(t - 1)^2 + 60*t^2) + az4*(180*t*(2*t - 2) + 60*(t - 1)^2 + 180*t^2) - az5*(120*t*(t - 1) + 180*t^2))^2 - m^2*(120*ay6*t - ay5*(600*t - 120) + ay4*(1200*t - 480) - ay3*(1200*t - 720))*(g - az3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) - az5*(60*t^2*(t - 1) + 40*t^3) + 20*az6*t^3 + az4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3))^2 + 2*m^2*(60*ay6*t^2 - ay3*(180*t*(2*t - 2) + 180*(t - 1)^2 + 60*t^2) + ay4*(180*t*(2*t - 2) + 60*(t - 1)^2 + 180*t^2) - ay5*(120*t*(t - 1) + 180*t^2))*(60*az6*t^2 - az3*(180*t*(2*t - 2) + 180*(t - 1)^2 + 60*t^2) + az4*(180*t*(2*t - 2) + 60*(t - 1)^2 + 180*t^2) - az5*(120*t*(t - 1) + 180*t^2))*(g - az3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) - az5*(60*t^2*(t - 1) + 40*t^3) + 20*az6*t^3 + az4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3)) - m^2*(ay3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) + ay5*(60*t^2*(t - 1) + 40*t^3) - 20*ay6*t^3 - ay4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3))*(120*az6*t - az5*(600*t - 120) + az4*(1200*t - 480) - az3*(1200*t - 720))*(g - az3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) - az5*(60*t^2*(t - 1) + 40*t^3) + 20*az6*t^3 + az4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3)))/(m^3*(g - az3*(120*t*(t - 1)^2 + 20*(t - 1)^3 + 30*t^2*(2*t - 2)) - az5*(60*t^2*(t - 1) + 40*t^3) + 20*az6*t^3 + az4*(60*t*(t - 1)^2 + 60*t^2*(2*t - 2) + 20*t^3))^3) < C3
  3 个评论
Mac Bekcheva
Mac Bekcheva 2014-11-2
Sorry, i didn't name correctly the problem. I meant to find a region represented by the iequalities
Matt J
Matt J 2014-11-2
That's still vague. The inequalities themselves already represent this region. What other form would you have the region represented in?

请先登录,再进行评论。

采纳的回答

John D'Errico
John D'Errico 2014-11-2
编辑:John D'Errico 2014-11-2
(No, fmincon is not an option here, for SO MANY reasons.)
I think you misunderstand the problem. It is NOT an issue of the system being too complicated for a solver to deal with. What does it mean to solve such a system? I'll give an example. Suppose I were to pose the simple linear system:
x + y > 1
x > 2
There are clearly an infinite number of solutions. Even if the system was bounded, there would still be an infinite number of solutions. So it is meaningless to try to solve such a system, even such a simple one.
I suppose if there was a unique solution, it might make sense, but in your case, that cannot be true! There will NEVER be a unique solution to your system, since the inequalities posed are strict inequalities (less than) so the bounds can never be achieved. Thus any solution, if one exists, will be accompanied by infinitely many other solutions within at least an epsilon ball around that solution.
Your system is a bit more nasty looking and nonlinear, but the facts remain. It is meaningless to even try to "solve" that system. At most, you might desire to plot the solution locus of the inequalities. Of course, that is completely impossible, since it appears that you have a dozen or so unknowns, and only 3 equations. In general, such a problem will be unbounded.
Other issues ...
You do not tell us. Is t an unknown? Are you looking to solve that mess as a function of t?
I've not checked that carefully, but is the system linear in the unknowns (but not t)? If so, then a linear system of 3 inequalities with a dozen unknowns is clearly unbounded.
  2 个评论
Mac Bekcheva
Mac Bekcheva 2014-11-2
编辑:Mac Bekcheva 2014-11-2
Thanks for your answer John.
Sorry, my fault that I didn't explain well. I want to make trajectory planning by b-splines. My unknowns axi, ayi, azi are control points of the b-splines x(t), y(t), z(t). I'm trying to find a region for the unknowns (axi, ayi, azi ) represented by the iequalities.
1. t is the time vector. It could be for example t = 0:0.1:100;
2. Actually we can take intervals for the unknowns axi, ayi, azi if we make an assumption that x(t), y(t), z(t) are in interval [0,30]. To assume that the evolved trajectory will be in a cube of 30m edge.
Thanks... Maria
John D'Errico
John D'Errico 2014-11-2
编辑:John D'Errico 2014-11-2
No. Apparently it was I who did not explain myself clearly enough, although I very well understood your problem the first time.
You have what I might describe as a blob, in TWELVE dimensions. In fact, since you have only 3 inequalities, this blob is completely unbounded, extending to infinity in many ways. Worse, the blob changes shape as a function of t (perhaps time I guess) and it does so in a nonlinear way. So really, you have a 13 dimensional blob of infinite extent!
You wish to "find a region for the unknowns..." but what you don't understand is that the only compact description of that region is the exact set of inequalities you have already written down!
Do you want to draw a picture? On what? My own 13 dimensional uber-holographic monitor has been in the shop ever since Steven Hawking broke it trying to look at string theory pictures. Maybe yours works. (I'll warn you, don't lend it out.)
People don't understand that 13 dimensions is a BIG place. You can't visualize that object. You can't draw pictures of it. You can't print it, even with a 7 color (or more) color printer.
I suppose at best, you could fix 10 of those variables (say 9 of the unknowns, plus t) all at some arbitrary value, and than generate the locus for the 3 remaining unknowns. That you could plot out. But that still leaves you with a SINGLE plot where 10 other variables were held fixed at some arbitrary values. Useless.
As I said, the solution locus is very neatly described only by those 3 inequalities, but there is not a lot more you can say. It is a 12 dimensional parameter space, as a function of a 13th variable.
I suppose you want to think of the parameters are describing a family of functions, which then vary as a function of t. Fine, but this family of functions is no simple thing. For any single set of those many unknowns, we get one single functional form. There is little you can do to describe that entire family of functions, besides as one member of the locus of unknowns constrained by those inequalities.
Again, 13 dimensions is a big place. For example, suppose you chose some subset of these 13 parameters, fixing each of them at some values to plot the resulting curve. So for each parameter, choose some set of say only 5 values that each satisfies the set of inequalities.
5^13
ans =
1220703125
So about 1.2 billion functions to plot, and that will force you to find values of each of those parameters that satisfy the inequalities.
Merely wanting to do something is a laudable goal. That does not make it possible though, at least while I'm still around. Otherwise, we would have peace in the mid-east, the Cubs would have won a world series (or even multiple, back to back series), and we would have simple cures for Ebola, HIV, etc.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by