How do Traffic Signals Work (2019)

5 hours ago (practical.engineering)

The two-adjacent signals causing extra traffic is something I encounter daily in Berkeley -- Ashby / Claremont & Ashby / Domingo. I probably blow an average of 5 minutes a day cause of that double intersection.

To highlight one other point from the video: You want a light to be able to clear the line built up each time. If not, flux in > flux out and that's a recipe for a growing line, which causes a traffic jam.

  • They are very common all down the SF Peninsula because of the Caltrain tracks. There's California/Carolan all through Burlingame (which has some of the most dangerous train crossings in the country because you can get stuck on the tracks between the lights), and then it follows El Camino on one side while the other one goes from Delaware (San Mateo) to Old County (San Mateo / Belmont / San Carlos) to Alma (Palo Alto) to Central Expressway (Mountain View / Sunnyvale).

    The Old County lights at least are staggered so they are almost always green at the same time. The Central Expressway ones, not so much - there've been times I've been stuck for 20 minutes trying to cross the 100 feet from Moffett to Castro in Mountain View, because the light timing never lined up with the train signals.

I highly recommend Traffic Light Doctor on YT, if you're into this sort of thing.

  • Better not, it would just get me even more pissed off at how crude and incompetent German traffic engineering is. Pretty sure some frustrated worker is making it worse on purpose - you don't reach certain peaks of crappiness accidentally, it takes _work_.

    • > you don't reach certain peaks of crappiness accidentally, it takes _work_.

      Have you really never seen what happens when something grows organically without global maintenance? Not saying that this is what happened in Germany, but "it takes work" sounds naive.

      It doesn't take work to write a crappy codebase: all you have to do is add code without really caring about the overall architecture.

      Or said differently, if you can fix the German traffic engineering, you should apply there because I'm sure they would be happy to have an easy and perfect solution.

    • Can't speak to Germany, but one thing I like in the Netherlands is that if you approach an empty intersection the light will automatically turn green for you. Have never seen anything like that in North America.

      And the roads themselves are good in NL (huge contrast when I moved to Montreal, where we'd have a metal mesh underneath bridges to catch falling concrete)

> Actuated signal control [...] inductive loop sensors embedded into the road surface

It blows my mind how many people don't realize that's what those circles near the stop bar of an intersection are for, and will then stop 3+ car lengths behind the stop bar, and then can't figure out why the light is never going green.

> two signals closely spaced in a row on a major roadway. If one signal gives a green but the next one doesn’t, cars can back up

This is a major problem at an intersection near me that I used to have to drive through frequently. Two intersections, only about 500 feet between them, and MOST traffic during rush out coming from just one of the directions, yet the lights were often exactly out of sync. The first light would be red while the next one was green. Then the first would go green while the other went red, and traffic would only move about 500 feet then stop for 2 minutes. The backup would last well over a mile.

> The obvious next step in efficiency is coordination of most or all the signals within a traffic network. This is the job of adaptive signal control technologies, or ASCT. [..] These types of systems can dramatically reduce congestion

My cynical ass would not be surprised at all if oil/gas companies were lobbying against ASCT because idling cars are buying more fuel. Wouldn't be too hard to convince people that an ASCT would cost too much to implement while not producing significant traffic benefits.

  • Back when I rode I had to add a giant hunk of iron to the bottom of my motorcycle so these fuckin things could see me. Sometimes that still isn't enough and after a few minutes of shimmying back and forth over it I'd just run the red

    • Yup. It becomes crystal clear that nobody in authority in roadworks & traffic drives a motorcycle.

  • > This is a major problem at an intersection near me that I used to have to drive through frequently. Two intersections, only about 500 feet between them

    In San Francisco (as well as other cities I've lived in) they put police in the middle of intersections during rush hour to guide traffic (i.e., stop cars before they drive into an intersection that they'll get stuck in the middle of). Seems woefully inefficient

    • When traffic is really heavy humans are better than machines at getting traffic through. However they cost a lot of money and so are only rarely worth the cost.

  • ASCT is standard practice (and has been standard practice) on most junctions in most towns and cities in the UK for over 20 years.

    • Curious...in the UK, is the implementation of something like that done by government employees?

      In the USA, a significant amount of tax-funded infrastructure is actually built out by contractors, which means there's profit going to a corporation, and there's often a cynical idea that the contracts go out to whoever will send a kickback in the form of a campaign contribution to whoever makes the decision on which contractor to use.

      1 reply →

  • > My cynical ass would not be surprised at all if oil/gas companies were lobbying against ASCT because idling cars are buying more fuel. Wouldn't be too hard to convince people that an ASCT would cost too much to implement while not producing significant traffic benefits.

    I don't think you need a vast conspiracy to point out that connecting traffic signals costs more (fancier signal equipment, running cable, maintaining the cables, etc) and the benefits may be subtle, hard to predict, and maybe even hard to measure.

    Additionally, you have a lot of people that would prefer to slow traffic. Depending on local culture, investing in traffic control can be difficult (although upgrading traffic signal systems may be better able to accomodate priority for transit and bicycle detection)

  • If I had a nickle for every time I’ve had to get out of my car and walk up to the person in front of me and explain that they need to pull forward for the light to change - I’d have two nickels, yadda yadda yadda.

There's a major arterial near my house. One day, the power went out in the area, and the traffic lights went dead. I discovered to my amusement that throughput on the arterial and its crossings increased dramatically, as drivers simply cooperated with each other.

There are already cameras on top of all the lights. How hard can it be to hook them up to AI that is instructed to maximize throughput? The current system will block 3 directions while having a green light on the 4th which has no traffic.

I once complained to a friend about this, and he told me that the traffic engineers were experts and I was lying. The next day I was driving on that road, and got a red light. You could see on down the distance 3 greens. There was no other traffic, and no cross traffic. So I sent him a photo. He conceded :-)

  • > How hard can it be to hook them up to AI that is instructed to maximize throughput? The current system will block 3 directions while having a green light on the 4th which has no traffic.

    You don't need AI for that, you just need the system configured properly. Lights near my parents' house have been running cycles adapted to actual traffic for at least two decades, probably three... although using inductive loops in pavement rather than cameras.

    There are reasons you might want a short green every so often even with no detected traffic... it would help manage worst case situations for a stuck open detector, etc. But those wasted greens shouldn't be long enough to notice. You might also have situations where locally suboptimal behaviors improves performance or safety elsewhere and that may lead to a better overall system results. I'm not claiming this is the situation in your scenario, but it can explain some negative experiences.

    • Red lights also regulate speed, although I don't know if they are intentionally de-optimized from green for this reason.

  • > There are already cameras on top of all the lights.

    Those are infrared sensors that pick up the heat from car engines. They've had to be modified to pick up electric cars.

    > How hard can it be to hook them up to AI that is instructed to maximize throughput?

    The equipment cabinet at the intersection has been engineered to prevent all sorts of fatal things that happened in the past. Such as one set of relays being stuck so that one direction always gets a green light while the other direction gets red/yellow/green. They're designed so that can never happen again (when "broken", you'll see blinking red in all directions).

    The controllers need to be standardized so that you don't need experts to be able to diagnose & repair them. They also need to be certified. It is not possible to certify an expert system (or as they're now called "AI") because it is not possible to use formal methods to prove correctness.

    > The current system will block 3 directions while having a green light on the 4th which has no traffic.

    That specific intersection is set on a timer. For a single, 2-lane each way, non-complicated intersection, it can cost $100k for the lights, poles, sensors and equipment cabinet. Every wire is underground in pipes so that the expansion of concrete in weather won't stretch/break the wires.

    > as drivers simply cooperated with each other.

    That's something that most people learn in kindergarten: "share with others" and "take turns".

    Where I live (fly-over country), when the power is out, traffic backs up significantly.

    Disclaimer: I used to work for my state's combination DMV & highway department.

    • > Those are infrared sensors that pick up the heat from car engines. They've had to be modified to pick up electric cars.

      Do they pick up ICE motorcycles ? Electric motorcycles ?

    • Actual "Expert systems" could in principle get certified because they have explicable behaviour. The juice isn't worth the squeeze but it could be done. However the LLMs do not, we don't really know why this does anything even vaguely useful and we can't say if it might fail, or how we'd know. Useless.

  • I guess the main reason traffic lights exist is to avoid incidents, not necessarily to maximize throughput. Maximizing throughput is just a nice no have, and so no one bothers. Just a guess though, I've no idea what I'm talking about.

I always thought that traffic signals should be trying to minimize squared anger, where anger increases linearly with time spent waiting at intersection.

>As sensors become more ubiquitous and computing power increases, traffic management may slowly but surely be relegated from civil engineers to software developers and data scientists. But, that also means that ASCT systems may be more vulnerable to security threats, a scary thought if they’re controlling the signals for an entire city.

I feel like software engineers would write more secure software than civil engineers. It would be the opposite. I'm also not scared that much of someone controlling traffic lights. It's already possible using emergency lights.

What I find most interesting about the computer side of traffic signal controllers is the interlock design needed to prevent a glitch or memory fault from activating conflicting phases at once, eg two intersecting approaches getting green simultaneously. That's about as safety-critical as it gets for a piece of everyday infrastructure. Would've liked to see more depth on that, though I imagine the specifics are controller/vendor-specific.

I think that interlock design also goes some way toward mitigating the security risks ASCT systems would otherwise pose, as mentioned in the article. On any decent controller, even the control room shouldn't be able to deliberately trigger conflicting phases.

  • A typical signal cabinet has a conflict monitor, also called a malfunction management unit, that’s physically distinct from the controller. It supervises the controller outputs and can force the signal to all-way flashing red if green (or yellow or WALK) is shown for conflicting phases or if red or DON’T WALK is missing. More sophisticated units can also detect problems with sequencing or change or clearance interval timing.