Sustainable urban mobility is advancing steadily, and one of the vehicles that is contributing the most to this transformation is the dual-source trolleybus. These systems, capable of switching between overhead catenary power and the use of on-board batteries, offer unprecedented operational flexibility. However, managing their energy consumption efficiently remains a major technical and logistical challenge. The accurate prediction of energy expenditure between stops and the identification of the causes that determine it are key elements to optimize routes, size batteries, plan charging infrastructure and, ultimately, reduce costs and emissions. In this article, we explore how the combination of artificial intelligence, causal analysis, and temporal models is revolutionizing the energy management of these vehicles, and how companies like Q2BSTUDIO are helping to implement these solutions using AI for companies that integrate high-frequency data, weather conditions, and driving patterns.
To understand the complexity of the problem, you first need to look at the operational context of a dual-source trolleybus. Unlike conventional trolleybuses, which rely exclusively on catenary, these vehicles can be temporarily disconnected and run on battery in sections where overhead cabling is unavailable or uneconomical. This generates a highly variable consumption profile, influenced by the topography of the route, traffic density, scheduled stops, the driver's profile and even weather factors such as temperature or humidity, which affect battery performance and rolling coefficient. Traditional predictive models—based on linear regressions, decision trees, or simple neural networks—often fail to deal with this heterogeneity of inputs. We need approaches that capture both temporal dependencies (how consumption changes throughout the day) and causal relationships between variables.
This is where a time-aware deep learning architecture comes into play. Recent research proposes incorporating periodic time coding (e.g., day-night cycle, peak-off-peak time) within a deep tabular framework that combines static path characteristics with high-frequency sequences of speed, acceleration, and battery state of charge. This type of model, based on neural networks with batch assemblies and Bayesian optimization, achieves remarkable precisions —below 7% of average absolute error percent— surpassing statistical methods such as ARIMA, tree ensembles such as XGBoost and conventional LSTM networks. But the most interesting thing is not only to predict, but to understand why more or less energy is consumed in each section.
To do this, a three-layer causal explanation pipeline is used. First, characteristic attribution techniques (such as SHAP or Shapley values) are applied to identify which variables have the greatest marginal impact on consumption. Second, a linear non-Gaussian acyclic model (LiNGAM) is used to discover causal directions, i.e. to determine whether increasing speed causes higher consumption or if, on the contrary, it is high consumption that forces a reduction in speed. Third, a meta-learning estimates the net effect of the average treatment, for example, how much energy is saved by increasing the rate of regenerative braking by 10% or how much is expended by lengthening the distance in coastal mode (coasting). The results of these analyses are revealing: the most powerful saving factor is the regenerative braking rate – which can recover up to 30% of kinetic energy – followed by the average speed maintained. Conversely, the main driver of excess consumption is the distance traveled in inefficient coastal mode, where the vehicle does not actively regenerate or consume.
These findings have immediate practical implications for public transport fleets. For example, optimal speed thresholds can be set for each route segment, regenerative braking control algorithms can be adjusted, stop scheduling can be redesigned to maximise energy recovery, or even the catenary network can be redesigned to cover the sections with the highest demand. All of this requires, however, a robust technology platform that integrates real-time data, models scenarios, and generates actionable recommendations. This is where custom app development takes center stage. From capturing vehicle telemetry data to visualizing it in Power BI dashboards, to AI models trained in the cloud (using AWS or Azure cloud services), the entire ecosystem must be orchestrated to deliver a comprehensive solution.
Q2BSTUDIO, as a software and technology development company, understands this need. Our team specialising in bespoke software for the mobility sector designs systems that not only process millions of sensor records per minute, but also incorporate AI agents capable of recommending real-time settings to the driver or control centre. These agents, trained with causal techniques, can anticipate, for example, when it is most efficient to disconnect the catenary and switch to battery depending on the expected weather conditions. To ensure the security of these systems, we apply strict cybersecurity measures – protecting the communication between the vehicle and the cloud – and offer AWS and Azure cloud services to host the infrastructure with high availability. In addition, we integrate business intelligence services through Power BI, providing fleet managers with dashboards with key indicators such as energy cost per kilometer, savings from regenerative braking or the estimated useful life of batteries.
The prediction and causal analysis of energy in dual-source trolleybuses is not just an academic exercise; It is a strategic tool to reduce the carbon footprint of public transport and make it economically viable. With advances in artificial intelligence and explainable machine learning techniques, it is now possible to close the loop between data, models, and operational decisions. At Q2BSTUDIO we believe that technology must be at the service of sustainability and efficiency, and that is why we accompany transport companies and public administrations in the digitalisation of their fleets. From designing data architecture to deploying predictive models into production, we offer a comprehensive approach that turns complexity into competitive advantage.
In conclusion, the future of electric mobility lies in intelligent energy management systems, capable of understanding not only what is happening, but why it is happening. The combination of temporal models, causal explainability and cloud platforms opens the door to a new generation of real-time optimization solutions. For companies that operate fleets of trolleybuses or any other electrified vehicle, investing in this type of technology is not an expense, but an investment with measurable returns in energy savings, emission reduction, and service improvement. And with partners like Q2BSTUDIO, the path to operational excellence is clearer than ever.




