moorepants / learn-multibody-dynamics

Interactive computational book on multibody dynamics
https://moorepants.github.io/learn-multibody-dynamics/
Other
120 stars 28 forks source link

Nonholonomic Constraints #43

Closed Peter230655 closed 2 years ago

Peter230655 commented 2 years ago

1. Right above eq(77) you state: _If fn of .......a holonomic constraint then... Maybe adding f_h after constraint would make eq(77) easier to read?

2. 2.1. Right below eq(77) you give a condition of integrability. Just curiosity: is it only necessary, enough for the purpose on hand, or also sufficient?

2.2. What would happen, if one mistook a holonomic constraint for a non holonomic one?

2.3. Is my guess correct, that on practical terms one knows what the constraints are when one sets up the system?

3. Right below the heading Choosing Generalized Speeds you write:

There are many possible choices for generalized speed and you are free to select them as you please, as long as they fit the form of equation (80) and 𝐘𝑘 Y k is invertible. I think, this should be eq(78), not eq(80)

4.

Recall from sec-solving-linear-systems that the Jacobian is a simple way to extract the coefficients of linear terms into a coefficient matrix. In this case, we see that this results in the identity matrix. As I understand it, you are solving eq(78) for different assignments of the generalized speeds u_i ? You refer to sec-solving-linear-systems, where I guess the use of the jacobian was explained? (It took me a while to understand it, and I feel, maybe mistakenly!, that my math knowledge is quite o.k.)

5.

Now replace all of the time derivatives of the generalized coordinates with the generalized speeds. We use subs() here because the replacement isn’t an exact replacement

What is an exact / inexact replacement?

6.

In general, the nonholonomic constraints are always linear in the generalized speeds. Is it obvious, that the nonholonomic constraints are always linear in the generalized speeds, and I just do not see it, or is this some deep theorem?

7. Instinctively, one would say, that the Chaplighn Sleigh has only one degree of freedom (moving back an forth). On second thought I realized, that theta is free until one sets down the sleigh. What I wanted to say: It seems to take experience to 'see' the degrees of freedom.

moorepants commented 2 years ago

Right above eq(77) you state: If f_n of .......a holonomic constraint then... Maybe adding f_h after constraint would make eq(77) easier to read?

Fixed.

Right below eq(77) you give a condition of integrability. Just curiosity: is it only necessary, enough for the purpose on hand, or also sufficient?

Not sure, actually. I was trying to find a clear explanation of it when I wrote this, but the wikipedia article is a bit weak.

There is this https://wikimili.com/en/Integrability_conditions_for_differential_systems which is a bit too deep math for this class.

What would happen, if one mistook a holonomic constraint for a non holonomic one?

I'd have to check, but if you form the equations of motion as differential algebraic equations with only the derivative of a holonomic constraint as an algebraic equation, then when integrating there is no way to enforce that the holonomic constraint stays satisfied. It's derivative will stay satisfied (to the set tolerance) but the bodies would likely drift apart during integration.

Is my guess correct, that on practical terms one knows what the constraints are when one sets up the system?

Yes, because you are making modelling choices that impose the constraint, simply by drawing and describing the system.

I think, this should be eq(78), not eq(80)

Fixed.

As I understand it, you are solving eq(78) for different assignments of the generalized speeds u_i ?

Yes.

You refer to sec-solving-linear-systems, where I guess the use of the jacobian was explained? (It took me a while to understand it, and I feel, maybe mistakenly!, that my math knowledge is quite o.k.)

Yes, they had to do this in a homework assignment and it was explained in that section. I guess it is confusing showing it for the u=q' because it really isn't needed. Maybe I should show the more complex u definitions first.

What is an exact / inexact replacement?

It has to do with the way sympy expressions are stored; in a tree. xreplace() only matches an exact node in the tree, whereas subs() tries to find mathematical matches (the node can be organized differently but represents the same math expression).

Is it obvious, that the nonholonomic constraints are always linear in the generalized speeds, and I just do not see it, or is this some deep theorem?

When you time differentiate positions that are functions of generalized coordinates you will get expressions that are linear in the qdots (chain rule). All nonholomonic constraints will be derived from the measure numbers of velocities which are linear in the speeds. I improved the wording for this.

What I wanted to say: It seems to take experience to 'see' the degrees of freedom.

Yes, motion constraints are especially hard to "see" (sometimes seemingly impossible).

Peter230655 commented 2 years ago

On Thu 10. Mar 2022 at 18:32 Jason K. Moore @.***> wrote:

Right above eq(77) you state: If f_n of .......a holonomic constraint then... Maybe adding f_h after constraint would make eq(77) easier to read?

Fixed.

Right below eq(77) you give a condition of integrability. Just curiosity: is it only necessary, enough for the purpose on hand, or also sufficient?

Not sure, actually. I was trying to find a clear explanation of it when I wrote this, but the wikipedia article is a bit weak.

There is this https://wikimili.com/en/Integrability_conditions_for_differential_systems which is a bit too deep math for this class.

I looked at it. Certainly MUCH too deep for me!! And I feel for an engineer my math knowledge is o.k. ( If I could turn back my life by 45 years, I would study math)

What would happen, if one mistook a holonomic constraint for a non holonomic one?

I'd have to check, but if you form the equations of motion as differential algebraic equations with only the derivative of a holonomic constraint as an algebraic equation, then when integrating there is no way to enforce that the holonomic constraint stays satisfied. It's derivative will stay satisfied (to the set tolerance) but the bodies would likely drift apart during integration.

I think, I understand: in a way like the ‚opposite‘ of what we discussed some time back: if the holonomic constraint becomes impossible to solve analytically, I replace it with a nonholonomic one and hope it does not drift too much. (In my useless programs, it mostly drifted very little.)

Is my guess correct, that on practical terms one knows what the constraints are when one sets up the system?

Yes, because you are making modelling choices that impose the constraint, simply by drawing and describing the system.

I think, this should be eq(78), not eq(80)

Fixed.

As I understand it, you are solving eq(78) for different assignments of the generalized speeds u_i ?

Yes.

You refer to sec-solving-linear-systems, where I guess the use of the jacobian was explained? (It took me a while to understand it, and I feel, maybe mistakenly!, that my math knowledge is quite o.k.)

Yes, they had to do this in a homework assignment and it was explained in that section. I guess it is confusing showing it for the u=q' because it really isn't needed. Maybe I should show the more complex u definitions first.

What is an exact / inexact replacement?

It has to do with the way sympy expressions are stored; in a tree. xreplace() only matches an exact node in the tree, whereas subs() tries to find mathematical matches (the node can be organized differently but represents the same math expression).

So, with subs() one is always on the ‚safe side?

Is it obvious, that the nonholonomic constraints are always linear in the generalized speeds, and I just do not see it, or is this some deep theorem?

When you time differentiate positions that are functions of generalized coordinates you will get expressions that are linear in the qdots (chain rule). All nonholomonic constraints will be derived from the measure numbers of velocities which are linear in the speeds. I improved the wording for this.

Clear! So it is obvious, but I did not see it.

What I wanted to say: It seems to take experience to 'see' the degrees of freedom.

Yes, motion constraints are especially hard to "see" (sometimes seemingly impossible).

— Reply to this email directly, view it on GitHub https://github.com/moorepants/learn-multibody-dynamics/issues/43#issuecomment-1064318846, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT5MQUVD2GSBOP2EU4HICCTU7IW2PANCNFSM5QMNLKJA . You are receiving this because you authored the thread.Message ID: @.***>

-- Best regards,

Peter Stahlecker

moorepants commented 2 years ago

So, with subs() one is always on the ‚safe side?

Yes, but for long expressions subs is slower.

moorepants commented 2 years ago

I think I addressed all these comments, so closing this issue.

Peter230655 commented 2 years ago

https://de.m.wikipedia.org/wiki/Totales_Differential At least locally the necessary condition you gave for a nonhomonomic constraint to be the differential of a holonomic constraint is also sufficient, or so I understood the article. I could not find the article in English.

On Thu 10. Mar 2022 at 20:35, Jason K. Moore @.***> wrote:

Closed #43 https://github.com/moorepants/learn-multibody-dynamics/issues/43.

— Reply to this email directly, view it on GitHub https://github.com/moorepants/learn-multibody-dynamics/issues/43#event-6220260011, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT5MQUV3P4PDM43XX3DSBRTU7JFHHANCNFSM5QMNLKJA . You are receiving this because you authored the thread.Message ID: <moorepants/learn-multibody-dynamics/issue/43/issue_event/6220260011@ github.com>

-- Best regards,

Peter Stahlecker