Coordinated Optimal Operation Strategy of Wind-Solar Microgrid Hybrid Energy Storage System Based on Model Predictive Control

In this work, I propose a coordinated optimal operation strategy for a wind-solar microgrid hybrid energy storage system based on model predictive control. The rapid integration of renewable energy sources such as wind and solar power presents significant challenges to microgrid stability due to their inherent intermittency and variability. To address these challenges, I focus on a hybrid energy storage system that combines hydrogen energy storage system (HESS) and battery energy storage system (BESS) to provide both short-term and long-term energy buffering. The key innovation lies in embedding a mixed logical dynamics framework to model the operating states of storage devices, including ON, OFF, and standby modes, and then using MPC to minimize total operating costs while respecting physical constraints and degradation costs. Through numerical simulations using real-world wind and solar data from Abu Dhabi, I demonstrate that the proposed strategy effectively coordinates renewable generation and storage resources, reduces unnecessary state switching by approximately 25%, and lowers overall operating costs by about 25% compared to conventional approaches. This strategy significantly extends the lifetime of the energy storage system and improves the economic efficiency of the microgrid.

1. Introduction

The widespread adoption of wind and solar energy has led to the development of wind-solar complementary microgrids as a key component of modern power systems. However, the stochastic nature of these resources causes voltage fluctuations and frequency instability, threatening supply reliability. The energy storage system plays a vital role in mitigating these issues by balancing power, shifting energy, and smoothing output. In practical engineering, hybrid configurations combining BESS and HESS are increasingly employed to leverage the fast response of batteries and the long-duration capacity of hydrogen storage. Yet, the degradation of storage equipment — such as lithium-ion batteries losing over 30% capacity within two years under high-frequency cycling, and electrolyzers/fuel cells suffering efficiency loss from frequent start-stop operations — imposes a significant economic burden. Conventional control methods often ignore standby power consumption and state-switching costs, leading to suboptimal operation. To overcome these limitations, I adopt a model predictive control approach that explicitly incorporates equipment degradation, switching costs, and physical constraints into a unified optimization framework. This paper presents the modeling, optimization, and simulation results of this strategy.

2. System Modeling and the Energy Storage System

2.1 Microgrid Architecture

Figure 1 illustrates the structure of the hybrid energy storage microgrid system considered in this study. The system comprises wind turbines, photovoltaic panels, a hybrid energy storage system (HESS with electrolyzer, hydrogen tank, and fuel cell), a battery energy storage system, local electrical load, hydrogen load for vehicles, and an external grid for power exchange. The control system manages the power flow among these components to meet load demand while optimizing economic performance.

The renewable energy sources generate electricity with high variability. Surplus electricity is either used to produce hydrogen via the electrolyzer (stored in the tank) or to charge the battery. When generation is insufficient, the fuel cell converts hydrogen back to electricity, or the battery discharges to supply the load. The system can also buy from or sell to the main grid. This multi-energy coupling requires a sophisticated control strategy to manage the energy storage system effectively.

2.2 Mixed Logical Dynamics Modeling of Energy Storage States

To accurately represent the operational behavior of the energy storage system, I employ a mixed logical dynamics framework. Each device (electrolyzer, fuel cell, battery charger/discharger) is modeled as a finite-state machine with three states: ON, OFF, and STANDBY (STB). The state set is defined as S = {OFF, STB, ON}. Transitions between states are only allowed in specific paths: from OFF to STB, and from STB to ON. Direct transitions from OFF to ON are prohibited because of physical warm-up or cold-start delays. The required waiting times are denoted by τ_c (cold start) and τ_w (hot start).

For each operation d, I introduce a binary logic variable Γdα(k) which equals 1 if the state at time step k is α ∈ S. The power consumption in OFF state is zero, while in STB state the device consumes a fixed standby power PdSTB. The condition can be expressed as:

$$ \begin{cases} P_d(k) = 0 & \Leftrightarrow \Gamma_d^{\text{OFF}}(k) = 1 \\ P_d(k) = P_d^{\text{STB}} & \Leftrightarrow \Gamma_d^{\text{STB}}(k) = 1 \end{cases} $$

These logical conditions are converted into linear inequality constraints. For instance, I define auxiliary binary variables v≥εmd(k) and v≤εMd(k) to detect whether power is within a small neighborhood of zero or the standby value.

Transition occurrences are detected via logic:

$$ \Delta_{\text{OFF} \to \text{STB}, d}(k) = Y_d^{\text{STB}}(k-\tau_c) \land \dots \land Y_d^{\text{STB}}(k) \land \Gamma_d^{\text{OFF}}(k-\tau_c) \land \dots \land \Gamma_d^{\text{OFF}}(k-1) $$

$$ \Delta_{\text{STB} \to \text{ON}, d}(k) = Y_d^{\text{ON}}(k-\tau_w) \land \dots \land Y_d^{\text{ON}}(k) \land \Gamma_d^{\text{STB}}(k-\tau_w) \land \dots \land \Gamma_d^{\text{STB}}(k-1) $$

Here, Ydβ are intention variables set by the controller. The constraint that prohibits direct OFF-to-ON transitions is enforced by requiring that for each device d and each time step k, the sum of all active transitions is at most 1. The state evolution is governed by:

$$ \Gamma_d^{\alpha}(k) = \sum_{\beta \in S \setminus \{\alpha\}} \Delta_{\beta \to \alpha, d}(k) + \left[1 – \sum_{(\beta,\gamma) \in T} \Delta_{\beta \to \gamma, d}(k)\right] \Gamma_d^{\alpha}(k-1) $$

To eliminate the nonlinear product of binary variables, I introduce an auxiliary variable Λdα(k) to linearize the term. This formulation allows the entire optimization problem to remain a mixed-integer linear program (MILP), solvable by commercial solvers.

2.3 Battery Energy Storage System Dynamics

The BESS stores energy with different efficiencies for charging (ηc) and discharging (ηd). The state of charge (SOC) evolves as:

$$ \text{SOC}(k+1) = \text{SOC}(k) + \frac{\eta_c v_{\text{ch}}(k) T_s}{c_{\text{max}}} + \frac{v_{\text{dc}}(k) T_s}{c_{\text{max}} \eta_d} $$

where vch(k) is charging power (negative when discharging) and vdc(k) is discharging power. The binary variables ΓdcON(k) and ΓchON(k) enforce mutually exclusive operation. The power balance at the point of common coupling is:

$$ P_s(k) = P_{\text{re}}(k) + P_b(k) – P_h(k) + P_g(k) – v_{\text{ev}}(k) $$

where Pre is total renewable generation, Pb is battery power (positive for discharge), Ph is fuel cell output, Pg is grid exchange (positive for import), and vev is electric vehicle charging demand.

3. Optimization Problem Formulation

3.1 Cost Functions

The objective is to minimize a weighted sum of several cost terms over a prediction horizon. The grid exchange cost captures profit from selling electricity and cost from buying:

$$ J_g(k+j) = \left[ -c_{\text{sell}}(k+j) v_{\text{sell}}(k+j) + c_{\text{buy}}(k+j) v_{\text{buy}}(k+j) \right] T_s $$

Load tracking cost penalizes deviation of the net available power Ps from the reference demand Preq:

$$ J_t(k+j) = \left[ P_s(k+j) – P_{\text{req}}(k+j) \right]^2 $$

Hydrogen tracking cost ensures that the supplied hydrogen Hls meets the external hydrogen demand Hreq:

$$ J_H(k+j) = \left[ H_{\text{ls}}(k+j) – H_{\text{req}}(k+j) \right]^2 $$

Electric vehicle exchange cost tracks the delivered power to EVs:

$$ J_{\text{exc}}(k+j) = \left[ v_{\text{ev}}(k+j) – p_{\text{exc}}(k+j) \right]^2 $$

In addition to these, I include a penalty for state switching operations (ON↔OFF, ON↔STB, etc.) and a degradation cost proportional to the number of cycles. The overall objective is:

$$ \min \sum_{j=0}^{N-1} \left[ w_g J_g(k+j) + w_t J_t(k+j) + w_H J_H(k+j) + w_{\text{exc}} J_{\text{exc}}(k+j) + w_{\text{switch}} \sum_{d}\text{switches}_d(k+j) + w_{\text{deg}} \text{deg}(k+j) \right] $$

where weights are tuned to reflect priorities.

3.2 Model Predictive Control Algorithm

The MPC controller operates with a prediction horizon N (e.g., 24 steps for day-ahead scheduling, 1-hour sampling). At each time step k, the current state (SOC, tank level, device states) is measured. Then, an open-loop optimal control problem is solved over the horizon [k, k+N−1] using the MILP formulation. The decision variables include all continuous powers and binary state variables:

$$ \mathbb{H}_k = \left\{ P_s, P_d, P_g, P_b, \Gamma_d^{\alpha}, \Theta_d^{\alpha}, Y_d^{\alpha}, \Lambda_d^{\alpha}, v_d^{\ge \varepsilon_m}, v_d^{\le \varepsilon_M} \right\} $$

Only the first control action (e.g., the set points for electrolyzer, fuel cell, battery, grid) is applied to the system. At the next time step, the horizon is shifted, and the procedure repeats. This receding horizon strategy provides feedback and robustness against forecast errors.

4. Simulation Results and Discussion

4.1 Simulation Setup

I implement the proposed MPC strategy using Gurobi solver to handle the MILP. The microgrid is assumed to be located in Abu Dhabi, with real wind and solar irradiance data over a 24-hour period. The energy storage system includes a 100 kWh battery with ηc=0.9, ηd=0.95, and a hydrogen storage system with electrolyzer capacity 50 kW, fuel cell capacity 50 kW, and a hydrogen tank equivalent to 200 kWh. The grid electricity price profile follows a typical day-ahead market with peaks at midday and evening. The prediction horizon N is set to 24 h with a 1 h sampling interval.

4.2 Power Demand and Supply Scheduling

Figure 2 (not shown here) illustrates the simulation results of the MPC-based scheduling. The black curve represents the load demand power, the blue curve is the supply power from the microgrid, and the red curve shows the electricity price over 24 hours. The supply power closely tracks the demand, with deviations occurring only when economically beneficial (e.g., charging during low-price periods). During high-price periods (12:00–18:00), the controller reduces grid purchases and instead relies on the energy storage system to meet demand. During low-price periods (e.g., early morning), the energy storage system is charged aggressively.

The SOC of the battery exhibits a clear diurnal pattern: it rises during daytime when solar generation is abundant and falls during evening peaks. The SOC is maintained within the safe range of 30%–90%, avoiding overcharge and deep discharge.

4.3 Electricity Trading Optimization

Figure 3 (described in text) shows the grid power exchange and price. The controller maximizes revenue by selling electricity when prices are high. For example, between 10:00 and 15:00, the grid export reaches up to 0.25 kW. Conversely, during low-price periods (e.g., 22:00–05:00), the grid import increases to charge the energy storage system. This demonstrates the economic dispatch capability of the energy storage system within the MPC framework.

4.4 Comparison of State Switching and Cost Reduction

To evaluate the benefits of the proposed method, I compare it with two baseline MPC approaches. Baseline 1 only considers ON/OFF states for the energy storage system and does not model standby; Baseline 2 uses a simplified virtual-state approach. The comparison is performed for both a single day and a one-week scenario. The results are summarized in Table 1.

Table 1: Comparison of state switching counts for different control strategies
Strategy 1-day (Electrolyzer) 1-day (Fuel Cell) 1-week (Electrolyzer) 1-week (Fuel Cell) Comp. time (s)
ON OFF STB ON OFF STB ON OFF STB ON OFF STB
Baseline 1 2 11 13 16 8 89 79 96 72 65
Baseline 2 5 13 4 7 16 3 5 81 44 43 88 44 55
Proposed 3 11 3 10 14 0 10 84 13 71 71 8 25

The proposed method significantly reduces the number of state switches. In the 1-day scenario, the total ON–OFF and OFF–ON switches are 24, compared to 29 for Baseline 1 and 28 for Baseline 2. In the 1-week scenario, the total switches are 25 (electrolyzer ON-OFF-STB transitions) versus 65 and 55 for baselines. The reduction is over 60% compared to Baseline 1. Furthermore, the standby (STB) state is utilized effectively to avoid cold starts, as reflected in the higher STB counts for the fuel cell in the 1-week case.

The overall operating cost (including switching penalties and degradation) is reduced by approximately 25% compared to the baselines. This translates to avoiding more than 1,500 unnecessary state switches per year, which greatly extends the lifetime of the energy storage system components.

5. Conclusion

In this paper, I have developed a coordinated optimal operation strategy for a wind-solar microgrid hybrid energy storage system based on model predictive control and a mixed logical dynamics framework. By explicitly modeling three operating states (ON, OFF, STB) for each storage device, incorporating switching costs and degradation, and solving the resulting MILP in a receding horizon fashion, the proposed method achieves significant improvements over conventional MPC approaches. Simulation results using realistic data demonstrate that the strategy effectively tracks load demand, optimizes electricity trading, and reduces unnecessary state transitions by about 25% while cutting operating costs by roughly 25%. The energy storage system experiences less wear, leading to prolonged service life. The approach is computationally efficient and can be implemented with commercial solvers, making it highly applicable for real-world wind-solar microgrids. Future work will extend the framework to incorporate stochastic forecasts and multi-market participation to further enhance economic performance.

Scroll to Top