Battery technology only allows for short-term energy storage and a slow charging process, which is disadvantageous for many industrial segments. The aim of our research is to increase the efficiency of electrical systems by adding renewable sources (e.g. solar panels) and fuel cells. We develop the autonomous energy control of the hybrid system consisting of a battery pack, solar cells and a hydrogen fuel cell stack. The control system is able to determine the optimal energy mix by combining the available energy sources and taking into account the current operating conditions.