Sizing and Control Algorithms of a Hybrid Energy Storage System Based on Fuel Cells

: Growing consciousness of the threat posed by man-made climate change has spurred government institutions, industry, and science to find clean fuels to power economic activity. Fuel cells powered by hydrogen are one of the steps in gaining clean energy. To improve the efficiency of the fuel cell, the hybrid solutions are required. This article shows a new approach to the design and control of a hybrid energy storage system for portable applications. The methodology allows us to optimize the desired physical parameters of the elements (weight or size) in order to withstand the connected load power demand. Such an approach allows us to minimize weight, which is essential in portable systems. The methodology was proven by building a technology demonstrator. The measurements of physical objects verified the electrical parameters received during simulation and allowed a lower weight of the system, compared to the system based only on Li-ion batteries.


Introduction
The international community is trying to develop new technologies and solutions allowing a reduction in greenhouse gas production [1][2][3][4][5][6][7]. Fossil fuels and oil used on a global scale are one of the major reasons for air pollution [8][9][10][11][12][13]. Renewable energy is key in the modern stationery industry [14][15][16][17]; however, overcoming these issues becomes more difficult when one wants to downsize the system. The use of fuel cells running on hydrogen seems to be one of the most sufficient and environmentally friendly solutions for mobile/portable applications [18][19][20][21][22][23]. Unfortunately, the physical limitations of the fuel cells require a new hybrid approach that involves Li-ion batteries or supercapacitors in order to fulfil the electrical power requirements of modern equipment [24][25][26][27][28]. Electrical boats, cars, electrical bikes, and scooters are something we have become used to in our everyday life. Such miniaturization creates new challenges regarding the mass and size of the designed systems [29][30][31][32][33][34]. The author's goal was to design and build a portable device useful mostly in military applications, therefore the total system's mass and size were the main issues. By applying new mathematical apparatus, the author was able to prepare methodology allowing us to estimate the size of each power source in the Hybrid Energy Storage System. Using fuel cells along with other energy sources also requires new control algorithms [35][36][37][38][39], which will support a complex power distribution system. Most of the power management algorithms used in modern hybrid solutions are rule-based strategies, which are quite vulnerable to dynamic changes in load. The author's algorithm is also rule-based, but by considering the energy profile of the load it was possible to overcome the problem of power fluctuations. Such solutions comprise one or more power converters, several types of secondary energy sources, a fuel cell, several control loops, and protections, among other things. The aim of this paper is to present a new approach to designing hybrid energy sources suitable for portable applications based on energy profiles with the use of the Proton Exchange Membrane (PEM) fuel cell, Li-ion battery, and supercapacitor. Furthermore, the author presents the physical model of the hybrid power system designed and build accordingly to the simulation, based on the presented mathematical model.

System Elements Selection
In this section, the author describes a new approach to estimate the mass of the elements for the hybrid energy source. Based on the purpose of the device, the group of loads intended to be connected is tested to create energy profiles. The energy profiles bring information about the current power demand and dynamics of the connected load. More specific information on how the energy profiles were created can be found in previous publications [40,41].
Using the energy profiles ( Figure 1) generated according to the methodology described in [40,41], one can determine the electrical parameters (including mass) of the system that will be able to power the considered group of loads. Assuming that the random nature of the load is closest to the phenomena occurring in real situations, one should adopt the energy profile randomly generated for this stage of considerations. stands for the power level at which supercapacitor starts to work in normal conditions, and stands for the power level at which the fuel cell starts to work in normal conditions.
During the selection of individual elements of the hybrid power supply system, no optimization criteria were adopted, and only a general condition of mass reduction was taken into account to compare it to the mass of the primary and secondary cells used in portable applications. Therefore, the parameters that taken into account are the mass of the cells and the electricity stored in them.
Describing the electrical energy emitted by the supercapacitor as 1 , the PEM fuel cell as 2 , and the Li-ion battery as 3 , the energy and mass can be found with the equations: where: 1 : the mass of the supercapacitor. 2 : the mass of the fuel cell. 3 : the mass of the Li-ion battery.
In each example, the relationship between the mass and energy of the cell is non-linear ( Figure  2), and can be described as: where the non-linearity coefficient , > 0. In order to determine the proportions between individual elements that allow us to regulate the physical dimensions of the hybrid energy storage system, the proportionality factors (r) were created: Taking into account the equations from (4)-(9) this can be transformed to: Integrating in the time domain the energies of the individual power sources of the hybrid energy storage system, one can obtain an energy ̂ for individual thresholds ( Figure 1).

Control Algorithms
The power generated by the hybrid energy storage system should cover the needs of the connected loads, taking into account the properties of the individual sources (Table 1). When designing control algorithms, one of the most important elements is to take into account the dynamics of load changes connected to the hybrid energy storage system. Nevertheless, to understand the basic concept of the control algorithm it is easier to start with the simplified control algorithm. The fuel cell delivers power not only to the load but also to collaborating power sources, which are charged each time they drop below initially set voltage. The power demand of the external load defines which power source is turned on or turned off according to the scheme shown in Figure 3. Due to the dynamic character of the load changes, it is necessary to distinguish short time fluctuations to avoid unnecessary switching between the power sources.
When considering the dynamics of the hybrid energy source, the slowest element is the fuel cell (FC), which will set the main limitation for the operation of the entire system. By marking the dynamics of power changes as and assuming that a change in the operating states of individual cells included in the hybrid energy source requires exceeding the assumed threshold, one can write: (20) The condition described by Equation (20) describes the state in which there will be no switching between cells due to sufficiently slow power dynamics. Moreover, if condition (20) holds, any current state is not shifted, whether it has been the FC or another element. The opposite state is represented by Equation (21), which will condition the switching.
(21) Note that conditions (20) and (21) are purely theoretical. Practically, we can use an approximation for the derivative. With the forward difference, This is an approximation of the power derivative at time k t . For distinguishing real power jumps from short-time fluctuations, we need to estimate the short-time energy ̃ for a standardized power: where the trapezoidal rule for integral approximation is used. Hence, if ̃ is negligible, then a fluctuation has been registered on the interval [ ; +2 ], so any state of the hybrid power source should not be shifted. Denoted by 0 is a negligible part of energy occurring due to short-term fluctuations. In Table 2, one can see how the elements of the hybrid energy storage system are shifted, if at all, depending on the short-time power dynamics (22) and residual short-time energy (23). This table is considered at time [ = +2 ] only if: Table 2 has an additional power level, marked as , which includes the state reserved for the Li-ion battery. Table 2. A scheme of the shifting algorithm between elements of the hybrid energy storage system at time = + . Therefore, the power value ( ) in each next step ( 1 ) = 1 depends on the parameters and 0 . This can be described as (25): ).

State Short-Time Power Dynamics Residual Short-Time Energy Shift to the State
The presented mathematical apparatus allows us to determine both the size of the individual cell used in the hybrid energy storage system and to create the algorithm controlling the operation of the system.

Mathematical Model
The mathematical model of the hybrid power system was designed and tested in the Matlab Simulink environment. In Simulink, it is very straightforward to represent and then simulate a mathematical model representing a physical system. Models are represented graphically in Simulink as block diagrams. A wide array of blocks are available to the user in provided libraries for representing various phenomena and models in a range of formats. The multilayer model was divided into few sections ( Figure 4). Taken from the left, the "Digital Clock" and "MATLAB function GEN_LOS_NIEB" are responsible for operating the connected load. This block turns on and off selected elements of the load according to the chosen scenario. The next block, "Load", represents the physical load connected to the hybrid power system. The "Stab" block represents the dc/dc converter and the "hybrid" block is the hybrid power system. The first layer of the hybrid power system ( Figure 5) consists of the "Logic" block responsible for the harmonic work of the fuel cell ("Fuel cell"), the Li-ion battery ("Li-ion")k and the supercapacitor ("Supercap"), which are controlled with controlled relays ("Switch").

Physical Realization of the Mathematical Model
To ensure that the presented mathematical apparatus is valid, a simulation in the Matlab-Simulink environment was performed. All the elements used in the simulation were taken from the standard Simulink Simscape library. However, both the loads and control systems were custom-made by the author in order to fully reflect the complex working principal of the hybrid power system. The hybrid energy storage system was designed with the use of multiple electronic devices, which allowed us to support loads of up to 35W. A DSPIC33EP256MU810-I/PT microcontroller was used as the main engine, and it allowed us to support most of the algorithms implemented in the system. Other significant elements are the LTC4412 MOSFET controllers, the ZXCT1082 current output monitors, the ADUM1250 I2C isolator, and the LT3650-8.4 Li-ion charger.
The coefficient values received with use of the methodology shown in the first paragraph (Equations 4-6) for the tested battery of supercapacitors (Maxwell 5F), PEM fuel cell (Horizon PEM 20W), and Panasonic 18,650 Li-ion 2P2S battery (4 Ah) are as follows: Coefficients for the supercapacitor (with 95% confidence bounds): The thresholds that separate the areas of responsibility of cells working in the hybrid power system (Equations 13-15) are as follows: • P_SC = 23.85 (W), • P_FC = 5.68 (W).
After computer simulation, which resulted in a steady output voltage (24V) across all ranges of loads, changing accordingly to various scenarios of energy profiles, a physical model was made ( Figure 6). The 3D model (Figure 7) presents the main elements of the physical model. The PEM fuel cell module holds the mentioned fuel cell with the controller and system of valves responsible for the hydrogen flow. Two hydrogen cartridges store hydrogen in the metal hydride to ensure the uninterrupted work of the fuel cell. The Li-ion/supercapacitor module holds a battery of supercapacitors and Li-ion batteries.  The power management modules are responsible for the control of the hybrid power system and load-displacement among all modules (Figure 7). The output voltage rises up to 24V with the DC-DC step-up converter. The control algorithm of the physical model is shown in Figure 8.

Measurements and Simulation
Measurements and data acquisition for the physical model ( Figure 6) were carried out with the use of the analog-digital converter NI USB-6289 and Labview ver. 2017 software. Variable loads changing according to the energy profiles were simulated with the digital load array 3711A. The tests were carried out with the use of energy profiles (Figure 1) reflecting several scenarios, which covered various conditions and the possible usage of electronic equipment, represented by the above-mentioned variable load. The PEM fuel cell along with the Li-ion battery and battery of supercapacitors were operating in a temperature of 23 ℃ and with a 50% humidity. The simulation was made with help of the Simulink Matlab environment, where basic mathematical models of the supercapacitor, fuel cell, and Li-ion battery were modified according to data taken from physical objects. The experiment as well as the simulation resulted in a steady output voltage (24 V) across all ranges of loads.
Comparing the response of each cell during the simulation and the measurement results for the physical objects, one can notice few differences which did not influence the overall performance of the hybrid power system. Data acquired during the measurements on the physical object were used to correct the simulation parameters. Such modifications resulted in very similar cell responses both in the simulation and in the measurements of the physical object. Major differences can be noticed in two situations: first, when a steady state was not reached by the fuel cell (Figure 9), and, second, during the normal operation of the Li-ion battery ( Figure 10). These differences were caused by a few factors, in which the most significant one was placing the current measurement point on the hybrid energy storage system's output. This way, the power consumption of the electronic elements is not considered by the algorithm responsible for switching  between the cells. Electronic elements are connected to the most stable and reliable power source in the system, which is the Li-ion battery. The current measurement presented in Figure 10 was taken directly from the Li-ion battery. Further differences between the simulation and the measurements of the physical object were insignificant and noticeable only in the fuel cell ( Figure 11). One can notice bigger voltage drops during the simulation, as well as voltage peaks (only one in this time frame). The power management system ensures that the energy distribution in the hybrid power system sustains the required output parameters. At this point, the system should be analyzed as a whole, where, despite minor differences between the simulation and the measurements, one receives the same steady output voltage in both cases. The detailed behavior of each cell along with the mathematical model of the system will be a subject of another publication.

Conclusions
Considering the results obtained by comparing the measurements results of the mathematical model and the physical object, it can be concluded that the presented approach to sizing elements for a hybrid energy source is correct. This method can be customized regarding optimization criteria, which makes it universal. Furthermore, despite the fact that physical model was built mainly from commercially available elements (Horizon PEM fuel cell 20W, Li-ion 18,650-3400 mAh and VEC6R0505QG supercapacitor 6V/5F), the total weight of the hybrid power system (8325 g) was almost 20% smaller than a set of Li-ion batteries (10280 g) storing the same amount of energy (890 Wh). The total mass of the system includes hydrogen cartridges, which allow operating for 72 h. Measurements were taken from real-life objects during laboratory tests. The detailed behavior of each cell during the test along with its responses, both in the physical object and the simulation, is a subject of another publication. The results show some minor differences between the mathematical model and the physical elements, especially in the transient states in the hybrid power system. However, the overall results give a solid basis for using a Matlab environment in this kind of simulation.
Taking into account the results of the simulation and the measurements proves that the presented mathematical apparatus is correct and the use of the hybrid system with fuel cells is not only possible but justified in portable applications.
Funding: This research received no external funding.

Conflicts of Interest:
The author declares no conflict of interest.