Kinematics of the Stewart Platformmath.ucdenver.edu/~hbouwmee/cp1/CP1-solutions.pdf · 4. Solve the...

7
MATH 4650: Computer Project #1 - Due on September 17, 2013 Kinematics of the Stewart Platform (Reality Check 1: page 67) A Stewart platform consists of six variable length struts, or prismatic joints, supporting a payload. Prismatic joints operate by changing the length of the strut, usually pneumatically or hydraulically. As a six-degree-of- freedom robot, the Stewart platform can be placed at any point and inclination in three-dimensional space that is within its reach. To simplify matters, the project concerns a two-dimensional version of the Stewart platform. It will model a manipulator composed of a triangular platform in a fixed plane controlled by three struts, as shown in Figure 1. The inner triangle represents the planar Stewart platform whose dimensions are defined by the three lengths L 1 , L 2 , and L 3 . Let γ denote the angle across from side L 1 . The position of the platform is controlled by the three numbers p 1 , p 2 , and p 3 , the variable lengths of the three struts. (x 1 , 0) (0, 0) (x, y) (x 2 ,y 2 ) L 3 L 1 L 2 p 1 p 2 p 3 (x + L 2 cos (θ + γ ),y + L 2 sin (θ + γ ) (x + L 3 cos θ, y + L 3 sin θ) θ γ x y Figure 1: Schematic of planar Stewart platform. The forward kinematics problem is to use the lengths p 1 , p 2 , p 3 to determine the unknowns x, y, θ. Finding the position of the platform, given the three strut lengths, is called the forward, or direct, kinematics problem for this manipulator. Namely, the problem is to compute (x, y) and θ for each given p 1 , p 2 , p 3 . Since there are three degrees of freedom, it is natural to expect three numbers to specify the position. For motion planning, it is important to solve this problem as fast as possible, often in real time. Unfortunately, no closed-form solution of the planar Stewart platform forward kinematics problem is known. The best current methods involve reducing the geometry of Figure 1 to a single equation and solving it using one of the solvers explained in this chapter. Your job is to complete the derivation of this equation and write 1

Transcript of Kinematics of the Stewart Platformmath.ucdenver.edu/~hbouwmee/cp1/CP1-solutions.pdf · 4. Solve the...

Page 1: Kinematics of the Stewart Platformmath.ucdenver.edu/~hbouwmee/cp1/CP1-solutions.pdf · 4. Solve the forward kinematics problem for the planar Stewart platform speci ed by x 1 = 5,

MATH 4650: Computer Project #1 - Due on September 17, 2013

Kinematics of the Stewart Platform(Reality Check 1: page 67)

A Stewart platform consists of six variable length struts, or prismatic joints, supporting a payload. Prismaticjoints operate by changing the length of the strut, usually pneumatically or hydraulically. As a six-degree-of-freedom robot, the Stewart platform can be placed at any point and inclination in three-dimensional space thatis within its reach.To simplify matters, the project concerns a two-dimensional version of the Stewart platform. It will model amanipulator composed of a triangular platform in a fixed plane controlled by three struts, as shown in Figure 1.The inner triangle represents the planar Stewart platform whose dimensions are defined by the three lengths L1,L2, and L3. Let γ denote the angle across from side L1. The position of the platform is controlled by the threenumbers p1, p2, and p3, the variable lengths of the three struts.

(x1, 0)(0, 0)

(x, y)

(x2, y2)

L3

L1

L2

p1

p2

p3

(x+ L2 cos (θ + γ), y + L2 sin (θ + γ)

(x+ L3 cos θ, y + L3 sin θ)

θ

γ

x

y

Figure 1: Schematic of planar Stewart platform. The forward kinematics problem is to use the lengthsp1, p2, p3 to determine the unknowns x, y, θ.

Finding the position of the platform, given the three strut lengths, is called the forward, or direct, kinematicsproblem for this manipulator. Namely, the problem is to compute (x, y) and θ for each given p1, p2, p3. Sincethere are three degrees of freedom, it is natural to expect three numbers to specify the position. For motionplanning, it is important to solve this problem as fast as possible, often in real time. Unfortunately, no closed-formsolution of the planar Stewart platform forward kinematics problem is known.The best current methods involve reducing the geometry of Figure 1 to a single equation and solving it usingone of the solvers explained in this chapter. Your job is to complete the derivation of this equation and write

1

Page 2: Kinematics of the Stewart Platformmath.ucdenver.edu/~hbouwmee/cp1/CP1-solutions.pdf · 4. Solve the forward kinematics problem for the planar Stewart platform speci ed by x 1 = 5,

code to carry out its solution.Simple trigonometry applied to Figure 1 implies the following three equations:

p21 = x2 + y2

p22 = (x+A2)2 + (y +B2)

2

p23 = (x+A3)2 + (y +B3)

2

(1)

In these equations,A2 = L3 cos θ − x1

B2 = L3 sin θ

A3 = L2 cos (θ + γ)− x2 = L2 [cos θ cos γ − sin θ sin γ]− x2

B3 = L2 sin (θ + γ)− y2 = L2 [cos θ sin γ + sin θ cos γ]− y2.

(2)

Note that (1) solves the inverse kinematics problem of the planar Stewart platform, which is to find p1, p2, p3given x, y, θ. Your goal is to solve the forward problem, namely, to find x, y, θ, given p1, p2, p3.Multiplying out the last two equations of (1) and using the first yields

p22 = x2 + y2 + 2A2x+ 2B2y +A22 +B2

2 = p21 + 2A2x+ 2B2y +A22 +B2

2

p23 = x2 + y2 + 2A3x+ 2B3y +A23 +B2

3 = p21 + 2A3x+ 2B3y +A23 +B2

3 ,

which can be solved for x and y as

x =N1

D=

B3

(p22 − p21 −A2

2 −B22

)−B2

(p23 − p21 −A2

3 −B23

)2 (A2B3 −B2A3)

y =N2

D=

−A3

(p22 − p21 −A2

2 −B22

)+A2

(p23 − p21 −A2

3 −B23

)2 (A2B3 −B2A3)

(3)

as long as D = 2 (A2B3 −B2A3) 6= 0.Substituting these expressions for x and y into the first equation of (1), and multiplying through by D2, yieldsone equation, namely,

f = N21 +N2

2 − p21D2 = 0 (4)

in the single unknown θ. (Recall that p1, p2, p3, L1, L2, L3, γ, x1, x2, y2, are known.) If the roots of f(θ) canbe found, the corresponding x- and y- values follow immediately from (3).Note that f(θ) is a polynomial in sin θ and cos θ, so given any root θ, there are other roots θ + 2πk that areequivalent for the platform. For that reason, we can restrict attention to θ in [−π, π].Activities

1. Write a Matlab function file for f(θ). The parameters L1, L2, L3, γ, x1, x2, y2 are fixed constants, andthe strut lengths p1, p2, p3 will be known for a given pose. Check Appendix B.5 if you are new to Matlabfunction files. Here are the first and last lines:

function out=f(theta)...out=N1^2+N2^2-p1^2*D^2;

To test your code, set the parameters L1 = 2,L2 = L3 =√2, γ = π/2, p1 = p2 = p3 =

√5 from Figure 2.

Then substituting θ = −π/4 or θ = π/4, corresponding to Figures 2a and 2b, respectively, should makef(θ) = 0.

2. Plot f(θ) on [−π, π]. You may use the @ symbol as described in Appendix B.5 to assign a function handleto your function file in the plotting command. You may also need to precede arithmetic operations withthe “ . ” character to vectorize the operations, as explained in Appendix B.2. As a check of your work,there should be roots at ±π/4.

Solution: See Figure 3.

2

Page 3: Kinematics of the Stewart Platformmath.ucdenver.edu/~hbouwmee/cp1/CP1-solutions.pdf · 4. Solve the forward kinematics problem for the planar Stewart platform speci ed by x 1 = 5,

1 2 3 4

1

2

3

4

(a)

1 2 3 4

1

2

3

4

(b)

Figure 2: Two poses of the planar Stewart platform with identical arm lengths. Each pose correspondsto a solution of (1) with strut lengths p1 = p2 = p3 =

√5. The shape of the triangle is defined by L1 = 2,L2 =

L3 =√2, γ = π/2.

3. Reproduce Figure 2. The Matlab commands

>> plot([u1 u2 u3 u1],[v1 v2 v3 v1], ’r’); hold on;

>> plot([0 x1 x2],[0 0 y2],’bo’);

will plot a red triangle with vertices (u1,v1),(u2,v2) (u3,v3) and place small circles at the strut anchorpoints (0,0), (x1,0), (x2,y2). In addition, draw the struts.

Solution: See Figures 4a and 4b.

4. Solve the forward kinematics problem for the planar Stewart platform specified by x1 = 5, (x2, y2) = (0, 6),L1 = L3 = 3, L2 = 3

√2, γ = π/4, p1 = p2 = 5, p3 = 3. Begin by plotting f(θ). Use an equation solver to

find all four poses, and plot them. Check your answers by verifying that p1, p2, p3 are the lengths of thestruts in your plot.

Solution: The roots are:

θ =

−0.7208−0.33101.14372.1159

and the respective poses are shown in Figures 5a to 5d.

5. Change the strut length to p2 = 7 and re-solve the problem. For these parameters, there are six poses.

Solution: The roots are:

θ =

−0.6732−0.35470.03780.45890.97772.5139

and the respective poses are shown in Figures 6a to 6f.

3

Page 4: Kinematics of the Stewart Platformmath.ucdenver.edu/~hbouwmee/cp1/CP1-solutions.pdf · 4. Solve the forward kinematics problem for the planar Stewart platform speci ed by x 1 = 5,

−3 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 3−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

2.8

3

3.2

·104

θ

f(θ)

Roots at θ = { -π/4, π/4}

Figure 3: Function f(θ) with respect to the θ-axis.

6. Find a strut length p2, with the rest of the parameters as in Step 4, for which there are only two poses.

Solution: Any value for p2 in the following intervals is valid.

3.7107 ≤ p2 ≤ 4.8636

and7.8493 ≤ p2 ≤ 9.2618

7. Calculate the intervals in p2, with the rest of the parameters as in Step 4, for which there are 0, 2, 4, and6 poses, respectively.

Solution:

Approximate intervals are (see Figure 7):

# of roots x1 x20 0.0000 3.70962 3.7107 4.86364 4.8647 6.96706 6.9681 7.02204 7.0231 7.84822 7.8493 9.26180 9.2629 11.0000

8. (Graduate Students) Show that f(θ) has at most six roots in that interval.

4

Page 5: Kinematics of the Stewart Platformmath.ucdenver.edu/~hbouwmee/cp1/CP1-solutions.pdf · 4. Solve the forward kinematics problem for the planar Stewart platform speci ed by x 1 = 5,

1 2 3 4

1

2

3

4

x

y

(a) θ = −π/4

1 2 3 4

1

2

3

4

x

y

(b) θ = π/4

Figure 4: Two poses of Step 3

−2 0 2 4 60

2

4

6

(a) θ = −0.7208

−2 0 2 4 60

2

4

6

(b) θ = −0.3310

−2 0 2 4 60

2

4

6

(c) θ = 1.1437

−2 0 2 4 60

2

4

6

(d) θ = 2.1159

Figure 5: Four poses of Step 4

5

Page 6: Kinematics of the Stewart Platformmath.ucdenver.edu/~hbouwmee/cp1/CP1-solutions.pdf · 4. Solve the forward kinematics problem for the planar Stewart platform speci ed by x 1 = 5,

−4 −2 0 2 4 6

0

2

4

6

8

(a) θ = −0.6732

−4 −2 0 2 4 6

0

2

4

6

8

(b) θ = −0.3547

−4 −2 0 2 4 6

0

2

4

6

8

(c) θ = 0.0378

−4 −2 0 2 4 6

0

2

4

6

8

(d) θ = 0.4589

−4 −2 0 2 4 6

0

2

4

6

8

(e) θ = 0.9777

−4 −2 0 2 4 6

0

2

4

6

8

(f) θ = 2.5139

Figure 6: Six poses of Step 5

6

Page 7: Kinematics of the Stewart Platformmath.ucdenver.edu/~hbouwmee/cp1/CP1-solutions.pdf · 4. Solve the forward kinematics problem for the planar Stewart platform speci ed by x 1 = 5,

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 10.5 110

2

4

6

p2

number

ofroots

Number of roots for f(θ) versus the value of p2.

Figure 7: Intervals for which there are 0, 2, 4, and 6 roots.

7