Main Content

Selecting a Measurement Frame

You can use the Transform Sensor block to measure the relative relationship between two arbitrary frames that are connected to the B and F frame ports of the block. The relationship includes relative rotation, translation, and their first and second time derivatives. These measurements are 3-D vectors or higher dimensioned quantities, such as rotation matrices.

To do computation with the measured vectors, the vectors must be resolved in coordinates. The setting of Measurement Frame parameter determines where to resolve the measured vectors; the vectors are resolved in the selected frame's coordinates. For example, in the figure, because Measurement Frame was set to World, the Transform Sensor block resolves a translation vector, shown as a black arrow, in the world frame's coordinates.

Note

The rotation measurement of the Transform Sensor block is independent of the Measurement Frame parameter.

Measurement Frame

You can set Measurement Frame parameter to World, Base, Follower, Non-Rotating Base, and Non-Rotating Follower.

World

The Transform Sensor block resolves the measured vectors in the world frame's coordinates.

The world frame is an inertial frame.

Base or Follower

The Transform Sensor block resolves the measured vectors in the coordinates of the selected frame that is the base or follower frame.

The base or follower frame is the frame that connects to the block's B or F port, respectively. The base and follower frames are non-inertial. Therefore, the vectors resolved in the base or follower frame may involve centripetal and Coriolis terms.

Non-Rotating Base or Non-Rotating Base

The Transform Sensor block maps the vectors resolved in the world frame to the selected frame that is non-rotating base or non-rotating follower frame. In other words, the block calculates the rotation matrix from the world frame to the current base or follower frame then multiplies the matrix with the vectors resolved in the world frame.

The non-rotating base or non-rotating follower frame is an instantaneous frame that is coincident and aligned with the corresponding base or follower frame at the current time. The measurements resolved in the non-rotating frames do not involve centripetal and Coriolis terms.

The table compares the properties of the measurements for the different Measurement Frame settings.

Measurement FrameStandard Derivative Relationship
WorldYes
BaseYes
FollowerYes
Non-Rotating BaseNo
Non-Rotating FollowerNo

When a selected frame satisfies the standard derivative relationship, the measurements resolved in this frame are related to each other. For example, when you select World, the resolved linear acceleration vector is the time derivative of the resolved linear velocity vector, which is the time derivative of the resolved linear translation vector.

Example

This example shows the measurements of the Transform Sensor block with different settings of Measurement Frame parameter. The image illustrates a single degree-of-freedom system with four parts: a support, hub, rod, and car. The support is fixed on the ground, and the rod connects the hub and car. The base, follower, and world frames of the system are located at the center of the hub, car, and support’s bottom, respectively.

Single DoF System

The rod has a length of r and rotates with a constant angular velocity, ω, around the Z-axis of the base frame. A Transform Sensor block is used to measure the relative motions between the car and hub. For example, the block measures the relative translation, d(t) and rotation, RFB(t) between the car and hub.

The image shows the front view of the system. For simplicity purposes, this example only shows how to resolve linear measurements, such as translation, velocity, and acceleration, in Cartesian coordinates.

System Front View

World

When you set Measurement Frame to World, the block measures the motion of the follower frame with respect to the base frame then resolves the relative motion in the world frame.

Example Word Frame

The translation, velocity, and acceleration vectors have constant magnitudes because the length of the rod is constant. However, they rotate with a constant rotational velocity, ω, around the Y-axis of the world frame. Therefore, the translation, velocity, and acceleration vectors can be expressed as:

dw(t)=r[cosωt0sinωt]

vw(t)=rω[sinωt0cosωt]

aw(t)=rω2[cosωt0sinωt]

Note that the vectors resolved in the world frame always satisfy the standard derivative relationship. For example, aw equals the time derivative of vw.

Base or Follower

When you set Measurement Frame to Base, the block measures the relative motion of the follower frame with respect to the base frame, and resolves the measurements in the base frame's coordinates.

Example Base Frame

Because the base frame is fixed in this example, the measurements can be expressed as:

db(t)=r[cosωtsinωt0]

vb(t)=rω[sinωtcosωt0]

ab(t)=rω2[cosωtsinωt0]

When you set Measurement Frame to Follower, the block measures the relative motion of the follower frame to the base frame then resolves the measurements in the follower frame's coordinates. The resolved vectors include centripetal and Coriolis terms because the follower frame rotates over time. To an observer attached to the follower frame, the base frame's origin never moves. Therefore, linear velocity and linear acceleration are zero.

Example Follower

df(t)=r[001]

vf(t)=rω[000]

af(t)=rω2[000]

Note that the vectors resolved in the base and follower frames always satisfy the standard derivative relationship. For example, vb equals the time derivative of db.

Non-Rotating Base or Non-Rotating Follower

When set Measurement Frame to Non-Rotating Base, the block maps the vectors resolved in the world frame to an instantaneous frame that is coincident and aligned with the base frame at the current moment.

Example Non-Rotating Base

dnb(t)=RWB*dw(t)=r[cosωtsinωt0]

vnb(t)=RWB*vw(t)=rω[sinωtcosωt0]

anb(t)=RWB*aw(t)=rω2[cosωtsinωt0]

When you set Measurement Frame to Non-Rotating Follower, the block maps the vectors resolved in the world frame to an instantaneous frame that is coincident and aligned with the follower frame at the current moment.

Example Non-Rotating Follower

dnf(t)=RWF*dw(t)=r[001]

vnf(t)=RWF*vw(t)=rω[100]

anf(t)=RWF*aw(t)=rω2[001]

Note that if a base or follower frame is not fixed, the measurements in its corresponding non-rotating frame do not satisfy the standard derivative relationship. For example, because the follower frame rotates, if you set Measurement Frame to Non-Rotating Follower, the resolved velocity vector is not the time derivative of the resolved translation vector.

Related Examples

More About