Effect of gravity on body fixed to a single joint - 1 DOF

11 views (last 30 days)
I've been creating some random structures (beams, arms, segments, whatever you prefer), which i can move relative amongst each other by using actuators mounted across the joints. All by a whole lot of trigonometry. Now I wanted to add the gravitational effect to the model, which is the source of my question.
I want to examine the displacement of the center of gravity induced by the gravitational force, when the CoG is not balanced over the joint fixed to the ground. I found a small model of a stick falling from an initial angle on Wolframalpha.com which suggested using the following 2nd order ODE:
(1/12*m*L^2+1/4*m*L^2*cos(theta)^2)theta'' - 1/4*m*L^2*cos(theta)*sin(theta)*(theta')^2 = 1/2*m*g*L*cos(theta)
This, I've tried to implement in my model, since it's the exact same case (just a more complex stick). But I cannot figure out how to get this fitted to the ode45 function!
I have initial position of the CoG and no intial angular velocity. Since its a 2nd order ode I guess it'll have to be transformed into two first order ode's, but unfortunately my skill is lacking in this whole field. I would very much appreciate any help :-) Thanks in advance!

Answers (1)

Andrew Newell
Andrew Newell on 30 May 2011
See this example of how to convert a second order ODE to a linear system. Reformulate the above equation, and then we'll do the next step.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!