Simulation of Linkages
Total Page:16
File Type:pdf, Size:1020Kb
Simulation of linkages Erik Ferrando and Mart´ın Forsberg Universitat Polit`ecnica de Catalunya (Dated: May 31, 2019) Mechanical linkages and their possible movements are of interest in many parts of mechanical engineering and robotics. The theory behind this topic employs a considerable body of nontrivial mathematics, and in particular group theory. In this paper we study the algorithms that determine the allowed movements of a class of linkages, and implement them in Python. I. INTRODUCTION freedom (S; E), two (C) and one (P; R; H). When rigid bodies couple we get a kinematic chain, which takes place pairwise, thus giving the name kine- matic pair. There are two types of kinematic pairs: lower and upper. When we have a kinematic chain that is coupled with lower kinematic pairs, we can distin- guish between simple and complex kinematic chains. Regarding the former, there are two types, namely, open and closed; and regarding the latter we can differentiate between tree structures and chains with multiple closed loops. The next important item is the kinematic constraint equations of a general mechanical system, that leads to the concept of dependent and independent generalized speeds, by means of which the twists of all the links of the chain are expressed as linear transformations of the vector of independent generalized speeds. FIG. 1. Types of lower kinematic pairs The relative motion associated with each of the lower II. THEORETICAL FRAMEWORK kinematic pairs constitutes a group under the operation of composition. These groups, which are subgroups of A. Kinematic pair types and degrees of freedom the Euclidean group G, are denoted by its letter shown in FIG.1: We know that there are two types of kinematic pairs, namely, lower and upper pairs. Lower pairs exist when • Revolute pair: R(A; e) is the subgroup of rotations the coupling between the two bodies occurs along a around an axis of vector e passing through a point surface, while upper pairs exist when the coupling takes A. place along a point or a line. There are six types of lower pairs (FIG.1) but all six can be decomposed into a • Prismatic pair: P(e) is the subgroup of the relative combination of prismatic (P ) and/or revolute (R) lower translations given by the vector e kinematic pairs. • Helical pair: H(A; p; e) is the group of rotations A kinematic chain is simple if each of its links is around an axis parallel to e and passing through a coupled to, at most, two other links, so then if all links point A with pitch p. are coupled to exactly two other links, the kinematic chain is closed. Otherwise (i.e. all links are coupled to • Cylindrical pair: C(A; e) is the subgroup of rota- two links, except two of them that are coupled to only tions and translations around an axis of vector e one), we have an open kinematic chain. In either case, passing through a point A. we can number the links uniquely. • Spherical pair: S(A) is the subgroup of rotations The degree of freedom of a kinematic chain is defined around a point A. as the number of variables that define uniquely the position and orientation of all its links. Among the lower • Planar pair: E(A) is the subgroup of relative mo- kinematic pairs, there are those with three degrees of tions perpendicular to a vector e 2 The dimension of one of the foregoing subgroups is chain cannot be reduced to an equivalent trivial chain it defined as the degree of freedom of the relative motion is termed paradoxical or overconstrained. it allows (e.g. dim(S) = 3). There exist subgroups of G Let's assume that the product of all subgroups Gi of a that are not associated to any lower pair, such as plane trivial (n + 1)-link kinematic chain be a subgroup of G translations (T ) or three-dimensional translations (U). n Y 0 Taking the subchain composed of links numbered i; i+ Gi = G ⊂ G: i=0 1; : : : ; i + j, in [4], the bond Bi;i+j between the links i and i + j is defined as the product of subgroups Gk for 0 Let d be the dimension of G and ri the number of k = i; i + 1; : : : ; i + j − 1, where Gk denotes the subgroup constraints on the two bodies that Ki couples. Then the of relative motions associated with the kinematic pair degree of freedom of the chain is given by the Chebyshev- connecting links k and k + 1, which is not necessarily a Gr¨ubler-Kutzbach formula: subgroup itself. In an n-link closed kinematic chain, the n idle degree of freedom of the chain is X f = dn − ri − m (3) n X i=0 m := dim(Gk) − dim(B1;n+1); (1) k=1 where m is defined as in equation (1). where the dimension of the bond B1;n+1 can be com- puted, using inclusion-exclusion principle, as Now, regarding exceptional chains, we introduce the concept of a reduced equivalent. There are some steps n involved in the achievement of a reduced equivalent: X X B = dim(G ) − dim(G \G ) + ::: (2) 1;n+1 i i j (i) Get a second chain by decomposing all links as a i=1 1≤i<j≤n composition of R and P . We will use the following notation to describe kine- (ii) Assume that the original chain has n + 1 links and matic chains: K0K1 :::Kn−1, where Ki represents the 0 0 type of lower kinematic pair that couples links i and the decomposed one has n + 1 (clearly n ≥ n). Then, form the products of all possible combina- i + 1. For example, if RCR denotes a kinematic chain, 0 it is composed of 3 pairs, and hence, 3 links, which are tions of 2; 3; : : : ; n +1 links. Obviously, the number coupled by rotational, cykindrical and rotational pairs, of possible combinations is respectively. n0+1 n0+1 X X n0 + 1 N = : For example, consider an open SS chain, so the k k i=2 i=2 associated groups are S(A), S(B), and the intersection −−! is S(A) \S(B) = R(A; AB), so its dimension is 1, then (iii) Among the N possible products, sort all those that by equation (2) we get that dim(B1;3) = 3 + 3 − 1 = 5. are subsets of G. If, except for the two-link prod- Thus, the degree of freedom of the end link is 5, while ucts, none is subgroup of G, the chain is paradoxi- that of the chain is 6. cal and its degree of freedom cannot be determined from its topology. The determination of the degree of freedom of a chain is a basic problem in the study of kinematic chains, and, (iv) Let GM be the subgroup, of those sorted out in in this regard, closed chains are more challenging than (iii), with the greatest dimension dM . If there exist open chains, since the degree of freedom of an open more than one subgroup of dimension dM , consider chain can be computed by (2). Nevertheless, dealing the product of all of them; if this product is not a with closed kinematic chains we will have problems to subgroup of G the chain is paradoxical, but if it is find the degree of freedom, and that's why kinematic a subgroup of G, the chain is exceptional and the chains will be classified in two major groups: those procedure can be continued. whose degree of freedom can determined from their sole topology and those whose topology doesn't suffice to (v) Intersect GM with each of the Gi subgroups of the original chain (clearly, each intersection will give us determine their degree of freedom. The former can be 0 divided in two subtypes: trivial and exceptional. another subgroup) and denote it by Gi. 00 0 (vi) Let G be the product of all Gi subgroups. If Trivial kinematic chains are those such that the prod- 00 G = GM the chain is exceptional, otherwise it is uct of the subgroups associated to every kinematic pair is paradoxical. a subgroup of the rigid-body motions group, while if the product of subgroups is not a subgroup of the rigid-body (vii) If the chain is exceptional, form a new kinematic 0 motions group but the chain can be reduced to an equiv- chain with Ki defined the following way. If the 0 alent trivial chain, we have an exceptional chain. If the subgroup Gi is associated with one of the six lower 3 0 kinematic pairs, then Ki is simply defined as that III. SIMULATION FRAMEWORK 0 pair. If it is not, we decompose Gi as a product of subgroups of G associated with lower kinematic We have developed two tools to simulate the move- pairs. ment of two and three-dimensional closed-ring linkages (viii) The resulting trivial chain is called the reduced that only include rotational kinematic pairs. equivalent of the original exceptional chain. Since it is trivial, its degree of freedom can be obtained We have used Python with the Numpy, Pygame and with equation (3). Clearly, both chains have the OpenGL libraries. same degree of freedom. A. 2D linkage simulation B. The twist of a link and the Jacobian of a simple kinematic chain The 2-dimensional twist only has 3 dimensions be- cause the angular velocity is a scalar instead of a vector. Given a kinematic chain, we have seen that it can be Given an ordered set of n two-dimensional points, we can decomposed into a chain of R and/or P pairs.