Presentation is loading. Please wait.

Presentation is loading. Please wait.

Department of Aerospace Engineering

Similar presentations


Presentation on theme: "Department of Aerospace Engineering"— Presentation transcript:

1 Department of Aerospace Engineering
AUTOMATIC GENERATION AND INTEGRATION OF EQUATIONS OF MOTION BY OPERATOR OVER-LOADING TECHNIQUES 1 2 N D. Todd Griffith, Andrew J. Sinclair, James D. Turner, John E. Hurtado, and John L. Junkins Texas A&M University Department of Aerospace Engineering College Station, TX 77840 Texas A&M University, Department of Aerospace Engineering

2 Presentation Outline Introduction and previous work
Overview of automatic differentiation by OCEA Equation of motion formulation using automatic differentiation A new algorithm for numerical integration Examples Texas A&M University, Department of Aerospace Engineering

3 Introduction and previous work
Work on multibody dynamics dates back to around 1960’s Multibody dynamics is a mature field; many codes and many books have been written in the area Authors include: Shabana, Scheihlen, Garcia de Jalon In general, many methods exist for equation of motion generation. Typically, Lagrange’s equations, Kane’s equations, or Newton/Euler Methods employed The primary question is which method for generation of equations of motion is most suitable for problem complexity, generality desired, computational issues, and computational resources to name a few. Texas A&M University, Department of Aerospace Engineering

4 Equation of motion formulation using automatic differentiation
Lagrange’s equations: Lagrangian: T, V: kinetic and potential energy q: generalized coordinates Q: generalized force C: constraint matrix l: Lagrange multipliers subject to Of course, many choices for equation of motion formulation exist; however, the utility of automatic differentiation is immediately seen for implementing Lagrange’s Equations………………... Texas A&M University, Department of Aerospace Engineering

5 Presentation Outline Introduction and previous work
Overview of automatic differentiation by OCEA Equation of motion formulation using automatic differentiation A new algorithm for numerical integration Examples Texas A&M University, Department of Aerospace Engineering

6 Overview of automatic differentiation by OCEA(1)
OCEA (Object Oriented Coordinate Embedding Method) Extension for FORTRAN90 (F90) written by James D. Turner Automatic Differentiation (AD) equation manipulation package in which new data types are created in order to define independent and dependent variables (functions) OCEA description Automatic differentiation enabled by coding rules for differentiation - Chain rule of calculus Can compute first through fourth-order partial derivatives of scalar, vector, matrix, and higher order tensors Standard mathematical library functions (e.g. sin, cos, exp) are overloaded Scalars are replaced by differential n-tuple Texas A&M University, Department of Aerospace Engineering

7 Overview of automatic differentiation by OCEA(2)
OCEA description (cont’d) Intrinsic operators such as ( +, - , * , / , = ) are also overloaded to enable, for example, addition and multiplication of OCEA variables: Partial derivative computation is hidden to the user - takes place in the background without user intervention. Access to partial derivatives (e.g. Jacobian, Hessian, etc.) made simple by overloading of the “ = “ sign. Texas A&M University, Department of Aerospace Engineering

8 Overview of automatic differentiation by OCEA(3)
The need for computation of partial derivatives is found in numerous applications Previous applications include Root solving and Optimization Second and higher-order GLSDC algorithms (AAS ) In this paper, we consider automatic generation of equations of motion for linked mechanical systems Texas A&M University, Department of Aerospace Engineering

9 Presentation Outline Introduction and previous work
Overview of automatic differentiation by OCEA Equation of motion formulation using automatic differentiation A new algorithm for numerical integration Examples Texas A&M University, Department of Aerospace Engineering

10 Approach (1): Direct approach(1) By differentiating the Lagrangian
Automatic Differentiation (AD) Specified AD or specified many methods Mass matrix and its time derivative computed by second-order differentiation……….. Texas A&M University, Department of Aerospace Engineering

11 Approach (1): Direct approach(2) By differentiating the Lagrangian
Can also compute constraint matrix, C, automatically for holonomic type constraint. Now forming equations: Accelerations computed after generating or prescribing all terms here. Now, can proceed with numerical integration……. Texas A&M University, Department of Aerospace Engineering

12 Approach (2): A modified form of Lagrange’s Equations
In this approach, we can bypass forming the kinetic energy function. Must still form potential energy (if you want to), but most importantly need an efficient method for computing the mass matrix and partial derivatives of mass matrix………….. Texas A&M University, Department of Aerospace Engineering

13 Approach (2): Identifying the mass matrix (1)
KE for system of rigid bodies For the case of planar rigid bodies, transformation matrices specialize to partials of position of mass center and partials of angular orientations Introduce the following velocity transformation matrices: Additionally, Bi is a constant vector of 1’s and 0’s for a minimal coordinate planar system Texas A&M University, Department of Aerospace Engineering

14 Approach (2): Identifying the mass matrix (2)
Introduce transformations Need not specify T, can get M by forming mass center positions vectors…... Mass matrix and mass matrix partials Texas A&M University, Department of Aerospace Engineering

15 Presentation Outline Introduction and previous work
Overview of automatic differentiation by OCEA Equation of motion formulation using automatic differentiation A new algorithm for numerical integration Examples Texas A&M University, Department of Aerospace Engineering

16 Numerical Integration: Solving
Fourth-order Runge-Kutta algorithm Utilizes approximate derivatives through fourth order So called Taylor integration scheme: Can compute through fourth-order time derivatives exactly. Potentially fifth-order method. Texas A&M University, Department of Aerospace Engineering

17 Presentation Outline Introduction and previous work
Overview of automatic differentiation by OCEA Equation of motion formulation using automatic differentiation A new algorithm for numerical integration Examples Texas A&M University, Department of Aerospace Engineering

18 Spring Pendulum by Direct method (1)
Texas A&M University, Department of Aerospace Engineering

19 Spring Pendulum by Direct method (2)
SUBROUTINE SPRING_PEND_EQNS( PASS, TIME, X0, DXDT, FLAG ) USE EB_HANDLING IMPLICIT NONE **************************************** !.....LOCAL VARIABLES TYPE(EB)::L, T, V ! LAGRANGIAN, KINETIC, POTENTIAL REAL(DP):: M, K ! MASS AND STIFFNESS VALUES REAL(DP), DIMENSION(NV):: JAC_L REAL(DP), DIMENSION(NV,NV):: HES_L T = 0.5D0*M*(X0(3)**2 + X0(1)**2*X0(4)**2) ! DEFINE KE V = 0.5D0*K*(X0(1)-R0)**2 + M*GRAV*(R0-X0(1)*COS(X0(2))) ! DEFINE PE L = T – V ! DEFINE LAGRANGIAN FUNCTION JAC_L = L ! dL/(dq,dqdot) JAC_L_Q = JAC_L(1:NV/2) ! dL/dq HES_L = L ! EXTRACT SECOND ORDER PARTIALS OF LAGRANGIAN MASS = HES_L(NV/2+1:NV,NV/2+1:NV) ! COMPUTE MASS MATRIX MASSDOT = HES_L(NV/2+1:NV,1:NV/2) !COMPUTE MDOT DXDT(1)%E = X0(3)%E ! RDOT DXDT(2)%E = X0(4)%E ! THETADOT DXDT(3)%E = QDOTDOT(1) ! RDOTDOT DXDT(4)%E = QDOTDOT(2) ! THETADOTDOT END SUBROUTINE SPRING_PEND_EQNS Texas A&M University, Department of Aerospace Engineering

20 Open-chain Topology of Rigid Bodies (1)
Mass center location can be recursively formulated and utilized to compute velocity transformation matrices and ultimately the mass matrix and its partial derivatives. Generation of Equations of motion for open-chain topologies can be automated to the point of simply specifying the number of bodies and the initial conditions, while for closed chain-topologies we additionally need to prescribe the constraint equations. 1 2 N Texas A&M University, Department of Aerospace Engineering

21 Open-chain Topology of Rigid Bodies (2)
10 body model for laboratory deployment of inflated aerospace structure. Model easily updated to include joint torques (e.g. damping) Texas A&M University, Department of Aerospace Engineering

22 Closed-chain Topology Example
5 link manipulator example. Two holonomic constraints specified. Driving torque on link 1. Payload Motion Texas A&M University, Department of Aerospace Engineering

23 Conclusion Introduced an automatic differentiation (AD) tool: OCEA
Implemented Lagrange’s equations using AD Mass matrix and it’s time derivatives computed by direct differentiation of T and by recursive formulation Suggested a new algorithm for numerical integration Examples included simulations of a generalized code for planar n-body systems with open and closed-chain topologies Future work includes computational studies, extension to 3D topologies, and efforts to validate solutions for flexible body systems Texas A&M University, Department of Aerospace Engineering


Download ppt "Department of Aerospace Engineering"

Similar presentations


Ads by Google