-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpendulum.html
More file actions
131 lines (109 loc) · 4.72 KB
/
pendulum.html
File metadata and controls
131 lines (109 loc) · 4.72 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Sophia Li: Pendulum
</title>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<link rel='stylesheet' href='css/stylesheet.css' type="text/css"/>
<script src="js/jquery-1.7.2.min.js"></script>
</head>
<body>
<div class="content">
<div class="container">
<div class="navbar">
<table class="navtable">
<tr>
<td><a href="index.html">Home</a></td>
<td><a href="resume.html">Resume</a></td>
<td><a href="about.html">About</a></td>
<td><a href="contact.html">Contact</a></td>
<td><a href="http://blog.justsophie.com">Blog</a></td>
</tr>
</table>
</div>
</br>
<h1 style="margin-bottom:0;"><a href="portfolio.html">Portfolio</a>.Pendulum</h1>
<table class="navtable2">
<tr>
<td><a href="pseudos.html"><</a></td>
<td><div id="list"><font color="#5cd9fd">LIST</font></div></td>
<td><a href="poe.html">></a></td>
</tr>
</table>
<div class="proj_list">
<a href="website.html">website; </a>
<a href="edwin.html">edwin; </a>
<a href="pseudos.html">pseudOS; </a>
<a href="pendulum.html">pendulum; </a>
<a href="poe.html">desktop_companion; </a>
<a href="walle.html">wall-e; </a>
<a href="underwater.html">underwater_vision; </a>
<a href="jimmy.html">jimmy; </a>
<a href="genecar.html">genetic_car; </a>
</div>
</br>
> ./intro</br>
<img class="aligncenter" title="source: imgur.com" src="http://i.imgur.com/UMWDLNH.gif" alt="">
</br>
<a href="https://github.com/srli/fake_crayonphysics" target="_blank">download source code</a></br>
<a href="pdfs/Modeling-an-N-link-compound-pendulum-with-Matlab.pdf" target="_blank">download final report</a></br>
</br>
> ./stats</br>
Status: Completed Dec/2015</br>
Languages: Matlab, Python</br>
Software: Matlab, Tkinter</br>
Hardware: n/a</br>
Documentation: Complete -- <a href="http://blog.justsophie.com/n-link-compound-pendulum-simulation/" target="_blank">Verbose Debrief</a></br>
</br>
> ./documentation</br>
<div class="text_holder">
Pictured above is an example output of our N-case compound pendulum simulator. Below is a screen capture of the GUI used to generate that output. </br>
<img src="img/pendulum/n5_gui.png" height="250"/></br>
</br>
The GUI is written in Tkinter, where the user inputs are passed into a Python script that generates the Matlab script for the pendulum motion. We tried to write the entire simulator in Matlab, but on the fly matrix generation for the pendulums took an eternity when done in Matlab and seconds in Python. Please take a look at the verbose debrief for a more in depth explanation of how we generalized the equations of motion for ccompound pendulums.</br>
</br>
After running the output Matlab script in Matlab, the code also generates energy and position/velocity/acceleration plots. </br></br>
Energy:</br>
<img src="img/pendulum/n5_te.jpg" height="300"/></br>
</br>
This graph says that kinetic energy(KE) added to potential energy(PE) results in a mostly flat total energy(TE). This graph is proof that our code is functioning as expected, because energy is conserved in the system. There are bumps in the total energy line, but this is due to calculation errors in the ODE45 function that Matlab is running. </br>
</br>
Position/Velocity/Acceleration:</br>
<img src="img/pendulum/n5_pva.jpg" height="300"/></br>
</br>
Here we see how each additional pendulum link experiances more displacement than the ones before it, which makes sense given that the motion of the last link of the pendulum is dependant on the motion of all the other links before it. We find that acceleration in all the pendulums seem to follow a similar pattern, because all of the pendulums are linked.
</div>
</br>
</br>
<div class="text">> </div>
<div class="cursor">|</div>
</br>
</br>
</div>
<!-- <div class="footer">© Sophia Li 2016</div> -->
</div>
<script type="text/javascript">
$(".proj_list").hide();
$(document).ready(function(){
setInterval('cursorAnimate()', 800);
setInterval('$(".proj_list").hide()', 10000);
$("#list").hover(function(){
$(".proj_list").show();
},
function(){
$(this).removeClass("hover");
});
});
function cursorAnimate(){
$('.cursor').animate({
opacity: 0
}, 'medium', 'swing').animate({
opacity: 1
}, 'medium', 'swing');
}
</script>
</body>
</html>