Sims Multi Body Tutorial
Sims Multi Body Tutorial
Slide 1
Multibody Systems in Modelica >30.10.2007
Contents
slide 3
Multibody Systems in Modelica > 30.10.2007
Modelica, very briefly (see Tutorial by Peter Fritzon for more)
General goal:
modelling and simulation of complex physical systems,
consisting of components from different engineering domains
Focus:
System Dynamics: global behavior of complex systems
differential, algebraic, discrete equations
(low-order PDE only if at all, i.e. no FEM or CFD)
Platform for collaboration between engineering disciplines
all-in-one approach (contrary to e.g. co-simulation)
specialists contribute libraries (open/commercial) for general use
supplier provides executable specification of components for OEMs
AirConditioning
Modelica.Electrical.Analog
Modelica.Hydraulics
PneuLib
slide 4
Multibody Systems in Modelica > 30.10.2007
Modelica, very briefly (see Tutorial by Peter Fritzon for more)
Object orientation for complex model structuring
component-connections, hierarchies, inheritance
Component/device
Connection Connector
slide 5
Multibody Systems in Modelica > 30.10.2007
Modelica, very briefly (see Tutorial by Peter Fritzon for more)
Deklarative, acausal modelling
equations no assignments
mathematical description no algorithms
port
slide 6
Multibody Systems in Modelica > 30.10.2007
Modelica, very briefly (see Tutorial by Peter Fritzon for more)
Deklarative, acausal modelling
equations no assignments
mathematical description no algorithms
sine sine
mT mT twoInputs
port
Q Q
=
freq = 10 Hz
-5 K K freq = 10-5 Hz
slide 7
Multibody Systems in Modelica > 30.10.2007
Modelica, very briefly (see Tutorial by Peter Fritzon for more)
Deklarative, acausal modelling
equations no assignments
mathematical description no algorithms
strictly speaking: restricted use of algorithms
relies on symbolic maniplations
on system level
determine signal path at compile time
results in state space form and explicit ode
slide 8
Multibody Systems in Modelica > 30.10.2007
Modelica and Simulation Environments
Modelica simulation
environment
Graphical editor (Dymola, MathModelica,
for Modelica models SimulationX, Mosilab, ....)
slide 9
Multibody Systems in Modelica > 30.10.2007
Contents
Introduction
Modelica, very briefly
Modelica Multibody Basics
Exercise 1: Control of an inverse pendulum
Modelica Multibody Advanced
Exercise 2: Hexapod
FlexibleBodies Library: Beams
Exercise 3: Aircraft Fin
FlexibleBodies Livbrary: General bodies based on finite element data
slide 10
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Basics: Orientation
Coordinate systems and their orientation
e2z e2y
R12 2
e2x
e1z 1 12
r
e1y
h
1 e1x
l ( )
0
a r
0 0a
cut plane
world frame
non-flow !
flow !
slide 12
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Basics: Connectors II
Connectors: how they work
slide 13
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Basics: Components I
Kinematics:
Component equations provide relations between connector variables on
position level
MultiBody.Parts.FixedTranslation
i.e. fixed translation of frame_b with respect to frame_a
Tool (e.g. Dymola) differentiates these equations twice for dynamics
fixedTranslation
a b
r={.1,3,1.5}
slide 14
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Basics: Components II
Dynamics body
Newton-Euler equations
MultiBody.Parts.Body
r_CM
frame_a
center of mass
state selection
slide 15
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Basics: Elementary Components I
Modelica.Mechanics.MultiBody.World
defines inertial frame, gravity, animation defaults
y
world
Modelica.Mechanics.MultiBody.Forces
different resolution properties
interface to Real input functions and 1D mechanics
several spring/damper configurations
lineForceWithMass c,d=c,0
world resolve a b a
b
a b
torque
worldForceAndTorque
springDamperParallel
slide 16
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Basics: Elementary Components II
Modelica.Mechanics.MultiBody.Joints
define specific degree of freedom
capability to set-up initial configuration
interface to/for 1D mechanics and rheonom motion
e.g.:
a b a b
a ba b
n={1,0,0}
n={0,0,1} universal spherical
actuatedPrismatic actuatedRevolute
Modelica.Mechanics.MultiBody.Parts
Fixed, FixedTranslation and FixedRotation
fixed fixedRotation
fixedTranslation
a b a
r={0,0,0} b
r={0,0,0}
r={0,0,0}
slide 17
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Basics: Elementary Components III
Modelica.Mechanics.MultiBody.Parts
Rigid bodies with predefined geometric shapes
body
bodyBox bodyCylinder
a b a b
r={0.1,0,0} r={0.1,0,0}
m=1
Modelica.Mechanics.Multibody.Sensors
for control and validation purposes
cutForceAndTorque
relativeSensor
a b
a b distance
a b
resolve
resolve
Modelica.Blocks.Sources + Modelica.Blocks.Math
sine ramp gain
feedback
-
freqHz=1 duration=2 k=1
slide 18
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Basics: Analysis Methods
Model check
Experiment setup, translation and time simulation
slide 19
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Basics: Analysis Methods
Model check
Experiment setup, translation and time simulation
Eigenvalue analysis
Menu: FileLibrariesLinearSystems
slide 20
Multibody Systems in Modelica > 30.10.2007
Example 1: Control of an inverse pendulum I
Initial model
Box: 0.5 x 0.25 x 0.25 m
actuatedRevolute: 90 phi_offset, 5 phi_start
perform time simulation and eigenvalue analysis
fixedTranslation bodyCylinder
a b
a b a b
r={.25,0.125,0}
world n={0,0,1}
r={1,0,0}
y n={1,0,0}
actuatedRevolute
a b
prismatic bodyBox
x
a b
r={.5,0,0}
slide 21
Multibody Systems in Modelica > 30.10.2007
Example 1: Control of an inverse pendulum II
PD-Control of angle only
use extend to inherit initial model
use transient response and pole placement to set-up contoller
gains der1
add
1200
const1
feedback1
der()
+
5000
-
k=0
angleSensor
fixedTranslation bodyCylinder
a b
a b a b
r={.25,0.125,0}
world n={0,0,1}
r={1,0,0}
y n={1,0,0}
actuatedRevolute
a b
k=0
slide 22
Multibody Systems in Modelica > 30.10.2007
Example 1: Control of an inverse pendulum III
Improve control matrixGain
speedSensor
w
resolve
a
fixedTranslation bodyCylinder
absoluteSensor b
a
a b a b
r={.25,0.125,0}
world n={0,0,1}
r={1,0,0}
y n={1,0,0}
actuatedRevolute
a b
k=0
slide 23
Multibody Systems in Modelica > 30.10.2007
Contents
Introduction
Modelica, very briefly
Modelica Multibody Basics
Exercise 1: Control of an inverse pendulum
Modelica Multibody Advanced
Exercise 2: Hexapod
FlexibleBodies Library: Beams
Exercise 3: Aircraft Fin
FlexibleBodies Livbrary: General bodies based on finite element data
slide 24
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Advanced: State selection I
Joints AND bodies have potential states
number of joints is independent from number of bodies
an assignment of joints to bodies is not mandatory
e.g.:
bar1 c=20
a b a b
world r={0.3,0,0}
y spring1 m=0.8
c=40
a b
slide 25
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Advanced: State selection II
relative joint coordinates are used as states if possible
default: stateSelect = StateSelect.prefer
e.g. Multibody.Joints.Prismatic
frame_a
s frame_b
slide 26
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Advanced: Loops I
Standard case
no specific action by the user is required
every connector is one node in the virtual connection graph
roots of the virtual connection graph are found, e.g. world.frame_b
loops are virtually broken
node
root
potential root
nonbreakable branch (Connections.branch)
breakable branch (connect)
removed breakable branch to get tree
root root
slide 27
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Advanced: Loops I
Standard case
no specific action by the user is required
every connector is one node in the virtual connection graph
roots of the virtual connection graph are found, e.g. world.frame_b
loops are virtually broken
the related constraint equations are provided
DAE
slide 28
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Advanced: Loops I
Standard case
no specific action by the user is required
every connector is one node in the virtual connection graph
roots of the virtual connection graph are found, e.g. world.frame_b
loops are virtually broken
the related constraint equations are provided
DAE
slide 29
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Advanced: Loops II
review Translation Log
in order to streamline
simulation performance
with model adjustments
slide 30
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Advanced: Loops III
Planar loops
error message
slide 31
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Advanced: Loops IV
Use of aggregrated joint objects
to profit from analytical loop handling according to the
characteristic pair of joints method by the group of Prof. Hiller
r={0,-0.1,0}
b a
Piston
a b
gasForce
... r={0,0.2,0}
ib im ia a b
Rod2
cylPosition
a b
r={0.15,0.55,0} b a
n_a={1,0,0}
jointRRP
Mid
a b
r={0.05,0,0}
Crank3
a b
a
b r={0.1,0,0}
world Bearing
y n={1,0,0} b
Crank1 a .
a b a b
r={0.1,0,0} Crank2 Crank4
x Inertia
J=0.1
slide 32
Multibody Systems in Modelica > 30.10.2007
Modelica Multibody Advanced: Initialisation
Initialisation default:
every state is assumed to be arbitrary unless otherwise provided
Newton solver starts with guess value zero in order to find
consistent initial states unless otherwise provided
If initialisation fails
determine, i.e. fix, characteristic variables/states in order to
influence the system of equations to solve
provide good guesses for initial states
be aware of singular positions, e.g. piston at bottom dead center
keep system of equations consistent
slide 33
Multibody Systems in Modelica > 30.10.2007
Exercise 2: Hexapod I
The modelling concept
a .. staticScenario
b
t
eri
inh
c
Hexapod
C Platform Basis
Leg
A B
slide 34
Multibody Systems in Modelica > 30.10.2007
Exercise 2: Hexapod II
Model Leg
Diagram layer u
force
frame_a a b frame _b
lineForceWithMass
Icon layer
name
slide 35
Multibody Systems in Modelica > 30.10.2007
Exercise 2: Hexapod III
Model Platform
b a
b a
a b
r={deltaX,deltaY,0} r={deltaX,-deltaY,0}
corner_b corner_a
platform
a b
r={0,0,.1}
center
c
b a
r={-radiusPlatform,0,0}
corner_c
slide 36
Multibody Systems in Modelica > 30.10.2007
Exercise 2: Hexapod IV
Model Basis
Cb Ca
leg_Ca
leg_Cb
r={-radiusBasis,0,0}
fixed
b a
corner_C
r={0,0,0}
corner_B
b a
r={deltaX,deltaY,0}
leg_Ab leg_Ba
Ab Ba
corner_A
a b
r={deltaX,-deltaY,0}
leg_Ac leg_Bc
Ac Bc
slide 37
Multibody Systems in Modelica > 30.10.2007
Exercise 2: Hexapod V
Hexapod_StaticScenario
actuator force in
initial position ?
b a
y
world Platform
center
const[6]
const twoInputs resolve
a
=
k=0
velocity_sensor
Modelica.Blocks.Math.TwoInputs
slide 38
Multibody Systems in Modelica > 30.10.2007
Contents
Introduction
Modelica, very briefly
Modelica Multibody Basics
Exercise 1: Control of an inverse pendulum
Modelica Multibody Advanced
Exercise 2: Hexapod
FlexibleBodies Library: Beams
Exercise 3: Aircraft Fin
FlexibleBodies Livbrary: General bodies based on finite element data
slide 39
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: Beams versus ModalBody
Common Issues
Floating frame of reference
Equations of motion
SID-data-structure
Standard-Input-Data: Wallrapp 94
Disjunctive Issues
Analytical beam description FEM-based body description
Modelica generated SID External generated SID
Animation uses beam description Animation based on external data
slide 40
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: Equations of motion
rR (R)
Floating frame of reference
(I) c
Modal approach u
Equations of motion
slide 43
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: Beam menu set-up II
slide 44
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: Boundary Conditions I
Mechanical interpretation
rR (R)
(I) c
r
u
slide 45
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: Boundary Conditions II
supported-supported: chord frame
slide 46
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: A classic pitfall I
static deflection: thrust force shortens beam and equivalent spring
beam
fixedTransl... worldForce beam.frame_b.r_0[1] actuatedPrismatic.frame_b.r_0[1]
a b 1.02
world relativeSen...
y 0.96
a b ]
m
[
spring 0.94
resol... duration=1000
0.92
const
x 0.90
0.88
0 200 400 600 800 1000
fixedTransl... worldForce1
a b
a b k=0 1 eigenmode
r={0,-.1,0} w orld
n={1,0,0}
actuatedPris...
beam.frame_b.r_0[1] actuatedPrismatic.frame_b.r_0[1]
1.02
0.96
]
5 eigenmodes -10 cm -9.6 cm 4% m
[
0.94
0.90
15 eigenmodes -10 cm -9.9 cm 1% 0.88
0 200 400 600 800 1000
slide 47
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: A classic pitfall II
Mechanical background
static deflections rely on elastic properties only
eigenmodes consider elastic and interia properties
thats why they are well suited for dynamic problems
Geometrical background
analytically:
expansion with eigenmodes:
It is proven that Raleigh-Ritz approach converges against true value
but how fast ?
this is an extreme example, e.g. bending is less sensitive
Check whether a higher number of modes changes results !
slide 48
Multibody Systems in Modelica > 30.10.2007
Example 3: AircraftFin
fin
mounted in a frame with 15 inclination
profil: squarepipe 0.4 x 0.05 x 0.01 m
2 m long
2730 kg/m3, 7 1010 N/m2 (aluminium)
1 xz-bending and 1 torsion mode
5 mid-nodes = {0.2, 0.4, 0.5, 0.6, 0.8}
actuator to turn the fin
(force as cos-function of t, 1 Hz, 10 N amplitude)
4 constant forces, 10 N in world-x-direction,
to represent flow forces
slide 49
Multibody Systems in Modelica > 30.10.2007
Example 3: AircraftFin
rot1 {1,0,0}
tran1 tran2 tran3
fin
world rot2 aFlow 4 Flow 4
y tran4 tran5 {1,0,0}
{0,-.2,0} const
world
{a,0,0} {.05,0,0}revolute
x universal aFlow 3 Flow 3
{0,-.2,0} k=10
world
expSine
aFlow 2 Flow 2 const1
force
{0,-.2,0} world
f
aFlow 1 Flow 1
freqHz =0.25 k=0
{0,-.2,0} world
rot3
tran6 tran7
{0,0,0} {c,0,0} {0,.2,.03}
lineForce
slide 50
Multibody Systems in Modelica > 30.10.2007
Contents
Introduction
Modelica, very briefly
Modelica Multibody Basics
Exercise 1: Control of an inverse pendulum
Modelica Multibody Advanced
Exercise 2: Hexapod
FlexibleBodies Library: Beams
Exercise 3: Aircraft Fin
FlexibleBodies Library: General bodies based on finite element data
slide 51
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: FEM-preprocessing
Simpack-FEMBS: FEM to multibody system preprocessor
Maintained and distributed by INTEC GmbH, Oberpfaffenhofen
slide 52
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: ModalBody menu set-up I
modalBody
slide 53
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: ModalBody menu set-up II
modalBody
slide 54
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: ModalBody menu set-up II
modalBody
slide 55
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: Animation
Advantage of the modal approach:
only few geometrical information is needed efficiency !
Disadvantage of the modal approach:
only few geometrical information is needed animation ?
Simulation points versus animation points
new animation feature in Dymola for wavefront data*
*www.fileformat.info/format/wavefrontobj/egff.htm
slide 56
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: 4 Cylinder Engine
FEM
Crankshaft 85 342 nodes
Piston rod 12531 nodes
Multibody representation
< 1900 Hz
Crankshaft
2 torsion eigenmodes
273 simulation nodes
Piston rod
4 eigenmodes each
120 simulation nodes
Time integration with gas force, 38 states, 6 cpu-s per s
slide 57
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: 4 Cylinder Engine II
slide 58
Multibody Systems in Modelica > 30.10.2007
FlexibleBodies Library: Quo vadis?
ModalBody is an issue of ongoing discussion
relies on an appopriate FE-preprocessor
a 3rd third party product
in principle agreements were made, but no contracts are yet
signed
the 1st implementation uses additional c-code
there is no distribution process to support the application on
real-time platforms today
the 2nd implemenation is pure Modelica code
might be good enough for moderate large models ?
release by the end of this year ?
an additional license key called ExtFlexibleBodies
graphical nodes-picking requires improvements
Besides beams: implementation of other generic structures on demand
brake discs: annular Kirchhoff plate
framework structures
slide 59
Multibody Systems in Modelica > 30.10.2007
Thank you very much for your attention
slide 60
Multibody Systems in Modelica > 30.10.2007