Appendix 3 | The Virtual CRASH Coordinate System
Introduction
Virtual CRASH uses three coordinate systems to fully describe the conditions of a vehicle in motion. The vehicle is defined as a rigid body object that moves under the influences of external forces.
Earth Frame – The Fixed Global Coordinate System
Virtual CRASH uses a right-handed coordinate system in which z-axis is aligned anti-parallel with gravitational acceleration. Note, this is a different convention than SAE in which the z-axis points parallel with gravity. The vehicle center-of-gravity is location specified within a fixed inertial reference (Earth) frame by its (x,y,z) coordinate (see below).
Vehicle Position
Each vehicle has its own local frame of reference. Starting with the vehicle at rest on the ground (x−y) plane at (0,0,zcg), let us define the ˆx′ axis as the unit vector extending from the vehicle center-of-gravity, parallel with the x-y plane, directed to point through the front-end, mid-way between the driver and passenger side (see below). Let us define the ˆy′ axis as the unit-vector orthogonal to the ˆx′ axis, parallel to the x-y plane, extending from the center-of-gravity directed to point through the driver side. Finally, let ˆz′=ˆx′׈y′.
Vehicle Orientation
Transformations from Earth Frame to Vehicle Frame
In Virtual CRASH, vehicle dynamics is simulated in three-dimensions, and therefore requires mathematical representation of vehicle orientations. Vehicle orientations are most conveniently described procedurally, in terms of each the local Vehicle Frame’s orientation with respect to the Earth frame. Starting with a vehicle aligned with the Earth Frame, any arbitrary orientation can be defined with three rotations, applied in order:
(1) First, we apply the yaw rotation. In this case, the yaw rotation transformation matrix taking a vector from Earth Frame to Vehicle Frame is given by:
We can find the yaw angle for a vehicle arbitrarily oriented by projecting the local ˆx′ axis onto the x-y plane. This is given by: ˉx′xy=ˆx′−(ˆx′⋅ˆz)⋅ˆz. The vehicle yaw angle is given by the angle between ˉx′xy and ˆx, which is given by: ˉx′xy|ˉx′xy|⋅ˆx=cosθyaw.
(2) Second, we apply the pitch rotation about the rotated ˆy′ axis. The pitch rotation transformation matrix taking a vector from Earth Frame to Vehicle Frame is given by:
The pitch angle is given by the angle between the ˆx′ axis and ˉx′xy. This is defined by the solution to: ˉx′xy|ˉx′xy|⋅ˆx′=cosθpitch, where the rotations occur about the axis given by ˆx′×ˉx′xy.
(3) Finally, we apply the roll angle. The roll rotation transformation matrix taking a vector from Earth Frame to Vehicle Frame is given by:
Therefore, after first setting θyaw and θpitch, ˆy′ is taken to a new rotated configuration away from its initial pre-rotated configuration ˆy′i. Let us now rotate the vehicle about the local ˆx′ axis such that ˆy′→ˆy′∗. The roll angle is given by the solution to: ˆy′⋅ˆy′∗=cosθroll.
The total transformation matrix T, that takes a vector from Earth Frame to Vehicle Frame, is therefore given by the matrix product:
T=R1R2R3
Tire Orientation
Each tire has its own orientation within the local vehicle frame. Let us define the direction of the jth wheel’s heading by the ˆxj axis. The wheel slip angle αj is given by the angle between the velocity at the wheel hub, ˉvj, and the wheel’s heading ˆxj. The steering angle, φj, is given by the angle between the wheel’s heading ˆxj and the local frame ˆx′ axis.