CHEMICAL ENGINEERING TRANSACTIONS VOL. 81, 2020 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Petar S. Varbanov, Qiuwang Wang, Min Zeng, Panos Seferlis, Ting Ma, Jiří J. Klemeš Copyright © 2020, AIDIC Servizi S.r.l. ISBN 978-88-95608-79-2; ISSN 2283-9216 Modeling and Simulation Analysis of Power Dispatch of Solar Photovoltaic Microgrid in Paper Mill Ying Gao, Yusha Hu, Jigeng Li, Mengna Hong, Yi Man* State Key Laboratory of Pulp and Paper Engineering, South China University of Technology, Guangzhou, 510640, China manyi@scut.edu.cn With the depletion of fossil energy, it becomes more and more urgent to find alternative energy sources. Renewable energy plays an important role in energy structure transition. The change of energy structure has challenged the operation of traditional power systems to a great extent. Emission load dispatch problem is one of fundamental issues of power system operation. It is a complex issue to reduce the time for power dispatch as short as possible in different time intervals and conditions. According to the characteristics of supply-side operation and dispatch in paper mill as well as the historical and simulation data, a dispatch model was developed based on the Generative Adversarial Nets (GAN) algorithm to solve the energy storage scheduling issue for solar photovoltaic microgrid. Industrial data was used to verify the proposed model. Compared with GA method and DQN method, the GAN method was able to reduce the operating costs by 3.639 % and 2.734 %. The results show that the model can effectively decrease the operation cost. 1. Introduction Solar and wind are two types of promising renewable energy and important sources of microgrid (Khalid et al., 2018). However, they are characterized by intermittence and instability, so they cannot provide stable and reliable energy source for users continuously. Battery energy storage system (BESS) has a promising application prospect in the flexible peak load regulation of microgrid. There will be a huge demand for energy storage in the future. According to the report of EIA (Tvaronavičienė et al., 2020), renewable energy sources such as wind and solar will overtake nuclear power, coal and natural gas by 2045. Researchers have made much progress in environmental- economic optimal dispatch of microgrid. Differential evolution algorithm (Qiao et al., 2020), particle swarm optimization and artificial fish swarm algorithm (Yuan et al., 2019), chaotic annealing algorithms (Wang, 2018) have been proposed in succession. These methods can solve the environmental-economic optimal dispatch problem, however, they also have obvious shortcomings, such as the insufficient ability in local optimization, the low precision of prediction, and the empirical choice of parameters (Yang et al., 2019). With the improvement of computing ability and the development of data science, machine learning methods have been gradually applied to industry scenarios to solve the conventional intractable issues. For example, an improved non-dominated sorting genetic Algorithm II (NSGA-II) was proposed (Teodoro et al., 2019) for multi- objective optimization of environmental-economic dispatch (EED) problem. In order to evaluate the performance of the system, NSGA-RL method was proposed on ten multi-objective benchmark functions. It has been indicated that the Q-LEARNING Algorithm based on time difference could be used to solve the energy management problem of Microgrid (Kuznetsova et al., 2013). A stochastic process as a Markov process using a multivariate Gaussian Mixture Model was used to perform reliable security analyses, namely, the lookahead security estimation of the operational state of a grid (Germine et al., 2016). An improved policy gradient method of Deep Reinforcement Learning (DRL) for Combined Heat and Power (CHP) dispatch problem was proposed to handle with a variety of operating situations and get better performance (Zhou et al., 2020). BESS can smooth the fluctuation of output power for microgrid by eliminating negative characteristics of uncertainty and intermittence of renewable energy for power generation, especially for photovoltaic power. In recent years, BESS plays an important role in storing superfluous solar energy to save operating costs. Scholars from different areas have conducted a variety of studies applying BESS to electric system. At present, there are DOI: 10.3303/CET2081207 Paper Received: 30/04/2020; Revised: 29/06/2020; Accepted: 30/06/2020 Please cite this article as: Gao Y., Hu Y., Li J., Hong M., Man Y., 2020, Modeling and Simulation Analysis of Power Dispatch of Solar Photovoltaic Microgrid in Paper Mill, Chemical Engineering Transactions, 81, 1237-1242 DOI:10.3303/CET2081207 1237 several types of batteries available for the power sector, including lithium-ion battery, lead-acid batteries, and sodium sulphur batteries. These batteries are widely used for pumping energy storage, which accounts for 94.3 %, followed by electrochemical energy storage of 3.7 %. On top of that, they are also used for supercapacitor, superconducting magnetic energy storage, flywheel, air compression, hydrogen storage, and methane storage (Esparcia et al., 2019). The model cannot be formulated explicitly, for the "black box" characteristic of machine learning methods. The biggest weakness of data-driven model is the constraint by parameters, and training model needs a lot of time (Hatamlou, 2012). GAN method has three advantages, the first one is no need for strong assumptions about human behavior, the second one is the machine learning models based on simulation and historical data, the third one is the inherent randomness reflected in behaviour (Liu et al., 2020). To fill the research gap of scheduling problem of power supply in paper mill, in this paper, GAN method was put forward to simulate power dispatch of a paper mill. An example of computation was cited to reveal that the proposed algorithm has been proven to be reasonable and superior. As a mature and commercial energy storage method, lithium battery was used in the BESS. 2. Methodology 2.1 Dispatch in supply side of paper mill In order to minimize the operating cost of paper mills, the cost of buying power from grid or solar power plant should be optimized to meet the need of supply side. The model supposed the BESS was already in place, assuming that the size and cost of BESS was fixed. The optimization objective was to make the most of solar power and minimize the total cost, the model is defined as follows: F = ∑ z1(t)+z2(t)-z3(t) t t=1 (1) Where, z1 is the total cost including the cost of power from grid, z2 is the cost of power from solar power plant, z3 is the power from battery storage system, and t is running time of BESS. When compared with the cost without BESS, the operating cost and the origin investment of BESS should be added to the total cost. This part was constant, since this paper assumed that BESS was already established. The BESS system was composed of: LiFePO4 battery, photovoltaic system, converter, inverter and controller. The BESS and the power supply side could obtain electricity from the grid and the solar power plant. The work mode of the system is as shown in Figure 1. Figure 1: Working Mode of the Solar Power System There were two factors affecting the charge and discharge rates of the battery. One was the properties of the battery itself. The battery should work in proper temperature with stable charge rate of 1 time its capacity (1 C charge rate) and discharge rate of 0.5 times its capacity (0.5 C discharge rate). The other one was the power and voltage of supply side. Actual charge and discharge rates might be lower than the rated ones. To keep the battery running smoothly (Yang et al., 2020), SOC was set to between 10 %-90 %. The load of supply side is related to the type of paper produced and the production plan of paper products, but fluctuates in a small range over a short period (Hu et al., 2018). For the convenience of calculation, the charge and discharge rates of the battery were set to fixed values according to the prior constraints, and the battery 1238 could be charged or discharged either only or simultaneously. Considering that the price of electricity varies by the hour, the BESS made a decision on whether to charge (discharge) or not every hour, that is, the scheduling scheme is shown as a 2*24 zero-one matrix. The Matrix was then optimized using a variety of methods. Figure 2 shows the flow chart of the technical route for this work. Figure 2: Flow Chart of the Technical Route 2.2 Basic principle of GAN GAN was composed of two networks, the generator and the discriminator, inspired by a two-person zero-sum game in which two networks competed against each other to get the best results. GAN could capture the statistical characteristics of data effectively in super-high dimensional feature space with the powerful learning ability of deep neural network. GAN could avoid the difficulties of traditional probability density estimation methods (such as kernel density estimation) when dealing with ultra-high dimensional data. The flowchart is as shown in Figure 3. Figure 3: Flowchart of Adversarial Nets Framework As the name implies, respective functions of generator and the discriminator are as follows: G is a generating network that receives a random noise z and uses the noise to generate a supply side scheduling scheme matrix, known as G(z). D is a network that judges whether the scheduling scheme is "real". Its input parameter is x, which is a scheduling scheme from database, the output D (x) is the probability that x is a real scheduling scheme, if it is 1, x is 100 % real scheduling scheme, and if the output is 0, x cannot be a real scheduling scheme. It is supposed that the utility function of the competition between D and G is V (G, D), then the mathematical form of GAN's training is: min G max D V(D,G) =Ex~Pdata(x)[ln(D(x))]+Ex~pz(z) [ ln (1-D(G(z))) ] (2) Where D(x) is the probability of D that judges whether a real scheduling scheme is real (x is real, for D, the closer it is to 1, the better). And the D(G(z)) is the probability that the D network will judge whether the scheduling scheme generated by G is true or not. The target of generator (G) was to act the same as real data, when D(G(z)) was bigger, G was closer to real data. The target of discrimination (D) was to improve judgement, when D(x) was bigger and D(G(x)) was smaller, 1239 the better the judgement was. When D(x) was 1 and D(G(x)) was 0, Eq(2) got its minimum value. And the purpose of Eq(2) was to get the optimal G and D, so that the difference between the distribution of real data and generator was the smallest. 3. Results and discussions 3.1 Parameters of BESS The simulated plant used the supply-side data of a paper-making enterprise and local electricity price. The plant was located in an industrial park with a large area to support the placement of BESS. The capacity of the BESS was set to 3,413.76 kWh, and the charge and discharge rates were set to 568.82 kWh/h. The efficiency of the converter was set to 95 %, and the efficiency of the inverter was set to 99 %. Considering the influence of the depth of charge and discharge on battery life, the battery operating range was set to 10 %-90 % SOC, and the initial stage was set to 10 %. Further, the grid price was divided into spiking, peak, flat section and low price. From 19:00 to 21:00, the price was 1.0824 RMB/kWh for spiking time; from 8:00-10:00 and 15:00-18:00, it was 0.9004 RMB/kWh for peak time; from 23:00 to 6:00 the next day, it was 0.4164 RMB/kWh for low price time; at the other time of the day, it was 0.6644 RMB/kWh for flat section time. The solar power price is 0.9 times grid price. 3.2 Simulation setup of GAN The generation network (G) and discriminant network (D) used a framework including two hidden layers, a flatten layer and a fully connected layer with 100 nodes, and the activation function is sigmoid: S(t) = 1 1+e-t (3) Where, t is the output of the upper neural network layer. Binary cross entropy (BCE) is used to measure the difference between the generated model and the real data, which is the network training error. The cross entropy is defined as: H(p, q) = ∑ p(x) ln 1 q(x) x (4) Where, p is the probability distribution of real scheduling scheme and q is the false one. When H(p,q) was bigger, the difference between p and q was bigger. 3.3 Training results of GAN Eq(4) measured the information loss in the process of fitting the probability distribution of real data with the probability distribution of data generated by random noise. The less the loss was, the better the fit was, and the truer the data were. a) b) Figure 4: Error of a) Discriminator; and b) Generator of the Convergence of GAN Since the convergence of GAN is usually a mixed strategy Nash Equilibrium, the criterion of convergence is that the difference between the upper and lower bounds of the error is a fixed constant (or fluctuates near the constant). The convergence of training is shown in Figure 4. Figure 4a and Figure 4b show the errors of discriminator and generator, and the formula is Eq(4). As the number of iterations increased, the error of discriminator fluctuated between 0 and 2, and the error of generator fluctuates near 16, which showed that the model had good convergence. 1240 3.4 Comparison of economic results At present, there is no mature scheduling scheme for reference, so in the simulation, a low-cost scheduling scheme was selected as the real scheduling scheme. Data set included scheduling scheme of 2018, and the cost of the GAN method was set lower than other two methods. The partial data of noise matrix was acquisited from paper mill. Table 1: Cost of Different Methods Parameter Real GA DQN No BESS Daily cost in Day 1(RMB) 80,211.88 82,813.90 82,285.00 81,808.17 Daily cost in Day 2(RMB) 65,973.62 68,426.84 67,817.06 67,421.11 GAN method was used to give a dispatch solution, as shown in Table 1. It can be observed that GAN method could give a solution to lower the current cost less than the cost of other methods. But the cost was still very high, since the price of power energy was too high. Due to the limitation of the GAN method, it is difficult to obtain the global optimal solution. However, the GAN method was still better than the traditional heuristic method to some extent. Figure 5: Cost Based on Different Methods From table 1, it can be observed that cost calculating by GAN had the same trend to real scheduling scheme selected to feed GAN model until then. Compared with GA method and DQN method, the GAN method was able to reduce the operating costs by 3.639 % and 2.734 %. More specifically, Figure 5 shows the optimal cost based on different methods. Figure 5 is operating costs in Day 2 calculating by different methods. Operating costs were similar in the first 12 hours, with the next 12 hours GAN method having lower operating cost and so the lowest daily operating cost. The operating costs calculated by DQN and GA were higher than that calculated by GAN. The operating cost without BESS was the highest. 4. Conclusions In this paper, a component sizing method for supply side in paper mill based on dynamic programming was proposed. By calculating the operating costs under different algorithms, an optimal scheduling scheme was obtained for supply side of the paper mill. The simulation results showed the following key results. (1) The load of supplied side was related to the type of paper produced and the production plan of paper products, but it fluctuated in a small range over a short period. A zero-one matrix could be used to represent a scheduling scheme. (2) The convergence of the model was proved, for D lost and G lost between the upper and lower bounds of the error were fixed constants or fluctuated near the constant. (3) By comparing daily cost under different algorithms, GAN algorithm was very good at mimicking the behavior of other models, but in “black box” mode. Overall, a simulation case of power dispatch on the supply side was designed based on the power dispatch of paper mill. A reasonable scheduling scheme for supply side could be achieved by our proposed method. The factors affecting the charge and discharge rates of the battery included the properties of the battery itself and current of the supply side. The simulation results showed that the GAN algorithm could reduce the daily cost. D 1241 lost and G lost between the upper and lower bounds of the error were fixed constants or fluctuated near the constant, which showed the convergence of the model. The real data used in the GAN algorithm might not be optimal due to the limitations of the model generating real data, but GAN algorithm could get the same trend if a better real data was available. In future work, to obtain a lower daily cost for supply side, different battery materials and installed methods should be taken into consideration. References Esparcia E.A., Castro M.T., Buendia R.E., Ocon J.D., 2019, Long-discharge flywheel versus battery energy storage for microgrids: a techno-economic comparison, Chemical Engineering Transactions, 76, 949-954. Gemine Q., Cornélusse B., Glavic M., Fonteneau R., Ernst D., 2016, A Gaussian mixture approach to model stochastic processes in power systems, 2016 Power Systems Computation Conference (PSCC), Genoa, 1- 7. Hatamlou A., 2012, In search of optimal centroids on data clustering using a binary search algorithm, Pattern Recognition Letters, 33(13), 1756-1760. Khalid M., Aguilera R.P., Savkin A.V., Agelidis V.G., 2018, On maximizing proft of windbattery supported power station based on wind power and energy price forecasting, Applied Energy, 211:764–73. Kuznetsova E.,Li Y.F., Ruiz C., Zio E., Ault G., Bell K., 2013, Reinforcement learning for microgrid energy management, Energy, 59, 133-146. Liu W., Zhao J., Huang J., Wen F., Lyu Z., Xue Y., 2020, Simulation and Modelling Analysis on Behavior of Cyber Physical Social System in Energy—A Case in Electricity Spot Market, Automation of Electric Power Systems, 44(04), 8-17. Mbuwir BV., Ruelens F., Spiessens F., Deconinck G., 2017, Battery energy management in a microgrid using batch reinforcement learning, Energies, 10, 1846-1865. Qiao B.H., Liu J., 2020, Multi-objective dynamic economic emission dispatch based on electric vehicles and wind power integrated system using differential evolution algorithm, Renewable Energy, 154, 316-336. Teodoro Cardoso Bora, Viviana Cocco Mariani, Leandro dos Santos Coelho, 2019, Multi-objective optimization of the environmental-economic dispatch with reinforcement learning based on non-dominated sorting genetic algorithm, Applied Thermal Engineering, 146, 688-700. Tvaronavičienė M., Baublys J., Raudeliūnienė J., Jatautaitė D., 2020, Chapter 1: Global energy consumption peculiarities and energy sources: Role of renewables, Energy Transformation Towards Sustainability, 1-49. Wang S., Li Y., Yang H., 2019, Self-adaptive mutation differential evolution algorithm based on particle swarm optimization, Applied Soft Computing, 81, 105496. Wang W., 2018, Construction of short- and long-term optimization dispatch system for giant hydropower station group, Chemical Engineering Transactions, 71, 61-66. Yang C., Wang X., Fang Q., Dai H., Cao Y., Wei X., 2020, An online SOC and capacity estimation method for aged lithium-ion battery pack considering cell inconsistency, Journal of Energy Storage, 29, 101250. Yuan G.H., Yang W.X., 2019, Study on optimization of economic dispatching of electric power system based on Hybrid Intelligent Algorithms (PSO and AFSA), Energy, 183, 926-935. Zhou S.Y., Hu Z.J., Gu W., Jiang M., Chen M., Hong Q.T., Booth C., 2020, Combined heat and power system intelligent economic dispatch: A deep reinforcement learning approach, International Journal of Electrical Power & Energy Systems, 120, 106016. 1242