# How to combine these equations of constraint?

I want to model a nonholonomic system of an arbitrary rotating disk in 3D, which rolls without slipping, and doesn't have to stay vertical. (think spinning a penny on the table) I want to use the method I just learned of Lagrange multipliers with the Euler-Lagrange equations to solve the system.

I can parameterize the system in terms of $(x,y,\theta,\phi,\psi)$, and I can come up with several equations of constraint if I let two (or three, with $(x,y)$ changing as a pair) variables change at a time and hold the others constant. I'm using mathematica so I can afford to have unweildy representations and painful integrals.

I wanted $(x,y)$ representing the position of the center of the disk in the horizontal plane, $\theta$ representing the angle from $(x,y)$ to the point where the disk touches the ground, $\phi$ representing the angle from the xy plane to the actual (x,y,z) center of the disk (so, if $\phi=0$ the disk is flat, and if $\phi=\pi/2$ the disk is vertical), and $\psi$ representing the angle of the disk around the axis normal to its face. I wound up on the following linear transformation, which takes a stationary point on the disk's space into world space: $T(x,y,r \sin(\phi)) R_{xy}(\theta)R_{xz}(-\phi) R_{xy}(\phi) \vec{v}$

(where $T$ is a translation, $R_{xy}$ is a rotation in the xy plane etc)

This works perfectly and I can actually come up with the kinetic energy in terms of $x,\dot{x}, y,\dot{y},\phi, \dot{\phi}$ etc.

So now where the nonholomic part comes in, I need to find the equations of constraint. The only constraint is rolling without slipping. I can find equations with partial derivatives (say, I let x and y vary as I change $\psi$ and hold all other variables constant), but these are just partial constraints and don't represent the true differentials governing the constraints. How can I find the true differentials? My sets of equations are:

1 Rotating the disk normal to its face (exactly like spinning a wheel)

$\frac{\partial x}{\partial \psi} =-r \sin (\theta ), \frac{ \partial y}{\partial\psi }=r \cos (\theta )$

2 Rotating $\theta$, the point where the disk touches the ground, without changing x, y, or $\phi$. $psi$ must change according to:

$\frac{\partial\psi}{\partial\theta} =-\cos (\phi )$

3 Changing the vertical angle of the disk, $\phi$, and having the point of contact stay the same (as well as $\theta$, $\psi$ constant), $x$ and $y$ must change according to:

$\frac{\partial x} {\partial\phi} =-r \cos (\theta ) \sin (\phi ), \frac{ \partial y} {\partial\phi} =-r \sin (\theta ) \sin (\phi )$

How can I combine these equations into full differentials for use in Lagrange multipliers with the Euler-Lagrange equations?

## Animated Visualizations

Just to show what the parameters mean and what the constraint equations mean in case there's something technically wrong:

(the animations seem to freeze. If one isn't moving try dragging it to a new tab)

Adjusting the parameters on the transformation equation:

Applying partial constraint 1 to visualize rolling without slipping

Visualizing partial constraint 2

Visualizing constraint 3

note: I'm pretty new to Lagrangian mechanics, on chapter two of Goldstein classical mechanics, but I don't see a reason why I can't apply everything I've learned (just what I've mentioned) to this problem.

-
+ $\infty$ for the animations. – Alfred Centauri Jun 20 '13 at 22:59
Did you say mathematica generated those animations? – Greg Jun 21 '13 at 5:16
Yeah, Export["file.gif",{frame1,frame2,...}] is really handy. I can post the notebook file if needed. I made the anims because transformations like that are a pain to visualize/check, so they'd help convince people that what I have so far is correct. – NeuroFuzzy Jun 21 '13 at 6:28

Your constraints seem at least compatible with these equations :

$$dx + r \sin \theta~(d\psi + \frac{d\theta}{\cos \phi}) + r \cos \theta \sin \phi ~d \phi = 0$$

$$dy - r \cos \theta~(d\psi + \frac{d\theta}{\cos \phi}) + r \sin \theta \sin \phi ~d \phi = 0$$

Constraint 1 would correspond to $d\theta = d\phi =0$

Constraint 2 would correspond to $dx = dy = d\phi=0$

Constraint 3 would correspond to $d\psi = d\theta =0$

[EDIT] Due to the OP comment, I propose a variant of the above equations which are :

$$\cos \theta ~dx + \sin \theta ~dy + r \sin \phi ~d\phi = 0$$

$$\sin \theta ~dx - \cos \theta ~dy + r ( d\psi + \frac{d\theta}{\cos \phi}) = 0$$

The constraints $1,2,3$ are respected.

The problematic case signaled by the OP comment, that is $dx=dy=d\psi=0$, simply gives here : ($d\phi = 0$ or $\sin \phi =0$) and $d\theta=0$ , which could be view as physical constraints about the system.

-
Hmm. Setting $dx=dy=d\psi=0$, I get $d\theta=-\cot(\theta)\sin(\phi)\cos(\phi)=\tan(\theta)\sin(\phi)\cos(\phi)$, which is almost always contradiction. (since, $\tan(x)=-\cot(x)$ is like $x=x+1$ in that it's false for every real x. The only the differential could hold is to have $\sin(\phi)\cos(\phi)=0$ - if the disk is flat on the ground the notion of $\theta$ [the point where the disk touches the ground] being defined goes out the window. If the disk is vertical then $\cos(\phi)=0$ and we get a division by zero in the original equations.) – NeuroFuzzy Jun 21 '13 at 21:51
@NeuroFuzzy : Well, I understand your argument, so my answer seems wrong. On the other side, the problem is, with $dx=dy=d\psi=0$, is it physical to suppose that $d\theta$ and $d\phi$ are not both null ? . OK,I am trying to think a little more - and maybe differently - about this problem. – Trimok Jun 22 '13 at 6:18
An interesting question is (if it makes sense) : what is the variation $dx, dy$ in function of $d\theta$ when $d\phi=d\psi = 0$ ? – Trimok Jun 22 '13 at 7:29
@NeuroFuzzy : I made an EDIT to the answer to propose a variant of the previous equations. – Trimok Jun 22 '13 at 9:42
ooh that looks promising (style of the equations looks similar to other rolling disk(s) constraints I've seen). I'll investigate it shortly. Could you elaborate on how you're tackling constructing these equations? – NeuroFuzzy Jun 23 '13 at 3:34

The solution is much easier than I anticipated. I thought the simplest method wouldn't work and that it wouldn't take into account certain things, but taking a second look I see that it works.

The point of contact with the ground (staying consistent with the rotation matrix definition above) is: $$\mathbf{v_1}=(x-r \cos(\theta) \cos(\phi),y-r \sin(\theta) \cos(\phi))$$ A bit of movement of a point there can be equated to a wheel moving in the direction orthogonal to theta and "forwards", of magnitude $r d\psi$: $$d\mathbf{v_2}=(-r\sin(\theta) d\psi,r \cos(\theta) d \psi))$$ We should have $d\mathbf{v_1}=d\mathbf{v_2}$. Expanding everything gives: $$0=r \sin(\theta)d\psi+dx+r \sin(\theta) \cos(\phi) d\theta+r \cos(\theta) \sin(\phi) d\phi$$ $$0=-r \cos(\theta) d \psi +dy-r \cos(\theta) \cos(\phi) d\theta+r \sin(\theta)\sin(\phi)d \phi$$

With these I can successfully apply the methods of variational calculus and get a physical solution!

-