# Documentation

### Warning

This topic refers to Simscape™ Multibody™ First Generation software. The first-generation library will soon be deprecated. To avoid compatibility issues, create any new models and convert any existing models using second-generation blocks—those accessible by entering the command `smlib` at the MATLAB® command prompt.

### Origin and Uses of the Stewart Platform

The Stewart platform is a classic design for position and motion control, originally proposed in 1965 as a flight simulator, and still commonly used for that purpose [1]. Since then, a wide range of applications have benefited from the Stewart platform. A few of the industries using this design include aerospace, automotive, nautical, and machine tool technology. The platform has been used to simulate flight, model a lunar rover, build bridges, aid in vehicle maintenance, design crane hoist mechanisms, and position satellite communication dishes and telescopes, among other tasks.

### Characteristics of the Stewart Platform

The Stewart platform has an exceptional range of motion and can be accurately and easily positioned and oriented. The platform provides a large amount of rigidity, or stiffness, for a given structural mass, and thus provides significant positional certainty. The platform model is moderately complex, with a large number of mechanical constraints that require a robust simulation.

Most Stewart platform variants have six linearly actuated legs with varying combinations of leg-platform connections. The full assembly is a parallel mechanism consisting of a rigid body top or mobile plate connected to an immobile base plate and defined by at least three stationary points on the grounded base connected to the legs.

The Stewart platform used here is connected to the base plate at six points by universal joints. Each leg has two parts, an upper and a lower, connected by a cylindrical joint. Each upper leg is connected to the top plate by another universal joint. Thus the platform has 6*2 + 1 = 13 mobile parts and 6*3 = 18 joints connecting the parts.

Stewart Platform

The following figure shows a detailed schematic of the Stewart platform.

The following figure shows a detailed schematic of a single Stewart platform leg.

### Counting Degrees of Freedom in the Stewart Platform

The standard Stewart platform design has six independent degrees of freedom (DoFs). The mobile plate, if disconnected from the legs and thus unconstrained, also has six DoFs. The Stewart platform therefore exactly reproduces the possible motion of a free plate, but with the added benefit of stable and precise positioning control.

Here are two ways to count the Stewart platform DoFs.

#### Counting Degrees of Freedom on Bodies in Space

Start with the disassembled Stewart platform parts as unconstrained moving bodies. As you assemble the platform, you constrain the bodies as you connect them with joints. The base plate is immobile.

This approach is not the way that a Simscape Multibody simulation counts DoFs. See Counting Degrees of Freedom as Joint Primitives.

Bodies with DoFs.  Each free body in space has six DoFs. Only after you attach them to one another with joints are they no longer able to move freely.

Joints as Constraints.  Connecting bodies with joints constrains the two bodies so they can no longer move freely relative to one another.

For example, a universal joint connection allows two rotational DoFs, but imposes four constraints, three translational (positional) and one rotational.

Assembling the Stewart Platform Parts.  Start assembling the Stewart platform. Each joint attachment simultaneously connects and constrains the bodies. In all, each leg imposes 12 constraints on itself and the top plate.

• The universals connecting the lower legs to the base plate impose four constraints:

• Three positional, requiring two points to be collocated

• One rotational, preventing the lower leg from rotating about its long axis (with respect to the immobile base)

• The cylindricals connecting the upper to the lower legs impose four constraints:

• Two positional, allowing the two legs to slide along the long axis but not translate in the other two directions

• Two rotational, allowing the upper leg to rotate about the long axis (with respect to the lower leg) but not rotate about the other two directions

• The universals connecting the top plate to the upper legs impose four constraints:

• Three positional, requiring two points to be collocated

• One rotational, preventing the upper leg from rotating about its long axis (with respect to the top plate — not with respect to the lower leg)

Obtaining the Independent DoFs.  The Stewart platform has 13 moving bodies. With no constraints, the disassembled Stewart platform has 13*6 = 78 DoFs.

Assembling the parts imposes 12*6 = 72 constraints. Therefore, the Stewart platform has 13*6 - 12*6 = 6 independent DoFs.

#### Counting Degrees of Freedom as Joint Primitives

Bodies Without DoFs.  A Simscape Multibody Body carries no DoFs. Instead, pairs of Bodies are connected by Joints, which express the motions of one Body relative to another.

Six Grounds represent the base plate. Thirteen Bodies represent the moving parts.

Joints Primitives as DoFs.  Each Joint contains primitives. Translational and rotational primitives each express one DoF. (These are the only primitive types used here.) The Stewart platform model contains 18 Joints containing 6*6 = 36 primitives, of which 30 are rotational and 6 are translational.

• Six Universal joints connecting the lower legs to the base. Each contains two rotational primitives.

• Six Cylindrical joints connecting the lower to the upper legs. Each contains a rotational and a translational primitive.

• Six Universal joints connecting the upper legs to the top plate. Each contains two rotational primitives.

Counting Loops.  The Stewart platform legs form six loops, but only five are independent. You can obtain a topologically equivalent platform by flattening the top plate and base into lines and counting five loops that have the six legs as sides:

Cutting the Stewart Platform Joints and Deriving the Tree.  To simulate a machine with closed loops (like the Stewart platform), a Simscape Multibody simulation replaces it internally with an equivalent machine (the spanning tree) obtained by cutting all the independent loops once and replacing the cuts with (invisible) equivalent constraints.

Obtain the spanning tree by cutting five of the six upper Universals. This cutting is just enough to open all loops but not disconnect the machine into disjoint parts. The tree contains 13 (uncut) Joints constituting 6*(2+2) + 2 = 26 DoFs.

Imposing the Cutting Constraints and Deriving the Independent DoFs.  To complete the conversion of the closed-loop machine into an equivalent tree, impose constraints to replace the cut Joints. There are 20 such constraints. Each constraint is equivalent to reattaching a cut Joint and analyzes into five sets of

• Three positional constraints, requiring two points to be collocated

• One rotational constraint, preventing the upper leg from rotating about its long axis relative to the top plate

Thus reattaching the cut Joints to reassemble the platform leaves 26 - 5*4 = 6 independent DoFs.

#### Representing the Independent Degrees of Freedom

These six independent DoFs are usually taken to be the six leg lengths. Every other DoF identified here is now dependent on these six lengths. Each time you change a length, the universals connecting the legs to the base and top plate rotate, the top plate shifts and rotates, and the upper legs rotate about their long axes.

Alternatively and equivalently, you can take the six independent DoFs to be the six DoFs of the top, mobile plate. By connecting the top plate, you replace the six independent DoFs of an unconstrained plate with six DoFs under the precise and stable control of the six-leg positioning system.

The six DoFs of the connected top plate are not in addition to the leg-length DoFs. They are just an equivalent, replacement description of the same six independent DoFs. The whole platform system, once fully connected, always has exactly six independent degrees of freedom.