Inverse Kinematics - Obtaining the Equation of a Path

In summary, the conversation discusses the process of obtaining the equation of a path for a scissor-type mechanism in SolidWorks. The animation shows the motion of the mechanism and the known parameters for finding the parametric equations. The conversation also mentions the use of a circle to model the motion and the constraints of the design. Finally, it mentions the need for the distance from the center of the hole in the crossing linkage to its disk in order to fully express the coordinates of the center of the hole in terms of the initial angle \alpha.
  • #1
roldy
237
2
Obtaining the Equation of a Path

I'm working on a project for myself in SolidWorks which involves a scissor-type mechanism. The bottom ends of the linkages are attached to disks that are free to rotate around the central hub where all the gears are attached. On the other side of the hub is another ring gear and pinion gear to reverse the motion of one of the disks. I need to be able to figure out the parametric equations that describes the curve that is shown in the animation. In SolidWorks I am able to use this curve in a part. Problem is that the curve is not exact since it depends entirely on the number of data points you want to represent the curve.

The only knowns are the rotation angle that the disks on the hub make, the pivot to pivot hole distance on the linkages, and the initial distance from the top pivot hole of the linkage to the hub center, the initial angle of the disk with respect to the hub (measured from a line drawn from the hub center - bottom linkage pivot hole to the vertical axis.

Sorry about the video quality, it's youtube's fault.
https://www.youtube.com/watch?v=T2O1-gU-vnY&feature=youtu.be
 
Last edited:
Engineering news on Phys.org
  • #2
Before we dive into this, I want you to draw a circle on paper, preferably using a glass with a small, circular base or the inside of a roll of tape as a guide. Then draw a straight line outside of the circle but close to it, preferably using a ruler, making sure to draw it in a direction that gives plenty room to draw it long. Then lay a short, slender object (i.e. a toothpick, match) down on the paper, ensuring that one end of it always touches (but does not cross) the straight line you drew, meanwhile dragging the other end around the circle, such that the end touching the straight line gets dragged along the line. What do you observe?
The toothpick models the motion of the crossing linkage with a hole in it.

Refer to the attached diagram for the following:

[itex]h[/itex] represents the length of the horizontal linkage.
[itex]c[/itex] represents the length of either of the linkages that cross over one another.
[itex]d[/itex] represents the initial distance from the hub center to either of the pivot points on the horizontal linkage.
[itex]\alpha[/itex] represents the angle from either of the pivots connecting a disk to its linkage to a line drawn vertically through the hub center.
[itex]r[/itex] represents the distance from the hub center to either pivot point where a linkage connects to a disk. I take it that this value is not given.
[itex]p[/itex] represents the distance from the center of the hole in the crossing linkage that traces a path to the pivot point where it connects to its disk.

Now, I'm not sure if you know [itex]r[/itex]. If you don't, you can find it using the following procedure; otherwise, skip down to "The two linkages that cross...".

Observe that [itex]r[/itex] makes a triangle with [itex]c[/itex] and [itex]d[/itex]; however, [itex]\alpha[/itex] only sweeps from a pivot connecting a disk to its linkage to the vertical. I'd like to be able to use the law of cosines to find [itex]r[/itex], but I'd need the angle that sweeps all the way to the line drawn from the hub center to the pivot point on the horizontal linkage. Since you know [itex]d[/itex] and [itex]h[/itex], you can find the angle, [itex]\theta[/itex] that sweeps from line [itex]d[/itex] to a horizontal drawn through the hub center in the following way.

[itex]\theta=cos[/itex][itex]-1[/itex][itex](\frac{h/2}{d})[/itex]

Because [itex]\beta[/itex] is complementary to [itex]\theta[/itex], [itex]\beta=90-\theta[/itex].
[itex]\beta[/itex] sweeps the rest of the angle we need for the angle swept from [itex]r[/itex] to [itex]d[/itex].
Now apply the law of cosines:

[itex]c[/itex][itex]2[/itex] [itex]=r[/itex][itex]2[/itex][itex]+[/itex] [itex]d[/itex][itex]2[/itex] [itex]-[/itex] [itex]2rdcos(\alpha+\beta)[/itex], where [itex]\alpha+\beta[/itex] represents the angle opposite side [itex]c[/itex] of our triangle.

Rewrite in the following way, and we have a quadratic equation in [itex]r[/itex]:

[itex]r[/itex][itex]2[/itex] [itex]+[/itex] [itex](-2dcos(\alpha+\beta))r[/itex] [itex]+[/itex] [itex](d[/itex][itex]2[/itex] [itex]-[/itex] [itex]c[/itex][itex]2[/itex] [itex])[/itex] [itex]=0[/itex]

Our solutions are of the form [itex]r=\frac{-(-2dcos(\alpha+\beta))\pm\sqrt{(-2dcos(\alpha+\beta))^2-4(1)(d^2-c^2)}}{2(1)}[/itex]

Simplify:

[itex]r=dcos(\alpha+\beta)\pm\sqrt{d^2(cos^2(\alpha+\beta)-1)+c^2}[/itex]

What this tells us is that there may be two values of [itex]r[/itex] that work for the given setup, which should make sense since the known angle-side-side combination of our triangle does not guarantee a particular triangle (unless the triangle is right, which we can't be sure of). You can visualize this by imagining that the crossing linkages would be able to attach to bigger disks at points the same initial angular displacement from the vertical since there are two different triangles with the same [itex]d[/itex] and [itex]c[/itex] but different [itex]r[/itex]. What I mean is, let [itex]c[/itex] swing about the pivot where it is attached to the horizontal linkage, and there are two spots where its other end will intersect with a line drawn out in the same direction as [itex]r[/itex].

The two linkages that cross over one another and connect to the disks appear to be the same length, and the two disks (one mostly hidden from view by the other) rotate at the same speed in opposite directions. Could I also convince you that the horizontal linkage only displaces vertically and maintains symmetry about the y-axis throughout the animation?

Now let's analyze the motion of the linkage with a hole.
Until now, [itex]\alpha[/itex] has represented the initial angle between line [itex]r[/itex] and the vertical (i.e. an actual, known value). From now on I will use [itex]\alpha[/itex] as a variable to represent the angle between these lines.

Let the point [itex](0,0)[/itex] represent the hub center. Then it seems reasonable that the left and right pivot points on the horizontal linkage always have x-coordinates of [itex]-\frac{h}{2}[/itex] and [itex]\frac{h}{2}[/itex], respectively. This is a constraint imposed by the design of the scissor mechanism.

Our ultimate goal is to express the coordinates of the center of the hole in our linkage in terms of [itex]\alpha[/itex], but in order to go any further, we'd need to know [itex]p[/itex], or how far the center of the hole in the linkage is from the point where the linkage connects to its disk. I'm relying on you to provide this value.

We can use trig functions to find the coordinates of the pivot point connecting our crossing linkage to its disk in the following way:

[itex]x=rcos(90+\alpha),[/itex] [itex]y=rsin(90+\alpha)[/itex]

I use [itex]90+\alpha[/itex] here because [itex]\alpha[/itex] is swept from the vertical to [itex]r[/itex], but when we use trig functions to represent coordinates, our angles need to be in standard position.

As mentioned, the x-coordinate of the pivot point where our linkage attaches to the horizontal linkage is always [itex]\frac{h}{2}[/itex]. To find the y-coordinate of this pivot point, we need to establish that the distance between the two pivot points on our linkage is always equal to [itex]d[/itex]. Then, at any point in time during the motion of this linkage, we may construct a right triangle with [itex]d[/itex] as its hypotenuse. The adjacent and opposite sides are represented by the differences in the x- and y- coordinates of the two pivot points on the linkage.

[itex]d[/itex][itex]2[/itex] [itex]=(x[/itex][itex]2[/itex] [itex]-[/itex] [itex]x[/itex][itex]1[/itex][itex])[/itex][itex]2[/itex] [itex]+[/itex] [itex](y[/itex][itex]2[/itex] [itex]-[/itex] [itex]y[/itex][itex]1[/itex][itex])[/itex][itex]2[/itex]

Substituting what we know:

[itex]d[/itex][itex]2[/itex] [itex]=(\frac{h}{2}-[/itex] [itex]rcos(90+\alpha))[/itex][itex]2[/itex] [itex]+[/itex] [itex](y[/itex][itex]2[/itex] [itex]-[/itex] [itex]rsin(90+\alpha))[/itex][itex]2[/itex]

Expand binomials:

[itex]d[/itex][itex]2[/itex] [itex]=\frac{h^2}{4}-[/itex] [itex]hrcos(90+\alpha)[/itex] [itex]+[/itex] [itex]r^2cos^2(90+\alpha)[/itex] [itex]+[/itex] [itex](y[/itex][itex]2[/itex][itex])[/itex][itex]2[/itex] [itex]-[/itex] [itex]2y[/itex][itex]2[/itex][itex]rsin(90+\alpha)[/itex] [itex]+[/itex] [itex]r^2sin^2(90+\alpha)[/itex]

Group and factor terms containing [itex]r^2[/itex]:

[itex]d[/itex][itex]2[/itex] [itex]=\frac{h^2}{4}-[/itex] [itex]hrcos(90+\alpha)[/itex] [itex]+[/itex] [itex]r^2(sin^2(90+\alpha)+cos^2(90+\alpha))[/itex] [itex]+[/itex] [itex](y[/itex][itex]2[/itex][itex])[/itex][itex]2[/itex] [itex]-[/itex] [itex]2y[/itex][itex]2[/itex][itex]rsin(90+\alpha)[/itex]

Apply Pythagorean identity:

[itex]d[/itex][itex]2[/itex] [itex]=\frac{h^2}{4}-[/itex] [itex]hrcos(90+\alpha)[/itex] [itex]+[/itex] [itex]r^2[/itex] [itex]+[/itex] [itex](y[/itex][itex]2[/itex][itex])[/itex][itex]2[/itex] [itex]-[/itex] [itex]2y[/itex][itex]2[/itex][itex]rsin(90+\alpha)[/itex]

Now, I know I said [itex]\alpha[/itex] is a variable, but we can treat expressions containing it as constants since we are trying to find [itex]y[/itex][itex]2[/itex] given an arbitrary value of [itex]\alpha[/itex]. What we really have is a quadratic equation in [itex]y[/itex][itex]2[/itex].

[itex](y[/itex][itex]2[/itex][itex])[/itex][itex]2[/itex] [itex]+[/itex] [itex](-2rsin(90+\alpha))y[/itex][itex]2[/itex] [itex]+[/itex] [itex](r^2+\frac{h^2}{4}-d[/itex][itex]2[/itex] [itex]-[/itex] [itex]hrcos(90+\alpha))=0[/itex]

Our solutions are of the form:

[itex]y[/itex][itex]2[/itex] [itex]=\frac{-(-2rsin(90+\alpha))\pm\sqrt{(-2rsin(90+\alpha))^2-4(1)(r^2+\frac{h^2}{4}-d^2-hrcos(90+\alpha))}}{2(1)}[/itex]

Simplify:

[itex]y[/itex][itex]2[/itex] [itex]=rsin(90+\alpha)\pm\sqrt{r^2sin^2(90+\alpha)+hrcos(90+\alpha)+d^2-r^2-\frac{h^2}{4}}[/itex]

What this tells us is that there are two values of [itex]y[/itex][itex]2[/itex] that satisfy the given conditions. If we allow the linkage to rotate freely about the pivot point where it is connected to its disk, you will see that there are two points where the other end intersects the line [itex]x=\frac{h}{2}[/itex]. We want the higher of these two locations, so:

[itex]y[/itex][itex]2[/itex] [itex]=rsin(90+\alpha)+\sqrt{r^2sin^2(90+\alpha)+hrcos(90+\alpha)+d^2-r^2-\frac{h^2}{4}}[/itex]

Next, set up a smaller triangle similar to the one we just used, but this one's hypotenuse is [itex]p[/itex], or the distance from the center of the hole in the linkage to the pivot point connecting it to its disk. Both of these similar triangles share a common vertex at the pivot point connecting our linkage to its disk. If we use this as our reference point, we can subtract coordinates to find sidelengths and then relate these sidelengths using what we know about the proportionality of similar triangles.

The adjacent sidelength of our big triangle equals the difference between the x-coordinates of its pivot points:

[itex]adj_1=x[/itex][itex]2[/itex] [itex]-[/itex] [itex]x[/itex][itex]1[/itex]

[itex]adj_1=\frac{h}{2}-rcos(90+\alpha)[/itex]

The opposite sidelength of our big triangle equals the difference between the y-coordinates of its pivot points:

[itex]opp_1=y[/itex][itex]2[/itex] [itex]-[/itex] [itex]y[/itex][itex]1[/itex]

[itex]opp_1=rsin(90+\alpha)+\sqrt{r^2sin^2(90+\alpha)+hrcos(90+\alpha)+d^2-r^2-\frac{h^2}{4}}-rsin(90+\alpha)[/itex]

[itex]opp_1=\sqrt{r^2sin^2(90+\alpha)+hrcos(90+\alpha)+d^2-r^2-\frac{h^2}{4}}[/itex]

Now we can set up a similarity relationship between the sidelengths of the two triangles as follows:

[itex]\frac{adj_1}{hyp_1}=\frac{adj_2}{hyp_2}[/itex] and [itex]\frac{opp_1}{hyp_1}=\frac{opp_2}{hyp_2}[/itex]

Substituting what we know:

[itex]\frac{adj_2}{p}=\frac{\frac{h}{2}-rcos(90+\alpha)}{c}[/itex] and [itex]\frac{opp_2}{p}=\frac{\sqrt{r^2sin^2(90+\alpha)+hrcos(90+\alpha)+d^2-r^2-\frac{h^2}{4}}}{c}[/itex]

Multiply through:

[itex]adj_2=\frac{p}{c}(\frac{h}{2}-rcos(90+\alpha))[/itex] and [itex]opp_2=\frac{p}{c}\sqrt{r^2sin^2(90+\alpha)+hrcos(90+\alpha)+d^2-r^2-\frac{h^2}{4}}[/itex]

Now add these sidelengths to the reference point's coordinates to obtain the x- and y-coordinates of the center of the hole:

[itex]x_p=rcos(90+\alpha)+\frac{p}{c}(\frac{h}{2}-rcos(90+\alpha))[/itex]

[itex]x_p=\frac{ph}{2c}+(1-\frac{p}{c})rcos(90+\alpha)[/itex]

[itex]y_p=rsin(90+\alpha)+\frac{p}{c}\sqrt{r^2sin^2(90+\alpha)+hrcos(90+α)+d^2-r^2-\frac{h^2}{4}}[/itex]

These last two expressions give the horizontal and vertical positions of the center of the hole in the linkage as functions of [itex]\alpha[/itex]. You should have enough information to substitute actual values for all the other symbols.

If you want to represent the horizontal and vertical positions of the center of the hole as functions of time, you would first need to find [itex]\alpha[/itex] as a function of time. You said you knew the initial angular position of the pivot point connecting the linkage to its disk with respect to the vertical, so such a function might look like [itex]\alpha(t)=kt+\alpha[/itex][itex]i[/itex], where [itex]k[/itex] is the angular speed of either disk and [itex]\alpha[/itex][itex]i[/itex] is the initial angular position. This function assumes the angular speed is constant, which did not look to be the case when I watched the animation. Perhaps the motor causes the disk to accelerate, in which case your function might look like [itex]\alpha(t)=\frac{1}{2}kt^2+\alpha[/itex][itex]i[/itex], where [itex]k[/itex] is the angular acceleration of either disk. Or maybe the disks accelerate, go at constant speed, and then decelerate. Whatever the case may be, substitute your angular position function, [itex]\alpha(t)[/itex], for [itex]\alpha[/itex] in the expressions above.

I used a TI-84 to look at this in parametric mode, and using values of [itex]r[/itex], [itex]d[/itex], [itex]c[/itex], [itex]h[/itex], and [itex]p[/itex] obtained by placing a ruler on my computer screen to measure the mechanism in the animation in various places, along with the interval [itex][38,58][/itex] for [itex]\alpha[/itex] (measured in degrees from the vertical), the curve I'm seeing looks incredibly similar to the one traced out in the animation.
 

Attachments

  • Scan_Doc0085.pdf
    313.5 KB · Views: 258
  • #3
Wow, thank you very much for your help. Very thorough. There is one modification that I am making. I am taking d as an unknown and solving for it's length using geometry. I'm doing this to avoid floating point error.
 

1. What is inverse kinematics?

Inverse kinematics is a mathematical method used to determine the movements of a system of interconnected parts, given the desired position of the end effector (or end point). It is commonly used in robotics and animation to control the motion of complex systems.

2. How is the equation of a path obtained using inverse kinematics?

The equation of a path is obtained using inverse kinematics by first defining the end effector's desired position. Then, the equations for each joint's movement are solved simultaneously to determine the necessary angles for each joint to reach the desired position.

3. What are the limitations of inverse kinematics?

Inverse kinematics can become complex and computationally expensive when dealing with systems with a large number of joints or when multiple end effectors need to be controlled. It also assumes that the system is rigid and does not take into account external forces or obstacles.

4. What are some real-world applications of inverse kinematics?

Inverse kinematics is used in various fields such as robotics, animation, video games, and biomechanical research. It is also used in medical robotics for precise control of surgical tools and in motion capture technology for creating lifelike movements in virtual characters.

5. Can inverse kinematics be solved analytically or does it require numerical methods?

Inverse kinematics can be solved analytically for simple systems with few degrees of freedom. However, for more complex systems, numerical methods are often used to find approximate solutions. These methods involve using iterative algorithms to refine the solution until it reaches a desired level of accuracy.

Similar threads

  • Advanced Physics Homework Help
Replies
1
Views
2K
  • DIY Projects
Replies
8
Views
230
  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • Introductory Physics Homework Help
Replies
6
Views
2K
  • Mechanical Engineering
Replies
7
Views
2K
  • Beyond the Standard Models
Replies
9
Views
467
Replies
4
Views
4K
  • Introductory Physics Homework Help
Replies
28
Views
2K
  • Mechanical Engineering
Replies
1
Views
1K
  • Special and General Relativity
Replies
8
Views
2K
Back
Top