A Nonlinear Mathematical Model for Dynamic Traffic Flow Optimization: A Stem Innovation ()
1. Introduction
The problem of planning, managing, and optimizing road traffic takes as its starting point the modeling of various systems involving the maintenance of state and the control of vehicle movement. Overall, road Traffic is made up of two components such as the road infrastructure and the mobiles.
To gain a deeper understanding of the vehicle on the road infrastructure, we wish to optimize safe driving conditions; the vehicle system modeling stage is fundamental [1].
Here are two aims of this work. Firstly, to meet the growing demand for road infrastructure capacity through the efficient or optimal use of existing road infrastructure. This means optimizing the inverse function of road congestion, also known as the traffic fluidity function [2] [3]. On the other to establish the dynamic equations characterizing the temporal evolution of the various variables involved in the dynamic modeling of the thermal vehicle system. This means knowledge of a mathematical model made up of a set of differential equations of motion representing physical phenomena is necessary for the representation and analysis of vehicle dynamics and the design of control laws, comfort, and safety [4]. The thermal vehicle interacts with the external environment through the driver and the road. Both play an important role but are difficult to control.
In this paper, we study the overall motion of the thermal vehicle with all its components. For acceleration and braking movements, it is often important to consider the vehicle as a rigid body, characterized by its center of mass, its mass, and its tensor of inertia of the moments of external forces [4] [5]. The model developed in this work is a complex, controlled nonlinear problem, leading to a system of inter-coupled nonlinear differential equations. A nonlinear software, namely Interior Point OPTimizer solver coupled with AMPL, is used to extract optimal dynamic solutions of the nonlinear problem of road traffic optimization. Matlab software is used as an interface for graphical visualization of optimal solutions.
The dynamic system of these nonlinear differential equations, the road traffic fluidity function and the numerical 4th-order Runge-Kutta discretization method are presented in sections 2 and 3, respectively, while the numerical results are presented in section 4.
2. Mathematical Formulation of the Road Traffic
In this section, we model the dynamics of heat-powered vehicle and traffic flow function to be optimized.
Here, the thermal vehicle is considered as a rigid solid with a fixed center of gravity and a variable mass when moving [6]. The equations of motion of a rigid body are obtained from Newton’s second law. The variation in mass can be due to several factors influencing the vehicle system, such as engine propulsion, fuel consumption, and the addition of driver, passengers, and luggage, all of which have a non-negligible effect on the total mass of the vehicle.
The vehicle is then modeled as a highly complex dynamic system taking into account translation and rotational movements and its dynamics are influenced by the contributions of aerodynamic drag forces, longitudinal forces, frictional forces and gravitational forces. See Figure 1 [7].
Figure 1. An overview of the three-dimensional movement of the vehicle body [7].
2.1. Dynamic Modelling of Thermal Vehicle System
Various reference frames can be employed for the modeling and analysis of the motion of vehicle, but in reality, three reference frames are used to derive the equations of motion for vehicle mechanics [8]. Now, the 3D motion of the thermal vehicle is then studied in three 3D reference frames, respectively called the mobile frame
associated with the vehicle’s center of gravity
; aerodynamic frame
and the inertial frame fixed to the ground
. The transition from the inertial frame
to the moving frame
is carried by a matrix
known as the rotation operator [5] [6].
The equations describing the dynamics of the thermal vehicle system are summarized in Isaac Newton’s two principles, to which we add the hypothesis of variation in the mass of the moving vehicle [1] [9]:
(1)
In the above system,
are the external forces acting on the moving vehicle,
is the mass of the vehicle,
is the aerodynamic speed of the vehicle,
is the inertial matrix of the vehicle and Ω is the rotation speed vector of the vehicle in three directions, as shown in Figure 1.
The relations between the derivatives in the
frame and
are given by the following fundamental relation of dynamics or Poisson’s formula [9] [10]:
(2)
where
is the derivative with respect to time of the vector
in the inertial frame
,
is the derivative with respect to time of the vector
in the vehicle frame
,
is the angular velocity of the vehicle and
is the angular velocity
with respect to
[9].
The relation (2) means that the derivation is made considering an observatory attached to the
frame but the equations are written in the
frame. A second-time derivation and then multiplying the two members of the fundamental Equation (2) by the mass
of the vehicle, and under the additional assumption that the mass of the vehicle varies only in the
frame, we obtain the following dynamic system:
(3)
where
,
and
are yaw, roll and pitch angles of the vehicle.
,
,
and
are the moments of inertia of the vehicle.
is the specific consumption coefficient of the vehicle.
and
are respectively the coefficient of performance and the gas ejection velocity relative to the engine.
is the power injected into the engine,
is the calorific power of the fuel.
and
are respectively the engine’s mechanical efficiency and the fuel’s combustion efficiency,
and
are respectively the exhaust gas pressure at the engine outlet and the ambient atmospheric pressure.
is the exhaust gas surface area,
is the air density,
is the frontal area of the vehicle and
is the vehicle width [11] [12].
is the rolling resistance coefficient,
is the coefficient of aerodynamic force,
is a correction factor depending on specific vehicle characteristics,
is a standard reference surface used to normalize
[13]-[15].
,
, and
are longitudinal, lateral and vertical force coefficients.
and
are correction factors for roof shape and aerodynamic devices,
is the roof area and
is the spoiler area [1] [5] [14] [15].
,
and
are rolling, pitching and yawing moment coefficients,
is the height of the vehicle’s center of gravity,
is the distance between the center of pressure and the center of gravity,
and
are the pitching and yawing moment correction factors [5] [11] [15].
2.2. Constraints Formulation
The constraints arising from the modeling of our problem concern constraints on the safety of the vehicle, driver and passengers on board, technological constraints, operational constraints, speed, roll angle, yaw angle and control position. These constraints are expressed in terms of the following boundary conditions [9]:
1) Longitudinal vehicle position is bounded by
where
,
are longitudinal position limits. The lateral vehicle position is bounded by
where
,
are lateral positions limits and the vertical vehicle position is bounded by
where
,
are the vertical positions limits.
2) The aerodynamic velocity of the vehicle
must be bounded by
where
and
are limits of the vehicle aerodynamic velocity. Vehicle acceleration
is given by
where
and
are limits of the vehicle acceleration.
3) Constraints on longitudinal velocity of the vehicle
, lateral velocity of the vehicle
and vertical velocity of the vehicle
.
4) Constraints on vehicle roll speed
, vehicle pitching speed
and the vehicle yaw rate
should also be taken into account. Nautical angles also vary: roll angle
, pitch angle
and yaw angle
.
5) Command
of the vehicle is bounded between the limits
and
for thrust control,
and
for roll control,
and
for pitch control and
and
for yaw control.
6) The vehicle mass varies in the mobile frame:
. This constraint results in fuel consumption, the thrust of the vehicle and the addition of passengers or goods [9].
On the whole, the constraints come together in the following connection:
(4)
where
2.3. Objective Function Formulation
The main goal of this work is to optimize the fluidity of road traffic. This flow traffic function is defined as the measure of a road network’s ability to allow for the efficient and uninterrupted movement of vehicles. This function promotes smoother traffic flow. High fluidity implies rapid and unimpeded movement, while low fluidity indicates congestion, frequent stops, and interruptions in the flow of traffic.
To model the traffic fluidity function, we introduce
as the total circulation speed of the flow of vehicles, which takes into account the contributions of the components of the aerodynamic speed transformed by the aerodynamic angles together with the effects of rotation [16]-[18]. The traffic fluidity function is then modeled as follows:
(5)
where
is the rotation matrix,
is the vehicle aerodynamic speed,
is the vehicle rotation speed vector and
is the vehicle position in the mobile frame
relative to the observator frame
,
is the control price function [17] [19], and
is the state vector.
The form (5) above is chosen as the most suitable in the concept of traffic optimization because it takes into account aerodynamics, which influences the dynamic performance of the vehicle in traffic; the vehicle orientation matrix, which allows for changes in direction and inclination, essential for smooth movement in varied conditions; and the costs associated with control decisions.
The conceptual definition of traffic fluidity and the mathematical form (5) allow for effective modeling of traffic dynamics while incorporating practical and theoretical considerations, making it a valuable tool for traffic optimization. To support this approach, we can refer to pioneering works that laid the foundations for traffic flow by linking speed to traffic density and mathematical models that link speed and density, reinforcing the idea that traffic flow is a function of these parameters [20] [21].
2.4. Explicit Formulation of the Road Traffic Flow Dynamics
By combining dynamic modelling (3), constraints formulation in section 1 and the objective function (5), the nonlinear mathematical traffic optimization model is given as follows:
(6)
The simplified notation of NLP (6) above is expressed as follows:
(7)
where
is the state vector, and
,
.
Although this paper discusses a model that optimizes the trajectory of a single vehicle and focuses on individual parameters, its effects are felt throughout the overall traffic system. By improving the behavior of one vehicle, we contribute not only to its own efficiency but also to the traffic flow of other vehicles, creating a more fluid and organized traffic environment. This holistic approach is essential for developing sustainable and effective urban traffic management solutions.
3. Digital Processing of the Model
The proposed model as defined in relation (7) is a controlled nonlinear problem. A fourth-order digital Runge-Kutta method is used to discretize and solve the system of nonlinear differential equations. This RK4 method is chosen because of its higher order while avoiding the disadvantages of other methods, which require evaluation of the partial derivatives of
[5].
RK4 Algorithm:
1) Let’s fix the number
of iterations and the time interval
, and calculate the step
for each differential equation.
2) For 0 ≤ n ≤ N
3) Updating
variables values:
Now, the discretized NLP of (7) is expressed as follows:
(8)
Model data:
The Model parameter values and state variable limits are given in the following tables. See Table 1 and Table 2.
Table 1. Model parameter values [5] [13] [18] [22].
Denomination |
Notation |
Value |
Fuel consumption coefficient |
|
1 × 10−4 kg.m−1 |
Internal motor power |
|
≈2 × 105 W |
Throttle ejection speed |
|
≈30 m.s−1 |
Calorific value of fuel |
|
42.7 × 106 J.kg−1 |
Motor mechanical efficiency |
|
≈0.9 |
Fuel conversion efficiency |
|
≈0.4 |
Environmental pressure |
|
1.01325 × 105 Pa |
Gas outlet pressure |
|
1.0 × 105 Pa |
Exhaust outlet surface |
|
≈0.1 m2 |
Air density |
|
≈1.225 kg.m−3 |
Vehicle frontal area |
|
≈2.89 m2 |
Gravity acceleration |
|
≈9.81 m/s2 |
Basic longitudinal drag coefficient |
|
≈0.34 |
Rolling resistance coefficient |
|
≈0.015 |
Facteur de correction |
|
≈0.2 |
Correction factor for a roof form |
|
≈0.05 |
Correction factor for aerodynamic devices |
|
≈0.1 |
Reference surface |
|
≈2.6 m2 |
Roof surface |
|
≈2 m2 |
Spoiler surface |
|
≈0.3 m2 |
Vehicle length |
|
4.84 m |
Vehicle width |
|
1.885 m |
Vehicle height |
|
1.845 m |
Height of vehicle of gravity center |
|
≈0.5 m |
Motor efficiency |
|
≈0.9 |
Basic aerodynamic drag coefficient |
|
≈0.35 |
Basic lateral force coefficient
|
|
≈0.1 |
Basic vertical force coefficient |
|
≈−0.1 |
Basic roll moment coefficient |
|
≈0.1 |
Roll moment correction factor |
|
≈0.2 |
Basic pitch moment coefficient |
|
≈−0.1 |
Pitch moment correction factor |
|
≈0.01 |
Basic yaw moment coefficient |
|
≈0.02 |
Yaw moment correction factor |
|
≈0.01 |
Pressure’s center and gravity’s center distance |
|
≈1.2 |
Maximum speed allowed |
|
60 m.s−1 |
3*The vehicle inertia moments |
|
1.417525 × 103 kgm−2 |
|
|
5.415145 × 103 kgm−2 |
|
|
5.41138 × 103 kgm−2 |
Thrust control coefficient |
|
1.5 |
Roll control coefficient |
|
|
Pitch control coefficient |
|
|
Yaw control coefficient |
|
|
Table 2. Limit values for dynamic variables [5] [13] [18] [22].
Constraint denomination |
Minimum value |
Maximum value |
Mass of the vehicle |
|
|
Aerodynamic vehicle speed |
|
|
Aerodynamic vehicle acceleration |
|
|
Longitudinal vehicle speed |
|
|
Lateral vehicle speed |
|
|
Vertical vehicle speed |
|
|
Vehicle roll velocity |
|
|
Vehicle pitch velocity |
|
|
Vehicle yaw velocity |
|
|
Vehicle thrust control |
|
|
Vehicle roll control |
|
|
Vehicle pitch control |
|
|
Vehicle yaw control |
|
|
Roll angle |
|
|
Pitch angle |
|
|
Yaw angle |
|
|
|
|
|
Position of the vehicle’s center of gravity |
|
|
|
|
|
Limits of time |
|
|
Longitudinal wind speed |
|
Lateral wind speed |
|
Verticalal wind speed |
|
4. Digital Results
The model is tested on the technical specifications of a Toyota Land Cruiser Lounge Pack Techno civilian vehicle, 204 ch-BVA6, 5-door/5-seater, 2.8 L D-4D Diesel and with a mass of around 3 × 103 kg. The optimality characteristics of IPOPT’s output solutions are such that:
EXIT = Optimal Solution Found |
Ipopt 3.8.0: Optimal Solution Found |
Number of Iterations = 105 |
Objective function value = 2.0400987422160904e+002 |
Option (rel_boundtol/abs_boundtol) = 1.769176e−06/1.769172e−06 |
Dual infeasibility = 2.2110767346561301e−014 |
Constraint violation = 8.8359453712429730e−019 |
Complementarity = 9.0909099006618611e−010 |
Overall NLP error = 9.0909099006618611e−010 |
Number of objective function evaluations = 119 |
Number of objective gradient evaluations = 106 |
Number of equality constraint evaluations = 119 |
Number of inequality constraint evaluations = 119 |
Number of equality constraint Jacobian evaluations = 106 |
Number of inequality constraint Jacobian evaluations = 106 |
Number of Lagrangian Hessian evaluations = 105 |
Total CPU secs in IPOPT (w/o function evaluations) = 10.781 |
Total CPU secs in NLP function evaluations = 49.640 |
The graph in Figure 2 shows the values of the fluidity function
, mass dynamic
, aerodynamic velocity
and aerodynamic acceleration
as a function of time, respectively. These results show that for a simulation time of 180 seconds, road traffic fluidity ranges from 0.189882 to 1.14225. This result shows average behavior and free-flowing traffic conditions where all vehicles in the traffic flow seem to follow the same speed and move at high velocities. Given this result, it can be asserted that traffic is evolving towards a fluid state. The vehicle’s mass varies between 3 × 103 kg and 2.99904 × 103 kg, i.e. a mass loss of around 0.96 kg or 0.032% of its total mass. Now, the additional assumption of considering the mass of the moving vehicle as a variable has an important meaning when modeling road traffic dynamics.
Although the 0.032% variation in mass may seem insignificant from a numerical standpoint, its practical significance is considerable in the field of traffic flow optimization. This small variation is a critical element of the model, as it reflects complex dynamics and contributes to cumulative improvements that can have a major impact on traffic, time savings for users that translate into reduced fuel and vehicle wear costs, and the quality of life for users. These savings can be significant when considered over an extended time scale or across a large number of vehicles. Aerodynamic speed and acceleration evolve positively from small to large values, meaning that traffic vehicles accelerate slightly for attack or climb maneuvers. These results correspond to fluid traffic situations where vehicles are moving normally.
Figure 2. Objective function and vehicle mass, aerodynamic speed and acceleration.
The graphs in Figure 3 show the optimal vehicle controls. These results show that the main thrust command
varies from 0.46 to 0.1. The roll command varies between 0.0007 and 0.0017 but remains constant between 5 and 140 seconds of vehicle motion, proving vehicle stability and passenger comfort over this time interval. Pitch control decreases significantly, meaning that the nose of the vehicle lowers, causing the vehicle to descend. Yaw control increases from 0.113 to 0.16, meaning that the vehicle pivots to the right, resulting in a right turn for the time interval 0 to 177 seconds.
Figure 3. Vehicle dynamic controls.
Figure 4 shows an evolution of the respective longitudinal, lateral, vertical components of aerodynamic velocity and roll angle. This graph shows that the longitudinal velocity
varies from 22 m/s to 21.36 m/s, meaning that the vehicle is slowing down or braking in a straight line in the direction of its motion. The lateral velocity
evolves positively from 3 m/s to 3.72 m/s in a curved line, meaning that the vehicle is subjected to the more pronounced lateral motion on a curvilinear road. This is common on bends when the vehicle is making a sharp turn or evasive maneuver. The
vertical speed, on the other hand, varies positively from 1.5 m/s to 1.022 m/s, meaning that the vehicle is descending on a curvilinear road. Roll angle
evolves positively from 1 to 0.86, meaning that the vehicle is returning to a stable vertical position.
Figure 4. Vehicle speeds.
The results in Figure 5 show the evolution of the pitch and yaw angles of the vehicle’s rotational movement and the evolution of
and
vehicle’s rotational speed. These results show that the pitch angle
evolves positively from 1 to 7.86, meaning that the vehicle is tilting upwards or maneuvering uphill. The yaw angle
varies positively from 1 to 1.007, implying vehicle rotation to the right. The roll speed
varies positively between 0 and 13.6/s, implying that the vehicle is rolling to the right. The pitching speed decreases from 0 to −0.3/s.
Figure 6 shows the third component
of the vehicle’s rotational speed and the time evolution of the center of mass
in the
frame from the point of view of an observer in the
frame. The observation position is taken above the ground and the trajectory is as follows (50 m, 20 m, 1 m). These graphs show that the yaw rate
changes slightly from 0 to 0.04/s, implying that the vehicle rotates slightly to the right. The position
varies positively between 50 m and 71.6 m in the moving frame relative to an observer attached to the inertial frame, which indicates that the vehicle is moving forward for an observer attached to the inertial frame. The position
evolves positively between 20 m and 23.6 m in the moving frame relative to an observer attached to the inertial frame. This indicates that the vehicle is moving to the right relative to an observer attached to the inertial frame. The position
varies positively between 1 m and 2.35 m in the mobile frame relative to an observer attached to the inertial frame, which means that the vehicle is climbing relative to an observer attached to the inertial frame.
![]()
Figure 5. Vehicle nautical angles.
Figure 6. Observer positions.
It is important to acknowledge the limitations of our optimization model. First, the model focuses on a single vehicle and may not capture the complex, dynamic interactions that occur in a multi-vehicle environment. Additionally, the environmental conditions have been oversimplified, which may limit the model’s ability to produce robust results in real-world scenarios where factors such as weather, road conditions, and traffic density influence vehicle behavior. Finally, our model relies on vehicle-specific parameters, such as those of the Toyota Land Cruiser. This may restrict generalization to other types of vehicles with different characteristics. These constraints should be considered when planning future research in this area.
5. Conclusions
In this work, a mathematical model has been developed for traffic road optimization. This model aims to maximize traffic flow under dynamic, control, operational and technical constraints. An RK4 algorithm has been developed to solve the optimization problem under inter-coupled nonlinear dynamic constraints. This method is used to discretize the problem because of its high-order efficiency in solving nonlinear differential equations. The IPOPT solver coupled with the AMPL programming language was used to extract the optimal solution from the model. The results obtained here for the traffic dynamics constraints and the objective fluidity function prove that our model can optimize traffic conditions on a road infrastructure toward totally fluid traffic.
The new hypothesis of mass variation, in particular, the decrease in the mass of a moving vehicle allows us to model scenarios in which traffic demand fluctuates. This facilitates the dynamic adjustment of resources and routes.
Optimizing traffic flow under dynamic constraints, control, and safety allows for the optimization of routes and travel times, which reduces traffic congestion. This enables traffic managers to improve the overall efficiency of the road network, ensure user safety, and better anticipate and respond to changes in traffic conditions.
This model can be used to develop control algorithms for autonomous vehicles and improve intelligent traffic management systems. It makes accurate predictions and facilitates communication between vehicles, optimizing trajectories and traffic flow. Its ability to identify congestion points reduces waiting times and prevents traffic jams. By incorporating safety features, this model enhances user safety and improves the efficiency of the road network. The application of this model can mark a step toward smarter, more sustainable transportation systems.
Future Perspectives
In this study, we considered the fluidity of a single route with a single vehicle. Our next research will extend this to the joint optimization of two vehicles’ movements.