Design a Smart City Traffic Light Optimization

Hard45 min
1 / 30
System design answer

Design a Smart City Traffic Light Optimization

Hard45 min30 sections
understanding•8 min read

Problem Statement: A City as a Real-Time Control System

Frames traffic signal optimization as a safety-critical cyber-physical control loop over a fleet of intersections, not a dashboard product.

Problem statement

Design a city-level traffic light optimization platform that ingests live sensor data at intersections (vehicle counts, occupancy, speeds, queues, pedestrian demand, emergency vehicle approaches), computes better signal timing in near real time, pushes updated plans down to controllers at thousands of intersections, and coordinates corridors so platoons ride green waves. An operations center monitors the network, overrides individual junctions, grants emergency preemption, and reviews performance.

The trap in this question is treating it as a data pipeline with a dashboard. It is actually a distributed control system actuating physical hardware that protects human lives. A signal plan is not a recommendation; once activated it moves metal and changes who has right-of-way at 40 km/h. Therefore the design must separate three responsibilities that beginners blur: (1) sensing and state estimation, which may be noisy and eventually consistent; (2) optimization, which is advisory and may run in the cloud; (3) actuation and safety enforcement, which must be local, deterministic, and independent of any network.

Why this problem is distinctive

A ride-sharing backend retries a failed dispatch. A traffic signal cannot retry a conflicting green: two approaches showing green simultaneously is a collision, not a degraded experience. The hardware cabinet therefore contains an independent conflict monitor (the NEMA conflict monitoring unit, or MMU in NEMA TS2 terminology) that watches every green output and forces a flash-red state if incompatible phases ever overlap. No cloud service, ML model, or operator can bypass that device. This mirrors aviation's independent envelope protection: the autopilot proposes, the protection system disposes.

The second distinction is geography. Optimization is inherently spatial: a green wave only exists across 8 to 15 intersections sharing an arterial. This forces a hierarchy of control loops with different time constants: millisecond-level phase actuation inside the cabinet, second-level gap and queue management at the intersection, minutes-level plan selection per corridor cluster, and hour-level strategic retuning at the traffic management center.

Public operating baseline versus design assumptions

Public evidence shows this category is mature and large. New York City DOT operates roughly 13,000 signalized intersections, and Los Angeles DOT's ATSAC system coordinates about 4,600 signals; LA reported roughly a 16 percent travel-time improvement on monitored corridors after full deployment. Pittsburgh's Surtrac adaptive system, developed at Carnegie Mellon and commercialized by Rapid Flow Technologies, published pilot results of about 24 percent lower travel time, 40 percent less vehicle wait, and 21 percent fewer emissions in its East Liberty deployment. SCATS, born in Sydney, is company-reported as deployed in 70-plus cities with tens of thousands of intersections. These are cited public figures used for context; every uncited number in this answer is an explicit design assumption.

The four architectural planes

  1. Cabinet plane: controllers, detectors, conflict monitor, preemption hardware, local actuated logic. This plane must remain correct with zero connectivity.
  2. Corridor plane: edge nodes that fuse neighboring intersections, run plan selection and offset coordination for green waves.
  3. Central plane: traffic management center, citywide optimization, ML forecasting, dashboards, incident management, preemption dispatch integration.
  4. Learning plane: telemetry lake, simulation, digital twin, model evaluation, and governed rollout of new timing strategies.

A strong answer keeps these planes separate, lets the central plane degrade without weakening the cabinet plane, and lets the learning plane improve models without silently changing any validated safety envelope.

Key Highlights

  • •A signal plan is an actuation command over safety hardware, not an analytics output.
  • •The conflict monitor is independent hardware that forces flash-red on any conflicting green; nothing in the cloud can bypass it.
  • •Control loops run at four time scales: milliseconds (phases), seconds (gap/queue), minutes (plans), hours (strategy).
  • •Public fleets prove scale: NYC about 13,000 intersections, LA ATSAC about 4,600 signals, Surtrac reported 24 percent travel-time reduction in Pittsburgh pilots.
  • •The architecture has four planes: cabinet, corridor, central, and learning.
Lead With the Cabinet Boundary
State in the first two minutes that phase actuation and conflict protection live inside the cabinet and remain correct with zero connectivity. This instantly separates a control-systems answer from a generic IoT dashboard.
Do Not Put Green Lights Behind an RPC
Any design where a per-second signal decision requires a cloud round trip fails under ordinary fiber cuts and cellular loss, and it fails a serious interview.

Section Rescue Kit

Buzzwords to use:

Actuated ControlConflict Monitor

Safe statements:

  • "I will separate optimization advice from actuation authority before drawing any boxes."
  • "The design must keep moving safely even if every wide-area link is cut, so local autonomy comes first."
Design a Smart City Traffic Light Optimization - System Design | WinJob | WinJob