-
Notifications
You must be signed in to change notification settings - Fork 2
/
mechanics.html
356 lines (321 loc) · 12.3 KB
/
mechanics.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=1024, user-scalable=no">
<title>Dynamics with SymPy Mechanics</title>
<!-- Required stylesheet -->
<link rel="stylesheet" href="deck.js/core/deck.core.css">
<!-- Extension CSS files go here. Remove or add as needed. -->
<link rel="stylesheet" href="deck.js/extensions/goto/deck.goto.css">
<link rel="stylesheet" href="deck.js/extensions/menu/deck.menu.css">
<link rel="stylesheet" href="deck.js/extensions/navigation/deck.navigation.css">
<link rel="stylesheet" href="deck.js/extensions/status/deck.status.css">
<link rel="stylesheet" href="deck.js/extensions/hash/deck.hash.css">
<link rel="stylesheet" href="deck.js/extensions/scale/deck.scale.css">
<!-- Style theme. More available in /themes/style/ or create your own. -->
<link rel="stylesheet" href="deck.js/themes/style/swiss.css">
<!-- Transition theme. More available in /themes/transition/ or create your own. -->
<link rel="stylesheet" href="deck.js/themes/transition/horizontal-slide.css">
<!-- Custom Styles. -->
<link rel="stylesheet" href="static/style.css">
<!-- Required Modernizr file -->
<script src="deck.js/modernizr.custom.js"></script>
<!-- TODO : Make this load the CDN if the local isn't found. -->
<!-- MathJax -->
<script type="text/javascript"
src="/home/moorepants/usr/bin/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body class="deck-container">
<!-- Begin slides. Just make elements with a class of slide. -->
<section class="slide">
<h2>Rigid Body Dynamics with SymPy Mechanics</h2>
<table class="side-by-side">
<tr>
<td>
<h3>Jason K. Moore</h3>
<p>University of California, Davis</p>
<p><a href="http://moorepants.info">moorepants.info</a></p>
</td>
<td>
<img src="static/n-pendulum-with-cart.svg" />
</td>
</tr>
</table>
<!--
Hi, I'm Jason Moore recently from UC Davis, soon to be at Cleveland State
University. I'm trained as a mechanical engineer and particularly a
dynamicist and controls engineer. I'm going to talk about a project we've
been working on that allows us to accurately derive the equations of motion
of complex multi body systems with Python.
-->
</section>
<section class="slide">
<h2>Rigid Body Dynamics</h2>
<p>The study of the movement of systems of interconnected rigid bodies under
the action of external forces.</p>
<h3>Newton/Euler Equations</h3>
<p>$$\sum F=\frac{dp}{dt} \textrm{ and } \sum T=\frac{dH}{dt}$$</p>
<!--
So to start off let's remind ourselves what rigid body or multi-body
dynamics are. It is the study of the movement of systems of interconnected
rigid bodies under the action of external forces. We all learned basic
rigid body dynamcis in our intro physics courses and you may remember that
these two equations (the Newton-Euler equations) govern the motion of
objects in our macro world. The first says that the sum of all forces
acting on a body is equal to the change in linear momentum and the second
is that the sum of the torques acting on the body is equal to the change in
angular momentum. These equations generally represent high order nonlinear
ordinary differential equations for systems of rigid bodies moving in three
dimensional space. These may seem trivial but for more than one body with
potential kinematic and motion constraints these equations quickly grow in
complexity. For example, I worked with a 4 body 3 DoF problem for most of
my graduate work and the equations would just barely fit on 30 pages at 11
pt font.
-->
</section>
<section class="slide">
<h2>What's it good for?</h2>
<ul>
<li>robotics</li>
<li>biomechanics</li>
<li>vehicle dynamics</li>
<li>spacecraft dynamics</li>
<li>sports biomechanics</li>
<li>planetary motion</li>
<li>physics/engineering education</li>
<li>figuring out how a cat always lands on its feet</li>
</ul>
<!--
So who uses these equations? We find heavy use of rigid body dynamics in
many topics from robotics to sports biomechanics and vehicle dynamics to
planetary motion. I've work in a sport biomechanics lab for my graduate
studies and we are often concerned with the motion of humans and the
various implements or vehicles they use in sports.
-->
</section>
<section class="slide">
<h2>Physics Engines</h2>
<table class="gridtable float-right">
<tr>
<th>Closed Source</th>
<th>Open Source</th>
</tr>
<tr>
<td>Autolev/MotionGenesis</td>
<td>MBDyn</td>
</tr>
<tr>
<td>DADS</td>
<td>SimTK</td>
</tr>
<tr>
<td>VehicleSim</td>
<td><a href="http://mat21.etsii.upm.es/mbs/mbs3d">MBS3D</a></td>
</tr>
<tr>
<td>Working Model</td>
<td>Open Dynamics Engine</td>
</tr>
<tr>
<td>SDFast</td>
<td>Arboris</td>
</tr>
<tr>
<td>Spacar</td>
<td>Bullet</td>
</tr>
<tr>
<td>Adams</td>
<td></td>
</tr>
<tr>
<td>MADYMO</td>
<td></td>
</tr>
</table>
<p>Two types:</p>
<ul>
<li>real time, low fidelity</li>
<li>high fidelity, high precision</li>
</ul>
<!--
Now the question is whether there is software that can help us do rigid
body dynamics. There is a fair amount. Here are a few that can help us
solve rigid body dynamics. There are also two classes the ones used in
video games are low fidetly and focus on make things look real and speed on
the other hand there are one focused on accuracy and precision and getting
the "correct" equations. Most robust packages that do this are closed
source and the price tag for the good ones are on the order $20K a seat.
This ecosystem does not support reproducility in rigid body dynamics.That
30 page set of equations that I mentioned was of a model that had been
derived at least 50 different times over the past 100 or so years. A paper
in 2007 found that about 5 or so of those were actually correct. But this
paper released the source code computational derviations in custom
expensive languages that make it impossible to verify code. These kinds of
issues is pushing us to introduce an open source competitor to these other
packages.
-->
</section>
<section class="slide">
<h2>The Project</h3>
<p>Create an open source high fidelity multibody dynamics engine for
analysis, simulation, and visualization.</p>
<h3>PyDy</h3>
<p>Short for Python Dynamics, will encompass all three aspects.</p>
<h3>SymPy Mechanics</h3>
<p>The core symbolic engine for equation of motion derivation is built on top
of SymPy and is the core of PyDy.</p>
<!--
Our plan is to create an open source competitor to these other projects
that can perform with more modern tools on all platforms and allow for
reproducible modeling efforts. We are calling this effort PyDy and work
is starting this summer on some of the packages that will make this
possible. The core of this system is a package in SymPy called mechanics.
This is where all the derviations happen and code generation. I'll be
talking mostly about the Mechanics package today.
-->
</section>
<section class="slide">
<h2>Symbolic, Numeric, or both?</h2>
<h3>Why symbolic?</h3>
<ul>
<li>Ability to visually inspect equations for better understanding</li>
<li>Faster numeric code with efficiently generated symbolic equations</li>
<li>Print to paper for consumption in literature</li>
<li>Maps to hand derivations</li>
</ul>
</section>
<section class="slide">
<h2>Features</h2>
<ul>
<li>Handles 3D problems with any number of bodies</li>
<li>Easy definition and management of kinematics (the tricky part)</li>
<li>Handles complex constraints (holonomic/non-holonomic) with ease</li>
<li>Automated equation of motion generation with Kane's or Lagrange's
methods</li>
<li>Symbolic linearization of systems</li>
</ul>
</section>
<section class="slide">
<h2>Software Design</h2>
<ul>
<li><strong>essential.py</strong>: vectors, reference frames, dyadic,
dynamic symbols</li>
<li><strong>functions.py</strong>: convenience functions like angular momentum, energy</li>
<li><strong>point.py</strong>: tracks location, velocity, and acceleration of a point</li>
<li><strong>particle.py</strong>: manages a mass and point</li>
<li><strong>rigidbody.py</strong>: manages a mass, point, and reference
frame</li>
<li><strong>kane.py</strong>: automates EoM generation with Kane's method</li>
<li><strong>lagrange.py</strong>: automates EoM generation with Lagrangian
mechanics</li>
</section>
<section class="slide">
<h2>Demos</h2>
<h3>Basic Functionality and Vector Calculus</h3>
<a href="http://tinyurl.com/pydy-beginner">tinyurl.com/pydy-beginner</a>
<br>
<br>
<h3>1 DoF mass, spring, damper</h3>
<a href="http://tinyurl.com/pydy-msd">tinyurl.com/pydy-msd</a>
<br>
<br>
<h3>Multi-DoF inverted pendulum</h3>
<a href="http://tinyurl.com/pydy-npend">tinyurl.com/pydy-npend</a>
</section>
<section class="slide">
<h2>Can it work?</h2>
<iframe width="640" height="360" src="http://www.youtube.com/embed/cyN-CRNrb3E"
frameborder="0" allowfullscreen></iframe>
<!-- http://youtu.be/cyN-CRNrb3E -->
</section>
<section class="slide">
<h2>Future</h2>
<ul>
<li>Efficient code generation for simulation</li>
<li>Browser based 3D visualizations</li>
<li>Interactive model builder</li>
<li>Modelica model generation</li>
<li>Electromagnetics</li>
<li>Flexible bodies</li>
</ul>
</section>
<section class="slide">
<h2>Hackers</h2>
<ul>
<li>Dale Luke Peterson</li>
<li>Gilbert Gede</li>
<li>Angadh Nanjangud</li>
<li>Oliver Lee</li>
<li>Christopher Dembia</li>
<li>Tarun Gaba</li>
<li>Sachin Joglekar</li>
<li>SymPy Team</li>
</ul>
<p>Also thanks to Google and the Summer of Code</p>
</section>
<section class="slide">
<h2>That's all folks!</h2>
<table class="side-by-side">
<tr>
<td>
<ul>
<li><strong>SymPy</strong>: <a
href="http://sympy.org">sympy.org</a></li>
<li><strong>PyDy</strong>: <a
href="https://pydy.org">pydy.org</a></li>
<li><strong>Working paper</strong>: <a
href="https://github.com/PythonDynamics/idetc-2013-paper">github.com/PythonDynamics/idetc-2013-paper</a></li>
<li><strong>Presentation Source</strong>: <a
href="https://github.com/PythonDynamics/scipy-2013-mechanics">github.com/PythonDynamics/scipy-2013-mechanics</a></li>
</ul>
</td>
<td>
<img src="static/bye.png" />
</td>
</tr>
</table>
</section>
<!-- End slides. -->
<!-- Begin extension snippets. Add or remove as needed. -->
<!-- deck.navigation snippet -->
<a href="#" class="deck-prev-link" title="Previous">←</a>
<a href="#" class="deck-next-link" title="Next">→</a>
<!-- deck.status snippet -->
<p class="deck-status">
<span class="deck-status-current"></span>
/
<span class="deck-status-total"></span>
</p>
<!-- deck.goto snippet -->
<form action="." method="get" class="goto-form">
<label for="goto-slide">Go to slide:</label>
<input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
<datalist id="goto-datalist"></datalist>
<input type="submit" value="Go">
</form>
<!-- deck.hash snippet -->
<a href="." title="Permalink to this slide" class="deck-permalink">#</a>
<!-- End extension snippets. -->
<!-- Required JS files. -->
<script src="deck.js/jquery-1.7.2.min.js"></script>
<script src="deck.js/core/deck.core.js"></script>
<!-- Extension JS files. Add or remove as needed. -->
<script src="deck.js/core/deck.core.js"></script>
<script src="deck.js/extensions/hash/deck.hash.js"></script>
<script src="deck.js/extensions/menu/deck.menu.js"></script>
<script src="deck.js/extensions/goto/deck.goto.js"></script>
<script src="deck.js/extensions/status/deck.status.js"></script>
<script src="deck.js/extensions/navigation/deck.navigation.js"></script>
<script src="deck.js/extensions/scale/deck.scale.js"></script>
<!-- Initialize the deck. You can put this in an external file if desired. -->
<script>
$(function() {
$.deck('.slide');
});
</script>
</body>
</html>