[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Sup, /sci/. I posted earlier about a MATLAB simulation I
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /sci/ - Science & Math

Thread replies: 13
Thread images: 1
File: Double_Pendulum_2.jpg (206 KB, 950x852) Image search: [Google]
Double_Pendulum_2.jpg
206 KB, 950x852
Sup, /sci/. I posted earlier about a MATLAB simulation I've worked on with a collegue and friend of mine.
I made a video that showcases the results of my double pendulum simulation:
https://youtu.be/ALdNphEbo4g

I have shared the code here:
http://pastebin.com/cNhLdL9Z

Let me know what you guys think.
>>
Dude what, how you have like 100 rows of one equation?
>>
Explain this
thetaDoubleDot1= l1.^(-1).*((-32).*m1+(-20).*m2+4.*m2.*cos(2.*(psi1+(-1).*psi2))+ ...
4.*m2.*cos(2.*theta1)+(-2).*m2.*cos(2.*(psi1+(-1).*psi2+theta1))+(-2).* ...
m2.*cos(2.*((-1).*psi1+psi2+theta1))+(-4).*m2.*cos(psi1+(-1).*psi2+( ...
-2).*theta1+(-2).*theta2)+4.*m2.*cos(psi1+(-1).*psi2+2.*theta1+(-2).*theta2)+ ...
6.*m2.*cos(2.*(theta1+(-1).*theta2))+m2.*cos(2.*(psi1+(-1).*psi2+theta1+( ...
-1).*theta2))+m2.*cos(2.*((-1).*psi1+psi2+theta1+(-1).*theta2))+4.*m2.*cos( ...
2.*theta2)+(-2).*m2.*cos(2.*(psi1+(-1).*psi2+theta2))+(-2).*m2.*cos(2.*( ...
(-1).*psi1+psi2+theta2))+6.*m2.*cos(2.*(theta1+theta2))+m2.*cos(2.*(psi1+( ...
-1).*psi2+theta1+theta2))+m2.*cos(2.*((-1).*psi1+psi2+theta1+theta2))+4.*m2.* ...
cos(psi1+(-1).*psi2+(-2).*theta1+2.*theta2)+(-4).*m2.*cos(psi1+(-1).* ...
psi2+2.*theta1+2.*theta2)).^(-1).*(8.*g.*(4.*m1+3.*m2).*sin(theta1)+4.* ...
l1.*((-4).*m1.*psiDot1.^2+(-2).*m2.*psiDot1.^2+m2.*thetaDot1.^2).* ...
sin(2.*theta1)+m2.*(4.*g.*sin(2.*psi1+(-2).*psi2+(-1).*theta1)+(-4).*g.* ...
sin(2.*psi1+(-2).*psi2+theta1)+(-2).*l1.*thetaDot1.^2.*sin(2.*(psi1+( ...
-1).*psi2+theta1))+(-2).*l1.*thetaDot1.^2.*sin(2.*((-1).*psi1+psi2+theta1) ...
)+(-2).*l2.*psiDot2.^2.*sin(psi1+(-1).*psi2+(-1).*theta1+(-3).*theta2)+ ...
>>
>>7713421
Sup Martin.
It's Charlie.
>>
What's up with the equation?
>>
>>7713439
Yeah, I know it looks silly, but there is simply a lot of substituion going on inside of there after solving the sytems found here: https://drive.google.com/open?id=0B7z6xV6jQbD4SEl0QU10UlE2akk

Basically, my partner used Mathematica to get an explict solution in terms of only known variables.
Technically, there are neater ways of putting it (though they kept breaking down for some reason). The forces can be wrtten as such:
F2 = m2*l2*omega2^2 + m2*g*cos(theta2)
F1 = m1*l1*omega1^2 + m1*g*cos(theta1) + F2*cos(theta2-theta1)*cos(psi2-psi1)

However, we got this shit to work. So, whatever.

>>7713447
Shouldn't you be studying "Honors" Real Anal?
>>
>>7713451
Already took the test m8.
Just physics left.
What was this simulation for?
>>
>>7713454
Dynamics final project.
When are you home and when are we playing vidya all day? I'll be back Thursday.
>>
>>7713451
It seemed like computer calculation, which is still an approximation.
You could just have used approximations in multivariate differential equations.
>>
>>7713458
I'll be home Saturday.
I'm gonna be pretty busy over break trying to brush up on some math that I'll need to know before I take Quantum 1.

Also, isn't there a way to represent the solution to this in terms of the jacobi amplitude function? I could believe there isn't since the equations are inhomogenous.
>>
>>7713461
>>7713464

The idea in the project was to use the Newton-Raphson method to do numerical analysis. Honestly, at the engineering level the approximation is so close to the actual solution with so little computational expense, that literally nobody gives a shit.

Most of my work now and in the future relies on numerical methods approaches to multivariable problems. I find the theory behind such approaches to be more interesting too. So, there is little to no incentive for me to even care about a closed form solution.
>>
>>7713468
Okay.

Still, I'd think that the solutions to the double pendulum for large angles are so chaotic that floating point errors would be a real problem.
Does your method account for that/does it matter?
>>
>>7713476
I see your point, and there do seem to be some issues with our model for certain inital condions. In a future iteration, the best method would be to use Quarternions to handle our singularities problem. We do have some primitive singularity handling coded in tho nudge the model back into place. Honestly, it probably wouln't even be too hard to develop a Quarternion solution, but we were more focused on finishing the project.
Thread replies: 13
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.