# 0708-1300/Class notes for Thursday, September 20

Announcements go here

## Dror's Note

Come to my talk today at 4:30PM at the Fields Institute!

## Class Notes

The notes below are by the students and for the students. Hopefully they are useful, but they come with no guarantee of any kind.

PDF file of the class notes typed up in latex can be located here

Tex version of the file is also avaliable here so that people can easily make changes and repost here if they wish.

## Exercise

The solution(s) below are by the students and for the students. Hopefully they are useful, but they come with no guarantee of any kind.

Configurations of a Generalized Cockroach (not entirely rigourous)

Let $C_n$ be the manifold of configurations of a "cockroach" with $n$ legs:

Q: What is $C_n$? In particular, what is $C_6$?

$n=2$: Consider $C_2$.

As in the picture, label the angles of the joints $\theta_1$ and $\theta_2$ and the distances from the body to the feet $d_1$ and $d_2$ respectively.

The value of $\theta_i$ determines the value of $d_i$. So, given values $(\theta_1, \theta_2)$, possible configurations are given by positions of the body, which must have distance $d_i$ from the $i$th foot.

That is, the body must lie on the intersection of the two circles of radius $d_i$ centred at the $i$th foot:

There are $0, 1,$ or $2$ solutions for the body position. If we look only at the top body position, the pair $(\theta_1, \theta_2)$ determines a unique configuration. So, we can plot the subset on $\R^2_{(\theta_1,\theta_2)}$:

The boundary points are where the "top" solution is in fact the unique solution.

By symmetry, taking the bottom solution gives us a similar region, and since the boundaries are where the top and bottom solutions coincide (there is only one solution along the boundary), the entire manifold is given by gluing the boundaries together. This gives a sphere.

$n=3$: Configurations with $3$ legs consist of a configuration with $2$ legs plus the configuration of the third leg. The configuration of the first $2$ legs fixes the position of the body - and thus, the distance $d_3$ from the third foot to the body.

For certain configurations of the first two legs, the body is too far from the third foot, so these are not found as part of configurations with three feet. When the distance from the body to the third foot equals the length of the third leg completely extended, this gives a unique configuration of the $3$-legged cockroach. Any closer and there are two possible configurations, corresponding to the two ways that the third joint can bend.

Let $R$ be the region in $C_2 = S_2$ where the distance to the third leg is close enough to give solutions. The boundary of $R$ is a curve, consisting of all the points at which there is a unique solution:

So the manifold $C_3$ is given by taking two copies of $R$ and gluing their boundaries together. This gives a sphere.

$n \geq 3$: Likewise, given that $C_n = S_2$, it follows that $C_{n+1} = S_2$ also. In particular, $C_6 = S_2$.

### Dror's Evaluation

The solution for $n=2$ seems right but hard to understand. For $n=3$ the solution is absolutely right. Unfortunately for $n>3$ the solution is wrong. (Why?)

--Drorbn 19:46, 24 September 2007 (EDT)

### A combinatorial solution to the roach problem

The answer: An n-legged roach has configuration space = a torus with $1+2^{n-3}(n-4)$ holes!

The reason: The configuration space of a roach can be represented as a graph as follows. Each face is the domain the body moves in when we fix which way each leg is bent. Since each of the n legs can be bent in 2 directions, we have $2^n$ faces. Each edge is the boundary where one leg is straight (it borders the face where the leg is bent in the other direction). The vertices therefore correspond to positions where two adjacent legs are straight. This means that each vertex has degree four. (for those of you unfamiliar with graph theory lingo, degree 4 means that we have 4 edges from each vertex. In this case we have also four faces) We can now calculate the number of edges, vertices and faces (E, V, F) of an n-legged roach:

F = $2^n$

E = $nF/2$ = $2^{n-1}n$

V = $2E/degree$ = $2^{n-2}n$

(the above calculation of E in terms of F and V in terms of E is a fun counting argument, if you can’t figure it out ask me) Now we compute the Euler genus which tells us what kind of surface this graph is: Euler genus = $2 - V + E - F = 2 + 2^{n-2}(n-4)$ Since a k-holed torus has genus 2k (the sphere has genus 0), the configuration space of an n-legged roach is a k = $1 + 2^{n-3}(n-4)$ -holed torus.

### a non combinatorial, cut-and-paste topology solution

which, conveniently, gives the same answer as my combinatorial solution above.

please e-mail me if you have questions, comments or a burning desire for more rigour.

a webpage to go to if you want info about how to turn my recursive formula for Cn into my non-recursive one is: http://web.cs.wpi.edu/~cs504/s99/notes/recurrence/solve/solve.html

--Katiemann 10:42, 5 November 2007 (EST)

## Enrichment: Configuration Spaces of Mechanical Systems

As Prof. Bar-Natan mentioned in class, manifolds are quite useful for studying the physics of mechanical systems like robots and steam engines. There is actually a very general mathematical theory of rigid body mechanics that makes plenty of use of differential geometry. See, for example, for a discussion of one of these models and its application to nonlinear control theory for mechanical systems. The following is a brief introduction to the idea of a mechanical system's configuration space, and makes use of the notation of .

Imagine that you have some rigid body $B\!$ floating around in space. The first thing to do is to set up an orthonormal frame $(O_{spatial},(s_1,s_2,s_3))\!$ with respect to which we will describe $B\!$'s position. Here $O_{spatial}\!$ is some point in Euclidean (affine) space which serves as the origin of our coordinate system and $(s_1,s_2,s_3)\!$ is an orthonormal basis for Euclidean space centred at $O_{spatial}\!$.

Now suppose that we rigidly attach a frame $(O_{body},(b_1,b_2,b_3))\!$ to $B\!$ in the sense that the frame's origin is fixed to a specific point on the body (such as the centre of mass) and the basis $(b_1,b_2,b_3)\!$ rotates around with $B\!$. We can now specify $B\!$'s configuration with the vector

$r = O_{body} - O_{spatial} \in \mathbb{R}^3\!$

and the matrix $R \in SO(3;\mathbb{R})\!$ which gives the orientation of the basis $(b_1,b_2,b_3)\!$ relative to $(s_1,s_2,s_3)\!$. Here $SO(3;\mathbb{R})\!$ is the group of $3\times 3\!$ real matrices with unit determinant---the group of rotations of $\mathbb{R}^3\!$. Concisely, the configuration space of a rigid body is the space $Q_{free}=SO(3;\mathbb{R}) \times \mathbb{R}^3\!$.

Lucky for us, $SO(3;\mathbb{R})\!$ is actually a manifold. It's an example of something called a Lie group, which is a group that is also a manifold and whose group operations are smooth according to the differentiable structure of the manifold. Hence $Q_{free}\!$ is also a manifold.

Now imagine we have $k\!$ rigid bodies. If the bodies are free to move around independently, and if we briefly suspend disbelief and allow them to pass right through each other instead of colliding, our configuration space is $Q_{free}^k= \left(SO(3;\mathbb{R}) \times \mathbb{R}^3\right)^k$. If, on the other hand, the bodies are interconnected---ie., their motions are not independent---or if the motion of the bodies is constrained in some other way, then the configuration space for the system will be some subset $Q \subset Q_{free}^k\!$. In fact, it is (usually) a submanifold.

This situation is precisely what's happening with the roach's configuration. In this case the system consists of 12 rigid bodies (six legs composed of two segments each) that are constrained to move in a plane, connected together at their ends, and pinned down.

Hopefully, it is starting to become clear how we can model some of the physics now: we can describe the motion of a mechanical system with a curve $\gamma : I \rightarrow Q\!$ where $I \subset \mathbb{R}\!$ is an interval. The velocities of all the bodies (both translational and rotational) at time $t\!$are encapsulated in the tangent vector $\gamma'(t) \in T_{\gamma(t)}Q\!$. Similarly, there are nice differential-geometric ways of describing the kinetic and potential energies, forces and so on.

## References

[BulloLewis_04] ^ Francesco Bullo and Andrew D. Lewis, Geometric Control of Mechanical Systems: Modeling, Analysis, and Design for Simple Mechanical Control Systems, Springer-Verlag, New York-Heidelberg-Berlin, 2004. Number 49 in Texts in Applied Mathematics.