Linear algebra at work: simulating multibody systems

Similar documents
Mechanics lecture 7 Moment of a force, torque, equilibrium of a body

Rotation: Moment of Inertia and Torque

Dynamics. Basilio Bona. DAUIN-Politecnico di Torino. Basilio Bona (DAUIN-Politecnico di Torino) Dynamics / 30

Torque Analyses of a Sliding Ladder

Figure 1.1 Vector A and Vector F

SOLID MECHANICS TUTORIAL MECHANISMS KINEMATICS - VELOCITY AND ACCELERATION DIAGRAMS

Lecture L22-2D Rigid Body Dynamics: Work and Energy

ACTUATOR DESIGN FOR ARC WELDING ROBOT

Isaac Newton s ( ) Laws of Motion

Let s first see how precession works in quantitative detail. The system is illustrated below: ...

Elasticity Theory Basics

Figure Cartesian coordinate robot

Chapter 10 Rotational Motion. Copyright 2009 Pearson Education, Inc.

Pre-requisites

Vector Algebra II: Scalar and Vector Products

Orbital Mechanics. Angular Momentum

Lecture L3 - Vectors, Matrices and Coordinate Transformations

Attitude Control and Dynamics of Solar Sails

Lecture L5 - Other Coordinate Systems

Operational Space Control for A Scara Robot

Linear Motion vs. Rotational Motion

Matlab Based Interactive Simulation Program for 2D Multisegment Mechanical Systems

Vector or Pseudovector?

Design of a Universal Robot End-effector for Straight-line Pick-up Motion

When the fluid velocity is zero, called the hydrostatic condition, the pressure variation is due only to the weight of the fluid.

Vectors VECTOR PRODUCT. Graham S McDonald. A Tutorial Module for learning about the vector product of two vectors. Table of contents Begin Tutorial

Lecture L30-3D Rigid Body Dynamics: Tops and Gyroscopes

Precise Modelling of a Gantry Crane System Including Friction, 3D Angular Swing and Hoisting Cable Flexibility

Geometry of Vectors. 1 Cartesian Coordinates. Carlo Tomasi

F B = ilbsin(f), L x B because we take current i to be a positive quantity. The force FB. L and. B as shown in the Figure below.

4.2 Free Body Diagrams

Unified Lecture # 4 Vectors

Simple Harmonic Motion

Universal Law of Gravitation

Physics 9e/Cutnell. correlated to the. College Board AP Physics 1 Course Objectives

Simulation of Trajectories and Comparison of Joint Variables for Robotic Manipulator Using Multibody Dynamics (MBD)

Onboard electronics of UAVs

Lab 2: Vector Analysis

HW Set VI page 1 of 9 PHYSICS 1401 (1) homework solutions

WRAPPING MULTI-BOND GRAPHS: A STRUCTURED APPROACH TO MODELING COMPLEX MULTI-BODY DYNAMICS

APPLIED MATHEMATICS ADVANCED LEVEL

Lab 8: Ballistic Pendulum

Practice Exam Three Solutions

Lecture L29-3D Rigid Body Dynamics

Objective: Equilibrium Applications of Newton s Laws of Motion I

How To Understand The Dynamics Of A Multibody System

THE UNIVERSITY OF TEXAS AT AUSTIN Department of Aerospace Engineering and Engineering Mechanics. EM 311M - DYNAMICS Spring 2012 SYLLABUS

Basic Principles of Inertial Navigation. Seminar on inertial navigation systems Tampere University of Technology

PS 320 Classical Mechanics Embry-Riddle University Spring 2010

State of Stress at Point

Rigid body dynamics using Euler s equations, Runge-Kutta and quaternions.

A Simulation Study on Joint Velocities and End Effector Deflection of a Flexible Two Degree Freedom Composite Robotic Arm

Physics 1A Lecture 10C

MODELLING A SATELLITE CONTROL SYSTEM SIMULATOR

Vector Spaces; the Space R n

Dynamics of Rotational Motion

Lecture L25-3D Rigid Body Kinematics

SOLID MECHANICS BALANCING TUTORIAL BALANCING OF ROTATING BODIES

THE COMPOSITE DISC - A NEW JOINT FOR HIGH POWER DRIVESHAFTS

Quadcopters. Presented by: Andrew Depriest

PHY121 #8 Midterm I

Center of Gravity. We touched on this briefly in chapter 7! x 2

LAPPEENRANTA UNIVERSITY OF TECHNOLOGY Faculty of Technology LUT Mechanical Engineering Master s Degree Program in Mechanical Engineering

Lecture L6 - Intrinsic Coordinates

Design-Simulation-Optimization Package for a Generic 6-DOF Manipulator with a Spherical Wrist

Kyu-Jung Kim Mechanical Engineering Department, California State Polytechnic University, Pomona, U.S.A.

Some Comments on the Derivative of a Vector with applications to angular momentum and curvature. E. L. Lady (October 18, 2000)

Active Vibration Isolation of an Unbalanced Machine Spindle

Manufacturing Equipment Modeling

ENGINEERING COUNCIL DYNAMICS OF MECHANICAL SYSTEMS D225 TUTORIAL 1 LINEAR AND ANGULAR DISPLACEMENT, VELOCITY AND ACCELERATION

Centripetal Force. This result is independent of the size of r. A full circle has 2π rad, and 360 deg = 2π rad.

Modeling Mechanical Systems

The Basics of FEA Procedure

Chapter 11. h = 5m. = mgh mv Iω 2. E f. = E i. v = 4 3 g(h h) = m / s2 (8m 5m) = 6.26m / s. ω = v r = 6.

Mechanics 1: Conservation of Energy and Momentum

Slide Basic system Models

KINEMATICS OF PARTICLES RELATIVE MOTION WITH RESPECT TO TRANSLATING AXES

ANALYTICAL METHODS FOR ENGINEERS

Rotation Matrices and Homogeneous Transformations

Metrics on SO(3) and Inverse Kinematics

THEORETICAL MECHANICS

Modeling and Simulation of Heavy Truck with MWorks

Mathematical Modeling and Design Analysis of a Dexterous Endeffector

Journal of Engineering Science and Technology Review 2 (1) (2009) Lecture Note

Chapter 27 Magnetic Field and Magnetic Forces

Differential Relations for Fluid Flow. Acceleration field of a fluid. The differential equation of mass conservation

Structural Axial, Shear and Bending Moments

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

Lab 7: Rotational Motion

Introduction to Engineering Analysis - ENGR1100 Course Description and Syllabus Monday / Thursday Sections. Fall '15.

Physics Notes Class 11 CHAPTER 3 MOTION IN A STRAIGHT LINE

A Bond Graph Approach for Modelling Systems of Rigid Bodies in Spatial Motion

Unit 4 Practice Test: Rotational Motion

3. KINEMATICS IN TWO DIMENSIONS; VECTORS.

Mechanical Principles

Lecture 17. Last time we saw that the rotational analog of Newton s 2nd Law is

Force on Moving Charges in a Magnetic Field

DYNAMIC ANALYSIS OF THICK PLATES SUBJECTED TO EARTQUAKE

Origins of the Unusual Space Shuttle Quaternion Definition

EXPERIMENT: MOMENT OF INERTIA

Transcription:

Linear algebra at work: simulating multibody systems Peter Junglas Department of Mechanical Engineering, FHWT, Germany Abstract Finding the equations of motion of a mechanical system is a difficult task for students even in simple cases - much more for the complicated three-dimensional systems studied in multibody dynamics. Using a modern simulation program this task is transferred to the software. Two simple examples will show how the equations of motion are built up systematically by using the equations of the components and simple connection rules. With enough perseverance students can do this manually. Besides basics in mechanics they need a good working knowledge of "abstract" linear algebra, which proves here to be of eminent practical use. Multibody simulation Simulating mechanical systems with standard programs that are based on signal processing block libraries is an interesting and basically simple task for students as long as one knows the underlying equations of motion. To find them students usually have a rather restricted toolbox: They mainly rely on d'alembert's principle in combination with a free body diagram. This is often not sufficient even for apparently simple examples, not to mention systems of three-dimensional solid bodies connected by joints, which are the main subject of multibody dynamics (Wittenburg (28)). Here modern simulation programs based on physical modelling come to the rescue: Their building blocks are models of simple physical systems, the connections between them are abstractions of real flanges, wires or pipes transporting physical properties in both directions. In the widely used Modelica language the components and their connections define equations, which are assembled by the simulation program to get the equations of motion automatically (Fritzson (24)). The two examples presented in the following will demonstrate how this works in practice, even for multibody systems. This not only show the students how these programs work, but adds another method to their equations of motion toolbox. Prerequisites The physical relations that are used in the MultiBody library (basic dynamics and the Euler equation) are presented in mechanics lectures, a working skill with vector and matrix computations should result from linear algebra lessons. Usually lacking is a deeper understanding of rotation matrices. Particularly the following three relations are generally unknown to the students and have to be presented beforehand and proven, if time admits: computing a rotation matrix from a fixed axis n and rotation angle φ R=n n '+(1 n n ')cosϕ ñ sinϕ

2 writing the cross product as a matrix (i.e. hiding the Levi-Civita tensor ε) a:=( a 3 a 2 a 3 a 1 a 2 a 1 ) a b= a b computing the angular velocity ω from a time variant rotation matrix R(t) ω=r Ṙ ' Physical modeling with Modelicas MultiBody library Simulation software implementing Modelica usually comes with a graphical editor that allows to build models by connecting predefined building blocks. They define a set of variables and equations between them together with parameters that are fixed during the simulation. The components have connection points ( Connectors ) that define the physical quantities of the block that can be accessed externally. They come in (basically) two classes: potential variables are identical at connection points and flow variables add up to zero. These relations are added to the predefined equations of each block to make up the equations of motion for the model (Fritzson (24)). In the Modelica MultiBody library a connector describes a local coordinate system (frame) relative to a globally given inertial system world. For this purpose it defines as potential variables the vector r that connects the origins of world and frame and the orthogonal matrix R that rotates world into frame, both defined in world. Corresponding flow variables are the cut force F and the torque M at the connection, both given in frame. In the following we will count R simply as three independent variables. Internally it is given by its nine matrix elements together with six constraints given by its orthogonality (Otter (23)). Figure 1: MultiBody components For the two example models we need six different components (cf. Fig. 1) and their equations, which are given directly by the functionality of a block and basic mechanical relations: a) World supplies the global world frame and the gravity acceleration g 2

3 = =1 b) FixedTranslation contains two frames with a relative displacement d r 2 = + ' d F 2 = = M 2 = M 1 +d x c) Body describes a rigid body of mass m and moment of inertia J. Additionally it contains the internal variables v for the velocity and ω for the angular velocity. v=ṙ 1 = m( v g) ω= Ṙ 1 ' M 1 =J ω+ω (J ω) d) Revolute is a joint that allows a rotation around a fixed axis n. Additional variables are the rotation angle φ and the relative rotation matrix between its two frames. =n n'+(1 n n')cosϕ n sinϕ F 2 r 2 = M 2 M 1 =M 2 n e) Prismatic permits a linear displacement of its two frames along a fixed direction n. The internal variable s describes the amount of the displacement. An extra input can be used to bring in an external force f along the axis. r 2 = +s ' n F 2 = = M 2 = M 1 +sn x f = F 2 n f) Torque relays an externally given torque M ext into the system. Example: robot arm = F 2 = M 1 =M ext M 2 = ( ' ) M ext The first example is a simple model of a robot arm that is driven by an external torque, supplied e.g. by a servo motor. A corresponding Modelica model can be easily assembled using the components described above (cf. Fig. 2). The parameters of the model are fixed as ( ) g= g, n= ( 1), d= ( d ), M= ( z) ( J, J= x J z M J z) 3

4 Figure 2: Model robot arm Collecting all component and connection equations one gets the following rather huge system: = (1) =1 (2) F 3 = (3) F 6 = (4) M 3 =M (5) M 6 = R 6 R 3 ' M (6) =n n' n sinϕ +(1 n n')cosϕ (7) r 2 =r 4 (8) R 4 (9) F 4 F 2 (1) M 4 M 2 (11) =M 4 n (12) r 7 =r 5 +R 5 ' d (13) R 7 =R 5 (14) F 7 = F 5 (15) M 7 = M 5 +d F 5 (16) v=ṙ 8 (17) ω=r 8 Ṙ 8 ' (18) F 8 =R 8 m( v g) (19) M 8 =J ω+ω J ω (2) =r 2 (21) =r 3 (22) = (23) =R 3 (24) +F 2 +F 3 = (25) M 1 +M 2 +M 3 = (26) r 4 =r 5 (27) r 4 =r 6 (28) R 4 =R 5 (29) R 4 =R 6 (3) F 4 +F 5 +F 6 = (31) M 4 +M 5 +M 6 = (32) r 7 =r 8 (33) R 7 =R 8 (34) F 7 = F 8 (35) M 7 = M 8 (36) The total number of (scalar) equations is 35x3 + 1 = 16, the number of variables is 8x4x3 + 3x3 + 1 = 16. One starts by eliminating as many variables as possible using the trivial equations and gets 4

5 = (1) r 2 = (21) r 3 = (22) r 4 = (8) r 5 = (27) r 6 = (28) =1 (2) =1 (23) R 3 =1 (24) R 4 (9) R 5 (29) R 6 (3) R 7 (14) R 8 (34) r 7 ' d (13) r 8 ' d (33) v=ṙ rel ' d (17) F 8 =m ( ' d g) (19) F 7 = m ( ' d g) (35) F 6 = (4) F 5 =m ( ' d g) (15) F 4 = m ( ' d g) (31) F 3 = (3) F 2 =m ( ' d g) (1) = m( ' d g) (25) M 3 =M (5) M 6 M (6) For further simplification one chooses e. g. M 8 and M 5 as basic and eliminates all other torques: M 7 = M 8 (36) M 4 = M 5 + M (32) M 2 ' M 5 M (11) M 1 ' M 5 (26) This leaves the variables, φ, ω, M 5 and M 8 together with the equations =n n'+(1 n n')cosϕ n sinϕ (7) ω Ṙ rel ' (18) M 8 =J ω+ω J ω (2) M 5 =M 8 +md ( ' d g) (16) =n ( M M 5 ) (12) Using the explicitly given parameter values the equations are simplified substantially and one arrives at =( cosϕ sin ϕ 1) sin ϕ cosϕ, ω= ( ϕ 1), M =J ( 8 z ϕ 1) M 5 =[(J z +m d 2 ) ϕ+m d g cosϕ] ( 1), (J z +m d 2 ) ϕ+m d g cosϕ=m z The variable φ is the angle of the joint, it is zero at horizontal position. Introducing instead the angle θ against the vertical, one finally gets the well known result (J z +m d 2 ) θ+m d g sinθ=m z 5

6 Figure 3: Model gantry crane Example: gantry crane The second example is a simple model of a gantry crane. Getting its equations of motion with a free body diagram is usually too difficult for the students, but a simple Modelica model can be obtained easily (cf. Fig 3). The parameters are given like before. Using the equations of the components and adding the relations defined by the connections, one gets 29x3 + 2 = 89 equations for 6x4x3 + 5x3 + 2 = 89 variables. After a simple, but tedious, computation along the lines of the first example, the equations can be reduced to (m+m ) s (m d sinϕ) ϕ= f +m d ϕ 2 cosϕ ( sin ϕ) s+d ϕ= g cosϕ By introducing the angle θ to the normal direction and isolating the second derivatives, one easily brings these equations into the standard form: s= f +(g cosθ+d θ 2 )msinθ M +msin 2 θ θ= f cosθ+m g sinθ+(g+d θ 2 cosθ)msinθ d (M +m sin 2 θ) If the students already know the Euler-Lagrange method, one can apply it here to obtain the same result in a shorter way. But this requires a deeper understanding of the physics, especially the formulation of the energies. Conclusions What is the use of such tedious computations? First of all they help to demystify the simulation software and make the black box translucent. Next they are a good exercise for the students who are often not used to cope with simple but long 6

7 calculations and can get some practice here. Furthermore they show another method to obtain the equations of motion, which is often a difficult problem. Finally they prove that linear algebra is not just another abstract mathematical theory but has very useful applications in mechanical engineering. References Fritzson, P. (24) Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. Wiley & Son. Otter, K., Elmqvist, H. and Mattsson, S. E. (23) The New Modelica MultiBody Library. In Proc. 3rd International Modelica Conference, Linköping. Wittenburg, J. (28) Dynamics of Multibody Systems. 2nd edition, Springer. 7