Advanced design of mechanical systems - from analysis to optimization - edited by Jorge A.C. Ambrósio, Peter Eberhard..pdf
Introduction
The first three chapters given here are actually divided into two logical parts:
Chapter 1–2 and Chapter 3 The first two chapters introduce the general analy- sis methods and notation used in most of the remaining chapters, including the concept of Cartesian coordinates It is therefore recommended to read these chap- ters first The chapters are divided into the four components: Planar kinematics, planar dynamics, spatial kinematics, and spatial dynamics It does, however, only treat systems of rigid bodies; in later chapters it is shown how the methods can be expanded to deal with flexible bodies The notation used here is strongly based on the one found in (Nikravesh, 1988).
Chapter 3 is on synthesis of mechanisms, and deals mostly with some none- standard methods on this subject It also assumes some knowledge of optimization methods, so it is recommended to postpone reading of this chapter until the chap- ters on general optimization and synthesis have been read.
Cartesian Coordinates
Consider the rigid body, labelledi, shown in Figure 1.1 The body is located in a plane with an inertialxy-coordinate system by thegeometricvectorri This vector has thealgebraiccomponents r i x i y i
(1.1) which also locates the center of mass of the body At the center of mass is attached a localξ i η i -coordinate system This coordinate system defines the rotation,ϕ i , of the body as shown All together the three quantities,x i , y i andϕ i , makes up the
∗ Work carried out while the author worked at Technical University of Denmark, Dept of MechanicalEngineering, Nils Koppels All´e bldg 404, DK-2800 Kgs Lyngby, Denmark
Figure 1.1.Planar rigid body with a local coordinate system attached. or q i r i ϕi
In Figure 1.2 bodyiis shown with a pointPi This point is fixed in bodyi, and has the position vectors P i relative to the center of mass In theξiηicoordinate system this vector is given by s P i ξ P i η P i
Figure 1.2.Rigid body with a pointP i attached.
From Figure 1.2 it can be seen that the components of s i in the global xy- coordinate system can be written as s P i ξ P i cosϕi−η P i sinϕi ξ P i sinϕi+η P i cosϕi
This we can also write as s P i cosϕi −sinϕi sinϕi cosϕi ξ P i η P i
(1.8) is thetransformation matrixwhich transforms entities given in the local coordinate system to the globalxycoordinate system The transformation matrixA i is an orthonormal matrix, see e.g (Nikravesh, 1988), which means that s P i =A T i s P i (1.9) whereA T is the transpose ofA From Figure 1.2 it can also be seen that r i P =r i +s P i (1.10) from which the global coordinates of pointPican be found as r P i =r i +s P i (1.11) or r P i =r i+As P i (1.12) in which r P i x P i y i P
(1.13) are the global coordinates ofP i Equation (1.12) can be expanded to r P i xi yi
(1.14) from which it can be seen that the coordinates of any point on a body can be deter- mined if the Cartesian coordinates of the bodyq i r T i ϕ i T and the coordinates
Figure 1.3.A collection ofn b bodies in a plane ξ P i andη P i of the point in the local coordinate system are known This fact will be used extensively in the following If we have more than one body, let us sayn b bodies, as shown in Figure 1.3, the coordinates of all the bodies can be assembled in the vectorqas q ⎧⎪
Kinematic Constraints
In the preceding section it has been shown how we can describe the position and rotation of a number of bodies located in the plane For most mechanical systems the bodies do not move independently, as they are connected bykinematic joints which restrict their relative motion Two examples of such joints, the revolute and the translational joint, are shown in Figure 1.4 The revolute joint constrains the motion of the two bodies connected by it to a rotation about a common axis, while the translational joint constrains the motion to a translational movement along an axis.
Figure 1.4.A slider-crank mechanism with 3 revolute (R) and 1 translational (T) joint
There are of course many more joint types present in mechanical systems, but these are the most common ones, and we shall restrict ourselves to describe these two in details For a description of more joints, please refer to e.g (Nikravesh, 1988).
Figure 1.5.Revolute joint connecting bodiesiandj
The revolute joint In Figure 1.5 a schematic drawing of a revolute joint between bodiesiandjis shown The rotational axis is perpendicular to thexy-plane, going through the pointP As the joint is connected to both bodies, the point actually has two coincident points,P i on bodyiandP j on bodyj For the joint to act as a revolute joint, these points must be coincident at all times, which we can write as r i +s P i −r j −s P j =0 (1.17) or, using Equation (1.12) Φ=r i+A i s P i −r j−A j s P j =0 (1.18) In more elaborate terms this comes out as Φ ( r ) x i +ξ i P cosϕ i −η P i sinϕ i −x j −ξ j P cosϕ j +η P j sinϕ j yi+ξ i P sinϕi+η P i cosϕi−xj−ξ j P sinϕj−η j P cosϕj
(1.19) From this it is also clear that only coordinates from bodyiand bodyjappear in the expression for this constraint, i.e.Φ ( r ) =Φ ( r ) (q i ,q j ).
Figure 1.6.Schematic of a translational joint
The translational joint In Figure 1.6 a schematic drawing of a translational joint between bodiesiandj is shown together with pointsPi andQi on bodyi and pointPj on bodyj The translational joint restricts the relative motion between the two bodies along the translational axis, meaning also that the two bodies cannot rotate relative to each other Therefore, the conditions for maintaining the required relative motion are: There cannot be any relative rotation between the two bodies, and the pointP j should remain on the line that passes throughP i Q i The first condition we can express as
(ϕ i −ϕ j )−(ϕ i −ϕ j ) 0 = 0 (1.20) where(ϕi−ϕj) 0 is the given, constant angle between the two bodies The other condition we can express as s i d⇒s˘ i ⊥d ij ⇒˘s T i d ij = 0 (1.21) wheres i =−−→Q i P i andd ij =−−→P i P j , and˘over a vectoraindicates the vector rotated 90 o counterclockwise In component form, this means that a x y
The constraint equations that define a translational joint then become Φ ( t ) (ϕ i −ϕ j )−(ϕ i −ϕ j )0 ˘ s T i d ij
As we have that s i=r P i −r Q i =r i+A i s P i −r i−A i s Q i =A i(s P i −s Q i ) (1.24) and d ij=r P j −r P i =r i +A i s P i −r j −A j s P j , (1.25) Equation (1.23) can also be written as Φ ( t ) (ϕ i −ϕ j )−(ϕ i −ϕ j ) 0
We again notice that the constraint equations only depend on the coordinates of the two bodies connected by the joint, i.e.Φ ( t ) =Φ ( t ) (q i ,q j ).
Ground One last kinematic constraint will be mentioned here For kinematic problems, i.e mechanisms, it will normally be necessary to constrain one or more bodies to remain fixed in space, i.e togrounda body Mathematically, we can express this for bodyias Φ ( g ) ⎧⎨
Drivers
We now have most of the building blocks needed to construct a mechanism Con- sider for example the mechanism shown in Figure 1.7(a) If we disassemble the system, as shown in Figure 1.7(b), we see that it is a system with six bodies To obtain the model shown in Figure 1.7(a) we need to “glue” the bodies together with the six revolute joints marked withRand one translational joint, marked with T Also, one body has to be fixed to ground, marked withG.
Figure 1.7.A mechanism from a sewing machine The mechanism (a), and the disassem- bled mechanism with the “gluing” joints (b)
For the mechanism shown in Figure 1.7 we can now set up the equations needed to assemble the mechanism For each of the six revolute joints we have 2 equa- tions, c.f Equation (1.18), for the translational joint we have 2 equations, c.f.
Equation (1.23), and for the ground we have 3 equations, c.f Equation (1.27) As we have six bodies, and each of the bodies has 3 coordinates, we need to determine n= 6×3 = 18coordinates To do this we havem= 6×2 + 1×2 + 1×3 = 17 equations This is therefore a system with 1 Degree-of-freedom, or 1 DOF, and we somehow need to specify this DOF For kinematic analysis we will usedriversfor that.
In general, if we have ncoordinates andmconstraint equations, we have a system ofndof =n−mDOF, and we need to specifyndof drivers Two of the most often encountered drivers will be given here.
The most common driver in planar kinematics is therotational driverwhich specifies a relative rotation between two bodies, most often between ground and an adjacent body, as shown in Figure 1.8 For this driver we have the equation Φ ( rd ) =ϕ i −ϕ j −f(t) = 0 (1.28)
Figure 1.8.The rotational driver which specifies that bodyi rotates relative to bodyj in a manner described by f(t) Very often the function will be of the formf(t) = 1 2 αt 2 +ωt+ϕ 0 Notice that ifα= 0in this expression, we have a driver with a constant angular velocity.
Another common driver is thedistance driverfor which a distance between a pointP i in bodyiand a pointP j in bodyjis specified, as shown in Figure 1.9.
The constraint equation for this driver can be written as Φ ( dd ) =d T ij d ij−f(t) 2 = 0 (1.29) in whichd ij =r j+s P j −r i−s P i With the driver constraints available, it is now possible to set up enough equa- tions to solve the kinematics problem For example for the sewing mechanism problem above, one could decide to drive body4relative to ground with a rota- tional driver, which would give us the one equation missing.
Notice that the driver constraint equations differ from the joint constraint equa- tions in the sense that they are explicit functions of time.
Solution of the Kinematic Problem
Consider again the mechanism from Figure 1.7 We can “build” this from 6 bodies, 6 revolute joints, 1 translational joint and one driver We assemble all the constraint equations from joints and drivers intoΦ(q, t)as in Φ(q, t) ⎧⎪
If we look at the mechanism at a certain time,tk, these equations become Φ(q, tk) ⎧⎪
=0 (1.31) which are exactly 18 non-linear equations in the 18 unknown coordinates con- tained inq, i.e.q T ={x 1 , y 1 , ϕ 1 , x 2 , x 6 , y 6 , ϕ 6 } T
This can be generalized so that for a given kinematic system we must solve the equations Φ(q, t) =0 (1.32) for given values oft.
The Newton-Raphson Procedure The task at hand now is to solve a set of non- linear equations Consider first the one-dimensional equivalent: Solve the scalar equationΦ(q) = 0 whereΦ(q) is a non-linear function ofq Assume that we have an initial guess, q 0 of the solution We can then make a first-order Taylor expansion ofΦ: Φ(q)≈Φ(q 0 ) + dΦ dq q 0 Δq (1.33) in whichΔq=q−q 0 If we set this approximating function equal to zero, we can solve forΔq: Φ(q 0 ) + dΦ dq q 0 Δq= 0⇒Δq=−Φ(q 0 ) d Φ dq q 0
(1.34) and then determineq 1 asq 1 =q 0 + Δq From this we can determineq 2 as q 2 =q 1 −Φ(q 1 ) d Φ dq q 1
This process can be continued to determine q 3 , q 4 , etc The process is shown graphically in Figure 1.10 Under most conditions this process will converge in very few steps.
Figure 1.10.The Newton-Raphson procedure for a scalar function
This process can be generalized to n-dimensions If we have ann-vector of functionsΦ(q)in then-unknownsq, and we have an initial guess of the solution, q 0 , we can make a Taylor expansion of this as Φ(q)≈Φ(q 0 ) +Φqq 0 Δq (1.36) in which we have defined Φq :=∂Φ
Again, setting the first-order expansion equal to zero, we can solve forΔq: Φ(q 0 ) +Φqq 0 Δq=0⇒ Φqq 0 Δq=−Φ(q 0 ) (1.38) which is a set of linear equations Once Equation (1.38) has been solved,qcan be updated usingq 1 =q 0 + Δq, and an iterative process similar to the one described for the one-dimensional case can be performed.
The Jacobian Matrix As we have seen in the section on the Newton-Raphson procedure we need the partial derivative of the constraints with respect to the Carte- sian coordinates in order to solve the set of non-linear equations that the constraints constitute In this section we will demonstrate how we can do that in a systematic way for various joints and drivers.
First, we take a look at how the Jacobian matrix,∂Φ/∂qis constructed Clearly, thek -th element is thek-th constraint equation differentiated with respect to the -th coordinate.
Consider first the constraint equations for the revolute joint described in the section on this joint: r i+A i s P i q i
As seen, these equations only depend on the Cartesian coordinates for the two bodies,iandj, which are connected to this joint Therefore the Jacobain matrix only has entries in the columns that correspond to the coordinates belonging to the i-th andj-th body, as seen in Figure 1.11. ã ã ã x i y i ϕ i ã ã ã x j y j ϕ j ã ã ã Φ ( r ) 0ã ã ã0 0ã ã ã0 ì × × × × ì 0ã ã ã0 0ã ã ã0 ì × × × × ì 0ã ã ã0 0ã ã ã0
Figure 1.11.Structure of the entries in the Jacobian matrix from a revolute joint
Similar observations can be made for the translational joint and the drivers,we have presented so far, whereas a grounded body only will have entries in the columns corresponding to the coordinates for this body.
Table 1.1.Entries of the Jacobian matrix for selected joints and drivers (Subscriptxandy indicates thex- andy- component of a vector, respectively) x i y i ϕ i x j y j ϕ j Φ ( q r ) 1
00 1 Φ ( q rd ) 0 0 1 0 0 −1 Φ ( q dd ) −2d ij x −2d ij y 2(s P i y d ij x
Here, we will not derive the various entries for the Jacobian matrix, but restrict ourselves to give the entries for ground, the revolute and translational joint, and the rotational and distance drivers, see Table 1.1 A thorough derivation of these entries as well as a larger table of Jacobian matrix entries for many joint types can be found in e.g (Nikravesh, 1988).
With these entries at hand, it is now possible systematically to set up the Jaco- bian matrix for any planar mechanism which is composed of a number of bodies interconnected with an arbitrary combination of revolute and translational joints,grounded bodies, and rotational and distance drivers.
Velocities and Accelerations
Once the positions have been obtained, and hence the Jacobian matrix is available in factorized form, the velocities and accelerations may be obtained directly as shown below
Velocity analysis The constraint Equations (1.32) must hold for allt Hence, both sides can be differentiated with respect to time to obtain Φqq˙ =−Φ t≡υ (1.40) where arguments(q, t)have been left out for clarity andΦ •denotes ∂ Φ
∂ • For all holonomic constraints, like the joints shown so far, the entries on the right hand side are0, so that in most cases only entries from drivers are present It is also
Table 1.2.Entries inγfor selected joints and drivers (Subscriptxandyindicates thex- andy- component of a vector, respectively) γ Φ ( r ) (s P i x −xi) ˙φ 2 i −(s P j x −xj) ˙φ 2 j
00 0 Φ ( rd ) f(¨t) Φ ( dd ) 2(s P i φ˙ 2 i −s P j φ˙ 2 j ) T ãd−d˙ T ãd˙ +ffă+ ˙f 2 ) noted that the Jacobian matrix has already been factorized at the current configu- ration in the last iteration step of the Newton-Raphson procedure So to determine the velocities of the bodies requires merely a forward-backward substitution.
Acceleration analysis As for the velocity analysis, the accelerations can be de- termined by differentiating the velocity Equation (1.40) with respect to time to obtain Φqq¨=−(Φqq˙)qq˙ −2Φqq˙ −Φ tt ≡γ (1.41) where it again is seen that the accelerations can be determined by a forward- backward substitution using the factorized Jacobian matrix Here, however, the right hand side is more complex Values for the common constraints as shown above are given in Table 1.2, some taken from (Nikravesh, 1988).
Time simulation Above, we have described how we can solve for all the Carte- sian coordinates of the bodies in a mechanical systemfor a given timet k Most often, we want to perform a simulation of the behaviour of the system over a pe- riod of time, say fromt begin tot end Therefore, we need to introduce a time loop into the simulation This can be accomplished as shown in Figure 1.12 We notice here that the only terms that depend explicitly on time are the functions included in the driver constraints Hence, the procedure can be carried out as follows: At the initial time,t begin , calculate the function values for all driver functions Solve for the Cartesian coordinates using the Newton-Raphson procedure, as shown in the section on this procedure Then incrementt, solve again, incrementt, etc until t end has been reached.
Newton's Equation
In the previous sections it was shown how an analysis of a mechanism made from rigid bodies can be carried out, assuming that the system iskinematically driven.
That is, the behavior is given by geometry and the driving functions of the driver(s).
No external forces or inertia is included In the section that follows, the system equations for dynamics of constrained planar systems of rigid bodies are derived, based on Newton’s equations of motion Thereby it is possible to predict the be- havior of the system under influence of inertia and external forces.
For an unconstrained rigid bodyithe equations of motion are written as mix¨i=fi x m i y¨ i =f i y μ i φ¨ i =n i
(1.42) wherem i is the mass of bodyi,μ i is the polar moment of inertia of bodyi,f i x , f i y are the forces acting on bodyiin thexandydirection, respectively, andn i is the moment acting on the body.
Figure 1.12.The kinematic simulation procedure
In matrix form this becomes
For a system ofnunconstrained bodies, this becomes
Now, for a constrained system of bodies, constraint forces must be included so that Equation (1.45) becomes
In (Nikravesh, 1988) it is shown that the constraint forces can be written as g c =Φ T q λ (1.48) whereλare Lagrange multipliers andΦare the constraint equations introduced in the section on kinematic constraints earlier It is worth noting here that this also implies that for e.g a bodyiconnected to a revolute joint, the reaction forces from the joint acting on the body can be determined as g r c =Φ r q T λ (1.49)
Substitution of Equation (1.48) into Equation (1.47) yields the equations of motion for a constrained system of rigid bodies
Mq¨−Φ T q λ=g (1.50) which must be solved together with the constraint equations Φ=0 (1.51) in order to simulate the behavior of the system.
Forces
The forcesgis a vector of forces acting on the individual bodies,g i , each of which have the components g i ={f x , f y , n} T i (1.52) wheref xi , f y i , ni are the sum of all forces inxandydirections and the sum of all moments, including moments from forces not acting at the center of gravity In the followingg i for various common forces are determined.
Figure 1.13.Single force acting on a body
Single force or moment For a single forcef i acting on bodyiat pointP i as shown in Figure 1.13 the force components aref xi andf y i The pointP i is given by its local coordinatess P i ξ P , η P T i and hence the global components are s P = A i s P i Therefore, the moment about the center of gravity acting on the body becomes ni=−s P y f xi +s P x f y i (1.53) or n i =−(ξ i P sinφ i +η i P cosφ i )f xi + (ξ i P cosφ i −η i P sinφ i )f y i (1.54)
Hence, the vector of generalized forces acting at a pointPi on a body from a single force becomes g f i ⎧⎨
−(ξ i P sinφ i +η P i cosφ i )f xi + (ξ i P cosφ i −η i P sinφ i )f y i
Translational spring Consider a translational spring as depicted in Figure 1.14.
The spring is attached to pointP i on bodyiand to pointP j on bodyj The force of the spring is a function of the difference between the deformed lengthland the undeformed lengthl 0 , that is f ( sp ) =f(l−l 0 ) (1.56) but the characteristics of the spring can be linear as well as nonlinear For a linear spring with stiffnesskEquation (1.56) takes the simpler form f ( sp ) =kã(l−l 0 ) (1.57)
The length of the deformed spring can be found as the length of the vector l=−−→
PjPi as shown in Figure 1.14 From this figure we also see that this vector can be written as l=r j+A j s P j −r i−A i s P i (1.58)
If we define a unit vectoru=l/lthe force from the spring acting on bodyiand bodyj, respectively, can be written as f ( i sp ) =f ( sp ) u (1.59) and f ( j sp ) =−f ( sp ) u (1.60) If the spring is attached away from the center of gravity, the moment contribution must of course also be included, cf Equation (1.55).
Figure 1.14.Translational spring acting between bodiesiandj
Translational damper For a translational damper as the one shown in Fig- ure 1.15 the damping force is given as f i ( d ) =d˙l (1.61)
In Equation (1.62)l˙can be found from Equation (1.58) as l˙= ˙r j+ ˙φ j B j s P j −r˙i−φ˙ i B i s P i (1.63) in which
(1.64) andB j is defined similarly As for the translational spring, the force exerted on the two bodies can now be determined as±f ( d ) uand applied in exactly the same way as for the spring Expressions for more external forces can be found in for example (Nikravesh, 1988).
Figure 1.15.Translational damper between two bodies
Numerical Integration
To solve the set of differential-algebraic equations (DAEs) Equation (1.50) and Equation (1.51) it is necessary to rewrite the equations As can be seen, if there aremconstraints, there are in Equation (1.50)nequations withn+munknowns, and in Equation (1.51) there aremequations withnunknowns If we differentiate Equation (1.50) twice with respect totwe have Equation (1.41): Φqq¨=γ (1.65)
Combining this with Equation (1.50) we get
This is a linear set of equations in¨qandλwhich can be solved for whenq,q, and˙ gare known To simulate the behavior of this system we need to integrateq¨into q As Equation (1.66) cannot in general be solved analytically we need to apply a numerical integration procedure Most numerical differential equation solvers are designed to treat first order differential equations, i.e to solve the system ˙ y=f(y, t) (1.67)
We define an auxillary vectoryas y q ˙ q
In order to relate this to Equation (1.66) we recall that the elements of the coeffi- cient matrix,M andΦq, are functions ofq, while the elements of the right-hand side,gandγ, depend onq,q, and˙ t Therefore it is possible to define a function that can calculateq¨as function ofyandt, and hence generate the last part ofy˙ (the first part ofy, that is˙ q, is copied from the last part of˙ y).
Any differential equation solver solves the equations in discrete time steps, i.e. from a known state at t 0 , it calculates the solution at timest 1 , t 2 , , tn (often t 0 + Δt, t 0 + 2Δt, , tend), and hence for each call to the solver the equations are solved from timetitoti +1.
As mentioned above the procedure is started from a known state at t 0 , i.e. y(t 0 ) q T (t 0 ),q˙ T (t 0 )T
, which must be input to the differential equation solver.
These values cannot be given at random but must satisfy the constraint equa- tions, i.e. Φ(q(t 0 )) =0 (1.70) and Φq(q(t 0 )) ˙q=0 (1.71)
Therefore, before integration starts it is of good practice to correct any given initial value using equations (1.70) and (1.71) Note that even if the initial condi- tions lead to small errors in the position and velocity constraint equations, these can be kept under control during the integration process if a constraint stabilization method is used (Nikravesh, 1988), (Garcia de Jalon and Bayo, 1994).
System Dynamics
Introduction
Multibody systems are intensively used to simulate the dynamic behavior of inter- connected rigid and/or flexible bodies, i.e., the mechanical system models encountered in many technological disciplines like robotics, spacecraft design, machine/vehicle dynamics and biomechanics Based on classical mechanics, and stimulated by the powerful investigation tools offered by computational techniques, numerous effective multibody formalisms have been developed to analyze the increasingly complex mechanical systems (Schiehlen, 1990, 1997; Shabana, 1997;
A legitimate means of presenting the problems of multibody system dynamics is to illustrate them geometrically (Maisser, 1988, 1997; Lesser, 1992; Jungnickel, 1994; Essén, 1994; Blajer, 1997, 2001) The precise tools of differential geometry associate the multibody dynamics procedures with a geometrical picture involving the concepts of configuration manifolds, tangent vectors spaces and orthogonality of constraint reactions to the constraint surfaces In this chapter, first, an unconstrained system is introduced, which is assigned a free configuration manifold and is treated as a generalized particle on this manifold An effective projective scheme for transformations of motion equations of the unconstrained system, between different sets of coordinate and velocity components, is then discussed The geometrical concepts are finally used to introduce the constraint equations, given implicitly and explicitly, and to define the associated constraint reactions and the constraint reac- tion-induced dynamic equations of a constrained mechanical system.
Unconstrained System Dynamics
A starting point in the modeling of dynamics of a multibody system is an uncon- strained substitute of the system, obtained from the original system by removing all or some constraints due to the kinematical joints In order to meet a broader sense of the unconstrained system, consider it as an n-degree-of-freedom autonomous system whose position is characterized by n generalized coordinates y [y 1 "y n ] T , and whose velocity is described by n components v [v 1 "v n ] T The equations of motion of the unconstrained system can be written in the following generic matrix form (Kane and Levinson, 1985; Nikravesh, 1988; García de Jalón and Bayo, 1994;
Blajer, 1997, 2001; Schiehlen, 1997; Eberhard and Schiehlen, 2006): v y A y ( ) (4.1a)
M (4.1b) where A is the nun transformation matrix between the velocity components v and the generalized velocities y , M is the nun (symmetric and positive definite) generalized mass matrix, d [d 1 " d n ] T represents in the centrifugal, Coriolis and gyroscopic terms, f [f 1 " f n ] T are the generalized applied forces, and t is the time The unconstrained system described in Equations (4.1) encompasses a wide range of alternatives The typical representatives are the following x A collection of unconstrained particles The relevant equations of motion are most frequently expressed in a global inertial Cartesian frame Oxyz, so that
[r 1 r y " , where r i [x i y i z i ] T is the position vector of the i th par- ticle in Oxyz, i 1,!,b, and b is the number of the particles Then, the kinematical relationship (4.1a) simplifies to y v, and the dynamic equation (4.1b) is defined by M diag(M 1 ,!,M b ), d 0, f [F 1 T " F b T ] T , where
M , m i is the i th particle mass, and F i [F ix F iy F iz ] T are the Oxyz components of the resultant force applied to the i th particle x A collection of unconstrained bodies For an i th body, i 1,!,b, its posi- tion with respect to an inertial Cartesian frame Oxyz is typically defined using the translational coordinates of mass centre, r Ci [x Ci y Ci z Ci ] T , and some three rotational coordinates Į i [M i T i \ i ] T , which are typically the Euler or Bryant angles 1 (Korn and Korn, 1968; Nikravesh, 1988) The convenient ve- locity components of the i th body are then v i [v T Ci Ȧ T i ] T , where
Ci Ci x Ci y Ci z Ci v r , and Ȧ i [Z i [ Z i K Z i ] ] T is the body angular velocity representation in the body-fixed Cartesian frame C[Kh 2 , as is illu- strated in Figure 4.1 The motion equations for the i th body are:
1 The orientation of a rigid body is frequently defined using four (dependent) Euler parame- ters, which are free from some deficiencies of Euler/Bryant angles (Nikravesh, 1988)
2 The components of v Ci and Ȧ i are referenced to as generalized velocities and qua- si-velocities, respectively, as the time integrals of the former are generalized coordinates, while the time integrals of the latter have no physical meaning This is also concerned with r x O y z C v
Figure 4.1 The inertial (absolute) and centroidal body-fixed reference frames i i i i
~ (4.2b) where A Z i is the 3u3 matrix that relates Ȧ i and Į i components 3 , I is the
3u3 identity matrix, 0 are the null matrices of appropriate dimensions, J Ci is the 3u3 inertia matrix of the body in C[K], and F i [F ix F iy F iz ] T and
N are the components of the resultant force and tor- que applied to the i th body, expressed in Oxyz and C[K], respectively
Equations (4.2b) are known as Newton-Euler equations of motion of a rigid body The generalized coordinates of the system of b unconstrained bodies are finally y [y T 1 "y T b ] T , where y i [r Ci T Į T i ] T , and the velocity vector is
[v 1 v v " , where v i [v T Ci Ȧ T i ] T The motion Equations (4.1) are then the aggregation of equations (4.2), in which: A diag(A 1 ,!,A b ) ,
) , , (M 1 M b M diag ! , d [d T 1 " d T b ] T , and f [f 1 T " f b T ] T x An autonomous, internally constrained holonomic system, whose dynamic equations M(q)qd(q,q) f(q,q,t) in independent coordinates q (y{q and v{q) are derived by using any method x A combination of subsystems as above x Any other multibody system whose governing equations can be set in the form of Equations (4.1) the fact that v Ci gathers components expressed in the inertial frame Oxyz, and Ȧ i con- tains components in the noninertial frame C[K]
3 The explicit form of A Z i depends on the choice of Į i , and the relationship Į i A Z i Ȧ i fails numerically in the vicinity of some critical orientations of the body (Korn and Korn, 1968; Nikravesh, 1988)
The system described in Equations (4.1) can be viewed as a generalized mass point on the n-dimensional configuration manifold N of the system shown in Figure 4.2 At each point yN , an n-dimensional tangent space to the manifold can be defined, and the positive-definite quadratic form of the space is expressed by the kinetic energy of the system v M v T
So endowed with the metric, N becomes a Riemannian manifold, and the local tangent space at yN is an Euclidean (linear vector) n-space E n (see, e.g., Jung- nickel, 1994; Maisser, 1997; Blajer, 1997, 2001) The generalized mass matrix M is thus the metric tensor matrix of the (covariant) basis referred to v, and the doubled kinetic energy 2T defined in Equation (4.3) represents the dot product v v G
2 , i.e the squared length of the velocity vector v G
, whose contravariant and covariant representations are, respectively, the generalized velocities v and the generalized momenta p Mv of the system The relationship (4.3) can therefore be also re- placed by 2T p T M 1 p v T p p T v, where M 1 is the metric tensor matrix of the (contravariant) basis referred to p
Figure 4.2 The configuration manifold N and the space E n
Continuing with this geometrical interpretation, the dynamic Equation (4.1b) can be viewed as the matrix representation of vector formula b G f G
, and the contrava- riant and covariant representations of b G are, respectively, the generalized acceleration a v M 1 d and the generalized dynamic force b Ma Mvd of the system The Appell’s function (Neimark and Fufaev, 1972; Desloge, 1988) can then be defined as a b b a b M b a M a T T T T
4.2.2 Transformations of Equations of Motion
The n velocity components v defined in Equation (4.1) can be changed to a new set of n velocities vc, and a new (covariant) basis of E n , referred to vc, is introduced
The velocity and then acceleration transformation formulae are: v y B v ( ) c (4.5)
) , ( ) (y v Ȗ yv B v c c (4.6) where B(y) is the nun transformation matrix and Ȗ Bvc The dynamic equa- tions (4.1b) can be projected into the new basis by premultiplying the equations with
B T (Blajer 1997, 2001) Using (4.5) and (4.6), the projected dynamic equations can then be expressed in the new velocity components,
In this way, the motion Equations (4.1), formulated originally in terms of y and v, are now transformed to the form expressed in terms of y and vc, i.e v y A y c( ) c (4.8a)
Mc c c c c c (4.8b) where Ac AB, Mc B T MB, dc B T (MȖd) and fc B T f have the same meanings as in Equations (4.1)
By applying, according to Equation (4.1a), y y B y A v 1 { ( ) (4.9) the dynamic Equations (4.1b) can also be projected into the basis referred to y, and then expressed in the generalized coordinates y,
Mc c c (4.10) where B A 1 , and Mc, dc and fc are as defined in Equation (4.8b) Finally, a new set of n generalized coordinates yc can be introduced Following v y B y y A g v y g y c{ c c w c w c) ( )
( 1 (4.11) the dynamic equations expressed in the new generalized coordinates yc are as in Equation (4.10) after using yoyc and B A 1 (wg/wyc), with A[g(yc)]
As seen, the projection technique described above constitutes an easy and au- tomatic scheme for transformation of motion equations between different sets of coordinate and velocity components x 0 r z m y
Figure 4.3 The Cartesian and spherical coordinates of a particle
Example 4.1 Particle dynamics in spherical coordinates The particle dynamic equations in the Cartesian coordinates y [x y z] T of the inertial reference frame
Oxyz are My f , where M=diag(m,m,m), m is the particle mass, and f=[F x ,F y ,F x ] T The spherical coordinates, depicted by Figure 4.3, are yc [r T M] T , and the relationship between y and yc is the following
) ( cos sin sin cos sin y g y c ằằ ằ ẳ º ôô ô ơ ê ằằ ằ ẳ º ôô ô ơ ê
By differentiating y g(yc) with respect to time, the relationships at the velocity and acceleration levels, y Byc and y BycȖ , are obtained, where y g y B( c) w w c and Ȗ(yc,yc) Byc The explicit forms of B and Ȗ are: sin cos cos cos sin sin sin sin cos sin sin cos cos sin 0
2 ( cos cos sin sin ) 2 cos sin ( ) sin cos
2 ( cos sin sin cos ) 2 cos cos ( ) sin sin
The particle dynamic equations in the spherical coordinates, Mcycdc fc, can then be conveniently obtained using:
Figure 4.4 Planar motion of a rigid body: the reference frames Oxy and A[K ằằ ằ ẳ º ôô ô ơ ê ằằ ằ ẳ º ôô ô ơ ê c
) sin sin cos cos cos ( cos sin sin cos sin f B f
Example 4.2 Dynamic Equations of a rigid body in a body-fixed reference frame (planar case) The starting point are Newton-Euler equations of motion, which, for the planar case shown in Figure 4.4, simplify to Mv f , where
M diag , m is the mass of the body and J C is its moment of inertia with respect to the mass center C, v [v Cx v Cy Z] T are the components of the velocity of C in the inertial frame Oxy and the body angular velocity, and f [F F M x y C ] T are the components in Oxy of the total of external forces on the body and their resultant moment with respect to C, respectively Lets derive the dynamic equations for translational and rotational motions in any body-fixed reference frame A[K, i.e in the velocity components vc [v A [ v A K Z] T with v A [ and v A K being qua- si-velocities The velocity transformation formula is v B v c ằằ ằ ẳ º ôô ô ơ ê ằằ ằ ẳ º ôô ô ơ ê ằằ ằ ẳ º ôô ô ơ ê
0 sin cos cos sin cos sin sin cos where U C [[ C K C ] T are the coordinates of the mass centre C in A[K Then, in the acceleration transformation formula v BvcȖ, one obtains ằằ ằ ẳ º ôô ô ơ ê
Using the Equation (4.7), the body dynamic equations Mcvcdc fc, can easily be obtained as ằằ ằ ẳ º ôô ô ơ ê ằằ ằ ẳ º ôô ô ơ ê ằằ ằ ẳ º ôô ô ơ ê ằằ ằ ẳ º ôô ô ơ ê
0 0 where J A J C m([ C 2 K C 2 ), F [ F x cosTF y sinT , F K F x sinTF y cosT , and M A ( F x sinTF y cos )T [ C (F x cosTF y sin )T K C M C
Constraint Equations
Let the system described in Equations (4.1) be subjected to m constraints due to the kinematical joints, assumed all holonomic, bilateral and scleronomic for simplicity
The constraints on the multibody system denote that m relative translational and/or rotational motions in the kinematical joints, described by m open-constraint coor- dinates z [z 1 " z m ] T , are prohibited, i.e z 0 (Figure 4.5) Expressing z in terms of the (dependent) coordinates y, z ĭ(y), the constraint equations, given implicitly (Schiehlen, 1997; Blajer, 2001), are:
After differentiating the constraints (4.12) with respect to time one obtains the constraint conditions at the velocity and acceleration levels:
0 v y ȟ v y C ĭ ( ) ( , ) (4.14) where C (wĭwy)A is the mun constraint (Jacobian) matrix, and ȟ Cv is the m-vector of constraint induced accelerations z = 0 a)
Figure 4.5 The constraint system geometry: a) constraint and independent coordinates, b) the orthogonal and tangent subspaces
The constraints (4.12) describe a k-dimensional submanifold K embedded in N, m n k , and the system configuration is confined to K on which k independent curvilinear coordinates q [q 1 ! q k ] T can be defined to describe the system position Therefore, when using the independent coordinates q to describe the multibody system position (on K), the kinematical joints in the system are by prin- ciple taken into account The relationship between the n dependent coordinates y and the k independent coordinates q, expressed as
(q) g y (4.15) are, thus, another form of the constraint conditions at the position level, called constraint equations given explicitly (Schiehlen, 1997; Blajer, 2001) The explicit constraint conditions at the velocity and acceleration levels are then: q q D v ( ) (4.16)
) , ( ) (q q Ȗ qq D v (4.17) where D A 1 (wg wq) is a n×k matrix, and Ȗ Dq is the n-vector By assump- tion, the implicit constraint Equations (4.12) are satisfied after substituting the explicit constraint Equations (4.15), ĭ(g(q)){0 Similarly, the substitution of Equation (4.16) into (4.13) results in CDq{0, and, since q are independent,
C D T C T 0 (4.18) i.e D is an orthogonal complement matrix to the constraint matrix C Further subs- titution of Equation (4.17) into (4.14), after consideringCD 0, leads to ȟ Ȗ
C (4.19) which will be of some use in the sequel y a) s
Figure 4.6 The sample two-degree-of-freedom system
Example 4.3 Constraint Equations given implicitly and explicitly Let us con- sider the two-degree-of-freedom system seen in Figure 4.6a The dependent coordinates that describe the position of the unconstrained bodies with respect to the inertial frame Oxy are y [x 1 y 1 T 1 x 2 y 2 T 2 ] T , while the independent coordi- nates are defined as q [s M] T The constraint equations in the implicit form (4.12), and then the constraint matrix C and the constraint-induced acceleration vector ȟ, defined in the velocity and acceleration forms of the constraints, respec- tively, (4.13) and (4.14), are the following:
0 y ĭ z ằằ ằằ ẳ º ôô ôô ơ ê ằằ ằằ ẳ º ôô ôô ơ ê
4 3 2 1 cos cos sin sin cos
T T a b a b a ȟ where a 1 AC 1 , b 1 C 1 B, a 2 BC 2 The explicit constraint Equations (4.15), and their velocity and acceleration forms (4.16) and (4.17) are then defined by:
2 2 2 1 1 1 y g y ằằ ằằ ằằ ằ ẳ º ôô ôô ôô ô ơ ê ằằ ằằ ằằ ằằ ẳ º ôô ôô ôô ôô ơ ê
T a l a s a s y x y x ằằ ằằ ằằ ằ ẳ º ôô ôô ôô ô ơ ê
D a ; ằằ ằằ ằằ ằ ẳ º ôô ôô ôô ô ơ ê
It is easy to ascertain, that ĭ(g(q)){0, and then, after applying y g(q) and q qD v ( ) in C(y) and ȟ(y,y), that CD 0 and CȖ ȟ.
Constraint Reactions and Constraint Reaction-Induced Dynamic Equations
As said, the configuration of the studied constrained system is confined to the k-dimensional submanifold K embedded in N At a given position of the system,
K q and y g(q)N , in the local n-dimensional linear vector space E n de- fined is Section 4.2.1, the m constraint vectors (constraint gradients), represented in
C as rows, span an m-dimensional constrained subspace C m According to the constraint condition (4.13), the projection of the system velocity v G into C m va- nishes (Figure 4.5b), and as such v G is entirely sunk in the k-dimensional unconstrained subspace D k , complementary to C m in E n , i.e C m D k E n and
0 D C m k The subspaces C m and D k can be referred to as velocity restricted and velocity admissible subspaces, called orthogonal and tangential subspaces in the sequel (Blajer 1997, 2001) since the constraint gradients contained in C and the vectors represented in D are, respectively, orthogonal and tangent to the configura- tion manifold K of the constrained system The subspace D k is then defined by m n k vectors represented as columns of an nuk matrix D that satisfies the condition (4.18) Such matrix D naturally arises from the explicit constraint Equa- tions (4.15), but may also be derived based solely on C, which will be explained in more detail later on
The reactions of individual ideal constraints are by assumption collinear with the related constraint vectors (Jungnickel, 1994; Maisser, 1997; Schiehlen, 1997; Blajer, 1997, 2001; Eberhard and Schiehlen, 2006), and are represented in C m by m La- grange multipliers Ȝ [O 1 ! O m ] T The components of the j th constraint reaction, m j 1,!, , in the basis of E n in which the dynamic Equations (4.1b) are for- mulated, are then j T j j C ( ) O r (4.20) where C ( j ) denotes the j row of C, and represents the j constraint vector which specifies in E n the direction of r j The Lagrange multiplier O j is then a scalar that matches the value (and sense) of the reaction so that to assure the constraint-induced restriction of the system acceleration The multiplier O j can thus be positive, nega- tive or, in a particular case, may be equal to zero r b c
Figure 4.7 The geometry of constrained system dynamics
The resultant generalized force of constraint reactions is Ȝ C C r r m T i i T i m i i ¦ ¦
After adding the reaction force r to the applied force f in the dynamic Equations (4.1b), the dynamic equations of the constrained system become Ȝ y C v y f v y d v y
M( ) ( , ) ( , ,t) T ( ) (4.22) frequently referred to as Lagrange’s equations of type one The vector representation of the dynamic equations is b G f G r G
G (f) and r G (C T Ȝ) are the generalized dynamic, applied and reaction forces
The constraints on a multibody system are due to the interactions between the bodies in the joints (in terms of hard surfaces, rigid links, slipless rolling contacts, etc.) The mathematical formulation of the constraint equations given implicitly may not be unique In Equation (4.12) a physical formulation of the constraint equations is assumed, in which the constraint coordinates z describe the prohibited local relative translational and/or rotational motions in the joints This physical formula- tion is beneficial for the associated Lagrange multipliers Ȝ are automatically generated as the physical forces and moments in the joints, and C T is the matrix of transformation of these constraint reaction forces and moments into the directions of generalized momenta p Mv Any unphysical formulation of constraint Equation (4.12) yields Ȝ * which may have an abstract meaning, and this may cause some problems when the constraint reactions are to be determined/interpreted
Example 4.4 The mathematical pendulum: physical and unphysical formula- tions of constraint equations Let us illustrate the problem of physical and unphysical formulations of implicit constraint equations by studying the simple case of mathematical pendulum (Figure 4.8) Two variant formulation of the constraint on mass m are the following:
) x y l and )c x 2 y 2 l 2 0 where y [x y] T are the coordinates of mass m in Oxy reference frame The formulation ) 0 is the physical one as it expresses the prohibited translation
0 z of the mass The other formulation, )c 0, though a little simpler to handle (in fact, very often met in the literature), is unphysical since it expresses the squared vanishing translation z The dynamic equations of the constrained mass m, corres- ponding to (4.22), will then be, respectively: ằO ẳ ô º ơ ê ằẳ ô º ơ ằ ê ẳ ô º ơ ằê ẳ ô º ơ ê l y l x g m y x m
It is evident from these formulations that O is a physical force expressed in N, and Oc has no physical meaning as it is expressed in Nm -1 , O c O/2l b) m a) g 0 l z y m
Example 4.5 The generalized constraint reaction force Consider the two-degree-of-freedom system studied previously in Example 4.3 (Figure 4.6a)
From the four constraint coordinates z [z 1 z 2 z 3 z 4 ] T shown in Figure 4.6b, three (z 1 ,z 3 and z 4 ) denote the prohibited local relative translations in the joints A and B, and the fourth (z 2 ) denotes the prohibited rotation in the joint A The related Lagrange multipliers Ȝ [O 1 O 2 O 3 O 4 ] T are then, respectively, the constraint reaction (physical) forces (O 1 , O 3 , O 4 ) and moment (O 2 ) Referred to the dependent coordinates y [x 1 y 1 T 1 x 2 y 2 T 2 ] , using the constraint matrix C introduced in Example 4.3, the generalized force of constraint reaction is r C T Ȝ, i.e ằằ ằằ ẳ º ôô ôô ơ ê ằằ ằằ ằằ ằằ ẳ º ôô ôô ôô ôô ơ ê
Blajer, W A geometric unification of constrained system dynamics Multibody System
Blajer, W A geometrical interpretation and uniform matrix formulation of multibody system dynamics ZAMM, 81, 247-259, 2001
Desloge, E A The Gibbs-Appell equations of motion American Journal of Physics, 56,
Eberhard, P., and Schiehlen, W Computational dynamics of multibody systems: history, formalisms, and applications Journal of Computational and Nonlinear Dynamics, 1, 3-12, 2006
Essén, H On the geometry of nonholonomic dynamics Journal of Applied Mechanics, 61, 689-694, 1994
García de Jalón, J., and Bayo, E Kinematic and Dynamic Simulation of Multibody Systems: the Real-Time Challenge Springer-Verlag, New York, New York, 1994
Jungnickel, U Differential-algebraic equations in Riemannian spaces and applications to multibody system dynamics ZAMM, 74, 409-415, 1994
Kane, T.R., and Levinson, D.A Dynamics: Theory and Applications McGraw-Hill, New York, New York, 1985
Korn, G.A., and Korn, T.M Mathematical Handbook for Scientists and Engineers
McGraw-Hill, New York, New York, 1968
Lesser, M A geometrical interpretation of Kane’s equations Proceedings of the Royal
Maisser, P Analytische Dynamik von Mehrkửrpersystemen ZAMM, 68, 463-481, 1988
Maisser, P Differential-geometric methods in multibody dynamics Nonlinear Analysis,
Neimark, J.I., and Fufaev, N.A Dynamics of Nonholonomic Systems Translations of Ma- thematical Monographs, No 33, American Mathematical Society, Providence, 1972
Nikravesh, P.E Computer-Aided Analysis of Mechanical Systems Prentice-Hall, Englewood Cliffs, New Jersey, 1988
Schiehlen, W., ed Multibody System Handbook Springer-Verlag, Berlin, Germany, 1990
Schiehlen, W Multibody system dynamics: roots and perspectives Multibody System
Shabana, A.A Flexible multibody dynamics: review of past and recent developments Mul- tibody System Dynamics, 1, 189-222, 1997
Institute of Applied Mechanics, Faculty of Mechanical Engineering
Technical University of Radom, Radom, Poland
Introduction
The multibody dynamics formulations fall into two main categories In the first group formulations the equations of motion are derived in terms of dependent state variables, and the implicitly given equations of constraints on the system defined this way need to be involved The price for usual conceptual simplicity and ease of manipulation of these governing equations is their large dimension and the fact that they form mixed sets of differential-algebraic equations (DAEs), both resulting in computationally inefficient algorithms In the other formulations independent state variables are used, which leads to the minimal-form governing ordinary differential equations (ODEs) The increased pre-processing modeling effort is then repaid by much more efficient numerical integration of the ODEs
This chapter deals with the dependent variable formulations of multibody system dynamics The presentation begins with the equations of motion with Lagrange multipliers, leading to the initial index-three DAEs The governing equations, re- written to an index-one DAE form, can then be directly integrated numerically using standard DAE solvers The methods of implicit and explicit eliminations of La- grange multipliers to transform the governing equations into equivalent ODE forms are then discussed The presented governing DAEs and ODEs involve the constraint equations at the acceleration level, resulting in violation of the lower-order con- straint equations by the numerical solutions To defeat this problem, the Baumgarte’s constraint violation stabilization method (Baumgarte, 1972) and the projective scheme (Blajer, 2002) for elimination of constraint violation are recom- mended Some other aspects related to accuracy of numerical solutions to the governing equations are finally reported.
Governing Equations in DAE Forms
With reference to the definitions introduced in Chapter 5, the initial governing equations in terms of the dependent state variables y and v can be formed by the n kinematical relationships (4.1a), n constraint reaction-induced dynamic equations (4.22), and m constraint Equations (4.12), i.e.: v y A y ( ) (5.1a) Ȝ y C v y f v y d v y
The governing equations build up 2nm DAEs in 2n state variables y and v (differential variables), and m Lagrange multipliers Ȝ (algebraic variables)
An important characteristic of a DAE system is its index, defined roughly as the number of (time-) differentiations of the DAE system required for its transformation into an equivalent set of ODEs (Duff and Gear, 1986; Gear, 1988; Brenan et al., 1989; Campbell and Gear, 1995; Ascher and Petzold, 1998; and Rabier and Rheinboldt, 2002) The index of DAEs is a measure of their ‘complexity’ and determines the possible difficulties in their numerical integration Therefore, the best way to solve high-index DAEs is first to convert them to a lower-index form by carrying the differentiations of algebraic equations analytically, followed by some eliminating procedures after each step of differentiation if necessary
The index of DAEs (4.1) is equal to three The index reduction of the equations can be obtained by replacing the initial constraint Equation (4.12)/(5.1c) at the position level with the (twice differentiated with respect to time) form (4.14) at the acceleration level The converted index-one governing DAEs are then: v y A y ( ) (5.2a) Ȝ y C v y f v y d v y
C( ) ( , ) (5.2c) and the initial values of state variables, y 0 y(t 0 ) and v 0 v(t 0 ), must satisfy the lower-order constraint Equations (4.12) and (4.13), i.e.:
It may be worth noting that replacing (4.12)/(5.1c) with (4.13) instead of (4.14), index-two DAEs would be obtained, whose initial state values y 0 and v 0 must follow the restrictions (5.3) as well By contrast, in the index-three DAEs (5.1), only y 0 is formally restricted to ĭ(y 0 ) 0 Choosing arbitrary values of v 0 , which may not satisfy the constraint condition at the velocity level, will result in some instabilities in the numerical solution to the index-three DAEs (5.1), especially in the first few steps of integration Note also that none restrictions are imposed on the initial values of Lagrange multipliers Ȝ
The most common dependent variables y and v used in the modeling and simu- lation of multibody systems, leading to the governing DAEs (5.1)/(5.2), are the absolute (Cartesian) state variables of the component bodies, such as those intro- duced in Equations (4.2) The absolute variable formulations are convenient for many reasons, which is widely exploited in the general purpose computer codes (Nikravesh, 1988; Haug, 1989; Schiehlen, 1990; Eich-Soellner and Führer, 1998)
The relevant advantages are the following x The motion Equations (4.1) of the unconstrained body system are simply an aggregation of completed equations of motion for the (unconstrained) com- posite bodies The matrices A, M, d and f in Equations (5.1)/(5.2) can then be assembled in a very easy and automatic way x The implicit constraint equations, ĭ(y) 0, are formulated ‘separately’ for each kinematical joint, and, as such, do not depend on the multibody system topology A particular constraint equation involves then only the coordinates of the two adjacent bodies, and the constraint equations for all typical joints can be formulated in advance x Both open-loop (tree structure) and closed-loop multibody systems can be treated in a unified manner x The systems with changing topologies, i.e the systems with changing number of constraints and/or with unilateral constraints can be modeled and simulated in a relatively simple way x The DAE (5.1)/(5.2) are solved for both system state variables and joint reac- tions, the latter being often mislaid in the minimal dimension formulations
Apart from their simplicity and ease of manipulation, the absolute (dependent) variable formulations (5.1)/(5.2) suffer from many drawbacks as well They are usually recognized as computationally inefficient, and special procedures must be involved to avoid/minimize the constraint violation phenomenon (which will be considered in more detail later on)
Example 5.1 The governing DAEs for a three-degree-of-freedom system
Consider the three-degree-of-freedom mechanical system seen in Figure 5.1 Let the dependent coordinates of the system be the absolute coordinates of the three bodies (see Figure 5.2), y T x y x y x ]
For the planar system at hand, the kinematical relationship (5.1a)/(5.2a) is v y In the dynamic Equation (5.1b)/(5.2b) we have then d 0, and the matrices
3 mg f where m i and J Ci are the masses and central moments of inertia of the bodies, 3
, 2 , 1 i , F s k[(x 2 2 y 2 2 ) 1 / 2 d] is the spring force, k is the spring coefficient, and d is the natural spring length (the distance OC 2 causing no spring displace- ment)
Figure 5.1 The three-degree-of-freedom system y C x z F s m g m g y
Figure 5.2 The unconstrained bodies, constraint coordinates, and constraint reactions
Due to the kinematical joints in the system, the absolute coordinates y become dependent, and the implicit constraint equations on the system are the following (Figure 5.2)
0 ĭ(y) z ằằ ằằ ằằ ằằ ẳ º ôô ôô ôô ôô ơ ê ằằ ằằ ằằ ằằ ẳ º ôô ôô ôô ôô ơ ê
6 5 4 3 2 1 cos cos sin sin sin ) ( cos ) ( cos sin
T T a y a y a x a x y y x x a y a x z z z z z z where a 1 OC 1 , a 2 C 2 A and a 3 AC 3 , and the constraint reactions forces and moments related to z, Ȝ [O 1 O 2 O 3 O 4 O 5 O 6 ] T , are seen in Figure 5.2 The constraint matrix C and the constraint induced acceleration ȟ are: ằằ ằằ ằằ ằằ ẳ º ôô ôô ôô ôô ơ ê
C ằằ ằằ ằằ ằằ ẳ º ôô ôô ôô ôô ơ ê
T T a a a a a a ȟ where, for compactness reasons, it was introduced
In this way, all components of the governing DAEs (5.1) and (5.2) were defined
5.2.2 Direct Numerical Solution of the Governing DAEs
Denoted the state variables by x [y T v T ] T , the governing DAEs (5.1) can be represented symbolically as
(5.4) referenced to as Hassenberg form of DAEs (Brenan et al., 1989; Ascher and Petzold, 1998) Following the idea introduced by Gear (1971), the DAEs can be solved conveniently using a range of ODE methods (Gear and Petzold, 1984; Gear et al., 1985; Gear, 1990; Brenan et al., 1989; Ascher and Petzold, 1998; Rabier and Rheinboldt, 2002; Bottasso et al., 2008) The idea can be illustrated by using the simplest algorithm based on backward Euler method In this method the derivative
1 n n x t x at time t n 1 is approximated by a backward difference of x(t), i.e., for known x n x(t n ), x n 1 x(t n 1 ) is approximated by x(t n 1 ) (x n 1 x n )/'t, where 't t n 1 t n The resulting system of nonlinear algebraic equations
(5.5) is then solved for x n 1 and Ȝ n 1 In this way the solution is advanced from time t n to t n 1 t n 't The application of Equation (5.5) to DAEs (5.2) results in
As seen, while the initial values of state variables, x(t 0 ) x 0 [y T 0 v T 0 ] T are in- dispensable for initialization of the integration process, the initial values Ȝ 0 do not need to be known in advance Evidently, the consistent initial state values y 0 and v 0 must satisfy the conditions (5.3)
In commercially available DAE solvers, developed mainly for index-one DAEs, in order to improve the numerical accuracy, the rough Euler scheme described above is replaced by higher order techniques such as backward differentiation formulas, Runge-Kutta methods and extrapolation methods (Brenan et al, 1989; Ascher and Petzold, 1998; Rabier and Rheinboldt, 2002; Gear and Petzold, 1984; Gear, 1990;
Bottasso et al., 2008) In any case, the Gear’s method results in large sets of nonli- near algebraic equations, which are solved numerically for y n 1 , v n 1 and Ȝ n 1 at time t n 1 , and y n , v n and Ȝ n (the solution at time t n ) are usually used as the initial approximation of the solution Compared to the scheme (5.6), based on backward Euler method, the solution algorithms based on higher order techniques are much more complicated and computationally demanding Therefore, the initial governing equations in the DAE form (5.2) are often manipulated to an equivalent ODE form, and then integrated using standard ODE solvers The transformations are achieved by implicit or explicit eliminations of Lagrange multipliers.
ODE Forms of the Equations of Motion
5.3.1 Implicit Elimination of Lagrange Multipliers
The simplest method of transformation of governing DAEs (5.2) into ODEs can be achieved after rewriting the equations into the following form y A v y A y v ( ) (5.7a)
(5.7b) where Equation (5.7b) combines the dynamic Equation (5.2b) and the constraint
Equation (5.2c) The leading (nm)u(nm) matrix H in Equation (5.7b) is invertible if only the constraints (5.1c) are independent, i.e the row-rank of C is maximal, rank(C) m max The invertibility of H can also be proven by ap- plying the block-matrix inversion scheme (Campbell and Meyer, 1979) ằẳ ô º ơ ê ằ ẳ ô º ơ ê
P (5.8) where P and S are some invertible square matrices, ǻ SRP 1 Q, E P 1 Q, and F RP 1 The inversion of H can then be represented as ằẳ ô º ơ ê ằẳ ô º ơ ê
Since M is by assumption invertible, the invertibility of H is conditioned upon
0 ) det(CM 1 C T z , which is fulfilled for the maximal row-rank matrix C The m mu matrix CM 1 C T is also the metric tensor matrix of the basis built by the constraint vectors that define the constrained subspace C m (Blajer, 1997, 2001)
Owing to the invertibility of H, Equations (5.7) can be represented as y A y v ( ) (5.10a)
The kinematical Equation (5.10a) and the first n equations of (5.10b) form 2n
ODEs in 2n states y and v, while the last m equations of (5.10b), which are m algebraic equations indeed, can be used for the determination of Ȝ in terms of the current state variables It is evident that the initial values of only y 0 and v 0 are required to initialize the integration process (Ȝ 0 is not needed), and the initial state values must satisfy the lower-order constraint conditions (5.3)
5.3.2 Explicit Elimination of Lagrange Multipliers
By applying the scheme (5.9) to (5.10b), the Lagrange multipliers Ȝ can also be eliminated explicitly The resulted 2n ODEs in y and v are y A v (5.11a)
( ) T ( T ) [ ( ) ] v M f d M C C M C C M f d ȟ (5.11b) and the Lagrange multipliers are then determined according to
The result as above was previously obtained by Baumgarte (1972) after subs- tituting v from the dynamic Equation (5.2b), v M 1 (fd)M 1 C T Ȝ, into the constraint Equation (5.2c), which yields CM 1 (fd)CM 1 C T Ȝȟ 0, which can then be resolved to Equation (5.12) After using this result back in the dynamic Equation (5.2b) one obtains finally
M T T , which is equivalent to Equation (5.11b)
5.3.3 Projective Elimination of Lagrange Multipliers
The other possibility for explicit elimination of Lagrange multipliers is to project the constraint reaction-induced dynamic Equations (5.2b) into the constrained C m and tangential (unconstrained) D k subspaces, defined by the n mu constraint matrix C and its orthogonal complement in E n – an nuk
( k nm ) matrix D which satisfies the condition (4.18), CD 0 and
0 C D T T The projection formula is (Blajer, 1997, 2001)
The orthogonal projection (into C m ) gives CvCM 1 (df)CM 1 C T Ȝ 0, which, after considering Cv ȟ from Equation (5.2c), directly leads to the formula (5.12) for determination of Ȝ The tangential projection (into D k ), after consider- ing D T C T Ȝ 0 (constraint reactions are not represented in D k ; see Section 4.4), gives D T Mv D T (fd), which, combined with constraint Equation (5.2c), leads to n explicit linear equations in v The motion equations that result are then the following 2n ODEs: y A v y A y v ( ) (5.14a)
C v ȟ H y v h y vc( ) c( , , )t (5.14b) where the nun matrix H c is by principle invertible as (Blajer et al., 1994)
Since D(D T MD) 1 D T M 1 M 1 C T (CM 1 C T ) 1 CM 1 , the result (5.14b) is thus equivalent to that obtained in Equation (5.11b) More generally, all the three ODE formulations in dependent variables, respectively, (5.7), (5.11) and (5.14), are equivalent to each other
A separate problem is how to find D for a given constraint matrix C An explicit (by guess/inspection) choice of D, which may be not unique in general, can be done only for simple systems For more complex systems, D is determined numerically based on C, by using various techniques One useful code is consequent the variable partitioning method (Wehage and Haug, 1982), which will be reported in Section
6.3 The other techniques are based on singular value decomposition (Mani et al., 1985; Singh and Likins, 1985), and Householder (Kim and Vanderploeg, 1986) and Gram-Schmidt (Liang and Lance, 1987; Blajer, 1995) orthogonalizations
Figure 5.3 Illustration of constraint violation by the numerical states.
Constraint Violation Problem
The numerical solution of equations of motion is always burdened with integration truncation errors For a (constrained) multibody system modeled in dependent state variables y and v, when the governing equations involve the (time-differentiated) constraint equations at the acceleration level, one of the consequences of numerical inaccuracy is possible violation of the lower-order constraint equations by the numerical solutions ~y(t) and ~v(t) The violation means that, in the system confi- guration space N, the simulated system position ~ y ( t ) is a distance from the constraint manifold, ĭ(y~)z0, and the simulated system velocity ~v(t) is not tangent to the manifold, ĭ C(y~)v~z0, which is illustrated in Figure 5.3 The constraint violation usually tends to increase with simulation time and, uncontrolled, may make the numerical analysis unreliable or even worthless
5.4.1 Baumgarte’s Constraint Violation Stabilization Method
A legitimate technique designed to suppress the growth of constraint violation and achieve a stable numerical solution is Baumgarte’s Constraint Violation Stabiliza- tion (CVS) method (Baumgarte, 1972), which is an extension of feedback control theory to the dynamic analysis of constrained mechanical systems In the method, the (open-loop) second-order differential constraint Equation (5.2c),
0 ĭ , is replaced with its stabilized (closed-loop) form, which corresponds to the PD (Proportional-Derivative) controller used in control theory (Chang and Nikravesh, 1985; Ostermeyer, 1990; Bae and Yang, 1990; Amirouche, 1992; Yoon et al., 1995; Lin and Hong, 1998)
0 ĭ ȕ ĭ Į ĭ (5.16) where Į and ȕ are diagonal matrices of (nonnegative) feedback gains The governing Equations (5.2), (5.7)/(5.10), (5.11) and (5.14) are then modified by applying ȟ stab instead of ȟ, where ĭ ȕ ĭ Į ȟ ȟ stab (5.17)
The terms added to the constraint induced acceleration ȟ are the feedback control terms that achieve stability for the differential Equation (5.16), and as such stable numerical solution to the modified governing equations The CVS method does not often work well for relatively complicated systems, however
It does not provide full constraint satisfaction either, and has some ambiguity in determining the optimal feedback gains It is observed that increasing the feedback gains results in better constraint violation stabilization The tendency is limited up to some critical maximal values of the feedback gains, however, which surpassed abruptly destabilize the numerical solutions (the same is also observed in the control theory) The choice of optimal feedback gain values (as well as their maximal acceptable values) is, in general, a complex problem The choice depends usually on the time step ' t used in the integration process, but it is also case dependent, and it is influenced by the method of numerical integration, too Experience has shown that for most practical problems, a range of values between 2 and 20 for Į's is adequate, and the CVS method is most effective for the critical damping, ȕ Į 2 /4
5.4.2 Projective Elimination of Constraint Violations
The other approach to constraint violation suppression, proposed by Yoon et al
(1994) and then developed by Blajer (1997, 2002), is to correct directly the state variables so that to eliminate the constraint violations after each integration step or a sequence of steps, without any modification in the motion equations An important feature of the state corrections is that they are performed in the orthogon- al-to-constraint directions, and as such do not affect the system kinetic motion y _ ) ( y _ ) = 0 a)
Figure 5.4 Illustration of constraint violation by the numerical states
For a current numerical position ~y(t), the violation of constraints at the position level, ĭ~ ĭ(y~)z0
, is a measure of deflection of ~y(t) from the constraint con- sistent position y(t) on the constraint manifold, ĭ(y) 0 The components of ĭ~ denote thus (approximate) distances from ~y(t) to the manifold, measured along the (approximate) constraint gradients, and the term ‘approximate’ will be stated more precisely soon The violation of constraints at the velocity level, Ȍ~ ĭ(y~,~v)z0, indicates that the numerical velocity ~v(t) is not pointed in a constraint allowed direction (tangent to the constraint manifold) The components of Ȍ~ are then measures of projections of ~v(t) onto the constrained directions, i.e into the C~ m subspace spanned by the constraint vectors gathered as rows in C(~y) The problem at hand is then to find formulae for ‘translating’ the violations ĭ~ and Ȍ~ , respec- tively, into appropriate position and velocity corrections (Figure 5.4),
' and 'v v(t)~v(t) (5.18) where y(t) and v(t) are the (corrected) constraint consistent position and velocity of the system, ĭ(y) 0 and Ȍ ĭ(p,v) 0
According to the geometrical interpretation provided in Section 4, the constraint induced accelerations ȟ are pointed in the constrained directions (in the basis of constrained subspace C m defined by constraint vectors contained in C) The go- verning Equations (5.7b), (5.11b) and (5.14b) represent then variant formulae for transformation of ȟ from the constrained directions to directions of p Mv As previously said, the constraint violations ĭ ~ and Ȍ ~ are also represented in the constrained directions, which can be deduced from Equation (5.15) This yields the following correction schemes, respectively, ằẳ ô º ơ ê ằẳ ô º ơ ê ' ằẳ ô º ơ ê ĭ 0 0 y A 0 C
(5.19a,b) which follows from (5.7b), and then, consequent to (5.14b), ằẳ ô º ơ ê ằ ' ẳ ô º ơ ê ĭ y 0 C A
Using (5.9) and (5.15), the correction schemes (5.19) and (5.20) can also be represented in the explicit forms: ĭ C M C C M A y 1 ( 1 ) 1 ~
' T T (5.21b) which can also be deduced from (5.11b)
In computations, the position correction (5.21a) should be done first, and needs usually few iterations The iterative process is required since, for the numerical position ~y(t), neither ~ (~) y ĭ ĭ is the exact distance from ~y(t) to
0 y ĭ( ) nor the constrained vectors defined in C(~y) specify the exact orthogonal directions with respect to ĭ(y) 0; these are only approximate evaluations of the distance and the basis for C m subspace The situation for one iteration step, from y n
~ to ~ y n 1 , of the position correction is illustrated in Figure 5.5, and the constraint consistent position y(t) is achieved with numerical accuracy after (usually) two or three iterations Having the system position revised to y(t), the velocity correction v v v ~' (Figure 5.4b) can be done in one step using y(t) and v p C v p Ȍ Ȍ~ ( ,~){ ( )~, since C(p) involved in the scheme (5.21b) specifies now exactly the directions orthogonal to ĭ(y) 0
The projective schemes (5.19), (5.20) and (5.21), developed here for elimination of constraint violations, provide also a simple procedure to correct the initial values y 0 and v 0 of dependent state variables Assumed that the first estimations of the initial state values ~ y 0 and ~ v 0 do not satisfy the constraint conditions,
, they can conveniently be corrected to the constraint consistent values y 0 and v 0 , so that ĭ(y 0 ) 0 and C(y 0 )v 0 0, by using the above reported projective schemes A correction procedure of this type was demonstrated by Nikravesh (2007)
Figure 5.5 Illustration of one iteration step of position correction
Consider the four-bar mechanism shown in Figure 5.6a, enforced by the gravity forces only The open-loop mechanism representation (Figure 5.6b) is characterized by three joint coordinates, y [D 1 D 2 D 3 ] T , and the kinematic and dynamic equa- tions of the unconstrained system, respectively, (4.1a) and (4.1b), are y v and
D l g m f l g m m f l g m m m f m i , J Ci and l i are, respectively, the ith bar mass, central moment of inertia and length, i 1,2,3, and g is the gravity acceleration x y l a) l l y b) x -
Figure 5.6 The four-bar mechanism (a) and its open-loop representation (b)
The closing constraint Equations (5.1c) are
D sin sin sin cos cos cos
0 3 3 2 2 1 1 l l l l l l l and the constraint Equations (5.2c) at the acceleration level are defined with ằẳ ô º ơ ê
3 3 2 2 1 1 cos cos cos sin sin sin
3 2 3 3 2 2 2 2 1 2 1 1 sin sin sin cos cos cos
The mechanism data used in calculations were: m 1 1.5kg , m 2 5kg , kg
3 3 m , l 0 1m, l 1 0.3m, l 2 1m, l 3 0.6m, and the moments of inertia used were J Ci m i l i 2 12, with C i located at the link midpoints The simulation results, obtained for the initial conditions defined by D 10 S 2 and D 10 1sec 1 , using the Runge-Kutta-Gill solver with the initial increment of time 't 0,05sec, are reported in Figure 5.7 The time-variations of kinematic constraint violations are then shown in Figure 5.8, and the reported results relate to the following three cases: a) no constraint violation control, b) Baumgarte’s stabilization (D 10 and E D 2 4 25), c) the projective elimination (5.21) of constraint violation
Aspects of Accuracy of Constraint-Consistent Solutions
The numerical integration errors continuously disturb also the system kinetic mo- tion, i.e the motion consistent with the constraint conditions (on the constraint manifold), and the problem relates both the dependent and the independent variable formulations reported in Section 6 By inaccuracy of numerical integration we mean the difference between the ‘exact’ and the numerical (constraint-consistent) solution to the equations of motion Since an analytical/exact solution to the equations is usually unattainable, one has to resort to the reference numerical solution obtained for a very small time step of integration Differences between the solutions obtained for moderate time step sizes and the reference solution are always observed, irres- pective of the method of integration of the equations of motion
A possible measure of the integration process inaccuracy is the total energy of the system, computed from the initial energy plus the energy input rate due to external and dissipative forces (Yoon et al, 1994; Chen et al., 2000), reflected also in the developments of energy preserving integrators (García de Jalón and Bayo, 1994;
Simo and Wong, 1991; Chung and Hulbert, 1993) The total energy can then be treated as an artificial constraint on the system
E E E Edt (5.22) where E TV is the sum of the kinetic T and potential V energies, and E de- notes the energy input rate to the system (for conservative systems E 0) For the dependent variable formulations (5.2), (5.7), (5.11) and (5.14), the kinetic energy function is T(y,v) v T M(y)v 2, while V(y) At a given instant of time we can then write < E (y,v) 0, and treat the condition as an additional (nonlinear non- holonomic) constraint on the system
For constraint-consistent states y and v, ĭ(y) 0 and Ȍ C(y)v 0, the energy constraint violation < E < E (y,v)z0 means that, compared to the ‘exact’ solution, either the calculated position of the system on the constraint manifold is somewhat advanced/backward, the system velocity is a little increased/decreased, or both The simplest way of elimination of the energy constraint violation is to correct the system velocity v v'v so that < E (y,v) 0 Yoon et al (1994) used the correction as 'v C T E (C E C T E ) 1 < E , where C E w< E wv can be interpreted as the energy constraint vector As motivated before, and by analogy to equations
(5.21), the scheme should be rewritten to 'v M 1 C T E (C E M 1 C T E ) 1 < E Since
M v C E T , the correction simplifies then to 'v (< E 2T)v , where v y M v ( ) 2T T The corrected velocity is v v'v (1< E 2T)v, which does not assure exact elimination of the energy constraint violation, however
Namely, using v , after some manipulations, one arrives at
< E y v E T The satisfaction of the energy constraint can then be achieved recursively
In order to develop the above scheme to one-step elimination of the energy constraint violation, let us introduce a modified corrected velocity v v (1< E 2TH) Substituting v for v in < E (y,v) 0 , one obtains
TH H , and H 1< 2T (1< E T) 1 2 The im- proved velocity correction scheme is then finally v v v v ' 1< E T (5.23)
Using this formula, one can easily check that < E (y,v) 0 It is worth to note that the correction (5.23) affects only the velocity of the system, and the system position on the constraint manifold is not directly corrected An evident drawback of the energy constraint control scheme is the precision of evaluation of < E for the non-conservative systems (Ez0) The accurate determination of the current energy input due to the external forces, which may be velocity, position and time dependent, may be a cumbersome task (Simo and Wong, 1991) There are, however, two more essential objections which may be raised against the energy correction as a means to improve accuracy of numerical solution
1) The velocity correction (5.23) is especially effective for one-degree-of-freedom systems, k nm 1 , for which the con- straint-consistent velocity v has strictly specified direction, and the velocity v with corrected value has the same direction For systems with many degrees of freedom we deal with only one condition (5.22) on k!1 independent velocities, i.e the evolution of v in k directions on ĭ(y) 0 is due to the applied and inertial forces on the system The ‘proportional’ correction (5.23) of the velocities may not be consistent with the enforced motion evolution
2) The current total energy E is the sum of the kinetic T and potential V energies, the former being dependent on both the system velocity and po- sition, the latter – on position only It may then happen that, for the current numerical states y and v, the inaccuracies in T and V values, compared to their exact values, will be of opposite signs and very similar in values
The resulting energy constraint violation may thus be small compared to the inaccuracies in T and V The velocity correction required to eliminate the energy constraint violation may therefore be insignificant for improv- ing the accuracy of numerical solution
In sum, the violation of energy constraint (5.22) may be a deficient measure of inaccuracy of numerical solution Consequently, the elimination of this viola- tion may not improve the accuracy considerably The conclusion may possibly be extended to the energy preserving integrators, including the popular non-dissipative implicit trapezoidal rule of Newmark method (García de Jalón, 1994; Simo and Wong, 1991; Chung and Hulbert, 1993)
Example 5.2 Elimination of energy constraint violation Continuing the nu- merical experiments for the four-bar mechanism studied in Section 5.4.3, let us introduce the fourth case of numerical calculations, d) the projective elimination (5.21) of kinematical constraint violations plus the energy constraint violation elimination (5.23) in addition to the cases (a), (b) and (c) studied previously In order to compare the violations of the energy constraint (5.22) for all the four cases, obtained for sec 05 't 0 and using the same solver as in Section 5.4.3, firstly a reference (‘numerically exact’ and constraint violation-free) solution was obtained for a very small step size 't r 0.0005sec
Figure 5.9 Violation of energy constraint and inaccuracy in position of link 1
The energy constraint violation and the difference between the simulated and reference motions for link 1 are illustrated in Figure 5.9 As seen, the combination of both kinematic and energy constraint elimination, case (d), assures quite accurate numerical integration ('D 1 does not exceed 1.5 degrees after 8 seconds of simula- tion) The case studied is very specific/favorable, however In short, as explained in more detail in Blajer (2002), the simulated motion for cases (a), (b) and (c), com- pared with the reference motion, in turns delays and accelerates The delay tendency, which is prevailing during the whole mechanism motion, is especially distinct when the mechanism moves up, and both 'T and 'V are negative during these motion phases The motion (velocity) correction due to the elimination of energy constraint violation is therefore effective – it ‘pushes’ the simulated motion forward and the delay tendency is diminished As a result, the total accuracy of motion is consider- ably improved This privileged situation may no hold in other cases, however
Example 5.3 Some other accuracy aspects Consider the equation of motion for the linear free vibrations of a single degree of freedom system
0 2 kx x x x m Z where Z 2 k/m The analytical closed form solution of the equation is tA tA t x() 1 cosZ 2 sinZ with A 1 x 0 and A 2 x 0 Z Having the exact reference solution one can estimate accuracy of numerical integration The state form of the equation of motion used in numerical simulations are the following two first-order ODEs in x and v: x v and x v Z 2 The system data and the initial state values are set to: m 1kg ,
N/m 10 k , x 0 0.1m, v 0 0m/s Using the (fourth-order) Runge-Kutta-Gill solver with the increment of time sec 1 't 0 , two test simulations have been carried out: a) without energy constraint violation control, b) with the energy constraint violation elimination (5.23)
Then, using the time step 't 0.025sec, we applied c) the trapezoidal rule of Newmark method to integrate the equation of motion The trapezoidal rule was chosen for it is energy preserving for linear unconstrained problems (Simo and Wong, 1991; Chung and Hulbert, 1993; García de Jalón, 1994; Chen et al., 2000) The classical scheme of this type, for the case at hand, yields the following system of linear equations in x n 1 and v n 1 :
By solving these equations, the solution for x(t) and v(t) can be advanced from time t n to t n 1 t n 't
As seen from the plots in Figure 5.10, both the energy constraint violation eli- mination scheme (5.23), case (b), and the above trapezoidal rule, case (c), assure energy conservation The exact solution is not assured in any case, however, which is illustrated by variations of 'x – the difference between the numerical and ana- lytical (reference) solutions More strictly, the application of the correction scheme (5.23), case (b), diminishes the inaccuracy slightly compared to case (a), and the inaccuracy of numerical integration with the use of Newmark scheme is about 100 times bigger as compared to the solution with no energy control obtained with the R-K-G method
Figure 5.10 The energy constraint violation and inaccuracy in numerical position
Figure 5.11 The violations of kinetic and potential energies
Introduction
In Chapter 5 the dependent variable formulations for simulation of multibody sys- tems were described The derivation of equations of motion in terms of dependent states, though conceptually simple and easy to handle, leads to large-dimension governing DAEs, which results in computationally inefficient algorithms, burdened further with the constraint violation problem An old and legitimate approach to the dynamics formulation is therefore to use a minimal number of independent state variables for a unique representation of motion by means of pure reduced-dimension ODEs The numerical integration of the ODEs is usually by far more efficient compared to the integration of the governing DAEs, and the numerical solution is released from the problem of constraint violation On the other hand, the minim- al-form ODE formulations require often more modeling effort and skill Effective and computer-oriented modeling procedures of this type are thus highly desirable
In this chapter some basic reduced-dimension ODE formulations used for si- mulation of multibody systems are reviewed Firstly, the joint coordinate method for open-loop systems is described using the geometrical concepts of the projection method The provided matrix formulation of the arising motion equations is sup- plemented with a compact scheme for the determination of joint reactions A velocity partitioning method for obtaining the minimal-dimension dynamic equa- tions is then reported, followed by a general projective scheme for independent variable formulations A relevance of the projective scheme to Gibbs’-Appell’s equations and Kane’s equations is shown The reduced-dimension ODE formula- tions for closed-loop systems are finally discussed and illustrated through examples.
Joint Coordinate Formulation for Open-Loop Systems
For an open-loop multibody system, that is a system with tree graph structure, the joint coordinates q [q 1 " q k ] T are most natural independent coordinates that describe the system position on its configuration manifold K (see Section 4.3) An individual coordinate q i is related to a particular joint, and describes the relative configurations of the adjacent bodies There are thus one or more joint coordinates in each joint, which can be either rotational or translational, equal in number to the number of relative degrees of freedom The vector q for a multibody system contains all the joint coordinates (and the absolute coordinates of the base body if it is not the ground), and its dimension is equal to the number k of degrees of freedom of the system a) b)
Figure 6.1 Joint coordinates: a) relative, b) absolute
Joint coordinates describe, by definition, relative motions of the adjacent bodies in the joints, often referenced to as relative joint coordinates, illustrated in Figure 6.1a For planar systems, and related to revolute joints (rotational coordinates), it is judicious to use absolute joint coordinates as well, seen in Figure 6.1b The use of absolute joint coordinates is usually simpler and leads to more concise dynamics formulations Evidently, using the procedures of Section 4.2.2, the motion equations can effectively be transformed from one set of joint coordinates to the other
The derivation of equations of motion in joint coordinates is based on explicit relationship relating n absolute coordinates y of the composite bodies and k joint coordinates q, y g(q), which is always attainable for open-loop systems As motivated in Section 4.3, and with reference to Equation (4.15), the above rela- tionship expresses the explicit constraint equations due to the kinematic joints in the system The m (k nm) constraint equations given implicitly in y, ĭ(y) 0, are then satisfied identically when expressed in the joint coordinates, ĭ[g(q)]{0 The relationship y g(q) leads then to the velocity and acceleration transformation formulae (4.16) and (4.17), which are related to the implicit constraint equations (4.13) and (4.14), respectively, at the velocity and acceleration levels, through relations (4.18) and (4.19)
6.2.2 The Joint Coordinate Formulation Scheme
According the above preliminaries, the derivation of equations of motion in joint coordinates can be proceeded in the following three stages.
Formulation of the motion Equations (4.1) for the unconstrained body
system in absolute state variables, y Av and Mvd f , which are simple aggregations of equations of motion for the system moving bodies, such as those defined in Equations (4.2) While y, v, A, M and d are build automatically using some ready-made components, only f needs to be build using the modeling skill.
Imposition of constraint equations due to the kinematical joints, given
explicitly at the position, velocity and acceleration levels
Projection of the constraint reaction-induced dynamic Equations
Velocity Partitioning Formulation
This method for obtaining minimal-dimension dynamic equations was originally proposed by Wehage and Haug (1982) as the generalized coordinate partitioning method The idea of the method arises from the observation that, for a mechanical system described in n generalized coordinates y and subjected to m constraint equ- ations ĭ(y) 0, some k nm components of y, denoted y u , can be treated as independent coordinates, while the other m components of y, say y w , are dependent coordinates, written symbolically as y [y T u y T w ] T The m algebraic equations
0 y ĭ( ) can then theoretically be resolved for the m dependent coordinates y w in terms of the k independent coordinates y u , y w gc(y u ) A more general formula- tion y g(y u ) follows then immediately, where g [y T u (gc(y u )) T ] T The result
) (y u g y is conceptually equivalent to Equation (4.15), and expresses the con- straint equations given explicitly The problem is, however, that y w gc(y u ) can not in general be obtained in an analytical form, and the variable resolution can effectively be done only at the velocity level That is why we refer to this parti- tioning methodology as to the velocity partitioning formulation
If the m constraints on the system, described implicitly by ĭ(y) 0, are inde- pendent, then rank(C) m max The implicit constraint Equations (4.13) and (4.14) at the velocity and acceleration level, respectively, Cv 0 and Cvȟ 0, being linear with respect to the velocities and accelerations, can then always be resolved for some m dependent velocities/accelerations w/w in terms of the re- maining k independent velocities/accelerations u/u The partition can be set symbolically as v [u T w T ] T , which yields appropriate factorization of matrix
] [U W C , where U and W are the muk and mum matrices, respectively, and
0 ) det(W z is assumed By applying the partition to (4.13) and (4.14), the explicit forms of the velocity and acceleration constraints can be obtained as: u U W w 0 w W u U v
(6.5) where I and 0 are the identity and null matrices of dimensions kuk and ku1, respectively It is easy to check that the nuk matrix D defined in Equation (6.4) is an orthogonal complement matrix to C, and then CȖ ȟ, i.e
C [ ][ ( 1 ) T ] T 1 (6.7) which refer to Equations (4.18) and (4.19) The relationships (6.4) and (6.5) are thus the explicit forms of the constraints on the system at the velocity and acceleration levels, and correspond to Equations (4.16) and (4.17)
With the use of Equations (6.4) and (6.5), and following the projection technique used in Section 6.1, the governing equations of a constrained system can be set as k n ODEs, whose symbolic form is:
(6.8b) (6.8a) where the nuk matrix Aˆ AD is built by the nun and nuk matrices A and D, defined in Equations (4.1a) and (6.4), respectively, while the kuk matrix
D M D Mˆ T and the k-vectors dˆ D T (MȖd) and f D T f correspond to M, d and f introduced in Equation (6.2), with D and Ȗ as above The constraint reactions (Lagrange multipliers Ȝ) can then be determined using the scheme (6.3), whose symbolic form is now Ȝ(y,u,t)
A shortcoming of the velocity partitioning method is that, for a given partition
[u w v , it may occasionally lead to poorly conditioned matrices D and Ȗ, or, in the extreme, to singularities when det(W)o0 In order to avoid possible singularities in the process of simulation, variant formulations for different velocity partitions can be prepared in advance to change between them when necessary, and a projective criterion for best (optimal) coordinate partitioning (Blajer et al., 1994) can be used for this aim Note that there is no difficulty to restart calculations after the change of velocity partition since, for the current values y and u, the current values of all the components of v can be determined from Equation (6.4)
An important feature of the motion Equations (6.8), ~y(t) and ~u(t), is that its solution is free from the problem of violation of constraints (4.13) at the velocity level, and only the constraint Equations (4.12) at the position level are possibly violated The reason is that the velocity constraint Equations (4.13) are directly involved in the process of formulation of their implicit forms (6.4)
The velocity partitioning method presented in this section can also be treated as another conversion scheme of the governing DAEs (5.2) into a smaller set of ODEs prior to numerical integration The variable partitioning scheme provides also a useful code for minimal-dimension formulations of dynamics for closed-loop mul- tibody systems (see Section 6.5) as well as for nonholonomic systems (not considered in this book); see e.g Arczewski and Blajer (1996), Blajer (1997, 2001), and Blajer and Koáodziejczyk (2006)
Example 6.2 Governing ODEs obtained by partitioning of absolute velocities
Consider the mechanism seen in Figure 6.3a The unconstrained representation of the system is seen in Figure 6.3b, and the respective governing Equations (4.1) are: y T x y x y x ]
[ 1 1 T 1 2 3 f where m i and J Ci are the masses and central moments of inertia of the three links, 3
, 2 , 1 i , F s k(x 1 a 1 sinT 1 d) is the spring force, k is the spring coefficient, and d is the natural spring length
Denoted: a 1 AC 1 , b 1 C 1 B , a 2 BC 2 C 2 D and a 3 DC 3 C 3 E , the implicit constraint equations due to the kinematical joints are defined by:
0 ĭ(y) z ằằ ằằ ằằ ằằ ằằ ằ ẳ º ôô ôô ôô ôô ôô ô ơ ê ằằ ằằ ằằ ằằ ằằ ằ ẳ º ôô ôô ôô ôô ôô ô ơ ê b a y a a x a y a y a x a x b y a y b x a x a y z z z z z z z z
8 7 6 5 4 3 2 1 cos sin cos cos sin sin cos cos sin sin cos
3 3 3 cos 0 sin sin cos cos sin sin cos cos sin cos a b a b a a a a a a a
From among different possible partitions of v p, a reasonable one is
The factorization of C into U and W, and the 9u1 matrix D and the 9-vector Ȗ, defined in Equations (6.4) and (.5), are then:
The analytical forms of D and Ȗ are inaccessible due to the need to invert matrix W
Figure 6.3 The one-degree-of-freedom mechanism and its absolute coordinate representa- tion
Figure 6.4 Verification of the proposed velocity partition conditioning
As said, a good conditioned velocity partition requires that det(W)z0 in the whole range of assumed/possible configurations of the system In the case of me- chanisms this depends also on their geometrical properties In the case at hand, the geometrical data that allow for the changes of T 3 in the whole range from 0 to 2S are, for example: a 2m , b 1m, l 1 a 1 b 1 0.8m , l 2 2a 2 1m, and m 5 0 2 3
3 a l For these data, the variations of det(W) in terms of T 3 are seen in Figure 6.4 Since the determinant of W is always nonzero, the proposed velocity partition is acceptable for the whole range of possible mechanism configurations.
General Projective Scheme for Independent Variable Formulations
The equations of motion reported in Equations (6.8) can be treated as a general scheme/methodology for various independent variable formulations of multibody system dynamics The starting point are the motion Equations (4.1) for an uncon- strained system (in the broad meaning explained in Section 4.2.1), and the code is based on the projection formula (5.13) and on the velocity and acceleration trans- formations, v Du and v DuȖ The general scheme for these formulations is f D d Ȗ M D u D M D u D A y f d v M v A y v v D D u u Ȗ
Firstly, the scheme (6.9) is directly related to the transformation formulae fol- lowing the change of velocity components of the unconstrained system, reported in Section 4.2.2 The results obtained in Equations (4.8) and (4.10) are the evident variants of Equations (6.9) after taking, respectively, v Bvc and v A 1 y , instead of v Du The dynamic Equations (6.2) for an open-loop system are also equivalent to Equations (6.9b), after applying v Dq Du, and the kinematic Equation (6.9a) is replaced simply by q u The scheme (6.9) is finally identical to the velocity partitioning formulation (6.8)
In all the mentioned formulations, the components of vc/y/q/u have some physical meanings In a general case, the components of u as used in the scheme (6.9), often called independent kinematical parameters (Neimark and Fufaev, 1972;
Papastavridis, 2002) or independent generalized speeds (Kane and Levinson, 1985), may have no physical meaning This is, in particular, the case when the velocity and acceleration transformation formulae, v Du and v DuȖ, are obtained nu- merically from the related implicit constraint equations Cv 0 and Cvȟ 0 so that CD 0 and CȖ ȟ, following the computational codes such as the singular value decomposition or Householder and Gram-Schmidt orthogonalizations In these cases, of critical importance for integration of ODEs (6.9) is the determination of consistent initial values u 0 These can be determined in terms of y 0 and v 0 using the projection of the initial generalized momenta Mv, defined in the n-space E n , into the tangential subspace D k defined by matrix D The projection yields (Blajer, 1997, 2001) u D M D v M
D T T (6.10) where M D T MD is the metric tensor matrix of the base of D k spanned by the vectors represented in D as columns It follows then v M D D M D u ( T ) 1 T (6.11) which provides a general relation between the n components of v and the k com- ponents of u, kn Using v 0 and D obtained computationally from C(y 0 ), u 0 can be effectively obtained from Equation (6.11) As seen in Blajer (2001), the formulation (6.11) is valid irrespective the constraints on the system are scleronomic (the case considered in this book) or rheonomic
The projective scheme (6.9) is relevant/equivalent to a range of other popular me- thods of analytical mechanics One of these methods are the Gibbs’-Appell’s equations (Naimark and Fufaev, 1972; Kane and Levinson, 1980; Desloge, 1988)
The Appell’s function used in the method is defined in Equation (4.4) in terms of the n generalized coordinates y, n velocities v, and n accelerations v of the uncon- strained system, i.e
Using the explicit constraint equations on the system at the position, velocity and acceleration levels, y g(q), v Dq and v DqȖ, where q are the k inde- pendent generalized coordinates, the Appell’s function modifies to
Then, with reference to the k independent kinematical parameters u, which can be generalized velocities and/or quasi-velocities (Neimak and Fufaev, 1972; Blajer, 2001; Papastavridis, 2002), using v Du and v DuȖ, S can be written as
Applying these forms of Appell’s function S to the Gibbs’-Appell’s equations (Naimark and Fufaev, 1972; Desloge, 1988), their respective matrix forms are: f d v M v áá f ạ ăă ã © § w w
(6.13c) where f D T f for appropriately defined D The results are equivalent to those reported in Equations (4.1b), (4.10)/(6.2) and (6.8b)/(6.9b)
Example 6.3 Dynamic equations in joint coordinates for the three de- gree-of-freedom system (revisited) Let us use the Gibbs’-Appell’s method to derive the equations of motion in joint coordinates for the three-degree-of-freedom system seen in Figure 6.2, reported previously in Example 6.1 The Appell’s func- tion, in terms of the absolute accelerations, is ¦ 3
Using the relationship y D(q)qȖ(q,q), reported for the cases at hand in Ex- ample 6.1, the Appell’s function in terms of the joint coordinates, velocities and accelerations is then
S C C C where (") denotes the noncontributing components that do not depend on q The left-hand sides of Gibbs’-Appell’s Equations (6.13b) are then:
The result is identical to that obtained in Example 6.1
The present projective formulation of dynamic equations in independent kine- matical parameters vc/y/q/u has many features in common with Kane’s method (Kane, 1961; Kane and Levinson, 19080, 1985; Kane and Wang, 1965), too An elegant geometrical interpretation of the method was given in Lesser (1992) and Essén (1994), where it was shown that Kane’s formalism lies virtually in projecting of Newton-Euler equations into the configuration manifold’s tangent space Versa- tility of the method was emphasized, which is applicable to systems subjected to holonomic and/or nonholonomic constraints as well as to scleronomic and/or rheonomic constraints The starting point are the Newton-Euler equations for the unconstrained system bodies, which written in the d’Alembert form, and with ref- erence to the notation used in this book, are
0 K K K r * fC T Ȝ(Mvd) 0 (6.14) where K f , K r C T Ȝ and K * (Mvd) are the generalized applied, constraint and inertial forces, respectively The relationships between the n depen- dent velocities v and k independent generalized speeds u are used, v Du, and then v DuȖ, where D is referenced to as partial velocity matrix (Kane, 1961;
Kane and Levinson, 1980, 1985; Kane and Wang, 1965) The projected Kane’s equations are then
0 K K * D T fD T [M(DuȖ)d] 0 (6.15) and the constraint reactions disappear due to D T C T 0 Evidently, Kane’s method entails an entire methodology for setting up motion equations in a practical way, which will not be discussed here.
Treatment of Closed-Loop Multibody Systems
A multibody system may contain one ore more closed kinematic loops In such systems, the explicit forms (4.15) of m constraints due to the kinematical joints, i.e the relationships between the n dependent (absolute) coordinates and some r inde- pendent coordinates, where r nm is equal to the number of degrees of freedom of the system, are usually difficult to obtain in practice (if attainable at all) The minimal-form dynamics formulation as that for the open-loop systems, described in Section 6.1, cannot thus be directly extended to closed-loop systems (mechanisms) projection
(open-loop system)joint coordinates
Figure 6.5 Possible treatments of closed-loop multibody systems
Four basic treatments of closed-loop systems can be distinguished (Figure 6.5), which use either n absolute coordinates y (and n absolute velocities v) when all the joints in the system are “opened”, or k joint coordinates q of an equivalent open-loop system obtained after cutting each closed loop at one of the kinematic joints, k!r Since both y and q are dependent coordinates, in each case the arising governing equations are DAEs, and can afterwards be transformed to ODEs by using the velocity partitioning method The DAE and ODE formulations related to y coordi- nates have already been described, respectively, in Section 5.2.1 and 6.3 (see also Example 6.2 for illustration) In this section we will focus on the DAE/ODE for- mulations related to q
6.5.1 Joint Coordinate Formulation for the Equivalent Open-Loop System
The absolute coordinate treatment of mechanism dynamics appeals to the situation that all the kinematical joints in the system are first ‘opened’, and then the constraint conditions due to the joints are imposed on the bodies In the other approach an equivalent open-loop system is created, subjected then to only few closing con- straints (Nikravesh, 1988, 1990; Nikravesh and Ambrósio, 1991; García de Jalón and Bayo, 1994; Blajer et A, 1994; Schiehlen, 1997, 2007) The m open-constraint coordinates z in all kinematical joints can then be grouped into those which naturally vanish and those which still constrain the produced system, denoted z I and z II of dimensions m I and m II , respectively, m I +m II =m Setting this symbolically as
[z z z , the constraint Equations (4.12) are arranged to ĭ [ĭ ĭ T I T II ] T 0, and the dynamic Equations (4.22) become
M (6.16) where C [C T I C T II ] T and Ȝ [Ȝ T I Ȝ T II ] T , the m I un and m II un matrices C I and C II , and the m I and m II vectors Ȝ I and Ȝ II , relate to z I and z II The position of the equivalent open-loop system can be described in k nm I joint coordinates q [q 1 !q k ] T which define the relative configurations of the adjacent bodies in I joints (related to z I ) The equations of constraints I, given implicitly at the position, velocity and acceleration levels are: ĭ I (y) 0 ,
0 v y C ĭ I I ( ) and ĭ I C I (y)vȟ I (y,v) 0 Their explicit forms are:
(q v D q q v D q q Ȗ q q g y I I I I (6.17) which are just variant forms of Equations (6.2) used in the joint coordinate method described in Section 6.2, and where the nuk matrix D I wg I wq and the n-vector Ȗ D q
C I I T I T I (6.18) and then C I Ȗ I ȟ I , as described previously in Equations (4.18) and (4.19) The projection formula (5.13) of the dynamic Equations (6.16), respectively, into the
I - m dimensional constrained and k-dimensional tangential subspaces related to constraints I, modifies now to
The k dynamic equations of the mechanism in joint coordinates q of the equiv- alent open-loop systems, obtained from the tangential projection are
T I MD D M is the kuk generalized mass matrix, d D T I (MȖ I d) is the k vector of generalized centrifugal and Coriolis forces, and f D T I f is the k vector of generalized applied forces, all related to q The m II uk matrix C II of constraints II can be obtained either as C II C II D I or derived from
0 q g ĭ q ĭ II ( ){ II ( I ( )) as C II wĭ II wq, and ĭ II (q) 0 are most often gener- ated directly in q The governing equations of a mechanism can then be formulated as the following set of 2km II DAEs in q, q and Ȝ II ằẳ ô º ơ ằ ê ẳ ô º ơ ằê ẳ ô º ơ ê
H ằẳ ô º ơ ê (6.21) which correspond to Equations (5.7) As in the previous case, assured that the initial values of state variables satisfy the lower-order equations of constraints II,
0 q ĭ II ( 0 ) and C II (q 0 )q 0 0, DAEs (6.21) can be solved for q(t) and q(t), and Ȝ II (t) can afterwards be determined in terms of the current state variables The orthogonal projection, i.e the first m I equations of (6.20), can be used for the determination of constraint reactions Ȝ I , and two equivalent formulae, related to Equations (5.12) and (6.3), are possible:
The joint coordinate formulation obtained in Equation (6.21) is often the first step of conversion of mechanism motion equations to a minimal set Further dimension reduction can be achieved by applying the partition of joint velocities, similar to that described in Section 6.3 The k joint velocities q are now partitioned into the m II k r independent and m II dependent ones, respectively, u and w Fol- lowing the joint velocity partition, q [u T w T ] T , from the m II closing constraint equations at the velocity and acceleration levels, C II q { UuWw 0 and
0 ȟ w W u U ȟ q C II II { II , one obtains: u q D U u
(6.25) which are closely related to the formulations of Equations (6.4) and (6.5) The minimal-form kr ODEs in q and u are finally:
(6.26a) where M D T II MD II is the rur mass matrix, and the r vectors of dynamic and applied forces are now d D T II (MȖ II d) and f D T II f
The closing constraint reactions can then be determined from
It is worth to note that only the explicit forms (6.17) of constraints I are involved in the formulation of the reduced-dimension dynamic Equations (6.21) – we use M and f defined in (4.2), and then g I (q), D I (q) and Ȗ I (q,q) The implicit equations of constraints II can then be formulated in q as ĭ II (q) 0 , and then q ĭ C II w II w and ȟ C q
II II used in DAEs (6.21) can directly be obtained
Hence, the equations of constraints I in the implicit forms need not to be introduced at all if the modeling effort is focused only on the derivation of equations of motion
In fact, this is one of the ‘triumphs’ of the projection methods of multibody dy- namics – the noncontributing reaction forces are excluded from evidence The situation turns different if the constraint reactions are desirable for any good reason
The schemes (6.22) and (6.23) involve both T II T
[C C C , and additionally ȟ I is required in (6.22), obtained from the implicit constraint equations The determina- tion of constraint reactions means thus additional modeling effort, and C I , C II and ȟ I , derived initially in y and v, must be expressed in q and q by applying (6.17)
Another inconvenience of the schemes (6.22) and (6.23) is the necessity of formu- lating and inverting the m I um I matrix C I M 1 C T I , which is in general a cumbersome and numerically inefficient task This means also that all the joint reactions Ȝ I must be determined together, and Ȝ II must be known before
Example 6.4 Mechanism motion equations in the minimal set Reconsider the one degree-of-freedom mechanism in Figure 6.3a, modeled in Example 6.2 using the absolute coordinates y Cutting the closed loop in the D joint, the three joint coordinates that describe position of the obtained open-loop system (Figure 6.6) are s ] T
The eight open-constraint coordinates z [z 1 z 2 z 3 z 4 z 5 z 6 z 7 z 8 ] T are then grouped into z I [z 1 z 2 z 3 z 4 z 7 z 8 ] T and z II [z 5 z 6 ] T , and consequently:
T I [O 1 O 2 O 3 O 4 O 7 O 8 ] Ȝ and Ȝ II [O 5 O 6 ] T , related to the constraints I in the intrinsic joints A, B and E of the open-loop systems and constraints II in the cut joint
D The implicit equations of constraints I, ĭ I (p) 0, are the entries 1, 2, 3, 4, 7 and 8 of ĭ(p) 0 defined in Example 6.2 The explicit forms (6.17) of constraints I are
Figure 6.6 The joint coordinates and closing constraints of the open-loop system
Using M, d and f introduced in Example 6.2, the matrix M and the vectors d and f in the reduced-dimension dynamic Equations (6.20) are: ằằ ằ ẳ º ôô ô ơ ê
T I f D f where J B J C 2 m 2 a 2 2 , J E J C 3 m 3 a 3 2 , and F s k(sd) The implicit equa- tions of closing constraints II can then be formulated directly in q as:
With the use of M, f, d C II , ȟ II and Ȝ II [O 5 O 6 ] T , the governing equations in the DAE form (6.21) can be obtained, and the solution to the DAEs will be q(t),
) (t q and Ȝ II (t) Up to now the implicit equations of constraints I, ĭ I (y) 0, have not been in- troduced These are required if the constraint reactions Ȝ I [O 1 O 2 O 3 O 4 O 7 O 8 ] T in the intrinsic joints need to be determined To this aim, according to schemes (6.22) and (6.23), one needs to introduce the matrices C I (the rows 1, 2, 3, 4, 7 and 8 of C reported in Example 6.2) and C II (the rows 5 and 6 of C), and the vector ȟ I is needed in scheme (6.22) After using p g I (q)and p D I (q)q , these are: ằằ ằằ ằằ ằằ ẳ º ôô ôô ôô ôô ơ ê
From possible three partitions of q, let us choose the following one
I ô ằê º w ơ ẳ which is equivalent to the choice u [T 3 ] in Example 6.2 The matrices U and
W related to C II are then: ằẳ ô º ơ ê
Introduction
In this chapter, two other useful modeling and simulation methodologies are pre- sented, which complement the classical codes reported in Chapters 5 and 6, and, to some extent, augment the tools of analysis of multibody systems and the range of applications The augmented Lagrangian formulation provides one with an alter- native computationally efficient numerical code for simulation of multibody systems described in terms of dependent states and implicitly given constraint equations, with the application area extended over some limitations that burden the other formulations of this type The augmented joint coordinate method supplements the classical joint coordinate code for open-loop systems with an effective and naturally assisted scheme for the determination of joint reactions, with some extensions to closed-loop systems as well.
Augmented Lagrangian Formulation
With reference to Equation (4.22) of constrained system dynamics, there are two basic requirements that condition applicability of the subsequent classical codes (Sections 5 and 6) for multibody systems simulations in the whole configuration range: x the mass matrix M of the system must be nonsingular (in fact, it is usually assumed to be positive definite), which excludes the case that some of the links are modeled as massless; x the constraint matrix C must be of maximal row-rank, which yields:
– no redundant constraints on the system, – no singular positions encountered
Special procedures must also be followed to model/simulate systems in the presence of constraint addition/deletion and/or changing topologies, which may be especially cumbersome in the case of ODE formulations (Section 6)
A variant method for constrained multibody systems, called augmented La- grangian formulation, was proposed by Bayo et al (1988, 1991) and then developed in Bayo and Ledesma (1996), and Cuadrado et al (1997) Blajer (2002), following an insightful geometrical/physical interpretation of the approach, provided after- wards a simple reformulation of the method, with application to equations of motion formulated in the commonly used dependent variables (the original formulation of the method is related to so-called natural coordinates (García de Jalón and Bayo, 1994) The method is applicable to systems with redundant constraints, changing topologies, and, with precautions, singular positions and/or massless members
Instead of thinking about constraints in terms of hard surfaces, rigid links, slipless rolling contacts, etc., a legitimate and old treatment, motivated by Arnold (1989), is to replace the „stiff” constraints by a strong force field in a neighborhood of the manifold ĭ(y) 0, directed towards the manifold The effect can be interpreted as the action of m elastic forces pointed in the m constrained directions towards the respective constraints and proportional to the constraint violations, illustrated in Figure 7.1 Assumed the same „stiffness coefficient” k in all the constrained direc- tions, the elastic forces are k ĭ, and their projection onto the directions of p Mv is C T k ĭ (Blajer, 2002) The dynamic Equations (4.22) can then be modified to ĭ C d f v
M T k (7.1) which can also be seen as the scantiest penalty formulation (Bayo, et al., 1988) For the penalty factor k large enough, the moving system will always be close to the constraint manifold ĭ(y) 0, and in the limit case of an infinite force field (kov), the system will remain on the manifold The latter case is equivalent to constraints, Equation (4.12), put on the system (Arnold, 1989)
Figure 7.1 The physical interpretation of Arnold’s/penalty formulation
While approved theoretically, the infinite (very large) increase of k always leads to instability in computations More strictly, for a given integration time step 't, moderate values of k allow usually an unacceptable constraint violation, while increasing k leads first to oscillating and then unstable numerical solutions The situation can be improved by adding some „damping” and „inertia” along the con- strained directions – the resisting forces proportional to the violations of constraints also at the velocity and acceleration levels The arising penalty forces that resist the constraint violations are then ĭ ĭ ĭ c k
P (7.2) instead of k ĭ used in Equation (7.1), where P stands for the value of the con- straining masses and c is the damping coefficient The effect can also be rewritten in a more familiar form P(ĭ2Kĭ Z 2 ĭ), where 2K c P and Z 2 k P, and the condition of critical or over-critical damping KtZ is advisable Applying
) , ( ) (y v ȟ y v C ĭ from Equation (4.14), the penalty forces from Equation (7.2) can be rewritten to
By applying the penalty forces defined in Equation (7.3) instead of k ĭ in the dynamic Equation (7.1), the full penalty formulation arises as
(MC T PC v fdC T P Kĭ Z 2 ĭȟ (7.4)
Irrespective of some advantageous features of the leading matrix MC T PC, discussed in more detail in the sequel, the formulation still shows a tendency to instability in the numerical solutions for very large penalty factors P, c and k More specifically, with reference to the modified penalty form of constraint conditions,
P , for given values of K and Z such that KtZ, setting Pov (very large), and keeping the integration time step 't constant, the numerical integration of Equations (7.4) always leads to computational instability The value of P must then be limited to a certain (case dependent) value, usually ranging from 10 6 to 10 7 ; see e.g Bayo et al (1988, 1991), García de Jalón (1994); Bayo and Ledesma (1996), and Cuadrado et al (1997) For moderate values of P, the solution of Equation (7.4) remains close but not exactly on the constraint manifold ĭ(y) 0, seemingly as in Baumgarte’s constraint violation stabilization method (Section 5.4.1)
7.2.2 Physical Interpretation and Computational Code of the Augmented Lagrangian Formulation
The augmented Lagrangian formulation preserves all the advantageous features of leading matrix MC T PC and removes instability of the penalty formulation
For an n-degree-of-freedom system described in Equations (5.1), subjected to m constraints, given by Equation (4.12), the physical interpretation of the method can be summarized in the following three steps (Blajer, 2002)
1) Start the formulation from an unconstrained system whose dynamic equa- tions are Mvd f
2) Add to the system m „artificial masses” of value P, which resist only in the constrained directions with respect to ĭ(y) 0 Assumed P are large enough compared to the actual masses of the system represented in M (in Figure 7.2 denoted symbolically by m), the motion of the system (of the mass m) will evolve primarily in the unconstrained directions, while the whole augmented system (both P and m masses) will tend to drift slightly in the constrained directions as well
3) Stop the residual motion in the constrained directions by applying to P some appropriate forces Ȝ * in these directions; see Figure 7.2 Once the constraint drift tendency is removed, the applied additional forces are equivalent to the constraint reactions in the classical sense
In view of to the above physical interpretation, the code can be referred to as an augmented mass method as well, resembling the “mass-orthogonal projections” of the augmented Lagrangian formulation observed by Cuadrado et al (1997)
Figure 7.2 The physical interpretation the augmented Lagrangian formulation
In order to introduce the mathematical formulation of the method, let us first reconsider the constraint Equations (4.14) at the acceleration level using the geo- metrical interpretation provided in Sections 4.3 and 4.4 The equality Cv ȟ means that the projections of system acceleration on the constrained directions, Cv, are equal to the constraint induced accelerations ȟ in these directions The motion of the constraining masses P must by assumption be consistent with this constraint condition, and the generalized dynamic forces (in the constrained directions) related to the masses P are then PCv Pȟ The projection of the dynamic forces into the directions of v is C T PCv C T Pȟ The latter equality is the mathematical repre- sentation of the imposition of the constraining masses P on the unconstrained system defined in step (2) as above The representation of step (3) can simply be written as Ȝ *
C T added to right hand side of the motion equations, where Ȝ * are the m forces added in the constrained directions to resist the constraint drift tendency In sum:
The same result can also be obtained from the penalty formulation, Equation (7.4), after removing the „elastic” and „damping” constraining forces, and adding the additional forces Ȝ * of step (3), where Ȝ * Ȝ if the system accelerations satisfy the constraint condition Cv ȟ Also, the result is equivalent to the augmented La- grangian formulation with mass-orthogonal projections (Bayo and Ledesma, 1996;
Augmented Joint Coordinate Method
7.3.1 Formulation for Open-Loop Systems
The joint coordinate method introduced in Section 6.2 provides a systematic com- puter-oriented scheme for obtaining equations of motion of open-loop multibody systems in the minimal sets of joint coordinates q The initial large set of equations of motion in absolute states (for the unconstrained bodies) is converted to a minimal set of ODEs in q In the conversion process, which involves the implicitly given constraint Equations (6.2) on the bodies due to the kinematical joints, the joint reactions (the non-working reactions of model intrinsic constraints) are excluded from evidence If joint reactions is required for any reason, i.e to include the contact or frictional forces into consideration or to proceed with strength analysis, an addi- tional modeling effort is required, and the arising procedures are computationally arduous More strictly, the scheme implied by Equation (6.3) for the determination of Ȝ involves the constraint matrix C, and the implicit constraint equations, up to the velocity level, given by Equation (4.13), need to be introduced in addition to their explicit forms, Equation (6.2), used in the process of obtaining the motion equations Another inconvenience of the scheme is the necessity of formulating and inverting of CM 1 C T , possibly large-dimension matrix, which may be a numeri- cally inefficient task The scheme requires also that all the constraints on the bodies must be modeled in the implicit forms, and all the constraint reactions are deter- mined In practical applications one may be interested in the reactions in only some selected joints The present scheme for determination of joint reactions, described in more detail in Blajer (2004), is released from many of the inconveniences mentioned above It is naturally assisted with the minimal-form formulations of multibody dynamics, and especially the joint coordinate method for open-loop systems
The proposed scheme extends the idea posed by Kane and Levinson (1985), referred to as ‘bringing non-contributing forces into evidence’ While in Kane’s approach some auxiliary fictitious generalized speeds are used to identify the non- contributing forces, here m open-constraint coordinates z express the prohibited relative motions in the joints are introduced, in addition to the k joint coordinates q that describe the relative configurations of the adjacent body segments (The open-constraint coordinates have already been defined in Equation (4.12), and then illustrated in Figures 4.6, 4.8b, 5.2 and 6.3) While in the standard joint coordinate method (Section 6.2) the explicitly given constraint equations y g(q) are used, in the present augmented joint coordinate method the explicit constraint equations are extended by incorporating the open-constraint coordinates z,
Now, both the k joint and m open-constraint coordinates, q and z, are involved, to describe, respectively, the admissible and prohibited relative motions in the joints
The explicit constraint equation y g(q) is then retrieved from Equation (7.7) for
0 z For the open-loop systems at hand, the total number of both q and z is equal to the number of coordinates y, km n, and the augmented relationships in Equation (7.7) are usually not much more difficult to formulate as compared to their original forms In fact, the dependence on z in Equation (7.7) is needed only to grasp the prohibited motion directions in the joints, related to z (called auxiliary fictitious generalized speeds in Kane’s method) By differentiating with respect to time the augmented formulation, expressed by Equation (7.7), of explicit constraint equa- tions, and then setting z 0, one obtains z q E q q D v z z q g q v g A y
0 0 z z á ( ) ( ) ạ ă ã © § w w ááạ ăă ã © § w w (7.8) where D A 1 (wg/wq) z 0 is exactly the same as that introduced previously in Equation (6.1), E A 1 (wg/wz) z 0 , and the prohibited local motion directions in the joints are defined by m vectors represented as columns in the num matrix E
Evidently, since the maintenance of constraints assures that z 0, the relationship in Equation (7.8) is genuinely equivalent to v D(q)q used in the joint coordinate method The features and interpretation of matrix E are of crucial importance for the forthcoming formulations
An important characteristic of matrix E results from the substitution of the augmented form of explicit constraint equations at the velocity level, given by Equation (7.8), into their implicit form described by Equation (4.13), z Cv 0, which leads to z CDqCEz Since, according to Equation (4.18), CD 0, it can be concluded
C T T (7.9) where I is the mum identity matrix The num matrix E has thus the features of a pseudoinverse matrix (Campbell and Meyer, 1979) to the rectangular mun con- straint matrix C Note that E is obtained here symbolically, and C is not involved in this process The analytical form of E is usually relatively simple, too
Another useful feature of the present formulation is that the open-constraint coordinates can be introduced only in those joints in which the reaction forces need to be determined Denoted the mc constraint reactions that are to be determined with Ȝc (from m reactions Ȝ), the Equations (7.7) and (7.8) can be redefined, respec- tively, to y g(q,zc) and v DqEczc, where the numc matrix Ec is the selection of those columns of E which relate zc Specifically, denoted symbolically
[z z z c cc (and Ȝ [Ȝc T Ȝcc T ] T ), we write E [Ec#Ecc] and C [Cc T #Ccc T ] T From
C ằ ẳ ô º ơ ê cc cc c cc cc c c cc c ằ c ẳ ô º ơ ê cc c (7.10) it comes then evident that CcEcc 0 and CccEc 0, where 0’a are the null matrices of appropriate dimensions Finally, since Ecc{0 if zcc are not introduced,
C ằ c c ẳ ô º ơ c ê c T T (7.11) where Ic is the mcumc identity matrix
Using Ec, the projection formula of Equation (5.13) can now be modified to
( (7.12) and Ec can possibly be replaced with E As in the previous case, the tangential projection leads to the minimal-dimension dynamic Equations (6.2), and the other projection results in
(qqq E f d M Dq Ȗ Ȝc t c T (7.13) and after replacing Ec with E all the constraint reactions Ȝ can be determined, too
There are at least three important advantages of the new Equation (7.13) over the traditional one Equation (6.3) Firstly, the joint reactions are obtained directly in the
“resolved” form – no matrix inversion is required as it is necessary in Equation (6.3)
The present scheme is therefore especially well suited for both symbolic manipula- tions and computational implementations Secondly, Equation (7.13) does not rely on the implicit forms of constraint equations, which need not to be introduced at all
The derivation of the minimal-form dynamic Equations (6.2) and the determination of joint reactions are now based on the constraint equations given implicitly in the augmented form of Equation (7.7), and the modification is not usually concerned with much additional modeling effort Finally, the present scheme can be used to determine only some joint reactions Ȝc from Ȝ , and only the respective entries zc of z need to be introduced in the modeling process The other observation is, how- ever, that, while in the Equation (6.3) Ȝ are determined in terms of the state variables q and q , the present Equation (7.13) involves q since E T MDz0
The present scheme for determination of constraint reactions proved to be es- pecially useful when applied to the modeling of human sagittal plane (planar) movements (Blajer and Czaplicki, 2003; Blajer et al., 2007) In the inverse dynamics analysis presented there, the use of Equation (7.13) made it possible to determine the joint reaction forces separately in the lower extremities
Figure 7.7 The three-degree-of-freedom system: a) a pictorial sketch, and b) the open-constraint coordinates and the constraint reactions
Example 7.2 Augmented joint coordinate formulation for a three degree- of-freedom open loop system Consider the three degree-of freedom system shown in Figure 7.7 The masses and moments of inertia with respect to the mass centers
C 1 and C 2 of the bar and slider are m 1 , J C 1 , m 2 , J C 2 , and their lengths are:
OC , AC 2 a 2 , C 2 B b 2 , and l 2 a 2 b 2 The length of an inextensible massless string connecting mass m 3 with point B is l 3 The frictional effects in the revolute joint O and translational joint A are neglected, and the only external loads on the system are the gravity forces m i g and the spring force F s k(s 2 d), where k is the spring constant and d is the value of s 2 at which the spring force vanishes
The absolute coordinate vector y, the related mass matrix M, the joint coordinates q, and the generalized force vector f related to y (written in the joint coordinates q) are: y T x y x y x ]
The five open-constraint coordinates z [z 1 z 2 z 3 z 4 z 5 ] T are seen in Figure 7.7b The constraint equations given in implicit form in Equation (4.12) and the constraint matrix C defined in Equation (4.13) are:
0 1 sin 0 0 0 0 0 cos sin cos sin sin( ) 0 0
The augmented form of the explicitly given constraint equations, y g(q,z) in Equation (7.7), equivalent to their standard formulation in Equation (4.15) for
3 2 2 1 3 1 2 1 4 3 5 3 sin cos cos( ) cos sin sin( ) sin cos cos( ) ( ) sin cos sin sin( ) ( ) cos x z s z a z y z s z a z z x z s z l z l z y z s z l z l z
The matrices D and E, and the vector Ȗ are then:
1 0 0 cos sin sin 0 sin cos cos 0
1 0 0 cos sin sin cos sin cos cos sin a a s a s a s l l s l l
D ằằ ằằ ằằ ằằ ằằ ằ ẳ º ôô ôô ôô ôô ôô ô ơ ê
E a ằằ ằằ ằằ ằằ ằằ ằ ẳ º ôô ôô ôô ôô ôô ô ơ ê
It is easy to ascertain that CE I, and as such E produced this way is a pseudoin- verse to C, which expressed in q, i.e after substituting p g(q) (the relations as above after setting z 0), becomes
0 1 sin 0 0 0 0 0 cos sin ( ) cos sin 0 0 0
0 0 0 sin cos cos( ) sin cos a a s a b
The entries of the symmetric mass matrix M, and then d and f in the motion Equations (6.2) in joint coordinates q are:
3 3 3 sin ( cos sin ) ( cos sin )
Using the solution to these equations of motion, q(t) and q(t), the constraint reactions Ȝ [O 1 O 2 O 3 O 4 O 5 ] T can be determined according to Equation (6.3)
The code involves first formulating CM 1 C T and then inverting this 5u5 matrix
The scheme (6.3) are thus decidedly computer oriented, and the constraint equations in implicit forms need to be introduced, in addition to their explicit forms used in the process of deriving the minimal set of equations of motion The features of Equation
Introduction
In design we perform an analysis and then we often “tweak” a design parameter and repeat the analysis to see if the design performance improves In optimiza- tion we compute gradients of the cost and constraint functions to guide us through the design space and ultimately arrive at a design that satisfies the Karush-Kuhn Tucker optimality criteria ∗ In identification and inverse analyses we perform a simulation of an observed physical system and then tweak unknown model pa- rameters and repeat the simulation in the hopes of making our simulated response better match the physical data and hence improve our system model And finally in reliability studies, we use optimization techniques to determine the most probable point of failure All of these tasks involve analysis and sensitivity analysis.
With the hopes of introducing sensitivity analysis to readers of varying abili- ties, this discussion is tutorial in nature All too often, we are shown impressive simulations feats, but perhaps feel lost, looking for a place to start This is that place Simple algorithms are presented which can be implemented and verified via the simple examples As such, the presentation is intended for someone who wants to write their own program, or understand the underlying structure of a more advanced program However, do not fret These simple algorithms can be and in- deed have been readily modified to address “real world” problems with relatively little modification In fact, these algorithms are behind many of the impressive examples presented in this book by the other authors.
The following sensitivity analysis discussion is primarily applied to finite ele- ment methods However, the underlying principles are broad, and some examples are applied to multibody dynamic systems As such, the sensitivity implementa- tion for these two applications, finite elements and multibody dynamics, is quite similar Indeed in finite elements we consider elements and node displacements as the primary building blocks In multibody dynamics these are replaced respec- tively by joints and generalized coordinates.
For our sensitivity analyses we begin with simple linear static spring systems.
In addition to discussing theprimalanalysis we also discuss thesensitivityanaly- ses so that you may solve optimization, inverse, identification and reliability prob-
∗ Recall the zeroes of f (x) = 0 are possible minimizers of f lems by coupling these analyses with nonlinear programming algorithms The spring system is used to get you acquainted with the basic program structure Since the spring element is simple, we can concentrate on the overall program structure rather than the specific element details Our later work is concerned with the de- tailed study of specific problems At that time, the “springs” will be carefully defined to model, e.g revolute joints.
After a brief discussion of our notation we discuss the primal analysis and sensitivity analysis of the spring system Although the spring element is rather simplistic, the assembly and solution details are not Therefore, it is imperative that you thoroughly understand this chapter.
Notation
Forx = {x 1 , x 2 , , x n } T ∈ n ,f : n → (a scalar valued function of a vector) and h : n → m (a vector valued function of a vector) such that h(x) ={h 1 (x), h 2 (x), , h m (x)} T we have
The comma is used to denote a particular component of a derivative, e.g.
For functions defined on set products, e.g forf : × → (a scalar valued function of a vector – scalar pair) we have
The above component notation remains in effect, e.g.D 12 , 3 f(x, α) = ∂α∂x ∂ 2 f 3 (x, α). We do not use the notation ∂f ∂ x because we need to uniquely distinguish the value of the derivative when evaluate at, e.g (x, α) as well as(y, β) or quite possibly
(h(z), f(x, α)) So the subscripts, e.g the “1” onD 1 indicate the argument to which we evaluate the derivative.
We make one notational exception for functions of time for which we use the standard over dot, e.g iff : → andg : n × → are functions of time, then we denotef˙(t) t),g˙(t) =D 2 g(x, t)andD 1 g˙(t) =D 12 g(x, t) Two dots denote second time derivatives, e.g.f¨(t) =D 2 f(t)andg¨(t) =D 22 g(x, t).
Often, to emphasize certain concepts, the same function is defined differently.
For example, to solve the equationx 2 −d = 0forxwe say “find the zerosxof the functionrdefined such thatr(x) =x 2 −d.” Obviously the rootsxdepends on the value ofd To emphasize this fact we would instead say “find the zerosx(d) of the functionrdefined such thatr(x(d), d) =x 2 (d)−d.” k 1 k 2 k 3 k 4 k 5 k 6 k 7 k 8
Figure 8.1.Spring system Bold faced numbers denote nodes andk i denotes elementi.
For transient analyses we utilize the convolution which we exemplify via the convolutionf ∗gof the time dependent functionsf andg f∗g(t) t 0 f(τ)g(t−τ)dτ (8.4)
Using the above definition and integration by parts it can be readily verified that f∗g = g∗f ã f∗g = f˙∗g+f(0)g (8.5)
Static Analysis
Our spring system is comprised of individual springelementsthat are connected together atnodes At the nodes one may apply an external force or prescribe a displacement but not both The application of both a force and a displacement is akin to an ill-posed inverse problem The system is in static equilibrium and therefore to determine the deformation at each node a force balance is performed to equate the sum of theexternally applied forcesto theinternal forcesgenerated as the springs deform A typical system is illustrated in Figure 8.1 in which the positive directions of both force and displacement are to the right.
In the analogous multibody system, the springs play the role of the joints that interconnect the rigid bodies and the node displacements play the role of the gener- alized coordinates This static analysis is then akin to a kinematic position analysis in which the motion of the drivers is prescribed and you are required to determine the configuration of the multibody system Generally, the necessary position anal- ysis multibody kinematic equations would be nonlinear Not to worry, nonlinear equations will be discussed in the following chapter.
Internal Forces Here we consider the internal force due to the deformation of the springs The springs behave linearly so the force generated inside a spring is
Figure 8.2.Individual spring. proportional to the relative displacement between its two ends (nodes) Now con- sider the springlwith left nodei, right nodejand stiffnessklthat is illustrated in Figure 8.2 Due to the application of external forces nodeideforms by the amount Uiand nodejdeforms by the amountUj The force-displacement proportionality constant for the spring iskland the relative displacement between its nodes is the difference(U j −U i ) Our linear model asserts that the internal force due to ele- mentlat nodei, i.e.s l i , and the internal force due to elementl at nodej, i.e.s l j , are given by s l i = kl(Uj−Ui) s l j = −k l (U j −U i ) (8.6)
If you are confused about the sign convention on the forces, then proceed reading this paragraph, otherwise please skip ahead so that you do not get confused To rationalize the signs of the above forces let us consider the motion of each node individually If nodeiis fixed and nodejtranslates in the positive direction then the spring force klUj attempts to pull nodei in the positive direction whereas it pulls nodej in the negative direction Likewise, if nodej is fixed and node itranslates in positive direction then the spring forcek l U i pushes nodeiin the negative direction whereas it attempts to push nodejin the positive direction.
In our continuum finite element model, the relative displacementU j −U i repre- sents the strain, the internal forces l i represents the stress and the spring coefficient k l represents a constitutive parameter which links strain and stress So although the spring system is very simple, it exhibits all of the features encountered our continua finite element models.
In most cases, a nodeiwill be connected to several springs So to evaluate the net internal forceS i , acting at nodei, we must sum the internal force contributions s l i from each springlthat is connected to it.
Example 8.1 In this example we evaluate the net internal force acting on node 3 of the spring system illustrated in Figure 8.1 As seen in the figure, elements 2, 3, and 7 contact node 3; and hence the net internal force is given by the sum
U 1 U 2 U 3 U 4 U 5 U 6 U 7 ¯ T You may also verify that the internal forces acting on the remaining nodes are given by
For analysis purposes it is essential to form a vector in which the rowiele- ment corresponds to the internal force acting on nodei Generalizing the results obtained in the previous example, it can be shown that this vector ofunreduced in- ternal forces S ur , may be expressed as the matrix product of theunreduced global stiffness matrix K ur and theunreduced global displacement vector U ur
S ur =−K ur U ur (8.7) where, due to Newton’s third law, the stiffness matrix is symmetric, and each row iofU ur is the displacementUiat nodei.
Example 8.2 Here we assemble the unreduced internal force vector S ur , the unreduced global stiffness matrix K ur and the unreduced global displacement vector U ur for the spring system illus- trated in Figure 8.1 The internal force equation for node 1 is used to form the first row of the matrix equation, the internal force equation for node 2 is used to form the second row, and so on Ultimately, the 7 nodes combine to the form
From the above equation it is seen that
External Forces Two types of external forces act on the spring system,applied forcesandreaction forces Applied forces are those which you specify for your analysis to represent, e.g the weight of a car for the analysis of a bridge structure.
Reaction forces act on the nodes where displacements are prescribed They must be present to ensure global force balance is achieved for the entire spring system as well as the local force balance at each node Referring to the bridge model, reaction forces act at the footings where the bridge contacts the earth; at this locations we assume the displacement is zero.
Example 8.3 The unreduced external force vector P ur for the spring system illustrated in Figure 8.1 is given below
R 1 P 2 P 3 P 4 P 5 P 6 R 7 ¯ T where R 1 and R 7 are the unknown reaction forces that act at the two walls, i.e at nodes 1 and 7; and P 2 , P 3 , P 4 , P 5 and P 6 are the applied forces specified by you, the analyst, at nodes 2, 3, 4, 5 and 6.
Force Balance and Analysis At present, we have expressions for the internal and external forces that act on each nodei of the spring system And since the sum of these forces must be zero, we have at each nodei
Finally, since the internal and external forces at each nodei are represented by row i of the vectorsS ur and P ur respectively, we are able to form the vector equilibrium equation
S ur +P ur =0 (8.9) which may also be expressed using Equation (8.7) as
Finite Element Assembly To proceed with the analysis we must find a way to systematically assemble the stiffness matrixK ur and force vectorP ur of Equa- tion (8.10) To this end, the internal spring forces due to each elementlwith nodes iandjare placed in matrix form as (cf Equation (8.6)) s l i s l j
(8.12) is deemed the element stiffness matrixand
Solution Strategy
As it stands, the force balance Equation (8.10) poses some problems as there are unknowns on both sides of the equation If the elements inU ur were all specified then we could determineP ur or if the elements inP ur were all specified and if
K ur were invertible, then we could determineU ur Unfortunately this is seldom,if ever, the case.
To proceed, we classify the nodei displacement as prescribed U i or free U i f Prescribed displacements are known quantities whereas free displacements are determined via the analysis Likewise and as previously mentioned, the exter- nal forces acting at nodeiare divided into two types: applied external forcesP i f , and reaction forcesP i p Applied forces are known quantities that act at the nodes with free displacements which explains thefsuperscript; whereas reaction forces act at the nodes with prescribed displacements and are determined via the analysis which explains thepsuperscript.
The collection of theU i p andU i f and the collection of theP i p andP i f for all of the nodes form the vectorsU ur andP ur , respectively And as discussed above, this complicates our solution strategy because we have unknowns on both sides of the equationK ur U ur =P ur To alleviate this problem, we interchange the rows of the above equation so that the equilibrium equations associated with the nodes with prescribed displacements and unknown reaction forces are positioned in the first rows of our vector equation The remaining rows correspond to the nodal equilibrium equations at the nodes with unknown free displacements and known applied forces We use a permutation involving both row and column interchanges of the stiffness matrix, displacement vector and external force vector to obtain the partitioned matrix equation
(8.14) whereK pp is the symmetric prescribed-prescribed stiffness matrix;K pf is the prescribed-free stiffness matrix; K fp = [K pf ] T is the free-prescribed stiffness matrix; K ff = Kis the symmetric free-free stiffness matrix that is commonly referred to as the stiffness matrix;U p is the prescribed-displacement vector;U f is the free-displacement vector or displacement vector;P p is the reaction force vector; and P f is the applied force vector that is commonly referred to as the force vector.
Example 8.4.Here we rearrange the equations for our spring example First we note that the unreduced system Equation (8.10) is given by the results of examples 8.2 and 8.3, i.e.
⎪ ⎭ where we have renamed R 1 = P 1 p , R 7 = P 7 p , and supplied the appropriate superscripts to the remaining free and prescribed forces and displacements.
Nodes 1 and 7 have prescribed displacements so they are moved to rows 1 and 2, respectively, of the system equation In addition, row 7 of the the displacement and force vectors becomes row 2 To accommodate this vector realignment, column 7 of the stiffness matrix (after the row change) is moved to column 2 The remaining rows and columns follow directly, viz.
Referring to the above matrix, we see that rows 1-2 and columns 1-2 form the submatrix K pp , rows 1-2 and columns 3-7 form the submatrix K pf and rows 3-7 and columns 3-7 form the submatrix K ff ; referring to the displacement vector we see that rows 1-2 form U p and rows 3-7 form U f ; and referring to the force vector we see that rows 1-2 form P p and rows 3-7 form P f , i.e.
Now that the stiffness matrix is partitioned we may proceed with the analysis.
The single Equation (8.14) is separated into two equations as
The above equation may be rearranged
K f f U f =P f −K f p U p (8.17) which may be solved forU f provided thatK f f is invertible OnceU f is known Equation (8.15) may be used to determine the reactions
Finite Element Program
To proceed with the analysis we must find a way to systematically read in the finite element model data, assemble the various partitions of the stiffness matrix and the force and displacement vectors, solve Equations (8.17) and (8.18) defined above, and output the results These tasks will be accomplished in the four modules: input,initialization,analysisandoutputthat we now describe.
Finite Element InputThere are “many ways to skin a cat” I take the view- point of simplicity over robustness With that in mind, we first supply our program with the data,
1 N N ODE, the (integer) number of nodes 2 N ELEM, the (integer) number of elements 3 N F ORCE, the (integer) number of nonzero nodal forces, i.e.P i f = 0 nodes, and 4 N P RE DISP, the (integer) number of nodes with prescribed displace- ment, i.e.U i p nodes Then for each of thel= 1,2,ã ã ã, N ELEM elements we supply
1 ELEM N ODE(1, l), the (integer) left node number of elementl,
2 ELEM N ODE(2, l), the (integer) right node number of elementl, and 3 ELEM ST IF F(l), the (real) element stiffness value of elementl, i.e.k l for each of them= 1,2,ã ã ã, N F ORCEforces we supply
1 F ORCE N ODE(m), the (integer) node number where forcemacts, i.e. iforP i f and 2 F ORCE V ALU E(m), the (real) value of forcem, i.e.P i f and for each of then = 1,2,ã ã ã, N P RE DISP prescribed displacements we supply
1 DISP N ODE(m), the (integer) node number where displacementmis prescribed, i.e.iforU i p and
2 DISP V ALU E(m), the (real) value of prescribed displacementm, i.e.U i p In light of the above yourinput moduleshould resemble that in algorithm 1.
Algorithm 1Input module Output:N N ODE,N ELEM,N F ORCE,N P RE DISP,ELEM N ODE, ELEM ST IF F,F ORCE N ODE,F ORCE V ALU E,DISP N ODE, DISP V ALU E
Open the input file ReadN N ODE,N ELEM,N F ORCE,N P RE DISP
Fori= 1toN ELEMDoRead element data ReadELEM N ODE(1 : 2, l),ELEM ST IF F(l)
End For Form= 1toN F ORCEDoRead force data
ReadF ORCE N ODE(m),F ORCE V ALU E(m)
End For Forn= 1toN P RE DISP DoRead prescribed displacement data
Example 8.5 Consider the spring assembly in Figure 8.1 with k 1 = 2 , k 2 = 3 , k 3 = 3 , k 4 = 3 , k 5 = 4 , k 6 = 4 , k 7 = 5 , k 8 = 5 , P 2 = 0 , P 3 = 10 , P 4 = 20 , P 5 = 30 , and P 6 = 0 and nodes 1 and 7 are constrained such that U 1 = U 7 = 0 For this model your input file should resemble
7, 0. from which you would find
N NODE = 7 N ELEM = 8 N F ORCE = 3 N P RE DISP = 2 ELEM NODE = ằ 1 2 3 4 5 1 3 6 2 3 4 5 6 2 5 7
Finite Element Initialization Recall from Section 8.4 that we do not want to assemble the matrixK ur , rather we want to assemble the matricesK pp ,K pf ,
K f p andK f f Likewise, we do not want to assemble the vectorP ur , rather we want to assemble the vectorP f In theinitialize equation module, cf algorithm 2, we assign the integer arrayEQ N U M in order to assemble these matrices and this vector Each nodeiis assigned an ascending, starting from 1, or descending, starting from -1, integer value depending on whether it is associated with a node that has a free or prescribed degree-of-freedom To generate this array we first equate all of the elements of the arrayEQ N U M to zero Then we loop over the N P RE DISP nodes with prescribed displacements to assign the descending elements ofEQ N U Mand finally we go back and fill in the remaining elements.
Example 8.6 A call to the initialize equation module of algorithm 2 for the spring system illustrated in Figure 8.1 and discussed in example 8.5 results in
Finite Element Analysis To perform the analysis we need to assemble the stiffness matrices and force vectorP f of Equations (8.17) and (8.18) and then solve Equation (8.17) forU f and evaluateP p from Equation (8.18) These tasks, which constitute theanalysis module, cf algorithm 9, are performed in theassem- ble moduleandsolve module.
Finite Element Assembly Recall that we compute the stiffness matrixK ur by considering each element individually A similar procedure will be used to compute the matricesK pp ,K pf ,K f p andK f f and the force vectorP f
Algorithm 2Initialize equation module Input:N N ODE,N P RE DISP,DISP N ODE Output:EQ N U M
EQ N U M=0 Fori= 1toN P RE DISPDoAssign equation numbers for the prescribed nodes
N ODE=DISP N ODE(i) EQ N U M(N ODE) =−i
Fori= 1toN N ODEDo ifEQ N U M(i) = 0thenAssign equation numbers for the free nodes
In our program we store the stiffness matrix partitions in the real arraysKP P, KP F, KF P and KF F such that KP P(i, j) = K i j pp , KP F(i, j) = K i j pf ,
KF P(i, j) = K i j pf andKF F(i, j) = K i j f f In regard to their assembly, first, for each elementl with left (first) nodeiand right (second) nodej we call the element module, cf algorithm 3 This module takes as input the element stiffness valuek l = ELEM ST IF F(l)and returns the element stiffness matrix in the real arrayKEL, i.e the matrixK l of Equation (8.12) This module will receive much focus in the future, but for now it is simplistic This procedure is described in algorithm 3.
Algorithm 3Element module Input:ELEM N U M,ELEM ST IF F Output:KEL k=ELEM ST IF F(ELEM N U M) KEL=k∗ ằ 1 −1
After each call to theelement modulewe call theelement stiffness assemble module, cf algorithm 4, to add the individual element contributions to the ap- propriate locations in the global matricesK pp ,K pf ,K f p andK f f This is ac- complished via theKEL,ELEM N ODEandEQ N U M arrays Indeed, the elementl nodes point to the node equation numbers which in turn inform us if the node associated with a particular entry ofK l is free or prescribed, depending on the sign of the node equation number Specifically, suppose our elementl ELEM N U M has first and second nodesi = ELEM N ODE(1, l)andj ELEM N ODE(2, l)with corresponging equations numbersEQ N U M(i) mandEQ N U M(j) = n If the equation number of the first node is positive, i.e ifm >0, then the first row (column) ofKELcontributes to row (column)m of theKF F (KF F) andKF P (KF P) matrices Otherwise ifm 0thenfree row ifCOL >0thenfree column KF F(ROW, COL) =KF F(ROW, COL) +KEL(i, j) elseprescribed column KF P(ROW,−COL) =KF P(ROW,−COL) +KEL(i, j)
End if elseprescribed row ifCOL >0thenfree column KP F(−ROW, COL) =KP F(−ROW, COL) +KEL(i, j) elseprescribed column KP P(−ROW,−COL) =KP P(−ROW,−COL) +KEL(i, j)
End if End if End For End For
In theforce assemble module, cf algorithm 5, the externally applied elements of the free force vectorP f are deposited in the real arrayP Fsuch thatP F(:) =P f This array is assembled in an analogous manner to those of the stiffness matri- ces If the forcenwith valuef =F ORCE V ALU E(n)that is applied to node i=F ORCE N ODE(n)has equation numberm=EQ N U M(i)>0, thenf is added to rowmofP f
Two remarks are warranted at this juncture First: for the spring system only one force is applied to each node and there is no reason for the sum; however, this will not always be the case Second: forces in the spring system are only applied to free nodes Again, this situation will not always be the case.
Algorithm 5Force assemble module Input:N F ORCE,F ORCE N ODE,F ORCE V ALU E,EQ N U M Input/Output:P F
Fori= 1toN F ORCESDoloop over the forces N ODE=F ORCE N ODE(i) f=F ORCE V ALU E(i) ROW =EQ N U M(N ODE) ifROW >0thenadd forces to free nodes P F(ROW) =P F(ROW) +f
As seen in thedisplacement assemble module, cf algorithm 6, we assemble the vector of prescribed displacementsU p This information, that is stored in the real arrayU P such thatU P(:) =U p , is obtained with the help of the equation number arrayEQ N U M The astute reader will notice thatU P =DISP V ALU E At the same time, and in preparation for the nonlinear analyses to come, we prescribe the known components of the unreduced displacement vectorU ur which is stored in the real arrayU U Rsuch thatU U R(:) =U ur
Algorithm 6Displacement assemble module Input:N P RE DISP,DISP N ODE,DISP V ALU E,EQ N U M Input/Output:U P,U U R
Fori= 1toN P RE DISPDoAssembleU p and insert it intoU ur
N ODE=DISP N ODE(i) j=−EQ N U M(N ODE) U P(j) =DISP V ALU E(i) U U R(N ODE) =DISP V ALU E(i)
We now have enough background in place to assemble the stiffness matrices
K pp ,K pf ,K f p andK f f , free force vectorP f and prescribed displacement vector
U p In theassemble module, cf algorithm 7, we initially form and prescribed displacement vectorU p and disperse its values into the unreduced displacement vectorU ur Following this we assemble the force vectorP f And finally we loop over the elements to form the element stiffness matrices and then immediately add their contributions to the appropriate components in the global stiffness matrices.
This particular order of dispersingU p into U ur before assembling the stiffness matrices, although unimportant here, is required for the nonlinear analyses and semi-analytical sensitivity analyses to come.
Algorithm 7Assemble module Input:N ELEM,N F ORCE,N P RE DISP,ELEM N ODE, ELEM ST IF F,F ORCE N ODE,F ORCE V ALU E,DISP N ODE, DISP V ALU E,EQ N U M
Output:KP P,KP F,KF F,KF P,P F,U P,U U R call Displacement assemble module with (N P RE DISP,DISP N ODE, DISP V ALU E,EQ N U M) to assign (U P,U U R) call Force assemble module with (N F ORCE,F ORCE N ODE, F ORCE V ALU E,EQ N U M) to compute (P F)
KP P =0,KP F =0,KF F =0,KF P =0Zero initialization
ForELEM N U M= 1toN ELEMDoloop over the elements call Element module with (ELEM N U M,ELEM ST IF F) to compute (KEL) call Element stiffness assemble module with (KEL,ELEM N ODE,EQ N U M, ELEM N U M) to update (KP P,KP F,KF F,KF P)
Example 8.7 Refer to the system illustrated in Figure 8.1 for which
First we assemble the arrays which form the vector U p and its partition in U ur
The arrays which the form vector P f are assembled in a similar manner 1 force 1: node 3
0 10 20 30 0 ˜Finally we assemble the global matrices K pp , K pf and K ff beginning with element 1 and proceeding to element 8 and recall that
These results agree with those of example 8.4.
As mentioned earlier the stiffness matrix is symmetric Consequently we see thatK f p =K pf T and hence we need not assemble the arrayKF P Furthermore the elements under the diagonals inK pp andK f f need not be stored in the arraysKP P andKF F There are a great many schemes that take advantage of the symmetry and sparsity of the stiffness matrices We will not dwell on these here, suffice it to say that should such schemes by used, then the assembly process would have to be modified accordingly We further mention that the symmetric stiffness matrix is a luxury that we will not always have.
Sensitivity Analysis
After the analysis is performed we may proceed to compute the sensitivities For our spring system, the spring stiffness coefficients, applied forces and prescribed displacements are the model parameters, i.e all real valued parameters in our model input file Whereas the free node displacements and reaction forces, i.e. those quantities which we evaluate via the analysis, are the response variables.
The response (performance) function is defined in terms of any or all of the re- sponse variables and model parameters However, the response variables are actu- ally functions of the model parameters; indeed they are implicitly defined through the nodal equilibrium equations So ultimately, the response function is only de- fined over the model parameters and the sensitivity is its derivative with respect to these model parameters.
Sensitivity Problem First we introduce then-dimensional model parameter vec- tordwhose elements contain thenmodel parameters of interest Now, as men- tioned above, these parameters explicitly define the spring stiffness coefficients, applied forces and prescribed displacements and they implicitly define the free node displacements and reaction forces To reflect these dependencies, we rewrite Equation (8.17) as
K f f (d)U f (d) =P f (d) (8.19) where for the moment, to simplify the sensitivity analysis, we assume thatU p =0 and is constant, i.e.U p is not a function ofd Note that all quantities are now expressed as functions of then-dimensional model parameter vectord; butK f f andP f are explicit functions ofd, whereasU f is an implicit function ofd. One performs an analysis to evaluate the system responseU f (andP p ), and then uses the response to evaluate the response functionΘ, which we define through Πas Θ(d) = Π(U f (d),d) (8.20)
For the present, we neglect to place the reaction force in the functionΠ, again to simplify the sensitivity analysis.
The objective of the sensitivity analysis is to compute the derivative, or sensi- tivity, of the above, i.e.
DΘ(d) =D 1 Π(U f (d),d)DU f (d) +D 2 Π(U f (d),d) (8.21) where we invoked the chain rule In the above, the partial derivativesD 1 Πand D 2 Πare readily evaluated as the functionΠ is defined by the engineer, so their derivatives are presumably obtainable The difficulty of evaluating the above is due to the presence of the derivativeDU f which is implicitly defined through Equation (8.19), and therefore it is generally unknown.
Example 8.9 Consider the two-degree-of-freedom spring system illustrated in Figure 8.3 This system may be used to crudely model, e.g the deflection of a bridge If we adhere this analogy, then the bridge’s structural elements are represented by the springs with stiffnesses k 1 and k 2 For such a system, the deflections U 1 and U 2 , under the loads P 1 and P 2 , can be evaluated by solving the linear system ằ k 1 + k 2 −k 2
The above equation may be solved symbolically as
To gauge the stiffness of the bridge we can compute its mean compliance Θ comp , as Θ comp = P 1 U 1 + P 2 U 2
If we assign the values k 1 = 1 , k 2 = 2 , P 1 = 1 , and P 2 = 2 we find that U 1 = 3 , U 2 = 4 and Θ comp = 11
Now we perform a sensitivity analysis in which U f = [U 1 U 2 ] T is the system response, Θ ˜ comp is the performance function and d = [k 1 k 2 ] T is the parameter vector We consider the force to be fixed at P 1 = 1 and P 2 = 2
Using the above results it can be verified that
In the previous example, we evaluated the response symbolically so that the responseU f , and response functionΘ, are explicit in the parametersd In general this is not possible, so we must devise a means to evaluate the sensitivities when
U f and henceΘare not explicit functions ofd In the following, we describe three such methods, the finite difference method, the direct differentiation method and the adjoint method.
Finite Difference Method The finite difference method is undoubtedly the eas- iest method to implement, however, it suffers from computational inefficiency and possible errors Nonetheless, this method serves as the gold standard, i.e the re- sults of the direct and adjoint methods discussed below must be consistent with these finite difference results.
In the finite difference method, we utilize the Taylor series expansion to ap- proximate the derivative Consider our functionΘ, and the Taylor series expansion Θ(d+ Δd i) = Θ(d) +∇,iΘ(d)ãΔd i +1
2Δd i ãD 2 Θ( ˜d)Δd i (8.22) where Δd i= [0,0, ,0, componenti Δd i ,0, ,0] (8.23) represents the parameter perturbationd˜=d+αΔdi withα∈[0,1]and∇,iΘis componentiof the gradient∇Θ The above is solved for∇,iΘ(d)to obtain the forward-difference approximation
∇,iΘ(d) =(Θ(d+ Δd i)−Θ(d)) Δd i (8.24) where we see that the neglected truncation error− 2Δ 1 d i ΔdiãD 2 Θ( ˜d)ãΔdiof the approximation is of orderO(Δd i ) Thus, a smallerΔd i yields a more accurate approximation However, ifΔd i is too small, then numerical round-off error will erode the accuracy of the computations The backward difference approximation is similarly obtained as
∇,iΘ(d) =(Θ(d)−Θ(d−Δd i)) Δd i To obtain a second-order accurate approximation we subtract the following second- order Taylor series expansions from each other Θ(d+ Δd i) = Θ(d) +∇Θ(d)ãΔd i+1
Neglecting theo(Δd 2 i )terms and taking the difference yields the central difference approximation
We may use the finite difference method to compute the sensitivities for our general response function For example, the forward difference method gives
= Π(U f (d+ Δd i),d+ Δd i)−Π(U f (d),d) Δdi where we obtainU f (d+ Δd i)by solving
Thus, for each parameterdiwe must perform an analysis to evaluateU f (d+Δd i).
This is an extremely costly proposition because a total ofnadditional analyses will be required Further, as seen in the following example, the results are not exact and may experience truncation and round-off errors, so that several perturbation sizes Δd i , are necessary to verify their accuracy.
Example 8.10 Refer to example 8.9 Here, finite difference computations are performed to evaluate the sensitivities of the compliance Θ ˜ comp , for the various perturbation values denoted in Tables 8.1 and8.2 Results are tabulated for forward and central finite difference computations and are seen to agree with the results of example 8.9 for the appropriate perturbation sizes The first two columns for each table list sensitivities with respect to d 1 and the last two columns list sensitivities with respect to d 2 The two tables denote results for double and single precision computations, respectively As seen from the tables when Δd i is too large truncation errors adversely affect the result whereas round-off errors adversely affect the results when Δd i is too small Further note that the higher-order approximation yields a more accurate result over a larger range of perturbations (at the cost of additional analyses) and that the double precision computations are more reliable, as expected.
Table 8.1.Finite difference sensitivity computations forΘ˜compin double precision.
Perturbation componentΔd 1 componentΔd 2 size Forward Central Forward Central
Table 8.2.Finite difference sensitivity computations forΘ˜compin single precision.
Perturbation componentΔd 1 componentΔd 2 size Forward Central Forward Central
Direct Differentiation Method In the direct differentiation method, we evaluate the derivativeDU f (d)and then compute the sensitivities from Equation (8.21), which is shown in component form as
∇Θ,i(d) =D 1 Π(U f (d),d)D,i U f (d) +D 2 ,iΠ(U f (d),d) (8.25) for thei= 1,2, , ncomponentsd i ofd. To compute the derivative DU f , we differentiate the system equation (cf.
Equation (8.19)) with respect to the individual parameters, i.e.
D ,i K(d)U f (d) +K f f (d)D ,i U f (d) =D ,i P f (d) which is rearranged to give
The abovepseudo problemmay be solved for the response sensitivityD ,i U f (d).
Note that this equation resembles the primal analysisK f f (d)U f (d) = P f (d) (cf Equation (8.19)) So the factored stiffness matrix from the primal analysis can be used to compute the derivativesD,i U f (d)in an efficient manner We merely form the pseudo force D,i P f (d)−D,i K f f (d)U f (d)and then perform a back substitution to evaluateD,i U f (d) This process is repeated for each of thencom- ponents ind, whereupon the sensitivities may be evaluated from Equation (8.25) for any number of response functions (cf Equation (8.20)) In contrast to the finite difference method, these results do not suffer from the truncation and round-off errors attributed toΔd iand they are obtained efficiently as the sensitivity analysis does not require additional stiffness matrix assemblies and decompositions.
The numerical efficiency is lost if indirect equation solvers are used in the primal analysis, however it is still advisable to use the direct sensitivity method in such cases to avoid the truncation and round-off errors associated with the finite difference method However, in light of the computational efficiencies gained via direct solvers, all future discussions assume that they are used.
Example 8.11 Refer to example 8.9 Here we use the direct differentiation method to evaluate the sensitivities Equation (8.25) gives
– + 0 where we note that D 2 Π(U f (d), d) = 0 The objective now is to evaluate the D ,i U f (d) Toward this end, we use Equation (8.26)
D ,i P f (d) − D ,i K ff (d)U f (d) ” where, from the primal analysis of Equation (8.19), we have determined
1 1.5– with d = [1, 2] We also recall that
The compliance sensitivity may now be computed from Equation (8.25)
= −9 which agrees with the result of example 8.9.
The compliance sensitivity is then given from
= −1 which also agrees with the result of example 8.9.
Finally, the sensitivity components are combined to give
−1 – which again agrees with the result of example 8.9.
Adjoint Method In the adjoint method, we eliminate the derivativeDU f from Equation (8.21) This is accomplished by rearranging Equation (8.26) and premul- tiplying it by the adjoint variableλ f This result, which equals zero, is then added to Equation (8.21) giving
Sensitivity Computer Program
The primary difficulty in developing a computer program to evaluate the sensitivi- ties is the logistics of defining the response functions and the relationships between the model parameters of interest, i.e.dand the parameters which define the finite element model, e,g,k l andP i Again, there are many ways to achieve these goals.
For the spring system it can be done in a rather straight forward manner The following describes a simple program that computes the sensitivities via the di- rect differentiation method It consists of slight modifications to theinput module andoutput module and the creation of three additional modules: pseudo force, evaluate function,anddirect differentiation.
Presently we have three parameters that we consider in the sensitivity analysis: spring stiffness coefficients, prescribed displacement values and externally applied force values To simplify the program we require that the user to write aevaluate function modulefor their distinct application Again, this is a trade-off that we make opting for simplicity over generality.
Finite Element and Sensitivity InputTheinput modulemust now obtain the information that describes the model parameters in the vectord To these ends we append our input file with
1 N P ARAM, the (integer) number of model parameters, i.e the dimension ofd and for each parameterl= 1,2,ã ã ã , N P ARAMwe supply 1 P ARAM T Y P E(l), the (character) entity type (= ‘spring for a spring stiffness,= ‘displacement for a prescribed displacement and= ‘f orce for an externally applied force),
2 P ARAM EN T N U M(l), the (integer) entity number, 3 P ARAM V AL(l), the (real) parameter value,
The parameter value is used to overwrite the value of, e.g the spring stiffness coefficient Theinput module, cf algorithm 1 is modified to read and output this information.
Example 8.13 For the spring compliance sensitivity analysis discussed example 8.9 we have k 1 = 1 , k 2 = 2 , P 1 = 1 , P 2 = 2 , U 3 p = 0 For the sensitivity parameters we have d 1 = k 1 = 1.0 , d 2 = k 2 = 2.0 The input file is
’spring’, 2, 2.0 from which you would find
N NODE = 3 N ELEM = 2 N F ORCE = 2 N P RE DISP = 1 ELEM NODE = ằ 3 1
‘spring ‘spring ˜ P ARAM ENT NUM = ˆ
Evaluate function module The purpose of the evaluate function moduleis to computeΘ, cf Equation (8.33), and the derivativesD 1 Π,D 2 ΠandD 3 Π, cf.
Equation (8.34) In the proposed program this module must be written by the analyst, i.e you, for each specific application, e.g to compute the compliance and its sensitivity Multiple functionsjcan be computed and for this reason the number of functions must also be specified.
In a perfect world, this module would not have to be written specifically for each separate application, rather a set of predefined functionsΘiwould be avail- able, e.g it would include the nodekdisplacement i.e.Θi = U k ur , the nodek reaction force i.e.Θi = P k ur or the compliance, i.e.Θi = P ur T U ur This in- formation would be identified via the input file Again we opt for simplicity over generality.
Again, we considerj= 1,2,ã ã ã functions of the form Θ j (d) = Π j (U ur (d),P ur (d),d) (8.38) and their derivatives
Whence our evaluate function module needs to compute the values for the func- tions Π j and their derivatives D 1 Π j , D 2 Π j and D 3 Π j for the givenU ur (d),
P ur (d), andd Summarizing, the output of the evaluate function module con- sists of the number of functions, which is stored as the integer N F U N CT, the values of the functions, which are stored in the real array T HET A such thatT HET A(j) = Θ j , and the values of the derivatives which are stored in the real arrays D1 P I, D2 P I and D3 P I such that D1 P I(j,:) = D 1 Π j , D2 P I(j,:) = D 2 Π j andD3 P I(j,:) =D 3 Π j , i.e rowj ofD1 P I,D2 P I andD3 P Icontains the partial derivatives ofΠ j with respect toU ur ,P ur andd, respectively.
Example 8.14 An example function evaluate module which generalizes the compliance computa- tion for the problem discussed in examples 8.9 and 8.13 appears in algorithm 12 In this generalized problem we have Θ = U ur T P ur , D 1 Π = P ur T , D 2 Π = U ur T and D 3 Π = 0 ,
Algorithm 12Function evaluate module Input:N P ARAM,P ARAM V ALU E,U U R,P U R Output:N F U N CT,T HET A,D1P I,D2P I,D3P I
N F U N CT = 1 T HET A(1) =U U R∗P U RCompliance response function D1P I(1,:) =P U RDerivative wrtU ur
After the call to this module we have
Pseudo Force EvaluationFor each parameterd i the pseudo forces, i.e the right hand sides of Equation (8.35), are assembled in thepseudo force module.
These vectors are stored in the real arraysP SEU DO F andP SEU DO P such that
P SEU DO P(:) = D,i K pp U p +K pp D,i U p +D,i K pf U f (8.40)
Note that the productK pf D ,i U f in above equation forP SEU DO P is not in- cluded asD,i U f is unknown at this time.
We also assemble theD,i U p andD,i P f components ofD,i U ur andD,i P ur , cf Equation (8.39), in this module This information is stored in the real arrays D U P andD P F such that D U P(:) = D,i U p andD P F(:) = D,i P f Fi- nally we note that we do not assemble the matrices D,i K pp , D,i K pf , D,i K f p and D,i K f f , rather we directly assemble the vectors of Equation (8.40) in an element-by-element manner, i.e we evaluate the elementl quantities D ,i K l U l and thensubtractthese element contributions from the global quantities of Equa- tion (8.40) This elementwise procedure, which is analogous to the manner in which we evaluateK pp ,K pf , K f p andK f f , is outlined in algorithms 13, 14 and 15, cf algorithms 7, 3 and 4 In fact, theelement module, cf algorithm 14, is merely a modified version of element module algorithm 3 which now com- putes eitherK l or−D ,i K l U l depending on the value of the input character vari- ableCOM P U T E ∗ The latter is stored in the arrayP SEU DO ELsuch that P SEU DO EL(:) =−D ,i K l U l
The element force assemble module, cf algorithm 15, is a vector version of the matrix assembly algorithm 4 And in algorithm 13 we are computing the derivatives of Equation (8.40) with respect to the given parameterdi wherei I P ARAM The procedure is somewhat similar to that matrix assembly in algo- rithm 7 Here, however, we do not loop over all of the elements and forces, as we need only consider those that are affected by the parameterdiof interest.
Example 8.15 For the problem discussed in examples 8.9 and 8.13 a call to the pseudo force module with I P ARAM = 1 would produce:
– and with I P ARAM = 2 it would produce:
Direct differentiation sensitivity analysisIn thedirect differentiation module, for each parameterd i we compute the pseudo forces via thepseudo force module, cf algorithm 16, and then we solve Equation (8.35) to compute the response sen- sitivitiesD ,i U f andD ,i P p These derivatives are stored in the real arraysD U F andD P P such thatD U F(:, i) =D ,i U f andD P P(:) =D ,i P p To maximize efficiency when solving Equation (8.35) we utilize the factored stiffness matrix,
∗ The COMP UT E = ‘ST IF F NESS MAT RIX character string should be input to the as- semble module, cf algorithm 7, from the analysis module, cf algorithm 9, so it may in turn be input to the element module, cf algorithm 14.
Algorithm 13Pseudo force module Input:I P ARAM,P ARAM T Y P E,P ARAM EN T N U M,ELEM N ODE, ELEM ST IF F,DISP N ODE,F ORCE N ODE,EQ N U M,KF P,KP P, U U R
Output:P SEU DO F,P SEU DO P,D U P,D P F
EN T IT Y T Y P E=P ARAM T Y P E(I P ARAM) EN T IT Y N U M=P ARAM EN T N U M(I P ARAM) ifEN T IT Y T Y P E= ‘spring thenDifferentiate wrt a spring stiffness ELEM N U M=EN T IT Y N U M
COM P U T E= ‘P SEU DO F ORCE call Element module with (COM P U T E,ELEM N U M,ELEM N ODE, ELEM ST IF F,U U R) to compute (P SEU DO EL) call Element force assemble module with (F EL=P SEU DO EL, ELEM N ODE,EQ N U M,ELEM N U M) to update
(F ORCE P=P SEU DO P,F ORCE F =P SEU DO F) else ifEN T IT Y T Y P E= ‘displacement thenDifferentiate wrt a displacement DISP N U M =EN T IT Y N U M
N ODE=DISP N ODE(DISP N U M) ROW =−EQ N U M(N ODE)
P SEU DO F =P SEU DO F −KF P(:, ROW)This isK fp D ,i U p
P SEU DO P =P SEU DO P −KP P(:, ROW)This isK pp D ,i U p else ifEN T IT Y T Y P E= ‘f orce thenDifferentiate wrt a force
F ORCE N U M =EN T IT Y N U M N ODE=F ORCE N ODE(F ORCE N U M) ROW =EQ N U M(N ODE) ifROW >0thenfree node P SEU DO F(ROW) =P SEU DO F(ROW) + 1. D P F(ROW) =D P F(ROW) + 1.
Algorithm 14Element module Input:COMP UT E,ELEM NUM,ELEM NODE,ELEM ST IF F,UUR
Output:KEL,P SEUDO EL ifCOMP UT E= ‘ST IF F NESS MAT RIX thenfor stiffness matrix computation k=ELEM ST IF F(ELEM NUM)
−1 1 else ifCOMP UT E= ‘P SEUDO F ORCE thenfor pseudo force computation Fori=1,2DoassembleU l
NODE=ELEM NODE(i, ELEM NUM)
Algorithm 15Element force assemble module
Input:F EL,ELEM NODE,EQ NUM,ELEM NUM
Input/Output: updated values ofF ORCE P,F ORCE F
Fori= 1to2DoLoop over the rows
NODE=ELEM NODE(i, ELEM NUM)
ROW =EQ NUM(NODE) ifROW >0thenfree row
F ORCE F(ROW) =F ORCE F(ROW) +F EL(i) elseprescribed row
F ORCE P(−ROW) =F ORCE P(−ROW) +F EL(i)
End if End For stored in the real arrayF AC KF Ffrom the call to thesolve module Furthermore we require the matricesK pp ,K pf andK fp in the analysis of Equation (8.35) For this reason,F AC KF F is now output from thesolve moduleandKP P,KP F,
KF P andF AC KF Fare now output from theanalysis moduleso that they may be input into thedirect differentiation module.
Once the derivativesD ,i U f andD ,i P p are computed we assemble the vectors
D ,i U ur andD ,i P ur and store them in the real arraysD UURandD P URsuch thatD UUR(:) =D ,i U ur andD P UR(:) =D ,i P ur Finally the sensitivities are computed the via Equation (8.39) and the results are stored in the real array
DT HET A such that DT HET A(:, j) = ∇Θ j , i.e column j of DT HET A contains∇Θ j
Input:N NODE,ELEM NODE,ELEM ST IF F,F ORCE NODE,
DISP NODE,N P ARAM,P ARAM T Y P E,P ARAM ENT NUM,
EQ NUM,N F UNCT,D1P I,D2P I,D3P I,KP P,KP F,KF P,
ForI P ARAM= 1toN P ARAMDoloop over the parameters call Pseudo force module with (I P ARAM,ELEM NODE,ELEM ST IF F,
F ORCE NODE,DISP NODE,P ARAM T Y P E,P ARAM ENT NUM,
EQ NUM,KF P,KP P,UUR) to compute (P SEUDO F,P SEUDO P,
UseF AC KF F to solve the systemKF F∗D UF =P SEUDO F forD UF D P P =−P SEUDO P +KP F ∗D UFFinish computing reaction sensitivity
Forj= 1, N NODEDoloop over the nodes to assembleD ,i U ur andD ,i P ur
ROW =EQ NUM(i) ifROW >0thenFree node
Forj= 1toN F UNCT Doloop over the functions
DT HET A(I P ARAM, j) =D1P I(j,:)∗D UUR+D2P I(j,: )∗D P UR+D3P I(j, I P ARAM)
Optimization Problems
To optimize designs, solve inverse/identification problems, and perform reliability studies we formulate optimization problems and solve them via nonlinear pro- gramming algorithms Such nonlinear programming (NLP) problems can usually be stated as:
NLP: min d f(d) such that h i (d) = 0, i= 1,2,ã ã ã, nh gi(d)≤0, i= 1,2,ã ã ã, ng d lower j ≤dj≤d upper j , j= 1,2, n
(8.41) wherefis the cost function anddis then-dimensional parameter vector subject to thenside constraintsd lower j ≤d j ≤d upper j , then h equality constraintsh i (d) = 0 and then g inequality constraintsg i (d)≤0 The NLP is the not the most general problem statement that exists, but a majority of the problems that you encounter can be defined as such For example if you are required to maximize a function f, then you can minimize the function−f; and likewise, a constraint of the form g(d)≥0is equivalently written as the constraint−g(d)≤0.
Nonlinear programming algorithms are iterative processes In each iteration we are given the parametersd i =P ARAM V AL(i)and in turn we supply the algorithm with the value of the cost functionf(d) = T HET A(1)and its sen- sitivities ∇f(d) = DT HET A(:,1), and the values of the constraint functions g i (d) =T HET A(i+ 1), and their sensitivities∇g i (d) =DT HET A(:, i+ 1).
To solve optimization problems with our program thefunction evaluate module should first define the cost function to be minimized, followed by the inequality constraints defined such that gi(x) ≤ 0 specifies the feasible region, cf Equa- tion (8.41) And to simplify the optimization problem, we only permit inequality constraints The algorithm updates the parameter vector, i.e.d→d+ Δd, where- upon another iteration commences until convergence is attained.
To modify the finite element model to reflect the current values of the param- eter vectordwe introduce theupdate module And to evaluate the valuesf(d),
∇f(d),g i (d)and∇g i (d)for the givendwe introduce thefunction and sensitivity evaluation module.
Finite Element Update Before the analysis and sensitivity analysis begins, the update module is called to overwrite the values of the stiffness, prescribed dis- placement and externally applied force values in accordance with their parameter values, cf algorithm 18 For example, ifd 3 is the stiffness of element 2, then we must setELEM ST IF F(2) =P ARAM V ALU E(3).
Algorithm 18Update module Input:N P ARAM,P ARAM T Y P E,P ARAM EN T N U M,P ARAM V AL Input/Output:ELEM ST IF F,F ORCE V ALU E,DISP V ALU E
Fori= 1toN P ARAMDoloop over the parameters EN T IT Y T Y P E=P ARAM T Y P E(i) EN T IT Y N U M =P ARAM EN T N U M(i) ifEN T IT Y T Y P E= ‘spring thenChange a spring stiffness ELEM N U M=EN T IT Y N U M
ELEM ST IF F(ELEM N U M) =P ARAM V AL(i) else ifEN T IT Y T Y P E= ‘displacement thenChange a displacement DISP N U M=EN T IT Y N U M
DISP V ALU E(DISP N U M) =P ARAM V AL(i) else ifEN T IT Y T Y P E= ‘f orce thenChange a force F ORCE N U M=EN T IT Y N U M
F ORCE V ALU E(F ORCE N U M) =P ARAM V AL(i)
Function and Sensitivity Evaluation Thefunction and sensitivity evaluation module is outlined in algorithm 19 This module can be readily adapted to com- pute only the function values as required in the one-dimensional search or to com- pute only the sensitivities of the cost function and the sensitivities of the constraint functions in theactive set, i.e those infeasible (and close to infeasible) constraint functions for whichg i (d)>−εwhereε >0is “small” Note that theinput mod- uleandinitialize equation moduleare not called from this module, cf algorithms 1 and 2 However, these two modules need to be called once, prior to the first call to thisfunction and sensitivity evaluation module Theoutput moduleis also omitted from this module, as we may desire to see only the final results of the optimization, of course this information could be recorded more frequently if desired.
Example 8.17 An example MATLAB program which solves the nonlinearly constrained optimiza- tion problem via the fmincon function appears in algorithm 20.
The input file defines the parameters that are optimized It also provides their initial values and the necessary enhancements to obtain their lower and upper bounds, i.e referring to Equations (8.41) d (0) , d lower and d upper are supplied in the input file such that after calling the input function we have P ARAM V AL(i) = d (0) i , P ARAM LOW (i) = d lower i and P ARAM UP P (i) = d upper i An initial solution guess is supplied to the optimization fmincon function via the array P ARAM V AL 0 such that P ARAM V AL 0(:) = d (0)
The costfun function evaluates the cost function f to be minimized and its gradient ∇f and the nlconfun function evaluates the constraint function vector g and its gradient [D g] T These evaluations require calls to the FUNCTION AND SENSITIVITY EVALUATION function whereafter the values are assigned such that f(d) = T HET A(1) , g i (d) = T HET A(i + 1) , ∇f (d) = DT HET A(:, 1) and ∇g i (d) = DT HET A(:, i + 1)
Algorithm 19Function and sensitivity evaluation module Input: (N N ODE,N ELEM,N F ORCE,
N P RE DISP,ELEM N ODE,ELEM ST IF F, F ORCE N ODE,F ORCE V ALU E,DISP N ODE,DISP V ALU E, N P ARAM,P ARAM T Y P E,P ARAM EN T N U M,P ARAM V AL, EQ N U M
Output:T HET A,DT HET A,N F U N CT call Update module with (N P ARAM,P ARAM T Y P E, P ARAM EN T N U M,P ARAM V AL) to update (ELEM ST IF F, F ORCE V ALU E,DISP V ALU E) call Analysis module with (N N ODE,N ELEM,N F ORCE,N P RE DISP, ELEM N ODE,ELEM ST IF F,F ORCE N ODE,F ORCE V ALU E, DISP N ODE,DISP V ALU E,EQ N U M) to compute (U U R,P U R,KP P, KP F,KF P,F AC KF F) call Function evaluate module with (N P ARAM,P ARAM V ALU E,U U R,P U R) to compute (N F U N CT,T HET A,D1P I,D2P I,D3P I) call Direct differentiation module with (N N ODE,ELEM N ODE, ELEM ST IF F,F ORCE N ODE,DISP N ODE,N P ARAM, P ARAM T Y P E,P ARAM EN T N U M,EQ N U M,N F U N CT,D1P I, D2P I,D3P I,KP P,KP F,KF P,F AC KF F,U U R) to compute (DT HET A)
Choi, K.K., Kim, N.H.Structural sensitivity analysis and optimization, volumes 1 and 2.
Haug, E.J., Choi, K.K and Komkov, V.Design Sensitivity Analysis of Structural Systems.
Kleiber, M., Ant´uney, H., Hien, T.D and Kowalczyck, P.Parameter Sensitivity in Nonlinear Mechanics: Theory and Finite Element Computations John Wiley & Sons, New York,
Haftka, R.T and G¨urdal, Z Elements of Structural Optimization (Third ervised and ex- panded edition) Kluwer Academic Publishers, Boston 1992.
Tortorelli, D.A and Michaleris, P.Design Sensitivity Analysis: Overview and Review In- verse Problems in Engineering, 1: 71-103 1994.