3 equations with 3 angle variables Cannot find explicit solution.

3 次查看(过去 30 天)
Hello i am trying to solve for the 3 variables t1,t2,t3
x =(cos(t1)*(4*cos(t2 + t3) + 60*sin(t2 + t3) + 49*cos(t2) + 19))/200
y =(sin(t1)*(4*cos(t2 + t3) + 60*sin(t2 + t3) + 49*cos(t2) + 19))/200
z =(49*sin(t2))/200 - (226^(1/2)*cos(t2 + t3 + atan(1/15)))/50 + 7/20
with x=0,y=0.725,z=0.37
I have tried to put a few codes in such as....
syms t1 t2 t3
[solt1, solt2 , solt3] = solve([x == 0, y == 0.725,z==0.37 ], 2*pi>t1, t1>0, 2*pi>t2, t2>0, 2*pi>t3, t3>0,[t1,t2,t3])
I also tried
eqn1=x==0
eqn2=y==0.725
eqn3=z==0.37
Srange = solve(eqn1, eqn2,eqn3, 2*pi>t1, t1>0, 2*pi>t2, t2>0, 2*pi>t3, t3>0, 'ReturnConditions', true);
scatter(Srange.t1, Srange.t2, Srange.t3)
Can anyone please help?? it seems like its suppose to be a really easy thing to do in mathcad, but for some reason i am having trouble getting mathcad to actually do the simplest things, THANKS IN ADVANCE FOR ANY HELP

采纳的回答

Walter Roberson
Walter Roberson 2015-6-6
That looks like you have some kind of 3D rotation with skew of some particular point and you are trying to determine the set of angles that map the point to a particular resulting location.
If that is the case, the difficulty is that the solution is not unique, and using solve() to find the solution is either going to quit or take a long time trying to find all of the possibilities.
  1 个评论
Eli Kroitor
Eli Kroitor 2015-6-9
Yeah you are right, I ended up doing the question using inverse position, with the lengths of the links and everything taken into account in the equation, those 3 equations that i had probably as you said gave me infinite amount of solutions for those angles

请先登录,再进行评论。

更多回答(1 个)

Hiskiel Stephanus
I was thinking of using an iterative approach in Numerical methods to solve the problem. Specifically the Gauss seidel iteration method. But looking at the equations, i realised they are not linear and also the "t1" variable does not appear in the third equation.
The gauss seidel approach involves making one variable the subject of the formula in each of the three equations and providing an initial guess to start off solving the problem. It is literally not possible to for example make "t2" the subject of the formula in the second equation. But i am so sure there is another iterative approach that may work.. try newton raphson for example.

类别

Help CenterFile Exchange 中查找有关 Function Creation 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by