From: Matt J on 2 Jun 2010 04:54 "jjspierx Spiering" <jjspierx(a)gmail.com> wrote in message <hu3vjp$f8c$1(a)fred.mathworks.com>... > I am trying to find an iterative convergence technique for a kinematic solution. > > A brief description of the problem... > > I have 2 points in space(A and B) connected by an imaginary rigid body. Each point rotates about a different axis. As one point rotates about its axis, the other point has to rotate about its axis at a different rate so that the distance between the points remains the same(since connected by rigid body). > > An arbitrary example... > > Using norm(A-B), I determine the distance between A and B to be X > I then rotate point A about its axis 'theta' degrees and call this new point A' > Then I rotate point B about its axis 'beta_initial' degrees and call it B' > Then I use norm(A'-B') to find the new distance between points > I then increase or decrease beta_initial until norm(A'-B')=norm(A-B) > > Does anybody have an idea of how I might do this using a smart approach instead of just manually doing it? I could write a loop that starts at beta_intial=0 and increases by 0.000001 with each iteration until a solution is found, but of course that seems absurd. ================= It's not entirely clear to me from the description what the given inputs are and what you are trying to compute. As best I can tell, you know the planes and axes of rotation of both A and B. Also, the rotation trajectory A(t) of point A is known as a function of time. The task isthen to compute B(t) subject to the constraint norm(A-B)=X where X is also known a priori. It seems to me like you can solve this analytically, rather than iteratively. In particular, the equations that B(t) must satisfy are dot(N,B(t))=d; %equation for plane of rotation of B (B(t)-A(t))'*(B(t)-A(t))=X^2; %B is fixed distance from A (B(t)-Bc)'*(B(t)-Bc)=Rc^2; %Bc,Rc are the center and radius of rotation for B This gives you 3 equations in 3 unknowns which you can use to solve for B(t). It is the intersection of 2 spheres and a plane.
From: jjspierx Spiering on 2 Jun 2010 09:20 "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hu567d$b5a$1(a)fred.mathworks.com>... > "jjspierx Spiering" <jjspierx(a)gmail.com> wrote in message <hu3vjp$f8c$1(a)fred.mathworks.com>... > > I am trying to find an iterative convergence technique for a kinematic solution. > > > > A brief description of the problem... > > > > I have 2 points in space(A and B) connected by an imaginary rigid body. Each point rotates about a different axis. As one point rotates about its axis, the other point has to rotate about its axis at a different rate so that the distance between the points remains the same(since connected by rigid body). > > > > An arbitrary example... > > > > Using norm(A-B), I determine the distance between A and B to be X > > I then rotate point A about its axis 'theta' degrees and call this new point A' > > Then I rotate point B about its axis 'beta_initial' degrees and call it B' > > Then I use norm(A'-B') to find the new distance between points > > I then increase or decrease beta_initial until norm(A'-B')=norm(A-B) > > > > Does anybody have an idea of how I might do this using a smart approach instead of just manually doing it? I could write a loop that starts at beta_intial=0 and increases by 0.000001 with each iteration until a solution is found, but of course that seems absurd. > ================= > > It's not entirely clear to me from the description what the given inputs are and what you are trying to compute. As best I can tell, you know the planes and axes of rotation of both A and B. Also, the rotation trajectory A(t) of point A is known as a function of time. The task isthen to compute B(t) subject to the constraint > norm(A-B)=X where X is also known a priori. > > It seems to me like you can solve this analytically, rather than iteratively. In particular, the equations that B(t) must satisfy are > > dot(N,B(t))=d; %equation for plane of rotation of B > > (B(t)-A(t))'*(B(t)-A(t))=X^2; %B is fixed distance from A > > (B(t)-Bc)'*(B(t)-Bc)=Rc^2; %Bc,Rc are the center and radius of rotation for B > > This gives you 3 equations in 3 unknowns which you can use to solve for B(t). It is the intersection of 2 spheres and a plane. What I am trying to do is plot the movement (not just end result) of 3 points. 2 of the points, A and B rotate about their own respective axis. Point C rotates about the Instant Axis created by the planes of rotation of points A and B. What I was originally doing, was described above by finding the instant center, and rotating the points about their own respective axis in order to keep the distance between them the same. I am fairly certain this was a "valid" way to do it, but it forced me to create an iterative approach to make this happen. I have since, figured out a better way to do it. Now I am finding the instant center, and then rotating points A, B and C a tiny increment about the IC. Then I recalculate the new IC created by points A and B moving, and I move another tiny increment, until I arrive at the desired location. I am rotating by an angle theta with each iteration, and I simply decrease theta to increase the accuracy of the calculation. Now, I know that points A and B technically still have to rotate about their own respective axis (since rotating them about the IC is only valid for infinitely small rotations as the IC constantly changes), so I verified that end result of the above technique, matches point coordinates for A and B if I rotate them around their respective axis as well. Thanks for the ideas! Both techniques work and give me the same results, but the 2nd way, allows me to easily fine tune the accuracy and doesn't require me to iteratively guess the correct angle.
From: Roger Stafford on 2 Jun 2010 14:27 "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hu567d$b5a$1(a)fred.mathworks.com>... > ........ > This gives you 3 equations in 3 unknowns which you can use to solve for B(t). It is the intersection of 2 spheres and a plane. - - - - - - - - - - You would do well to follow up on Matt's excellent advice. You are starting with three equations in the cartesian coordinates of the unknown point. One of them is linear and two are second degree equations. By subtracting appropriately to eliminate the squared terms you can obtain a second linear equation from the two second degree equations. The solution to the two linear equations is a line in which you can express each coordinate linearly in terms of a common parameter. When you substitute these into one of the second degree equations, the result will be a quadratic equation with the single parameter as the unknown. As is true of all quadratic equations, it will have either two roots, one double root, or no real roots. As Matt has said, there is no need to use iteration to solve this elementary problem. Roger Stafford
From: Walter Roberson on 2 Jun 2010 14:31 Roger Stafford wrote: > When you substitute these into one of the second degree > equations, the result will be a quadratic equation with the single > parameter as the unknown. As is true of all quadratic equations, it > will have either two roots, one double root, or no real roots. Perhaps I missed an assumption in my reading, but (X-1)*(X-5i) = X^2 - 5i*X - X + 5i is an example of a quadratic equation with one real root that is not a double root ?
From: Roger Stafford on 2 Jun 2010 15:25
Walter Roberson <roberson(a)hushmail.com> wrote in message <hu684v$3br$2(a)canopus.cc.umanitoba.ca>... > Roger Stafford wrote: > > ...... As is true of all quadratic equations, it > > will have either two roots, one double root, or no real roots. > > Perhaps I missed an assumption in my reading, but > > (X-1)*(X-5i) = X^2 - 5i*X - X + 5i is an example of a quadratic equation with > one real root that is not a double root Thank you for catching me up, Walter. There was the tacit assumption made that the quadratic equation in question would have real coefficients, which of course is true for the problem. Roger Stafford |