Mathematicians from the Faculty of Science at Palacký University are developing a system which, using mathematical optimisation and machine learning, will automatically decide when a household should consume electricity from a photovoltaic system, store it in a battery or feed it into the grid. The OLAF project aims to deliver smart home energy management that will reduce costs for photovoltaic system owners whilst also contributing to a more stable operation of the electricity grid. Experts are currently testing the system at 150 locations and within five energy communities.
The project involves collaboration between the Technology Platform of the Department of Mathematical Analysis and Applications of Mathematics (TP KMA) at the Faculty of Science, Palacký University, and the companies OLC Systems and AgreFlex. The university team is developing optimisation methods and machine learning models that will form the decision-making component of the system. “Photovoltaics generate electricity when conditions are favourable. However, this may not necessarily be the best time to consume the electricity or feed it into the grid. We are trying to resolve this mismatch,” said Jakub Dostál from AgreFlex.
On behalf of the Faculty of Science, the technical part of the project is led by Ondřej Vencálek, a statistician and member of the TP KMA. The team also includes the platform’s founder and head, Jitka Machalová; PhD students Filip Malíček, Michaela Michalcová and Stanislav Škorňa; and master’s graduate Jáchym Jelínek. The young team members are working with real operational data from hundreds of households and are involved in developing algorithms for the future product.
Data from real households
“Working with real data differs from working with a textbook dataset, particularly due to missing measurements, which must be appropriately imputed. This project also typically involves exploring and validating various approaches, ranging from those we are already familiar with from our studies to entirely new methods and solutions. Our task, therefore, is not merely to successfully implement a single method, but to find and implement the best possible one,” said Michaela Michalcová from the Faculty of Science.
“Our task, therefore, is not merely to successfully implement a single method, but to find and implement the best possible one.” Michaela Michalcová
The OLAF system utilises an OLAF Box device located directly at the customer’s premises, which communicates with the photovoltaic power station’s inverter and the battery. The cloud-based component links data on the household’s current status with weather and generation forecasts, expected consumption and electricity prices.
Based on this data, the algorithm plans energy management hours or even days in advance. For example, it decides when to charge or discharge the battery, when to defer consumption, and when to limit the feed-in of surplus energy to the grid. It also takes into account the future value of the stored energy, which, due to fluctuating prices, may be higher in a few hours’ time than at the moment of generation.
Smart management can help both households and the grid
The system’s development responds to the rapid expansion of domestic photovoltaic power stations and battery storage systems. By the end of 2025, more than 239,000 photovoltaic power stations were connected in the Czech Republic, and the total capacity of battery storage systems exceeded 2,500 MWh. The vast majority of this capacity was accounted for by households. As the number of decentralised sources grows, so do the demands on the management of the power system. Domestic power stations generate electricity based on sunlight conditions, not on current supply and demand. Without smart management, therefore, thousands of power stations could feed surplus electricity into the grid at the very moment when electricity prices may be falling to negative values, or, conversely, draw electricity during periods of high demand.

According to experts, smart management can help not only the owners of home power stations but also the electricity grid. For example, when there is a surplus of energy, a household can charge a battery or increase its own consumption; conversely, when there is a shortage, it can reduce consumption or feed stored electricity back into the grid.
The developers are also planning to expand the system further. In the future, it could manage the charging of electric vehicles or the operation of heat pumps and enable flexibility aggregation – that is, the coordinated management of a larger number of smaller sources and appliances.
Student involvement
According to Jitka Machalová, the involvement of students from the Faculty of Science in the project is in line with the long-term focus of the KMA Technology Platform. They began working on the project whilst still in their final year of study. “We want talented students to be able to gain experience working on real research and corporate projects whilst still studying. If they prove themselves and are keen to continue, we try to find roles for them after they graduate,” said Jitka Machalová.
The project brings together three areas of expertise. AgreFlex contributes its knowledge of the energy sector and access to pilot customers, whilst OLC Systems provides software engineering, infrastructure, communication with inverters and cyber security. The university team is developing optimisation methods and machine learning models. “I am delighted to be involved in a project that aims to contribute to improving the situation in the energy sector. We are working on a solution that would bring financial savings to individuals and greater predictability and stability to the electricity grid,” said Ondřej Vencálek.
The research and development project ‘Development of the OLAF system’ at OLC Systems s.r.o. is running from May 2025 to May 2027 with support from the OP TAK programme of the Ministry of Industry and Trade. Palacký University joined the project in February 2026. The system is designed to be technologically independent of the cloud interfaces used by inverter manufacturers. OLAF utilises its own Czech-developed hardware and software, which is intended to give the operator greater control over the data and the entire control chain.