# Renewable Scenario Generation Based on the Hybrid Genetic Algorithm with Variable Chromosome Length

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Decomposition of Time Series

#### 2.1. Net Load Calculation

_{N}is the power of net load; P

_{L}is the power of load; and P

_{RES}is the power of renewable generation.

#### 2.2. Permutation Entropy of Time Series

_{i}, I = 1, 2, …, N} is reconstructed in phase space according to the PE and the reconstructed matrix is obtained as,

_{i}is the probability of occurrence of the i-th combination.

_{p}(m) can quantitatively describe the complexity of the time series. The complex time series corresponds to large H

_{p}(m) and simple time series corresponds to small H

_{p}(m).

#### 2.3. Time Series Decomposition Method

_{p}(m). The control variables are the number of time sections and the length of each time section. The optimization problem is expressed as,

_{p}(m) of individual.

## 3. Principle of Scenario Generation Method

#### 3.1. Hybrid Genetic Algorithm with Variable Chromosome Length

#### 3.1.1. Framework of Proposed HGAVCL

- (1)
- Introduce hybridization operators, specify that the better individual perform hybridization with higher probability, and constrain the locations where chromosome segments can be hybridized.
- (2)
- Non-reproductive offspring produced is possible after the hybridization of organisms, and for this phenomenon, the survival factor ξ is proposed, which defines the survival probability of individuals after hybridization. The survival factor is calculated as,

_{b}

_{,a}is the survival factor of the a-th individual in the b-th generation; η

_{b}

_{,a}is the fitness of the a-th individual in the b-th generation; and η

_{b}

_{−1,a,min}is the minimum fitness of the a-th individual in the b−1-th generation.

- (3)
- Considering the problem of time series division, the phenomenon of chromosome splicing and deletion exists in the process of biological inheritance. The chromosome splicing and deletion algorithms are proposed to realize the autonomous search for the number of the divided time sections.

#### 3.1.2. Procedure of Proposed HGAVCL

- (1)
- The initial population I and II are set up based on the chromosome length. Based on a priori knowledge, the initial population I and II of individuals are selected. The length of population I chromosome is L
_{1}and the length of population II chromosome is L_{2}. The chromosome length represents the number of the divided time sections and the chromosomes are coded using binary. The sizes of population I and II are pop_{1}and pop_{2}, respectively. - (2)
- The new individuals are generated by the crossover operation with the crossover probability p
_{c}. - (3)
- The new individuals are generated by the mutation operation with the mutation probability p
_{v}. - (4)
- The hybridization operations are performed between populations according to the hybridization probability p
_{h}, and if individuals are heritable based on growth factors, the new populations are generated. - (5)
- The chromosome splicing is performed with splicing probability p
_{s}. If the fitness of the spliced individual is greater than the lowest fitness individual in the previous generation, the individual is extinguished. - (6)
- The chromosome deletion operation is performed with the deletion probability p
_{d}. If the individual fitness is greater than that of the lowest fitness individual in the previous generation, the individual is extinguished. - (7)
- The individual fitness of the population is calculated. The individuals of the population are selected via the Russian roulette method.
- (8)
- To ensure iterative convergence, the population extinction probability p
_{e}is set. After each round of iterations, the population with the largest fitness among the best individuals of each population dies out with p_{e}. - (9)
- Repeat the above steps (2)–(8) until the required number of iterations is satisfied.
- (10)
- The calculation process is shown in Figure 1.

#### 3.2. Model of Linear Time Series

#### 3.2.1. ARIMA Model

_{t}} is the time series; {ε

_{t}} is normal white noise with mean 0 and variance 1; B is the backward shift operand; φ

_{i}is the autoregressive coefficient; and θ

_{i}is the moving average coefficient.

#### 3.2.2. Parameter Calculation

_{i}in the model can be determined by the autocorrelation coefficient ρ, i.e., the Yule–Walker equation, which can be expressed as,

_{i}in the model can be determined by the self-covariance γ

_{k}, which can be expressed as,

#### 3.2.3. Augmented Dickey–Fuller

_{t}is the residual at moment t; X

_{t}

_{−1}is the residual at moment t–−1; β

_{t}is the coefficient of trend term; α is the constant; ε

_{t}is the noise of residual.

_{0}: δ = 0. The steps of calculation are in the order of model 1, model 2, and model 3. If the ADF rejects H

_{0}: δ = 0 in any step of the ADF calculation, the original time series does not exist unit root, so it is a smooth time series, and the calculation is stopped. If the ADF satisfies H

_{0}: δ = 0, the calculated ADF is finished with model 1, 2, and 3.

#### 3.2.4. Akaike’s Information Criterion

_{0}and q

_{0}are determined, which make the AIC extremely small. The p and q of the ARIMA model are p

_{0}and q

_{0}, respectively.

#### 3.3. Model of Fluctuant Time Series

#### 3.3.1. Copula Function

_{1}, x

_{2}, …, x

_{n}], the joint distribution function is H(x

_{1}, x

_{2}, …, x

_{n}), and the marginal distributions are [F

_{1}, F

_{2}, …, F

_{n}], respectively, the Copula function is expressed as,

_{1}, F

_{2}, …, F

_{n}are continuous, C(F

_{1}, F

_{2}, …, F

_{n}) is uniquely determined and the joint probability density function of the random vectors can be obtained by taking partial derivatives of both sides of (13).

#### 3.3.2. Copula Model Selection

_{τ}is calculated as,

_{s}is calculated as,

_{1}, V

_{2}) and (U

_{1}, U

_{2}) are random vectors having the same distribution that are independent of each other; P(∙) is its probability density function.

#### 3.3.3. Fluctuant Series Model Construction

_{nl,t}is defined as,

_{nl,t}|x

_{nl,t−1}) is solved based on the Bayesian formula and the probability model of the fluctuant part of scenario generation is obtained. The fluctuant time series is generated by sampling based on f(x

_{nl,t}|x

_{nl,t−1}). The results of our analysis show that the normal Copula function has superior performance.

## 4. Scenario Generation and Assessment

#### 4.1. Scenario Generation Method

- (1)
- Input the original linear time series and fluctuating time series.
- (2)
- Generate the linear time series scenario:
- (1)
- Divide zones based on HGAVGL.
- (2)
- Construct ARIMA model of each zone.
- (3)
- ARIMA model is selected based on PE to generate linear partial scenarios.

- (3)
- Generate fluctuating time series scenario:
- (1)
- Calculate f(x
_{nl,t}|x_{nl,t−1}) based on Copula function. - (2)
- Sample based on f(x
_{nl,t}|x_{nl,t−1}) to generate fluctuating time series scenarios.

- (4)
- Combine linear and fluctuating time series to generate time series scenario.

#### 4.2. Assessment Index

_{e}, and mean absolute percentage error (MAPE) are adopted to assess the data quality of generated scenarios. The σ reflects the time correlation between the generated scenarios and the original scenarios. The μ reflects the offset degree between the generated scenarios and the actual running scenarios. The P

_{e}reflects the climbing similarity between the generated scenarios and the original scenarios. Additionally, the MAPE reflects the accuracy of the ARIMA model.

- (1)
- Time autocorrelation σ

**A**is the time autocorrelation approximation index matrix;

**C**

_{history}is the historical data time autocorrelation matrix;

**C**

_{gen}is the generated scenarios time autocorrelation matrix; i and j are adjacent moments, i.e., |i-j| = 1; and L is the scenarios length.

- (2)
- Average offset rate μ

_{j}

_{,t}is the net load value of the generated scenario at time t under the i-th generated scenario; x

_{history,t}is the historical net load value at time t of the historical data; T is the generated scenario time stamp; and N is the number of simulations.

- (3)
- Climbing similarity P
_{e}.

_{history,t+1,t}is the historical climbing value from moment t to moment t + 1; Δc

_{j}

_{,t+1,t}is the generated scenario climbing value from moment t to moment t + 1.

- (4)
- MAPE

_{c}is the actual result at test set; l is the test set length.

## 5. Case Study

_{1}and pop

_{2}are 40.

_{e}of the two methods are calculated, as shown in Table 6.

_{e}when compared to the MCS method. The scenarios generation method of Copula function satisfies the requirement of temporal correlation of adjacent moments and the requirement of climbing similarity, but the resultant offset of its generated scene is still not very satisfactory. Therefore, the proposed approach can generate scenario results with the highest amount of accuracy and the corresponding climbing similarity, which shows superior performance in reflecting the real situation of the net load scenario.

## 6. Conclusions

_{e}, and reduce the average offset rate μ. The results show that the proposed approach better reflects the real situation of original data.

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Cao, Y.; Wu, Q.; Zhang, H.; Li, C. Optimal Sizing of Hybrid Energy Storage System Considering Power Smoothing and Transient Frequency Regulation. Int. J. Electr. Power Energy Syst.
**2022**, 142, 108227. [Google Scholar] [CrossRef] - Chen, L.; Shen, J.; Zhou, B.; Wang, Q.; Buja, G. Quantitative Analysis on the Proportion of Renewable Energy Generation Based on Broadband Feature Extraction. Appl. Sci.
**2022**, 12, 11159. [Google Scholar] - Han, S.; He, M.; Zhao, Z.; Chen, D.; Xu, B.; Jurasz, J.; Liu, F.; Zheng, H. Overcoming the Uncertainty and Volatility of Wind Power: Day-Ahead Scheduling of Hydro-Wind Hybrid Power Generation System by Coordinating Power Regulation and Frequency Response Flexibility. Appl. Energy
**2023**, 333, 120555. [Google Scholar] - Xu, Q.; Cao, Y.; Zhang, H.; Zhang, W.; Terzija, V. Bi-Level Dispatch and Control Architecture for Power System in China based on Grid-Friendly Virtual Power Plant. Appl. Sci.
**2021**, 11, 1282. [Google Scholar] [CrossRef] - Cao, Y.; Wu, Q.; Zhang, H.; Li, C. Multi-Objective Optimal Siting and Sizing of BESS Considering Transient Frequency Deviation and Post-Disturbance Line Overload. Int. J. Electr. Power Energy Syst.
**2023**, 144, 108575. [Google Scholar] - Hu, J.; Li, H. A New Clustering Approach for Scenario Reduction in Multi-Stochastic Variable Programming. IEEE Trans. Power Syst.
**2019**, 34, 3813–3825. [Google Scholar] [CrossRef] - Wang, W.; Fang, X.; Cui, H.; Li, F.; Liu, Y.; Overbye, T.J. Transmission-and-Distribution Dynamic Co-Simulation Framework for Distributed Energy Resource Frequency Response. IEEE Trans. Smart Grid
**2022**, 13, 482–495. [Google Scholar] - Camal, S.; Teng, F.; Michiorri, A.; Kariniotakis, G.; Badesa, L. Scenario Generation of Aggregated Wind, Photovoltaics and Small Hydro Production for Power Systems Applications. Appl. Energy
**2019**, 242, 1396–1406. [Google Scholar] [CrossRef][Green Version] - Nonvignon, T.Z.; Boucif, A.B.; Mhamed, M. A Copula-Based Attack Prediction Model for Vehicle-to-Grid Networks. Appl. Sci.
**2022**, 12, 3830. [Google Scholar] [CrossRef] - Li, H.; Ren, Z.; Xu, Y.; Li, W.; Hu, B. A Multi-Data Driven Hybrid Learning Method for Weekly Photovoltaic Power Scenario Forecast. IEEE Trans. Sustain. Energy
**2022**, 13, 91–100. [Google Scholar] [CrossRef] - Liao, W.; Yang, Z.; Chen, X.; Li, Y. Wind GMMN: Scenario Forecasting for Wind Power Using Generative Moment Matching Networks. IEEE Trans. Artif. Intell.
**2022**, 3, 843–850. [Google Scholar] [CrossRef] - Lin, S.; Liu, C.; Shen, Y.; Li, F.; Li, D.; Fu, Y. Stochastic Planning of Integrated Energy System via Frank-Copula Function and Scenario Reduction. IEEE Trans. Smart Grid
**2022**, 13, 202–212. [Google Scholar] [CrossRef] - Alves, D.K.; Ribeiro, R.L.; Costa, F.B.; Rocha, T.O.A. Real-Time Wavelet-Based Grid Impedance Estimation Method. IEEE Trans. Ind. Electron.
**2019**, 66, 8263–8265. [Google Scholar] [CrossRef] - Zhao, J.; Mili, L. A Decentralized H-Infinity Unscented Kalman Filter for Dynamic State Estimation Against Uncertainties. IEEE Trans. Smart Grid
**2019**, 10, 4870–4880. [Google Scholar] [CrossRef] - Mishra, C.; Vanfretti, L.; Jones, K.D. Synchrophasor Phase Angle Data Unwrapping Using an Unscented Kalman Filter. IEEE Trans. Power Syst.
**2021**, 36, 4868–4871. [Google Scholar] [CrossRef] - Liu, G. Time Series Forecasting via Learning Convolutionally Low-Rank Models. IEEE Trans. Inf. Theory
**2022**, 68, 3362–3380. [Google Scholar] [CrossRef] - Cardoso, C.A.V.; Cruz, G.L. Forecasting Natural Gas Consumption using ARIMA Models and Artificial Neural Networks. IEEE Lat. Am. Trans.
**2016**, 14, 2233–2238. [Google Scholar] [CrossRef] - Wu, F.; Jing, R.; Zhang, X.P.; Wang, F.; Bao, Y. A Combined Method of Improved Grey BP Neural Network and MEEMD-ARIMA for Day-Ahead Wave Energy Forecast. IEEE Trans. Sustain. Energy
**2021**, 12, 2404–2412. [Google Scholar] [CrossRef] - Yunus, K.; Thiringer, T.; Chen, P. ARIMA-Based Frequency-Decomposed Modeling of Wind Speed Time Series. IEEE Trans. Power Syst.
**2016**, 31, 2546–2556. [Google Scholar] [CrossRef] - Jafari, A.; Khalili, T.; Babaei, E.; Bidram, A.A. Hybrid Optimization Technique Using Exchange Market and Genetic Algorithms. IEEE Access
**2020**, 8, 2417–2427. [Google Scholar] [CrossRef] - Guo, J.; He, H.; Sun, C. ARIMA-Based Road Gradient and Vehicle Velocity Prediction for Hybrid Electric Vehicle Energy Management. IEEE Trans. Veh. Technol.
**2019**, 68, 5309–5320. [Google Scholar] [CrossRef] - Xie, Y.; Jin, M.; Zou, Z.; Xu, G.; Feng, D.; Liu, W.; Long, D. Real-Time Prediction of Docker Container Resource Load Based on a Hybrid Model of ARIMA and Triple Exponential Smoothing. IEEE Trans. Cloud Comput.
**2022**, 10, 1386–1401. [Google Scholar] [CrossRef] - Gangwar, P.; Mallick, A.; Chakrabarti, S.; Singh, S.N. Short-Term Forecasting-Based Network Reconfiguration for Unbalanced Distribution Systems With Distributed Generators. IEEE Trans. Ind. Inform.
**2020**, 16, 4378–4389. [Google Scholar] [CrossRef] - Mhawi, D.N.; Hashem, S.H. Proposed Hybrid Correlation Feature Selection Forest Panalized Attribute Approach to Advance IDSs. Karbala Int. J. Mod. Sci.
**2021**, 7, 405–420. [Google Scholar] - Montano, J.J.; Noreña, L.F.G.; Tobon, A.F.; Montoya, D.G. Estimation of the Parameters of the Mathematical Model of an Equivalent Diode of a Photovoltaic Panel Using a Continuous Genetic Algorithm. IEEE Lat. Am. Trans.
**2022**, 20, 616–623. [Google Scholar] [CrossRef] - Souza, M.G.; Vallejo, E.E.; Estrada, K. Detecting Clustered Independent Rare Variant Associations Using Genetic Algorithms. IEEE/ACM Trans. Comput. Biol. Bioinform.
**2021**, 18, 932–939. [Google Scholar] [CrossRef][Green Version] - Huanca, D.H.; Pareja, L.A.G. Chu and Beasley Genetic Algorithm to Solve the Transmission Network Expansion Planning Problem Considering Active Power Losses. IEEE Lat. Am. Trans.
**2021**, 19, 1967–1975. [Google Scholar] [CrossRef] - Liu, Y.; Chen, X.; Zhao, Y. Joint Synchronization Estimation Based on Genetic Algorithm for OFDM/OQAM Systems. J. Syst. Eng. Electron.
**2020**, 31, 657–665. [Google Scholar] - Oliveira, B.B.; Carravilla, M.A.; Oliveira, J.F. A Diversity-Based Genetic Algorithm for Scenario Generation. Eur. J. Oper. Res.
**2022**, 299, 1128–1141. [Google Scholar] [CrossRef] - Kaushik, E.; Prakash, V.; Mahela, O.P.; Khan, B.; Abdelaziz, A.Y.; Hong, J.; Geem, Z.W. Optimal Placement of Renewable Energy Generators Using Grid-Oriented Genetic Algorithm for Loss Reduction and Flexibility Improvement. Energies
**2022**, 15, 1863. [Google Scholar] [CrossRef] - Ahmar, A.S.; Botto-Tobar, M.; Rahman, A.; Hidayat, R. Forecasting the Value of Oil and Gas Exports in Indonesia using ARIMA Box-Jenkins. J. Inf. Vis.
**2022**, 3, 35–42. [Google Scholar] [CrossRef]

Literature | Model | Method of Data Analysis | Characteristic |
---|---|---|---|

[17] | ARIMA | None | Traditional Model |

[18] | ARIMA | MEEMD | Expanding single-dimensional data to multidimensional |

[19] | ARIMA | Frequency Decomposition | Determined cutoff frequency from experiments (complex processing) |

[20,21] | ARIMA | None | Eliminate non-smoothness factors of time series |

[22] | ARIMA and triple exponential smoothing | None | Improved ARIMA parameter determination method(small time overhead) |

[23] | ARIMA | Wavelet Transform | Expanding single-dimensional data to multidimensional |

[24] | Random Forest | CFS | Identify redundant data features |

ADF | 0 | 1 |
---|---|---|

d | 0 | 1 |

AIC | p = 1 | p = 2 | p = 3 | p = 4 | p = 5 |
---|---|---|---|---|---|

q = 1 | −7049 | −7075 | −6850 | −6809 | −6807 |

q = 2 | −6813 | −6868 | −7290 | −6807 | −6805 |

q = 3 | −6811 | −6866 | −6807 | −6805 | −6803 |

q = 4 | −7316 | −6864 | −6805 | −6803 | −6801 |

q = 5 | −7241 | −7253 | −6746 | −7132 | −6902 |

Zone | p_{1} | p_{2} | p_{3} | q_{1} | q_{2} | q_{3} | d |
---|---|---|---|---|---|---|---|

Zone 1 | 0.23 | 0.13 | 0 | −0.47 | 0 | 0 | 0 |

Zone 2 | 0.96 | 0 | 0 | −0.34 | −0.42 | 0 | 1 |

Zone 3 | −0.14 | 0.35 | 0.51 | −0.31 | −0.08 | −0.21 | 0 |

Zone 4 | −0.47 | −0.64 | 0 | 1.07 | 1.01 | 0.93 | 1 |

Zone 5 | −0.07 | 0.18 | 0.29 | −0.09 | −0.91 | 0 | 1 |

Zone 6 | −0.46 | 0.13 | 0.36 | 1.46 | 0.48 | 0 | 2 |

Zone | Length | MAPE | PE |
---|---|---|---|

Zone 1 | 751 | 0.1024 | 1.38 |

Zone 2 | 1832 | 0.0145 | 1.32 |

Zone 3 | 385 | 0.0514 | 1.28 |

Zone 4 | 629 | 0.0283 | 1.31 |

Zone 5 | 128 | 0.0283 | 0.29 |

Zone 6 | 5035 | 0.2229 | 1.42 |

Method | Time Autocorrelation σ | Average Offset Rate μ | Climbing Similarity P_{e} |
---|---|---|---|

MCS method | 0.0110 | 0.4673 | 0.8273 |

Proposed approach | 0.0515 | 0.0396 | 0.9035 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Liu, X.; Wang, L.; Cao, Y.; Ma, R.; Wang, Y.; Li, C.; Liu, R.; Zou, S. Renewable Scenario Generation Based on the Hybrid Genetic Algorithm with Variable Chromosome Length. *Energies* **2023**, *16*, 3180.
https://doi.org/10.3390/en16073180

**AMA Style**

Liu X, Wang L, Cao Y, Ma R, Wang Y, Li C, Liu R, Zou S. Renewable Scenario Generation Based on the Hybrid Genetic Algorithm with Variable Chromosome Length. *Energies*. 2023; 16(7):3180.
https://doi.org/10.3390/en16073180

**Chicago/Turabian Style**

Liu, Xiaoming, Liang Wang, Yongji Cao, Ruicong Ma, Yao Wang, Changgang Li, Rui Liu, and Shihao Zou. 2023. "Renewable Scenario Generation Based on the Hybrid Genetic Algorithm with Variable Chromosome Length" *Energies* 16, no. 7: 3180.
https://doi.org/10.3390/en16073180