針對可調式交通燈號控制的兩種基於強化學習的方法
Two Reinforcement Learning Based Methods for Adaptive Traffic Light Control
摘要
根據文獻,台灣交通壅塞最嚴重的城市是台中市。 目前台灣(包括台中市)百分之95的交通燈號控制都是依照表定的固定時間變換交通燈號,對於交通壅塞問題嚴重的城市,前述的依照表定時間變換燈號是比較難以即時解決交通壅塞問題。文獻中已有學者提出使用動態交通燈號控制以改善交通壅塞,然而大多數文獻考慮的因素過於簡化,例如:完全忽視黃燈秒數長短的影響,僅考慮調整綠燈或紅燈秒數長短。我們發現,在不同的黃燈秒數長度下,改善交通壅塞的結果其實差異相當大。
本論文提出兩種強化式學習演算法, ALG1 和 ALG2,考慮透過使用動態交通燈號控制,來解決交通壅塞問題。為提升效益,本論文亦考慮下列交通因素:允許調整黃燈長度、評估交通指揮員產生的影響。 ALG1 和 ALG2 均使用馬可夫決策過程來控制每個時段的交通燈號長度,其中 ALG1 為狀態-動作-獎勵-狀態-動作 (State-Action-Reward-State-Action,簡稱 SARSA)演算法,ALG2 為Q-學習演算法。為評估 ALG1 及 ALG2 的表現,本論文以台中市台灣大道與惠中路交叉口向東的慢車道為實驗的對象,並使用文獻中的黃燈秒數建議公式代入模擬環境,呈現改善後的結果。我們比較 ALG1 及 ALG2 所得的平均車速及 2022年8月台中市政府新裝的智慧紅綠燈系統後的平均車速(數據來源為2022年9月份)與安裝智慧紅綠燈前的平均車速(數據來源為2022年7月份),我們發現 ALG1 及 ALG2 對於改善交通壅塞皆有顯著的效果。此外,本論文亦運用機器學習的方式建立一個線性回歸模型,以預測原本狀態下的未來車流速度,並與 Google Map 之數據比較預測是否合理。
本論文提出兩種強化式學習演算法, ALG1 和 ALG2,考慮透過使用動態交通燈號控制,來解決交通壅塞問題。為提升效益,本論文亦考慮下列交通因素:允許調整黃燈長度、評估交通指揮員產生的影響。 ALG1 和 ALG2 均使用馬可夫決策過程來控制每個時段的交通燈號長度,其中 ALG1 為狀態-動作-獎勵-狀態-動作 (State-Action-Reward-State-Action,簡稱 SARSA)演算法,ALG2 為Q-學習演算法。為評估 ALG1 及 ALG2 的表現,本論文以台中市台灣大道與惠中路交叉口向東的慢車道為實驗的對象,並使用文獻中的黃燈秒數建議公式代入模擬環境,呈現改善後的結果。我們比較 ALG1 及 ALG2 所得的平均車速及 2022年8月台中市政府新裝的智慧紅綠燈系統後的平均車速(數據來源為2022年9月份)與安裝智慧紅綠燈前的平均車速(數據來源為2022年7月份),我們發現 ALG1 及 ALG2 對於改善交通壅塞皆有顯著的效果。此外,本論文亦運用機器學習的方式建立一個線性回歸模型,以預測原本狀態下的未來車流速度,並與 Google Map 之數據比較預測是否合理。
In the literature, scholars have proposed using dynamic traffic light control to improve traffic congestion. However, most of the factors considered in the literature are oversimplified. For example, they completely ignore the impact of the lengths of yellow phase and only consider adjusting the lengths of green or red phase. We find that under different lengths of yellow light seconds, the results of reducing traffic congestion are quite different.
This thesis proposes two reinforcement learning algorithms, ALG1 and ALG2, considering the use of dynamic traffic light control to solve the traffic congestion problem. To efficiently solve the traffic congestion problem, this thesis also considers the following traffic factors: allowing adjustment of the length of yellow phase and evaluating the impact of crossing wardens. Both ALG1 and ALG2 use the Markov decision process to control the traffic light length in each time period, where ALG1 is a State-Action-Reward-State-Action (SARSA) algorithm, and ALG2 is a Q-learning algorithm. In order to evaluate the performance of ALG1 and ALG2, this thesis takes on slow traffic lane along Taiwan Boulevard in the west-to-east direction at the intersection of Taiwan Boulevard (east-west corridor) at Huizhong Road (north-south corridor) in Taichung City as example, and uses the recommended formula for the lengths of yellow phase in the literature in the simulation environment to demonstrate the improvements. We compare the average vehicle speed obtained by our ALG1 and ALG2 and the average vehicle speed after the Taichung City Government installed the smart traffic light devices in August 2022 (the data is in September 2022) with the average vehicle speed before the smart traffic light devices were installed (the data is in July 2022). We find that ALG1 and ALG2 both have significant effects on reducing traffic congestion. In addition, this thesis also uses machine learning to build a linear regression model to predict the future traffic speed in the original state and compares our prediction with the data obtained from Google Map to see whether the prediction is reasonable.
This thesis proposes two reinforcement learning algorithms, ALG1 and ALG2, considering the use of dynamic traffic light control to solve the traffic congestion problem. To efficiently solve the traffic congestion problem, this thesis also considers the following traffic factors: allowing adjustment of the length of yellow phase and evaluating the impact of crossing wardens. Both ALG1 and ALG2 use the Markov decision process to control the traffic light length in each time period, where ALG1 is a State-Action-Reward-State-Action (SARSA) algorithm, and ALG2 is a Q-learning algorithm. In order to evaluate the performance of ALG1 and ALG2, this thesis takes on slow traffic lane along Taiwan Boulevard in the west-to-east direction at the intersection of Taiwan Boulevard (east-west corridor) at Huizhong Road (north-south corridor) in Taichung City as example, and uses the recommended formula for the lengths of yellow phase in the literature in the simulation environment to demonstrate the improvements. We compare the average vehicle speed obtained by our ALG1 and ALG2 and the average vehicle speed after the Taichung City Government installed the smart traffic light devices in August 2022 (the data is in September 2022) with the average vehicle speed before the smart traffic light devices were installed (the data is in July 2022). We find that ALG1 and ALG2 both have significant effects on reducing traffic congestion. In addition, this thesis also uses machine learning to build a linear regression model to predict the future traffic speed in the original state and compares our prediction with the data obtained from Google Map to see whether the prediction is reasonable.