1
$\begingroup$

I have a recursive Newton Euler algorithm from which I can compute the gravity vector. My question is, which is the better way to compute the potential energy? I know the following relation between gravity vector and potential energy $$\textbf{g} = \left( \frac{\partial U}{\partial q}\right)^T$$ so in theory I could integrate numerically and get the potential energy, but since it is a gradient I'm not sure how to proceed. Of course I can compute it just computing all the contribution of the potential energy of each link knowing the mass and the center of gravity but I would like to know if there is a smarter and faster way to get it.

$\endgroup$

1 Answer 1

2
$\begingroup$

You don't need to do an integral. The difference in gravitational potential between two points is independent of the path to get from one to the other. Evaluate the potential at each endpoint and subtract.

(Assuming your system is non-dissipative, non-relativistic, etc.)

$\endgroup$
2
  • $\begingroup$ yes I know, but in this case I have a recursive Newton Euler model of my robot so this means that I don't have a model in symbolical form that can be evaluated, but of course I have all the necessary information to compute the potential energy i.e. the mass of each link and the position of the center of gravity. The fact is that for some reason I don't want to compute the potential energy in this way and I would like to know if I can compute it using the gravity vector. What I have now is the following dynamical model $$M(q)\ddot{q}+C(q,\dot{q})+g(q)=\tau$$all the elements are not symbolic. $\endgroup$
    – DarioZ
    Commented Feb 3, 2022 at 8:10
  • 1
    $\begingroup$ You say you "have all the necessary information to compute the potential energy" and that you "would like to know if there is a smarter and faster way to get it." I'll have to answer NO. The difference in potential energy between configuration 1 and configuration 2 is not only independent of the path taken from one to the other, but also independent of the dynamics it followed along the path. (Subject to the caveat.) If you insist, you can throw in and solve all kinds of fancy integrals and stuff, but that is neither smarter nor faster. You know it will all have to cancel out in the end. $\endgroup$
    – r-bryan
    Commented Feb 4, 2022 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.