REFERENCE COORDINATE SYSTEMS AND TRANSFORMATIONS

- Location is Relative
- Spatial Reference Frame
- Dual Representation Using Dual Reference Systems
- Switching Between Reference Systems
- Linear / Linear Aligned (Translation): Transformation between isometric, aligned, but spatially separated, rectilinear coordinate systems
- Linear / Linear Non-aligned (Rotation): Transformation between non-aligned isometric rectilinear coordinate systems with common origin
- Linear/Linear Combined Rotational and Translational Transformation:
Transformation between non-aligned isometric rectilinear coordinate systems not having a
common origin
- Homogenous Transformation Matrix (HTM) for transformation between systems both rotationally and translationally distinct

An object's location is always given relative to another reference object. For example, the location of a community park may be described as five blocks from the Post Office. To be more specific, the community park is four blocks east and three blocks south of the Post Office. With this illustration, a position vector has been established, that is, a direction and a distance (spatial vector) from the Post Office. Several things are assumed to be known: the place to begin (Post Office), an understanding of east and south (reference directions), and the length of a block (unit of displacement). Without consensus on these things, communication of the location of the park becomes unclear.

A stated reference object along with reference directions and a unit displacement
length form the basis of a** spatial reference frame** in which the
physical **location** (direction and distance from reference) of an object can be
communicated.

In forming a spatial (physical) reference frame, the first thing to identify is an **origin
point** (Post Office in our previous example) that is associated with a real physical
object. To facilitate clarity, a specific point having no consequential size needs to be
designated as the origin. In our example, we started at the Post Office, but what if this
building were to occupy a complete square block? We could start walking from the
"incorrect" corner and thus not arrive at our destination. So we alter our
directions to specify starting at the corner that has a fountain. The smaller the object
whose position is to be described or the more exact that the position needs to be known,
the more detailed description needed for the origin point. Formally,
the origin point should have no dimension at all if the reference frame is to be used with
mathematics.

Second, **reference directions** from which we can determine the object location with
respect to the reference need to be described that cover all possible location dimensions.
For spatial frames, these reference directions are chosen to be linear. Examples of reference directions are east and north. Additionally,
we need to specify the positive and negative directions. For example, west is the negative
of east. Also, north and east do not specify a starting point, they only give direction. And since east reverses directions from one side of the earth to
the other, it is advantageous to build a reference frame in a more formal way. This will
be described in 'Establishing Direction References' section.

Finally, we must define the standard **reference
unit** for distance. For example, we state that
a block is 400 feet (provided we know what "feet" are). In building the location
frame, the unit of length is usually to be based upon a standard (meters, feet, millimeters etc.). A
standard unit is not necessary, but the unit chosen must be understood.

In our illustration, once we have agreed on the distance unit, the origin point, and the reference directions, we can describe the location of the park.

ESTABLISHING DIRECTION REFERENCES

A minimum of two points are required to establish a one-dimensional direction (a line) with a positive and negative sense. One could say that the the line passes through points A and B with the direction from A to B being an increasing or positive direction sense. Specification of the reference directions used in a reference frame to relate directly to a physical system can be done through the use of real physical datum points, lines, and/or planes. These datums are chosen such that they can be used to define a sufficient number of points for establishing a direction reference for each spatial dimension. Additionally, these datums must all be rigidly fixed with respect to one another. Note: A line does not imply a direction sense which must be defined otherwise.

Examples.

**Four points**(nonplanar) can establish reference directions in the following way. Choose one point for an origin. The vectors that go from the origin point to the other three points establish the reference directions with positive sense going away from the origin to the other points.**A plane, a line**(not parallel to plane)**, and a point**(not on plane or line) can be used to establish reference directions in the following way. Where the line intersects the plane is the origin point. One reference direction is defined by the line perpendicular to the plane and through the origin having a positive sense from the origin toward the space divided by the plane that contains point B. A second reference direction is the projection of the original line into the plane with positive sense defined by the piece of line that is on the same side of the plane as B. The third reference line is the line that goes through the origin and is perpendicular to the other reference lines with the direction sense given by the right-hand rule.- For a machine, lines can be specified by spindle, carriage, or stage axes. Machine surfaces such as tables facilitate defining points, lines, and/or planes. See Modeling a machine section of the tutorial 'Dimensional Metrology and Mathematical Error Modeling for Machine Tools'.

AXES AND UNIT REFERENCE (BASIS) VECTORS

The **axes** of a reference frame are lines that pass through the
origin of a reference frame and extend toward the reference directions.The positive
direction senses of the axes are the same as their respective reference directions. For three dimensions, these axes could be specified as the x axis, y axis,
and z axis.

Combining the unit distance
with each of the reference directions results in **unit spatial vector**s called **basis vectors**. That is, a basis vector is a unit distance in a given reference direction.
From our initial example, two basis vectors could be defined as one block east and one
block north. These unit vectors only have a magnitude and direction, they do not assume a
place of origin and only become applied to a specific place in the context of a physical
description.

Consider the reference frame csN (to become coordinate system N) shown at the
right. The origin point is labeled as O_{N}. P is the object for which we are
trying to define the location. The basis vectors are **i _{N}**,

Position vector **P _{N}** is the
spatial vector which when referenced with respect to the defined point O

Once a reference system is agreed upon, numerical coordinate notation can simplify the
representation. The coordinate
notation of the location of P in csN is given by [P_{N}]=(x_{N}, y_{N},
z_{N}). This is with the understanding that if the basis vectors **i _{N}**,

In our previous example, O

Then, the park is at coordinates (4,-3,0) in csN or (4,-3,0)

Three Dimensional Rectilinear Coordinate System

In a rectilinear system, the basis vectors are chosen so that the axes are all
Euclidean straight lines which are perpendicular (orthogonal) to each other. The origin, O_{N},
can be defined in relation to any object we choose. It may be the intersection of two
walls and the floor. See previous diagram. For a three dimensional rectilinear
representation, (x_{N}^{2}+y_{N}^{2}+z_{N}^{2})^{½}=P_{N}^{
}where P_{N} is the length of vector **P _{N}** (from O

Cylindrical Coordinate Representation

In a** **rectilinear coordinate system, say csN, with basis vectors **i _{N}**,

Spherical Coordinate Representation

In a** **rectilinear coordinate system, say csN, with basis vectors **i _{N}**,

Switching between linear and spherical coordinate representations is is accomplished using the following relationships.

Polar Coordinate Representation

A **polar coordinate representation** can be considered to be a degenerate form of
either a cylindrical or spherical coordinate representation. In a cylindrical
representation, if **P _{N}** is constrained to be at 0 units along
the

DUAL REPRESENTATION USING DUAL REFERENCE SYSTEMS

It is possible to locate the same point in two different reference systems as shown
below. If we have two reference systems described by csN and csM (coordinate systems N and
M), then the point P can be described in csN by (x_{N},y_{N},z_{N})=[P_{N}]
or in csM (x_{M},y_{M},z_{M})=[P_{M}].

As shown, the coordinate systems need not be aligned or have the same axis description.
The axes could also differ in units (different basis vector length).

SWITCHING BETWEEN REFERENCE SYSTEMS ( BASIS TRANSFORMATION)

If the location of P has been determined in csM, it is possible to determine its
position in csN, provided enough information is available to relate csN to csM.
Mathematically, this switching is accomplished by a **transformation**
of the coordinates from the csM basis to the csN basis. This basis transformation is
usually accomplished by a **transformation function F _{MN}(
)**. This is mathematically written as

[P

Transformation between isometric, aligned, but spatially separated, rectilinear coordinate systems (Simple Translation of Coordinates)

By** isometric** and **aligned**, we mean that **i _{N}=i_{M},
j_{N}=j_{N},** and

The x position vector coordinate in csN locating point P is x

Transformation between non-aligned isometric rectilinear coordinate systems with common origin (Rotational Transformation)

Assume we have
rectilinear non-aligned isometric systems, csN and csM, with common origins, O_{N}
and O_{M}, and we know the representation (of location) of point P in csM, [P_{M}],
but we desire to determine its representation in csN, [P_{N}]. By isometric, we
mean the length is the same for all basis vectors in csM and csN. By nonaligned** **we
mean that any of the i_{N}, j_{N}, or k_{N} axes is not equivalent
to i_{M}, j_{M}, or k_{M} axes, respectively. For example, i_{N}
axis may run from southwest to northeast while the i_{M} axis runs from south to
north. The diagram to the right illustrates our situation.

In order to mathematically interrelate csN and csM, we need only to determine how the
the unit reference vectors** i _{M}, j_{M}, **and

The elements of** [i _{M}]_{N}** are the csN
coordinates (a

The specific matrix elements a_{1,}a_{2}, a_{3}, b_{1,}b_{2},
b_{3}, c_{1,}c_{2}, and c_{3} are derived as follows.

Let point P be on an axis of csM. The line between the origin and P we shall designate as **r** which also has length r. The
angle between **r** and i_{N}, j_{N},
and k_{N} we shall designate as f_{iN}, f_{jN}, and f_{kN} ,
respectively. The f angles are measured with respect to the
positive direction of the associated axes. The projection of r
into the i_{N}j_{N} plane is designated r_{ijN} and has length r_{ijN}.
Similarly, r_{jkN} and r_{kiN} are projections of r
into the j_{N}k_{N} and k_{N}i_{N} planes respectively.
The angle about the i_{N} (j_{N}, k_{N})axis that the line r_{jkN}
(r_{kiN}, r_{ijN}) makes with respect to the j_{N} (k_{N},
i_{N}) axis we designate q_{iN} (q_{jN}, q_{kN}). The q angles follow the **right hand rule. **That is, if you point the
thumb of your right hand in the positive direction of the i_{N} axis, then your
fingers will curl in a positive q_{iN} direction. Any
two angles which includes a q angle or three f angles is sufficient to describe a line's location in csN. The
angles for a given line are interrelated by the following **identity
equations**.

Now in our specific case, we let the vector from O_{N} to P be equivalent to any
one of the basis vectors of csM (**i _{M},
j_{M}, **or

Using these relationships we may now determine representations by the following relationships between corresponding basis vectors.

Combining these equations yields the following transformation.

R_{MN} is the rotational
transformation matrix which is used to transform the position P having the csM
coordinates [P_{M}] into the csN coordinates [P_{N}].

Small `f`'s
Rotational Transformation

Suppose the f angles between the axes of csN and csM are very small, such that

This can be rewritten as

,

where e_{kN}(**i _{M}**) is the
orientation angle of

Which yields the following matrix. The e angle directions in csN are determined by the right hand rule.

So that, for small angles,

where e_{kN} is the small angle that the i_{M}
and j_{M} axes of are rotated about the k_{N} axis with respect to
i_{N} and j_{N} etc.

Rotational Transformation for Small Angles Between Only One Set of Corresponding Axes

For simplicity, we are going to describe all of the unit vectors of csM by their
relation to the k_{N} axis of csN (using f_{N}
and q_{N}). The resulting transformation matrix is as
follows with P_{N}=R_{MN}[P_{M}]

If the k_{M} and k_{N} axes are misaligned by small angles, but the
i_{M} and j_{M} axes are allowed to be misaligned by large angles from the
i_{N} and j_{N} axes, then the following approximations and identities can
be used to simplify R_{MN}.

Substituting the above into R_{MN} yields the following.

Substituting the es as defined in the previous section yields
the following.

Using the cross products **j _{MN}X k_{MN}=i_{MN}**
and

Combined rotational and translational transformation between non-aligned isometric rectilinear coordinate systems not having a common origin

A function F_{MN}() which transforms the coordinates of a system csM into the
coordinates of another system csN which is not aligned and has a different origin
can be developed using an intermediate coordinate system K (csK) which is aligned with csN
but has the origin of csM. First we transform the coordinates between csM and csK with
using the function F_{MK}() , then transform the coordinates between csK and csN
using the function F_{KN}(). The direct transformation between csM and
csN becomes

F_{MN}([P]_{M}) = F_{KN}([P]_{K}) = F_{KN}(
F_{MK}([P]_{M}) ), where [P]_{M} is the coordinate vector
representation of point P in csM. F_{MK}([P]_{M})= R_{MK} [P]_{M}=
[P]_{K} with R_{MK} being the rotational transformation matrix
as described in the section on rotational transformation between
systems with common origin. F_{KN}([P]_{K}) = [P]_{K}+ T_{KN}
= [P]_{N} with T_{NK} being the translation matrix as described in the section on translation between aligned coordinate systems.
Combining the functions yields F_{MN}([P]_{M}) = R_{MK} [P]_{M}
+ T_{KN}. Since csK and CsM share a common origin, T_{MN} = T_{KN}.
Since csK is by definition always aligned with csN, R_{MK} can be replaced with R_{MN}
provided we define R_{MN} in this case as the rotational matrix between csN and
csM if one of the systems is translated without rotation so that they have common origins.
Now we can say F_{MN}([P]_{M}) = R_{MN} [P]_{M}
+ T_{MN}.

Homogenous Transformation Matix (HTM) for transformation between systems both rotationally and translationally distinct

The function F_{MN}([P]_{M}) = R_{MN} [P]_{M} + T_{MN}
can be reduced to a single matrix multiplication by extending by one dimension the
representation of the vector that locates the point P. Let P's representation in csM,
[P]_{M}, with the coordinates x_{M}, y_{M}, z_{M},
be extended to a fourth dimension which has a constant value of 1. And let O_{M}'s
representation in csN, T_{MN} also be extended to a fourth dimension which
has a constant value of 1. So we have

The matrix H_{NM} which transforms point P's coordinates in csN into csM (given
R_{MN} and T_{MN}), is the inverse of H_{MN} or H_{MN}^{-1}
= H_{NM} and can be described by

Comments? contact Jim Miller (home page) or jamiller@uncc.edu (e-mail)

Copyright 1998-2002 Jimmie Andrew Miller

Last update April 11, 2002

Disclaimer: The purpose of this document is instructional and although we strive to eliminate mistakes it may contain errors which have not been discovered. Additionally, it does not cover all possible formulations of related models.