Traffic Waves

Jump to navigationJump to search

We consider here some simple equations which model traffic flow. This problem is discussed in Billingham and King 2000.

Equations

We consider a single lane of road, and we measure distance along the road with the variable $\displaystyle{ x }$ and $\displaystyle{ t }$ is time. We define the following variables

$\displaystyle{ \begin{matrix} &\rho(x,t) &: &\mbox{car density (cars/km)} \\ & v(\rho) &: &\mbox{car velocity (km/hour)} \\ & q(x,t) =\rho v &: &\mbox{car flow rate (cars/hour)} \\ \end{matrix} }$

If we consider a finite length of road $\displaystyle{ x_1\leq x \leq x_2 }$ then the net flow of cars in and out must be balanced by the change in density. This means that

$\displaystyle{ \frac{\partial}{\partial t} \int_{x_1}^{x_2} \rho(x,t) \mathrm{d}x = -q(x_2,t) + q(x_1,t) }$

We now consider continuous densities (which is obviously an approximation) and set $\displaystyle{ x_2 = x_1 + \Delta x }$ and we obtain

$\displaystyle{ \frac{\partial}{\partial t} \rho(x_1,t) = -\frac{q(x_2,t) + q(x_1,t)}{\Delta x} }$

and if we take the limit as $\displaystyle{ \Delta x \to 0 }$ we obtain the differential equation

$\displaystyle{ \frac{\partial \rho}{\partial t} + \frac{\partial q}{\partial x} = 0 }$

Note that this equation has been derived purely from the need to conserve cars (it is a conservation equation) and is not possible to solve this equation until we have derived a connection between $\displaystyle{ \rho }$ and $\displaystyle{ q }$.

Equation for $\displaystyle{ \rho }$ only

At the moment we assume that we have some expression for $\displaystyle{ v(\rho) }$ If we substitute the expression for $\displaystyle{ q = v\rho }$ into our differential equation we obtain

$\displaystyle{ \frac{\partial \rho}{\partial t} + \frac{\partial }{\partial x} \left(v(\rho)\rho\right) = 0 }$

which gives us

$\displaystyle{ \frac{\partial \rho}{\partial t} + \left(v^{\prime}(\rho)\rho + v(\rho)\right) \frac{\partial \rho }{\partial x} = 0 }$

or

$\displaystyle{ \frac{\partial \rho}{\partial t} + c(\rho)\frac{\partial \rho }{\partial x} = 0 }$

where $\displaystyle{ c(\rho) = \left(v^{\prime}(\rho)\rho + v(\rho)\right) }$ is the kinematic wave speed. Note that this is not the speed of the cars, but the speed at which disturbances in the density travel.

A simple relationship between $\displaystyle{ \rho }$ and $\displaystyle{ q }$

The relationship between $\displaystyle{ \rho }$ and $\displaystyle{ q }$ is an equation of state and there is no exact equation since it depends on many unknowns. One of the simplest relationship between $\displaystyle{ \rho }$ and $\displaystyle{ q }$ is derived from the following assumptions

• When the density $\displaystyle{ \rho = 0 }$ the speed is $\displaystyle{ v=v_0 }$
• When the density is $\displaystyle{ \rho = \rho_{\max} }$ the speed is $\displaystyle{ v=0 }$
• The speed is a linear function of $\displaystyle{ \rho }$ between these two values.

This also gives good fit with measured data. We will either consider the general case or use this simple relationship. Using this we obtain

$\displaystyle{ v(\rho) = v_0\frac{\rho_{\max} - \rho}{\rho_{\max}} }$

The flux of cars is given by

$\displaystyle{ q = \rho v(\rho) = v_0\frac{\rho(\rho_{\max} - \rho)}{\rho_{\max}} }$

and the wave speed is

$\displaystyle{ c(\rho) = \left(v^{\prime}(\rho)\rho + v(\rho)\right) = -\frac{v_0}{\rho_{\max}}\rho + v_0\frac{\rho_{\max} - \rho}{\rho_{\max}} = v_0\frac{\rho_{\max} - 2\rho}{\rho_{\max}} }$
$\displaystyle{ v }$ $\displaystyle{ q }$ $\displaystyle{ c }$
$\displaystyle{ v(\rho) }$ versus $\displaystyle{ \rho }$
$\displaystyle{ q(\rho) }$ versus $\displaystyle{ \rho }$
$\displaystyle{ \rho(\rho) }$ versus $\displaystyle{ \rho }$

Small Amplitude Disturbances

We can linearise the model by assuming that the variation in density is small so that we can write

$\displaystyle{ \rho = \rho_0 + \tilde{\rho} }$

where we assume that $\displaystyle{ \tilde{\rho} }$ is small. This allows us to write the equations as

$\displaystyle{ \frac{\partial \tilde{\rho}}{\partial t} + c(\rho_0) \frac{\partial \tilde{\rho}}{\partial x} = 0 }$

where the main difference between this and the full equation is that the wave speed $\displaystyle{ c }$ is a constant. This is the linearised equation. Note that this linearisation does not give a good model because traffic density does not vary only a small amount about some mean (as is the case for accoustic waves where the density of air is roughly constant).

Under these assumptions the solution to the equation is

$\displaystyle{ \tilde{\rho} = f(x - c(\rho_0)t) }$

where $\displaystyle{ f }$ is determined by the initial condition. This represents disturbances which travel with speed $\displaystyle{ c(\rho_0) }$ in the positive $\displaystyle{ x }$ direction.

We now consider the characteristic curves which are curves along which the density $\displaystyle{ \rho }$ is a constant. These are give by

$\displaystyle{ x = X(t) = x_0 + c(\rho_0) t.\, }$

which are just straight lines of constant slope. We will see shortly that the full (nonlinear) equations also possess characteristics.

Nonlinear Initial Value Problem

We wish to solve

$\displaystyle{ \frac{\partial \rho}{\partial t} + c(\rho) \frac{\partial \rho}{\partial x} = 0 }$

subject to the initial conditions

$\displaystyle{ \rho(x,0) = \rho_0(x) \, }$

It turns out that the concept of characteristic curves is very important for this problem.

If we want $\displaystyle{ \rho(X(t),t) }$ to be a constant then we require

$\displaystyle{ \frac{\mathrm{d}}{\mathrm{d}t}\rho(X(t),t) = \frac{\mathrm{d} X}{\mathrm{d}t} \frac{\partial \rho}{\partial x} + \frac{\partial \rho}{\partial t} = 0. }$

Comparing this to the governing partial differential equation we can see that we require

$\displaystyle{ \frac{\mathrm{d} X}{\mathrm{d}t} = c(\rho) }$

This means that the characteristics are straight lines (since $\displaystyle{ \rho }$ is constant) with slope given by $\displaystyle{ c(\rho_0(x_0)) }$ so that the equation for the characteristics is

$\displaystyle{ X(t) = x_0 + c(\rho_0(x_0))t \, }$

This does not allow us to write down a solution to the initial value problem, all we can do is write

$\displaystyle{ \rho(x_0 + c(\rho_0(x_0))t,t) = \rho_0(x_0)\, }$

which allows us to calculate the solution stepping forward in time, but not to determine the solution given a value of $\displaystyle{ (x,t) }$ (because we have no way of knowing what $\displaystyle{ c(\rho_0(x_0)) }$ is.

The characteristics are a family of straight lines which will all have different slopes. If two characteristics meet, our solution method will break down because there will be two values of the density $\displaystyle{ \rho }$. This gives rise to a shock. It turns out that this the formation of shocks is a product of the equations themselves and not with the solution method. We will see shortly that special methods are required to treat these shocks.

Case when no shocks are formed

The characteristic curves will fill the space without meeting provided that the wave speed $\displaystyle{ c(\rho_0) }$ is a monotonically increasing function of the distance $\displaystyle{ x }$. If we work with our previous model we have

$\displaystyle{ v(\rho) = v_0\frac{\rho_{\max} - \rho}{\rho_{\max}} }$

and

$\displaystyle{ c(\rho) = v_0\frac{\rho_{\max} - 2\rho}{\rho_{\max}} }$

so that $\displaystyle{ c }$ is a monotonically decreasing function of density $\displaystyle{ \rho }$. This means that the wave speed $\displaystyle{ c(\rho_0) }$ will be a monotonically increasing function of the distance $\displaystyle{ x }$ if an only if the density is a monotonically decreasing function. In this case the solution can be calculated straightforwardly by expansion of the initial density.

No shock example

We consider the case when $\displaystyle{ \rho_{\max} = v_0 = 1 }$ and where the initial density is given by $\displaystyle{ \rho_0 = 1/2(1- \tanh(x)) }$. The figures below show the initial density, the initial speed, the characteristics and $\displaystyle{ \rho(x,t) }$ for this case.

$\displaystyle{ \rho }$ $\displaystyle{ c }$
$\displaystyle{ \rho_0 = 1/2(1- \tanh(x)) }$
$\displaystyle{ c(\rho_0) }$
characteristics $\displaystyle{ \rho(x,t) }$
Characterisitics for $\displaystyle{ \rho_0 = 1/2(1- \tanh(x)) }$
$\displaystyle{ \rho(x,t) }$$\displaystyle{ for }$$\displaystyle{ \rho_0 = 1/2(1- \tanh(x)) }$

Riemann problem and the expansion fan

We can consider a simple problem in which there is a jump in the initial density

$\displaystyle{ \rho(x,0) = \left\{ \begin{matrix} \rho_{L},& x \lt 0 \\ \rho_{R},& x \gt 0 \end{matrix} \right. }$

where $\displaystyle{ \rho_{L} \gt \rho_{R} }$ so that we do not form a shock. In this case the characteristics on each side of $\displaystyle{ x=0 }$ have a different slope and the question is what happens between. It is easiest to think about the following problem

$\displaystyle{ \rho(x,0) = \left\{ \begin{matrix} \rho_{L},& x \lt -\epsilon \\ \frac{\rho_{R}-\rho_{L}}{2\epsilon}x + \frac{\rho_{R}+\rho_{L}}{2} & -\epsilon \leq x \leq \epsilon \\ \rho_{R},& x \gt \epsilon \end{matrix} \right. }$

We can then see that we have lines of uniformly varying slope for $\displaystyle{ -\epsilon \lt x \lt \epsilon }$ with slope between $\displaystyle{ c(\rho_L) }$ and $\displaystyle{ c(\rho_R) }$. If we then take the limit as $\displaystyle{ \epsilon \to 0 }$ we obtain an expansion fan emanating from $\displaystyle{ x=0 }$.

If we assume that

$\displaystyle{ c(\rho) = v_0\frac{\rho_{\max} - 2\rho}{\rho_{\max}} }$

then we know that on the lines of the expansion fan (which all start at $\displaystyle{ x=0 }$) we have $\displaystyle{ c(\rho) = x/t }$. We can rearrange this and solve for $\displaystyle{ x }$ and obtain $\displaystyle{ \rho =\frac{ 1}{2} \rho_{\max} (1-x/v_0 t) }$

The solution is then given by

$\displaystyle{ \rho(x,t) = \left\{ \begin{matrix} \rho_{L},& x \lt c(\rho_L) t\\ \frac{ \rho_{\max}}{2} (1-x/v_0 t),& c(\rho_L) t \leq x \leq c(\rho_R) t\\ \rho_{R},& x \gt c(\rho_R) t \end{matrix} \right. }$

This solution is known as an expansion fan.

We consider the case when $\displaystyle{ \rho_{\max} = v_0 = 1 }$ and where the initial density is given by

$\displaystyle{ \rho(x,0) = \left\{ \begin{matrix} 0.6,& x \lt 0 \\ 0.3,& x \gt 0. \end{matrix} \right. }$

The figures below show the initial density, the initial speed,

the characteristics and $\displaystyle{ \rho(x,t) }$ for this case.

$\displaystyle{ \rho }$ $\displaystyle{ c }$
$\displaystyle{ \rho_0 }$
$\displaystyle{ c(\rho_0) }$
characteristics $\displaystyle{ \rho(x,t) }$
Characterisitics
$\displaystyle{ \rho(x,t) }$

Shocks

So far we have only considered the case when $\displaystyle{ c(x_0) }$ is monotonically increasing so that two characteristics never cross. We now consider the case when characteristics can meet. A movie of this case is shown below.

We can easily see that the first characteristics to meet will be neighbouring characteristics. Consider two characteristics with

$\displaystyle{ X_1(t) = x_0 + c(x_0)t\, }$
$\displaystyle{ X_2(t) = x_0 + \delta x + c(x_0+\delta x)t\, }$

Then these curves will meet at time $\displaystyle{ T }$ where

$\displaystyle{ x_0 + c(x_0)T = x_0 + \delta x + c(x_0+\delta x)T\, }$

which implies that

$\displaystyle{ T = -\frac{1}{c^{\prime}(x_0)} }$

Note the following

• If $\displaystyle{ c^{\prime}(x) \gt 0 }$ then no shock will form.
• The shock first forms at the minimum positive value of

$\displaystyle{ - \frac{1}{c^{\prime}(x)} }$ for $\displaystyle{ -\infty \lt x \lt \infty }$.

Shock Fitting

If we calculate the solution using our formula

$\displaystyle{ \rho(x_0 + c(\rho_0(x_0))t,t) = \rho(x_0)\, }$

then we find that the solution becomes multivalued in the case when a shock forms. We then have to fit a shock. One way to do this is by imposing the condition that equal areas are removed and added when we chose the position of the shock. This corresponds to the condition that the number of cars must be conserved

Speed of the shock

If we consider the case when there is a shock at $\displaystyle{ s(t) }$ with $\displaystyle{ \rho = \rho^{-} }$ at $\displaystyle{ x=s^{-} }$ and $\displaystyle{ \rho = \rho^{+} }$ at $\displaystyle{ x=s^{+} }$ (where $\displaystyle{ s^{-} }$ is just less than s(t) and $\displaystyle{ s^{+} }$ is just greater than s(t) ). If we substitute this into the governing integral equation we obtain

$\displaystyle{ \frac{\partial}{\partial t} \left( \int_{x_1}^{s(t)} \rho(x,t)\mathrm{d}x + \int_{s(t)}^{x_2} \rho(x,t)\mathrm{d}x \right) = q(x_1,t) - q(x_2,t) }$

and hence

$\displaystyle{ \int_{x_1}^{x_2} \frac{\partial \rho(x,t)}{\partial t} \mathrm{d}x + \frac{\mathrm{d}s}{\mathrm{d}t}\rho^{-} - \frac{\mathrm{d}s}{\mathrm{d}t}\rho^{+} = q(x_1,t) - q(x_2,t) }$

If we now take the limit as $\displaystyle{ x_1\to x_2 }$ we obtain

$\displaystyle{ \frac{\mathrm{d}s}{\mathrm{d}t}\rho^{-} - \frac{\mathrm{d}s}{\mathrm{d}t}\rho^{+} = q(\rho^{-}) - q(\rho^{+}) }$

so that

$\displaystyle{ \frac{\mathrm{d}s}{\mathrm{d}t} = \frac{q(\rho^{-}) - q(\rho^{+})} {\rho^{-} - \rho^{+}} }$

Shock example

We consider the case when $\displaystyle{ \rho_{\max} = v_0 = 1 }$ and where the initial density is given by $\displaystyle{ \rho_0 = 1/2(1 + \tanh(x)) }$. The figures below show the initial density, the initial speed, the characteristics and $\displaystyle{ \rho(x,t) }$ for this case.

$\displaystyle{ \rho }$ $\displaystyle{ c }$
$\displaystyle{ \rho_0 = 1/2(1+ \tanh(x)) }$
$\displaystyle{ c(\rho_0) }$
characteristics $\displaystyle{ \rho(x,t) }$
Characterisitics for $\displaystyle{ \rho_0 = 1/2(1+ \tanh(x)) }$
$\displaystyle{ \rho(x,t) }$$\displaystyle{ for }$$\displaystyle{ \rho_0 = 1/2(1+ \tanh(x)) }$ Dotted solution is without shock fitting.

Riemann problem

We now consider the Riemann problem

$\displaystyle{ \rho(x,0) = \left\{ \begin{matrix} \rho_{L},& x \lt 0 \\ \rho_{R},& x \gt 0 \end{matrix} \right. }$

where $\displaystyle{ \rho_{L} \lt \rho_{R} }$. In this case a shock forms immediately and the characteristics terminate at the shock. The shock moves with constant speed given by the equation for the motion of the shock (or can be found by the equal areas rule). We obtain

$\displaystyle{ \rho(x,t) = \left\{ \begin{matrix} \rho_{L},& x \lt \frac{1}{2} \left(c(\rho_{L}) + c(\rho_{R}) \right) t \\ \rho_{R},& x \gt \frac{1}{2} \left(c(\rho_{L}) + c(\rho_{R}) \right) t \end{matrix} \right. }$

We consider the case when $\displaystyle{ \rho_{\max} = v_0 = 1 }$ and where the initial density is given by

$\displaystyle{ \rho(x,0) = \left\{ \begin{matrix} 0.3,& x \lt 0 \\ 0.6,& x \gt 0 \end{matrix} \right. }$

The figures below show the initial density, the initial speed, the characteristics, and $\displaystyle{ \rho(x,t) }$ for this case.

$\displaystyle{ \rho }$ $\displaystyle{ c }$
$\displaystyle{ \rho_0 }$
$\displaystyle{ c(\rho_0) }$
characteristics $\displaystyle{ \rho(x,t) }$
Characterisitics with shock shown in green.
$\displaystyle{ \rho(x,t) }$ with the red dotted line showing the solution without shock fitting