Servo controller torque and force engine

Asked by Nima Goudarzi

Hi there,

I'm trying to apply variable torque and force to a facet body (imported stl) wheel rolling over a granular terrain. I have three questions:

1- Does the torqueEngine allow for the allocation and update of the mass center of the body during its rolling as it is possible for combinedKinematicsEngine and rotationEngine?

2-How to apply variable force and torque to a body in YADE?

3- Is there any available servoController for force and torque to adjust the linear and angular velocity?

Much obliged

Nima

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> 1- Does the torqueEngine allow for the allocation and update of the mass center of the body during its rolling as it is possible for combinedKinematicsEngine and rotationEngine?

No.
TorqueEngine is just equivalent to O.forces.addT(...)
[1]

> 2-How to apply variable force and torque to a body in YADE?

PyRunner + O.forces.setPermF [2] and/or O.forces.setPermT [3]

> 3- Is there any available servoController for force and torque to adjust the linear and angular velocity?

IMO no.
But according to ServoPIDController [4], it should not be difficult to implement.
Even just in python, i.e. RotationEngine + PyRunner and proper adjustment of angular velocity.

Cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/common/TorqueEngine.hpp#L23
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.setPermF
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.setPermT
[4] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/common/KinematicEngines.cpp#L175

Revision history for this message
Nima Goudarzi (nimagoudarzi58) said :
#2

Thanks Jan

Angular velocity is the controlling variable which I need to adjust with a variable torque. So is the linear velocity which is controlled by force. Therefore, velocity and angVelocity shouldn't be input but are used for servo- increase and/or decrease of force and torque.
Another question, is ServoPIDController an independent engine or it should be conjugated other engines or be included in the combinedKinematics Engine. I don't know many of its variables and I didn't find an example of its usage anywhere.

Cheers,

Nima

Revision history for this message
Jan Stránský (honzik) said :
#3

> Angular velocity is the controlling variable which I need to adjust with a variable torque. So is the linear velocity which is controlled by force. Therefore, velocity and angVelocity shouldn't be input but are used for servo- increase and/or decrease of force and torque.

Yes. This is exactly what ServoPIDController does (for linear velocity and force).
You just need to use the same approach for angular velocity and torque.
Either in C++ as a separate engine, or more simply in Python and PyRunner and adjusting angularVelocity according to torque.

> Another question, is ServoPIDController an independent engine or it should be conjugated other engines or be included in the combinedKinematics Engine. I don't know many of its variables and I didn't find an example of its usage anywhere.

It depends on situation.
It should be OK to combine it with "independend" kinamtic engine (RotationEngine?), where rotation is controlled and then independent linear motion is controlled by the servo controller.

But in general, I think the servo controller is essentially a force engine rather than kinematic engine, it is kinematic engine "just as implementation detail"..

> ServoPIDController ... and I didn't find an example of its usage anywhere.

[5] ?

Cheers
Jan

[5] https://gitlab.com/yade-dev/trunk/-/blob/master/examples/PIDController.py

Revision history for this message
Nima Goudarzi (nimagoudarzi58) said :
#4

Hi Jan,
Thanks for the detail. Indeed, in my problem, linear velocity and angular velocity are the target. I was able to implement the servoController for a simple sphere rolling over a polyhedra ground. The steady state reaches and my target linear velocity, angular velocity, and slip ratio are secured. No adjustments for the rotation center was required. However, the PID gain parameters need to be calibrated.

I, then, tried to repeat the same scenario for a facet wheel imported as a .stl. The facets were clumped and I assign them an initial mass and inertia. My wheel is a rover wheel with a cylindrical shape with a radius of 0.15m rolling about y-direction (plane outward) and a width of 0.1m. I have issues for the moment of inertia of the clumped wheel.

During the settlement of the wheel on the terrain under the gravity, the wheel twists about x and z axes and constraining DOFs doesn't help at all. What could be the reason?

because of this, the rolling of the wheel is not conducted appropriately.

I have also calculated the moment of inertia manually and assigned it to the clumped wheel but the issue of twisting persist.

Is there an approach to accurately calculate the moment of inertia for a clump of facets regarding that facets do not have volume.

Your comments are highly appreciated.

Nima

Revision history for this message
Jan Stránský (honzik) said :
#5

> What could be the reason?

No idea without a MWE [1]

> Is there an approach to accurately calculate the moment of inertia for a clump of facets regarding that facets do not have volume.

something like sum(m_i * r_i^2), depending on your needs (blocked rotation along x and z or not, ...), see [2].
zero volume is not important, partial masses m_i and center of masses r_i matter. Should not be difficult for triangular facets.

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://en.wikipedia.org/wiki/Moment_of_inertia

Can you help with this problem?

Provide an answer of your own, or ask Nima Goudarzi for more information if necessary.

To post a message you must log in.