The CWS consists of three parts, the UWB-based relative positioning and directing system, the DR system based on wheel-speed sensors, and the TTC estimation system. In the following sections, the UWB-based relative positioning/directing system is shortened to the UWB system. In this section, the UWB and DR subsystems are established. Then, an EKF-based fusion algorithm is proposed to integrate UWB with DR, which significantly improves the accuracy of relative position, orientation, and velocity. Finally, the TTC estimation method in several different collision scenarios is put forward.
2.1. The Relative Positioning and Directing System
According to the vehicle axis system regulated by ISO 8855: 2011 [
33], as shown in
Figure 1, the origin is located at the automotive rear axle center. The X-axis points to the forward of the vehicle, and the Y-axis points to the left. In this paper, all proposed systems are established based on this axis system.
Figure 2 shows the UWB system model. XOY represents the coordinate system of vehicle 1. X’O’Y’ represents the coordinate system of vehicle 2. Points 1, 2, 3, and 4 represent the UWB modules on vehicle 1, and points M, N, P, and Q represent the UWB modules on vehicle 2. The coordinate of each UWB module in its own vehicle axis system is known when installed. As
Figure 2,
is defined as the position of module K in the axis system of vehicle 1 and
is defined as the position of module K in the axis system of vehicle 2, where
.
With the distances measured by UWB and the coordinates of UWB modules, the relative position and orientation can be calculated. is the position of vehicle 2 in the axis system of vehicle 1. β is the relative orientation, which means the intersection angle of the two vehicles’ driving directions.
As the ranging precision of UWB is very sensitive to NLOS, not all UWB modules are necessary at the same time. Therefore, only four modules, two on each vehicle, in LOS are picked at the same time. The other modules are used to help distinguish multiple solutions. On account of the high time resolution and low multipath effect of UWB signals, it is not complex to distinguish NLOS and LOS signals.
Figure 2 shows a typical driving scenario. Vehicle 2 is changing lanes to the front of vehicle 1. Apparently, rear-end collision risk exists if vehicle 1 drives faster than vehicle 2 and does not brake. Since the CWS is especially necessary in this condition, we take it as an example to interpret our algorithm. In this case, points 1, 2, M, and N are in LOS. Define
d1,
d2,
d3, and
d4 as the real distances shown in
Figure 2, and
, and
as the corresponding measurements ranged by UWB. Other known parameters include
,
,
,
. Then, we have
As
d1,
d2,
d3, and
d4 are unknown,
, and
are substituted into Equation (1) for the estimated positions of M and N,
and
. Then, the estimated distance between M and N can be calculated by Equation (2).
However, when UWB modules are installed, the real distance between M and N is a determined constant, which can be calculated by Equation (3).
When ranging error exists,
. In order to get the least square (LS) solutions that could better meet all the distances, we rewrite Equation (1) as Equation (4).
Significantly, it is an overdetermined nonlinear equation set with five equations and four unknowns. When ranging error exists, the equation set does not have exact solutions. We define function
g as shown in Equation (5).
Then, the positioning algorithm is converted to an optimization problem with the optimized objective function
g. According to the first-order necessary condition of optimization problems, the partial derivative of the function
g should be zero, which is
Several sets of local optimal solutions may be derived from Equation (6). Define
as the global LS solution that minimizes the objective function
g. Then, we have
The solutions of Equation (7) are much more accurate than those of Equation (1). It will be proved later by simulation in
Section 3. When no real solutions can be solved from Equation (7), we can go back to Equation (1) for solutions instead.
In the example scenario, we can get two sets of solutions that are symmetric about the line determined by point 1 and point 2, as shown in
Figure 3. Dealing with this, ranging information between other UWB modules can be drawn. For example, in
Figure 3, distances
and
can be used to distinguish the two sets of solutions.
After
is solved, the relative orientation
β and position [
x,
y]
T can be derived as
where
.
2.3. The EKF Based UWB/DR Fusion Model
We define
Xk as the state vector at time
k. It contains the relative position/orientation
, as well as yaw rates and velocities of the two vehicles
, which can be expressed as Equation (11).
We define Δ
t as the time period from time
k − 1 to time
k.
Xk can be predicted by
Xk−1 based on the relative kinematics model shown in
Figure 5. The state equation can be expressed on the basis of Equation (10) as Equation (12).
Figure 5.
The relative kinematic model.
Figure 5.
The relative kinematic model.
where
,
,
.
Then, the transition matrix of the state vector
A can be derived as Equation (13).
where
,
,
,
,
,
.
Similarly, the transition matrix of process noise is:
where
,
,
,
,
,
.
The error covariance matrix
Q of process noise consists of error covariances of speeds and yaw rates, that is:
Thus, the predicting process of the model is:
We define
Zk as the observation vector, containing the relative position and orientation of vehicle 2 measured by the UWB system, four wheel-speeds measured by the DR system, and the observation noise
Vk. Then, the observation equation can be expressed as Equation (17).
Referring to Equation (9), the velocities and yaw rates of the two vehicles can be expressed by the velocities measured by wheel-speed sensors as Equation (18).
Then, the Jacobian matrix
H is obtained as Equation (19).
The estimating process is:
In Equation (20),
R represents the error covariance matrix of
Zk. It can be divided into the error covariance matrix of the UWB system
RUWB and the error covariance matrix of the DR system
RDR. That is:
where
,
.
RDR is decided by measurement errors of the wheel-speed sensors directly, whereas
RUWB is decided by positioning and directing errors, which is indirectly decided by the ranging error of UWB modules. Define
D = [
d1,
d2,
d3,
d4]. On the basis of Equation (5), we can derive the relationship between the deviation
D and the deviation of UWB modules’ position
XM and
XN as Equation (22).
d5 is ignored because it is not a measurement but a constant, which means
.
FD can be derived as Equation (23).
where
,
,
,
,
,
,
,
.
From Equation (8), we can get the relationship between the deviation of the vehicle position and orientation
XUWB = [
x,
y,
β] and the deviation of the UWB modules’ position
XM and
XN as Equation (24).
can be derived as Equation (25).
where
,
,
,
,
,
,
,
,
,
.
Then,
RUWB can be expressed as Equation (26).
where
is determined directly by UWB ranging error covariance.
2.4. The Collision Warning Model
CWS mainly works in two ways, headway measurement warning (HMW) and TTC-based warning [
34]. Both of them need to measure the distance to the front vehicle but estimate the collision time with different speeds as Equation (27).
The TTC-based system takes relative velocity into account, so it provides a more accurate collision warning. In this paper, the proposed system allows vehicles to share information through UWB, such as velocities. The TTC method is apparently the better choice.
Two vehicles driving on the road have the probability of collisions in various types, such as head-to-head collision, rear-end collision, and side collision. Different kinds of collisions may happen at different times. That means all cases need to be taken into account in order to obtain the exact TTC. Before establishing the collision warning model, we simplified the shape of a vehicle as a rectangle. With this assumption, all kinds of collisions can be described as point-to-edge collisions. Edge-to-edges collisions and point-to-point collisions are also covered by point-to-edge collisions, as shown in
Figure 6.
After unifying different collision types, TTC can be calculated in the same way. We take the collision type shown in
Figure 7 as an example. In this case, the front left corner of vehicle 2 collides on the right edge of vehicle 1. As we defined in
Section 2.1, the coordinate of a point in the axis system of vehicle 1 is expressed as
, and
in the axis system of vehicle 2.
Ri (
i = 1,2,3,4) represents the four corners of vehicle 1.
Fi (
i = 1,2,3,4) represents the four corners of vehicle 2. Therefore, the coordinate of
is
, which is known by measuring the size of the vehicle 1. Similarly,
is also known by measuring the size of vehicle 2. The relative position of
X = [
x,
y]
T and the relative orientation
β are estimated by the UWB/DR system. Then, the coordinates of vehicle 2′s corners in the axis system of vehicle 1 can be derived as Equation (28).
where
.
We define all the points at the collision time as
and
, and their coordinates as
,
. The velocity vectors of the two vehicles are known for the UWB/DR system, which are
and
. Assume that point
collides on the edge between
and
Rk at time
. Then
,
, and
can be expressed as Equation (29).
Point
Fi collides on the edge between
Rj and
Rk means
is on the segment
, which can be expressed as Equation (30).
Solution
t of Equation (30) is the collision time under the condition that corners of vehicle 2 collide on edges of vehicle 1, including 16 different conditions altogether. In the other 16 cases in which the corners of vehicle 1 collide on the edges of vehicle 2, the collision times can be calculated similarly. Thirty-two collision times can be calculated in total. Ignoring negative values, the minimum of the rest value is TCC. That is:
When TTC → ∞ or TTC < 0, there is no risk of collision.