Kinematic Equations
12 ビュー (過去 30 日間)
古いコメントを表示
Hi, I am trying to Solve Kinematic Equations with certain no. of unknowns and equations(As below) using the syms & solve command. The no of equations that are required to solve for all variables is enough and I have also checked graphically using a CAD tool that a valid solution exists.
But Matlab solver is not able to find an explicit Solution. Please Suggest what can be the possible reason and Solution.
D=sqrt((x1-x4)^2+(y1-y4)^2+(z1-z4)^2);
L=sqrt((A_x-F_x)^2+(A_y-F_y)^2+(A_z-F_z)^2);
R=sqrt((A_x-E_x)^2+(A_y-E_y)^2+(A_z-E_z)^2);
P=sqrt((B_x-G_x)^2+(B_y-G_y)^2+(B_z-G_z)^2);
Q=sqrt((B_x-H_x)^2+(B_y-H_y)^2+(B_z-H_z)^2);
W=sqrt((A_x-B_x)^2+(A_y-B_y)^2+(A_z-B_z)^2);
V=sqrt((A_x-J_x)^2+(A_y-J_y)^2+(A_z-J_z)^2);
S=sqrt((B_x-J_x)^2+(B_y-J_y)^2+(B_z-J_z)^2);
syms a_x a_y a_z b_x b_y b_z j_x j_y j_z r_x r_y r_z;
[solutions_a_x,solutions_a_y,solutions_a_z,solutions_b_x,solutions_b_y,solutions_b_z,solutions_j_x,solutions_j_y,solutions_j_z,solutions_r_x,solutions_r_y,solutions_r_z]=solve((a_x-b_x)*(j_x-r_x)+(a_y-b_y)*(j_y-r_y)+(a_z-b_z)*(j_z-r_z),sqrt((a_x-E_x)^2+(a_y-E_y)^2+(a_z-E_z)^2)-R,sqrt((a_x-F_x)^2+(a_y-F_y)^2+(a_z-F_z)^2)-L,sqrt((b_x-G_x)^2+(b_y-G_y)^2+(b_z-G_z)^2)-P,sqrt((b_x-H_x)^2+(b_y-H_y)^2+(b_z-H_z)^2)-Q,sqrt((a_x-b_x)^2+(a_y-b_y)^2+(a_z-b_z)^2)-W,sqrt((j_x-I_x)^2+(j_y-I_y)^2+(j_z-I_z)^2)-Length_Tie_Rod,sqrt((a_x-j_x)^2+(a_y-j_y)^2+(a_z-j_z)^2)-V,sqrt((b_x-j_x)^2+(b_y-j_y)^2+(b_z-j_z)^2)-S,sqrt((j_x-r_x)^2+(j_y-r_y)^2+(j_z-r_z)^2)-D,((r_x-a_x)/(a_x-b_x))-((r_y-a_y)/(a_y-b_y)),((r_y-a_y)/(a_y-b_y))-((r_z-a_z)/(a_z-b_z)),a_x,a_y,a_z,b_x,b_y,b_z,j_x,j_y,j_z,r_x,r_y,r_z,'Real',true);
The value of variables "A_x, A_y, A_z, B_x, B_y, B_z, E_x, E_y, E_z, F_x, F_y, F_z, G_x, G_y, G_z, H_x, H_y, H_z, I_x, I_y, I_z, x1, y1, z1, x4, y4, z4, Length_Tie_Rod J_x, J_y, J_z," are already calculated or given.
Please Suggest Something.
Thanks
-Varun
0 件のコメント
採用された回答
Walter Roberson
2012 年 2 月 8 日
This will probably take several days for an analytic solution. Probably a few weeks.
Your version of the Symbolic Toolbox appears to be R2010a or earlier; in those earlier versions, MuPAD gave up pretty quickly when trying to deal with finding solutions to several terms each squared. R2010b appeared to improve that.
I started it running in Maple. No answer yet. I count at least 21 terms squared. Each term that is squared whose base value is not provably real valued and positive, gives rise to two branches of solution exploration, one in which the base term was positive, and the other in which the base term was negative. I count 21 terms that are ^2 so you have 2^21 branches to explore. In my experience, the cut-off in Maple between "not so bad" and "frustratingly long" is between 7 and 8 branches. I usually interrupt 13+ branch problems after about 2 1/2 days of CPU (on my older machine), so I project a month or more of execution for 21 branches.
1 件のコメント
Walter Roberson
2012 年 2 月 8 日
I had to kill the Maple run as it chewed through my available memory (which is not very big on my home system.)
その他の回答 (1 件)
varun jain
2012 年 2 月 8 日
1 件のコメント
Walter Roberson
2012 年 2 月 8 日
A lot depends upon the relationship between the variables. Some forms would become relatively easy to solve by way of arccos() and the like, but other forms you do not really get anywhere.
For example,
solve(cos(x)+y^2-x*sin(y) = 7, [x, y])
The solution Maple comes up with for that is
x = x, y = RootOf(cos(x)+_Z^2-x*sin(_Z)-7)
which is not much more than a rearrangement of form, with all of the hard work tossed in to the root finder. You cannot even tell, for example, that this has 6 roots near x=0 with two of them real-valued -- but out near x=-30 there are 3 real roots.
MuPAD does not appear to be useful at processing RootOf() such as the above.
If you post the transformed equation, I could _try_.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!