Effacer les filtres
Effacer les filtres

Solving a complex non-polynomial equation numerically

2 vues (au cours des 30 derniers jours)
Krystian Meresinski
Krystian Meresinski le 2 Mai 2013
Hi!
I've got a problem with my equation that I try to solve numerically using both Matlab and Symbolic Toolbox. I'm after several source pages of MATLAB help, picked up a few tricks and tried most of them, still without satysfying result.
My goal is to solve set of three non-polynomial equations with q1, q2 and a3 angles. Those variables represent joint angles in my industrial manipulator and what I'm trying to achieve is to solve inverse kinematics of this model. My set of equations looks like this: http://imgur.com/bU6XjNP
I'm solving it with
numeric::solve([z1,z2,z3], [q1=x1..x2,q2=x3..x4,q3=x5..x6], MultiSolutions)
Changing the xn constant according to my needs. Yet I still get some odd results, the q1 var is off by approximately 0.1 rad, q2 and q3 being off by ~0.01 rad. I don't have much experience with numeric solve, so I just need information, should it supposed to look like that?
And, if not, what valid option do you suggest I should take next? Maybe transforming this equation to polynomial, maybe using a different toolbox?
Or, if trying to do this in Matlab, how can you limit your solutions when using solve()? I'm thinking of an equivalent to Symbolic Toolbox's 'assume()' and 'assumeAlso'.
I would be grateful for your help.
  11 commentaires
Krystian Meresinski
Krystian Meresinski le 3 Mai 2013
I tried this and it resulted with this: http://imgur.com/hYiTfF9
Is this solution something I should be looking for? I think something isn't right here, it uses arctan instead of atan in the first place.
Walter Roberson
Walter Roberson le 3 Mai 2013
That looks plausible at first look, but I did not compare it in detail. Notice that the definition of z5 involves the roots of a quartic: as quartics can be solved analytically, you can pull out the four analytic solutions without the RootOf().
However, the solution I am looking at via Maple uses arctan() with two parameters, which corresponds to the MuPad arctan (except perhaps with the elements reversed.) MuPAD's arctan() in turn would become the MATLAB atan2() routine if you were working on numeric parameters instead of symbolic. The difference is that the two-parameter arctan() is localized to quadrant whereas the one-parameter version is not.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by