# Lane-Changing Model of Intelligent Connected Vehicle Considering the Factor of Turn Signal

Authors: Yi Shao; Xuefeng Deng; Jiaxin Song; Hui Wu
Journal: Journal of Advanced Transportation
 (2022)

---

## Abstract

Unsafe lane-changing behaviors can easily lead to traffic accidents. Drivers usually turn on their turn signals to signal surrounding vehicles before changing lanes. At present, there is a lack of consideration of the impact of turn signals on the lane-changing behavior of intelligent vehicles. Therefore, based on the cellular automata theory, this paper improves the lane-changing rules in the STNS model and proposes a vehicle safe lane-changing model. The model considers the priority scheduling problem of different vehicles’ driving behavior when changing lanes, the influence of driver’s subjective factors on the driving speed when changing lanes, and the relationship between vehicle speed and safe lane-changing distance. After discussion and analysis, the model can reduce the number of lane changes of vehicles, increase the average speed of vehicles, and increase the traffic flow. It provides theoretical support for the safe lane-changing behavior of intelligent networked vehicles in the new era.


---

## Body

## 1. Introduction

Intelligent networked vehicles have the characteristics of safety, comfort, and efficiency [1] and are an important research direction of future automotive technology [2]. The simulation modeling analysis of traffic flow characteristics is of great significance to the decision-making mechanism of intelligent networked vehicles [3]. Lane-changing of vehicles is a decision-making behavior, which is affected by many factors such as road conditions, driver needs, and surrounding vehicle behaviors [4]. The use of turn signals can reduce the possibility of accidents and have a significant impact on the safe lane-changing of vehicles [5].The lane-changing behavior of vehicles has aroused fierce discussion among scholars due to its characteristics of commonness, uncertainty and complexity [6] and its tendency to cause traffic accidents [7]. Based on the analysis of the vehicle’s lane-changing environment and driving trajectory, the lane-changing behavior of intelligent networked vehicles was predicted by Du et al. [8]. And its experimental results show that the prediction model based on machine learning has high accuracy in predicting the lane-changing behavior and can effectively assist the lane-changing behavior decision-making of intelligent networked vehicles. A dynamic cooperative lane-changing model based on connected autonomous vehicles was proposed by Wang et al. [9], which analyzed the probabilistic acceleration of the preceding vehicle under the condition of intelligent network connection and effectively reduced the impact of lane-changing behavior on surrounding vehicles. A model for lane-changing behavior decision based on Nash Q-learning was established by Zhou et al. [10], which took into account the interactions of surrounding vehicles. And its results show that the model is safer than the existing rule-based vehicle lane-changing model. Song et al. [11] discussed and analyzed the lane-changing model under the condition of intelligent networked vehicles and distracted driving behaviors, summarized the innovative ways of lane-changing model under the condition of intelligent networked vehicles, and proposed to strengthen the research on the distracted driving behavior lane-changing model.Cellular automata can simulate complex systems with simple rules [12] and are suitable for traffic flow simulation because of its characteristics of discreteness and randomness [13]. As a powerful tool for traffic flow simulation [14], cellular automata have been extensively studied in the modeling of vehicle lane-changing behavior [15]. Jian et al. [16] used cellular automata theory to study the lane-changing process of vehicles on symmetrical two-lane lanes, which formulated the lateral movement rules for vehicle lane-changing, and discussed the relationship between vehicle lane-changing duration and traffic flow density. Xiang et al. [17] proposed an improved two-lane cellular automaton traffic flow model with dynamic lane-changing probability considering the influence of brake lights on lane-changing behavior, which effectively improves traffic congestion and inhibits the emergence of wide congestion bands. Taking the viaduct as the object, Jiang et al. [18] researched two-lane mixed traffic flow based on cellular automata, which took into account drivers’ lane-changing intentions. The results showed that compared with the classic NaSch model and STCA model, the numerical simulation results of this model had higher fitting ability with the actual traffic flow data. According to the different collision handling strategies adopted by different drivers during multilane driving, a multistrategy vehicle lane-changing model with random update based on cellular automata theory was proposed by Deng et al. [19].In the research on the lane-changing behavior of intelligent networked vehicles, there is a lack of consideration of the turn signal factors when the actual vehicle changes lanes. In real traffic, the turn signal has an important influence on the vehicle’s lane-changing behavior, which needs to be discussed and analyzed. Cellular automata model and simulate the lane-changing behavior of vehicles on multiple lanes, which can effectively display the characteristics of traffic flow. As an emerging product, intelligent networked vehicles have become a hot topic of current research, but there are few studies on it based on cellular automata model. Therefore, the cellular automata model considering the influence of turn signal factors needs further research.In this paper, based on cellular automata, the lane-changing rules of STNS model considering turn signals are discussed, and an improved safe lane-changing model for intelligent networked vehicles is established. It provides a theoretical basis for the intelligent decision-making system of the vehicle.The main contribution of this paper is to study the traffic flow characteristics of intelligent networked vehicles by improving the lane-changing rules in the STNS model considering the turn signal factor. The improvements to the lane-changing rules in the STNS model are as follows: First, in order to match the actual lane-changing situation, a high-priority scheduling algorithm is introduced into the multilane traffic flow simulation modeling. Second, in order to consider the impact of drivers’ subjective factors on the speed update when changing lanes, drivers are divided into three categories: radicals, centrists, and conservatives. And in this way, acceleration and deceleration behaviors with probability distribution can be generated according to different driving needs. Third, for driving safety and avoiding rear-end collisions, the value of the safe distance between vehicles changes dynamically according to the driving conditions of surrounding vehicles.


## 2. Analysis of Factors Affecting the Lane-Changing Safety

### 2.1. Scheduling Problem of Vehicle Micro Behavior

High-priority scheduling algorithm is a scheduling algorithm that gives priority to urgent processes in the program [20]. According to actual needs, priority scheduling algorithms are usually divided into nonpreemptive priority scheduling algorithms [21] and preemptive priority scheduling algorithms [22]. The nonpreemptive priority scheduling algorithm means that when the system allocates CPU resources to the process with the highest priority among the currently ready processes, the process will occupy the CPU resources until the execution ends, unless the process itself voluntarily gives up CPU resources. The preemptive priority scheduling algorithm means that the system allocates CPU resources to the current ready process with the highest priority for execution. But when a higher priority process appears in the ready queue, the currently executing process is stopped, and CPU resources will be allocated to the new higher priority ready process. The priority of a process can be divided into static priority and dynamic priority [23]. Static priority means that once the process is created, the priority of the process is determined and remains unchanged throughout the execution process. Dynamic priority means that the process is given an initial priority when it is created, and the priority of the process will change as the program execution changes, in order to pursue better scheduling performance.In the microscopic traffic flow modeling, it is mainly divided into car-following behavior and lane-changing behavior. Because cellular automata have parallelism [24], lane-changing rules and car-following rules are given equal priority in traffic flow modeling based on cellular automata theory. However, in actual traffic, drivers often judge the distance between front and rear vehicles by observing the rearview mirror to determine whether to change lanes. Under the condition that the lane-changing is determined, the turn signal on the corresponding side will be turned on to indicate the intention of the surrounding vehicles to change lanes, so that the surrounding vehicles can be prepared. When the rear vehicle captures the lane-changing information of the preceding vehicle, it will not continue the car-following behavior but will produce the vehicle avoidance behavior mainly to slow down, which is convenient for the lane-changing operation of the vehicle and avoids traffic accidents caused by the close distance. It can be seen that the priority of the car-following behavior and the lane-changing behavior during the multilane vehicle driving process is different, and the priority of vehicle lane-changing behavior should be higher than that of car-following behavior. Therefore, in order to match the real-world lane-changing situation, we introduce a high-priority priority scheduling algorithm into the multilane traffic flow modeling.


### 2.2. Subjective Factors of the Driver

At this stage, with the support of the Internet of vehicles technology, intelligent connected vehicles can easily obtain the information parameters of surrounding vehicles [25]. With a full understanding of the physical information of surrounding vehicles, the subjective characteristics of driving become an unstable factor affecting road traffic safety [26].Drivers are divided into radicals, centrists, and conservatives according to their driving styles. Radical drivers are more concerned about the driver’s personal experience feeling of driving the road in lane-changing. Conservative drivers pay more attention to driving safety in the process of lane-changing to avoid traffic accidents as much as possible. Centrist drivers pursue the experience feeling of driving on the road based on the minimum safe car distance. Different types of drivers will make different choices according to different driving demands, whether in lane-changing decision or in the change of speed in lane-changing.The lane-changing behavior of vehicles can be divided into two categories: free lane-changing and forced lane-changing according to the driver’s different lane-changing motives. Free lane-changing is a lane-change behavior generated according to the driver’s subjective pursuit of faster speed. Forced lane change is a lane-changing behavior caused by external reasons such as road construction and traffic accidents that cause drivers to take emergency obstacle avoidance measures. In the process of changing lanes, it is easy to cause traffic accidents caused by the driver’s personal factors, for example, poor physical condition, poor mental quality, poor driving skills, and violation of traffic rules. After the vehicle has changed lanes, the vehicle will travel a certain distance on the new road. At this time, if the driving effect of the new road does not meet expectations, the driver will continue to change lanes until the driver’s requirements for the driving road are met.


### 2.3. Safe Vehicle Distance for Lane-Changing

Since improper lane-changing behavior can easily cause traffic accidents, in order to avoid accidental collisions between lane-changing vehicles and the following vehicles after lane-changing, it is necessary to judge the distance between the front and rear vehicles. When the vehicle changes lanes, the necessary separation distance between the position of the vehicle after the lane-changing and the rear vehicle after the lane-changing is called the safe distance [27]. When the vehicle has lane-changing decision, it is necessary to consider whether the safe vehicle distance is satisfied before performing lane-changing operation.The safe car distance is not a fixed value and usually changes dynamically according to the specific situation of driving [28]. Generally speaking, the faster the vehicle speed and the heavier the body weight, the longer the required safe distance. In addition, the road conditions, the car material, the weather effects, and the driver’s reaction speed will all have an impact on the determination of the safe distance between vehicles. Among them, speed is the most direct factor that has the greatest influence on safety distance. Table 1 shows the reference safety distances for different vehicle speeds sorted out according to relevant new and old traffic regulations. In order to ensure that no rear-end collision will occur in any extreme situation, it is necessary to consider the speed factor of the vehicle into the safe distance in traditional multilane cellular automata vehicle lane-changing behavior.Table 1
Reference safety distances at different speeds.
Speed (km/h)Safety distance (m)100≤v≥10060≤v<100=v×h/100040≤v<60≥5020≤v<40≥300≤v<20≥10


## 2.1. Scheduling Problem of Vehicle Micro Behavior

High-priority scheduling algorithm is a scheduling algorithm that gives priority to urgent processes in the program [20]. According to actual needs, priority scheduling algorithms are usually divided into nonpreemptive priority scheduling algorithms [21] and preemptive priority scheduling algorithms [22]. The nonpreemptive priority scheduling algorithm means that when the system allocates CPU resources to the process with the highest priority among the currently ready processes, the process will occupy the CPU resources until the execution ends, unless the process itself voluntarily gives up CPU resources. The preemptive priority scheduling algorithm means that the system allocates CPU resources to the current ready process with the highest priority for execution. But when a higher priority process appears in the ready queue, the currently executing process is stopped, and CPU resources will be allocated to the new higher priority ready process. The priority of a process can be divided into static priority and dynamic priority [23]. Static priority means that once the process is created, the priority of the process is determined and remains unchanged throughout the execution process. Dynamic priority means that the process is given an initial priority when it is created, and the priority of the process will change as the program execution changes, in order to pursue better scheduling performance.In the microscopic traffic flow modeling, it is mainly divided into car-following behavior and lane-changing behavior. Because cellular automata have parallelism [24], lane-changing rules and car-following rules are given equal priority in traffic flow modeling based on cellular automata theory. However, in actual traffic, drivers often judge the distance between front and rear vehicles by observing the rearview mirror to determine whether to change lanes. Under the condition that the lane-changing is determined, the turn signal on the corresponding side will be turned on to indicate the intention of the surrounding vehicles to change lanes, so that the surrounding vehicles can be prepared. When the rear vehicle captures the lane-changing information of the preceding vehicle, it will not continue the car-following behavior but will produce the vehicle avoidance behavior mainly to slow down, which is convenient for the lane-changing operation of the vehicle and avoids traffic accidents caused by the close distance. It can be seen that the priority of the car-following behavior and the lane-changing behavior during the multilane vehicle driving process is different, and the priority of vehicle lane-changing behavior should be higher than that of car-following behavior. Therefore, in order to match the real-world lane-changing situation, we introduce a high-priority priority scheduling algorithm into the multilane traffic flow modeling.


## 2.2. Subjective Factors of the Driver

At this stage, with the support of the Internet of vehicles technology, intelligent connected vehicles can easily obtain the information parameters of surrounding vehicles [25]. With a full understanding of the physical information of surrounding vehicles, the subjective characteristics of driving become an unstable factor affecting road traffic safety [26].Drivers are divided into radicals, centrists, and conservatives according to their driving styles. Radical drivers are more concerned about the driver’s personal experience feeling of driving the road in lane-changing. Conservative drivers pay more attention to driving safety in the process of lane-changing to avoid traffic accidents as much as possible. Centrist drivers pursue the experience feeling of driving on the road based on the minimum safe car distance. Different types of drivers will make different choices according to different driving demands, whether in lane-changing decision or in the change of speed in lane-changing.The lane-changing behavior of vehicles can be divided into two categories: free lane-changing and forced lane-changing according to the driver’s different lane-changing motives. Free lane-changing is a lane-change behavior generated according to the driver’s subjective pursuit of faster speed. Forced lane change is a lane-changing behavior caused by external reasons such as road construction and traffic accidents that cause drivers to take emergency obstacle avoidance measures. In the process of changing lanes, it is easy to cause traffic accidents caused by the driver’s personal factors, for example, poor physical condition, poor mental quality, poor driving skills, and violation of traffic rules. After the vehicle has changed lanes, the vehicle will travel a certain distance on the new road. At this time, if the driving effect of the new road does not meet expectations, the driver will continue to change lanes until the driver’s requirements for the driving road are met.


## 2.3. Safe Vehicle Distance for Lane-Changing

Since improper lane-changing behavior can easily cause traffic accidents, in order to avoid accidental collisions between lane-changing vehicles and the following vehicles after lane-changing, it is necessary to judge the distance between the front and rear vehicles. When the vehicle changes lanes, the necessary separation distance between the position of the vehicle after the lane-changing and the rear vehicle after the lane-changing is called the safe distance [27]. When the vehicle has lane-changing decision, it is necessary to consider whether the safe vehicle distance is satisfied before performing lane-changing operation.The safe car distance is not a fixed value and usually changes dynamically according to the specific situation of driving [28]. Generally speaking, the faster the vehicle speed and the heavier the body weight, the longer the required safe distance. In addition, the road conditions, the car material, the weather effects, and the driver’s reaction speed will all have an impact on the determination of the safe distance between vehicles. Among them, speed is the most direct factor that has the greatest influence on safety distance. Table 1 shows the reference safety distances for different vehicle speeds sorted out according to relevant new and old traffic regulations. In order to ensure that no rear-end collision will occur in any extreme situation, it is necessary to consider the speed factor of the vehicle into the safe distance in traditional multilane cellular automata vehicle lane-changing behavior.Table 1
Reference safety distances at different speeds.
Speed (km/h)Safety distance (m)100≤v≥10060≤v<100=v×h/100040≤v<60≥5020≤v<40≥300≤v<20≥10


## 3. Vehicle Safety Lane-Changing Model Establishment

### 3.1. Existing Vehicle Lane-Changing Models

Nagel and Schreckenberg proposed the classic NaSch model [29] in 1992, which introduced cellular automata theory into the modeling of single-lane highways. The NaSch model simulates the characteristics of single-lane traffic flow, using four evolutionary rules of acceleration, deceleration, random slowing, and position update. The pseudocode for the NaSch model is shown in Algorithm 1 below. Xn is the position of vehicle n, and Vn is the speed of vehicle n. Dn is the distance between vehicle n and vehicle n+1, and Dn=Xn+1−Xn−L, where L is the length of vehicle. Vmax is the maximum allowed speed of the vehicle.Algorithm 1: NaSch model.
NaSch model:1: Forn=1: number of vehicles2:Vn=minVn+1,Vmax; %acceleration;3:Vn=minVn,Dn;      %deceleration;4: Ifrand1<=p       %p is the probability of randomly slowing down;5:Vn=maxVn−1,0; %random slowing down;6: End7:Xn=Xn+Vn;     %position update;8: EndIn actual road traffic, multilane situation is more common and accompanied by the occurrence of vehicle lane-changing behavior. As a classic case of cellular automata applied to two-lane traffic flow, the STNS model was proposed by Chowdhury et al. [30] in 1997. In this model, lane-changing rules are introduced based on the traditional single-lane NaSch model by analyzing two aspects of the vehicle’s lane-changing motivation and safety lane-changing conditions. There are two vehicle behavior states in the STNS model, one is the state in which the vehicle satisfies the lane-changing condition to perform the lane-changing behavior, and the other is the state in which the vehicle updates its position according to the single-lane vehicle following rules without changing lanes. Among them, the lane-changing condition is further divided into two parts. One is the driver’s lane-changing motivation, which determines whether the driver has the idea of changing lanes. The driving conditions of neighbor lane are required to be better than that of the current lane, and the driver’s desired speed cannot be met in this lane. The second is the safe distance between vehicles. When the driver is willing to change lanes, it is necessary to see whether the conditions for the vehicle to change lanes safely are met. It is required that the front and rear vehicles after changing lanes need to maintain a certain safe distance to avoid traffic accidents.Lane-changing rules of STNS model are as follows:(1)
Lane-changing motivation:(1)Dn<minVn+1,Vmax,andDn,other>Dn.The first formula indicates that driving in this lane cannot meet the driver’s expected speed, and the second formula indicates that the road driving conditions of the neighbor lane are better than this lane. Both equations must be satisfied to produce a lane-changing motive.(2)
Safety conditions:(2)Dn,back>Dsafe.This formula indicates that there is a safe distance between the position after the lane change and the vehicle behind to ensure the safety of lane-changing.In the formula, the meanings ofXn, Vn, Dn, and Vmax are consistent with those in the NaSch model above. Dn,other represents the distance between vehicle n and the vehicle in front of the neighboring lane. Dn,back represents the distance between vehicle n and the vehicle behind the neighboring lane. Dsafe represents a safe distance that ensures that the front and rear vehicles will not cause rear-end collisions.The pseudocode of STNS model is shown in Algorithm2 below.Algorithm 2: Lane-changing rules of STNS model.
Lane-changing rules of STNS model:1: Forn=1: number of vehicles2:Vn=minVn+1,Vmax;  %acceleration;3:Vn=minVn,Dn;      %deceleration;4:  If (Dn<minVn+1,Vmax)&&(Dn,other>Dn)&&(Dn,back>Dsafe) %lane-changing phase;5:spacem,n=0;         %spacem,n represents m rows and n columns;6:   Ifm==17:temp=2;8:m1=temp;9:   Else10:temp=1;11:m1=temp;12:     End13:spacem1,n=1;      %0 means no car and 1 means car;14:    End15:    Ifrand1<=p       %p is the probability of random slowing down;16:Vn=maxVn−1,0;     %random slowing down;17:    End18:Xn=Xn+Vn;         %position update;19: End


### 3.2. Improved Vehicle Safety Lane-Changing Model

The improved vehicle safety lane-changing model has the following improvements to the vehicle lane-changing rules based on the STNS model:The pseudocode for introducing the high-priority scheduling algorithm is shown in Algorithm3. Since the surrounding vehicles will decelerate according to the side turn signal of the vehicle that intends to change lanes, it can be known that when the vehicle’s lane-changing intention is generated, the vehicle’s lane-changing behavior belongs to the real-time task and will be given the highest priority and can be scheduled first. The surrounding vehicles will perform the deceleration operation to facilitate the preceding vehicle to change lanes to replace the previous car-following behavior, that is, the car-following behavior of the vehicle belongs to the general task and its priority is lower than the lane-changing behavior. When a high-priority process occurs, the executing low-priority process is stripped, and the high-priority task is scheduled first. When the model is initialized, the priority of the car-following behaviors and lane-changing behaviors of vehicle is determined and remains constant throughout the operation of the program. Therefore, we adopt a preemptive priority scheduling algorithm with static priority to process the lane-changing behavior of vehicles, in which the lane-changing behavior of vehicles is given the highest priority.Algorithm 3:Introduce the high-priority scheduling algorithm.
Introduce the high-priority scheduling algorithm:1:w=0;  %the initial weight is 0;2: If exist lane-changing motivation3:flag=1;   %flag=1, turn on the turn signal;4:w=100;  %lane-changing vehicles are given the highest priority;5:  Ifw=100 && meet the conditions for safe lane-changing6:   Lane-changing behavior;7:  Else if8:   Car-following behavior;9:  End10: EndThe pseudocode for introducing the driver factor is shown in Algorithm4. According to the subjective factors of driving, the drivers are divided into radicals, centrists, and conservatives. Considering the condition of the vehicle turn signal, the lane-changing behavior of different types of drivers needs to be handled differently. During the lane-changing process, different types of drivers produce acceleration and deceleration behaviors with probability distribution according to different personal needs. When making a lane-changing decision, radical drivers use acceleration to complete the lane-changing operation, which considers the avoidance behavior of surrounding vehicles when the turn signal is turned on. Conservative drivers slow down during lane-changing to ensure safety even when turning signals are turned on. Centrist driver turns on the turn signal and keeps the speed of the original vehicle unchanged when the vehicle changes lanes at the minimum safe distance.Algorithm 4: Introduce the driver factor.
Introduce the driver factor:1:r=rand1; %generate a random number between 0 and 1;2: Ifflag==1%flag=1, turn on the turn signal;3:  Ifr>p1%p1, p2, and p3 represent different probability values;4:Vn=minVn+1,Vmax;  %acceleration;5:  Else ifr>p2    %p1>p2>p3;6:Vn=Vn;  %do not change speed;7:  Else ifr>p38:Vn=maxVn−1,0;     %deceleration;9:  End10: EndThe pseudocode considering the relationship between speed and safe vehicle distance is shown in Algorithm5, where Don is the distance when the turn signal is turned on and Doff is the distance when the turn signal is turned off, and p1 and p2 take value 0 or 1. In real traffic, safe vehicle distance is a value that changes dynamically with the driving conditions of the surrounding vehicles. When the vehicle changes lanes, the driving behavior of surrounding vehicles will be affected by the turn signal. Therefore, the safe distance cannot be initialized as a fixed parameter. When the vehicle changes lanes, if the turn signal is turned on, the surrounding vehicles will have avoidance behavior, and the required safe distance will be reduced. When the vehicle changes lanes, if the turn signal is forgotten to be turned on, since the surrounding vehicles do not know whether the vehicle in front wants to change lanes or not, they will continue to drive forward according to the car-following rules, and the required safety distance increases at this time. In most cases, there is a positive proportional relationship between the safe distance and the speed of vehicles during lane-changing. In addition, rain and snow weather, uphill and downhill, driver fatigue, etc., affect the braking effect of the vehicle and then affect the safe distance. Therefore, vehicle speed and other factors should be considered when analyzing the length of safe vehicle distance under lane-changing behavior.Algorithm 5: Consider the effect of vehicle speed on safe distance.
Consider the effect of vehicle speed on safe distance:1:D1=Don×p1+Doff×p2;  %consider the turn signal factor;2:Dsafe=D1+λ×Vn;       %λ is a parameter;


### 3.3. Simulation and Analysis of the Improved Models

This experiment takes two lanes as an example to compare and analyze the old and new models of vehicle safe lane-changing. Set the vehicle driving direction of the model as from left to right. The cellular space of roads was initialized to a grid of2×100. The simulation step size was set as 1000. The maximum vehicle speed was 5 cells per step, and the random slowing probability of the vehicle was 0.3. The quantity of vehicles on the road is calculated according to different vehicle occupancy, which is randomly distributed in the two lanes 1 and 2. Figure 1 is the initial road map under different vehicle occupancy.Figure 1
Initialization of roads under different occupancy.First, the relationship between the number of vehicle lane changes and the space occupancy rate is analyzed. As shown in Figure2, the red curve is the STNS model, and the blue curve is the improved vehicle safe lane-changing model. On the general trend, when the space occupancy rate is small, with the increase of the vehicle space occupancy rate, the number of lane changes shows an upward trend. When the space occupancy rate reaches a certain value, the number of lane changes reaches the maximum value. When the space occupancy rate exceeds the certain value, as the space occupancy rate increases, the number of lane changes begins to decrease until it reaches zero. Under the same space occupancy rate, the number of lane changes of the improved vehicle safety lane-changing model is significantly lower than that of the STNS model, and the driving safety of the road under the improved model is improved. The improved vehicle safety lane-changing model starts to change lanes when the space occupancy is about 0.15, which is significantly later than the STNS model. It indicates that the improved model can meet the driving needs of drivers in the road environment with low space occupancy rate, so there is no need to change lanes. The improved vehicle safety lane-changing model reached the peak of lane-changing times at a space occupancy rate of about 0.3, which was later than the STNS model. The improved model entered the stage of frequent lane-changing only after accommodating more vehicles. The improved vehicle safety lane-changing model performs lane-changing in the space occupancy rate interval of 0.15 to 0.8, while the STNS model performs lane-changing in the space occupancy rate interval of 0 to 0.8. The improved model has a smaller lane-changing interval and is more adaptable to the road environment. When the space occupancy rate of both the improved model and STNS model is 0.8, the lane-changing was stopped. At this time, the number of vehicles reaches the maximum bearing value of the road, and the lane-changing behavior of vehicles cannot be carried out on the road due to congestion.Figure 2
Lane-changing times-space occupancy figure.Second, the relationship between traffic flow and density was analyzed. As shown in Figure3, the red curve is the STNS model, and the blue curve is the improved vehicle safe lane-changing model. On the general trend, when the density value is smaller, with the increase of the density, the traffic flow also increases. When the density reaches a certain value, the traffic flow reaches the maximum value. When the density is greater than a certain value, the traffic flow decreases gradually with the increase of density. Both the improved vehicle safe lane-changing model and the STNS model achieve the maximum traffic flow when the density value is around 35 (veh/cellular space). The maximum value of the traffic flow in the improved model is larger than that in the STNS model. In the density range from 35 to 55 (veh/cellular space), the traffic flow value of the improved model is larger than that of the STNS model. It is shown that the improved safe lane-changing model has larger traffic flow, larger free flow area and delayed traffic congestion compared with STNS model.Figure 3
Flow-density figure.Third, the relationship between the average vehicle speed and the space occupancy is analyzed. As shown in Figure4, the red curve is the STNS model, and the blue curve is the improved vehicle safe lane-changing model. On the general trend, in the case of low space occupancy, the average speed of the vehicle is the highest, and the road is in a free flow state. When the space occupancy rate reaches a certain value, with the increase of the space occupancy, the average speed begins to decrease, and traffic congestion occurs. The improved vehicle safe lane-changing model begins to have traffic jams when the space occupancy is about 0.15, and the STNS model begins to experience traffic jams when the space occupancy is about 0.1. Compared with the STNS model, the improved model has a larger free flow area and enters the congestion area later. When the space occupancy is 0.1 to 0.25, the improved safe lane-changing model has higher average speed and better driving conditions than the STNS model. The average vehicle speed values of under the remaining space occupancy are almost the same, and there is no major difference.Figure 4
Average speed-space occupancy figure.


## 3.1. Existing Vehicle Lane-Changing Models

Nagel and Schreckenberg proposed the classic NaSch model [29] in 1992, which introduced cellular automata theory into the modeling of single-lane highways. The NaSch model simulates the characteristics of single-lane traffic flow, using four evolutionary rules of acceleration, deceleration, random slowing, and position update. The pseudocode for the NaSch model is shown in Algorithm 1 below. Xn is the position of vehicle n, and Vn is the speed of vehicle n. Dn is the distance between vehicle n and vehicle n+1, and Dn=Xn+1−Xn−L, where L is the length of vehicle. Vmax is the maximum allowed speed of the vehicle.Algorithm 1: NaSch model.
NaSch model:1: Forn=1: number of vehicles2:Vn=minVn+1,Vmax; %acceleration;3:Vn=minVn,Dn;      %deceleration;4: Ifrand1<=p       %p is the probability of randomly slowing down;5:Vn=maxVn−1,0; %random slowing down;6: End7:Xn=Xn+Vn;     %position update;8: EndIn actual road traffic, multilane situation is more common and accompanied by the occurrence of vehicle lane-changing behavior. As a classic case of cellular automata applied to two-lane traffic flow, the STNS model was proposed by Chowdhury et al. [30] in 1997. In this model, lane-changing rules are introduced based on the traditional single-lane NaSch model by analyzing two aspects of the vehicle’s lane-changing motivation and safety lane-changing conditions. There are two vehicle behavior states in the STNS model, one is the state in which the vehicle satisfies the lane-changing condition to perform the lane-changing behavior, and the other is the state in which the vehicle updates its position according to the single-lane vehicle following rules without changing lanes. Among them, the lane-changing condition is further divided into two parts. One is the driver’s lane-changing motivation, which determines whether the driver has the idea of changing lanes. The driving conditions of neighbor lane are required to be better than that of the current lane, and the driver’s desired speed cannot be met in this lane. The second is the safe distance between vehicles. When the driver is willing to change lanes, it is necessary to see whether the conditions for the vehicle to change lanes safely are met. It is required that the front and rear vehicles after changing lanes need to maintain a certain safe distance to avoid traffic accidents.Lane-changing rules of STNS model are as follows:(1)
Lane-changing motivation:(1)Dn<minVn+1,Vmax,andDn,other>Dn.The first formula indicates that driving in this lane cannot meet the driver’s expected speed, and the second formula indicates that the road driving conditions of the neighbor lane are better than this lane. Both equations must be satisfied to produce a lane-changing motive.(2)
Safety conditions:(2)Dn,back>Dsafe.This formula indicates that there is a safe distance between the position after the lane change and the vehicle behind to ensure the safety of lane-changing.In the formula, the meanings ofXn, Vn, Dn, and Vmax are consistent with those in the NaSch model above. Dn,other represents the distance between vehicle n and the vehicle in front of the neighboring lane. Dn,back represents the distance between vehicle n and the vehicle behind the neighboring lane. Dsafe represents a safe distance that ensures that the front and rear vehicles will not cause rear-end collisions.The pseudocode of STNS model is shown in Algorithm2 below.Algorithm 2: Lane-changing rules of STNS model.
Lane-changing rules of STNS model:1: Forn=1: number of vehicles2:Vn=minVn+1,Vmax;  %acceleration;3:Vn=minVn,Dn;      %deceleration;4:  If (Dn<minVn+1,Vmax)&&(Dn,other>Dn)&&(Dn,back>Dsafe) %lane-changing phase;5:spacem,n=0;         %spacem,n represents m rows and n columns;6:   Ifm==17:temp=2;8:m1=temp;9:   Else10:temp=1;11:m1=temp;12:     End13:spacem1,n=1;      %0 means no car and 1 means car;14:    End15:    Ifrand1<=p       %p is the probability of random slowing down;16:Vn=maxVn−1,0;     %random slowing down;17:    End18:Xn=Xn+Vn;         %position update;19: End


## 3.2. Improved Vehicle Safety Lane-Changing Model

The improved vehicle safety lane-changing model has the following improvements to the vehicle lane-changing rules based on the STNS model:The pseudocode for introducing the high-priority scheduling algorithm is shown in Algorithm3. Since the surrounding vehicles will decelerate according to the side turn signal of the vehicle that intends to change lanes, it can be known that when the vehicle’s lane-changing intention is generated, the vehicle’s lane-changing behavior belongs to the real-time task and will be given the highest priority and can be scheduled first. The surrounding vehicles will perform the deceleration operation to facilitate the preceding vehicle to change lanes to replace the previous car-following behavior, that is, the car-following behavior of the vehicle belongs to the general task and its priority is lower than the lane-changing behavior. When a high-priority process occurs, the executing low-priority process is stripped, and the high-priority task is scheduled first. When the model is initialized, the priority of the car-following behaviors and lane-changing behaviors of vehicle is determined and remains constant throughout the operation of the program. Therefore, we adopt a preemptive priority scheduling algorithm with static priority to process the lane-changing behavior of vehicles, in which the lane-changing behavior of vehicles is given the highest priority.Algorithm 3:Introduce the high-priority scheduling algorithm.
Introduce the high-priority scheduling algorithm:1:w=0;  %the initial weight is 0;2: If exist lane-changing motivation3:flag=1;   %flag=1, turn on the turn signal;4:w=100;  %lane-changing vehicles are given the highest priority;5:  Ifw=100 && meet the conditions for safe lane-changing6:   Lane-changing behavior;7:  Else if8:   Car-following behavior;9:  End10: EndThe pseudocode for introducing the driver factor is shown in Algorithm4. According to the subjective factors of driving, the drivers are divided into radicals, centrists, and conservatives. Considering the condition of the vehicle turn signal, the lane-changing behavior of different types of drivers needs to be handled differently. During the lane-changing process, different types of drivers produce acceleration and deceleration behaviors with probability distribution according to different personal needs. When making a lane-changing decision, radical drivers use acceleration to complete the lane-changing operation, which considers the avoidance behavior of surrounding vehicles when the turn signal is turned on. Conservative drivers slow down during lane-changing to ensure safety even when turning signals are turned on. Centrist driver turns on the turn signal and keeps the speed of the original vehicle unchanged when the vehicle changes lanes at the minimum safe distance.Algorithm 4: Introduce the driver factor.
Introduce the driver factor:1:r=rand1; %generate a random number between 0 and 1;2: Ifflag==1%flag=1, turn on the turn signal;3:  Ifr>p1%p1, p2, and p3 represent different probability values;4:Vn=minVn+1,Vmax;  %acceleration;5:  Else ifr>p2    %p1>p2>p3;6:Vn=Vn;  %do not change speed;7:  Else ifr>p38:Vn=maxVn−1,0;     %deceleration;9:  End10: EndThe pseudocode considering the relationship between speed and safe vehicle distance is shown in Algorithm5, where Don is the distance when the turn signal is turned on and Doff is the distance when the turn signal is turned off, and p1 and p2 take value 0 or 1. In real traffic, safe vehicle distance is a value that changes dynamically with the driving conditions of the surrounding vehicles. When the vehicle changes lanes, the driving behavior of surrounding vehicles will be affected by the turn signal. Therefore, the safe distance cannot be initialized as a fixed parameter. When the vehicle changes lanes, if the turn signal is turned on, the surrounding vehicles will have avoidance behavior, and the required safe distance will be reduced. When the vehicle changes lanes, if the turn signal is forgotten to be turned on, since the surrounding vehicles do not know whether the vehicle in front wants to change lanes or not, they will continue to drive forward according to the car-following rules, and the required safety distance increases at this time. In most cases, there is a positive proportional relationship between the safe distance and the speed of vehicles during lane-changing. In addition, rain and snow weather, uphill and downhill, driver fatigue, etc., affect the braking effect of the vehicle and then affect the safe distance. Therefore, vehicle speed and other factors should be considered when analyzing the length of safe vehicle distance under lane-changing behavior.Algorithm 5: Consider the effect of vehicle speed on safe distance.
Consider the effect of vehicle speed on safe distance:1:D1=Don×p1+Doff×p2;  %consider the turn signal factor;2:Dsafe=D1+λ×Vn;       %λ is a parameter;


## 3.3. Simulation and Analysis of the Improved Models

This experiment takes two lanes as an example to compare and analyze the old and new models of vehicle safe lane-changing. Set the vehicle driving direction of the model as from left to right. The cellular space of roads was initialized to a grid of2×100. The simulation step size was set as 1000. The maximum vehicle speed was 5 cells per step, and the random slowing probability of the vehicle was 0.3. The quantity of vehicles on the road is calculated according to different vehicle occupancy, which is randomly distributed in the two lanes 1 and 2. Figure 1 is the initial road map under different vehicle occupancy.Figure 1
Initialization of roads under different occupancy.First, the relationship between the number of vehicle lane changes and the space occupancy rate is analyzed. As shown in Figure2, the red curve is the STNS model, and the blue curve is the improved vehicle safe lane-changing model. On the general trend, when the space occupancy rate is small, with the increase of the vehicle space occupancy rate, the number of lane changes shows an upward trend. When the space occupancy rate reaches a certain value, the number of lane changes reaches the maximum value. When the space occupancy rate exceeds the certain value, as the space occupancy rate increases, the number of lane changes begins to decrease until it reaches zero. Under the same space occupancy rate, the number of lane changes of the improved vehicle safety lane-changing model is significantly lower than that of the STNS model, and the driving safety of the road under the improved model is improved. The improved vehicle safety lane-changing model starts to change lanes when the space occupancy is about 0.15, which is significantly later than the STNS model. It indicates that the improved model can meet the driving needs of drivers in the road environment with low space occupancy rate, so there is no need to change lanes. The improved vehicle safety lane-changing model reached the peak of lane-changing times at a space occupancy rate of about 0.3, which was later than the STNS model. The improved model entered the stage of frequent lane-changing only after accommodating more vehicles. The improved vehicle safety lane-changing model performs lane-changing in the space occupancy rate interval of 0.15 to 0.8, while the STNS model performs lane-changing in the space occupancy rate interval of 0 to 0.8. The improved model has a smaller lane-changing interval and is more adaptable to the road environment. When the space occupancy rate of both the improved model and STNS model is 0.8, the lane-changing was stopped. At this time, the number of vehicles reaches the maximum bearing value of the road, and the lane-changing behavior of vehicles cannot be carried out on the road due to congestion.Figure 2
Lane-changing times-space occupancy figure.Second, the relationship between traffic flow and density was analyzed. As shown in Figure3, the red curve is the STNS model, and the blue curve is the improved vehicle safe lane-changing model. On the general trend, when the density value is smaller, with the increase of the density, the traffic flow also increases. When the density reaches a certain value, the traffic flow reaches the maximum value. When the density is greater than a certain value, the traffic flow decreases gradually with the increase of density. Both the improved vehicle safe lane-changing model and the STNS model achieve the maximum traffic flow when the density value is around 35 (veh/cellular space). The maximum value of the traffic flow in the improved model is larger than that in the STNS model. In the density range from 35 to 55 (veh/cellular space), the traffic flow value of the improved model is larger than that of the STNS model. It is shown that the improved safe lane-changing model has larger traffic flow, larger free flow area and delayed traffic congestion compared with STNS model.Figure 3
Flow-density figure.Third, the relationship between the average vehicle speed and the space occupancy is analyzed. As shown in Figure4, the red curve is the STNS model, and the blue curve is the improved vehicle safe lane-changing model. On the general trend, in the case of low space occupancy, the average speed of the vehicle is the highest, and the road is in a free flow state. When the space occupancy rate reaches a certain value, with the increase of the space occupancy, the average speed begins to decrease, and traffic congestion occurs. The improved vehicle safe lane-changing model begins to have traffic jams when the space occupancy is about 0.15, and the STNS model begins to experience traffic jams when the space occupancy is about 0.1. Compared with the STNS model, the improved model has a larger free flow area and enters the congestion area later. When the space occupancy is 0.1 to 0.25, the improved safe lane-changing model has higher average speed and better driving conditions than the STNS model. The average vehicle speed values of under the remaining space occupancy are almost the same, and there is no major difference.Figure 4
Average speed-space occupancy figure.


## 4. Conclusions

In the Internet of vehicles environment, an improved vehicle lane-changing safety model based on STNS model was constructed considering the turn signal factor. In this paper, the vehicle lane-changing behavior of the original STNS model is improved by analyzing the behavior mode of vehicle lane-changing to achieve high-priority scheduling, analyzing the influence of subjective factors of drivers on driving speed when changing lanes, and analyzing the impact of vehicle speed on safe driving distance during lane-changing.The experimental results show that under different vehicle occupancy rates, the improved vehicle safe lane-changing model significantly reduces the quantity of lane changes compared to the STNS model. When the lane occupancy is in the range of 0.1 to 0.25, the average vehicle speed of the improved model is higher than that of the STNS model to a certain extent. When the traffic density value is in the range of 35 to 55 (veh/cellular space), the improved model has a certain degree of increase in traffic flow compared with the STNS model. In general, compared with the STNS model, the improved vehicle safety lane-changing model improves driving safety, enlarges the free flow area, delays traffic congestion, and gives drivers a better driving experience.



---

*Source: 4357954-2022-10-06.xml*