# Need reference for 'mass tensor'

1. Mar 12, 2008

### WhiteFox

Hi,

I'm a grad student in computer engineering and my research involves a fair amout of mechanics (forward/inverse dynamics). I'm working with rigid multibody systems with many DOFs (40 to 50) representing human characters.

I've come across this http://grail.cs.washington.edu/projects/charanim/paper0129_final.pdf" [Broken] which provides an interesting solution for the Inverse Dynamics problem (see section 4). However, in the equations, you will notice that the author uses 'mass tensors' (M) instead of inertia tensors and, consequently, transformation matrices (W, in homogenous coordinates) instead of rotation/translation vectors.

My problem is that the paper is hardly a thorough reference on the ID approach (it provides an overview) and that I have not yet found any other book or paper that used this notation (based on mass tensors). Has any of you ever come across this approach elsewhere? Can anyone point me to a good reference book on the subject?

Thank you all!

Last edited by a moderator: May 3, 2017
2. Mar 12, 2008

### pmb_phy

What is a DOF? What is inverse dynamics?
Sorry but I'm unable to help. I'm posting because I wanted to mention that its possible that the authors are referring to the stress-energy-momentum tensor but I doubt this is the case. There was a time when I myself had referred to that as the "mass tensor." However I decided long ago that it was a misleading name and have ceased to use it (I hope).

From the context of its use, i.e. Eq. (2) in paper cited by you, it seems to be a different tensor than the stress-energy-momentum tensor. The object M in that paper does not seem to have components which are not densities whereas the components of the stress-energy-momentum tensor are energy density, momentum density and stress.

I will ask around and see what I come up with though.

Pete

Last edited by a moderator: May 3, 2017
3. Mar 12, 2008

### WhiteFox

...in more details...

DOF stands for 'degree of freedom'. Loosly speaking, if a joint can rotate around or translate along one axis, it has 1 DOF. On the other hand, the shoulder allows rotation along all 3 axes and therefore represents 3 DOFs. In Lagrangian dynamics, (if I'm not mistaking) each DOF becomes a generalized coordinate.

Inverse dynamics is the problem of finding the net forces that caused the observed motion (kinematics).

The mass tensor M in the paper simply describes the 'distribution' of mass along an axis, whereas the inertia tensor I describes the 'distribution' of mass perpendicular to an axis. For example, an ellipsoid of mass m and semi-axes a, b and c, has the inertia tensor:
$$I = \left[ {\begin{array}{*{20}c} m(b^2+c^2)/5 & 0 & 0 \\ 0 & m(a^2+c^2)/5 & 0 \\ 0 & 0 & m(a^2+b^2)/5 \\ \end{array}} \right]$$
and its mass tensor is (as defined in the article):
$$M = \left[ {\begin{array}{*{20}c} ma^2/5 & 0 & 0 \\ 0 & mb^2/5 & 0 \\ 0 & 0 & mc^2/5 \\ \end{array}} \right]$$
(edit) or, in homogeneous coordinates,
$$M = \left[ {\begin{array}{*{20}c} ma^2/5 & 0 & 0 & 0 \\ 0 & mb^2/5 & 0 & 0 \\ 0 & 0 & mc^2/5 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array}} \right]$$
(end edit)
The relation between mass tensor and inertia tensor is rather simple, yet all the references I find use the inertia tensor.

Thank you!

Last edited: Mar 12, 2008
4. Mar 12, 2008

### Stingray

The mass tensor you're describing is more formally the quadrupole moment of the mass distribution. It is usually defined by
$$M_{ij} = \int r_i r_j \rho(\mathbf{r}) \mathrm{d}^3 r .$$
You can construct higher (or lower) order moments by throwing in more factors of the radius in the integral. These are precisely analogous to the moments you might be familiar with from probability theory.

In any case, mass moments are commonly used in gravitational problems. Their analogs with electric charge are also used a lot in electrostatics. You should be able to find plenty of information by searching around.

5. Mar 12, 2008

### pmb_phy

Please provide a source in which this is defined as such. I never heard of the term and would like a textbook reference to see/read it for myself. Thanks.

Pete

6. Mar 12, 2008

### Stingray

I think any relevant books I have are in my office. From memory, Jackson talks abouts the electric analog of the mass quadrupole. He probably uses a trace-free version, actually:
$$M^{TF}_{ij} = M_{ij} - \frac{1}{3} M_{kk} \delta_{ij} .$$
I think that's what arises when studying solutions to Poisson's equation (which of course appears in both electrostatics and Newtonian gravity). The potentials sourced by compact lumps of charge or mass can be expanded in series involving powers of 1/r. The angular dependence of these terms is fixed by spherical harmonics of the appropriate order. Coefficients of these terms turn out to be related to the source distribution in a very simple way. You basically get integrals of the form I've written down. The strength of a potential decaying like $1/r^n$ involves an integral with the product of (n-1) radius vectors multiplied by the source distribution.

It's less commonly known that these things also come up when working out the forces and torques exerted by an external field on an extended charge or mass distribution. If the external field is nearly uniform, it's a good approximation to say that the gravitational force is $m g_{i}(z)$. I'm using z for the body's center-of-mass position. This result is not exact. It involves the mass, which is the system's monopole moment. mg is therefore called the monopole approximation for the force. One might expect a dipole to come next, although this vanishes when using z as an origin. The second order gravitational force on an extended mass distribution therefore involves the quadrupole moment:
$$F_i = \int \rho g_i \mathrm{d}^3 r \simeq m g_i(z) + \frac{1}{2} M_{jk} \partial_{jk} g_i(z) .$$
Unfortunately, I can't think of an elementary reference for this. The only things I know offhand are for the very complicated generalizations used in general relativity. The result I've written down is easy to derive, though.

None of this is relevant to the types of things that the OP was interested in, but it's still useful to define mass quadrupoles there. Inertia tensors are usually of more direct use for rigid body mechanics, but it's very easy to switch from one object to the other. It's a matter of aesthetics.

7. Mar 13, 2008

### pmb_phy

Then perhaps you can choose one and provide a page number please. After all the purpose of this thread is to find a reference.
The tensor you mention appears to be quite similar, if not identical, to the inertia tensor (or the products of inertia). I've never heard of it called the "mass tensor" as you have defined it and I could find nothing on the internet regarding this either. The only thing I could find on the internet was a "mass tensor" regarding something to do with neutrinos. Thank you.

Pete

Last edited: Mar 13, 2008
8. Mar 13, 2008

### WhiteFox

If by $$\mathrm{d}^3 r$$ you mean integration over the X, Y and Z axes, then indeed this is equivalent to the definition of mass tensor given by the author in her thesis:
$$M = \int_V \rho(\vec{u}) \vec{u} \vec{u}^t \mathrm{d}x \mathrm{d}y \mathrm{d}z$$
with
$$\vec{u} = \left( {\begin{array}{*{20}c} x \\ y \\ z \\ 1 \\ \end{array}} \right).$$
Thanks for putting a formal name on it!

Indeed, I did find more than a few books that use mass moments (although, from what I have seen, very few seem to introduce the concept), but all concerned electric or gravitational problems... none of them adressed multibody dynamics. ...so this pretty much brings me back to square one... although I now know that my mass tensor is in fact a quadrupole mass moment (which will sound much fancier in my thesis!).

From what I know so far, the advantage of the mass tensor over the inertia tensor wrt multibody dynamics, is that it behaves like a vector. By that I mean that the same transformation matrix 'W' can multiply a vector 'u' to rotate and translate it into another referential and, just as weel, it can multiply a mass tensor to express it in that referential. This is not the case for the inertia tensor, and this allows (I think) for more concise equations. A matter of asthetics, maybe, but from my understanding, an important one.

I could derive all necessary equations and show their equivalence to their inertia tensor-based counterparts, but as this is really not the core of my research but only a tool for me, I was hoping for a simpler ready-made answer!

Thanks for the help!

...this all would be so much simpler if the author would answer my emails!

9. Mar 13, 2008

### Stingray

Yes, that's what I mean. Why is there a fourth component in your radial "vector?" I guess it might be useful when programming something to have a list which includes the mass as well as its moments, but that certainly won't be good to have in physical equations. It also won't transform nicely. As written, u isn't a vector and M isn't a tensor. Everything's ok with just the x, y, z components, though.

I'm not sure what you mean by this. Both inertia and mass tensors should transform identically under rotations. Given the quadrupole moment $M_{ij}(z)$ calculated at the center-of-mass z, its value about another point z' is related via

$$M_{ij}(z') = M_{ij}(z) + m (z-z')_i (z-z')_j .$$

where m is the total mass. The analogous relation for the inertia tensor is

$$I_{ij}(z') = I_{ij}(z) + m [ |z'-z|^2 \delta_{ij} - (z-z')_i (z-z')_j ] .$$

Is this the extra complication you're referring to?

10. Mar 13, 2008

### Stingray

I can't find anything with the specific name "mass tensor." Quadrupole tensors are indeed discussed in Jackson (3rd Ed, p. 146), but they are the trace-free type I mentioned earlier. Suprisingly, the only references I can find right now to the definition I first gave are in GR books. For example Wald 4.4.48 (p. 83) or Weinberg 10.5.9 (p. 268). These expressions are in linearized gravity, so they require the identification $T^{00} \rightarrow \rho$. The concepts here certainly aren't unique to relativity, so I don't know why they're so hard to find in textbooks. I use this kind of thing a lot in my research, so I'm surprised. Maybe it's just one of those things that everybody knows but rarely writes down.

It is very similar. The inertia tensor is related via

$$I_{ij} = M_{kk} \delta_{ij} - M_{ij}$$

11. Mar 13, 2008

### pmb_phy

It was that which the OP seemed to be inquiring about, i.e. what text book uses the term "mass tensor." The quantities you referred to are well known to me under other names. Thank you.

Pete

12. Mar 13, 2008

### WhiteFox

The vector has four components because it is in homogeneous coordinates. Homogeneous coordinates are often used in computer graphics and, as described in http://en.wikipedia.org/wiki/Homogeneous_coordinates" [Broken]:
The advantage in this case is that we can have a single transformation matrix 'W' representing both translation and rotation at the same time. The fourth term does not represent mass, it is a sort of 'scaling' term wrt the cartesian space (i.e. divide the first three terms by the fourth to get the corresponding vector in euclidian space).

I tend to think that homogeneous coordinates should be applicable in multibody dynamics as well. I don't see why they shouldn't... but I could be wrong.

I think I have not expressed myself correctly on the 'advantage' of the quadrupole moment over inertia tensor in the contexte of mutlibody dynamics... in part because it is not all that clear for me yet (otherwise this thread would not have been created!). I'll take a more thorough look at the problem and post back when I can better explain myslef.

Last edited by a moderator: May 3, 2017
13. Mar 13, 2008

### WhiteFox

Actually, I'm not certain that the term 'mass tensor' is used by anyone else than the author of the aforementionned paper. As long as we are talking about the same mathematical object (and we are), I doesn't matter to me that it is not called 'mass tensor'. In fact, being a good scientist, I prefer to use a name that most people know it as (i.e. quadrupole moment of mass).

My main inquiry is therefore not so much to find a reference that uses the term 'mass tensor', but to find a reference that uses the quadrupole moment of mass (whatever the name it is given in the reference), preferably in homogeneous coordinates, for rigid multibody dynamics. ...but it is more of a quest than I expected!

14. Mar 13, 2008

### pmb_phy

Thanks for clearing that up.

Pete

15. Apr 15, 2008

### WhiteFox

I had loads of work to take care of, but I recently had time to take a closer at this problem.

It is my current understanding that the authors of the paper use the quadrupole moment of mass distribution because it is a mathematical object easily converted to homogeneous coordinates, whereas I have not yet found an homogeneous coordinates equivalent for the inertia tensor.

For the mass quadrupole M, using the definition:
$$M = \int_V{\rho(\vec{u})\vec{u}\vec{u}^t dx dy dz}$$
(where $$\rho(\vec{u})$$ is the density at point $$\vec{u}$$) with a vector $$\vec{u}$$ in euclidian space:
$$\vec{u} = \left(\begin{array}{c} x \\ y \\ z \\ \end{array} \right)$$
you have the matrix form:
$$M = \int_V{\rho(\vec{u})\left( \begin{array}{ccc} x^2 & xy & xz \\ xy & y^2 & yz \\ xz & yz & z^2 \\ \end{array} \right) dx dy dz}.$$
And if you consider $$\vec{u}$$ to be a vector in projective space (homogeneous coordinates):
$$\vec{u} = \left(\begin{array}{c} x \\ y \\ z \\ 1 \\ \end{array} \right)$$
you have the matrix form:
$$M = \int_V{\rho(\vec{u})\left( \begin{array}{cccc} x^2 & xy & xz & x\\ xy & y^2 & yz & y\\ xz & yz & z^2 & z\\ x & y & z & 1\\ \end{array} \right) dx dy dz}.$$
Since the definition is given in terms of vector product, it can be applied in homogeneous coordinates just as in cartesian coordinates.
Now consider the transformation matrix W in homogeneous coordinates that changes the reference frame of M (through rotation and translation):
$$W = \left( \begin{array}{cccc} & & & \Delta_x\\ & R & & \Delta_y\\ & & & \Delta_z\\ 0 & 0 & 0 & 1\\ \end{array} \right)$$
where R is a 3x3 rotation matrix and $$\Delta_i$$ is the translation along dimension i. We have that $$WMW^t$$ correctly expresses M in homogeneous coordinates in the new reference frame (the proof is left as an exercice to the reader ). One could adapt the parallel-axis theorem to the mass quadrupole and see that this matrix multiplication in homogeneous coordinates generalizes it (by allowing rotation as well as translation).

Now, on the other hand, the moment of inertia tensor I is not really defined in terms of vectors. The most general definition I have found is:
$$I = \int_V{\rho(\vec{u})\left(\|\vec{u}\|^2E_3 -\vec{u}\vec{u}^t\right) dx dy dz}$$
where $$E_n$$ is the n x n identity matrix. Considering $$\vec{u}$$ as a vector in euclidian space, you get the usual matrix form:
$$I = \int_V{\rho(\vec{u})\left( \begin{array}{ccc} y^2+z^2 & -xy & -xz \\ -xy & x^2+z^2 & -yz \\ -xz & -yz & x^2+y^2 \\ \end{array} \right) dx dy dz}$$
which is fine, but if you want to express it in homogeneous coordinates (which requires replacing the 3x3 identity matrix by the 4x4 identity matrix in the definition), you get the following matrix form:
$$I = \int_V{\rho(\vec{u})\left( \begin{array}{cccc} y^2+z^2+1 & -xy & -xz & -x\\ -xy & x^2+z^2+1 & -yz & -y\\ -xz & -yz & x^2+y^2+1 & -z\\ -x & -y & -z & x^2+y^2+z^2\\ \end{array} \right) dx dy dz}$$
or, if you consider that $$\|\vec{u}\|^2 = x^2 + y^2 + z^2$$ instead of $$\|\vec{u}\|^2 = x^2 + y^2 + z^2 + 1$$,
$$I = \int_V{\rho(\vec{u})\left( \begin{array}{cccc} y^2+z^2 & -xy & -xz & -x\\ -xy & x^2+z^2 & -yz & -y\\ -xz & -yz & x^2+y^2 & -z\\ -x & -y & -z & x^2+y^2+z^2-1\\ \end{array} \right) dx dy dz}.$$
However, for both forms, $$WIW^t$$ fails to correctly express the moment of inertia tensor in the new reference frame. In particular, applying a translation using W does not give the same result as applying a translation using the parallel-axis theorem. At the time being, I don't see what form the moment of inertia tensor should take in homogeneous coordinates to remain valid under rigid transformations (rotation & translation).

In my opinion, the previous (partial) demonstration justifies the use of the mass quadrupole instead of the moment of inertia tensor for use in multibody dynamics in homogeneous coordinates (as changing reference frame is a common task in that context).

Therefore my initial question remains: If anyone knows of a reference book on the subject of multibody dynamics in homogeneous coordinates, please let me know! And if such a book uses the moment of inertia tensor rather than the mass quadrupole, I would be quite interested in seeing the form of the inertia tensor in homogeneous coordinates!

16. Apr 15, 2008

### D H

Staff Emeritus
Just because something is an array of N numbers does not mean it is a vector. An Euler rotation sequence, for example, is not a vector. Similarly, just because something is an NxN matrix does not mean it is a tensor. This 'mass tensor' is not a tensor. It is a matrix of the form

$$M = \left[ \begin{matrix} \mathbf J & m\mathbf x_{cm} \\ m\mathbf x_{cm}^T & m \end{matrix}\right]$$

where $\mathbf J$ is the inertia tensor about the origin of the reference frame and $\mathbf x_{cm}$ is the location center of mass. I intentionally did not use $I$ for the inertia tensor because that notation is typically reserved for the inertia tensor about the center of mass of the object. The inertia tensors $I$ and $J$ are related via the parallel axis theorem,

$$J_{ij} = I_{ij} + m(x_{cm}^2\delta_{ij} - x_{cm,i}x_{cm,j})$$

A more compact way to write this uses the symmetric matrix generated from a vector,

$$\mathbf S(\mathbf x): \mathbf x \times \mathbf y = \mathbf S(\mathbf x) \mathbf y$$

With this, the parallel axis theorem is

$$\mathbf J = \mathbf I - m\mathbf S(\mathbf x_{cm})^2$$

This 'mass tensor' is a matrix that captures the mass, center of mass, and (non-centered) moment of inertia in one object. It is not, however, a tensor.

17. Apr 15, 2008

### WhiteFox

Is the matrix you describe the projective space equivalent of the inertia tensor? If so, how would you go about applying rigid transformations (rotation & translation) using matrix multiplication?

I tried the usual suspect ($$WMW^t$$) with your definition for M, with
$$W = \left( \begin{array}{cccc} & & & \Delta_x\\ & R & & \Delta_y\\ & & & \Delta_z\\ 0 & 0 & 0 & 1\\ \end{array} \right),$$
and the result is not a valid 'inertia matrix'. In particular, if W represents only a translation, the result differs from that obtained through the parallel-axis theorem.

18. Apr 15, 2008

### D H

Staff Emeritus
I see what you are doing here. You have positive products of inertia in the off-diagonal elements your matrix of the upper-left 3x3 portion of your matrix. An inertia tensor has negative products of inertia.

You might get references to this treatment in mechanical engineering texts on robotics. You will not get a treatment like this in any physics texts.