As a power system engineer focusing on energy storage integration, I have witnessed the rapid transformation of the electricity grid driven by renewable energy deployment. The frequency regulation capability of conventional thermal power units is being challenged by the fluctuating and intermittent nature of wind and solar generation. To meet the stringent requirements of automatic generation control, a hybrid energy storage system combining an energy storage battery and flywheel is increasingly recognized as a key enabling technology. In particular, the energy storage battery provides energy-based regulation, while the flywheel handles high-power, short-duration transients. However, incorporating such a hybrid system into an existing thermal power plant is not trivial: the available space is often limited, safety distances must be respected, and the layout must achieve economic and operational efficiency. In this study, I present a systematic layout design method based on a mixed-integer linear programming (MILP) framework combined with a metaheuristic strategy. The proposed method has been verified in two actual engineering scenarios, and I hope that the insights can assist fellow engineers in similar projects.

1. Background and Necessity of Hybrid Storage for Frequency Regulation
Under the dual-carbon strategy, the installed capacity of renewable energy has grown explosively. By the end of 2024, China’s renewable capacity reached 1,889 GW, accounting for about 56% of the total installed capacity. Wind and solar alone contribute more than 74% of this renewable share. Such a high proportion of non-synchronous generation introduces severe challenges to grid frequency stability. Thermal power units, which are the mainstay of frequency regulation, suffer from slow response and low accuracy compared with modern power electronics. The introduction of an energy storage battery can provide fast, accurate response, but its performance degrades when facing high-frequency, high-magnitude power fluctuations. A flywheel, as a power-type storage device, offers virtually unlimited cycle life and extremely fast response. Therefore, a hybrid configuration that pairs an energy storage battery with a flywheel is ideal for supporting thermal units in both primary and secondary frequency regulation.
Several studies have demonstrated the advantages of hybrid storage in frequency regulation. For instance, coupling electrochemical storage with flywheel storage in photovoltaic plants improves frequency regulation under various load disturbances. In wind power scenarios, capacity configuration based on intrinsic mode decomposition shows the superiority of hybrid systems. In thermal power plants, control strategies for a lithium battery–flywheel system have been evaluated using indices such as frequency deviation and peak fluctuation, confirming that the hybrid system enhances both stability and economy. However, most existing work focuses on control and capacity sizing, whereas the physical layout of the storage equipment inside the plant has received less attention. Real projects require a careful arrangement of prefabricated containers (cabins) within a constrained site, which is essentially a facility layout problem.
2. Problem Formulation and Mathematical Modelling
I formulate the layout problem as an unequal-area facility layout problem with static, free orientation. The goal is to determine the positions and orientations of all prefabricated cabins such that safety constraints are respected and an aggregated cost function is minimized. In the following subsections I describe the assumptions, notation, constraints, and objective functions.
2.1 Site and Facility Representation
The layout region is simplified as a rectangle of length \(B_x\) and width \(B_y\). A Cartesian coordinate system is defined with the origin at one corner of the rectangle. Facilities are modelled as axis-aligned bounding boxes whose length and width are known. Each facility has an orientation variable that is either 0 (length side parallel to the X-axis) or 1 (length side parallel to the Y-axis). The position of a facility is represented by the coordinates of its lower-left corner \((O_x, O_y)\). The geometric center of each facility is used as the connection point for cables. Obstacles inside the area are also treated as axis-aligned bounding boxes, but they are not movable.
The main variables for facility \(i\) are summarized in the following table.
| Symbol | Description |
|---|---|
| \(O_{x,i}, O_{y,i}\) | Coordinates of the lower-left corner of facility \(i\) |
| \(O_{len,i}\) | Projected length of facility \(i\) along the X-axis |
| \(O_{wid,i}\) | Projected width of facility \(i\) along the Y-axis |
| \(Orient_i\) | Binary orientation variable: 0=original, 1=rotated 90° |
| \(L_{len,i}\) | Original length (longer side) of facility \(i\) |
| \(L_{wid,i}\) | Original width (shorter side) of facility \(i\) |
The projected dimensions are expressed as linear functions of the orientation variable:
$$
O_{len,i} = Orient_i \cdot L_{wid,i} + (1 – Orient_i) \cdot L_{len,i}
$$
$$
O_{wid,i} = Orient_i \cdot L_{len,i} + (1 – Orient_i) \cdot L_{wid,i}
$$
2.2 Boundary Distance Constraints
Each facility must maintain a minimum safe distance \(D_B\) from the boundary of the site. The following inequalities enforce this requirement:
$$
O_{x,i} \ge D_B
$$
$$
O_{y,i} \ge D_B
$$
$$
O_{x,i} + O_{len,i} + D_B \le B_x
$$
$$
O_{y,i} + O_{wid,i} + D_B \le B_y
$$
These constraints are valid for every facility that is not an obstacle. For obstacles, the fixed coordinates are used directly.
2.3 Separation Constraints Between Facilities
Facilities must not overlap and must maintain a minimum safety distance \(D_{AB}\) from each other. Because the relative position of two rectangles can be categorized into eight possible directions, I introduce binary variables to determine which directional constraints are active. Let \(north, south, east, west\) indicate the relative position of facility \(B\) with respect to facility \(A\). Additionally, let \(up, down, right, left\) indicate the direction in which the safety distance is enforced. The following logical conditions hold:
$$
1 \le north + south + west + east \le 2
$$
$$
north + south = 1
$$
$$
east + west = 1
$$
$$
up + down + right + left \le 1
$$
$$
north \ge up, \quad south \ge down, \quad west \ge left, \quad east \ge right
$$
The separation constraints are then formulated using a big-\(M\) constant:
$$
D_{AB} + (right – 1)M \le O_{B,x} – (O_{A,x} + O_{len,A})
$$
$$
D_{AB} + (left – 1)M \le O_{A,x} – (O_{B,x} + O_{len,B})
$$
$$
D_{AB} + (up – 1)M \le O_{B,y} – (O_{A,y} + O_{wid,A})
$$
$$
D_{AB} + (down – 1)M \le O_{A,y} – (O_{B,y} + O_{wid,B})
$$
By choosing \(M\) sufficiently large, these constraints force the active distance constraint only in the correct direction, while leaving the other direction unrestricted. This linear formulation can be directly handled by a MILP solver.
3. Objective Function and Multi-Criteria Optimization
The overall objective function contains three components: (1) cable and civil works cost, (2) operation and maintenance management cost, and (3) layout aesthetics. I combine them with dynamic weights that change during the optimization process.
3.1 Cable and Civil Works Cost
Electrical connections between cabins are defined according to a connection set \(E\). The principal connections in a hybrid storage system are as follows:
- Electrical primary cabin ↔ station transformer cabin
- Electrical primary cabin ↔ electrical secondary cabin
- Electrical primary cabin ↔ storage converter cabin
- Storage converter cabin ↔ energy storage battery cabin
- Electrical primary cabin ↔ flywheel converter cabin
- Flywheel converter cabin ↔ flywheel cabin
For each pair \((i,j)\) in \(E\), the cost is proportional to the Manhattan distance between the centers of the two cabins. The total cable and civil cost \(C_1\) is:
$$
C_1 = \sum_{(i,j) \in E} L(i,j) \cdot f_1(i,j)
$$
Here \(L(i,j)\) is the Manhattan distance between the geometric centers, and \(f_1(i,j)\) is the unit cost that includes cable price and trench construction cost.
3.2 Operation and Maintenance Management Cost
To improve operational convenience, related facilities should be placed close to each other. For example, an energy storage battery cabin should be adjacent to its corresponding power conversion system (PCS) cabin. Similarly, flywheel cabins and flywheel converter cabins should form compact clusters. I define non-logistics relationship factors to capture these requirements.
For the battery–PCS pairs, the relationship scale is:
$$
l_{bat,pcs} = \frac{1}{2} \sum_{i=1}^{n_{bat}} \sum_{j=1}^{n_{pcs}} |O_{mid,bat,i} – O_{mid,pcs,j}| \quad \forall (i,j) \in E
$$
For clustering the energy storage battery cabins themselves, I use the sum of distances from each battery cabin to the centroid of all battery cabins:
$$
l_{bat,bat} = \sum_{i=1}^{n_{bat}} |O_{mid,bat,i} – O_{mid,bat,centre}|
$$
For the flywheel system, the relationship scales are:
$$
l_{fw,pcs} = \frac{1}{2} \sum_{k} \sum_{j=1}^{n_{fpcs}} |O_{mid,fw,centre,k} – O_{mid,fpcs,j}| \quad \forall (j,k) \in E
$$
$$
l_{fw,others} = \sum_{i=1}^{n_{fw}} |O_{mid,fw,i} – O_{mid,others}|
$$
The maintenance cost objective is then:
$$
C_2 = \sum f_2(i,j,k,\ldots) \cdot l(i,j,k,\ldots)
$$
where \(f_2\) is a weight factor that is set based on the number and criticality of the cabins.
3.3 Layout Aesthetics
From an engineering design perspective, a regular and aligned layout is preferred. I model aesthetics by penalizing misalignment of connected cabins. For each pair in \(E\), I introduce two binary variables \(tilt\_x(i,j)\) and \(tilt\_y(i,j)\). At least one of them must be 1, meaning that the two cabins are not aligned in the X or Y direction. The aesthetics objective is:
$$
C_3 = \sum_{(i,j) \in E} f_{align} \cdot tilt(i,j)
$$
$$
tilt(i,j) = tilt\_x(i,j) + tilt\_y(i,j)
$$
$$
tilt\_x(i,j) + tilt\_y(i,j) \ge 1
$$
Because \(f_{align}\) is a large penalty coefficient, the optimizer is encouraged to place connected cabins either exactly aligned in the X direction or exactly aligned in the Y direction.
3.4 Dynamic Weighted Sum
To balance the three objectives during the iterative search, I define a dynamic objective function:
$$
F = \alpha^{(s)} \frac{C_1}{L_0} + \beta^{(s)} \frac{C_2}{L_0} + \gamma^{(s)} C_3
$$
where \(L_0\) is a normalization term, taken as the perimeter of the site. The weights evolve linearly with the iteration step \(s\):
$$
\alpha^{(s)} = \alpha_0 + (\alpha_{fin} – \alpha_0)\frac{s}{S}
$$
$$
\beta^{(s)} = \beta_0 + (\beta_{fin} – \beta_0)\frac{s}{S}
$$
$$
\gamma^{(s)} = \gamma_0 + (\gamma_{fin} – \gamma_0)\frac{s}{S}
$$
$$
\alpha^{(s)} + \beta^{(s)} + \gamma^{(s)} = 1
$$
Through this adjustment, the optimization first emphasizes the economic cost, then gradually increases the significance of aesthetics and maintenance convenience, leading to a balanced final layout.
4. Hybrid Optimization Strategy
Because the MILP model becomes intractable when the number of facilities is large, I adopt a decomposition strategy inspired by evolutionary algorithms. The key idea is to iteratively fix a subset of facility positions while solving the remaining subproblem with MILP. The procedure consists of the following steps:
- Set a time limit for the initial MILP pre-solve. If no optimal solution is found, store the best \(M_0\) solutions from the solver pool to form an initial population \(S_0\).
- For each individual in the population, randomly select one facility and fix its position and orientation. Solve the reduced MILP under the current time limit.
- If the solver does not return the global optimum, extract the best \(M_1\) solutions from the solution pool.
- Apply mutation at a certain probability. In my implementation, mutation flips the orientation of a fixed facility. The mutated solutions are merged with the original \(M_1\) solutions to form the next population \(S_1\).
- Then, select a second facility to fix. The second facility is preferably of the same type as the first or has a direct cable connection with it. Repeat the solve-and-extract process.
- When the objective improvement between two consecutive iterations is smaller than a tolerance, the algorithm may be trapped in a local optimum. In that case, randomly unlock one of the fixed facilities and continue.
- The iteration terminates when all facilities have been fixed or when no better solution can be found within the time limit.
This hybrid method combines the exact optimality of MILP for sub-problems with the global search ability of metaheuristic strategies. By progressively increasing the number of fixed facilities, the solution space is effectively reduced, making the problem tractable even for 20 or more cabins.
5. Case Studies and Validation
5.1 Case 1: All-Battery Energy Storage Scenario
The first case is a pure energy storage battery frequency regulation project. The available site is a rectangle of \(40.3\,\text{m} \times 33.5\,\text{m}\). A road of width \(3.5\,\text{m}\) crosses the site vertically in the center. This is a compact site with no flywheel system. The facilities to be arranged are listed in Table 1.
| Facility type | Quantity | Dimensions (mm × mm) |
|---|---|---|
| Electrical primary cabin | 1 | 13000 × 3300 |
| Electrical secondary cabin | 1 | 12192 × 2800 |
| Station transformer cabin | 1 | 5850 × 2800 |
| Storage converter/PCS cabin | 7 | 6058 × 2438 |
| Energy storage battery cabin | 7 | 12192 × 2438 |
There are 17 facilities in total. I set the initial pre-solve time to 1 minute. The dynamic weights start from \((\alpha_0,\beta_0,\gamma_0) = (0.7,0.2,0.1)\) and end at \((\alpha_{fin},\beta_{fin},\gamma_{fin}) = (0.5,0.2,0.3)\). The COPT solver is used as the MILP engine. The population size is chosen equal to the number of facilities, i.e. 17.
A typical individual from the initial population is shown in Figure 1 (not reproduced here). Through iterative fixing and mutation, the final optimized layout is obtained. The final solution is compared with the actual as-built layout. The electrical primary cabin, energy storage battery cabins, and PCS cabins are placed at identical positions. The station transformer cabin and electrical secondary cabin differ slightly, because the actual layout also considers an external column switch on the left side of the site. The algorithm’s solution nevertheless satisfies all safety and operational constraints, and the objective value improves by 18% compared with the best initial individual.
5.2 Case 2: Hybrid Battery and Flywheel Scenario
The second case involves a hybrid storage system with both lithium batteries and flywheels. The site is \(66.7\,\text{m} \times 43.6\,\text{m}\), with a 5 m wide road crossing from left to right at a distance of 35.2 m from the left boundary. This project contains five sets of lithium battery storage and two sets of one-to-four flywheel groups. The facility inventory is presented in Table 2.
| Facility type | Quantity | Dimensions (mm × mm) |
|---|---|---|
| Large electrical primary cabin | 1 | 13400 × 3500 |
| Small electrical primary cabin | 1 | 7000 × 3500 |
| Electrical secondary cabin | 1 | 12192 × 3000 |
| Station transformer cabin | 1 | 5500 × 2800 |
| Storage converter/PCS cabin | 5 | 9125 × 2438 |
| Energy storage battery cabin | 5 | 12192 × 2438 |
| Flywheel converter cabin | 2 | 16000 × 3800 |
| Flywheel cabin | 8 | 5000 × 5000 |
There are 24 facilities in total. I used an initial pre-solve time of 3 minutes, and the dynamic weight ranges were set to start at \((0.7,0.2,0.1)\) and end at \((0.4,0.4,0.2)\). The initial population size is 24. In the middle of the optimization, I observed that some individuals that locked the flywheel-related facilities converged prematurely. The objective function decreased by less than 5% over two consecutive iterations, which indicates a local optimum. To escape this, I unlocked one of the flywheel converter cabins and continued the process. This intervention helped the algorithm reach a significantly better solution.
The final optimized layout placed the flywheel groups in two compact clusters near the right side of the site, while the energy storage battery system occupies the left side in a regular pattern. The distance between the energy storage battery regions and the flywheel regions is maximized to reduce safety risks. The final objective value is 23% better than the best initial state and 12% better than the previous local optimum.
5.3 Computational Performance and Parameter Tuning
The efficiency of the proposed method is highly dependent on the pre-solve time and on the number of fixed facilities at each iteration. Table 3 summarizes the main parameters used in the two cases.
| Parameter | Case 1 | Case 2 |
|---|---|---|
| Number of facilities | 17 | 24 |
| Initial pre-solve time (min) | 1 | 3 |
| Population size \(M_0\) | 17 | 24 |
| Number of elite solutions \(M_1\) | 10 | 25 |
| Mutation probability | 0.2 | 0.2 |
| Initial weights \((\alpha_0,\beta_0,\gamma_0)\) | (0.7,0.2,0.1) | (0.7,0.2,0.1) |
| Final weights \((\alpha_{fin},\beta_{fin},\gamma_{fin})\) | (0.5,0.2,0.3) | (0.4,0.4,0.2) |
| Total wall-clock time (min) | 12 | 28 |
From my experiments, I found that the dynamic weight scheduling plays a crucial role. When the weight for aesthetics is too high at the beginning, the optimizer tends to force alignment prematurely, creating poor layouts. Conversely, when the maintenance cost weight is increased too early, the facilities become over-clustered and violate cable routing constraints. Therefore, the choice of the initial and final weights should be aligned with the specific project priorities.
6. Discussion
The proposed method is intended to support the preliminary layout design of a hybrid storage system in thermal power plants. By integrating the exact optimization capability of MILP with the flexible search landscape of metaheuristics, the method offers several practical advantages. First, it can handle mixed cabin sizes and orientation decisions. Second, it explicitly incorporates safety distances and non-overlap constraints as linear inequalities, making the solution feasible for real-world construction. Third, the multi-objective formulation allows engineers to evaluate trade-offs between cost, operation, and aesthetics.
However, there are limitations. The method relies on the Manhattan distance for cable cost, which is accurate only if cable trenches are built orthogonally. In some projects, diagonal routing may be permitted, which could lead to different optimal layouts. Moreover, the subjective nature of “maintenance convenience” and “aesthetics” means that the associated weight factors require careful calibration. In my practice, I usually run several scenarios with different weight sets and then present the resulting Pareto-front-like options to the owner and design team.
7. Conclusion and Future Work
In this article I have presented a comprehensive layout design method for a hybrid energy storage system consisting of an energy storage battery and flywheel in a thermal power plant. The core innovation is the coupling of a MILP model with a population-based iterative fixing strategy. The approach successfully solves practical-scale problems with up to 24 facilities. The case studies show that the algorithm generates layouts that are comparable to or even better than manually designed ones, while significantly reducing engineering design effort.
Future research should extend the method to more complex scenarios, including the collaborative optimization of access roads, irregular obstacle boundaries, and multi-site layout. In addition, the integration of molten salt thermal storage equipment for combined heat and power plants is a promising direction. The layout of such equipment introduces additional thermal and hydraulic constraints that are not present in electrochemical and flywheel systems. I believe that the continued development of hybrid optimization algorithms will play a vital role in the large-scale deployment of energy storage technologies in modern power grids.
I hope this study provides a useful reference for engineers and researchers working on the spatial integration of storage systems. The combination of exact optimization and heuristic search is a powerful tool, and with further refinement, it can be embedded into digital design platforms to automatically generate refined layout proposals for a wide range of energy storage projects.
