// HACKER NEWS — CYBERSECURITY
How do Traffic Signals Work (2019)
If you live in a major city, I can take a pretty good guess at one of your most common frustrations: traffic. In city driving, the journey is rarely better than the destination. In most cases, we just want to get where we’re going. Traffic is not just frustrating, but it has consequences to the environment as well. All those idling vehicles have an impact on air quality. When you’re stuck and sitting behind a long line of cars, it’s easy to let your mind wander over solutions to our traffic woes. But, traffic management in dense urban areas is an extremely complex problem with a host of conflicting goals and challenges. One of the most fundamental of those challenges happens at an intersection, where multiple streams of traffic - including vehicles, bikes and pedestrians - need to safely, and with any luck, efficiently, cross each others’ paths. Over the years we’ve developed quite a few ways to manage this challenge of who gets to go and who gets to wait, from simple signs to roundabouts, but one of the most common ways we control the right-of-way at intersections is the traffic signal.
There are a lot of good analogies between cities and human anatomy, and roadways are no exception. Highways are like the aorta with a high capacity and single major destination. Small collector roads are like the capillaries with not much capacity but a connection to every individual house and business. And, in between are the aptly-named arterial roadways, the medium-capacity connections between urban centers. Rather than ramps, overpasses, and access roads to control the flow of traffic, arterial roads use at-grade intersections through which only a few traffic streams can pass at a time. We call this “interrupted traffic flow” for obvious reasons. In most cases, these intersections are the limit to the maximum throughput of the roadway. In other words, increasing the number of lanes or the speed limit won’t have any effect on the overall capacity of the road. The only way to increase the number of vehicles that safely travel from point A to B is to increase the efficiency of the intersection. In addition, these intersections are where a vast majority of accidents occur. For these reasons, traffic engineers put a lot of thought and analysis into the design of intersections and how to make them as safe and efficient as possible.
Controlling the flow of traffic through an intersection, otherwise known as assigning right-of-way is an enormous challenge and almost always requires a compromise of numerous conflicting considerations, including space, cost, approach speed, cycle time, sight distance, types and volumes of traffic and human factors like habits, expectations, and reaction times. Intersections also need to be rigidly standardized so that, when you come to an unfamiliar one, you already know your role in the careful and chaotic dance of vehicles and pedestrians. From a throughput standpoint, the ideal intersection would cause no interruption in flow whatsoever, but you can’t put a high-five interchange on every city block. On the other hand, simple signs are cost-effective and don’t require any extra space, but they can’t handle a lot of volume because they create an interruption for every single vehicle passing through the intersection.
You can see why traffic signals are so popular. They aren’t a panacea for all traffic problems, but they do offer a very nice balance of the considerations we discussed before: Relatively low cost, minimal space requirements, and able to handle large volumes of traffic with only some interruption. In their simplest form, traffic signals are a set of three lights facing each lane of an intersection. When the light is green, that lane has the right-of-way to cross. When the light is red, they don’t. The amber light warns that the signal is about to change from green to red. Beyond this basic function, traffic signals can take on innumerable complexities to accommodate all kinds of situations. Let’s tak