Wiznet makers

Hannah

Published December 24, 2025 ©

64 UCC

17 WCC

1 VAR

0 Contests

0 Followers

0 Following

Original Link

Intelligent Traffic Light Control System using Deep Q-Learning (DQN)

An AI-powered traffic management system that optimizes multi-intersection signal timing using Deep Q-Network (DQN) and real-time vehicle detection.

COMPONENTS
PROJECT DESCRIPTION

<ENG>

Intelligent Traffic Light Control System

AI-Based Multi-Intersection Signal Optimization Using Deep Reinforcement Learning


Project Overview

The Intelligent Traffic Light Control System is an AI-powered traffic management solution that optimizes signal timing across multiple intersections using Deep Reinforcement Learning (DQN) and real-time vehicle detection.

Problem Statement

Traditional fixed-time traffic signals cannot adapt to dynamic traffic conditions, resulting in:

  • Long waiting times during peak hours
  • Poor coordination between adjacent intersections
  • Inefficient green wave progression

Unlike traditional fixed-time traffic lights, this system dynamically adapts to changing traffic conditions and coordinates adjacent intersections to form an efficient Green Wave, reducing congestion and waiting time.

Key Highlights

  • Simulation-based training with real-world deployment
  • Centralized GUI for multi-intersection control
  • Stable Ethernet-based IoT communication using WIZnet W5500

System Diagram

Hardware Diagram

Hardware Components

ComponentRole
Raspberry Pi PicoLocal traffic signal controller
WIZnet W5500 LiteWired Ethernet communication
74HC595LED signal expansion
Traffic Light LEDsPhysical signal output

Solution

A DQN-based adaptive traffic control system that:

  • Learns optimal signal timing policies through simulation
  • Adapts to real-time traffic conditions using camera-based vehicle detection
  • Coordinates multiple intersections for smooth green wave progression
  • Deploys on a real-world GUI with hardware integration

System Overview

DQN Approaches Comparison

We developed and compared two DQN-based approaches to identify the optimal strategy for traffic signal control:

1. DQN-GreenWave (Green Wave Approach) ⭐ Recommended

DQN-GreenWave Architecture

2. DQN-Baseline (Baseline Approach)

Differences from DQN-GreenWave

  • Simpler state representation (no travel time focus)
  • Single-output action space (combined discrete actions)
  • Reward focuses on individual intersection optimization
  • No explicit green wave coordination

Use Case

  • Serves as experimental baseline for performance comparison
  • Suitable for isolated intersections without coordination needs

📊 Performance Comparison

Performance Comparison Chart

MetricDQN-GreenWaveDQN-BaselineImprovement
Average Waiting Time (s)21.2814.07-33.9%
Average Speed (m/s)2.872.36+17.6%
Green Wave Efficiency82.5%64.3%+18.2%

Testing Scenarios

  • Low Traffic: Both perform well, GreenWave slightly better
  • Medium Traffic: GreenWave shows clear advantage
  • High Traffic: GreenWave significantly outperforms baseline

 

Deployment (GUI Application)

Real-Time Monitoring
Camera Monitoring

Traffic Control Modes

Auto Mode (AI-Controlled)

  • DQN model makes decisions every cycle
  • Updates based on real-time vehicle counts
  • Adapts to traffic density changes

Manual Mode

  • Override AI decisions
  • Set custom cycle length and green times
  • Emergency control for special events

<KOR>

Intelligent Traffic Light Control System

Deep Q-Network(DQN) 기반 다중 교차로 신호 최적화 시스템


Project Overview

Intelligent Traffic Light Control SystemDeep Q-Network(DQN)실시간 차량 인식(YOLO) 을 결합하여 다중 교차로 신호를 자동으로 최적화하는 AI 기반 교통 제어 시스템입니다.

DQN은 교통 시뮬레이션에서 신호 제어를 반복적으로 연습하며, 가장 효율적인 신호 타이밍을 스스로 학습하는 AI 알고리즘입니다.

문제 제기

기존의 고정 시간 신호등은 역동적인 교통 상황에 적응할 수 없어 다음과 같은 문제가 발생합니다.

  • 피크 시간대에는 대기 시간이 길어집니다.
  • 인접 교차로 간의 조정 부족
  • 비효율적인 녹색 물결 진행

기존 고정 신호 방식의 한계를 극복하고,
실시간 교통 상황에 적응하며 Green Wave(연속 녹색 신호) 를 형성하는 것이 핵심 목표입니다.

무거운 AI 연산 (DQN + YOLO)  -> PC / Jetson Nano / Edge Device 에서 처리 후

Pico + Ethernet(W5500)으로 결과 명령 수신 후 제어하여, AI 연산과 하드웨어 제어 분리하여 안정적 통신을 구현했습니다. 

하드웨어 시스템 다이어그램

하드웨어 다이어그램

Hardware Components

ComponentRole
Raspberry Pi Pico각 교차로 신호 제어 MCU
WIZnet W5500 Lite유선 Ethernet 통신
74HC595다중 LED 신호 제어
Traffic Light LEDs실제 신호 출력

 

사용된 솔루션

DQN 기반 적응형 교통 제어 시스템은 다음과 같은 특징을 갖습니다.

  • 시뮬레이션을 통해 최적의 신호 타이밍 정책을 학습합니다.
  • 카메라 기반 차량 감지를 사용하여 실시간 교통 상황에 맞춰 작동합니다 .
  • 원활한 녹색 신호 진행을 위해 여러 교차로의 좌표 를 조정합니다 .
  • 하드웨어 통합을 통해 실제 GUI에 배포됩니다 .

Intelligent Traffic Light Control System의 AI 학습 단계와 실제 배포 단계
두 개의 Phase로 나누어 보여줍니다.

시스템 개요

Phase 1 : AI 학습 단계

  • SUMO(Simulation of Urban Mobility) 는 실제 도로와 유사한 환경을 만들어주는 교통 시뮬레이터
  • DQN은 SUMO 환경에서 신호를 바꿔보며 결과를 관찰하는 방식으로 학습
  • 대기 시간이 줄어들면 보상을 받고 혼잡이 발생하면 패널티를 받으면서 점점 더 나은 신호 제어 전략을 학습
  • 이 단계의 결과로 가장 성능이 좋은 DQN 모델(Best DQN Model) 이 생성

PHASE 2: Deployment 학습이 끝난 AI를 실제 시스템에 적용하는 단계

  • 카메라 입력을 통해 YOLO 모델이 차량을 실시간으로 탐지 -> 각 방향별 차량 대수(vehicle counts) 가 계산
  • TomTom API를 통해 도로 속도, 혼잡 정보, 사고 데이터를 수집
  • Green Wave Engine + DQN Model
    • YOLO에서 받은 차량 수
    • TomTom API의 속도 정보
    • 학습된 DQN 모델
  • 세 가지를 결합하여 신호 주기, 녹색 시간, 진행 방향을 결정
  • 결정된 결과값을 W5500을 통해 Pico로 전달
  • 주변 교차로(A, B, C, D)가 함께 제어

DQN 접근 방식 비교 (참고)

본 연구에서는 교통 신호 제어를 위한 최적의 전략을 파악하기 위해 두 가지 DQN 기반 접근 방식을 개발하고 비교했습니다.

1. DQN-GreenWave (그린웨이브 접근법) ⭐ 추천

DQN-그린웨이브 아키텍처

2. DQN-기준선 (기준선 접근법)

DQN-GreenWave와의 차이점

  • 보다 간소화된 상태 표현 (이동 시간에 초점을 맞추지 않음)
  • 단일 출력 행동 공간(이산 행동들의 결합)
  • 보상은 개별 교차점 최적화 에 중점을 둡니다.
  • 녹색 물결에 대한 명시적인 협력은 없었다.

사용 사례

  • 성능 비교를 위한 실험 기준선 역할을 합니다.
  • 조정이 필요 없는 독립된 교차로에 적합합니다.

📊 성능 비교

성능 비교 차트

미터법DQN-그린웨이브DQN-기준선개선
평균 대기 시간(초)21.2814.07-33.9%
평균 속도 (m/s)2.872.36+17.6%
그린 웨이브 효율성82.5%64.3%+18.2%

테스트 시나리오

  • 교통량이 적을 때 : 두 제품 모두 성능이 우수하며, GreenWave가 약간 더 좋습니다.
  • 중간 규모 교통량 : GreenWave가 확실한 우위를 보입니다
  • 높은 트래픽 : GreenWave는 기준선 대비 훨씬 뛰어난 성능을 보여줍니다.

 

배포 (GUI 애플리케이션)

실시간 모니터링
카메라 모니터링

교통 제어 모드

자동 모드(AI 제어)

  • DQN 모델은 매 주기마다 결정을 내립니다.
  • 실시간 차량 대수에 따른 업데이트
  • 교통 밀도 변화에 적응합니다

수동 모드

  • AI의 결정을 재정의합니다.
  • 사용자 지정 사이클 길이 및 녹색 시간 설정
  • 특별 행사 비상 통제
Documents
Comments Write