If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Smart buildings, transport, and grids

What does it mean for a piece of infrastructure to be "smart"?
Consider a simple appliance, the humble vacuum cleaner. When we use a traditional vacuum cleaner, it's up to us to guide the vacuum cleaner around corners and make sure we haven't missed a spot. A smart vacuum cleaner is equipped with sensors, storage, and algorithms, which means it can guide itself around corners and remember where it's already vacuumed.
Something is smart once it both collects data about its environment and uses that data to make intelligent decisions about what steps to take next. That's now happening at every level of infrastructure, from buildings to regional transportation systems to multi-country electric grids.

Smart buildings

A modern building is more than just walls and windows. Indoor lighting compensates for cloudy skies and windowless rooms. Air conditioning keeps us cool during the warm months and heating keeps us warm during the cool months. Locks restrict who can enter, and when.
A smart building uses technology to optimize the comfort and security of the building, while minimizing cost and environmental impact.
Consider just the aspect of lighting a building. According to the US Department of Energy, lighting accounted for about 20% of the total energy consumption of commercial buildings in 20111. Ideally, building lights would only be on when absolutely necessary: when there isn't enough ambient light from the sun and when there are occupants inside a room with lights.
Sensors to the rescue! Occupancy sensors use infrared radiation or ultrasonic waves to detect the movement of humans in a room. Light level sensors measure photons to detect ambient light. A network of occupancy and light level sensors can decide when to dim lights or turn them on or off entirely.
Diagram of an office room with a light level sensor on the window, an occupancy sensor on the ceiling, and lights on the ceiling. A cloudy sky is outside the office, so the lights are on inside.
The lights are on in this office, thanks to the combined data from an infrared-based occupancy sensor and a light level sensor.
Occupancy sensors alone can reduce a building's energy usage for lighting by 50%, especially when used in rooms with intermittent use, such as classrooms, conference rooms, and bathrooms.2
Smart buildings can use similar sensor-based technologies for new approaches to security, making it easier for occupants to enter the building while harder for intruders to sneak in. A parking lot can sense when a car is approaching, snap a photo, identify the license plate number with recognition algorithms, and lift the gate only if the plate belongs to an employee. Inside the building, a robot with infrared vision can wander around and record any suspicious activity.
A photo of a security robot with a little girl looking at it.
ALSOK security robot. Image source: Fumiaki Yoshimatsu
All of this smart technology—and more—is deployed in The Edge, a 15-story office building in Amsterdam that's covered in 28,000 sensors. That sounds like a lot of technology to keep powered, but The Edge actually produces more power than it consumes thanks to its data-driven energy efficiency and a roof covered in solar panels.3
Smart buildings generate a huge amount of data. The immediate use of that data is to automate the building's functionality, but the data is also useful for building administrators. Data dashboards show statistics such as energy usage per room, temperature hot spots, and daily occupancy.
A montage of screenshots of data dashboards, showing metrics like average energy use, building visitors over time, type of coffee used, etc.
Data dashboards for smart buildings. Image source: Bloomberg/Deloitte
🤔 Consider the buildings you spend time in. How could those buildings become more intelligent with sensor networks and algorithms? What privacy and security risks do you foresee?

Smart transportation

As of 2014, there were more than 250 million vehicles on US roadways, including cars, buses, and trucks.4 Many of the cars and buses are transporting people commuting to their work during rush hour. In an ideal world, everyone could get to their destinations safely and spend as little time as possible in traffic jams.
Smart transportation uses data from sensors to bring both private and public transportation closer to the goals of more safety and less congestion.
Traffic patterns are complex. Since most vehicles are driven by humans with individual reactions, they don't follow simple rules of particles in a system, and therefore tend to jam more often than necessary.
This traffic simulation shows how quickly jams can happen (and you can play with it yourself):
Khan Academy video wrapper
AP CSP example: Traffic simulationSee video transcript
Sensor-based technologies can help by adjusting road signaling dynamically: changing the red and green times for traffic lights, adjusting speed limits based on weather and traffic conditions, and warning vehicles when there's a stopped car ahead of them. Crime enforcement agencies can also use sensor-based technologies to enforce the speed limits and other rules of the road.
Photo of a highway with an LED sign above it that says "Speed limit 45, low visibility"
A reduced speed limit sign due to low visibility conditions on the road. Image source: Oregon DOT
One way to reduce congestion is to encourage people to use public transportation like buses and trains instead of driving cars. But the lack of reliability of public transportation often keeps drivers from becoming riders. People want transportation that's reliable, and that's where technology comes in.
Smart buses can use on-board GPS receivers to determine their current position and wireless networking to broadcast their position. The passengers on board benefit from audio and visual announcements of upcoming stops, and waiting passengers benefit from mobile tracking applications that let them know when the bus is coming to their stop.
A map of Chicago, with three bus lines overlaid on top. Each bus line has many dots representing the spots on the line and bus icons representing the current buses. An animation shows the buses moving from one stop to the next.
A two-minute period from a Chicago bus tracking application, sped up.
In a well coordinated city, traffic lights can even adjust their timing to better accommodate the schedule of a bus, extending a green or shortening a red to help a bus stay on schedule.5
Diagram of a bus at a traffic light. Both the bus and traffic light have wireless sensors, and the traffic light is green.
The traffic light stays green to let the bus through.
What about trains? They can be the fastest way to travel over land, but also the most complicated, since multiple trains share the same railways. Dispatchers are in charge of making routing decisions, and need to consider factors like the train's schedule, how long the crew's been working, and the priority of the train's cargo.
Diagram of two trains approaching a junction between their tracks. A question mark is shown over the junction.
Which train should go first? Dispatchers must decide.
Human dispatchers can make great decisions for a single railways junction, but it's hard for them foresee the domino effects of their decision on the whole network.
Smart railways can instead use computers and GPS data to make automated dispatching decisions. A computer making a dispatch decision uses similar algorithms to a computer picking a chess move, since both situations require an understanding of the immediate effects of a decision as well as the effects that decision has on future decisions.6
A diagram of a decision tree, with one node at the top branching into two nodes, and each of those two nodes branching into two nodes.
An automated dispatching algorithm considering all possible results.
Once the dispatch decision is made, the trains follow their new routing instructions. No human intervention is required, but human dispatchers can still override routing orders when needed.
Diagram of 4 trains on tracks, with three junctions.
Trains follow the routing orders from the automated dispatch algorithm.
🤔 Self-driving cars are another form of smart transportation that are becoming more possible every day. How might self-driving cars affect the safety and congestion of our roadways?

Smart grids

All of this smart technology is made possible thanks to electric power. When electricity generators were first invented, each factory would generate its own power. Nowadays, most homes, businesses, and infrastructure gets electricity delivered from a regional power grid.
North America and Europe started building power grids a century ago and now have interconnected power grids covering huge regions:
Maps of North America and Europe with colored states and regions, each color corresponding to a different synchronous grid. There are 9 colors corresponding to 9 grids in the North America map, and 5 colors corresponding to 5 grids in the Europe map.
Wide-area synchronous power grids in North America and Europe. Image sources: Bouchel, Kimdime
But those wide-area power grids were built for a much smaller population with simpler energy needs. As a result, they don't distribute power as efficiently as possible, and worse, they can fail entirely! During the Northeast blackout of 2003, a software bug in a single power plant led to a massive outage affecting 55 million people in the US and Canada. Traffic lights stopped working, water supplies became contaminated, electric trains stopped runnings, and cellular networks shut down.7
A map of the United States and Canada, with the following regions highlighted in red: Michigan, Ohio, Pennsylvania, New York, New Jersey, Connecticut, Boston, Ontario.
Regions with energy systems affected by the Northeast blackout of 2003. Image source: Lokal_Profil
A smart grid uses technology to improve how electricity travels from power plants to consumers and to prevent local failures from becoming widespread outages. First, everything that transports the energy is monitored with networked sensors, including the transformers, transmission lines, and power meters.
Diagram of electric grid. The energy travels from power plant to transformer to high-voltage transmission lines to transformer to medium-voltage transmission lines to transformer to low-voltage distribution lines to a house. Wireless sensors are shown above each part of the flow.
A power grid equipped with wireless sensors.
Computers analyze that data to identify possible problems, automatically shut down the smallest part of the grid possible, and notify the power company. Computers can also choose the best day for proactive maintenance shut-offs based on daily usage patterns.
Two diagrams of a power grid, showing before and after an outage. The left shows 8 low-transmission power lines next to 7 houses, all deriving power from a medium-transmission power line. The right shows a fire between two low-transmission power lines, and a power outage for the closest house. The three houses on the right are powered from the original medium-transmission power line, and the three houses on the left are powered from a different medium-transmission power-line.
A grid in normal operations on the left compared to that same grid with a local outage on the right. The outage cut power from the center house, but smart switches re-routed power to keep it flowing to other houses.
Smart grids are also better poised to take advantage of new sources of renewable energy, such as solar and wind energy. Both of those energy sources are weather dependent—but a smart grid knows all about the weather, so it can choose renewable energy sources when possible and fallback to traditional energy sources at other times.
Diagram of a smart grid choosing an energy source. Three energy generators are shown - a factory blowing smoke, a wind farm, and solar panels. Each of those is connected to a high-voltage transmission line which connects to a control center which connects to medium-voltage transmission lines. A sun is shining, and the connection lines from the solar panels is highlighted.
On a sunny day, a smart grid can use more solar energy.

Security risks in smart systems

A big part of what makes these systems so smart is their interconnectedness. Instead of a single device making decisions based on only its own sensor data, a vast network of interconnected devices can make much better decisions based on aggregated sensor data.
That same interconnectedness is also the biggest weakness of a smart system, since it means that many of the devices are connected to the publicly accessible Internet, either directly or indirectly. Hopefully, those connections are secured with encryption and protected with firewalls—but even so, if a target is tempting enough, cyber criminals can look for ways to attack it.
The biggest target are smart grids, since they're the source of the electricity that powers everything else and they often cover such a large geographic area.
In December of 2015, hackers successfully attacked the Ukrainian power grid, disrupting the operations of 3 energy distribution companies and turning off power for 225,000 customers. The hackers used a combination of techniques: spear phishing, multiple kinds of malware, and a DOS attack on the telephone lines.8 Ultimately, humans were the weakest link in the system, as their use of insecure passwords and opening of suspicious emails is what started the chain of attack.
🤔 What strategies could energy companies use to prevent attackers from gaining access to their internal systems?

🙋🏽🙋🏻‍♀️🙋🏿‍♂️Do you have any questions about this topic? We'd love to answer—just ask in the questions area below!

Want to join the conversation?

  • blobby green style avatar for user NAVEED RIAZ
    I’ve completed the syllabus for AP CSP and looking forward to exams. What’s this message about no exam due COVID-19? Does it apply to everyone?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • orange juice squid orange style avatar for user Evan
      The 2020 AP exams will be quite different. The changes will apply to everyone taking the exam for the 2019-2020 school year. For AP CSP, there will be no multiple choice exam, only the explore task and the create task. These will be completed at home on an electronic device (or at school if yours re-opens). These will both be due on May 26 2020 at 11: 59 p.m. ET.

      All AP tests will be changed for this school year. So make sure you contact your teacher and/or visit the College Board website (the creators of the AP tests) for more information about not only the CSP exam, but all other exams as well. Here's a link for more info.

      https://apcoronavirusupdates.collegeboard.org/students

      Remember that these changes only apply to the 2019-2020 school year. Stay safe! (:
      (6 votes)
  • spunky sam orange style avatar for user wnp
    Could the use of ocupancy sensors in buildings in buildings potentially drain even more energy than they save?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • starky ultimate style avatar for user KLaudano
      It's not impossible for that to happen. I suppose if the building were rarely occupied or the occupants were very conscientious about only using electricity when necessary, then the sensors wouldn't be very helpful. However, in general, I think that the sensors will tend to save electricity.
      (4 votes)
  • marcimus pink style avatar for user barrack obama
    1984 ):
    (3 votes)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user bp.cloud09
    I have never seen a security robot in America
    (1 vote)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user 🥳 Arielle the amazing person
    so busses are bassicly cheating!so that there able to pass threw a light!

    AN OUTRAGE... THIS IS NOT FAIR!


    actually now that i think about it makes sence. 🤔
    (0 votes)
    Default Khan Academy avatar avatar for user