## 5 Dynamic All-Red Signal Control  
In order to dynamically control the length of the all-red signal considering the driving characteristics of RLRs, it is necessary to predict the time at which the RLR under consideration can completely pass the intersection. For this purpose, we use multi-level regression to predict the necessary time duration for the RLR to completely get out of the intersection from the moment of prediction, which we call the _intersection passing time_ in the sequel. The input data for the regression model is composed of the speed, DTI, and headway of the RLR at the prediction time. As the first level of regression for prediction, we use the Hougen-Watson model in (1), one of the nonlinear regression models, to roughly estimate the intersection passing time.  
\[\hat{y}=\frac{\beta_{1}x_{2}-x_{3}/\beta_{5}}{1+\beta_{2}x_{1}+\beta_{3}x_{2} +\beta_{4}x_{3}} \tag{1}\]  
where \(\hat{y}\) is the predicted intersection passing time and variables \(x_{1},x_{2},x_{3}\) are the DTI, the speed, the headway of a vehicle, respectively. \(\beta_{1}\), \(\cdots\), \(\beta_{5}\) in (1) are parameters to be determined through regression using data. In our study, we determined these parameters by the Levenberg-Marquardt nonlinear least squares algorithm [37; 38]. The Levenberg-Marquardt algorithm is a combination of two minimization methods, which are known as gradient descent and Gauss-Newton. The Levenberg-Marquardt operates in a gradient descent method when it is far from the solution, and finds the solution in a Gauss-Newton method near the solution. In addition, the Levenberg-Marquardt method is more stable than the Gauss-Newton method and converges to the solution relatively quickly, so the Levenberg-Marquardt method is mostly used in the nonlinear least square problem. The Levenberg-Marquardt nonlinear least squares algorithm optimizes the model by iteratively reducing the sum of squares of errors between the model and the measured data through an update process to the parameters.  
As the prediction of intersection passing time of RLR through the Hougen-Watson model is a rough estimate of actual intersection passing time required for the RLR, the predicted time can be much shorter than necessary for some cases. This means that if the length of all-red signal is adjusted according to this estimated intersection passing time, then vehicles from other direction may enter the intersection before the RLR completely clears the intersection. Thus, it is necessary to address such safety issue caused by using only the Hough-Watson model in predicting intersection passing time. For this purpose, we also use the quadratic polynomial fitting model as the second level of regression based on the prediction results of the Hougen-Watson model for better safety of intersection traffic. Furthermore, since prediction of the intersection passing time of RLR without considering the driving characteristics of the RLR, the predicted intersection passing time can be too conservative in some cases. Therefore, to address this issue and improve the overall traffic efficiency, we build separate multi-level regression models according to RLR classes, as described in Section 4.2, and predict the intersection passing time of an RLR according to its RLR class. More details on this multi-level regression framework and results are given in Section 7.3.