Real-Time Fuzzy Logic Based Energy Management System for Microgrid Using Hardware in the Loop
Abstract
:1. Introduction
1.1. General Context and Motivation
- Generating a defined set of criteria and specifications that can be used by the researchers involved;
- The ability to simulate complex systems under normal operating conditions as well as under extreme conditions;
- Investigating the behavior of a system with regard to faults and defects in a simulated model, which is much safer and less expensive than testing on real hardware.
1.2. Related Works
1.3. Contribution and Paper Organization
- Develop Local Controllers (LCs), each of which is associated with an energy source or a storage system. The PV LC is responsible for maximizing the power extracted using Maximum Power Point Tracking (MPPT) techniques. The battery’s LC maintains the voltage at the load bus, regardless of fluctuations in weather conditions or consumption.
- Design a Central Controller (CC) to ensure coordination between the various LCs, while implementing adequate communication. Fuzzy logic is employed to provide quality voltage and frequency and guarantee the load and power supply balance within the microgrid.
- Stabilize the microgrid under all possible operating conditions (normal and faulty)
- Establish HIL test based on the Simulink platform and RT-LAB real-time simulator to validate the hierarchical control. OP4150 is used as a digital simulator in this study.
- Check the HIL results for compliance with IEEE 1547 and ICE 617227 standards, which regulate the performance of the microgrid.
2. Microgrid Model
2.1. PV Model
2.2. WT Model
2.3. Battery Model
3. MG Hierarchical Control
- Control the boost converter to extract the maximum of power from DGs using the perturb-and-observe (P&O) algorithm.
- Limit the WT speed using a PI regulator.
- Regulate the AC voltage and frequency.
- Extend the longevity of the batteries by avoiding repeated cycles of deep charging and discharging.
- Control the bidirectional converter in order to maintain the desired voltage on the DC bus.
3.1. Local Control
3.1.1. PV Local Controller
3.1.2. WT Local Controller
3.1.3. Battery Local Controller
- Either the reference is derived from a voltage regulation loop,
- Or it is provided by a central controller (EMS).
3.2. Central Control
3.2.1. FLC Design
- The priority is to supply loads through DGs.
- Battery life can be preserved by keeping the SoC between 20% and 80% and avoiding overcharging or overdischarging.
- Both the frequency and the voltage have to be kept within a margin that is equivalent to and , respectively.
3.2.2. Management Algorithm
- If the DGs are producing more power than is being used (), and batteries are charged (), the reference power of the batteries must be zero. In this case, the dump load will be turned on. Otherwise, the batteries would have already started charging with an amount of energy equal to = < 0.
- If the energy supplied by the DGs is insufficient to meet demand and the batteries are empty, the loads are immediately disconnected, and the reference power of the batteries is set to zero. In any other case, batteries would have begun discharging ( = 0).
- Batteries are disconnected when the DGs can individually supply the load.
3.2.3. Functioning Modes
- M1 (000): all relays are turned off if there is no energy demand, or if there is a power shortage and the batteries are completely drained (.
- M2 (010): energy is dissipated through the dump load if there is a substantial amount of surplus energy and the batteries are fully charged, but instead, there is no energy demand.
- M3 (011): loads are first supplied then the energy surplus is dissipated if the production is high and batteries are fully charged (.
- M4 (100): batteries are partially charged if the consumption is weak but the production is high. Midnight, when wind resources are at their peak but demand is low, is an appropriate moment to switch to this mode.
- M5 (101): batteries supplement DGs to supply loads, when demand exceeds generation.
4. Results and HIL Test
4.1. Scenario Description
4.2. Test 1—Local Controllers
4.3. Test 2—Central Controller
4.4. Test 3—Microgrid Performances under Faulty Conditions
- When , the maximum allowable trip time is 0.1 s.
- When , the maximum allowable trip time is 2 s.
- When , the maximum allowable trip time is 2 s.
- When , the maximum allowable trip time is 0.16 s.
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- IEA—International Energy Agency. Available online: https://www.iea.org/ (accessed on 25 January 2022).
- A Sense of Units and Scale for Electrical Energy Production and Consumption. Available online: https://ourworldindata.org/scale-for-electricity (accessed on 25 January 2022).
- WHO—World Health Organization. Available online: https://www.who.int/ (accessed on 25 January 2022).
- Rouzbahani, H.M.; Karimipour, H.; Lei, L. Optimizing scheduling policy in smart grids using probabilistic Delayed Double Deep Q-Learning (P3DQL) algorithm. Sustain. Energy Technol. Assess. 2022, 53, 102712. [Google Scholar] [CrossRef]
- Olatomiwa, L.; Mekhilef, S.; Ismail, M.S.; Moghavvemi, M. Energy management strategies in hybrid renewable energy systems: A review. Renew. Sustain. Energy Rev. 2016, 62, 821–835. [Google Scholar] [CrossRef]
- Kalogirou, S.A. Artificial neural networks in renewable energy systems applications: A review. Renew. Sustain. Energy Rev. 2001, 5, 373–401. [Google Scholar] [CrossRef]
- Zadeh, L.A.; Aliev, R.A. Fuzzy Logic Theory and Applications: Part I and Part II; World Scientific: Singapore, 2018; ISBN 978-981-323-817-6. [Google Scholar]
- Li, F.; Wang, Y.; Wu, F.; Huang, Y.; Liu, Y.; Zhang, X.; Ma, M. Review of Real-time Simulation of Power Electronics. J. Mod. Power Syst. Clean Energy 2020, 8, 796–808. [Google Scholar] [CrossRef]
- Yahyaoui, I.; Sallem, S.; Kamoun, M.B.A.; Tadeo, F. A proposal for off-grid photovoltaic systems with non-controllable loads using fuzzy logic. Energy Convers. Manag. 2014, 78, 835–842. [Google Scholar] [CrossRef]
- El Zerk, A.; Ouassaid, M.; Zidani, Y. Energy management based fuzzy logic control of hybrid system wind/photovoltaic with batteries. In Proceedings of the 2018 Renewable Energies, Power Systems Green Inclusive Economy (REPS-GIE), Casablanca, Morocco, 23–24 April 2018; pp. 1–6. [Google Scholar]
- Roumila, Z.; Rekioua, D.; Rekioua, T. Energy management based fuzzy logic controller of hybrid system wind/photovoltaic/diesel with storage battery. Int. J. Hydrogen Energy 2017, 42, 19525–19535. [Google Scholar] [CrossRef]
- Chellakhi, A.; El Beid, S.; Abouelmahjoub, Y. An Advanced MPPT Scheme for PV Systems Application with Less Output Ripple Magnitude of the Boost Converter. Int. J. Photoenergy 2022, 2022, e2133294. [Google Scholar] [CrossRef]
- Kraiem, H.; Flah, A.; Mohamed, N.; Messaoud, M.H.B.; Al-Ammar, E.A.; Althobaiti, A.; Alotaibi, A.A.; Jasiński, M.; Suresh, V.; Leonowicz, Z.; et al. Decreasing the Battery Recharge Time if Using a Fuzzy Based Power Management Loop for an Isolated Micro-Grid Farm. Sustainability 2022, 14, 2870. [Google Scholar] [CrossRef]
- Cabrane, Z.; Ouassaid, M.; Maaroufi, M. Analysis and evaluation of battery-supercapacitor hybrid energy storage system for photovoltaic installation. Int. J. Hydrogen Energy 2016, 41, 20897–20907. [Google Scholar] [CrossRef]
- Roy, B.; Adhikari, S.; Datta, S.; Lalngaihawma, S.; Samanta, S. Real-Time Simulation of a Wind-Solar-Battery Based Microgrid System. J. Electr. Eng. Technol. 2022. [Google Scholar] [CrossRef]
- Han, Y.; Zhang, G.; Li, Q.; You, Z.; Chen, W.; Liu, H. Hierarchical energy management for PV/hydrogen/battery island DC microgrid. Int. J. Hydrogen Energy 2019, 44, 5507–5516. [Google Scholar] [CrossRef]
- EL ZERK, A.; Ouassaid, M.; Zidani, Y. An Energy Management Strategy for Isolated Microgrids and Performance Analysis under Steady-State and Fault Conditions. Int. J. Renew. Energy Res. (IJRER) 2021, 11, 1892–1904. [Google Scholar]
- Bellia, H.; Youcef, R.; Fatima, M. A detailed modeling of photovoltaic module using MATLAB. NRIAG J. Astron. Geophys. 2014, 3, 53–61. [Google Scholar] [CrossRef] [Green Version]
- Tsai, H.-L.; Tu, C.-S.; Su, Y.-J. Development of Generalized Photovoltaic Model Using MATLAB/SIMULINK. In Proceedings of the World Congress on Engineering and Computer Science, San Francisco, CA, USA, 22–24 October 2008; pp. 1–6. [Google Scholar]
- Errami, Y.; Ouassaid, M.; Maaroufi, M. Control of a PMSG based Wind Energy Generation System for Power Maximization and Grid Fault Conditions. Energy Procedia 2013, 42, 220–229. [Google Scholar] [CrossRef] [Green Version]
- Petru, T.; Thiringer, T. Modeling of wind turbines for power system studies. IEEE Trans. Power Syst. 2002, 17, 1132–1139. [Google Scholar] [CrossRef] [Green Version]
- Cavallo, A.; Canciello, G.; Guida, B. Energy Storage System Control for Energy Management in Advanced Aeronautic Applications. Math. Probl. Eng. 2017, 2017, e4083132. [Google Scholar] [CrossRef] [Green Version]
- Hlaili, M.; Mechergui, H. Comparison of Different MPPT Algorithms with a Proposed One Using a Power Estimator for Grid Connected PV Systems. Int. J. Photoenergy 2016, 2016, e1728398. [Google Scholar] [CrossRef] [Green Version]
- Kumar, D.; Chatterjee, K. A review of conventional and advanced MPPT algorithms for wind energy systems. Renew. Sustain. Energy Rev. 2016, 55, 957–970. [Google Scholar] [CrossRef]
- Serna-Garcés, S.I.; González Montoya, D.; Ramos-Paja, C.A. Control of a Charger/Discharger DC/DC Converter with Improved Disturbance Rejection for Bus Regulation. Energies 2018, 11, 594. [Google Scholar] [CrossRef] [Green Version]
- Zadeh, L.A. Fuzzy sets. Inf. Control 1965, 8, 338–353. [Google Scholar] [CrossRef] [Green Version]
- Zerk, A.E.; Ouassaid, M.; Zidani, Y. Feasibility Study and Optimization of a Standalone Hybrid System for Remote Area: A Case Study of High Atlas Mountains in Morocco. In Proceedings of the 2018 IEEE 5th International Congress on Information Science and Technology (CiSt), Marrakech, Morocco, 21–27 October 2018; pp. 606–611. [Google Scholar]
- 1547-2018—IEEE Standard for Interconnection and Interoperability of Distributed Energy Resources with Associated Electric Power Systems Interfaces|IEEE Standard|IEEE Xplore. Available online: https://ieeexplore.ieee.org/document/8332112 (accessed on 25 January 2022).
- IEC 61727:2004|IEC Webstore|Invertor, Smart City, LVDC. Available online: https://webstore.iec.ch/publication/5736 (accessed on 25 January 2022).
Mode | |||
---|---|---|---|
0 | 0 | 0 | |
0 | 1 | 0 | |
1 | 0 | 0 | |
1 | 0 | 1 | |
0 | 1 | 1 |
Frequency | |
---|---|
Xilinx FPGA KintexTM-7 325T | up to 200 kHz, resolution 5 ns |
PV converters | 20 kHz |
Battery converter | 10 kHz |
Healthy Regime | Faulty Regime | |
Response time | 0.06 s | 0.2 s |
Frequency variation | ±0.005 Hz | ±0.085 Hz |
Voltage variation | ±0.9% | ±28% |
Clearing time | 0.03 s | 0.153 s |
THD | 0.31% | 4% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
El Zerk, A.; Ouassaid, M. Real-Time Fuzzy Logic Based Energy Management System for Microgrid Using Hardware in the Loop. Energies 2023, 16, 2244. https://doi.org/10.3390/en16052244
El Zerk A, Ouassaid M. Real-Time Fuzzy Logic Based Energy Management System for Microgrid Using Hardware in the Loop. Energies. 2023; 16(5):2244. https://doi.org/10.3390/en16052244
Chicago/Turabian StyleEl Zerk, Abdallah, and Mohammed Ouassaid. 2023. "Real-Time Fuzzy Logic Based Energy Management System for Microgrid Using Hardware in the Loop" Energies 16, no. 5: 2244. https://doi.org/10.3390/en16052244
APA StyleEl Zerk, A., & Ouassaid, M. (2023). Real-Time Fuzzy Logic Based Energy Management System for Microgrid Using Hardware in the Loop. Energies, 16(5), 2244. https://doi.org/10.3390/en16052244