IDEAS home Printed from https://ideas.repec.org/a/eee/energy/v306y2024ics0360544224022369.html

Optimal active and reactive energy management for a smart microgrid system under the Moroccan grid pricing code

Author

Listed:
  • Gheouany, Saad
  • Ouadi, Hamid
  • El Bakali, Saida

Abstract

This article presents an innovative active and reactive energy management system (AR-EMS) specifically designed for residential buildings in Morocco, seamlessly integrated with a Smart Microgrid (SMG) and the Electrical Power Grid (EPG) supplier. The considered SMG incorporates a Photovoltaic system (PV) and an Energy Storage System (ESS). In Morocco, the EPG utilizes a Range Tariff System (RTS), where the tariff structure depends on the total energy consumed at the end of each month. Hence, the proposed AR-EMS is designed to computes optimal active and reactive power setpoints of each source at 15-minute intervals for the next 30 days, based on forecasts of energy consumption and PV power production. The AR-EMS consists of two distinct layers: the Long-Term Optimization Layer (LTOL) and the Short-Term Optimization Layer (STOL). The LTOL focuses on optimizing active and reactive power flow over an extended time horizon of 30 days, relying on forecasted data. In contrast, the STOL involves short-term forecasting and energy optimization over the next 24-hour horizon, addressing the LTOL forecasting uncertainties. The proposed strategy emphasizes a multi-objective problem aiming at minimizing both active and reactive energy bill, ESS degradation cost, Peak-to-Average Ratio (PAR) and carbon emissions. The considered problem is solved using a metaheuristic algorithm, specifically the Lexicographic approach within the Particle Swarm Optimization (PSO) method. To validate the effectiveness of the proposed approach, two comparative analyses are conducted. The first involves the impact of time horizons on the energy cost and the management performances within the Moroccan context. The second comparison, highlights the benefits and shortfalls of using simultaneous active and reactive power management, comparing it with a system exclusively managing active power (A-EMS). Both compared strategies are evaluated using the Moroccan tariff RTS and real world data. The comparative analysis highlights the advantages of the proposed AR-EMS, demonstrating benefits in terms of active and reactive energy bill reduction by 58.9% and 83.2%, respectively, and showcases a 49.3% reduction in carbon emissions while improving the EPG power factor by 6% compared to A-EMS, In conclusion, the optimization results are encouraging the Moroccan government to further develop the installation of SMGs.

Suggested Citation

  • Gheouany, Saad & Ouadi, Hamid & El Bakali, Saida, 2024. "Optimal active and reactive energy management for a smart microgrid system under the Moroccan grid pricing code," Energy, Elsevier, vol. 306(C).
  • Handle: RePEc:eee:energy:v:306:y:2024:i:c:s0360544224022369
    DOI: 10.1016/j.energy.2024.132462
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0360544224022369
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.energy.2024.132462?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to

    for a different version of it.

    References listed on IDEAS

    as
    1. Hasanien, Hany M. & Alsaleh, Ibrahim & Tostado-Véliz, Marcos & Zhang, Miao & Alateeq, Ayoob & Jurado, Francisco & Alassaf, Abdullah, 2024. "Hybrid particle swarm and sea horse optimization algorithm-based optimal reactive power dispatch of power systems comprising electric vehicles," Energy, Elsevier, vol. 286(C).
    2. Zhu, Xu & Sun, Yuanzhang & Yang, Jun & Dou, Zhenlan & Li, Gaojunjie & Xu, Chengying & Wen, Yuxin, 2022. "Day-ahead energy pricing and management method for regional integrated energy systems considering multi-energy demand responses," Energy, Elsevier, vol. 251(C).
    3. Guo, Tianyu & Guo, Qi & Huang, Libin & Guo, Haiping & Lu, Yuanhong & Tu, Liang, 2023. "Microgrid source-network-load-storage master-slave game optimization method considering the energy storage overcharge/overdischarge risk," Energy, Elsevier, vol. 282(C).
    4. Hassaballah, E.G. & Keshta, H.E. & Abdel-Latif, K.M. & Ali, A.A., 2024. "A novel strategy for real-time optimal scheduling of grid-tied microgrid considering load management and uncertainties," Energy, Elsevier, vol. 299(C).
    5. Jiang, Tao & Dong, Xinru & Zhang, Rufeng & Li, Xue, 2023. "Strategic active and reactive power scheduling of integrated community energy systems in day-ahead distribution electricity market," Applied Energy, Elsevier, vol. 336(C).
    6. Chaduvula, Hemanth & Das, Debapriya, 2023. "Analysis of microgrid configuration with optimal power injection from grid using point estimate method embedded fuzzy-particle swarm optimization," Energy, Elsevier, vol. 282(C).
    7. Alharbi, Abdullah G. & Olabi, A.G. & Rezk, Hegazy & Fathy, Ahmed & Abdelkareem, Mohammad Ali, 2024. "Optimized energy management and control strategy of photovoltaic/PEM fuel cell/batteries/supercapacitors DC microgrid system," Energy, Elsevier, vol. 290(C).
    8. Elkazaz, Mahmoud & Sumner, Mark & Naghiyev, Eldar & Pholboon, Seksak & Davies, Richard & Thomas, David, 2020. "A hierarchical two-stage energy management for a home microgrid using model predictive and real-time controllers," Applied Energy, Elsevier, vol. 269(C).
    9. Zheng, Siqian & Jin, Xin & Huang, Gongsheng & Lai, Alvin CK., 2022. "Coordination of commercial prosumers with distributed demand-side flexibility in energy sharing and management system," Energy, Elsevier, vol. 248(C).
    10. Suryakiran, B.V. & Nizami, Sohrab & Verma, Ashu & Saha, Tapan Kumar & Mishra, Sukumar, 2023. "A DSO-based day-ahead market mechanism for optimal operational planning of active distribution network," Energy, Elsevier, vol. 282(C).
    11. Carvalho, Diego B. & Bortoni, Edson da C., 2024. "Proposed model with weighted parameters for microgrid management: Incorporating diverse load profiles, assorted tariff policies, and energy storage devices," Energy, Elsevier, vol. 296(C).
    12. Kassab, Fadi Agha & Celik, Berk & Locment, Fabrice & Sechilariu, Manuela & Liaquat, Sheroze & Hansen, Timothy M., 2024. "Optimal sizing and energy management of a microgrid: A joint MILP approach for minimization of energy cost and carbon emission," Renewable Energy, Elsevier, vol. 224(C).
    13. Garg, Harish, 2016. "A hybrid PSO-GA algorithm for constrained optimization problems," Applied Mathematics and Computation, Elsevier, vol. 274(C), pages 292-305.
    14. Bian, Yifan & Xie, Lirong & Ye, Jiahao & Ma, Lan & Cui, Chuanshi, 2024. "Peer-to-peer energy sharing model considering multi-objective optimal allocation of shared energy storage in a multi-microgrid system," Energy, Elsevier, vol. 288(C).
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Gheouany, Saad & Ouadi, Hamid & Bakali, Saida El, 2025. "Experimental and comparative study on optimal Active and Reactive Energy Management in microgrid: Moroccan VS Time of Use Tariff," Renewable and Sustainable Energy Reviews, Elsevier, vol. 212(C).
    2. Celik, Berk & Kassab, Fadi Agha & Locment, Fabrice & Sechilariu, Manuela & Hansen, Timothy M., 2026. "Regional insights in microgrid planning: Combined optimal energy management and sizing across French cities," Mathematics and Computers in Simulation (MATCOM), Elsevier, vol. 241(PA), pages 260-280.
    3. Duan, Yuge & Wang, Xiaojun & Si, Fangyuan & Liu, Zhao & Zhang, Ning & Wang, Peng & Ge, Lukun & Wang, Zhishuang, 2026. "Assessing the maximum carbon reduction potential of regional power grids from grid operators' perspective," Applied Energy, Elsevier, vol. 409(C).
    4. Omid Pedram & Ana Soares & Pedro Moura, 2025. "A Review of Methodologies for Photovoltaic Energy Generation Forecasting in the Building Sector," Energies, MDPI, vol. 18(18), pages 1-51, September.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Gheouany, Saad & Ouadi, Hamid & Bakali, Saida El, 2025. "Experimental and comparative study on optimal Active and Reactive Energy Management in microgrid: Moroccan VS Time of Use Tariff," Renewable and Sustainable Energy Reviews, Elsevier, vol. 212(C).
    2. Saleem, M.I. & Saha, S. & Izhar, U. & Ang, L., 2024. "Bi-Layer Model Predictive Control strategy for techno-economic operation of grid-connected microgrids," Renewable Energy, Elsevier, vol. 236(C).
    3. Mohtavipour, Seyed Saeid, 2024. "Convex relaxation of two-stage network-constrained stochastic programming for CHP microgrid optimal scheduling," Energy, Elsevier, vol. 308(C).
    4. Hussein, Noon & Musilek, Petr, 2025. "Enhancing fairness and efficiency in community energy systems: A forecast-driven approach," Energy, Elsevier, vol. 335(C).
    5. Ma, Dazhong & Tong, Xin & Ming, Zhongyang & Sun, Qiuye, 2025. "Multi-objective energy management of community microgrids based on integrated electricity-carbon pricing," Energy, Elsevier, vol. 335(C).
    6. Wang, Chunling & Liu, Chunming & Zhou, Xiulin & Zhang, Gaoyuan, 2024. "Flexibility-based expansion planning of active distribution networks considering optimal operation of multi-community integrated energy systems," Energy, Elsevier, vol. 307(C).
    7. Fang, Debin & Wang, Pengyu, 2023. "Optimal real-time pricing and electricity package by retail electric providers based on social learning," Energy Economics, Elsevier, vol. 117(C).
    8. Fan, Wei & Tan, Zhongfu & Li, Fanqi & Zhang, Amin & Ju, Liwei & Wang, Yuwei & De, Gejirifu, 2023. "A two-stage optimal scheduling model of integrated energy system based on CVaR theory implementing integrated demand response," Energy, Elsevier, vol. 263(PC).
    9. Shahcheraghi, Hadi & Nazar, Mehrdad Setayesh & Javadi, Mohammad Sadegh & Catalão, João P.S., 2025. "Operational scheduling of integrated multi-carrier energy system considering transactive microgrids energy and flexibility contributions," Energy, Elsevier, vol. 335(C).
    10. Ali, Liaqat & Azim, M. Imran & Peters, Jan & Pashajavid, Ehsan, 2024. "Expediting battery investment returns for residential customers utilising spot price-aware local energy exchanges," Energy, Elsevier, vol. 306(C).
    11. Xu Wu & Xiaojing Shen & Chuanjiang Wei & Xinmin Xie & Jianshe Li, 2024. "A Hybrid Particle Swarm Optimization-Genetic Algorithm for Multiobjective Reservoir Ecological Dispatching," Water Resources Management: An International Journal, Published for the European Water Resources Association (EWRA), Springer;European Water Resources Association (EWRA), vol. 38(6), pages 2229-2249, April.
    12. Xie, Xuan & Pan, Zihao & Yin, Bifeng & Yang, Liyu & Shi, Rui & Tan, Guirong, 2025. "Design and assessment of V2G systems for hybrid vehicles based on fuel cells, power batteries and photovoltaic cells," Energy, Elsevier, vol. 334(C).
    13. Ren, Xin-Yu & Cai, Xulong & Wei, Bingcai & Ma, Wanqi, 2026. "Collaborative optimization operation strategy of integrated energy system considering integrated demand response: A Stackelberg game and improved Runge Kutta optimizer," Energy, Elsevier, vol. 344(C).
    14. Sifat, Md. Mhamud Hussen & Choudhury, Safwat Mukarrama & Das, Sajal K. & Pota, Hemanshu & Yang, Fuwen, 2025. "Novel abstractions and experimental validation for digital twin microgrid design: Lab scale studies and large scale proposals," Applied Energy, Elsevier, vol. 377(PC).
    15. Han, Fengwu & Zeng, Jianfeng & Lin, Junjie & Zhao, Yunlong & Gao, Chong, 2023. "A stochastic hierarchical optimization and revenue allocation approach for multi-regional integrated energy systems based on cooperative games," Applied Energy, Elsevier, vol. 350(C).
    16. Liu, Zhi-Feng & Luo, Xing-Fu & Hou, Xiao-Xin & Yu, Jia-Li & Li, Ji-Xiang, 2025. "Generalized energy pool-driven regional integrated energy system dispatch considering multi-time scale synergy carbon-storage game," Renewable and Sustainable Energy Reviews, Elsevier, vol. 217(C).
    17. Qiuyi Hong & Fanlin Meng & Jian Liu, 2023. "Customised Multi-Energy Pricing: Model and Solutions," Energies, MDPI, vol. 16(4), pages 1-31, February.
    18. Lin, Wen-Ting & Guo, Qitao & Jia, Tao & Li, Chaojie & Zhou, Xiaojun & Li, Jueyou & Ming, Tingzhen, 2026. "Hydrogen–energy–carbon coupled pricing for integrated energy systems: Stackelberg game and robust demand response under renewable uncertainty," Renewable Energy, Elsevier, vol. 260(C).
    19. Ma, Huan & Sun, Qinghan & Chen, Qun & Zhao, Tian & He, Kelun, 2023. "Exergy-based flexibility cost indicator and spatio-temporal coordination principle of distributed multi-energy systems," Energy, Elsevier, vol. 267(C).
    20. Li, Bin & Wu, Zhangxi & Li, Ye & He, Jiawei & Wang, Bowen & Jiao, Kui & Hu, Xinhang & Fan, Hui & Wu, Jianzhong, 2025. "Thermal-water-electrical coupling modeling of PEMFC and its dynamic performance analysis under different operating conditions," Applied Energy, Elsevier, vol. 398(C).

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:eee:energy:v:306:y:2024:i:c:s0360544224022369. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Catherine Liu (email available below). General contact details of provider: http://www.journals.elsevier.com/energy .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.