JohnDTill / ContinuumRobotExamples

An incremental guide to continuum robot mathematical modeling and numerical implementation. The examples are divided into chapters within the folder structure, and each chapter contains a PDF and code examples.
MIT License
148 stars 47 forks source link

External force on an arbitry point. #2

Closed jiefengsun closed 5 years ago

jiefengsun commented 5 years ago

Hi John,

All your simulated cases are with force at the tip. I want o know how you deal with the force that is not at the tip. For example, there is a force Fe = [0 1,2] at s = L/2, which is at the middle of the robot.

I guess, if there is only one force, probably just need to change the boundary condition. If there are multiple forces at different location of the robot, it will be more complicated. image

Thank you!

JohnDTill commented 5 years ago

Hello Jiefeng,

An extra point force at the middle of the robot results in a step change to the internal loading 'n', which can be accommodated by piecewise integration. For instance, the MATLAB rod IVP example can be changed to include a midpoint force by the following:

step_change

It would be complicated with many point forces. You could do iterative piecewise integrations in a loop, or you could come up with some scheme to approximate the point forces as part of the distributed force term.

jiefengsun commented 5 years ago

Hello John,

Thank you so much for your quick response! I tried to approximate the point forces as part of the distributed force term. For the static BVP one, I used a free end as a boundary condition in the shooting method. And add a term to the distributed force 'n'. Also, I used an ODE solver with fixed steps so that it can hit the 'if'. In the code, Fe is an external force. But I am not sure it's correct or not.
image

JohnDTill commented 5 years ago

The scenario is that you have two discrete forces at s = 10 and s = 40? In that case, the above is mostly correct, except that Fe should be negated since ns = -f, and the discrete force should be divided by the whole length of the approximate uniform distributed force, i.e. ns = -rho*A*g - Fe/(11-9). Also, the "s == 9 < s" term is an easy to make typo which has given me grief in the past!

You could even add a parameter to control the width of the approximate distributed force, say 'a', so that you would have ` if s > 10-a && s < 10+a

ns = -rho*A*g - Fe/(2*a);

elseif ... `

And of course, you'll need to make sure the numerical integration step size is sufficiently smaller than the width of the approximate distributed force so that you sample several points in the region.

jiefengsun commented 5 years ago

Hi John, Thank you so much for your help! I attended the ICRA conferenced last week and one guy from your group helped me to understand more about how to apply several forces at different locations. Thank you again and have a nice day!

--Jiefeng

JohnDTill commented 5 years ago

Glad to hear it! You're welcome, and have a good day as well!

xlsufo commented 2 years ago

Hi John, Thank you so much for your help! I attended the ICRA conferenced last week and one guy from your group helped me to understand more about how to apply several forces at different locations. Thank you again and have a nice day!

--Jiefeng

Hi Jiefeng, Can you give me some advice on how to apply several forces at different locations?

jiefengsun commented 2 years ago

Hello xlsufo, Please take a look at John's response to me. You can either use a piece-wised integration or use a distributed load to simulate a force at an arbitrary point. Shortly, I will publish a paper that will include a very good example of this case and the code will be open source as well. If you have any questions please directly send me an email or comment on my GitHub repositories so that I will be able to receive direct notifications.

Best, Jiefeng