Digital Passenger Counting
Article: Predicting the occupancy of S-Bahn trains with AI and clever sensor technology
You’ll see if you’re standing in the right place when the door opens: Travelers in metropolitan areas would like to secure a seat in the S-Bahn but don't know where there are free seats on the train. In more and more cities, this is now a thing of the past. The "DB Lightgate" system displays the occupancy of individual S-Bahn cars in real-time on the platform. This measuring system and the associated technology are an invention of the S-Bahn Hamburg. It is being tested and used in more and more places.
DB Systel supports DB Lightgate as part of a comprehensive DevOps team, takes care of the software's operation, and brings development and backend expertise into play. Since June 2025, the system can not only display occupancy in real-time but also create highly precise forecasts with AI support, giving passengers and operations a few minutes advantage over the present. Recently, DB Lightgate won the Regio Award 2025 in the "Innovation" category for this.
Not just travelers benefit
Knowing where there is ample space allows faster boarding and reduces delays. But not only passengers appreciate information on occupancy, operations and traffic planning in cities and municipalities also benefit. In the past, stakeholders primarily worked with experience and different methods of manual passenger counting, as, for example, route-bound ticket sales are almost non-existent as a data basis in public transport.
"There was no system that could measure occupancy from outside the vehicle," recalls Julia Kuhfuß, Product Manager, about the origin of DB Lightgate. It was an essential prerequisite that passenger measurement function with a universal solution for all vehicles. The alternative – equipping all vehicles with sensors – was ruled out for cost reasons and would be logistically hardly feasible. "So we embarked on the wild journey to find out how to do this using a Lego model," Julia Kuhfuß remembers laughing. The result of these attempts is today's light-based measurement.
Even initial tests with prototypes on the track showed the value of concrete measurements and encouraged the team to continue, Julia Kuhfuß describes: "We saw there is a permanent imbalance of our cars – without any recognizable pattern. There are peak and off-peak times, but they never proceed uniformly." DB Systel was involved from the beginning and today works in a comprehensive team with S-Bahn Hamburg. DB Lightgate has been mature for two years now and is in use on platforms and in signal boxes, for example, in Hamburg.
Precise forecasts with AI support
Even in practice, real-time is sometimes not fast enough: Passengers waiting on the platform for their train should learn as soon as possible how crowded it will be when it arrives. Only then can they leisurely search for the best spot on the platform. Operations can also intervene better if they can look further into the future and can, for example, quickly reschedule the sequence of trains at junctions based on occupancy or delays. However, actual real-time data from the arriving train cannot be displayed until that train has passed the previous station and been measured. In a big city, this is often only one or two minutes before arrival.
Therefore, there is now the "AI forecast." This connects current measurements with learned data from past measurements. This bridges the temporal gap and allows five measurements into the future, calculating future occupancy at the following stations: "We now have a forecast that not only includes historical data but integrates every new real-time value, continuously adjusting to this one journey," explains Julia Kuhfuß. "Thus, we now have a forecast that is 94 percent accurate compared to the actually measured value."
For this, the AI was initially trained with 22 million datasets over months. In the first step, the team had to decide which values are relevant, examining dozens of possible factors in detail: "Some were also discarded, such as the weather. Many think the weather has a great influence, but in the end, we were able to prove: In Hamburg, it does not have any significant impact," recalls Julia Kuhfuß.
"For us, it's not: 'That's the task of Systel; that’s what S-Bahn Hamburg does.' We see ourselves as one team where everyone does their best – and we create solutions together, without being hindered by organizational boundaries."

Together faster to the goal as partners
At the beginning of 2025, the long-standing cooperation between S-Bahn Hamburg and DB Systel was completely restructured. Since then, both sides have continued to work on this solution in a cross-business DevOps team "LIT." S-Bahn Hamburg is responsible for the product, while DB Systel takes on the operational responsibility. "We all have common rights and duties. Our focus is the technical: Availability, security, and compliance, but also product rollouts and further development," says Merle Felstehausen from DB Systel.
Short paths and direct cooperation lead to quick results: "My secret to success is: Just call instead of booking an appointment for next week! We are generally pragmatic people and have encountered other pragmatic people," Julia Kuhfuß enthuses. "Earlier we had planning and control overhead, which we have now just simply swept aside," confirms Merle Felstehausen. "We trust that we all together give our best for the product and have realized that it is now running a lot better."
"The trick is that no one here has to wait or needs confirmation that he or she can do something. Everyone here has a responsibility and the freedom to just do it themselves."

Even in development, the uncomplicated processes speed up the path to results. Instead of regular status meetings, the team today only needs one hour of coordination per week as a regular appointment. Thus, the team focuses on currently pending tasks rather than strictly planning in sprints: "That's what makes us fast: Developers don't want the week blocked with many appointments but want time and to speak specifically on things that are pending," Julia Kuhfuß explains.
Here's how the technology works
DB Lightgate is simple in principle yet highly complex in its implementation because the basic principle operates using a light gate, which can measure to two centimeters precisely: "The more people inside, the less light comes through," Julia Kuhfuß explains. "Based on these data, we then make various, progressively more complex calculations from light measurements to determine occupancy." Additional light sensors help to identify the beginning and end of a car. Through algorithms and the trip number from operations, the system recognizes the vehicle and can correctly interpret the measured values and assign them to the right train.
The software and algorithms in DB Cloud's backend take only four seconds to calculate and display the occupancy of the passing train. This IT in the background is only part of the entire system: "The special thing here is that we're not just talking about an IT project but have hardware and software together in one project," Merle Felstehausen from DB Systel enthuses. Particularly when constructing carrier systems and installing sensors on site, various aspects come together in each new development: "The electrical planning, the construction planning, and IT integration of various interfaces," Julia Kuhfuß lists examples. In the near future, the team will implement many additional construction projects, as preparations for expanding the system in further cities are already underway.