Receding Horizon Control of Cooling Systems for Large-Size Uninterruptible Power Supply Based on a Metal-Air Battery System

: As application of electric energy have expanded, the uninterruptible power supply (UPS) concept has attracted considerable attention, and new UPS technologies have been developed. Despite the extensive research on the batteries for UPS, conventional batteries are still being used in large-scale UPS systems. However, lead-acid batteries, which are currently widely adopted in UPS, require frequent maintenance and are relatively expensive as compared with some other kinds of batteries, like metal-air batteries. In previous work, we designed a novel metal-air battery, with low cost and easy maintenance for large-scale UPS applications. An extensive analysis was performed to apply our metal-air battery to the hybrid UPS model. In this study, we focus on including an optimal control system for high battery performance. We developed an algorithm based on receding horizon control (RHC) for each fan of the cooling system. The algorithm reﬂects the operation properties of the metal-air battery so that it can supply power for a long time. We solved RHC by applying dynamic programming (DP) for a corresponding time. Di ﬀ erent variables, such as current density, oxygen concentration, and temperature, were considered for the application of DP. Additionally, a 1.5-dimensional DP, which is used for solving the RHC, was developed using the state variables with high sensitivity and considering the battery characteristics. Because there is no other control variable during operation, only one control variable, the fan ﬂow, was used, and the state variables were divided by section rather than a point. Thus, we not only developed a sub-optimal control strategy for the UPS but also found that fan control can improve the performance of metal-air batteries. The sub-optimal control strategy showed stable and 6–10% of improvement in UPS operating time based on the simulation.


Introduction
To date, many electrical storage systems (ESS), such as novel types of batteries and ultracapacitors, have been studied and applied to various systems. In particular, these batteries can improve the size or weight aspects of the storage system making it small-size and easy to move. Large size is required for ESS that optimize economical gain by charging/discharging large amounts of electrical energy and for uninterruptible power supplies (UPS) supporting large electrical systems in emergencies. UPS systems have studied by many researchers because UPS are essential for supporting electrical energy stability. Before being applied to practical commercialization, a UPS is developed and studied through modeling and simulation because of the scale [1][2][3].
However, UPS are often based on conventional batteries because of their economic convenience and reliability. Among the UPS systems, the hybrid UPS (H-UPS) combines an electrical storage system (ESS) with UPS, using lead-acid batteries as the source of DC voltage [4]. Currently, replacing the batteries with an ultracapacitor is not affordable, because of the price of the latter [5]. Lithium-ion batteries, which are mostly used as a secondary battery, are also costly. Additionally, the secondary batteries must be always activated when connected to the main power source. In this aspect, though reliable, lead-acid batteries require frequent maintenance, and therefore they are not affordable [6].
Therefore, UPS requires the introduction of new battery technologies, especially high-power UPSs (those of more than 10 kW), which are more challenging. Among the commercially available batteries, metal-air batteries have a high energy density and are inexpensive, when select metal electrodes are used. Thus, they are widely studied as primary or secondary batteries, and small-capacity metal-air batteries have already been commercialized as primary batteries [7,8]. However, they cannot be used as rechargeable batteries, because they support only a few recharging cycles. For this reason, metal-air batteries are suitable for high-power UPSs, which require high capacity and no recharge. In these systems, the initial standby time after triggering can be supplemented by hybridization with a small-sized lithium-ion battery. Thus, modeling and simulation of UPSs using metal-air batteries are needed for their commercialization. In a previous study, we developed UPS model using experimental cell data and theoretical analysis [9]. Simulation includes the controls for UPS and lithium-ion battery which is a secondary battery on standby during normal situation. However, after initial operation, when the primary battery, metal air battery, which is the main battery operates in earnest, only basic control using constant fan flow was applied.
Metal-air batteries are not widely used as energy storage devices in the industry. Thus, previous researches on controlling metal-air batteries have focused on determining their parameters or supplying stable energy [10][11][12]. However, the performance and lifespan of a battery is directly related to its thermal management system that controls the temperature of the battery [13][14][15]. Unlike other batteries for which the cooling system has already been studied, metal-air batteries have a significant limitations on air cooling because of its their consumption. Furthermore, previous studies have barely covered air-cooling of metal-air batteries because of their unusual properties. Although studies for cooling system control of metal-air batteries are fewer than for other batteries, control strategies for cooling systems of other batteries have been studied [16,17]. Especially, Zhan developed a rule-based control strategy for cooling PEM fuel cells in UPS systems [18].
This study devised a control strategy of air-cooling system for fuel supply using battery cell experimental data. As the optimal control strategy for a cooling system affects not only cooling but also oxygen supply, an overall performance improvement of the metal air battery could be expected. To do this, the detailed thermodynamics of metal-air battery among the UPS module were examined, and state variables were calculated for each cell. Because the studies for the UPS system based on metal-air battery are rare, detailed modeling of UPS system can be the first contribution. Though difficult, we applied the existing discrete dynamic programming (DP) algorithm, optimization theory, considering the characteristics of the metal-air battery. This is the second contribution of this paper and main contents. The paper is structured in five sections. After this Introduction, Section 2 presents the UPS system modeling using prior research and thermodynamic models. Section 3 provides functions, parameters, and analytical theories to solve the main optimal problem for control modeling and simulation. Section 4 arrange the result of the simulation and compare that with other control strategies. Section 5 presents concluding remarks and the performance of the suggested control strategy.

Prior Research
As previously mentioned, we developed a 64 kW UPS system using small-sized stacks of metal-air batteries in a previous study [9]. The research represents an important experimental trial to develop a UPS system based on metal-air batteries. The major point of the prior research was to determine the entire composition of the system and a hybrid system using lithium-ion battery. Thermodynamic and electromechanical analyses were performed assuming that the properties of the cells in each module of the UPS system are uniform: where T is the temperature, Cp is the heat capacity, and n is the number of cells in a module. The parameters of the previous UPS model were also used in this study. Table 1 shows the parameters of the iterative simulation and mechanical calculation used. A total of 20 fans that supply oxygen and cool the module were located at the 20 inlet, and 20 fans at outlet. The flow rate of these fans was constant value in the previous study, i.e.: where Q t m is the flow rate at time t on m th fan, Q t N 2 ,m , Q t O 2 ,m is the flow rate of gas except oxygen, and the flow rate of oxygen gas. The parameters were designed to satisfy the required specification of up to 2 h runtime under maximum electrical load with a simple constant flow control. The 2 h runtime was the minimum required specification of the UPS until the main source is connected again. Though the simple constant flow control showed good performance under static load power, it was not optimized for different Energies 2020, 13, 1611 4 of 15 environments like changing electrical loads. Therefore, it did not show stable control performance in this case, because it did not meet the electrical load and boundary conditions of a metal-air battery.

Thermodynamic Model
To optimize the previous control strategy for a metal-air battery-based UPS, the thermal effect of each cell was modeled for a system of 180 cells per module. The heat in each cell was modeled using the Gibbs potential energy and the voltage from the cell as: where Q heat is the heat, I cell is the current in the cell, G zinc is the Gibbs potential of the zinc oxide reaction, V cell is the voltage of the cell, and t k is the time at step k.
The cooling effect and performance of the fans in each cell were also divided to simulate along with the units. To calculate the heat coefficient on a plate for natural convection, we used the following equations: where Nu is the Nusselt number, Ra is the Rayleigh number for natural convection, and Pr is the Prandtl number, and: where C heat is the heat coefficient of the plate, K air is the thermal conductivity of the air, and L H and L W are the height and width of the plate, respectively. A diagram of the stack structure and thermal effect is presented in Figure 1.

Thermodynamic Model
To optimize the previous control strategy for a metal-air battery-based UPS, the thermal effect of each cell was modeled for a system of 180 cells per module. The heat in each cell was modeled using the Gibbs potential energy and the voltage from the cell as: where ℎ is the heat, is the current in the cell, is the Gibbs potential of the zinc oxide reaction, is the voltage of the cell, and is the time at step . The cooling effect and performance of the fans in each cell were also divided to simulate along with the units. To calculate the heat coefficient on a plate for natural convection, we used the following equations: where is the Nusselt number, is the Rayleigh number for natural convection, and is the Prandtl number, and: where ℎ is the heat coefficient of the plate, is the thermal conductivity of the air, and and are the height and width of the plate, respectively. A diagram of the stack structure and thermal effect is presented in Figure 1.   The thermodynamics of each cell in the UPS module described in Figure 1 are modeled by the following equations: (C ceil,k ·A ceil,k ·∆T ceil,k + C f loor,k ·A f loor,k ·∆T f loor,k ) + C side,1 ·A side,1 ·∆T side,1 + C side,end ·A side,end ·∆T side,end (7) where C x,k and A x,k are the thermal conductivity and surface area of area x in k th cell, respectively; and: where T k,t is the temperature of the k th cell at time t, Q cell,k is the heat of the chemical reaction, Q case,k is the (negative) heat of the natural cooling from the aluminum case, Q air,k is the negative heat forced by air-cooling, and Q conduct near,k is the negative heat caused by conduction to the neighboring cell.

UPS Simulation and Fan Control
Many UPS control studies have been conducted on the control of the circuit-level inverter, input, and output current to stabilize the voltage, e.g., [19][20][21]. Here, we assumed a stable electrical load and supply from the UPS model to the battery model, because our metal-air battery model focused on the power supply at the stack-level and on the operation time for a given electrical load. The main target of this study is the fan flow, which can be controlled during operation to improve the performance which includes operating time and stability of the UPS model. The system used in this study consists of stacked modules, which were modeled using the experimental data of the cell units. Thus, the system is a nonlinear discrete state-space model that can be defined simply as: Here, x(t) is the state, y(t) is the output, u(t) is the control input, f is the modeled system function computing the states of next step by the state of prior step, and g is the modeled system function computing the output by the state of this step.
The UPS model consists of a hybrid system that supplies stable electrical power. A lithium-ion battery that operates only initially is always connected to the main power system. A metal-air battery operates as the main source after it starts generating electric energy stably. Here, we developed a strategy to control the module containing the metal-air battery. The metal-air battery module is modeled by electrochemical formulas obtained from experimental data. The formula used to calculate the voltage in the cell is: where V cell is the voltage of the cell, V soc is the voltage output by the state-of-charge, SOC t k is the SOC on the time step t k , and PV x k is the voltage fraction in x k . Because the variables of the experiment for acquiring the cell data were reduced to three, we set only three state variables to calculate the voltage of the cell.

The Conceptual Framework
As mentioned above, the target of this research is the optimal control strategy of an UPS system based on metal-air battery. For simulating the system, the model is developed using iteration for time step using discrete calculation. The schematic diagram for controlling the UPS module is shown in

Receding Horizon Control
The receding horizon control (RHC), also known as moving horizon control, is a feedback control strategy for nonlinear or linear plants with input and state constraints [22]. RHC is suitable for slow nonlinear systems, such as chemical processes, that can be solved sequentially [23]. Many studies have investigated UPS using a model predictive control (MPC), which is another name for RHC [24,25].
The typical electrical load for an UPS can be predicted with a few minutes of advance notice. However, predicting the electrical load continuously is unrealistic, because the conditions of environment of the system and the UPS model can change. Thus, it is common to adjust the system loads supplied by the UPS model according to the pre-scenario or situation of the UPS model, so that the electrical load can be predicted for few minutes from the time of operation. Because of this, RHC is applied to the optimal control proposed in this study. Usually, RHC analyzes the model in the prediction window using linear problem (LP) or a quadratic problem (QP). However, the UPS model of this study is composed of tables of the cell data. Therefore, the key to optimal control is to solve the target function within the prediction window. The target applied to the RHC prediction is the electrical load of the UPS in the system, and the state prediction can be expressed as: where ( + | ) is the state value of predicted at time + using the information available at time , ( ) is the state at time , ( ) is the cost value at time , and , are the functions for state and cost value, respectively.
The range of (prediction window) at step is , . As seen in Figure 3, the range of optimal control in , is set to , (i.e., the solver window at step s) as: where , + is the cost function of ℎ iteration. The solver means one iteration to solve the optimal control values under state variables.

Receding Horizon Control
The receding horizon control (RHC), also known as moving horizon control, is a feedback control strategy for nonlinear or linear plants with input and state constraints [22]. RHC is suitable for slow nonlinear systems, such as chemical processes, that can be solved sequentially [23]. Many studies have investigated UPS using a model predictive control (MPC), which is another name for RHC [24,25].
The typical electrical load for an UPS can be predicted with a few minutes of advance notice. However, predicting the electrical load continuously is unrealistic, because the conditions of environment of the system and the UPS model can change. Thus, it is common to adjust the system loads supplied by the UPS model according to the pre-scenario or situation of the UPS model, so that the electrical load can be predicted for few minutes from the time of operation. Because of this, RHC is applied to the optimal control proposed in this study. Usually, RHC analyzes the model in the prediction window using linear problem (LP) or a quadratic problem (QP). However, the UPS model of this study is composed of tables of the cell data. Therefore, the key to optimal control is to solve the target function within the prediction window. The target applied to the RHC prediction is the electrical load of the UPS in the system, and the state prediction can be expressed as: where x(t k + i|t k ) is the state value of x predicted at time t k + i using the information available at time t k , x(t k ) is the state at time t k , y(t k ) is the cost value at time t k , and f , g are the functions for state and cost value, respectively. The range of i (prediction window) at step s is ∆W predict,s . As seen in Figure 3, the range of optimal control in ∆W predict,s is set to ∆W solver,s (i.e., the solver window at step s) as: where J s,s+N simul is the cost function of s th iteration. The solver means one iteration to solve the optimal control values under state variables.  Here, the cost function to be minimized for the metal-air battery-based UPS, , + , is the metal (zinc) consumption. In state variable of in Equation (12), the temperature that has a major influence on the performance was included first. The equation to calculate the optimal control in the Here, * is the optimal control at step , is the minimum fan flow, and its maximum.
Although the optimal control should be calculated in the , , only the optimal control in , was applied to the cost function, because in RHC the optimal control should be updated for each . The cost result and optimal cost are calculated as: where is the RHC cost result of the whole simulation, and * is the optimal cost at step . The prediction window covers the electrical system load needed to operate the RHC for a few minutes. After the UPS starts its operation, it is necessary to estimate the load and control the input in the , .

Dynamic Programming
The RHC developed in this study cannot be solved mathematically by merely using a discrete variable matrix. In the window of each step of the RHC, * can be calculated by finding * ( ) using DP, which is a global optimization theory. This control method based on the RHC prediction is similar to the 'Look-ahead DP' [26,27].
Applying the time step of the UPS chemical simulation, Δ , to Equation (14), this becomes the discrete equation: Although the simulation of the battery differs for each model, it cannot be solved in the grid at each time step. Then, in DP, the state of the battery has to be calculated for each temperature difference (Δ ), which is less than 0.001 °C/s. Though the range of Δ varies according to the Here, the cost function to be minimized for the metal-air battery-based UPS, J s, s+N simul , is the metal (zinc) consumption. In state variable of x in Equation (12), the temperature that has a major influence on the performance was included first. The equation to calculate the optimal control in the ∆W predict,k is: Here, u * k is the optimal control at step k, v min is the minimum fan flow, and v max its maximum. Although the optimal control should be calculated in the ∆W predict,k , only the optimal control in ∆W solver,k was applied to the cost function, because in RHC the optimal control should be updated for each ∆W solver . The cost result and optimal cost are calculated as: where J RHC is the RHC cost result of the whole simulation, and J * k is the optimal cost at step k. The prediction window covers the electrical system load needed to operate the RHC for a few minutes. After the UPS starts its operation, it is necessary to estimate the load and control the input in the ∆W predict,k .

Dynamic Programming
The RHC developed in this study cannot be solved mathematically by merely using a discrete variable matrix. In the window of each step of the RHC, J * k can be calculated by finding u * k (t) using DP, which is a global optimization theory. This control method based on the RHC prediction is similar to the 'Look-ahead DP' [26,27].
Applying the time step of the UPS chemical simulation, ∆t simul , to Equation (14), this becomes the discrete equation: Although the simulation of the battery differs for each model, it cannot be solved in the grid at each time step. Then, in DP, the state of the battery has to be calculated for each temperature difference (∆T), which is less than 0.001 • C/s. Though the range of ∆T varies according to the temperature of the cell, if the total difference is divided in the entire range, computing cost increases exponentially (∆T total /∆T ≈ 55, 000). Therefore, the range of each state is calculated for each time step in the prediction window, and state x k is assigned according to this. Thus, the DP step is set separately from the time step of the UPS chemical simulation, ∆t simul , according to ∆t DP as: Then, Equation (17) can be represented as a recursive relation using ∆t DP : where J * s,y is the optimal cost calculated from t s to t y , and s = 1, 2, . . . , N DP . This recursive relation can conclude minimum cost value using final time t end and backward calculation from J * s+N simul −1,s+N simul (x(t end )).Finally, using Equations (18) and (19), Equation (16) becomes Equation (20), which represents the discrete-type cost result:

Solver Based on 1.5-Dimensional DP
In general, an n-dimensional DP has n states and n control variables. However, in the model developed in this study, there is only one control variable, the fan flow. As shown in the following Equations (21) and (22), there are at least three states for which the data maps are shown in Figure 4: Zn consump,t 1 = Energies 2020, 13, x FOR PEER REVIEW 8 of 16 temperature of the cell, if the total difference is divided in the entire range, computing cost increases exponentially (Δ /Δ ≈ 55,000). Therefore, the range of each state is calculated for each time step in the prediction window, and state is assigned according to this. Thus, the DP step is set separately from the time step of the UPS chemical simulation, Δ , according to ∆ as: Then, Equation (17) can be represented as a recursive relation using ∆ : where , * is the optimal cost calculated from to , and = 1,2, … , . This recursive relation can conclude minimum cost value using final time and backward calculation from + −1, + * ( ( )).Finally, using Equations (18) and (19), Equation (16) becomes Equation (20), which represents the discrete-type cost result:

Solver Based on 1.5-Dimensional DP
In general, an n-dimensional DP has n states and n control variables. However, in the model developed in this study, there is only one control variable, the fan flow. As shown in the following Equations (21) and (22), there are at least three states for which the data maps are shown in Figure 4:  Here, ( ) is the output voltage, ( ) is the current density, ( ) is the oxygen density, ( ) is the temperature, ( ) is the state of charge, , 1 is the Zn consumption until time 1 , ℎ is the modeled system functions to calculate output voltage using cell experimental data, and is the modeled functions to calculate metal consumption using cell experimental data.
Because UPS is a chemical model that uses batteries, the variables ( ), ( ), and ( ) are interrelated states at each moment. Their values depend on each previous state and the control Here, V(t) is the output voltage, I J (t) is the current density, ρ(t) is the oxygen density, T(t) is the temperature, SOC(t) is the state of charge, Zn consump,t 1 is the Zn consumption until time t 1 , h is the modeled system functions to calculate output voltage using cell experimental data, and q is the modeled functions to calculate metal consumption using cell experimental data.
Because UPS is a chemical model that uses batteries, the variables I J (t), ρ(t), and T(t) are interrelated states at each moment. Their values depend on each previous state and the control variable. The sensitivity of the states, i.e., their change in a single step, determines which of the states is the reference for DP.
When the state variables that directly affect the output voltage are simulated for 3600 s, at constant load power and with the minimum and maximum fan flow, the current density I J (t) changes only slightly, as seen in Figure 5. Therefore, the cell temperature T(t) and oxygen concentration ρ(t) were chosen as the state variables for DP. As discussed, the cell temperature was calculated by distinguishing the time variables ∆t simul and ∆t DP , and considering that the state of the previous step has a major influence on the next one. However, the oxygen concentration is very sensitive to the states of each step, which depend on the fan flow. Thus, as DP proceeds, the target grid of the oxygen concentration is sparsely split, because this is determined when the cell temperature is applied to the grid by a control input. Therefore, the optimal x 2 was selected among a target region instead of the target point to solve the 1.5-dimensional DP structure: Energies 2020, 13, x FOR PEER REVIEW 9 of 16 variable. The sensitivity of the states, i.e., their change in a single step, determines which of the states is the reference for DP. When the state variables that directly affect the output voltage are simulated for 3600 s, at constant load power and with the minimum and maximum fan flow, the current density ( ) changes only slightly, as seen in Figure 5. Therefore, the cell temperature ( ) and oxygen concentration ( ) were chosen as the state variables for DP. As discussed, the cell temperature was calculated by distinguishing the time variables ∆ and ∆ , and considering that the state of the previous step has a major influence on the next one. However, the oxygen concentration is very sensitive to the states of each step, which depend on the fan flow. Thus, as DP proceeds, the target grid of the oxygen concentration is sparsely split, because this is determined when the cell temperature is applied to the grid by a control input. Therefore, the optimal 2 was selected among a target region instead of the target point to solve the 1.5-dimensional DP structure: 2, +1 = 2 ( , ′ 1 ( 1, +1 , )) , = ( 1, , 2, ). Here, ′ 1 is a reverse function for acquiring the control variable using the 1 st state variable at time +1 , 1, +1 and the state variables at time , . The next step, the 2 nd state variable at time +1 , 2, +1 , can be obtained from 1, +1 (that of the next step) and (the state variables of the this step). This recursive process make us calculate the optimal control by selecting the minimum points as path in , + * among each region grid for the next DP step, as shown in Equation (19). This can be expressed as in Figure 6. Here, f 1 is a reverse function for acquiring the control variable u m using the 1 st state variable at time t m+1 , x 1,t m+1 and the state variables at time t m , x t m . The next step, the 2 nd state variable at time t m+1 , x 2,t m+1 , can be obtained from x 1,t m+1 (that of the next step) and x t m (the state variables of the this step). This recursive process make us calculate the optimal control by selecting the minimum points as path in J * s,s+N simul among each region grid for the next DP step, as shown in Equation (19). This can be expressed as in Figure 6.
The experimental UPS data show that, below 60 • C and within the operational boundary conditions, the zinc consumption is higher for lower temperatures. This means that, when the difference between the lowest and highest temperature in the cells is higher than 10 • C, or the highest temperature is lower than 60 • C, the largest zinc consumption is that of the cell located at the end of the module.
When inverting the control input for the target state T, as in Equation (24), the metal-air battery model cannot calculate backward accurately, because all variables change. Therefore, the target T was calculated after obtaining the minimum and maximum cell temperature in the last step of the solve window, (k + ∆W prediction ).
Because of these approximations, the algorithm is not perfectly and globally optimal, though reasonably optimal values are used. The experimental UPS data show that, below 60 °C and within the operational boundary conditions, the zinc consumption is higher for lower temperatures. This means that, when the difference between the lowest and highest temperature in the cells is higher than 10 °C, or the highest temperature is lower than 60 °C, the largest zinc consumption is that of the cell located at the end of the module.
When inverting the control input for the target state , as in Equation (24), the metal-air battery model cannot calculate backward accurately, because all variables change. Therefore, the target was calculated after obtaining the minimum and maximum cell temperature in the last step of the solve window, ( + ). Because of these approximations, the algorithm is not perfectly and globally optimal, though reasonably optimal values are used.

Electrical Load Cycle
A basic electrical load cycle having the performance required by existing UPSs is shown as the first graph in Table 2. The power required was revised by increasing the simulation time from 7200 to 9000 s to evaluate the performance of the UPS control (cycle #1). Additionally, because the load power of the cycle is constant and simple, four more scenarios (cycle #2-#5) of operation time from 2 to 4 h were included in the simulation. These cycles are shown in Table 2.

Electrical Load Cycle
A basic electrical load cycle having the performance required by existing UPSs is shown as the first graph in Table 2. The power required was revised by increasing the simulation time from 7200 to 9000 s to evaluate the performance of the UPS control (cycle #1). Additionally, because the load power of the cycle is constant and simple, four more scenarios (cycle #2-#5) of operation time from 2 to 4 h were included in the simulation. These cycles are shown in Table 2.

Results
We experimented the proposed RHC algorithm using two-parameter settings. RHC #1 used ΔW solver = 10 and ΔW prediction = 200, and RHC #2 used ΔW solver = 20 and ΔW prediction = 100. We also simulated the UPS model with full DP control which assumes that we know the entire electrical load cycle. This control means globally optimal potential of the UPS model for comparison. In total the simulations were run controlling the fan by RHC, DP control, and constant fan flow. Electrical load cycle #2, which used the DP control, showed a distinct difference, and the resulting cell temperature of the entire module is shown in Figure 7.

Results
We experimented the proposed RHC algorithm using two-parameter settings. RHC #1 used ΔW solver = 10 and ΔW prediction = 200, and RHC #2 used ΔW solver = 20 and ΔW prediction = 100. We also simulated the UPS model with full DP control which assumes that we know the entire electrical load cycle. This control means globally optimal potential of the UPS model for comparison. In total the simulations were run controlling the fan by RHC, DP control, and constant fan flow. Electrical load cycle #2, which used the DP control, showed a distinct difference, and the resulting cell temperature of the entire module is shown in Figure 7.

Results
We experimented the proposed RHC algorithm using two-parameter settings. RHC #1 used ΔW solver = 10 and ΔW prediction = 200, and RHC #2 used ΔW solver = 20 and ΔW prediction = 100. We also simulated the UPS model with full DP control which assumes that we know the entire electrical load cycle. This control means globally optimal potential of the UPS model for comparison. In total the simulations were run controlling the fan by RHC, DP control, and constant fan flow. Electrical load cycle #2, which used the DP control, showed a distinct difference, and the resulting cell temperature of the entire module is shown in Figure 7.

Results
We experimented the proposed RHC algorithm using two-parameter settings. RHC #1 used ΔW solver = 10 and ΔW prediction = 200, and RHC #2 used ΔW solver = 20 and ΔW prediction = 100. We also simulated the UPS model with full DP control which assumes that we know the entire electrical load cycle. This control means globally optimal potential of the UPS model for comparison. In total the simulations were run controlling the fan by RHC, DP control, and constant fan flow. Electrical load cycle #2, which used the DP control, showed a distinct difference, and the resulting cell temperature of the entire module is shown in Figure 7. As mentioned in Section 2.7, the temperature of the cell at the end of the module is significantly lower than that of the other cells during the entire simulation time. This is caused by the natural aircooling of the module. Additionally, the temperature difference increases with time. By comparing As mentioned in Section 3.5, the temperature of the cell at the end of the module is significantly lower than that of the other cells during the entire simulation time. This is caused by the natural air-cooling of the module. Additionally, the temperature difference increases with time. By comparing with electrical load cycle #2 of Figure 6, it can also be seen that the temperature increases rapidly because of the large heat generated when the electrical load increases rapidly.
To compare the different controls, i.e., RHC #1, RHC #2, DP, and constant fan flow (1%, 2%, . . . , 100% of the maximum fan flow), the state variables based on electrical load cycle #2 were used, leading to the result shown in Figure 8. with electrical load cycle #2 of Figure 6, it can also be seen that the temperature increases rapidly because of the large heat generated when the electrical load increases rapidly.
To compare the different controls, i.e., RHC #1, RHC #2, DP, and constant fan flow (1%, 2%, …, 100% of the maximum fan flow), the state variables based on electrical load cycle #2 were used, leading to the result shown in Figure 8. The cell temperature reported in Figure 8a indicates that the influence of the fan flow is not significant at first. However, it increases accumulating over time, resulting in a large difference between the controls. In the case of the oxygen concentration of Figure 8(b), the effect of electrical load cycle #2 of Figure 6 is critical, because the oxygen concentration by all controls except DP vibrates under electrical load. Particularly in the case of the DP control, the optimal oxygen concentration of the whole cycle drops below 10%. Additionally, the constant fan flow control shows that the oxygen concentration increases gradually as the oxygen consumption decreases with increasing temperature. The cell temperature reported in Figure 8a indicates that the influence of the fan flow is not significant at first. However, it increases accumulating over time, resulting in a large difference between the controls. In the case of the oxygen concentration of Figure 8b, the effect of electrical load cycle #2 of Figure 6 is critical, because the oxygen concentration by all controls except DP vibrates under electrical load. Particularly in the case of the DP control, the optimal oxygen concentration of the whole cycle drops below 10%. Additionally, the constant fan flow control shows that the oxygen concentration increases gradually as the oxygen consumption decreases with increasing temperature. However, in the case of RHC, the initial oxygen concentration can be maintained through the cycle despite the temperature difference. Because the oxygen concentration hardly drops within a single prediction window, the locally optimal path of the control input is near the high oxygen concentration. The controls which maintained oxygen concentration as high unnecessarily using much electric energy. These trends of the variables by RHC will be similar in different situation because RHC has characteristic to find local optimal regardless of condition of the system and circumstances.
Looking at the fan flow for each control of Figure 9, it is seen that, in RHC, it is different from the DP control, though it gradually follows DP one with a time because of the optimal algorithm. Additionally, the fan flow of the RHC #1 control tends to be lower than that of RHC #2. When ∆W predict and ∆W solver were respectively increased and decreased (RHC #2 → RHC #1), we found that this control input is better than the DP one. This is usually attributed to low flow in the boundary condition. Additionally, the fan flow of the RHC #1 control tends to be lower than that of RHC #2. When and were respectively increased and decreased (RHC #2 → RHC #1), we found that this control input is better than the DP one. This is usually attributed to low flow in the boundary condition. The zinc consumption in all electrical load cycles is shown in Figure 10, using consumption of DP as reference (100%). Here, a grey bar indicates that the simulation stopped because a boundary condition, such as the state-of-charge of the battery, temperature, and oxygen concentration, was met before the total simulation time had passed. The RHC proposed in this study is represented in purple. The results confirm that the RHC control is effective in reducing the zinc consumption of metal-air battery-based UPSs increasing its operation time. In particular, RHC #1 showed stable and excellent performance, in contrast to other constant fan flow controls that fail or consume excessive zinc. Compared to the low-speed flow (that of less than 1-10% of the maximum fan flow), the zinc consumption of RHC #1 is not lower. However, in the case of the low-speed flows, the battery failed because of a poor cooling forced by the fans. Instead, compared with the other controls, RHC #1 displayed a maximum 6-10% difference in zinc consumption. The zinc consumption in all electrical load cycles is shown in Figure 10, using consumption of DP as reference (100%). Here, a grey bar indicates that the simulation stopped because a boundary condition, such as the state-of-charge of the battery, temperature, and oxygen concentration, was met before the total simulation time had passed. The RHC proposed in this study is represented in purple. The results confirm that the RHC control is effective in reducing the zinc consumption of metal-air battery-based UPSs increasing its operation time. In particular, RHC #1 showed stable and excellent performance, in contrast to other constant fan flow controls that fail or consume excessive zinc. Compared to the low-speed flow (that of less than 1-10% of the maximum fan flow), the zinc consumption of RHC #1 is not lower. However, in the case of the low-speed flows, the battery failed because of a poor cooling forced by the fans. Instead, compared with the other controls, RHC #1 displayed a maximum 6-10% difference in zinc consumption. In most cycles, the zinc consumption is lower for weaker fan flow, though it is seldom very high in these cases either. However, because the simulation time was determined from the available operation time, all of the zinc metal was consumed, as indicated by the gray bars.
RHC #2 showed a slightly lower performance than RHC #1. However, it displayed a relatively low computing cost, approximately 1/5 of the original cost of RHC #1. As a matter of fact, RHC #1 cannot be used for real-time control because its simulation time is 4-5 times higher in a generic PC (i7-4790 CPU, 16GB RAM). In contrast, RHC #2, which needs a longer prediction range, needs a simulation time similar to the actual UPS running time. Thus, in principle, applying RHC #2 as realtime control in UPS is possible. If the current UPS model is simplified through data mapping, or the RHC control algorithm is optimized further, real-time control can be applied in industry. Additionally, the scenario of the facilities connected to the UPS in the event of a main power outage can be determined. In this case, the DP algorithm can be applied to increase the performance of the UPS as the potential with the predicted overall electrical load cycle.

Conclusions
In this work, a study to replace the existing lead-acid battery UPS by applying a metal-air battery was extended. The thermodynamic model is refined by simulating each cell in the stack module. Based on this, we proposed an optimizing algorithm that controls the flow of the fan that blows air In most cycles, the zinc consumption is lower for weaker fan flow, though it is seldom very high in these cases either. However, because the simulation time was determined from the available operation time, all of the zinc metal was consumed, as indicated by the gray bars.
RHC #2 showed a slightly lower performance than RHC #1. However, it displayed a relatively low computing cost, approximately 1/5 of the original cost of RHC #1. As a matter of fact, RHC #1 cannot be used for real-time control because its simulation time is 4-5 times higher in a generic PC (i7-4790 CPU, 16GB RAM). In contrast, RHC #2, which needs a longer prediction range, needs a simulation time similar to the actual UPS running time. Thus, in principle, applying RHC #2 as real-time control in UPS is possible. If the current UPS model is simplified through data mapping, or the RHC control algorithm is optimized further, real-time control can be applied in industry. Additionally, the scenario of the facilities connected to the UPS in the event of a main power outage can be determined. In this case, the DP algorithm can be applied to increase the performance of the UPS as the potential with the predicted overall electrical load cycle.

Conclusions
In this work, a study to replace the existing lead-acid battery UPS by applying a metal-air battery was extended. The thermodynamic model is refined by simulating each cell in the stack module. Based on this, we proposed an optimizing algorithm that controls the flow of the fan that blows air to each