UNIVERSIDADE ESTADUAL PAULISTA “JÚLIO DE MESQUITA FILHO” FACULDADE DE ENGENHARIA – CÂMPUS DE ILHA SOLTEIRA PROGRAMA DE PÓS-GRADUAÇÃO EM ENGENHARIA ELÉTRICA BRIAN DANIEL JARAMILLO LEON OPTIMIZATION OF PHOTOVOLTAIC POWER PLANT ALLOCATION AND SMART INVERTER SETTINGS TO MAXIMIZE THE DISTRIBUTION NETWORK’S HOSTING CAPACITY Ilha Solteira 2025 BRIAN DANIEL JARAMILLO LEON OPTIMIZATION OF PHOTOVOLTAIC POWER PLANT ALLOCATION AND SMART INVERTER SETTINGS TO MAXIMIZE THE DISTRIBUTION NETWORK’S HOSTING CAPACITY Thesis submited to the School of Engineer- ing of the Ilha Solteira Campus - UNESP in partial fulfillment of the requirements for the degree of Doctor of Philosophy (Ph.D.) in Electrical Engineering. Concentration Area: Automation. Prof. Dr. Jônatas Boás Leite Supervisor Dr. João Soares Co-supervisor Ilha Solteira 2025 Jaramillo LeónOptimization of photovoltaic power plant allocation and smart inverter settings to maximize the distribution network's hosting capacityIlha Solteira2025 80 Sim Tese (doutorado)Engenharia ElétricaAutomaçãoNão . . . FICHA CATALOGRÁFICA Desenvolvido pelo Serviço Técnico de Biblioteca e Documentação Jaramillo León, Brian Daniel. Optimization of photovoltaic power plant allocation and smart inverter settings to maximize the distribution network's hosting capacity / Brian Daniel Jaramillo León. -- Ilha Solteira: [s.n.], 2025 70 f. : il. Tese (doutorado) - Universidade Estadual Paulista. Faculdade de Engenharia de Ilha Solteira. Área de conhecimento: Automação, 2025 Orientador: Jônatas Boás Leite Co-orientador: João Soares Inclui bibliografia 1. Distribution network. 2. DG allocation. 3. Hosting capacity. 4. Metaheuristic algorithm. 5. Photovoltaic system. 6. Smart inverter. J37o Potential impact of this research This thesis proposes a practical analysis of the hosting capacity of distribution networks for solar photovoltaic systems. The proposed method uses open-source software that can be adopted by distribution utilities and researchers and was tested using a real distribution feeder model from an Ecuadorian utility. This work can benefit planning studies for the integration of renewable energy generation into distribution networks by ensuring safe grid operation and supporting the transition to clean energy. Hosting capacity analysis enables the installation of more renewable energy sources, which reduces greenhouse gas emissions and consequently provides environmental benefits to society. Impacto potencial desta pesquisa Esta tese propõe uma análise prática da capacidade de hospedagem (hosting capacity) nas redes de distribuição para sistemas solares fotovoltaicos. O método proposto usa software de código aberto que pode ser adotado por concessionárias de distribuição de energia elétrica e pesquisadores e foi testado num modelo de um alimentador de distribuição real de uma concessionária equatoriana. Este trabalho pode auxiliar estudos de planejamento para integrar geração de energia renovável nas redes de distribuição, garantindo uma operação segura da rede e apoiando a transição para energia limpa. A análise da capacidade de hospedagem permite a instalação de mais fontes renováveis de energia que reduzem a emissão de gases de efeito estufa e, consequentemente, proporciona benefícios ambientais à sociedade. UNIVERSIDADE ESTADUAL PAULISTA Câmpus de Ilha Solteira Optimization of photovoltaic power plant allocation and smart inverter settings to maximize the distribution network's hosting capacity TÍTULO DA TESE: CERTIFICADO DE APROVAÇÃO AUTOR: BRIAN DANIEL JARAMILLO LEON ORIENTADOR: JONATAS BOAS LEITE COORIENTADOR: JOÃO ANDRÉ PINTO SOARES Aprovado como parte das exigências para obtenção do Título de Doutor em Engenharia Elétrica, área: Automação pela Comissão Examinadora: Prof. Dr. JONATAS BOAS LEITE (Participaçao Presencial) Departamento de Engenharia Eletrica / Faculdade de Engenharia de Ilha Solteira - UNESP Prof. Dr. RUBEN AUGUSTO ROMERO LAZARO (Participaçao Virtual) Departamento de Engenharia Eletrica / Faculdade de Engenharia de Ilha Solteira - UNESP Dr. MARIO ANDRES MEJIA ALZATE (Participaçao Virtual) Departamento de Engenharia Elétrica / Faculdade de Engenharia de Ilha Solteira - UNESP Profa. Dra. FERNANDA CASEÑO TRINDADE ARIOLI (Participaçao Virtual) Departamento de Sistemas e Energia / Universidade Estadual de Campinas - UNICAMP Faculdade de Engenharia - Câmpus de Ilha Solteira - Avenida Brasil Centro 56, 15385000 https://www.feis.unesp.br/#!/ppgeeCNPJ: 48.031.918/0015-20. cesar Stamp UNIVERSIDADE ESTADUAL PAULISTA Câmpus de Ilha Solteira Prof. Dr. RENZO AMILCAR VARGAS PERALTA (Participaçao Virtual) Instituto de Energia e Ambiente / Universidade de São Paulo - USP Ilha Solteira, 31 de janeiro de 2025 Faculdade de Engenharia - Câmpus de Ilha Solteira - Avenida Brasil Centro 56, 15385000 https://www.feis.unesp.br/#!/ppgeeCNPJ: 48.031.918/0015-20. Este trabalho é dedicado a: Meu Divino mestre espiritual, Sathya Sai Baba, que representa todos os nomes e formas de Deus e cujo amor infinito possibilita esta existência. Meus pais Leobando e Zoraida, meu irmão Erik e minha irmã Valeria. Minhas sobrinhas Sarasvati e Sita e meu sobrinho Lev. Toda minha família e amigos. ACKNOWLEDGEMENTS Meus mais sinceros agradecimentos a: • Deus pelo nascimento, amor, saúde, morte, e sua presença constante na minha vida; • Meus pais Leobando e Zoraida pelo amor e apoio incondicional; • Meus irmãos Erik e Valeria, obrigado por estar sempre; • Meu colega Sergio Zambrano pela amizade e por me brindar a oportunidade de estudar no Brasil; • Ao professor Jônatas Boás Leite pela guia e orientação nessa jornada; • Ao Dr. João Soares pela oportunidade de ir no GECAD–ISEP; • Ao professor Ruben pela correção no uso das meta-heurísticas e pelas caronas ao câmpus três; • Meus amigos Nicolas, Salvador e Wilson pelo companheirismo e por serem minha família em Ilha Solteira; • Minhas irmãs da Organização Internacional Sri Sathya Sai Natalia e Mariel por todos os momentos de partilha; • Tayenne e Gabriel pela ajuda, apoio e recebimento que me deram em Porto. A Shardul e Lucas pela sua amizade e momentos de relaxamento; • Meus colegas de Equador em Ilha Solteira; • Aos professores do Departamento de Engenharia Elétrica por compartilharem seu conhecimento e experiência; • Meus colegas de moradia Richard, Jonathan, Ivan, Lluleisi, Genaro e Guisep que me suportarem; • Meus amigos de Ilha Solteira Aline, Ana, Dayara, Enielma, Sarah, Garcia, Luis Gustavo e Rafael; • Meus colegas do Laboratório de Planejamento de Sistemas de Energia Elétrica (LaPSEE) que sempre estão dispostos a ajudar; • Aos desenvolvedores dos software Python, OpenDSS, Overleaf e ArcGIS sem os quais esta tese não seria possível; • Todas as pessoas que de forma direta e indiretamente contribuíram nessa jornada. O presente trabalho foi realizado com apoio da Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brasil (CAPES) - Código de Financiamento 001 e processo número 88887.817660/2023-00. The end of wisdom is freedom; The end of culture is perfection; The end of knowledge is love; and The end of education is character. Sathya Sai Baba ABSTRACT As the integration of solar photovoltaic (PV) power plants into electrical grids grows, it becomes critical to determine the maximum PV capacity that can be safely connected to distribution networks without compromising the grid operation and service quality. This thesis formulates an optimization problem to maximize the PV hosting capacity (HC) in a medium-voltage distribution feeder by allocating (siting and sizing) ground-mounted PV power plants, considering both the power factor and voltage-reactive power (Volt-VAr) control functions of their corresponding smart inverters (SIs). A simulation-optimization framework that integrates Python and OpenDSS software is proposed to determine the best number, location, and size of PV systems to be installed on a distribution feeder, as well as the best control set-points of the PV inverters. This thesis also quantifies the location-specific PV HC (PVHC) by connecting a single PV plant at a time (i.e., centralized allocation) at each candidate location and considering the maximum values of feeder bus voltages and thermal loadings through the conductors as performance metrics. Differential evolution (DE) and vortex search (VS) algorithms are used to solve the proposed optimization problem. The connection of one, two, and three PV power plants is tested in an Ecuadorian distribution feeder model. The results indicate that VS presents less variability in its solutions and a higher mean objective function value than DE, and installing two PV power plants with their SIs operating with the Volt-VAr control function produces the highest PVHC. Keywords: distribution network; DG allocation; hosting capacity; metaheuristic algorithm; photovoltaic system; smart inverter. RESUMO À medida que cresce a integração de usinas solares fotovoltaicas (FVs) nas redes de energia elétrica, torna-se fundamental quantificar a máxima capacidade de geração FV que pode conectar-se de forma segura na rede de distribuição sem comprometer a operação da rede nem a qualidade do serviço. Nesta tese, é formulado um problema de otimização para maximizar a capacidade de hospedagem (hosting capacity) FV em um alimentador de distribuição de média tensão, alocando (posicionando e dimensionando) usinas solares FV de solo, considerando as funções de controle fator de potência e tensão-potência reativa (Volt- VAr) dos inversores inteligentes correspondentes. Propõe-se um framework de otimização baseado em simulação que integra os software Python e OpenDSS para determinar o melhor número, local e capacidade de usinas FVs a serem instaladas num alimentador de distribuição e determinar os melhores pontos de ajuste das funções de controle dos respectivos inversores das usinas FVs. Esta tese também quantifica a capacidade de hospedagem FV especifica do local, conectando uma única usina FV por vez (isto é alocação centralizada) em cada local candidato e considerando como métricas de desempenho os valores máximos de tensão nas barras e carregamento dos condutores. Os algoritmos de evolução diferencial (ED) e vortex search (VS) foram usados para resolver o problema de otimização proposto. A conexão de uma, duas e três usinas FVs é testada num modelo de um alimentador de distribuição equatoriano. Os resultados indicaram que o VS apresenta menos variabilidade em suas soluções e um maior valor médio da função objetivo do que a ED, e instalar duas usinas FVs com seus inversores inteligentes operando com a função de controle Volt-VAr produz a máxima capacidade de hospedagem. Palavras-chave: algoritmo meta-heurístico; alocação de geração distribuida; capacidade de hospedagem; inversor inteligente; rede de distribuição; usina solar fotovoltaica. LIST OF FIGURES Figure 1 – Evolution of the solar PV energy in Brazil . . . . . . . . . . . . . . . . 22 Figure 2 – Brazilian electricity mix: electricity generation by source [MW] . . . . . 23 Figure 3 – Stages for the optimal PV allocation . . . . . . . . . . . . . . . . . . . 31 Figure 4 – Graphical representation of the HC analysis. . . . . . . . . . . . . . . . 33 Figure 5 – Timeline of definition and methods of HC. . . . . . . . . . . . . . . . . 34 Figure 6 – Flowchart of the simulation-based optimization framework . . . . . . . 37 Figure 7 – Example of a Volt-VAr curve . . . . . . . . . . . . . . . . . . . . . . . 40 Figure 8 – Capability curve for DER of category B from the IEEE 1547-2018 standard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Figure 9 – Flowchart of load allocation algorithm . . . . . . . . . . . . . . . . . . 44 Figure 10 – Flowchart of PVHC quantification . . . . . . . . . . . . . . . . . . . . 45 Figure 11 – Optimization platform . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Figure 12 – Representation of a candidate solution . . . . . . . . . . . . . . . . . . 50 Figure 13 – Feeder topology and candidate locations . . . . . . . . . . . . . . . . . 54 Figure 14 – Minimum and maximum PVHC for one PV power plant operating at unity power factor considering as metrics the maximum values of (a) bus voltage and (b) thermal loading . . . . . . . . . . . . . . . . . . . . 56 Figure 15 – Minimum and maximum PVHC for one PV power plant operating with VVC settings recommended in the IEEE 1547-2018 standard and considering as metrics the maximum values of (a) bus voltage and (b) thermal loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Figure 16 – Mean PVHC for different values of F and Cr . . . . . . . . . . . . . . 60 Figure 17 – VVC curves of the PV inverters at fourth and eighth locations . . . . . 62 Figure 18 – Objective function values over iterations of the DE and VS algorithms 64 Figure 19 – Feeder bus voltage heatmaps of (a) base case and (b) best solution of Case III . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Figure 20 – Line thermal loading heatmaps of (a) base case and (b) best solution of Case III . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 LIST OF TABLES Table 1 – Summary of the main reviewed references on DG allocation . . . . . . . 27 Table 2 – Summary of the main reviewed references on DER HC analysis . . . . . 27 Table 3 – PVHC for every candidate location considering a single PV power plant. 57 Table 4 – PVHC for every candidate location considering a single PV power plant operating with VVC settings recommended in the IEEE 1547 standard. 57 Table 5 – SI control set-points’ boundaries. . . . . . . . . . . . . . . . . . . . . . . 59 Table 6 – Results for the five (NP , iter) combinations . . . . . . . . . . . . . . . 61 Table 7 – Best results of Case I for two, and three PV power plants. . . . . . . . . 61 Table 8 – Best results of Case II for one, two, and three PV power plants. . . . . . 61 Table 9 – Best results of Case III for one, two, and three PV power plants. . . . . 62 Table 10 – Performance metrics for the DE and VS algorithms. . . . . . . . . . . . 63 LIST OF ALGORITHMS 1 Pseudocode of the DE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 2 Pseudocode of the VS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 LIST OF ABBREVIATIONS AND ACRONYMS AC Alternating Current BESS Battery Energy Storage System DC Direct Current DE Differential Evolution DER Distributed Energy Resource DG Distributed Generation DLL Dynamic Link Library EPRI Electric Power Research Institute EV Electric Vehicle GA Genetic Algorithm GIS Geographic Information System HC Hosting Capacity LV Low-voltage MV Medium-voltage OpenDSS Open Distribution System Simulator PSO Particle Swarm Optimization PV Photovoltaic PVC Photovoltaic Capacity PFC Power Factor Control PVHC Photovoltaic Hosting Capacity SI Smart Inverter SIVVC Smart Inverter Volt-VAr Control VS Vortex Search VVC Volt-VAr Control CONTENTS 1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.1 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.3 Literature review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.3.1 Distributed generation allocation . . . . . . . . . . . . . . . . . . 25 1.3.2 Hosting capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 1.3.3 Smart inverter control functions . . . . . . . . . . . . . . . . . . 28 1.4 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.5 Thesis outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2 BACKGROUND . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.1 PV power plants allocation . . . . . . . . . . . . . . . . . . . . . . . . 31 2.2 Hosting capacity analysis . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.2.1 Hosting capacity levels . . . . . . . . . . . . . . . . . . . . . . . . 33 2.2.1.1 Single-location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.2.1.2 Multiple-location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.2.2 Historical development of hosting capacity . . . . . . . . . . . . 34 2.3 Distribution network model . . . . . . . . . . . . . . . . . . . . . . . . 34 2.4 Simulation-based optimization . . . . . . . . . . . . . . . . . . . . . . 35 3 PROBLEM FORMULATION . . . . . . . . . . . . . . . . . . . 39 3.1 Smart inverter control functions . . . . . . . . . . . . . . . . . . . . . 39 3.1.1 Power factor control . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.1.2 Volt-VAr control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.2 Smart inverter capability curve . . . . . . . . . . . . . . . . . . . . . . 41 3.3 Optimization problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4 SOLUTION METHODS . . . . . . . . . . . . . . . . . . . . . . 43 4.1 Load allocation algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.2 PVHC assessment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.3 Metaheuristic algorithms . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.3.1 Differential evolution . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.3.2 Vortex search algorithm . . . . . . . . . . . . . . . . . . . . . . . . 47 4.3.3 Optimization platform . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.3.4 Metaheuristic computational implementation . . . . . . . . . . 49 4.3.4.1 Encoding of the solution vector . . . . . . . . . . . . . . . . . . . . . . 49 4.3.4.2 Initial population . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 4.3.4.3 Objective function value and feasibility . . . . . . . . . . . . . . . . . 50 4.3.4.4 Constraint handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 5 NUMERICAL RESULTS . . . . . . . . . . . . . . . . . . . . . . 53 5.1 Case study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.2 PVHC quantification results . . . . . . . . . . . . . . . . . . . . . . . 55 5.3 Test cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.4 Manual parameter tuning . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.5 Test cases’ results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6 CONCLUDING REMARKS . . . . . . . . . . . . . . . . . . . . 69 6.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 6.2 Proposed future works . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 BIBLIOGRAPHY . . . . . . . . . . . . . . . . . . . . . . . . . . 71 21 1 INTRODUCTION Distributed generation (DG) units, also known as dispersed or embedded generation, are small-scale generators connected to the distribution network, or the customer side of the meter (i.e., behind-the-meter) (Georgilakis; Hatziargyriou, 2013). DG units are dispersed throughout the utility’s distribution system and connected to medium- or low-voltage (LV) networks (Short, 2014). Distributed energy resources (DERs) are a group of devices (or technologies), such as battery energy storage systems (BESSs), demand response programs, electric vehicles (EVs), solar photovoltaic (PV) systems, and wind turbines, connected to distribution systems (Caballero-Peña et al., 2022). The integration of DERs, particularly PV systems, has increased due to the decreased costs of renewable energy technologies, the emergence of policies promoting clean energy sources, the growth of global electricity demand, and the need to reduce greenhouse gas emissions (Spillias et al., 2020). Solar PV systems are versatile and adaptable to industrial and residential applications, as they can be installed on the ground (ground-mounted), rooftops, and facades. This makes PV technology one of the main options for renewable energy sources (Sharma et al., 2020). The evolution of solar PV energy in Brazil from 2012 to September 2024 is shown in the bar graph in Figure 1. Since 2017, the total installed capacity of PV generation has increased by approximately 40 times. Until September 2024, distributed PV generation1 represented 68% of the total installed PV capacity (PVC), while centralized PV generation accounted for the remaining 32%. As depicted in the pie chart in Figure 2, solar PV generation is the second-largest source in Brazil’s power generation mix, second only to hydroelectric. The total installed capacity of solar PV reached 48,244 MW. Solar PV generation includes both large-scale PV power plants and small-scale PV systems for self-consumption. Due to the massive integration of distributed PV systems, the number of PV interconnection requests that electric utilities receive is increasing. 1 In this context, distributed generation consists of PV systems of small- and medium-size with an installed capacity of up to 5 MW. In contrast, centralized generation are large-scale PV power plants with installed capacity greater than 5 MW. 22 Figure 1 – Evolution of the solar PV energy in Brazil 20 12 20 13 20 14 20 15 20 16 20 17 20 18 20 19 20 20 20 21 20 22 20 23 sep /20 24 0 10000 20000 30000 40000 50000 In st al le d ca pa cit y [M W ] 1009 1850 2505 3331 4671 7420 11521 15620 610 2197 5152 9843 17974 26340 32624 8 14 23 45 131 1200 2460 4702 8483 14514 25394 37861 48244 (68%) (32%) Centralized generation Distributed generation Source: Adapted from ABSOLAR (2024). Despite the economic, environmental, and technical benefits of installing PV power plants, the massive and uncoordinated connection of distributed PV generation to existing distribution feeders requires careful planning due to the negative impacts on service quality and grid operation. These potential issues include overloading of distribution equipment, increased tap changes in voltage regulators, degradation of power quality, reverse power flow, and overvoltage (Ebad; Grady, 2016; VARMA, 2021). In addition to the typical operational issues aforementioned, a poorly managed PV integration can lead to reliability issues (e.g., an increase in power interruptions), power quality degradation, and increased grid operational costs. 23 Figure 2 – Brazilian electricity mix: electricity generation by source [MW] 109963 46% 48244 20% 32276 14% 17717 7% 17218 7% 8366 4% 3461 1% 1990 1% Electricity generation by source [MW] Hydropower Solar PV Wind power Natural gas Biomass + Biogas Oil and other fossil fuels Mineral coal Nuclear Source: Adapted from ABSOLAR (2024). Due to the massive integration of DERs into distribution networks, electric utilities must adjust and update how they plan and operate their systems. A fundamental component of the new planning process is the analysis of host capacity (HC), which estimates the total capacity of DERs that can be connected to a distribution feeder without exceeding technical limits. PV HC (PVHC) is the maximum PVC that can be connected to a distribution feeder without harmfully impacting power quality or equipment (lines, transformers, voltage regulators, etc.) capacity under the current control scheme and without infrastructure changes or upgrades (EPRI, 2018a). PVHC analysis allows utilities to determine suitable locations and capacities for guaranteeing safe PV connections to the distribution network (Cho et al., 2018). Smart inverters (SIs) are considered “smart” due to their expanded functionality beyond converting direct current (DC) power to alternating current (AC). SIs offer additional features such as voltage and frequency regulation, support for real and reactive power, and integration of monitoring and scheduling capabilities (EPRI, 2016). The control functions of SIs can enable higher penetration levels of inverter-based DERs and ensure a grid-friendly response to their connection (Smith et al., 2011). To harness the technical advantages and prevent technical issues associated with the installation of PV power plants, determining their suitable locations and capacities becomes crucial. Therefore, this work addresses the best placement and sizing of solar farms with ground-mounted PV systems equipped with SIs while maximizing the PVHC of the medium-voltage (MV) distribution network. 24 1.1. PROBLEM STATEMENT 1.1 PROBLEM STATEMENT Finding the best placement and sizing of DG units is known as the optimal allocation of DG, which can be considered a subproblem of distribution system expansion planning. It determines where and how much (amount) DG can be connected in a power distribution feeder, and its statement is as follows: “Given two sets, one of the candidate locations and the other of PV power plants, what are the best placements and sizes of PV power plants to be installed on an existing distribution network, subject to the operational constraints of both the power distribution system and the PV power plants?” Usually, the problem of PV power plants’ placement and sizing is formulated as an optimization problem, i.e., choosing an objective function (single or multi-objective) and considering constraints related to assumptions of the problem and system operation. Optimal PV placement and sizing is a complex and combinatorial problem that can be formulated as a mixed-integer nonlinear programing problem because it can incorporate both discrete variables (locations) and continuous variables (sizes), while the operational state of the system is determined by the nonlinear power flow equations (Home-Ortiz et al., 2019). 1.2 OBJECTIVES Two main questions of this thesis are: ’What type of PV system allocation (i.e., centralized or distributed) yields the maximum PVHC?” and “What are the best number, location, and sizing of PV power plants to be installed on a distribution feeder, along with the best control set-points of the PV inverters, to maximize the PVHC without violating any geographical or technical constraint?” To answer these questions, the author considers two aspects: i) modeling and simulation of the distribution network; and ii) formulation and solution of the optimization problem. From the distribution network’s modeling and simulation perspective, the following objectives must be completed: a) Create from the geographical information system (GIS) database the distribution network model for the distribution system simulation software; b) Comprehensive modeling of the power distribution feeder, PV power plants, and their corresponding SIs; c) Conduct the PVHC analysis in an MV distribution network considering a single PV power plant (i.e., centralized allocation); d) Maximize the grid PVHC considering power factor and voltage-reactive power (Volt-VAr) functions of the SI. e) Evaluate the proposed optimization method in a real-world distribution feeder model and analyze the results. 1.3. LITERATURE REVIEW 25 From the perspective of the optimization problem, which includes problem formu- lation and the optimization method, the specific objectives are as follows: a) Formulate an optimization problem for allocating PV power plants; b) Solve the proposed optimization problem using metaheuristic algorithms; c) Calibrate the control parameters of the metaheuristic algorithms; 1.3 LITERATURE REVIEW The literature review addresses the optimal DG allocation problem and the grid HC analysis, as well as the optimization of SI control function settings, such as power factor control (PFC) or Volt-VAr control (VVC). 1.3.1 Distributed generation allocation Two research papers Huy et al. (2020) and Purlu and Turkay (2022) used meta- heuristic algorithms for determining the best locations, sizes, and power factors of DG units in power distribution systems. A differential evolution (DE) algorithm to minimize network losses and maximize DG penetration level was proposed in Huy et al. (2020). Moreover, the authors presented an adaptive DG PFC for the distribution network’s optimal operation. In Purlu and Turkay (2022), the allocation of single and double DG units was performed using two metaheuristics: the genetic algorithm (GA); and particle swarm optimization (PSO). The objective function minimized both the distribution network’s energy losses and bus voltage deviations. Fuel-based and renewable-based DG units, as well as seasonal variations of generation and load, were considered. Hybrid algorithms for solving the optimal placement and sizing of DG units are found in Refs. Moradi and Abedini (2012), Vatani et al. (2016), Akbar et al. (2022). Ref. Moradi and Abedini (2012) proposed a combination of GA and PSO algorithms, in which the locations of three DGs were determined by the GA, and their sizes were optimized by the PSO. To minimize the distribution network’s losses, a hybrid method that combines an analytical approach and a GA for the allocation of multiple (from one to five) DG units was presented in Vatani et al. (2016). The placement and power factor of each DG unit are determined by GA, and mathematical expressions are used to calculate the DG capacities for each location. An algorithm that combines improved gray wolf optimization and PSO metaheuristics for the DG allocation problem in radial distribution networks was proposed in Akbar et al. (2022). That work considered DG units operating at unitary, fixed, and optimized power factors. Two works Kim (2017), Lee, Kim and Cho (2020) presented the optimal DG allocation considering PV inverters with VVC. However, in these works, the VVC set- points are not optimized. In Kim (2017), the objective was to minimize both bus voltage 26 1.3. LITERATURE REVIEW variations and DG unit installation costs using the GA, while the PSO algorithm in (Lee; Kim; Cho, 2020) was used to minimize power line losses, voltage variation, and DG installation costs assuming a load profile of 24 hours. Optimization methods to maximize the distribution network’s HC by optimizing the location and capacity of DG units were presented in Refs. Čađenović and Jakus (2020), Chang, Chinh and Sinatra (2022). In Čađenović and Jakus (2020), a mixed-integer second- order cone programming model was proposed to represent an active network management scheme involving DG PFC, on-load tap changer transformer control, and network topology reconfiguration for allocating three DG units. Moreover, blocks of operating scenarios, using available time-series data based on load and DG generation profiles, were created. An equilibrium optimizer-based method was proposed in Ref. Chang, Chinh and Sinatra (2022) for allocating ten PV systems, while considering the PV inverters’ VVC function and a constraint on substation reverse power flow. The results were compared with other metaheuristics, including GA, PSO, the coyote optimization algorithm, and the gray wolf optimizer. Work Gush et al. (2021) proposed the slime mold algorithm to determine optimal locations and sizes for three distributed PV systems and two BESSs, while simultaneously optimizing the oversize, dispatch, and VVC control settings of the SIs for both PVs and BESSs. The objective was to minimize voltage deviations across the distribution network. Ref. Jaramillo-Leon et al. (2024) allocated one, two, and three PV power plants in a real distribution feeder model using GA and PSO algorithms to maximize the feeder PVHC. The authors considered SI control functions, such as the unitary power factor, PFC, and VVC, and the set points of both PFC and VVC were optimized. The PSO algorithm provided better solutions than GA. Table 1 presents an overview of the main reviewed works on optimal DG allocation. 1.3.2 Hosting capacity In Estorque and Pedrasa (2016), an extensive search method was developed to estimate the location-specific (i.e., node-level) HC of utility-scale DG in distribution networks. The objective was to produce heatmaps that effectively show the feeder’s capability to host utility-scale DG deployments. The impact of increasing the DG capacity on the voltage profile, loading, and short-circuit levels at various locations was analyzed. In Ding and Mather (2017), a stochastic method to calculate the estimated distributed PVHC as well as an active distribution network management approach to increase the PVHC were presented. The authors used the GA, considering the voltage regulator taps, switching capacitor banks, controllable switches’ states, and the power factor of PV inverters as decision variables. Ref. Reno and Broderick (2018) investigated the maximum PV system capacity that can be connected at different locations in a distribution feeder. The authors 1.3. LIT ER AT U R E R EV IEW 27 Table 1 – Summary of the main reviewed references on DG allocation Work Number Objective SI settings Test Solution of DGs function Control Optimizing feeder method Moradi and Abedini (2012) 3 1,2, and 3 − − 33 and 69-bus GA-PSO (hybrid) Kim (2017) 3 1 and 5 VVC − IEEE 37-bus GA Huy et al. (2020) 1,2, and 3 8 and 4 PFC √ 69-bus DE Čađenović and Jakus (2020) 3 2,4, and 6 PFC √ 33-bus MISOCP (CPLEX) Gush et al. (2021) 3 1 and 4 VVC √ 33-bus SMA Akbar et al. (2022) 3 1,2, and 3 PFC √ 33-bus and 69-bus I-GWOPSO (hybrid) Purlu and Turkay (2022) 1 and 2 1,2, and 7 PFC √ 33-bus GA and PSO Chang, Chinh and Sinatra (2022) 10 9 VVC − IEEE 123-bus EO Jaramillo-Leon et al. (2024) 1,2, and 3 4 PFC and VVC √ RFM GA and PSO 1. voltage deviations; 2. active power losses; 3. voltage stability index; 4. maximizing DG/DER penetration; 5. DG installation costs; 6. export of energy 7. reactive power losses; 8. energy losses; 9. maximizing PV integration by a combined function; √ : Considered; −: Not considered; MISCOP: Mixed-integer second-order cone; SMA: Slime mould algorithm; I-GWOPSO: Improved grey wolf optimization with particle swarm optimization; EO: Equilibrium optimizer; RFM: Real feeder model. Source: Own elaboration. Table 2 – Summary of the main reviewed references on DER HC analysis Work Metrics DER Allocation HC Test Methodtechnology type enhancement feeder Estorque and Pedrasa (2016) 1−6 DGs Centralized − Modified IEEE 123-bus ES Ding and Mather (2017) 1, 7, and 8 PVs Distributed √ IEEE 123-bus and RFM SM Reno and Broderick (2018) 1, 2, 3, and 7 PVs Centralized √ 14 RFMs Iterative Chathurangi et al. (2021) 1 PVs Distributed √ RFM SM Jaramillo-Leon et al. (2023) 1 and 2 PVs Centralized √ RFM Iterative Pereira et al. (2024) 1, 2, 3, 6 DGs Distributed − RFM Iterative and GA8 −12 Oliveira, Bollen and Etherden (2025) 1 and 2 PVs Distributed − RFM Time-series 1. Overvoltage; 2. Lines overloading; 3. Transformer overloading; 4. Reverse power flow at the substation; 5. Fault current contribution at the substation; 6. Fault current contribution at point of common coupling; 7. Undervoltage; 8. Voltage unbalance; 9. Voltage deviation; 10. Breaker-fuse coordination; 11. Forward fault current increase; 12. Max. reduction of reach; ES: Exhaustive search; RFM: Real feeder model; SM: Stochastic method. Source: Own elaboration. 28 1.3. LITERATURE REVIEW considered the connection of distributed PV systems to long single-phase feeder laterals and demonstrated how using advanced inverter VVC can increase the grid HC. Work Jaramillo-Leon et al. (2023) presented a simulation-based optimization framework for maximizing the PVHC in a distribution feeder. The PSO algorithm was used to determine the maximum installed capacity of a single PV power plant and the best VVC settings for its associated SI. The authors compared the VVC settings obtained by the proposed PSO algorithm with those provided by the GA and the recommended set-points in the IEEE 1547 and California Rule 21 standards. Ref. Pereira et al. (2024) showed a methodology for estimating the HC of behind-the-meter DGs 2 considering both the MV and LV networks of four large-scale feeder models. HC maps were obtained for each MV line section, distribution transformer, and LV network. The voltage deviation was the main limiting metric for installing more behind-the-meter DGs. In Oliveira, Bollen and Etherden (2025), a time-series method for estimating the HC in a distribution network was presented considering PV penetrations in both MV and LV networks and hourly consumption and PV generation profiles during one year. The authors introduced probability curves for bus overvoltage and line overload and identified locations that exceed the predefined impedance limit (i.e., high-impedance nodes), which are prone to significant voltage fluctuations. 1.3.3 Smart inverter control functions In Bello et al. (2018), a method was presented to determine the optimal settings for the power factor, Volt-VAr, and Volt-Watt controls of residential PV inverters. The method analyzes various operating scenarios using predefined VVC curves, and ranks the control settings based on three performance metrics: feeder losses; voltage variability; and voltage violations. Work Lee, Kim and Cho (2020) proposed a GA to minimize a weighted sum objective function, which encompasses the network losses, voltage deviation, and reactive power peak. The objective was to improve the operation of the South Korean distribution system by selecting the best inverter Volt-VAr curve settings. Seasonal updates to SI VVC (SIVVC) settings were also considered. A new SI control mode that considers the combined operation of the VVC and Volt-Watt control (VWC) was proposed in Ref. Chathurangi et al. (2021). The PVHC was determined using the Volt-VAr, Volt-Watt, and combined Volt-VAr and Volt-Watt control functions with the recommended settings in the following standards: IEEE 1547-2018 Category A and B; Australian/New Zealand Standard 4777; California Rule 21; and Hawaii Rule 14. The results showed that the combined Volt-VAr and Volt-Watt control provides higher PVHC levels than the Volt-VAr and Volt-Watt control functions in an LV distribution network in Sri Lanka. 2 It refers to customer-sited DG connected to the distribution network on the customer’s side of the utility’s electric meter. 1.4. CONTRIBUTIONS 29 1.4 CONTRIBUTIONS Refs. Kim (2017), Lee, Son and Kim (2021), Chang, Chinh and Sinatra (2022) have included the SIVVC function in the DG allocation problem. However, those papers adopted predefined SI control set-points instead of treating them as decision, or design variables within the optimization algorithm to find the optimal SIVVC settings. Gush et al. (2021) proposed an optimization approach to increase the HC of distribution networks by optimizing the locations, sizes, and inverter VVC set-points of PV systems and BESSs. Differently, this thesis extends the analysis in four aspects: (i) both single (decentralized) and multiple (distributed) allocations are evaluated, considering the connection of one, two, and three PV systems; ii) two SI control functions, PFC and VVC, are considered; iii) candidate locations for the installation of PV power plants are identified by a spatial overlay of suitability and load density maps presented in Ref. Zambrano-Asanza, Quiros-Tortos and Franco (2021); and iv) tests are conducted in a real-world distribution feeder model from an Ecuadorian utility. This work proposes a simulation-based optimization framework to maximize the HC of an MV distribution feeder. The framework determines the best allocation of PV power plants equipped with SIs. The contributions of this thesis are outlined as follows: • A procedure to determine the maximum installed capacity of a single PV power plant (centralized allocation) from a set of candidate locations to install PV systems; • The proposed method identifies the best placement and size of one, two, and three PV power plants and the inverters’ control set-points while maximizing the distribution network’s PVHC; • Quantification of the maximum PV generation levels achievable with smart PV inverters operating at unity power factor and optimized settings of both PFC and VVC functions; • A manual parameter tuning procedure to adjust the control parameters of the optimization algorithms. An outstanding aspect of this thesis is the use of open-source software, such as OpenDSS and Python, to address two well-known planning problems: grid hosting capacity; and optimal allocation of PV systems. The author applies the developed methods in a real-world case study, that is, a distribution feeder model of a distribution utility. However, the thesis has certain limitations, which will be presented in the discussions Section of Chapter 5. 30 1.5. THESIS OUTLINE 1.5 THESIS OUTLINE This thesis is structured as follows. In Chapter 2, the optimal PV allocation problem, grid hosting capacity analysis, creation network model, and simulation-optimization framework are presented. Chapter 3 describes the PFC and VVC functions of the PV inverters and the mathematical model of the PV allocation problem. In Chapter 4, the PVHC quantification procedure for the installation of a single PV power plan and the load allocation algorithm are presented. In addition, the DE and VS algorithms, their computational implementation, and their adjustments to solve the PV allocation problem are shown. Chapter 5 shows the test distribution feeder and the numerical results. The chapter ends with a discussion. The main conclusions and possible future work are provided in Chapter 6. 31 2 BACKGROUND 2.1 PV POWER PLANTS ALLOCATION As shown in Figure 3, the optimal PV allocation consists of two stages. First, a PV potential locations assessment is performed, in which potential sites for building PV power plants are selected using a GIS-based multi-criteria decision-making approach and spatial overlay with electric load. That approach satisfies climatic, environmental, location, and orography criteria while meeting the realistic requirement of electric demand. After identifying suitable locations for installing PV power plants, the next stage is to determine the optimal number, placement, and size of PV power plants using an optimization-based simulation framework that maximizes the distribution feeder PVHC and finds the location and installed capacity (P inst) of each PV power plant and the most suitable control set-points of the PV inverters. The first stage was presented in Ref. Zambrano-Asanza, Quiros-Tortos and Franco (2021). This work focuses on the second part, i.e., an optimization-simulation framework for allocating PV power plants, starting from the set of candidate locations. Figure 3 – Stages for the optimal PV allocation PV potential locations assessment Suitability analysis (environmental, location, climatic, and orography criteria) Optimal number, location, and size of PV power plants Optimization-simulation framework (HC analysis and SI settings) Optimal allocation of PV power plants Source: Own elaboration. The number of possibilities to place DG in a distribution network, given several candidate locations (M) and a number of DGs to be installed (N), can be computed as follows: P (M, N) = M ! (M − N)! (1) The above permutation formula considers distinguishable DGs, due to they can have different installed capacities and control set-points. 32 2.2. HOSTING CAPACITY ANALYSIS 2.2 HOSTING CAPACITY ANALYSIS HC analysis is critical for effective DER integration into power distribution systems, as it supports the energy transition by ensuring safe grid operation in a cleaner and more decentralized manner. A DER impact evaluation study differs from a DER HC analysis. The impact evaluation study comprehensively assesses the specific effects of a single DER installation on distribution system criteria, such as power quality, protection coordination, and thermal limits. It often includes mitigation strategies and their associated costs to alleviate any adverse impacts. In contrast, HC analysis estimates the maximum generation or load capacity that the entire distribution system, or a specific location (e.g., a bus), can accommodate. It provides a feeder or node threshold beyond which additional DER connections would require grid upgrades or modifications. To quantify grid HC, performance metrics related to power quality and reliability (e.g., overvoltage, undervoltage, thermal loading, reverse power flow, and harmonic distor- tion) must be analyzed, each with established limits that must not be exceeded. Figure 4 shows that as the DER penetration level increases, the performance metric or indicator tends to exceed its limit (blue dashed curve). As long as the metric remains below the threshold (red dashed line), i.e., for small penetration levels, the system’s performance is acceptable. The grid HC for the considered metric is the maximum DER penetration value before exceeding the performance metric limit. The distribution grid HC can be increased by strategies that mitigate the operational limitations that hinder installing more DERs. Some of these mitigation strategies are adding voltage regulators, line reconductoring, modifying capacitors and voltage regulator status, and using more recent technologies like BESSs and SIs (EPRI, 2018b; Moro; Trindade, 2021). As shown by the solid curve in Figure 4, implementing a mitigation strategy to increase grid HC allows for a higher level of DER penetration while still meeting the performance metric limit. 2.2. HOSTING CAPACITY ANALYSIS 33 Figure 4 – Graphical representation of the HC analysis. Additional Unacceptable operation Acceptable operation Uncontrolled HC Improved HC DERs penetration increase due to HC as P er fo rm an ce m et ri c DER penetration level Metric limit Source: Adapted from Ismael et al. (2019). 2.2.1 Hosting capacity levels Based on the number of DERs considered when performing HC analysis, there are two levels of HC analysis: single-location or node-level; and multiple-location or feeder-level. 2.2.1.1 Single-location Single-location indicates a single and large DER (centralized allocation) and enables the determination of node-level (or location-specific) HC by performing the HC analysis in a single location at a time. It depicts the amount of generation or load each candidate location can accommodate by installing a single device in that location (node). Node-level HC results help identify appropriate locations for the installation of DERs and support PV interconnection requests with knowledge of location-specific constraints (EPRI, 2020; Jaramillo-Leon et al., 2024). 2.2.1.2 Multiple-location Multiple-location represents a few medium-scale DERs distributed across the distribution network simultaneously (distributed allocation), providing feeder-level HC results (Radatz et al., 2023). The feeder-level HC is the generation or load that the feeder can host and examines the distribution network ability to host various deployments of multi-location DERs. It depends on how the generation or load is allocated across the distribution feeder, i.e., the quantity of DERs and their capacities and locations. Feeder- 34 2.3. DISTRIBUTION NETWORK MODEL level HC can inform planning by identifying feeders that might benefit most from system investments (EPRI, 2020). 2.2.2 Historical development of hosting capacity According to Ref. Bollen and Rönnberg (2017), the term HC was emerged in March 2004 by André Even in the context of DG. It was first introduced in 2005 by Ref. Bollen and Häger (2005), where it was defined as the maximum DER penetration for which the power system operates acceptably. In 2012, the Electric Power Research Institute (EPRI) presented a stochastic method to assess the feeder PVHC (EPRI, 2018b). Subsequently, Ref. Coogan, Reno and Grijalva (2013) presented the locational (or location-specific) PVHC. In 2015, Ref. Rylander, Smith and Sunderman (2016) introduced a streamlined method for determining the distribution system HC. In 2017, the distribution resource integration and value estimation (DRIVE) (hybrid) HC method was developed by EPRI to reduce the computational burden while still capturing critical grid responses for determining location-specific HC (EPRI, 2018a). Ref. Jain et al. (2019) presented a quasi-static time- series (QSTS) PVHC methodology and metrics in 2019. Figure 5 presents a timeline chart illustrating the evolution and development of the HC definition and methods. Figure 5 – Timeline of definition and methods of HC. 2013 Locational PVHC 2014 Streamlined method 2004 First HC definition 2012 Stochastic HC analysis 2017 Hybrid method 2019 QSTS HC analysis Definition Method Source: Own elaboration. 2.3 DISTRIBUTION NETWORK MODEL Typically, commercial (e.g., CYME-CYMDIST and DIgSILENT PowerFactory) and free, open-source (e.g., OpenDSS and MATPOWER), power system engineering software include models of the publicly available and most common power distribution test feeders. Therefore, when working with these test circuits in the software mentioned before, there is no need to think much about the circuit model. However, whether to use another power grid (different from the conventional ones), it is necessary to create the circuit model in the proper file format required by the chosen software. The GIS enables electric utilities to geospatially map and manage distribution infrastructure (poles, transformers, lines, switchgear, and so on). The geodatabase is the 2.4. SIMULATION-BASED OPTIMIZATION 35 data source and contains comprehensive and detailed information of the distribution grid, customer connectivity, and phase identification. From it is generated the distribution net- work model. The power distribution network’s topology and information can be effectively represented using a graph. In graph theory, a graph is a mathematical and data structure that consists of a set of vertices (or nodes) linked through edges (or arcs). In this case, each bus in the network is represented as a node, and each branch (such as a line and equipment in series) is represented as an edge. By creating a graph representation from the network data and leveraging the NetworkX Python package, the process of building the network model becomes more efficient and straightforward, as the package provides graph search, property analysis, and traversal algorithms ready to use. Work Tenesaca-Caldas et al. (2022) presented the detailed procedure for generating the distribution network model for DIgSILENT PowerFactory and OpenDSS software. 2.4 SIMULATION-BASED OPTIMIZATION Simulation-based optimization, or simulation-optimization, is a method to solve complex problems that combines simulation modeling and analysis with non-traditional optimization algorithms, such as metaheuristics1 (Amaran et al., 2016). There are two main types of coupling in simulation-based optimization: sequential and hierarchical. The sequential coupling executes one method after another. The results of the execution phase of the first method are the input data for the execution of the following one. In a hierarchical coupling approach, the dominant method calls and controls the other one (Römer, 2021). Simulation-optimization iteratively adjusts the decision variables using a metaheuristic algorithm and a simulation model to enhance the performance of a system. The simulation model captures the system’s behavior under various scenarios, calculates the objective function value, and checks constraint satisfaction. This work adopts a hierarchical coupling architecture in which optimization is the dominant method and invokes the simulation method as a subcomponent during its execution. Three examples of hierarchical architecture in power system operation and planning are optimizing the operation of unbalanced active distribution systems (Alvarado- Barrios et al., 2020), employing an active distribution network management approach to increase the PVHC of distribution feeders (Ding; Mather, 2017), and solving the optimal subtransmission line switching problem (Zambrano-Asanza et al., 2022). This work employs the power flow simulation conducted by the OpenDSS software to address the PV allocation problem in distribution networks. OpenDSS is a simulation tool designed for analyzing the integration of distributed resources and facilitating the modernization and automation of power distribution networks (Dugan; McDermott, 2011). 1 Metaheuristic is a problem-independent algorithmic structure designed to find good solutions to an optimization problem. 36 2.4. SIMULATION-BASED OPTIMIZATION Specifically, OpenDSS is a smart grid analysis platform that models the PV systems through the PVSystem object, which includes both the PV panel and the inverter. The InvControl object is the control element that models and simulates the SI control functions, including the VVC mode (Sunderman; Dugan; Smith, 2014). OpenDSS can be controlled through the component object model (COM) interface by modern programming languages, such as Python, C++, Matlab, Java, and Visual Basic for applications. This interface enables users to create and implement new algorithms that are not included in the OpenDSS source code. It allows for customization of the software and the incorporation of additional features to enhance its capabilities. We selected OpenDSS over MATPOWER because OpenDSS is designed for modeling and simulating multi-phase distribution systems. In contrast, MATPOWER is used for the positive-sequence network model of balance, three-phase transmission systems. In the proposed simulation-based optimization framework, shown in Figure 6, the optimization method is implemented in the Python environment. OpenDSS enables the user to model the distribution feeder and PV power plant, and to perform the power flow analysis considering the PV inverter control functions. The direct-call dynamic link library (DLL) interface allows external control of OpenDSS via Python, providing increased control over its functions and data structures. Python scripts are used to create distribution feeder models in OpenDSS format, customize and automate power flow simulations, implement the two solution techniques, generate reports, and analyze and visualize results. Thus, combining Python and OpenDSS creates an open-source and powerful tool for research organizations and electric utilities. 2.4. SIMULATION-BASED OPTIMIZATION 37 Figure 6 – Flowchart of the simulation-based optimization framework Simulation- optimization framework Input - Distribution network model - Load and generation data - PV candidate locations - Optimization method parameters Optimization Py th on D E & V S PV hosting capacity maximization Power flow modeling & analysis O pe nD SS Simulation - Location and Pinst of each PV system - Control set-points of each SI Output Source: Own elaboration. 39 3 PROBLEM FORMULATION This chapter presents a brief review of both the PFC and VVC functions of SIs and the mathematical model of the optimal PV allocation problem. 3.1 SMART INVERTER CONTROL FUNCTIONS Since DER interconnections on distribution networks are increasing, new inverter capabilities are needed to address the resulting challenges. A conventional inverter is a power electronic device that converts DC electricity to AC electricity (Olowu et al., 2021). In contrast, advanced inverters, or SIs, have additional functionalities, including voltage, frequency, and real and reactive power support, as well as integrated monitoring and scheduling capabilities (EPRI, 2016). SI’s new capabilities enable higher renewable energy penetration, so using SI control functions can be a low-cost option to increase the HC of a distribution network. The IEEE 1547-2018 standard suggests that inverter-based DERs can participate in grid voltage regulation through modulation of their active or reactive power outputs (IEEE, 2018). 3.1.1 Power factor control In this control function, the SI adjusts the reactive power (VAr) injection, or absorption to maintain the power factor (pf) at a target value. It allows the inverter to operate with a fixed power factor, independent of the voltage at the connection point or active power output, as long as there is headroom (i.e., reserve capacity) for reactive power. If sufficient capacity for exchanging reactive power is not available, the PFC function may also adjust the active power output. A SI operating at unity power factor exports all of its generated active power, i.e., the inverter does not absorb, or supply reactive power. When operating in a power factor mode, the amount of VArs absorbed or injected by the PV inverter into the grid (QINV ) is a function of both the active power (P ) and the set power factor, as given by (2). Conventionally, positive reactive power values correspond to a capacitive nature (VAr injection), whereas negative values represent an inductive nature (VAr absorption). QINV = P pf √ 1 − pf 2 (2) If the grid PVHC is limited by overvoltage and the SI has the capacity to exchange reactive power, then the absorption of reactive power by the inverter can decrease the voltage value, subsequently increasing the HC of the distribution network. 40 3.1. SMART INVERTER CONTROL FUNCTIONS 3.1.2 Volt-VAr control Through the VVC function, also known as droop VVC, the SI is configured to manage its reactive power output as a function of the voltage at the connection point, according to the typical curve shown in Figure 7. This curve is a piece-wise linear function whose x-axis is the voltage magnitude, in per unit (p.u.), monitored at the connection point, while its y-axis is the inverter reactive power, in p.u., calculated by selecting the kVA rating of the inverter as the base. QINV (v) =  Q1 if v ≤ V1 (v − V2) ( Q2−Q1 V2−V1 ) + Q2 if V1 < v ≤ V2 0 if V2 < v ≤ V3 (v − V3) ( Q4−Q3 V4−V3 ) + Q3 if V3 < v ≤ V4 Q4 if v > V4 (3) Figure 7 – Example of a Volt-VAr curve Voltage [p.u.] R ea ct iv e po w er [p .u .] deadband V2 V3 V1 V4 Q1 Q4 Q2=Q3 Source: Own elaboration. The four ordered pairs (V1, Q1), (V2, Q2), (V3, Q3), and (V4, Q4) are the set-points that determine the configuration of the VVC curve in which Q2 = Q3 = 0. When the voltage is less than V1, the inverter supplies reactive power equal to Q1. For voltages between V1 and V2, the inverter injects reactive power between 100% and 0% of the available VAr capacity. In the range of values between V2 and V3, the inverter neither injects nor absorbs reactive power. Therefore, this region of the curve is known as the deadband. Outside the deadband, the inverter exchanges reactive power with the grid. For voltages between V3 and V4, the inverter absorbs reactive power from the grid between 0% 3.2. SMART INVERTER CAPABILITY CURVE 41 and 100% of the available VAr capacity. For voltage values greater than V4, the inverter consumes a reactive power value of Q4. The injection, or absorption of reactive power by the inverter as a function of the voltage at the connection point (v) can be expressed by (3). Determining the most appropriate SI control function and its settings depends on several factors related to the PV system, power grid, and PV inverter. These factors include: the number, size, and location of PV systems; feeder topology, reactance/resistance (X/R) ratio, and load; and the number and capacity of inverters (Radatz et al., 2019). The inverter control set-points are adjustable, allowing adaptation to fluctuating grid conditions. This flexibility enables a wide range of control function configurations. 3.2 SMART INVERTER CAPABILITY CURVE The IEEE standard divides DER performance into two types, A and B, concerning reactive power capacity and voltage regulation performance requirements. This thesis uses DER category B, which is suitable for a high penetration of DERs, or when its power output goes through frequent and significant variations. Figure 8 shows the inverter capability curve for DERs of category B. Figure 8 – Capability curve for DER of category B from the IEEE 1547-2018 standard. Source: From Ferraz, Ferraz and Medina (2024). For an active power output less than 5% of the DER’s rated active power, the DER shall not exchange reactive power with the grid. When operating with an active power output greater than 5% but less than 20% of the DER’s rated active power, the DER may exchange reactive power ranging from 11% to 44% of its inverter rated power. For an 42 3.3. OPTIMIZATION PROBLEM active power output greater than 20%, the DER must be capable of exchanging up to 44% of its inverter kVA rating. 3.3 OPTIMIZATION PROBLEM At first, the optimal PV placement and sizing problem is a constrained mixed- integer non-convex nonlinear optimization problem. In this thesis, the decision variables are the sizes and locations of the PV power plants and the set-points of the SI control function. The control set-point is the power factor value (pf) for the PFC. In the VVC function, the design variables are the voltages (V1, V2, V3, V4) that define the Volt-VAr curve of the PV inverters. The four reactive powers of the Volt-VAr curve in Figure 7 are assumed to be the default values recommended by the IEEE 1547 standard, and only the voltages are optimized for each PV inverter. The objective function maximizes the aggregated installed PVC in the distribution network. Equality constraints are the power flow equations that determine the operational state of the system. Moreover, for each PV inverter, the power factor and the four voltage points that define the Volt-VAr curve are given by (2) and (3), respectively. Inequality constraints are the limits of the following variables and parameters: the installed capacities of each PV system; the power factor and voltages for PFC and VVC, respectively; voltage magnitude at buses; and overloading related to the current through the lines. 43 4 SOLUTION METHODS This chapter explains the load allocation algorithm and the procedure for quantify- ing grid PVHC, considering the installation of a single PV power plant. It also gives a brief overview of the DE and vortex search (VS) algorithms and presents their computa- tional implementation, including the representation of candidate solutions, setting up the population, finding the feasibility of a solution and its objective function value, and the penalty function. 4.1 LOAD ALLOCATION ALGORITHM To compute the power flow analysis, the active and reactive power of every load bus, or load point, must be specified. Sometimes utilities have the active and reactive power measurements at the feeder-head (i.e., the point where the feeder connects to the substation). In this work, each distribution transformer represents a load point. An iterative load allocation algorithm is implemented to allocate active and reactive power to loads based on the distribution transformers’ ratings and the active and reactive power measurements at the feeder-head. The allocated load at each bus k can be computed as follows: P k l = P k nom ( Palloc Ptot ) (4) Qk l = Qk nom ( Qalloc Qtot ) (5) where P k l , is the load active power, i.e., the input to power flow analysis at bus k, P k nom is the transformer rating at bus k, Palloc is the total active power to be allocated, and Ptot is the aggregated total transformers’ active power. The same notation is for the load reactive power (Qk l ) given by (5). The active and reactive powers allocated to all distribution transformers are calculated as follows: Palloc = Pmeasu − Plosses (6) Qalloc = Qmeasu − Qlosses (7) where Pmeasu is the active power measured at the feeder-head and Plosses is the active power losses computed by the power flow analysis. At the beginning of the load allocation algorithm Palloc = Pmeasu. Then, the follow- ing steps are executed: (1) for each distribution transformer, compute P k l and Qk l using (4) and (5), respectively; (2) perform a power flow analysis to obtain Plosses and Qlosses; and (3) calculate Palloc and Qalloc by (6) and (7), respectively. Then the algorithm returns 44 4.2. PVHC ASSESSMENT to the first step. The algorithm executes these three steps until the error between the computed power values at the feeder-head (PS and QS) resulting from the successive power flow analysis and the power measurements is less than a predefined tolerance (α). This algorithm, presented in Figure 9, ensures that the active and reactive powers are correctly distributed among the distribution transformers. Figure 9 – Flowchart of load allocation algorithm Start , and First PVC level Yes First distribution transformer Calculate and Last distribution transformer? Next distribution transformer Power flow simulation Calculate and End Yes No No and Source: Own elaboration. 4.2 PVHC ASSESSMENT The maximum values of bus voltage and line thermal loading are the metrics for the PVHC assessment. The HC method consists of solving successive power flows for different scenarios (Ayres et al., 2010). It is considered that there is a set of candidate locations to install a ground-mounted solar PV power plant connected to the MV distribution network. It is assumed that a specific allocation scenario is the combination of each candidate location and a different installed PVC at that location. First, the maximum and minimum installed capacity limits to be investigated need to be defined, along with an incremental step. Thus, a power flow analysis is computed for every operating point in each allocation scenario, and the performance metrics are calculated. Then, the installed capacity of the PV power plant is incremented by the defined step. This procedure, shown in Figure 4.3. METAHEURISTIC ALGORITHMS 45 10, is performed for each candidate location, considering one PV power plant at a time. Thus, the distribution network’s PVHC is quantified. This PVHC method is based on the stochastic analysis presented by EPRI in EPRI (2012). Figure 10 – Flowchart of PVHC quantification Yes Start Set PV system at specific location Set PVC boundaries and incremental step First PVC level First operating point Power flow simulation Save performance metrics values First performance metrics violation? Next operating point Last operating point? End PVHC equals to previous PVC level No Yes No Yes Last PVC level? Next PVC level and first operating point No First PVC level Source: Own elaboration. 4.3 METAHEURISTIC ALGORITHMS When the optimal DG allocation is formulated as an optimization problem, it can be solved mainly by three optimization techniques: classical optimization; intelligent search methods; and hybrid methods. Classical optimization methods directly solve mathematical models, whereas intelligent search methods, known as metaheuristics, find near-optimal solutions for large-scale real-world optimization problems that are too complex for classical optimization techniques (Talbi, 2009; Papadimitrakis et al., 2022). Hybrid optimization methods combine two or more metaheuristic algorithms, or can combine metaheuristic algorithms with classical optimization methods (Bawazir; Cetin, 2020). The mathematical model of the optimal PV allocation includes power flow equations as equality constraints, which makes it a non-convex optimization problem. Because the nonlinear power flow equations lead to a non-convex feasible space (Claeys; Deconinck; Geth, 2021). The mathematical model for optimal PV allocation is constrained, non-convex, nonlinear, and mixed-integer. Therefore, metaheuristic algorithms are selected to solve the 46 4.3. METAHEURISTIC ALGORITHMS proposed optimization model. As we shall see in the solution representation (subsection 4.3.4.1), all the design variables are represented as continuous values. Consequently, it is appropriate to use a metaheuristic well-suited for searching within a continuous space. The DE and VS algorithms are chosen because they are effective real-parameter optimization methods. In addition, Refs. Nayak, Dash and Rout (2012), Montoya et al. (2019), Montoya, Gil-González and Orozco-Henao (2020), and Huy et al. (2020) have been used those algorithms to solve the DG allocation problem. 4.3.1 Differential evolution DE is a small and simple mathematical model of the natural and complex process of evolution. It was developed by Storn and Price and first disseminated as a technical report in 1995 (Storn; Price, 1995). DE is a population-based1 stochastic search algorithm for real parameter optimization that seeks the best solution over continuous search spaces and is simpler to code than the other evolutionary algorithms (Das; Suganthan, 2010). The intelligent use of differences between solutions (or individuals) performed in an easy and fast linear operator (named differentiation) makes DE distinctive. DE is characterized by three control parameters that define its performance in achieving high-quality solutions: the population number (NP ); scale or differentiation factor (F ); and crossover rate (Cr). A predefined number of iterations (or generations) (iter) is the stopping criterion of the algorithm. Each candidate solution or individual is represented by a solution vector x⃗i = [xi1, xi2, ..., xiD] ∀i ∈ [1, 2, ..., NP ] in the D-dimensional search space, bounded by minimum x⃗min = [xmin 1 , xmin 2 , ..., xmin D ] and maximum values x⃗max = [xmax 1 , xmax 2 , ..., xmax D ]. The main idea behind the algorithm is the scheme to generate trial vectors. First, for each individual the mutation operator creates an ith mutated, or donor vector at iteration it by adding a weighted difference between two individuals to a third, as follows: m⃗it i = x⃗it r1 + F (x⃗it r2 − x⃗it r3) (8) where x⃗it r1, x⃗it r2, and x⃗it r3 are three random solutions from the population, which are mutually different and also different from the current individual. Next, the trial individual is created by recombining the donor (m⃗it i ) with the target vector (i.e., the current candidate solution in the population that is being considered for evolution), using a binomial crossover: u⃗it i = m⃗it i if (randid() < Cr) ∨ (Rnd = i) x⃗it i otherwise d = 1, 2, ..., D (9) where randid() is a uniformly distributed random number within the range of [0, 1) and Rnd is randomly selected from the range [1, 2, ..., D]. If some of the elements of the trial 1 Population-based metaheuristics employ a set of candidate solutions (i.e., a population) that simulta- neously progresses toward the optimum by combining the solutions into new ones iteratively. 4.3. METAHEURISTIC ALGORITHMS 47 individual violate the boundaries of the feasible search space, they return to the feasible space using (10). xid = min{xmax d , max {xmin d , xid}} (10) The pseudocode of the DE algorithm is shown in Algorithm 1. After the generation of the initial population and the objective function and feasibility evaluation, the algorithm performs the following four steps in each iteration for each individual. 1. Random choice of three different solutions from the population (x⃗it r1, x⃗it r2, and x⃗it r3). 2. The creation of the trial individual by applying the mutation and crossover operators. 3. Verifying the variable boundaries of the trial individual, if some variable of the trial individual is beyond the search range, it must be returned to the feasible search range. 4. Selection of the best solution by comparing the objective function value of both the trial and the current individuals. Moreover, it is necessary to check whether the new individual is better than the best solution from the current population (best). Algorithm 1 Pseudocode of the DE. 1: Set NP , iter, F , Cr, D, x⃗min, and x⃗max 2: Create a population of size NP . Set i = 1 and it = 0. 3: for each solution x⃗i do 4: Calculate the objective function and feasibility 5: end for 6: Save the best solution (best) 7: for each iteration it do 8: for each solution x⃗i do 9: Choose randomly x⃗r1, x⃗r2, and x⃗r3, r1 ̸= r2 ̸= r3 ̸= i 10: Generate a trial individual (u⃗it i ) using mutation (8) and crossover (9) 11: if the variables of u⃗it i are outside the bounds then 12: Set the variables the nearest bound using (10) 13: end if 14: Calculate the objective function and feasibility of u⃗it i 15: Select the better solution (x⃗it i or u⃗it i ), and update best if required. 16: end for 17: end for 4.3.2 Vortex search algorithm The VS algorithm is a metaheuristic introduced in Ref. Doğan and Ölmez (2015) and was inspired by the vortex flow of the mixed fluids. This is a single-solution-based 48 4.3. METAHEURISTIC ALGORITHMS algorithm for solving bound-constrained global optimization problems. It uses an adaptive step size adjustment to balance the exploitative and explorative nature of the search. Once an initial solution (µ⃗0) has been generated by using (11), VS uses the inverse incomplete gamma function to decrease the radius at each iteration (Doğan; Ölmez, 2015), as follows: µ⃗0 = x⃗max + x⃗min 2 (11) r⃗it = 1 x gammaincinv(ait, x)σ0 (12) where gammaincinv is the incomplete gamma function, ait is a real positive parameter at iteration it, x is the integration limit, and σ0 = 1 2(max{x⃗max} − min{x⃗min}). Then, the VS generates neighbor solutions as follows: C⃗it = r⃗it + µ⃗ (13) The variables’ boundaries are verified using (10). Finally, at each iteration it, the value of ait is computed as follows: ait = a0 − it iter (14) where a0 equals 1 to ensure full coverage of the search space at the first iteration. Algorithm 2 presents the pseudocode of the implemented VS. Algorithm 2 Pseudocode of the VS. 1: Set NP , iter, D, x⃗min, and x⃗max 2: Create a set of NP solutions. Set i = 1 and it = 0. 3: for each solution x⃗i do 4: Calculate the objective function and feasibility 5: end for 6: Save the best solution (best) 7: for each iteration it do 8: Set the center (µ⃗it) as best 9: Generate neighbor solutions using Gaussian distribution around µ⃗it and applying (13) 10: Verify boundaries of the solutions using (10) 11: Calculate the objective function and feasibility of the neighbor solutions 12: Update best if required 13: Radius decrement process using (14) 14: end for 4.3.3 Optimization platform Fig. 11 shows the components of the proposed optimization platform. The proce- dures in the green rectangles are problem-dependent, whereas the blue rectangle shows 4.3. METAHEURISTIC ALGORITHMS 49 three common aspects of the metaheuristics, including their control parameters, operators, and stopping criterion. Generally, metaheuristics are not designed for a specific optimiza- tion problem; instead, they can be employed to solve several optimization problems. The implemented optimization platform allows easy adaptation of different metaheuristics to the optimal PV allocation problem because, to test other metaheuristic algorithms, only the procedures mentioned in the blue rectangle must be implemented. Figure 11 – Optimization platform Solution encoding Population initialization Objective function evaluation and feasibility Constraint handling Search algorithms • Control parameters • Operators • Stopping criterion D E an d V S Source: Own elaboration. 4.3.4 Metaheuristic computational implementation 4.3.4.1 Encoding of the solution vector Figure 12 illustrates a vector depicting a candidate solution (or individual) composed of three parts. It is assumed that N represents the number of PV systems that will be installed. The first 2N elements represent the X and Y coordinates2 of each candidate location. The first N elements are the X coordinates, followed by the Y coordinates. The second part, i.e., the next N components, is the installed capacity of each PV system. Finally, the third part represents the set-points of the PV inverter control functions and has Nc elements, where c represents the number of SI control function set-points. The vector size is D = N(3 + c), where all elements are continuous. When the inverter operates with a unity power factor, the vector will only have the first two parts (c = 0). In the power factor control, c = 1. A positive value represents a leading power factor (capacitive behavior), whereas a negative number indicates a lagging power factor (inductive behavior). The set-points for VVC encompass the four voltages (c = 4) that determine the control curve. For example, if three PV units are installed and their inverters operate with the VVC function, the vector representing a candidate solution will have 3(3 + 4) = 21 variables (elements). 2 The coordinates are a pair of numbers that indicate the location of a point in the two-dimensional space. 50 4.3. METAHEURISTIC ALGORITHMS Figure 12 – Representation of a candidate solution X1 ... XN Locations Sizes Inverter set-points P1 ... PN pf1 ... pfN V11 ... V41 ... V1N ... V4N PFC VVCY1 ... YN X coordinates Y coordinates Source: Own elaboration. Each time the objective function value is calculated, the coordinates of the PV locations are set to the coordinates of the nearest candidate locations. That is, the PV system will be connected at the bus of the nearest candidate location. The distances of the current vector to each candidate location are computed by: dikl = √ (Xik − Xl)2 + (Yik − Yl)2 k = 1, 2, ..., N (15) where dipl is the distance from the bus k to the candidate location l in the solution vector i, Xik and Yik are the coordinates of the PV system k in the vector x⃗i, and Xl and Yl are the coordinates of the candidate location l. 4.3.4.2 Initial population During the population generation procedure, one solution vector (or individual) is initially set to the lower bounds of the variables. For the locations, the X and Y coordinates are randomly selected from the coordinates of the candidate locations. This procedure ensures that at least one individual in the initial population is feasible. In power factor control, a random binary number defines whether the power factor will be positive or negative. The values of the remaining individuals are randomly generated between the lower and upper boundaries of the design variables as follows: xid = xmin d + randid()(xmax d − xmin id ) d = 2N + 1, 2N + 2, ..., D (16) where randid() is a uniformly distributed random number within the range of [0, 1] for the element d in the solution vector i. 4.3.4.3 Objective function value and feasibility The quality of a candidate solution is defined by its objective function value, which is determined by summing the installed capacities of the solution vector minus the penalty 4.3. METAHEURISTIC ALGORITHMS 51 function G. Power flow analysis allows us to verify the feasibility of candidate solutions. The power flow outputs allow to check whether the bus voltages and line current are within the limits. 4.3.4.4 Constraint handling We implemented a repair procedure to guarantee that only one PV system will be connected at each candidate location. We chose a random number one at a time from a list of candidate sites N times. After the number is selected, it is removed from the list of candidate locations, making it impossible to choose the same number again. Once we get the N locations, their X and Y coordinates are set in the solution vector. The location repair procedure does not guarantee the solution’s feasibility; it only ensures that unique locations are in the solution vector. The metaheuristic executes the repair procedure every time the search algorithms (i.e., the DE and VS) generate new solution vectors. For each infeasible solution the penalty function G, which represents the degree of infeasibility, is computed as follows: G = A [ w1(V f − V max) + w2(If km − Irated km ) ] (17) where A is a large number; w1 and w2 are the weights for each constraint violation; V f is the maximum bus voltage of the feeder; V max is the maximum boundary of the bus voltage magnitude; Irated km is the line km ampacity; and If km is obtained as follows. First, for each line, the conductor (or cable) current is divided by its current rating, and the maximum value is saved in a list (i.e., the current of the more overloaded conductor in the line). Then, the maximum value of that list is obtained and multiplied by its corresponding ampacity. In feasible solutions G = 0, this ensures that any feasible solution is always better than an infeasible one. In the inverter VVC function, the bounds of V2 and V3 are set to the same value. This allows for the possibility that these voltages can be equal, depending on the shape of the Volt-VAr curve and the presence or absence of a deadband. If V2 exceeds V3 during the search process, their values are swapped, resulting in V2 being replaced with V3 and vice versa. In the DE, the location repair procedure and the verification of V2 and V3 values are executed during both population initialization and the creation of a trial vector. VS algorithm uses the repair procedure and the swapping of voltages V2 and V3 during the initial population creation, as well as when generating neighbor solutions. 53 5 NUMERICAL RESULTS This chapter describes a real-world distribution feeder and three test cases. In addition, the results of the PVHC analysis and each test case are presented. Finally, the chapter concludes by showing the best solutions of the metaheuristic algorithms and a discussion of the results. 5.1 CASE STUDY The proposed method is evaluated on feeder #0427, a MV distribution network located in Cuenca, Ecuador, and operated by “Empresa Eléctrica Regional Centro Sur C.A.” (CENTROSUR). This feeder operates at 22 kV, covers a length of approximately 25 km, and has a peak demand of 4.58 MW. As shown in Jaramillo-Leon et al. (2022) its voltage profile is within permitted limits, and it has no voltage regulation equipment or capacitor banks. In Zambrano-Asanza, Quiros-Tortos and Franco (2021), a suitability analysis was presented, making possible the qualification, comparison, and ranking of potential sites based on a GIS-based multi-criteria. This analysis was used to identify eight candidate locations for PV systems installation based on the factors mentioned in section 2.1. Figure 13 shows the feeder’s topology and the eight candidate locations selected for the PV power plant installation (Zambrano-Asanza; Quiros-Tortos; Franco, 2021; Jaramillo-Leon et al., 2024). The areas at the beginning and end of the feeder were excluded because they did not satisfy one or more considered criteria. The eight locations were chosen based on moderate to suitable solar radiation levels as well as the availability of land space. In Tenesaca-Caldas et al. (2022), the process of creating the network model of the feeder #0427 for the OpenDSS is described. The feeder’s network model encompasses the entire network topology, including distribution transformers and MV and LV loads. A simplified LV network model is adopted, i.e., the LV loads are represented by spot loads directly connected to the secondary (or LV) side of the service/distribution transformer. The loads were modeled as constant PQ loads. For the PVHC analysis and the optimal PV allocation, two operating scenarios were selected. The following steps were taken to obtain these scenarios. Firstly, available measurements at the feeder-head and the active power output measurements of a PV power plant were utilized. Data during the daytime period between 10:00 and 16:00 were filtered. Subsequently, the scenarios (operating points) of maximum PV generation and the maximum difference between PV active power output (P out t ) and feeder load (P demand t ) at time t were determined using equations (18) and (19), respectively. The selection process 54 5.1. CASE STUDY Figure 13 – Feeder topology and candidate locations Source: From Jaramillo-Leon et al. (2024). of those operating points was shown with more detail in section 4 of Ref. Jaramillo-Leon et al. (2024). P out scenario1 = max {P out 1 , P out 2 , ..., P out t } (18) P out scenario2 = max {P out 1 − P demand 1 , P out 2 − P demand 2 , ..., P out t − P demand t } (19) The PV generation and voltage values, both in per unit (p.u.), are 1 and 1.007 for both scenarios. The load values, also in p.u., are 0.668 for the first scenario and 0.501 for the second scenario. The load and voltage values were measured at the feeder-head, while the generation values represent the active power output of a PV power plant. These cases represent the occurrence of the first bus overvoltage as the installed capacity of the PV power plants increases, and thus, they were chosen as the most critical operating points of the distribution feeder. 5.2. PVHC QUANTIFICATION RESULTS 55 5.2 PVHC QUANTIFICATION RESULTS The PVHC quantification algorithm and the DE and VS metaheuristics were implemented in Python 3.9. The py-dss-interface Python package (version 2.0.2) enables access to OpenDSS version 9.4.1.1 via DLL. All simulations were performed on a laptop running Windows 10 with an Intel®Core i7-4770 and 16 GB of RAM. The HC quantification presented in Section 4.2 determines the PVHC for a single PV power plant connection at each of the eight candidate locations. Considering that the PV power plant operates at a unity power factor and with the VVC function with the default settings recommended by the IEEE 1547 standard, whose values in p.u. are: V1 = 0.92, V2 = 0.98, V3 = 1.02, V4 = 1.08, Q1 = 1, Q2 = Q3 = 0, and Q4 = −1 (IEEE, 2018). The PVC range was from 3,000 to 14,000 kW, with increments of 100 kW. The maximum values of bus voltage and line thermal loading are the metrics considered. Figure 14a shows the maximum bus voltages when the PV power plant is operating at unity power factor for different installed capacities at each candidate location. There are three different regions: green; yellow; and red. The green region has allocation scenarios that do not exceed the threshold of the considered metric regardless of the installed capacity and location of the PV system. In the yellow region, some installed capacities are allowed in certain specific candidate locations. All allocation scenarios in the red region breach the maximum allowable voltage limit. The upper limits of the green and yellow regions are the minimum and maximum HC levels, respectively. While increasing the installed capacity from the lower bound, the first installed capacity that exceeds the performance metric threshold is known as the minimum HC. The maximum HC is the highest installed capacity that the feeder can accommodate. Note that the minimum HC level is 4,250 kW at the seventh location and the maximum HC is 9,300 kW at the fourth location. The percentages of the maximum line thermal loading for the PVC range are presented in Figure 14b. The minimum HC level is 9,850 kW at the third location, and the maximum HC is 12,900 kW at the fourth and sixth locations. Table 3 shows the distances from the substation, the maximum installed capacity for the two metrics, and the PVHC for each candidate location. Overvoltage is the main constraint to achieving a higher installed capacity in any of the eight locations. Considering both metrics, the maximum PVHC is 9,300 kW when the PV plant is positioned at the fourth location, which is the closest to the substation. The seventh location provides the lowest PVHC. In most of the candidate locations, the installed capacity of the PV power plant tends to increase as the distance from the substation decreases. As shown, the location-specific PVHC determines how much solar PV generation each candidate location can host. 56 5.2. PVHC QUANTIFICATION RESULTS Figure 14 – Minimum and maximum PVHC for one PV power plant operating at unity power factor considering as metrics the maximum values of (a) bus voltage and (b) thermal loading 4000 6000 8000 10000 12000 14000 Installed PV capacity [kW] 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 M ax im um fe ed er v ol ta ge [p .u .] 42 50 93 00 1st 2nd 3rd 4th 5th 6th 7th 8th Minimum PVHC Maximum PVC allowed (a) 4000 6000 8000 10000 12000 14000 Installed PV capacity [kW] 20 40 60 80 100 120 140 Th er m al lo ad in g [% ] 12 90 0 98 50 1st 2nd 3rd 4th 5th 6th 7th 8th Minimum PVHC Maximum PVHC (b) Source: Own elaboration. Figures 15a-15b show the maximum values of bus voltage and line loading for different installed PV capacities, considering a single PV power plant operating with the VVC settings recommended in the IEEE 1547 standard. The allowed installed capacities 5.2. PVHC QUANTIFICATION RESULTS 57 Table 3 – PVHC for every candidate location considering a single PV power plant. Location Distance Max. allowed PVC [kW] PVHC [kW][km] Max. voltage Max. line loading 1 10.267 5,350 9,900 5,350 2 9.048 6,650 12,850 6,650 3 8.091 7,150 9,850 7,150 4 6.407 9,300 12,900 9,300 5 8.009 7,450 12,800 7,450 6 10.476 5,750 12,900 5,750 7 12.529 4,250 10,050 4,250 8 7.461 8,000 12,750 8,000 Source: Own elaboration. increased in the voltage metric but decreased in the thermal overload for all locations compared to results of Table 3. This decrease in the installed capacities considering only line loading, is caused by the reactive power absorption of the PV inverter, which increases the current through the conductors. Table 4 presents the maximum installed PV capacity for the two metrics and the PVHC for each candidate location. The maximum supported PVC by the feeder is 12,450 kW at the fourth location. Therefore, the HC is increased by 33.9% compared to the PVHC when the PV power plant is operating at a unity power factor. At the 3rd and 4th locations, line loading is the main limiting metric for achieving a higher installed capacity. However, in the remaining locations, the maximum bus voltage hinders a higher PVHC. Table 4 – PVHC for every candidate location considering a single PV power plant operating with VVC settings recommended in the IEEE 1547 standard. Location Max. allowed PVC [kW] PVHC [kW]Max. voltage Max. line loading 1 7,300 9,350 7,300 2 9,500 12,150 9,500 3 10,000 9,500 9,500 4 13,300 12,450 12,450 5 10,700 12,200 10,700 6 8,250 12,100 8,250 7 5,750 9,300 5,750 8 11,450 12,200 11,450 Source: Own elaboration. 58 5.2. PVHC QUANTIFICATION RESULTS Figure 15 – Minimum and maximum PVHC for one PV power plant operating with VVC settings recommended in the IEEE 1547-2018 standard and considering as metrics the maximum values of (a) bus voltage and (b) thermal loading 4000 6000 8000 10000 12000 14000 Installed PV capacity [kW] 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 M ax im um fe ed er v ol ta ge [p .u .] 57 50 13 30 0 1st 2nd 3rd 4th 5th 6th 7th 8th Minimum PVHC Maximum PVHC (a) 4000 6000 8000 10000 12000 14000 Installed PV capacity [kW] 20 40 60 80 100 120 140 Th er m al lo ad in g [% ] 93 00 12 45 0 1st 2nd 3rd 4th 5th 6th 7th 8th Minimum PVHC Maximum PVC allowed (b) Source: Own elaboration. 5.3. TEST CASES 59 5.3 TEST CASES • Case I: The PV inverters operate at unity power factor, then the decision variables are only the PV power plants’ locations and sizes; • Case II: The PFC of the SIs is considered, and their best values are found by the optimization algorithm; • Case III: The SIVVC function is activated, and their set-points corresponding to the voltages are optimized. The reactive powers in p.u. of the Volt-VAr curve are Q1 = 1, Q2 = Q3 = 0, and Q4 = −1. The PV inverter power rating is oversized by 10% (SINV = 1.1P inst) of the installed capacity of the PV power plant to ensure that it can inject or absorb reactive power at a power factor of 0.9, even when the active power output of the PV power plant is at peak generation level. This allows for reactive power exchange with the grid up to approximately 0.46P inst (EPRI, 2018b; VARMA, 2021). The allocation of one, two, and three PV power plants is being considered for each of the test cases mentioned above. The boundaries of the X and Y coordinates are the minimum and maximum values of the coordinates for the eight candidate locations. The boundaries of the inverter’s control set-points when installing one, two, and three PV systems are shown in Table 5. The minimum installed capacity for all cases, independently of the number of PV power plants is 2,000 kW. The maximum installed capacity for a single PV power plant allocation in all test cases is 14,000 kW, while for the allocation of two and three PV power plants, it is 7,000 kW. The stopping criterion for the DE and VS metaheuristics is a predefined number of iterations. To obtain the degree of infeasibility, A = 2 × 10−3, and w1 = w2 = 0.5. The control parameters of the DE and VS algorithms were determined by a parameter tuning strategy as explained in the following subsection. Table 5 – SI control set-points’ boundaries. Limits Case II Case III pf V1 V2 V3 V4 [p.u.] Min. value 0.9 (0.999−∗) 0.92 0.96 0.96 1.05 Max. value 1 (0.9−) 0.96 1.05 1.05 1.08 *lagging power factor Source: Own elaboration. 5.4 MANUAL PARAMETER TUNING This work tuned the control parameters for the two metaheuristics. This process chose the most complex case for the parameter tuning, which involves three PV power 60 5.4. MANUAL PARAMETER TUNING plants with PV inverters operating with VVC (Case III). That test case has the highest number of decision variables, totaling 21. The parameter tuning comprises two stages. The first stage, just for the DE algorithm, concerns tuning the F and Cr control parameters, whereas the second one determines the best values of NP and iter for the DE and VS algorithms. In the first stage, NP = 10 and iter = 60 were set, and both F and Cr parameters modified in the range of [0.1, 1] with a step size of 0.1, resulting in 100 possible combinations. The final value of each (F , Cr) combination is the average of the objective function value of each final solution for five different runs. Next, it is select the combination that produced the highest mean PVHC. Figure 16 shows a heatmap of the (F , Cr) combinations for the DE. Warmer tones, such as red and orange, indicate higher mean PVHC values, while cooler tones, like dark green, represent lower PVHC. The best combination, which yielded the highest mean PVHC, was 0.5 and 0.9 for F and Cr, respectively. Figure 16 – Mean PVHC for different values of F and Cr 0.2 0.4 0.6 0.8 1.0 Cr 0. 2 0. 4 0. 6 0. 8 1. 0 F 12000 12100 12200 12300 12400 12500 12600 PV HC Source: Own elaboration. In the second stage of the parameter tuning, with the best (F , Cr) parameters for the DE algorithm found in the first stage, the following five (NP , iter) combinations were tested: (8, 100); (10, 80); (20, 40); (40, 20); and (80, 10). Table 6 displays the mean PVHC for ten runs of each (NP , iter) combination for the DE and VS algorithms. The (10, 80) combination reached the highest mean objective function value for DE algorithm whereas for the VS algorithm the (40, 20) combination had the highest mean PVHC. In 5.5. TEST CASES’ RESULTS 61 Table 6 – Results for the five (NP , iter) combinations NP iter Mean PVHC [kW] DE VS 8 100 12,452.69 12,475.82 10 80 12,488.56 12,484.38 20 40 12,452.6 12,481.86 40 20 12,373.36 12,490.42 80 10 12,246.66 12,454.64 Source: Own elaboration. the DE, from the (10, 80) combination, as the population number increases, the mean PVHC decreases. 5.5 TEST CASES’ RESULTS To obtain results for the three test cases, the VS was run 20 times, and the best solution, i.e., the one with the maximum objective function value, was then chosen. As we will see further ahead, the VS algorithm provides a better mean PVHC, and the solutions are less dispersed about the mean value. Table 7 shows the results for Case I for two and three PV systems. The highest PVHC occurs when two PV systems are installed at the fourth and eighth locations. Table 7 – Best results of Case I for two, and three PV power plants. PV power Location/Size [kW] PVHC plants PV #1 PV #2 PV #3 [kW] Two 4/7,000 8/5,482 − 12,482 Three 1/2,019 4/6,880 6/2,036 10,935 Source: Own elaboration. Table 8 presents the results of Case II. Three PV systems connected at the first, second, and fourth locations reach the highest PVHC of 12,378 kW. When installing three PV power plants, the PV systems installed at the first and fourth locations have lagging power factors. Table 8 – Best results of Case II for one, two, and three PV power plants. PV power Location/Size [kW]/pf PVHC plants PV #1 PV #2 PV #3 [kW] One 4/10,949/0.942− − − 10,949 Two 1/5,876/0.958− 6/6,353/0.998 − 12,229 Three 1/2,937/0.924− 2/6,342/0.997 4/3,099/0.979− 12,378 Source: Own elaboration. Table 9 displays the results for Case III. When the VVC function of the PV inverters is turned on, the maximum PVHC is obtained by connecting two PV systems at the fourth 62 5.5. TEST CASES’ RESULTS and eighth locations. Comparing all test cases, the maximum PVHC is 12,642 kW when two PV power plants are installed and their SIs operate with the VVC function. Table 9 – Best results of Case III for one, two, and three PV power plants. PV power Location/Size [kW]/(V1; V2; V3; V4) [p.u.] PVHC plants PV #1 PV #2 PV #3 [kW] One 4/12,539/ − − 12,539(0.9493; 1.0498; 1.045; 1.0756) Two 4/5,679/ 8/6,963/ − 12,642(0.9309; 1.0087; (0.9546; 0.9926; 1.0421; 1.0793) 1.0408; 1.0501) Three 3/3,475/ 4/2,073/ 5/7,000/ 12,548(0.9228; 0.9603; (0.9204; 0.9777; (0.9316; 0.9702; 1.0276; 1.0705) 1.0041; 1.0686) 1.0439; 1.0635) Source: Own elaboration. Figure 17 presents three VVC curves: two correspond to PV inverters at the fourth and eighth locations of the best run and solution for Case III (PVHC = 12, 642 kW), while the third represents the IEEE 1547 standard for DER category B. The VVC curve of the SI at the fourth location (in maroon) has the narrowest deadband, measuring 0.0334 p.u. The V3 values of the inverters at the fourth and eighth locations are similar, approximately 1.041 p.u. Figure 17 – VVC curves of the PV inverters at fourth and eighth locations 0.92 0.94 0.96 0.98 1.00 1.02 1.04 1.06 1.08 Voltage [p.u.] 0.4 0.3 0.2 0.1 0.0 0.1 0.2 0.3 0.4 Re ac tiv e po we r [ p. u. ] IEEE 1547 category B Set-points at 4th location Set-points at 8th location Source: Own elaboration. 5.5. TEST CASES’ RESULTS 63 In Table 10, the performance of the two metaheuristic algorithms is presented considering the best, worst, mean, and standard deviation of the objective function. Both algorithms were executed 50 times on the most complex case (i.e., three PV systems in Case III). The results show that the VS outperforms DE in three of the four metrics analyzed, except for the best PVHC, because the DE algorithm achieves a slightly higher best PVHC. Table 10 – Performance metrics for the DE and VS algorithms. Algorithm PVHC [kW] Mean LocationsMean Best Worst Std. Dev. runtime [s] DE 11,991.18 12,562.84 9,415.26 645.37 476 4th, 6th, and 8th VS 12,401.43 12,547.89 12,105.14 105.38 432 3th, 4th, and 5th Source: Own elaboration. The values of the objective function for the best solutions over the iterations of the best run for both the DE and VS algorithms are presented in Figure 18. These values of the objective function correspond to those in Case III, considering three PV power plants. DE demonstrated improvement until iteration #33, and after that iteration, the objective function value stabilized. The VS algorithm exhibits variation in the objective function value un