Method and system for energy management and optimization

By using the self-learning and dynamic load optimization of the energy management system, the problem of low load management efficiency in microgrids is solved, achieving efficient and rapid load optimization and inverter protection, and simplifying the maintenance process.

CN120958680APending Publication Date: 2025-11-14SOL ARK LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480023795.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-01
Filing Date
2024-02-06
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

In existing technologies, load management and energy optimization methods for microgrids are inefficient, manual operation is time-consuming and dangerous, it is difficult to avoid inverter overload and shutdown, and there is a lack of effective load prioritization and adaptive control.

Method used

An energy management system is adopted, including relay boards, microgrid interconnection devices, control boards and microcontroller units. Through self-learning load profiles, it dynamically manages power supply and load, optimizes load priority, prevents inverter overload, and achieves fast-response energy routing and load management.

Benefits of technology

It improves the load management efficiency of microgrids, reduces the possibility of inverter overload and shutdown, achieves efficient load optimization and fast-response energy management, and simplifies the maintenance and upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120958680A_ABST
    Figure CN120958680A_ABST
Patent Text Reader

Abstract

Examples described herein relate to energy management and optimization. An energy management system may monitor a microgrid using sensors associated with a utility grid, one or more power sources, and one or more load devices. The energy management system may determine one or more load profiles corresponding to one or more load devices based on measurements from the sensors. The energy management system may determine a priority order of the one or more load devices based on user input or availability of the one or more power sources. The energy management system may then dynamically connect and disconnect the one or more power sources from the one or more load devices based on utility grid conditions, available power from the one or more power sources, the one or more load profiles, and a priority order of the one or more load devices.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-references to related applications

[0002] This application claims priority to U.S. Provisional Patent Application No. 63 / 483,526, filed February 6, 2023, entitled “SELF LEARNING LOAD MANAGEMENT,” and U.S. Provisional Patent Application No. 63 / 487,754, filed March 1, 2023, entitled “HOME ENERGYSOURCE ROUTER AND LOAD OPTIMIZER,” the entire contents of which are incorporated herein by reference for all purposes. Background Technology

[0003] Distributed energy sources (DERs) (such as rooftop solar panels, batteries, and fossil fuel generators) are transforming the power grid, particularly how electricity is generated, transmitted, and consumed. DERs can be installed to provide power to load devices in specific areas, such as neighborhoods, factories, buildings, or homes. DERs and load devices at a given location can form a microgrid. A microgrid can be connected to the public grid to draw power from or supply power to the public grid. A microgrid can also be disconnected from and operate independently of the public grid. Despite advances in energy management, there remains a need in the field for improved methods and systems related to load management and energy optimization. Summary of the Invention

[0004] This invention generally relates to methods and systems for managing loads and power sources in microgrid systems. More specifically, embodiments of the invention relate to an energy management system that can be used to optimize electrical loads and route energy from power sources in a microgrid, such as a home energy grid. The invention can also be applied beyond the home and can be used in other residential, commercial, or industrial environments where multiple power sources can be installed to supply power to multiple loads.

[0005] Some examples described herein relate to an energy management system that may include one or more relay boards, microgrid interconnection device (MID) boards, control boards, batteries, neutral point forming transformers (NFTs), and one or more microcontroller units (MCUs). The energy management system can communicate with and manage various power sources and loads within the microgrid. Power sources may include solar panels connected to the microgrid, batteries with integrated or separate inverters, and backup generators. The microgrid may also be connected to or disconnected from the public grid. The energy management system can be tailored for a specific microgrid to optimize loads and power sources and provide efficient backup energy with fast response times in different scenarios. The energy management system can learn load profiles for individual loads and add or remove loads based on these profiles to avoid overloading the inverters connected to solar panels and / or battery energy storage systems (BESS). In learning mode, the energy management system can learn peak and steady-state loads in the microgrid at predetermined time intervals (e.g., weekly, bi-weekly, monthly, and seasonally) and use this information to generate load profiles. Machine learning models can also be used to generate load profiles, including peak loads, steady-state loads, etc. In execution mode, the energy management system can add or remove loads based on load profiles, load priorities, grid conditions, and / or messages from the grid operator. The energy management system described in this paper reduces the likelihood of the inverter becoming overloaded, which in turn reduces the likelihood of the inverter being shut down. Through this process, load and power supply in microgrids or other microgrids can be optimized.

[0006] One or more relay boards include relay switches operable to connect a load or source to or disconnect a load or source from the microgrid. In some examples, the energy management system can monitor relay temperature to detect relay degradation or failure. The temperature associated with a relay can reflect its impedance. The higher the temperature, or the higher the temperature rise, the higher the relay's impedance is likely to be, which can indicate that the relay contacts are deteriorating. If the relay temperature rises above a predetermined threshold, it can indicate an abnormal condition in the relay: degradation or impending failure. The energy management system can determine that the relay temperature meets or exceeds the predetermined threshold and, in response, generate an alarm message and transmit it to the user or operator associated with the microgrid to perform certain mitigation measures. The energy management system can also generate control messages to disconnect or isolate the relay switch.

[0007] In some examples, the relay board is a modular board that can be easily added to or removed from the energy management system. The relay and sensing board can include a fixed number (e.g., four) of relay switches. If one relay switch on the relay board fails, a spare relay and current sensing channel can be used, or the entire relay board can be quickly and easily replaced. This simplifies the maintenance and upgrade process. Individual relay channels can include voltage, current, and temperature monitoring.

[0008] In some examples, energy management systems may employ zero-crossing switching, which prevents arcing. Since arcing can cause pitting in relays (e.g., damaging relay contacts), preventing such arcing helps extend relay life. Zero-crossing switching can involve turning a relay on or off when the current or voltage is zero or nearly zero. However, because relays cannot turn on and off instantaneously, coordinating relay switching with zero-crossing can be difficult. Instead, they may take a small amount of time to turn on or off, and this small amount of time is variable. As relays age, their springs may loosen over time, which can also cause the closing or opening time of the relay switch to change (e.g., become slower). In some cases, it may take 0.25–2.560 Hz cycles from the time the signal to turn the relay switch on or off to the time it takes to do so. Meanwhile, for inductive or capacitive loads, the current and voltage are out of phase. To address these and other challenges, in some examples, energy management systems may implement automatic calibration algorithms that predict in advance how far the signal to coordinate the relay's opening / closing with the zero-crossing opening / closing signal is needed. This helps ensure that, as relays age and their switching times change, they can still open / close in full synchronization with zero crossings to avoid arcing.

[0009] In some examples, energy management systems may include current sensors coupled to relay switches to measure current in the corresponding connected load circuit or power supply. In some cases, current sensors (such as Hall effect current sensors) are more accurate at higher temperatures. If the ambient temperature of the current switch is below 25°C, especially in cold regions, the current sensor may not operate accurately. At 25°C or above, the higher the ambient temperature, the higher the accuracy level can be, up to an upper limit where the current sensor is damaged. Some examples utilize these principles to optimize the placement of the current sensor. For example, the current sensor can be placed closer to the relay and heated by the heat generated at the relay switch, especially in cold regions, but not so close as to damage the current sensor. The optimal distance between the current sensor and the connected relay switch can be determined based on climate data and the thermal trends of the connected relay switch.

[0010] The energy management system automatically detects the deterioration of the health of its internal backup battery. This internal battery in the energy management system is operable to power the control board and additional features. The battery can be tested periodically (e.g., quarterly) to determine if it needs replacement or has deteriorated. This test may involve slowly depleting the battery to verify its capacity. For example, the depletion process can be compared to previous records. The electronics or software required for the test can be integrated into the control board of the energy management system.

[0011] The energy management system can be configured within an enclosed panel. In some examples, the housing of the energy management system can serve as a heat sink for one or more relay boards and MID boards within the energy management system. For example, the relay boards can be mounted to the housing via thermal pads. One or more relay boards and MID boards may be significantly hotter than the integrated circuits on the control board. To protect the control board and extend its lifespan, the control board can be separated from the relay boards and MID boards, allowing it to be thermally insulated from other parts of the energy management system. For example, the control board can be mounted vertically at a distance from the relay boards and MID boards.

[0012] According to one embodiment of the present invention, an energy management system may include one or more relay switches configured to be connected corresponding to one or more power sources or load devices in a microgrid, microgrid interconnection devices configured to be connected to or disconnected from a public power grid, and one or more microcontroller units. The one or more microcontroller units may include a communication interface, a non-transient computer-readable medium, and one or more processors communicatively coupled to the communication interface and the non-transient computer-readable medium. The one or more processors may be configured to execute processor-executable instructions stored in the non-transient computer-readable medium to monitor the microgrid using multiple sensors associated with the public power grid, one or more power sources, and one or more load devices; determine one or more load profiles corresponding to one or more load devices in the microgrid based on measurements from the multiple sensors; determine a priority order of one or more load devices in the microgrid based on user input or the availability of one or more power sources; and dynamically connect and disconnect one or more load devices to one or more power sources based on public power grid conditions, one or more load profiles, and the priority order of one or more load devices.

[0013] According to one embodiment of the invention, the energy management system can perform automatic phase identification of the supply voltage operated by the respective connected loads. The energy management system can monitor changes in load current at the loads and correlate these load current changes with changes sensed on the respective phases of the supply voltage. The correlation of changes observed over a finite time period can indicate the phase to which each controlled load is connected. Phase identification can facilitate load shedding to achieve phase balance. Similarly, while more expensive solutions would rely on measuring the voltage of each load to determine which phase it is on, voltage sensing solutions are less advantageous because they require additional voltage sensing at each load input.

[0014] Another embodiment of the invention includes a method performed by an energy management system connected to a microgrid. The energy management system may include one or more relay switches corresponding to one or more power sources or load devices in the microgrid, microgrid interconnection devices configured to connect or disconnect the microgrid from a public power grid, and one or more microcontroller units. The method may include monitoring the microgrid using multiple sensors associated with the public power grid, one or more power sources, and one or more load devices. The method may include determining one or more load profiles corresponding to one or more load devices in the microgrid based on measurements from the multiple sensors. The method may include determining a priority order of one or more load devices in the microgrid based on user input or the availability of one or more power sources. The method may include dynamically connecting and disconnecting one or more power sources and one or more load devices based on public power grid conditions, weather, environmental conditions, time of day, date, day of week, month, year, available power from one or more power sources, one or more load profiles, and the priority order of one or more load devices.

[0015] Another embodiment of the present invention includes a non-transient computer-readable medium. The non-transient computer-readable medium may include processor-executable instructions configured to cause one or more processors to monitor a microgrid using multiple sensors associated with a public power grid, one or more power sources in a microgrid, and one or more load devices in the microgrid; to determine one or more load profiles corresponding to one or more load devices in the microgrid based on measurements from the multiple sensors; to determine a priority order of one or more load devices in the microgrid based on user input or the availability of one or more power sources; and to dynamically connect and disconnect one or more power sources and one or more load devices based on public power grid conditions, weather, environmental conditions, time of day, date, day of week, month, or year, available power from one or more power sources, one or more learned load profiles, and the priority order of one or more load devices. Attached Figure Description

[0016] Aspects of the invention will now be described more fully below with reference to the accompanying drawings, which are intended to be read in conjunction with the summary of the invention, detailed description, and any preferred and / or particular embodiments specifically discussed or otherwise disclosed. However, various aspects may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided by way of illustration only so that the invention will be thorough, complete, and fully conveyed to those skilled in the art.

[0017] Figure 1A A block diagram illustrating an example of a microgrid with an energy management system according to some aspects of the present invention is shown.

[0018] Figure 1B A block diagram illustrating an example of an energy management system in an alternative microgrid according to some aspects of the present invention is shown.

[0019] Figure 1C A block diagram illustrating an example of an energy management system in an alternative microgrid according to some aspects of the present invention is shown.

[0020] Figure 2 An example configuration of a microgrid with an integrated energy management system according to some aspects of the present invention is illustrated.

[0021] Figure 3A Another example configuration of an energy management system according to some aspects of the present invention is illustrated.

[0022] Figure 3B A flowchart illustrating an example of a process performed by an energy management system according to some aspects of the present invention for determining the phase to which each load circuit is connected at the start of power-up of load circuits in a microgrid.

[0023] Figure 3C A flowchart illustrating an example of a process performed by an energy management system according to some aspects of the present invention for determining the phase to which the load circuit is connected when the load circuit is already turned on.

[0024] Figure 3D Examples of methods performed by an energy management system according to some aspects of the invention for determining, for example, Figure 3A A flowchart illustrating an example of the process of replacing the branches to which each load circuit is connected when the load circuit in a microgrid is initially turned on.

[0025] Figure 3E Examples of methods performed by an energy management system according to some aspects of the invention for determining the load circuit, such as... Figure 3A A flowchart illustrating an example of the replacement process for the branch to which the load circuit is connected when it is already switched on.

[0026] Figure 4Examples of systems comprising multiple energy management systems according to some aspects of the present invention are illustrated.

[0027] Figure 5 An example configuration of an energy management system according to some aspects of the present invention is illustrated.

[0028] Figure 6 This is a flowchart illustrating an example of a process performed by an energy management system for managing loads and power sources in a microgrid, according to some aspects of the present invention.

[0029] Figure 7 This is a flowchart illustrating an example of a process performed by an energy management system for managing power sources in a microgrid during the daytime, according to some aspects of the present invention.

[0030] Figure 8 This is a flowchart illustrating an example of a process performed by an energy management system for managing power in a microgrid during the night, according to some aspects of the present invention.

[0031] Figure 9 This is a flowchart illustrating an example of a process performed by an energy management system according to some aspects of the present invention for managing a grid-connected microgrid with a multifunctional battery but no other power source when the grid is unstable.

[0032] Figure 10 This is a flowchart illustrating an example of a process performed by an energy management system according to some aspects of the present invention for managing a grid-connected microgrid with multifunctional batteries and other power sources, including a backup generator, when the power grid is unstable.

[0033] Figure 11 This is a flowchart illustrating an example of a process performed by an energy management system according to some aspects of the present invention for managing a grid-connected microgrid with multifunctional batteries and other power sources excluding backup generators when the power grid is unstable.

[0034] Figure 12 This is a flowchart illustrating an example of a process performed by an energy management system according to some aspects of the present invention for managing a microgrid with multiple power sources when the power grid is unstable.

[0035] Figure 13 This is a block diagram illustrating a computing device according to some aspects of the present invention. Detailed Implementation

[0036] This invention generally relates to methods and systems related to energy management. More specifically, embodiments of the invention provide systems and methods for energy management and optimization. Multiple power sources can be dynamically routed to prioritized loads in a microgrid for a home or building, wherein load prioritization can be specified by a user, a learning algorithm, or a combination of both. Some embodiments of the energy management system can dynamically communicate with and manage various power sources and loads via communication under different scenarios (e.g., online, offline, severe weather conditions, etc.). The system utilizes one or more available power sources to balance the majority of loads and provides efficient power backup for the entire home or building with fast response time by dynamically controlling power sources and loads. In some examples, the microgrid is a home energy system, and the energy management system is a home energy router and optimizer (HERO). While some embodiments are described herein with reference to energy management systems in the home, it will be understood that the embodiments are broadly applicable to any building or structure in which multiple sources and loads (including various applications in residential, commercial, or industrial environments) can be installed.

[0037] Load management is the process of efficiently managing the available power in a building, with or without an inverter, where available power is first supplied to prioritized loads and then to other loads. Load prioritization can be set based on user selection (e.g., what loads a user wants to use even during a grid outage). An inverter converts direct current (DC) power generated from solar panels or other energy sources into alternating current (AC) power to supply certain loads in, for example, a home or building's energy system. Current solutions involve users performing load management, such as operators manually setting loads and then performing load management based on user input (e.g., manually connecting or disconnecting certain loads). However, this manual method is time-consuming, dangerous, and tedious, and does not efficiently utilize available power, and can inappropriately lead to inverter overload and shutdown.

[0038] This invention provides an energy management system that can learn load profiles and automatically add and remove electrical loads from inverters supplying power to the power system, for example, when normally available utility power is interrupted or otherwise unavailable or disconnected. The energy management system can optimize energy consumption within a home or building, including various types of loads and energy sources, based on self-learned load profiles, load priorities, grid connection status, and grid messages.

[0039] Therefore, various aspects of the present invention can prioritize electrical loads based on self-learning load profiles. The energy management system can be programmed to automatically follow an iterative cycle for efficient load management based on load information and feedback regarding specific periods. This reduces the power consumption of the load management system and decreases the likelihood of the inverter becoming overloaded, thereby reducing the likelihood of the inverter being shut down. The need for installing prioritized load panels can be eliminated.

[0040] Figure 1A A block diagram illustrating an example of an energy management system 108 in a microgrid 100 according to some aspects of the present invention is shown. Figure 1A The microgrid 100 illustrated herein may be a microgrid that includes one or more power sources (e.g., a utility grid 102, solar panels 112, AC batteries 118, a hybrid inverter / battery energy storage system 119, a multi-functional battery 120, and a backup generator 128), multiple electrical loads 110, a main service panel 106, and an energy management system 108.

[0041] In some examples, the power source is one or more of the following: a public grid 102, a plurality of solar panels 112 with a microinverter 114, an AC battery 118 which can be implemented as a standalone AC battery, a hybrid inverter / battery energy storage system 119, a multi-function battery 120, or a backup generator 128, some or all of which may be optional to the microgrid 100. In some examples, the AC battery 118 includes an integrated or separate stationary inverter. The AC battery 118 can be charged from the microinverter 114 connected to the solar panels 112 or from the public grid 102 at low cost usage time (TOU). The multi-function battery 120 may include an integrated or separate inverter and can supply energy to loads in the microgrid 100 via a bidirectional power supply device 124. The bidirectional power supply device 124 may be connected to the multi-function battery 120, which can be charged or discharged from the microgrid 100 or the public grid 102 via a main service panel 106 having overcurrent protection (OCP) 126. OCP 126 may be part of the main service panel 106. Alternatively, OCP 126 may be part of the energy management system 108. The multi-function battery 120 may be a stationary or mobile battery, an inverter connected to the battery, or other electrical equipment. The standby generator 128 may be a standby, stationary, fuel-powered generator. The standby generator 128 and the utility grid 102 may be connected to the main service panel 106 via an automatic transfer switch (ATS) 140. In some examples, the microgrid 100 has only a single power source. In other examples, the microgrid 100 includes more than one power source. If it includes more than one power source, the microgrid 100 may include multiple power sources of the same type, or any combination of power sources may be included in other ways to adequately provide power. The energy management system 108 is operable to communicate with and control the power sources and multiple loads. For example, the energy management system 108 may send commands to dynamically control one or more of the power sources or multiple loads of the local power network via appropriate communication channels. The main service panel 212 may include an automatic transfer switch operable to disconnect the local power network (e.g., microgrid 100) from the public grid 102. Thus, these power sources can reduce grid dependence and use lower-cost grid time (e.g., with lower usage rates) for actions such as throttling electrical equipment charging, while maintaining power delivery to prioritized loads.

[0042] Microgrid 100 may include a battery energy storage system (BESS). In some examples, the BESS includes an AC battery 118 with an inverter. In other examples, the BESS includes an AC battery 118 with a hybrid inverter, i.e., a stationary AC battery. In some examples, the BESS includes a hybrid inverter / battery energy storage system 119. The hybrid inverter in the hybrid inverter / battery energy storage system 119 may include one or more inverters connected to one or more solar panels and an inverter connected to a battery. The hybrid inverter may be connected to an energy management system 108 to supply energy to or draw energy from the microgrid 100. Therefore, microgrid 100 may include either the AC battery 118 or a hybrid inverter / battery energy storage system 119 with a DC battery. In some implementations, both the AC battery 118 and the hybrid inverter / battery energy storage system 119 are utilized. In some embodiments, a solar panel 112 is connected to the hybrid inverter / battery energy storage system 119 to supply power to the hybrid inverter / battery energy storage system 119.

[0043] In some examples, the BESS includes a multi-functional battery 120 with a coupled inverter that supplies power to the microgrid via a bidirectional power supply device 124. The multi-functional battery 120 has various uses or functions, such as supplying power or energy to the microgrid 100, storing power or energy received from the microgrid, supplying power or energy to different devices outside the microgrid (e.g., vehicles, machines, etc.), or storing energy generated from some source outside the microgrid. The multi-functional battery 120 can be mobile or stationary. A mobile battery can be a stand-alone portable AC or DC battery, a mobile generator battery, an electric vehicle with a battery, etc. The multi-functional battery 120 can be coupled to some power conditioning device (not shown) before being connected to the bidirectional power supply device 124. The power conditioning device can include a DC-DC converter, a buck converter, a boost converter, a buck-boost converter, or a DC-AC inverter. The power conditioning device can be integrated with the multi-functional battery or have a separate package. The power conditioning device can be mobile or stationary. In some examples, solar energy is collected by solar panels to power an electrical load 110 via a micro-inverter 114. Excess harvested energy can be stored in AC battery 118 or multi-functional battery 120. A bidirectional power supply device 124 in the microgrid 100 can provide fast or slow charging to the multi-functional battery 120. For example, the bidirectional power supply device 124 is capable of providing DC 25 kW fast charging to a 3-phase 30 kW inverter and its 200-800 VDC battery pack. In another example, a residential directional power supply device with bidirectional power flow may include a 15-20 kW split-phase (2-phase) inverter with paired 300-500 VDC batteries.

[0044] In some examples, the microgrid 100 also includes a remote server 136 (e.g., a cloud or network-based server) and a user device 134. The user device 134 includes a user interface for presenting applications. When presented on the user device 134, the application enables the user to monitor various data of the microgrid 100, including one or more circuit loads, total managed load, and total building load; set load priorities among loads; and override and force load circuit connections or disconnections. The remote server 136 receives load records logged to and stored in a remote database. In some examples, the microgrid 100 supports remote firmware updates for all its associated components.

[0045] User device 134 may be a mobile electronic device (e.g., a mobile phone or smartwatch), tablet, laptop, etc., and enables the energy management system to be monitored and / or manually updated. For example, an application may receive input via a user interface to add or reduce the load on the system. In some examples where manual intervention is not received via an application, the energy management system operates in a self-programming mode, including a learning mode and an execution mode, as described below. In some examples, the application may be presented on the user interface of the connected user device, enabling manual control of load removal, load addition, power supply, or battery charging and discharging processes. In some examples, default settings are prioritized and can be updated by the user to prioritize different loads or connected devices, appliances, etc.

[0046] The energy management system 108 can command routing to drive time-shifted loads using stored energy from the multi-functional battery 120 or the AC battery 118, which can be optional or fixed. The energy management system 108 can utilize distributed device commands to perform energy control optimizations to manage backup power for priority loads, longer operating times, net-zero metering, grid load peak reduction, and optimized charging of the multi-functional battery based on its usage time. Additionally, the energy management system 108 can decode facility automatic demand response (ADR) remote control messages to route energy and optimize loads, such as charging throttling and usage time, grid net-zero metering, grid meter peak reduction, generator and HVAC control.

[0047] The energy management system 108 includes one or more microcontroller units (MCUs) 116, multiple sensors 130, relays 122, and a microgrid interconnect device (MID) 138. The energy management system 108 may also include one or more regulators, such as 12V regulators. In some examples, the energy management system 108 is connected to a utility grid 102 via the MID 138. The MID can be configured to connect or disconnect the microgrid 100 from the utility grid 102. Each relay may include an upper position and a lower position that can be set manually or automatically. In the lower position, the relay is forced closed. In the upper position, the relay is automatically controlled or controlled by settings entered via a user interface, such as a graphical user interface (GUI) on user equipment 134. The one or more MCUs may include a main MCU and a network MCU. The main MCU may include a power monitoring component that automatically or, under user guidance, monitors the power of the microgrid 100 and provides load management, either directly or via an application presented on the GUI of user equipment 134. The network MCU can be configured to manage network communication between the main MCU and the microgrid 100. In some examples, the energy management system 108 implements a dual MCU board including circuitry connectors connected to multiple sensors 130 and relays 122 for controlling electrical loads and power sources, as well as AC power measurements across a range of AC power. For example, the energy management system may include 14 circuitry connectors connected to 14 current sensors and 14 relays (e.g., 100-amp relays). The MCU 116 may also include control logic for the standby generator 128, microinverter 114, AC battery 118, and multiple electrical loads 110 based on the status of power sources and electrical loads in the microgrid 100, grid status, and / or request messages from the grid operator. For example, the MCU 116 may enable the shedding of loads considered low priority during a grid outage to prevent inverter overload shutdown.

[0048] The energy management system 108 may include communication capabilities such as IEEE 802.11 Wi-Fi and IEEE 802.3 Ethernet capabilities. The energy management system 108 may also include instrumentation electronics that enable filtering and measurement of building currents from two current transducers (CTs) (e.g., current sensors) and two building voltage sensors. Some relay channels in the energy management system 108 (e.g., the top four relay channels) may include voltage sensing capabilities. In some examples, the energy management system 108 includes a main communication port for control messages and other types of messages, such as receiving settings and user commands from a remote server 136 and sending setting changes and instrument measurements to the remote server 136. For example, the main communication port may be a Modbus Remote Terminal Unit (RTU) RS-485 for half-duplex mode communication. In some examples, the energy management system 108 uses IEEE 802.3 Ethernet and its power delivery scheme to control bidirectional power supply equipment 124. The energy management system 108 may also include a neutral point forming transformer (NFT) 132 that creates phases to supply power to building loads requiring two-phase power.

[0049] In some examples, the energy management system 108 uses a temperature sensor to monitor the relay temperature relative to the ambient temperature. The temperature sensor can be coupled to the relay switch. A thermal trend can be determined. If the relay temperature rises above a threshold, it can indicate a problem with the relay, such as degradation or impending failure. An alarm message can be generated and transmitted to the control circuitry or system operator to perform mitigation measures, such as disconnecting the load. For example, if the relay temperature is at or above the 95th percentile of the thermal trend for an extended period (e.g., days or months), while the current and voltage are within their typical range, it can indicate that the relay switch has some problem (e.g., degradation). A rise in relay temperature can reflect an increase in the relay's impedance (e.g., resistance). The higher the temperature or the temperature rise, the higher the relay's impedance may be, which can indicate that the relay contacts are deteriorating.

[0050] In some examples, relay 122 in energy management system 108 is configured for zero-crossing switching. Zero-crossing switching can involve opening and closing the relay when the current and voltage values ​​are approximately zero, respectively. Zero-crossing switching can help prevent arcing that could cause pitting in the relay (e.g., damage to the relay contacts). Because the springs in the relay may become loose over time (e.g., due to aging), the closing or opening time of the relay switch may vary (e.g., become slower). For example, if the relay switch is aging, it may take longer for the contacts to open or close. Meanwhile, for inductive or capacitive loads, the current and voltage are out of phase. Energy management system 108 can predict the zero-current time or zero-voltage time of the relay switch and determine the transmission time of the open or close signal based on the delay at the relay switch to account for these delays in the relay switching time. If the relay switch is in good condition, the open or close time can be shorter. If the relay switch is aging or deteriorating, the open or close time may be longer. Typically, it may take 0.25–2.5 cycles from the time the signal to open or close the relay switch is transmitted to open or close the relay switch. The energy management system 108 can implement an automatic calibration system and method to predict the opening or closing times to account for these switching delays, thereby opening the relay switch at zero current and closing the switch at zero voltage. For example, the actual zero-current crossover timestamp and the arc current from opening the relay switch can be recorded and then compared to predict the zero-current crossover time and the opening arc current. The error between the predicted arc current value and the actual arc current value can be provided to a predicted arc minimizer to update the control time prediction, which can minimize the arc current and maximize the relay life.

[0051] Various inverters can be used in the energy management system 108, such as a microinverter 114 that converts DC energy from solar panels 112 into AC energy from batteries 118, an inverter integrated with AC batteries 118, or an inverter integrated with multi-functional batteries 120. Microinverters are well-known for their ease of installation. They are also cost-effective, enabling users to have solar panel-level power monitoring and are suitable for grid-connected solutions. If a system with microinverters is AC-connected, but these AC-connected systems are slow to respond during standby scenarios (e.g., where backup power is supplied to the load), they can also be used in off-grid scenarios. During standby scenarios, the battery inverter establishes a 60Hz waveform on the AC bus. The additional power required by the AC load can come from the AC battery 118, which inverts DC to the building's AC bus for the load. If solar panels 112 generate more power at the microinverter 114 than the AC load requires, the excess power can flow to the AC battery 118 via a maximum power point tracking (MPPT) device using an inverter charger. However, when the battery is fully charged, to ensure that the battery is not overcharged, the power generated at the solar panel level can be throttled or shut off. Furthermore, some electrical equipment (such as backup batteries) can be charged at low cost, for example from a microinverter 114 connected to the solar panel 112 or from the utility grid 102, so as not to overload the grid or incur excessive charging costs. Facilities seek to reduce peak loads and can command some load times to shift to off-peak times, or command the microgrid to zero its own meters during peak times, or keep its meters below peak load.

[0052] Existing frequency-shifting methods (e.g., frequency-watt methods) for controlling microinverter 114 can have a slow response when the microinverter reduces its output power. When microinverter 114 is off, it may need to wait at least a predetermined period, such as five minutes, before being switched back on once the grid frequency stabilizes. During this time, power can be supplied to the building's AC loads from the BESS. Other solutions include using load switching to avoid microinverter shutdown. However, this frequency-based microinverter control method is inefficient and involves response delays. Therefore, current solutions for controlling microinverter 114 typically involve waiting a predetermined amount of time before reconnection, requiring power from the BESS, or using load switching, which is inefficient and involves delayed responses, especially during off-grid scenarios or in multi-cloud environments. In contrast, the energy management system 108 of the present invention can have an improved response during standby scenarios and thus provide efficient backup power to avoid microinverter overload and shutdown. The energy management system 108 can continuously monitor grid conditions, power sources, and electrical loads to control power sources and route them to prioritized loads. For example, a bidirectional power supply device 124 connected to a multi-functional battery 120 via an inverter can enable bidirectional power flow to supply electrical loads 110 in the microgrid 100 during unstable grid scenarios.

[0053] In some examples, the energy management system 108 may use electronic communication devices to dynamically control power sources and loads. For example, the energy management system 108 may send commands via a communication channel to one or more of the power sources (e.g., microinverter 114, AC battery 118, or bidirectional power supply device 124) to supply power to household loads when the grid is unstable or expensive. One or more commands may be sent to the microinverter 114 via any suitable communication channel to throttle power generation or control power output (e.g., instead of shutting down the microinverter 114). The electronic communications described herein may include wired or wireless communications, such as IEEE 802.11 Wi-Fi, Bluetooth communication, near-field communication, etc. In some examples, the energy management system 108 may send commands via any suitable communication channel to output power generated by the microinverter 114 to supply low-priority loads, provided that any remaining power is available from the microinverter 114. In some examples, battery charging via the bidirectional power supply device 124 may be throttled as needed via Modbus commands from the energy management system 108 to help ensure that household load needs are met. Some examples also include time-to-use (TOU) based charging to charge the multi-function battery 120 at a lower cost. In some examples, communication channel messages or commands have payload packets ranging in size from 42 to 1500 octets, with a 32-bit Cyclic Redundancy Check (CRC) value. In other examples, messages may have a 2-octet payload and a 16-bit CRC value for message integrity.

[0054] In some examples, microgrid 100 can achieve net-zero metering of grid load upon user or facility ADR system command when alternative energy sources have sufficient power levels. In some examples, microgrid 100 can achieve grid load metering peak reduction upon user or facility ADR system command when alternative energy sources have sufficient power levels. Load offset can be fixed or specified by the ADR system. When grid voltage is unstable and any inverter AC source is approaching its output power limit, energy management system 108 can automatically disconnect lower-priority loads in an attempt to maintain load levels below the power source level. In some examples, energy management system 108 can throttle charging current at bidirectional power supply device 124 when the microgrid requires power or when an electrical facility invokes an ADR event. In some examples, the ADR is requested by the electrical facility cloud server and is responded to by bidirectional power supply device 124 and inverters connected to multi-function battery 120. If an electrical facility requests grid load peak reduction, multi-function battery 120 can be used to supply power to loads in the microgrid or utility grid as needed to reduce grid peaks. If electrical installations request net-zero metering operation from the grid, the multi-functional battery 120 can be used to power loads in the microgrid and reduce costly usage time when grid energy is more expensive.

[0055] In some examples, the energy management system 108 communicates with the smart meter 104 and uses voltage and current sensors located at the smart meter 104 to check grid stability. If the energy management system 108 determines that the grid is unstable, it can send a command to disconnect the microgrid 100 from the utility grid 102 using an ATS (Automatic Transfer Switch). The ATS can be installed in the main service panel 106. Alternatively, the energy management system 108 is connected to the utility grid 102 via a MID 138 and the smart meter 104 installed in the energy management system 108. The microgrid 100 can be disconnected from the utility grid 102 using the MID 138. The energy management system 108 can check grid stability after a specific duration (e.g., every 4.2-5 milliseconds) using grid current and grid voltage sensors coupled to one or more MCUs 116. These checks can include analog measurements. For demand response using distributed energy resources, the energy management system 108 can command the power flow to respond to the needs of electrical facilities by establishing load peak reduction, zeroing meters, and / or outputting power to the electrical facility grid at a specific power level, which may or may not be a pre-planned fixed value.

[0056] The energy management system 108 can control the energy in the microgrid 100. In some examples, one or more MCUs 116 of the energy management system can generate commands and send them to a microinverter 114 connected to the solar panel 112. These commands can be configured to, for example, rapidly throttle the power output when the load decreases, or to ramp up the power output when the load increases. Thus, the power output can be rapidly throttled (e.g., within tens of milliseconds) to allow the microinverter 114 to quickly transition from peak power to a steady-state power distribution, or it can be rapidly ramped up (e.g., within tens of milliseconds) to quickly adapt to peak power distribution.

[0057] The energy management system 108 can also monitor (e.g., via sensor 130) the power output of the microinverter 114 and rapidly throttle the load based on the available power from the power source. In some examples, the energy management system 108 uses analog measurements or smart meters 104 to continuously check grid stability at regular intervals, aided by grid current and voltage sensors coupled to the microcontroller connected to the energy management system 108. In some examples, the regular interval is every 4.2 milliseconds or every 5 milliseconds. However, these example intervals are presented as examples only and should not be construed as limiting. The intervals may be more frequent than every 4.2 milliseconds, between 4.2 milliseconds and 5 milliseconds, or less frequent than every 5 milliseconds without departing from the scope of the invention.

[0058] In some examples, the energy management system 108 is configured for intelligent power management. The intelligent power management module may be implemented in one or more MCUs 116. The intelligent power management module may include one or more load learning algorithms. The intelligent power management module also includes algorithms or logic for managing power supplies and loads. In some examples, the load circuitry connected to the energy management system includes a set of load circuits and a set of power supplies. In some examples, the one or more load learning algorithms may include machine learning (ML) models or artificial intelligence (AI) tools that can use feedback loops to learn from one or more load management techniques described herein.

[0059] One or more load learning algorithms can learn the load profile of electrical load 110. The energy management system can perform load control, such as adding or removing loads, based on the self-learned load profile. Some energy source (e.g., solar panel 112) can also be connected to the energy management system 108, for example, via a micro-inverter 114, for intelligent control. The energy management system 108 can be connected to multiple load circuits (e.g., dozens or hundreds of load circuits) via relay switches.

[0060] In the event of a public grid failure or other disconnection, the microinverter 114, connected to the solar panel 112, can supply power to loads in the microgrid 100. The energy management system 108 is operable to receive power supplies available from the solar panel 112 connected to the microinverter 114. In some examples, the energy management system 108 is also operable to receive electrical load values ​​corresponding to multiple electrical loads 110. The electrical load values ​​can be provided in batches (e.g., via a single input for each of the multiple electrical loads) or individually for each respective load.

[0061] As described above, current energy management solutions require user input of load values, leading to inefficient use of available power. Other solutions offload electrical loads from generators rather than from inverters. The energy management system 108 of this invention enables automatic management of loads by adding to or removing them from inverters (e.g., microinverter 114, inverters connected to AC battery 118, and / or inverters connected to multi-function battery 120), thereby preventing overload of inverters supplying power to the microgrid 100. The energy management system 108 can automatically manage electrical loads to prevent inverter overload by selectively adding or removing loads based on individual load profiles along with other data such as load priority, grid connection status, and grid messages.

[0062] The energy management system 108 enables building owners to reduce unnecessary loads or power additional equipment or systems, such as additional appliances, without requiring additional inverters or batteries. In some examples, the energy management system 108 is positioned downstream of the main service panel 106 and allows appliances to be disconnected or connected via included smart relays. The smart relays can receive commands, such as disconnect and connect commands, from one or more MCUs 116 of the energy management system. For example, disconnect commands can be issued in user software-forced mode or through automatic selection based on user load priority specifications and automatic load analysis for multiple building loads.

[0063] In some examples, the energy management system 108 includes a learning mode and an execution mode. In learning mode, the energy management system 108 learns the load profile of each load with the help of load characteristics derived from various power consumption parameters. Examples of power consumption parameters include instantaneous power (Pnow), average power over a recent extended period (Pavg), average power over a recent period (Pon), maximum power over a recent period (Pmax), and peak power (Ppk) during the period preceding the onset of the power surge. In some examples, Pnow measures the most recent root mean square (RMS) power; Pavg measures the average power over a recent longer period (e.g., twelve, twenty-four, or forty-eight hours); Pon measures the average power over a more recent period (e.g., the last minute, five minutes, or ten minutes); Pmax measures the maximum power over a recent shorter period (e.g., the last minute, five minutes, or ten minutes); and Ppk measures the peak power used during the N periods preceding the onset of the power surge (e.g., the first six periods). These and other parameters can be measured via one or more sensors of the energy management system 108 or smart meter 104 in the microgrid 100.

[0064] A unique consumption pattern (e.g., load characteristics) can be derived based on various power consumption parameters over a period of time. Load profiles for each load can be learned based on the derived load characteristics. Load profiles may include the load's identifier, a load curve over time, and other appropriate information describing the load. The load's identifier can be predicted based on load characteristics or the identifier of the load circuit to which the load belongs. The load level of the microgrid 100 can be determined by generating the sum of certain parameters (e.g., peak power) corresponding to all loads in the microgrid 100. The load level of the microgrid 100 may exceed the capacity of the microinverter 114. A threshold, such as 90% of the inverter's capacity, can be set to monitor the load. When the threshold is reached, in execution mode, the energy management system 108 performs one or more load shedding processes to mitigate and prevent extreme loads from being placed on the microinverter 114.

[0065] The remote server 136 may include or be connected to a remote database for storing data associated with the microgrid 100. For example, the data stored in the remote database may include load measurements by sensors 130 in the energy management system 108 for load circuits connected to relay switches in the energy management system, certain measurements (e.g., current) by smart meters related to grid power supply to the microgrid 100, and load profiles corresponding to loads in the microgrid 100. The energy management system 108 may analyze average power consumption over different times and power levels over specific time periods based on energy data collected in real time from the load circuits or stored in the remote database. In some examples, this time period is one week, two weeks, one month, etc. In some examples, the time period includes a rolling window, such as two weeks within a rolling window. The energy management system 108 may receive values ​​for parameters and load characteristics, which can be used by the energy management system 108 for self-programming (e.g., once the load characteristics are approved and prioritized by the user). Based on self-programming, load management is performed so that the inverter is not overloaded and the microgrid 100 is established with proper settings and wiring. When the energy management system 108 performs self-programming and load management, the electrical load 110 can be connected by priority and disconnected by the same priority or a different priority.

[0066] In some examples, the energy management system 108 implements a trained machine learning (ML) model to learn load profiles at various load circuits. The trained ML model can run on the MCU of the energy management system 108 or on a remote service that can be executed on a remote server 136 or elsewhere. The ML model can be a classification model, an artificial neural network (ANN), a support vector machine (SVM), a linear regression model, an extreme gradient boosting model, a long short-term memory (LSTM) model, a tree-based model, an autoregressive model, the k-nearest neighbor (kNN) algorithm, or any other suitable ML model or combination thereof. The ML model can be trained on the remote server 136 based on historical data collected from the load circuits connected to the energy management system 108 in the microgrid 100. Alternatively or additionally, the ML model can be trained on the energy management system 108 based on historical data collected from the load circuits connected to the energy management system 108. Historical data used as training data can include historical current measurement data or historical power measurement data. Alternatively or additionally, the ML model can be trained based on data collected from other customers. Training data from other customers can include historical current or power measurements at different loads at other customers. In some examples, ML models can be trained to recognize load profiles, such as load types and load curves over a period of time. For instance, a trained ML model can identify which appliances are in the load circuit and the load curve over 24 hours in different seasons. In some examples, the location of the circuit can also indicate which appliances are connected to the load circuit. For example, if the load circuit corresponds to the kitchen, a trained ML model can use such information and data patterns to infer that the load circuit includes kitchen appliances such as stoves, microwave ovens, refrigerators, etc.

[0067] In some examples, the energy management system 108 uses a trained ML model to optimize the load and energy of the microgrid 100. The energy management system 108 analyzes load and system data to continuously monitor and update load profiles for individual loads. For example, in some cases, the microinverter 114 may shut down due to overload. The trained ML model analyzes the load data to determine how and why the system is overloaded and updates the associated load profiles. The energy management system 108 uses the updated load profiles to self-program accordingly to prevent overload of the microinverter 114 in future iterations, thereby maintaining system integrity and preventing microgrid 100 shutdown. In some examples, the trained ML model performs intermittent analysis for predetermined durations (e.g., six hours, twelve hours, or twenty-four hours). In other examples, the trained ML optimizes the load management of the microgrid 100 based on extended time windows (e.g., one week, two weeks, or one month) or makes seasonal adjustments, such as optimizing the load differently in summer and winter. Based on the results of learning performed in learning mode, recommendations can be presented to the user, for example via an application displayed on the user interface, for load changes at regular intervals. This interval can be predetermined or user-selected, and can be weekly, bi-weekly, monthly, seasonal, etc. For example, recommendations to accept or reject new load profiles can be generated bi-weekly based on a two-week load learning cycle. In another example, recommendations to accept or reject new load profiles monthly based on a one-month load learning cycle. In yet another example, recommendations to accept or reject new load profiles recommended as a new seasonal (e.g., fall, winter, spring, or summer) method can be generated based on a load learning cycle lasting up to one year. Even though a trained ML model has been described here for load profile learning, other non-ML-based methods, such as statistical methods, can also be used.

[0068] In execution mode, the energy management system 108 performs one or more load off-load processes to control which electrical loads are being applied to the microinverter 114. Therefore, by learning load profiles and then adding / off-loads based on those profiles, the energy management system 108 is not limited to pre-wiring arrangements that may otherwise require rewiring by a skilled professional, such as a licensed electrician, when new loads are added to or removed from the electrical system.

[0069] As described above, the energy management system 108 can perform load shedding. In some examples, the energy management system 108 shedding loads based on priority. The priority of the loads can be determined based on the average power available in the microgrid 100 and / or customer demand. In some examples, load shedding can be performed by quartiles or according to another scheme when the temperature thresholds of certain relays 122 in the energy management system 108 coupled to the microinverter 114 cross. The energy management system 108 can also operate to perform load addition or reconnection under certain conditions, such as when the temperature of the relays 122 has fallen back from the temperature threshold. Therefore, the energy management system 108 can prevent pitting (e.g., physical degradation) in the relays and increase the security of the system.

[0070] In some examples, the energy management system 108 is connected to multiple circuits. In one example, the energy management system 108 is connected to up to 14 circuits. Multiple energy management systems 108 can be connected in parallel to manage a microgrid 100 of any suitable size. For example, a microgrid including 14 energy management systems can have up to 210 circuits.

[0071] In some examples, if a public power outage occurs, the microinverter 114 can automatically supply power to multiple electrical loads based on determined priorities. If the load on the microinverter 114 exceeds a preset load value, the energy management system 108 can electrically isolate the multiple electrical loads and then individually reconnect them to the microgrid 100 based on a priority order determined according to the prioritization of the multiple electrical loads. The multiple loads are reconnected in priority order, for example, until the load of the electrical load reaches the preset load value.

[0072] In some examples where the microinverter 114 overloads and shuts down, the microgrid 100 can be restarted, and the energy management system 108 can analyze why the system overloaded (e.g., determine which load caused the electrical system shutdown). The energy management system 108 can then be self-programmed accordingly to prevent further overloads and shutdowns of the microgrid 100. For example, the energy management system 108 can learn new power thresholds and create new associated load shedding profiles to prevent recurrence.

[0073] In some examples, load management is performed at least in part based on input received from users or customers. For example, load management can be performed based on manual intervention, where users or customers can manually set load priorities as required via the application's user interface. Load management can then be performed according to the manual priority order. This can be an additional option provided by the system if the user chooses an automated process that does not rely on self-learning. In some examples, the energy management system 108 compares peak power and continuous operating power with learned values ​​to look for irregular high energy consumption that may indicate a fault and then provides a warning to the user.

[0074] Figure 1B A block diagram illustrating an example of an energy management system 108 in an alternative microgrid 150 according to some aspects of the invention is shown. Figure 1B The exemplified alternative microgrid 150 and Figure 1A The illustrated microgrid 100 shares common components, and regarding Figure 1A The provided description may be appropriately applied. Figure 1B .exist Figure 1B In this configuration, the public power grid 102 and smart meter 104 are connected to the energy management system 108 instead of the main service panel 106.

[0075] Figure 1C A block diagram illustrating an example of an energy management system 108 in an alternative microgrid 180 according to some aspects of the invention is shown. Figure 1C The exemplified alternative microgrid 180 and Figure 1A The illustrated microgrid 100 shares common components, and regarding Figure 1A The provided description may be appropriately applied. Figure 1B .exist Figure 1C In this configuration, a standby generator 128 is connected to an ATS 140. A utility grid 102 is also connected to the ATS 140. The ATS 140 is connected to a smart meter 104 and a main OCP 152 before connecting to a MID 138 in the energy management system 108. An electrical load 110 is connected to a load panel 154, which in turn connects to a relay 122 in the energy management system 108. Circuit breaker panels may include a main load panel and / or a critical load panel, featuring a main circuit breaker and one or more branch circuit breakers. A bidirectional power supply unit 124, coupled to a multi-function battery 120, is connected to an OCP 126, which is part of the energy management system 108. A hybrid inverter / battery energy storage system 146 is connected to one or more solar panels 148.

[0076] Figure 2 An example of a microgrid 200, comprising solar panels connected to an inverter, is illustrated. For example... Figure 2For example, microgrid 200 includes one or more solar panels 202, a battery energy storage system 206, a backup generator 208, an energy management system 214, and a main service panel 212. The backup generator 208 can be connected to an inverter 204 (e.g., Figure 2(Example), main service panel 212 or backup service panel. Solar panel 202 and battery energy storage system 206 can be connected to main service panel 212 via inverter 204. Inverter 204 can be a proprietary inverter that transmits data associated with solar panel 202, battery energy storage system 206, or inverter 204 to energy management system 214. Some examples of data transmitted by inverter 204 include solar panel MPP, battery state of charge, battery capacity, and battery health status. Inverter 204 can also be a third-party inverter, in which case energy management system 214 can only measure and acquire voltage and current data. Energy management system 214 can also receive data related to generator capacity and grid capacity. Energy management system 214 can also monitor, manage, and report loads. Main service panel can also be connected to public grid 210. Main service panel 212 can be connected to different load circuits via circuit breakers to provide power from energy sources to loads in microgrid 200. For example, some unmanageable loads 216 can be connected to main service panel 212. The energy management system 214 can be connected to and control one or more manageable loads, such as load 1 218a, load 2 218b, and load 3 218c, via relays. The one or more manageable loads can have different priorities. For example, in a microgrid 200, among the one or more manageable loads, load 1 218a has priority 3, load 2 218b has priority 2, and load 3 has priority 1. This means that load 3 218c can be prioritized as the first load to be energized, load 2 218b can be prioritized as the second load to be energized, and load 1 218a can be prioritized as the third load to be energized. In some examples, the energy management system 214 can be connected to an AC generator or one or more solar panels at a generator port for smart control. The energy management system 214 can communicate with a server 220, such as a web server or cloud server. The energy management system 214 can communicate with the server 220 via a network accessible through a local area network (LAN) router 236 or other Wi-Fi internet access routes, including cellular towers or satellite internet. The energy management system 214 can be configured in a panel including multiple relay switches 222, each connected to a current sensor 224, a 12V regulator 226, a main MCU 228, and an NFT MCU 234. Additionally, a current sensor 230 can be installed at the utility grid 210 to measure the total grid current. The current sensor 230 can also measure the inverter output current of the loads in the microgrid 200. A grid voltage sensor 232 can be installed to monitor the grid voltage.Inverter 204 can transmit different types of measurements to energy management system 214 via Modbus TCP / IP Ethernet, WiFi, or RTU RS-485 communication protocols, such as total load, maximum load, grid status, battery state of charge (SoC), power at solar panel 202, and power at standby generator 208.

[0077] Figure 3A An example of a microgrid 300 without solar panels is shown. Figure 3A For example, microgrid 300 does not include solar panels and / or inverters, but is connected to the public grid 302 via a main service panel 304. Energy management system 310 is connected to the main service panel 304 and certain manageable loads, such as load 1 306a, load 2 306b, and load 3 306c. Unmanaged loads 308 are connected to the main service panel 304. Energy management system 310 communicates with server 312, such as a web server or cloud server, via a network. The network can be accessed via a LAN router 314 or another network device. Energy management system 310 communicates with... Figure 2 The energy management system 214 shown is similarly configured. Since there are no other power sources in the microgrid 300 besides the utility grid 302, the energy management system 310 can manage the manageable loads exemplified by loads 1 306a, 2 306b, and 3 306c based on grid request messages (e.g., demand response or peak reduction commands). One or more current sensors 316 can be implemented to measure the supply current in each phase at the utility grid connection point. Depending on the number of phases of the utility grid supplying power to the microgrid 300, one, two, or three current sensors 316 may be present.

[0078] Figure 3B Examples of methods performed by an energy management system according to some aspects of the invention for determining, for example, Figure 3A A flowchart illustrating an example of the process 321 in which the load circuits in a microgrid are initially connected to the phases is provided. Before the load circuits in the microgrid 300 are connected, the energy management system 310 is activated in step 322. In step 324, the energy management system 310 enables the load circuits to be connected to the microgrid 300 one at a time. For example, loads 1 306a, 2 306b, and 3 306c in Figure 3 are connected to the energy management system 310, but are not initially connected, and the energy management system 310 enables the connection of one load at a time.

[0079] In step 326, the energy management system 310 monitors the current at the load circuit and the current in different phases of the utility grid. The current at the load circuit can be obtained via a current sensor connected to a relay switch in the energy management system 310 connected to the load circuit. A current sensor 316 at the utility grid connection monitors the current in different phases. There can be three current sensors to measure the current in each phase. In step 328, the energy management system 310 assigns the load circuit to a phase with a current change that matches the current change at the load circuit. For example, when load 1 306a is turned on, the current change at the current sensor measuring the current in phase A at the utility grid connection changes, and the load circuit is assigned to phase A. In step 330, the energy management system 310 determines whether all load circuits are turned on. If all load circuits are turned on, process 321 ends. If not all load circuits are turned on, process 321 proceeds to step 324 to turn on another load circuit to identify the phase to which the load circuit is connected, until all load circuits are turned on.

[0080] Figure 3C Examples of the determination of load circuits, such as those described above, performed by the energy management system 310 according to some aspects of the invention, are illustrated. Figure 3A A flowchart illustrating an example of process 331 where the load circuit is connected to the phase when it is already powered on. In step 332, the energy management system 310 monitors the load current at the load circuit and the phase current at the connection to the utility grid. Each load circuit is connected to... Figure 3A The energy management system 310 contains relay switches, and each relay switch is connected to a current sensor.

[0081] A current sensor measures the load current in the corresponding load circuit. Current sensor 316 measures the phase current at the connection to the utility grid. In step 334, the energy management system 310 determines whether a change in load current is detected at the load. The change in load current can be caused by manual intervention, such as adjusting an air conditioner to a higher or lower temperature. Load current and phase current can be monitored over a period of time to detect changes. The load current can be an average current value. If a change in load current is detected at the load circuit, process 331 proceeds to step 336. In step 336, the energy management system 310 determines whether the change in load current at the load circuit is related to a change in phase current at the connection to the utility grid. If the change in load current at the load circuit is related to a change in phase current at the connection to the utility grid, for example, if the phase current changes simultaneously with the change in load current over a period of time, process 331 proceeds to step 338. In step 338, the energy management system 310 assigns the load circuit to the phase with the current change related to the change in load current. If the change in load current at the load circuit is not related to the change in phase current at the connection to the public power grid, then process 331 proceeds to step 332 to continue monitoring the load current and phase current.

[0082] Figure 3D Examples of methods performed by an energy management system according to some aspects of the invention for determining, for example, Figure 3A A flowchart illustrating an example of the replacement process 341 of the branches to which each load circuit is connected when the load circuit in a microgrid is initially turned on. Figure 3D The illustrated substitution process 341 and Figure 3B The illustrated process 321 shares common steps, and regarding Figure 3B The provided description may be appropriately applied. Figure 3D .exist Figure 1C In step 322, after the energy management system is activated, it cycles through all load circuits one at a time in step 342. In step 344, the energy management system determines whether all load circuits are connected. If yes, the replacement process 341 ends. If not, the replacement process 341 proceeds to step 324, enabling the load circuits to be connected and integrated into the microgrid. In step 346, the energy management system monitors the current at the load circuits and the current in different branches at the connection to the public grid. Each branch corresponds to one phase of the three-phase public grid. In step 348, the energy management system assigns the load circuits to branches with current variations that match the current variations at the load circuits.

[0083] Figure 3E Examples of the determination of load circuits, such as those described above, performed by the energy management system 310 according to some aspects of the invention, are illustrated. Figure 3AThis is a flowchart illustrating an example of the replacement process 351 where the load circuit is connected to a branch when it is already powered on. In step 352, the energy management system monitors the load current at the load circuit and the branch current at the load bus or utility grid connection. In step 334, the energy management system determines whether a change in load current is detected at the load circuit. If no change in load current is detected, the replacement process 351 returns to step 352. If a change in load current is detected, the replacement process 351 proceeds to step 354. In step 354, the energy management system determines whether the change in load current is related to a change in branch current at the utility grid connection or load bus. If it is determined that they are not related, the replacement process 351 returns to step 352. If they are related, in step 356, the energy management system temporarily assigns the load circuit to a branch with a current change related to the change in load current. In step 358, the energy management system determines whether the same assignment has been performed at least five consecutive times on the branch. If not, the replacement process 351 returns to step 352. If yes, in step 360, the energy management system makes the temporary assignment permanent.

[0084] Figure 3B and Figure 3C Phase recognition or Figure 3D and Figure 3E Branch assignment in the middle is based on Figure 3A It is described by the configuration of the microgrid. However, different microgrid configurations can exist. Figures 3B to 3E The process can be modified accordingly, as will be obvious to those skilled in the art. For example, Figures 3B to 3E A microgrid is a two-phase system (with two branches), and the loads in both phases (or branches) need to be balanced. If the load is a single-phase load, it is assigned to one phase (or branch). If the load is a two-phase load, it is assigned to both phases (or branches). In some examples, the microgrid is a three-phase system. Figures 3B to 3E The process can be applied to determine which, two, or three phases (or branches) the load is connected to.

[0085] Figure 4 An example of a system 400 comprising multiple energy management systems is illustrated. Figure 4 The diagram illustrates energy management systems 402A, 402B, and 402N; however, it should be understood that additional energy management systems can be utilized. This is for illustrative purposes only. Figure 4 The system illustrated may include up to eight energy management systems in parallel, each capable of managing up to 14 load circuits. However, these specific numbers are not limiting, and other numbers of energy management systems and other numbers of load circuits may be utilized. Those skilled in the art will recognize many changes, modifications, and substitutions. Therefore, Figure 4 The system can manage up to 112 load circuits. However, the total number of energy management systems that can be used in an energy system can vary. Multiple energy management systems can be integrated with... Figure 2 Energy management system 214 or Figure 3A The energy management system 310 is configured individually. In this example, each energy management system is connected to one or more other energy management systems via IEEE 802.3 Ethernet. However, other communication protocols can be used, such as IEEE 802.11 Wi-Fi, RS-485, Controller Area Network, etc. An energy management system can be designated as the master energy management system to coordinate with other energy management systems. For example, energy management system 402A is designated as the master energy management system. Energy management system 402A can be configured to communicate with other energy management systems used to manage loads and / or power supplies in the energy system. Each energy management system can learn load profiles corresponding to loads connected to the corresponding energy management system and monitor power supplies connected to the corresponding energy management system. The master MCU in energy management system 402A can access all load profiles and power supply information. In some examples, the energy system using multiple energy management systems is divided into multiple zones, and the zones can be connected or disconnected from each other. Each energy management system manages the loads and power supplies in its respective zone.

[0086] Figure 5 An example configuration of an energy management system 500 according to some aspects of the present invention is illustrated. The energy management system 500 includes two relay boards 502, a control board 504, a battery 506 configured to power the control board 504, an NFT 508, a microgrid interconnect device (MID) board 510, and a circuit breaker 512. Additionally, the energy management system 500 may include a board for mounting a visual human-machine interface for displaying status and diagnostic information. Figure 5In the energy management system 500, each relay board 502 includes four relay switches, each connected to one of four current sensors. However, relay boards 502 may include a varying number of relay switches. Control board 504 may include one or more MCUs (not shown), such as a main MCU and a network MCU for participating in network communications. All components of the energy management system 500 may be manufactured as panels and enclosed in housing 514. The thickness of the housing may be based on housing dimensions conforming to certain electrical design standards. For example, if housing 514 measures 20.5 inches wide × 40.5 inches long × 6 inches deep, the minimum thickness of the housing material is approximately 2.41 mm (0.095 inches). The energy management system 500 may be connected to a main service panel in a home or building. Multiple power sources (such as solar panels and batteries) and loads may be connected to relays on relay boards 502 of the energy management system 500. MID board 510 may include an automatic transfer switch configured to automatically switch the microgrid's power supply from its main source (such as the utility grid) to a backup source when the microgrid senses a fault or power outage in its main source, allowing the microgrid to operate as a standalone system. Circuit breaker 512 may be optionally connected between MID board 510 and main source (e.g., public power grid).

[0087] The housing 514 of the energy management system 500 can be made of any suitable metallic material (e.g., aluminum). The metallic material can be selected to allow the housing to function as a heat sink for the relay board 502 and the MID board 510. The relay board 502 can be bonded to the housing 514 via thermal pads. The size of the thermal pads can be matched to the size of the relay board 502 and the MID board 510. For example, the thermal pads for the relay board 502 have the same size and dimensions (e.g., length and width) as the relay board 502. The relay board 502 and the MID board 510 may become hotter than the circuitry on the control board 504. To protect the control board 504 and extend its lifespan, the control board 504 can be thermally insulated from the relay board 502, the MID board 510, and other parts of the energy management system 500. For example, the control board 504 can be mounted on a metal L-shaped bracket, perpendicular to and separate from the relay board 502 and the MID board 510. The distance from the control board 504 to the relay board 502 can be approximately 12.7 mm. This design not only reduces heat on the control board 504, but also saves space, minimizes electromagnetic interference (EMI), and makes it easy to install the relay board 502.

[0088] Each relay board can be manufactured as an interchangeable module comprising a fixed set of relay switches (e.g., 4 or 8 relay switches). When one relay switch fails, the entire relay board can be replaced. Relay board 502 is allowed to rotate 180 degrees and be mounted on the left or right side of the AC bus in the center of the energy management system 500 housing.

[0089] Current sensors can be paired with relay switches on a relay board to measure current in a load circuit or current from some energy source connected to the corresponding relay switch. Some current sensors are more accurate at higher temperatures. If the ambient temperature is below 25°C, especially in cold regions, current sensors may not operate accurately. Above 25°C, the higher the ambient temperature, the higher the accuracy level can be. However, if the ambient temperature is too high, it may damage the current sensor. Therefore, current sensors can be placed on a relay board, closer to the relays, and heated by the heat generated at the relays, especially in cold regions (such as Alaska), but not so close that it damages the current sensor. Thermal analysis techniques can be used to determine the optimal placement of current sensors to improve sensing accuracy without damaging them. For example, when a precisely calibrated 120 VAC test voltage source is applied to a test resistive load with known accuracy, the reference current can be calculated using Ohm's law. When the current sensor is at the closest distance to the relay switch and when the relay is at its highest temperature, the current sensor can measure the accurate AC current. The closest distance can be obtained from certain safety design requirements, such as Underwriters Laboratories (UL) creepage and clearance minimization requirements. A radial temperature model can be established starting from the location closest to the relay switch to determine the temperature at different distances from the relay. A test current can be measured and compared to a reference current to obtain the accuracy at different distances from the relay using the corresponding temperatures obtained from the radial temperature model. The optimal location of the current sensor can be determined using the most accurate current measurement.

[0090] In some examples, the energy management system 500 may include a battery 506 within its housing, which powers various components, such as an MCU on a control board. The battery 506 may be periodically (e.g., quarterly) automatically tested by the energy management system 500 to determine if it needs replacement or has deteriorated. During testing, the energy management system 500 may slowly deplete the battery 506 to verify its capacity. If the depletion rate of the battery 506 differs from the expected depletion rate, which may be predetermined or dynamically determined from the results of previous battery tests, it may mean that the battery 506 has deteriorated. Therefore, the energy management system 500 may alert the user to the problem and that the battery 506 should be replaced. The electronics or software required for testing may be integrated on the control board 504 of the energy management system 500. In some examples, battery testing may be automatically initiated by a control microprocessor when some or all available AC sources in the microgrid experience an AC power outage. The control microprocessor, which may be mounted on the control board 504, may be programmed to command the battery 506 to discharge one or more auxiliary loads connected to the main service panel in the microgrid as a self-test cycle. After the battery rest period, the control microprocessor can initiate a recharge cycle to restore the battery's state of charge to its percentage. It is desirable that the discharge interval remain within two standard deviations of the average discharge interval. The average discharge interval can be the time it takes to fully discharge the battery under a fixed test load over several iterations. The discharge interval can be monitored by the control microprocessor, and if the discharge interval decreases by a significant percentage (e.g., 10%), it indicates a significant deterioration in the battery's health. In this case, the control microprocessor can send an alert to the user.

[0091] Figure 6 This is a flowchart illustrating an example of a process 600 performed by an energy management system for managing loads and power sources in a microgrid, according to some aspects of the present invention. In step 602, the energy management system monitors the microgrid using sensors associated with the utility grid, one or more power sources, and one or more load devices. The energy management system may be as shown in Figure 1 to... Figure 5The energy management system includes one or more microcontroller units, microgrid interconnection devices configured to connect or disconnect from a public power grid, and one or more relay switches configured to connect correspondingly to one or more power sources and one or more load devices in the microgrid. In some examples, the one or more power sources include a set of solar panels connected to the energy management system via one or more microinverters. The energy management system can determine the available power from the set of solar panels by communicating with the one or more microinverters. In some examples, the one or more power sources include one or more multi-functional batteries connected to the energy management system via bidirectional power supply devices. The one or more multi-functional batteries can be coupled to one or more inverters. The energy management system can charge at least one of the one or more multi-functional batteries in response to determining that the available power from the set of solar panels is greater than the total load value of one or more load devices in the microgrid. Alternatively, the energy management system can discharge at least one of the one or more multi-functional batteries to supply power to one or more load devices in the microgrid in response to determining that the available power from the set of solar panels is less than the total load value of one or more load devices in the microgrid.

[0092] In step 604, the energy management system determines one or more load profiles corresponding to one or more load devices in the microgrid based on measurements from sensors. In some examples, the energy management system may determine multiple power consumption parameters associated with the load device based on current data collected over a predetermined time interval. The energy management system may then determine the load profile of the load device based on the multiple power consumption parameters. The multiple power consumption parameters may include instantaneous power, average power within a first time window, average power within a second predetermined time window less than the first time window, maximum power within a third time window, and / or peak power during a fourth time window starting from when the load device is turned on. In some examples, the energy management system may determine the load profile corresponding to the load device in the microgrid based on the identification of the load circuit in the microgrid that includes the load device.

[0093] In step 606, the energy management system determines the priority order of one or more load devices in the microgrid based on one or more load profiles corresponding to one or more load devices. In some examples, the priority order of one or more load devices may be provided or updated by a user, for example, via a user device connected to the energy management system through a remote server.

[0094] In step 608, the energy management system dynamically connects and disconnects one or more load devices from one or more power sources based on the public grid conditions, one or more load profiles, and / or the priority order of one or more load devices. This may involve the energy management system's processor transmitting control signals to open and close relays on a relay board. In some examples, the energy management system may connect additional load devices to the microgrid in response to determining that the total available power from one or more power sources is greater than the total load value of one or more load devices in the microgrid. In some examples, the energy management system may disconnect load devices from the microgrid based on the priority order of one or more load devices in response to determining that the total available power from one or more power sources is less than the total load value of one or more load devices in the microgrid.

[0095] Figure 7 This is a flowchart illustrating an example of a process 700 performed by an energy management system for managing power in a microgrid during the daytime, according to some aspects of the present invention. Figure 8 This is a flowchart of a process 800 performed by an energy management system to manage power in a microgrid during the night, based on an example. In some examples, Figures 7 to 8 The flowchart illustrated in Figure 1 is executed by the energy management system illustrated in Figure 1.

[0096] Figure 7 The grid-connected microgrid may include multi-functional batteries with bidirectional power supply and solar panels with micro-inverters. During the daytime, the energy management system continuously checks grid stability by monitoring current and voltage sensors connected to the energy management system and / or smart meters (step 702). If the energy management system identifies instability in the grid, it sends a command via a suitable communication channel to some or all of the power sources (e.g., micro-inverters with solar panels, multi-functional batteries, etc.) to stop supplying power to the loads in the microgrid (step 704). Alternatively, in step 704, the energy management system may disconnect the microgrid from the public grid via the MID, allowing the microgrid to operate in islanded mode. The energy management system may activate the multi-functional batteries or other power sources to dynamically match load demand within the microgrid. This can help ensure the safety of line workers operating on the grid lines. In some examples (e.g., without power transfer switches), commands are sent to different power sources in the microgrid to stop supplying power to the microgrid according to regulation rules.

[0097] If the grid is stable, the energy management system supplies power to the load and charges the multi-functional battery using the bidirectional power supply device (step 706). The energy management system also checks the power output of the microinverter (step 708). If the energy management system determines that the power output of the microinverter is low (e.g., below a preset threshold), the energy management system enables the microgrid to draw power from the public grid (e.g., via a smart meter, which may be equipped with voltage and current sensors) (step 710). The energy management system determines whether it has received a request from the public grid operator for load shedding (e.g., peak load shedding) (step 712). If there is no load shedding request from the public grid, the energy management system continues to enable the microgrid to draw power from the public grid (step 710). If the energy management system determines that it should perform load shedding, the energy management system sends one or more commands to the bidirectional power supply device via an appropriate communication channel to draw power from the multi-functional battery. This power can then be used to supply power to selected loads (step 714).

[0098] If the energy management system determines that the microinverter is generating excess power (e.g., the microinverter is supplying power exceeding a preset threshold), the energy management system may send one or more commands via an appropriate communication channel to enable the microinverter to send excess power to the utility grid (if permitted) or manage excess power (step 716). This results in net-zero metering or grid peak limit reduction when commanded by the energy management system.

[0099] If the energy management system determines that the output of the microinverter is sufficient (e.g., the microinverter provides power within a preset range), the energy management system can perform net-zero metering by checking the available power from the power sources in the microgrid (step 718). For example, the energy management system can send a command via a suitable communication channel to bidirectional power supply devices to draw power from backup batteries and electrical loads instead of using grid power.

[0100] In such Figure 8During the nighttime period, the microinverters associated with the solar panels may not supply power to the microgrid. In some such examples, the energy management system can continuously check grid stability by monitoring current and voltage sensors in the energy management system and / or smart meters (step 802), similar to step 702. If the grid is unstable, the energy management system sends one or more commands to some or all associated power supplies (e.g., backup batteries) to shut down the microgrid when it is connected to the public grid (step 804). Alternatively, in step 804, the energy management system may disconnect the microgrid from the public grid via the MID and supply power to the managed loads from a backup BESS or multi-function battery via a bidirectional power supply device. If the grid is stable, the energy management system checks the available power of the multi-function battery (step 806). If the available power of the multi-function battery is insufficient to supply power to the loads in the microgrid (e.g., if the available power is less than a preset threshold level), the energy management system enables the grid to supply power to the loads. The energy management system may also charge the multi-function battery from the grid. In some examples, a usage time principle may be employed to reduce the costs associated with charging the multi-function battery (step 808).

[0101] Figure 9 This is a flowchart illustrating an example of a process 900 performed by an energy management system according to some aspects of the present invention for managing a grid-connected microgrid with a multifunctional battery having bidirectional power supply but no other power source when the grid is unstable. Figure 10 This is a flowchart illustrating an example of a process 1000 performed by an energy management system according to some aspects of the present invention for managing a grid-connected microgrid with multifunctional batteries and other power sources including a backup generator when the power grid is unstable. Figure 11 This is a flowchart illustrating an example of a process 1100 performed by an energy management system according to some aspects of the present invention for managing a grid-connected microgrid with multifunctional batteries and other power sources excluding backup generators when the grid is unstable. Figure 12 This is a flowchart illustrating an example of a process performed by an energy management system according to some aspects of the present invention for managing a microgrid with multiple power sources during grid instability. In some examples, Figures 9 to 12 The flowchart illustrated in Figure 1 can be executed by the energy management system illustrated in Figure 1.

[0102] Figure 9The grid-connected microgrid includes a multi-functional battery with bidirectional power supply but no other power source. The energy management system continuously checks grid stability by monitoring current and voltage sensors present in the energy management system and / or smart meters (step 902). If the grid is stable, the energy management system supplies power to the loads in the microgrid based on available power from the grid and / or the multi-functional battery in the microgrid (904). If the energy management system detects grid instability, it can send a command to an automatic transfer switch via a suitable communication channel to disconnect the microgrid from the public grid (step 906). The energy management system can then send one or more commands to the bidirectional power supply device to draw power from the multi-functional battery to supply power to the loads in the microgrid (step 908). The energy management system can also send one or more commands to a microinverter associated with a solar panel to draw power from it (e.g., during periods of abundant sunlight).

[0103] In such Figure 10 In the grid-connected microgrid shown, featuring a multi-functional battery with bidirectional power supply and a backup generator, the energy management system checks grid stability by monitoring current and voltage sensors present in the energy management system or smart meters (1002). If the grid is stable, the energy management system supplies power to the loads in the microgrid based on available power from the power sources in the microgrid and / or the utility grid (step 1004). If the grid is unstable, the energy management system sends one or more commands (e.g., via cables on the bidirectional power supply) to an automatic transfer switch to disconnect the entire microgrid from the grid (1006). The energy management system can continuously or periodically check the power generated at the microinverter, the available power from the multi-functional battery, and the loads. The energy management system can also check if any generators are connected to the microgrid's main service panel (1008). This can be achieved by the energy management system communicating with the main service panel. If the energy management system detects the presence of a generator that can be used as a backup and other power sources are unavailable, the energy management system can send commands to some or all generators via appropriate communication channels to shut them down, thereby preventing damage to these sources due to the highly variable voltage of the generators (1010). The energy management system then sends commands to the generators to power them up, thereby providing power to the building.

[0104] If the energy management system detects that no generator is connected to the main service panel and other power sources are unavailable, the energy management system can enable the bidirectional power supply device (e.g., via Modbus or other communication devices) to supply power to the main service panel by drawing power from the multi-function battery (step 1012). In some examples where the available charge level of the multi-function battery is below a certain threshold, the energy management system can determine whether to supply power to all selected loads (e.g., the base load). Based on the determination to supply power to all prioritized loads, the energy management system can send a command to the bidirectional power supply device to stop discharging the multi-function battery. In some examples where other power sources (e.g., solar panels connected to a microinverter) are generating power, the energy management system enables these power sources to provide energy to the loads in the microgrid. In some examples where the loads are not receiving sufficient power and the multi-function battery is charging, the energy management system can use any suitable communication protocol (e.g., Modbus RTU, Modbus TCP, or secure Wi-Fi) to command the bidirectional power supply device to draw less current.

[0105] In such Figure 11 In the grid-connected microgrid shown, which includes a multi-functional battery with bidirectional power supply and other power sources but no backup generator, the energy management system continuously checks grid stability by monitoring current and voltage sensors present in the energy management system or smart meters (step 1102). If the grid is stable, the energy management system supplies power to the loads in the microgrid based on the available power from the grid and / or other power sources, as well as certain grid requirements (step 1104). The microgrid can achieve net-zero metering by using a multi-functional power source when feasible, by adding an appropriately sized AC battery, or by adding a second bidirectional multi-functional battery. The energy management system can check the power availability from the power sources and intelligently send one or more commands to these sources to supply power to the loads in the microgrid, thereby achieving net-zero metering.

[0106] If the grid is unstable, the energy management system sends a command to the smart automatic transfer switch (e.g., via a communication channel communicating with the multi-function battery) to disconnect the entire microgrid from the grid (step 1106). The energy management system then checks if any other power sources are connected to the microgrid and determines whether some or all of the available power from these other power sources (e.g., microinverters connected to solar panels, multi-function batteries, AC batteries, etc.) is sufficient, limited, or surplus for supplying the loads (step 1108). If there is surplus power available from other power sources besides supplying all loads, the energy management system can provide backup power to the entire household (where the microgrid is located) and charge the multi-function battery (step 1110). The microgrid can achieve net zero metering when commanded by the user or ADR facility. If the power available from all power sources is sufficient to supply all loads, the energy management system can provide backup power to the entire household, reduce the charging current of the multi-function battery, and continuously or periodically monitor the loads (step 1112). This enables the energy management system to achieve backup power for the entire microgrid. If the power available from all sources is limited to power all loads, the energy management system can prioritize powering selected loads (e.g., base loads) in the microgrid (1114).

[0107] Figure 12This is a flowchart illustrating an example of a process performed by an energy management system according to some aspects of the present invention for managing a microgrid with multiple power sources during grid instability. In step 1202, the energy management system continuously checks grid stability by monitoring current and voltage sensors present in the energy management system and optionally in smart meters. If the public grid is stable, the energy management system supplies power to all loads from the power sources and / or the public grid based on available power, and controls the power sources for optional grid peak reduction or zero grid use (step 1204). If the public grid is unstable, the energy management system forms a microgrid with the power sources and loads, and disconnects the microgrid from the public grid (step 1206). The energy management system then checks source presence and standby priority, and selects a power source to supply power to the microgrid (step 1208). Power sources within the microgrid may include multi-function batteries, BESS (Balanced Energy Storage System), and backup generators. If the energy management system selects a multi-function battery, the energy management system removes some loads from the microgrid to match the multi-function battery's capacity and commands the multi-function battery to supply power to the loads by drawing power from the multi-function battery (step 1210). If the energy management system selects the standby generator, it offloads the load to match the generator capacity, sends commands to all other power sources to shut down, and then commands the standby generator to start (step 1212). If the energy management system selects the BESS, it can offload the load to match the BESS capacity, command the BESS to supply power to the load panel within seconds, and optimize the load for peak reduction, net-zero grid use, or output to the grid if the utility grid agrees (step 1214).

[0108] Figures 7 to 12 These examples are presented as illustrations of how energy management systems can control and manage power supply and loads in a microgrid. They should not be interpreted as restrictive and will be understood to be... Figures 7 to 12 Various aspects can be combined with each other or adopted by the energy management system at different times to provide more comprehensive coverage in a variety of operating scenarios. Using the techniques described herein, the energy management system can provide a controlled transition to off-grid scenarios for a microgrid comprising a set of solar panels, stationary batteries, mobile batteries, the energy management system, a main service panel, and multiple building loads. The set of solar panels is equipped with microinverters that convert DC power to AC power. Multiple building loads can be connected to both the utility grid and the local power network (microgrid). One or more commands can be generated and transmitted via appropriate communication channels to the microinverters to divert excess power generated by the microinverters to additional loads without shutting down the microinverters. In some examples, additional loads may include one or more of the following: space heating, water heating, or building loads with low priority, or electric / hybrid vehicle batteries during charging, or stationary AC batteries during charging.

[0109] Figure 13 This is a block diagram illustrating a computing device according to some aspects of the present invention. The computing device 1300 can be used to implement some aspects of the present invention. In some examples, the computing device 1300 may correspond to the MCU 116 of FIG1.

[0110] Computing device 1300 includes a processor 1302 that communicates with memory 1304 and other components of computing device 1300 via one or more communication buses 1306. Processor 1302 is hardware that may include one or more processing devices. Examples of processor 1302 may include a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), or a microprocessor. Processor 1302 is configured to execute processor-executable instructions 1314 stored in memory 1304 to perform one or more processes described herein. Instructions 1314 may include processor-specific instructions generated by a compiler or interpreter from code written in any suitable computer programming language, such as C, C++, C#, Java, or Python.

[0111] Memory 1304 is hardware that may include one or more memory devices. Memory 1304 may be volatile or non-volatile (it may retain stored information when power is off). Examples of memory 1304 include electrically erasable programmable read-only memory (EEPROM), flash memory, or cache memory. At least some of memory 1304 includes a non-transient computer-readable medium from which processor 1302 can read instructions 1314. Computer-readable media may include electronic, optical, magnetic, or other storage devices capable of providing instructions 1314 or other program code to processor 1302. Examples of computer-readable media include magnetic disks, memory chips, ROM, random access memory (RAM), ASICs, configured processors, and optical storage devices.

[0112] The computing device 1300 may include one or more user input devices 1308 (such as a keyboard, mouse, touch screen, video capture device, and / or microphone) for accepting user input, and a display device 1310 for providing visual output to the user.

[0113] The computing device 1300 may also include a communication interface 1312. In some examples, the communication interface 1312 may enable communication using one or more networks, including a local area network (“LAN”); a wide area network (“WAN”), such as the Internet; a metropolitan area network (“MAN”); a point-to-point or peer-to-peer connection; and so on. Communication with other devices may be implemented using any suitable networking protocol. For example, a suitable networking protocol may include the Internet Protocol (“IP”), Transmission Control Protocol (“TCP”), User Datagram Protocol (“UDP”), or a combination thereof, such as TCP / IP or UDP / IP.

[0114] Various examples of the invention are provided below. As used below, any reference to a series of examples should be understood as a separate reference to each of those examples (e.g., "Examples 1 to 4" should be understood as "Examples 1, 2, 3 or 4").

[0115] Example 1 is an energy management system comprising: one or more relay switches configured to be connected to one or more power sources and one or more load devices in a microgrid; microgrid interconnection devices configured to connect to or disconnect from a utility grid; and one or more microcontroller units, wherein the one or more microcontroller units include: one or more processors; and a non-transient computer-readable medium including program code executable by the one or more processors to: monitor the microgrid using multiple sensors, wherein the multiple sensors are associated with the utility grid and the one or more relay switches; determine one or more load profiles corresponding to one or more load devices in the microgrid based on measurements from the multiple sensors; determine a priority order of the one or more load devices in the microgrid based on the load profiles corresponding to the one or more load devices; and dynamically connect and disconnect the one or more load devices to one or more power sources based on the utility grid conditions, the one or more load profiles, and the priority order of the one or more load devices.

[0116] Example 2 is an energy management system of Example 1, wherein one or more power sources include a set of solar panels connected to the energy management system via at least one microinverter, wherein the at least one microinverter is connected to at least one relay switch coupled to a current sensor and a voltage sensor, wherein the non-transient computer-readable medium also includes program code executable by one or more processors to: determine available power from the set of solar panels by communicating with at least one microinverter and the current sensor and voltage sensor coupled to at least one relay switch coupled to at least one microinverter.

[0117] Example 3 is an energy management system of Examples 1 to 2, wherein one or more power sources further include one or more multifunctional batteries connected to the energy management system via bidirectional power supply devices, wherein the one or more multifunctional batteries are coupled to one or more inverters, wherein the non-transient computer-readable medium further includes program code executable by one or more processors to charge at least one of the one or more multifunctional batteries in response to determining that the available power from a set of solar panels is greater than the total load value of one or more load devices in the microgrid.

[0118] Example 4 is an energy management system of Examples 1 to 3, wherein the non-transient computer-readable medium further includes program code that can be executed by one or more processors to enable at least one of one or more multifunctional batteries to discharge to the microgrid in response to determining that the available power from a set of solar panels is less than the total load value of one or more load devices in the microgrid.

[0119] Example 5 is an energy management system of Examples 1 to 4, wherein the non-transient computer-readable medium further includes program code that can be executed by one or more processors to connect additional load devices to the microgrid in response to determining that the total available power from one or more power sources is greater than the total load value of one or more load devices in the microgrid.

[0120] Example 6 is an energy management system of Examples 1 to 5, wherein the non-transient computer-readable medium further includes program code that can be executed by one or more processors to disconnect load devices from the microgrid based on a priority order of one or more load devices in response to determining that the total available power from one or more power sources is less than the total load value of one or more load devices in the microgrid.

[0121] Example 7 is an energy management system of Examples 1 to 6, wherein each relay switch is associated with a current sensor configured to collect current data associated with a corresponding power supply or load device connected to the relay switch, wherein the current sensor is located at a predetermined distance from the corresponding relay switch, the predetermined distance being operable to maintain the current sensor within a predetermined temperature range.

[0122] Example 8 is an energy management system of Examples 1 through 7, wherein the non-transient computer-readable medium also includes program code that can be executed by one or more processors to: determine the priority order of one or more load devices in a microgrid based on user input.

[0123] Example 9 is an energy management system of Examples 1 through 8, wherein the non-transient computer-readable medium also includes program code that can be executed by one or more processors to: determine multiple power consumption parameters associated with a load device based on measurements collected during a predetermined time interval; and determine a load profile of the load device based on the multiple power consumption parameters using a machine learning model.

[0124] Example 10 is an energy management system of Examples 1 to 9, wherein multiple power consumption parameters include instantaneous power, average power within a first time window, average power within a second predetermined time window less than the first time window, maximum power within a third time window, peak power during a fourth time window starting from when the load device is turned on, or any combination thereof.

[0125] Example 11 is an energy management system of Examples 1 to 10, wherein the non-transient computer-readable medium further includes program code that can be executed by one or more processors to: determine peak load values ​​and steady-state load values ​​based on multiple power consumption parameters, wherein the load profile includes peak load values ​​and steady-state load values.

[0126] Example 12 is an energy management system of Examples 1 to 11, wherein the non-transient computer-readable medium also includes program code that can be executed by one or more processors to: adjust a load profile based on updates of multiple power consumption parameters.

[0127] Example 13 is an energy management system of Examples 1 to 12, wherein the non-transient computer-readable medium further includes program code that can be executed by one or more processors to: determine a load profile corresponding to a load device in a microgrid based on the identifier of a load circuit in a microgrid including a load device.

[0128] Example 14 is an energy management system similar to Examples 1 through 13, wherein one or more microcontroller units are configured to communicate with a remote server, wherein the remote server is configured to provide an interface for user equipment to communicate with the energy management system.

[0129] Example 15 is an energy management system of Examples 1 to 14, wherein one or more relay switches are connected to one or more relay boards, microgrid interconnect devices are connected to microgrid interconnect device boards, and one or more microcontroller units are connected to a control board; wherein one or more relay boards, microgrid interconnect device boards, and control boards are enclosed in a metal housing; and wherein the control board is separately mounted in the metal housing from the relay boards and microgrid interconnect device boards.

[0130] Example 16 is an energy management system similar to Examples 1 through 15, wherein a metal casing is connected to one or more relay boards and microgrid interconnect devices via one or more thermal pads.

[0131] Example 17 is an energy management system of Examples 1 to 16, wherein the non-transient computer-readable medium further includes program code executable by one or more processors to: use a temperature sensor to monitor the temperature of a relay associated with a relay switch; determine a thermal trend based on the relay temperature over a period of time; determine that a temperature rise associated with the relay switch during a predetermined time period meets or exceeds a predetermined threshold; and transmit an alarm message indicating an abnormal condition of the relay switch to a user equipment based on the determination that the temperature rise meets or exceeds the predetermined threshold.

[0132] Example 18 is an energy management system of Examples 1 to 17, wherein the non-transient computer-readable medium further includes program code that can be executed by one or more processors to: disconnect a relay switch in response to determining that a temperature rise associated with a relay switch during a predetermined time period meets or exceeds a predetermined threshold.

[0133] Example 19 is an energy management system of Examples 1 to 18, wherein the non-transient computer-readable medium further includes program code that can be executed by one or more processors to: calibrate the relay switching time for opening or closing the relay switch based on (i) a control signal for opening or closing a relay switch, (ii) an estimated relay aging condition, and (iii) voltage and current data associated with the relay switch.

[0134] Example 20 is an energy management system similar to Examples 1 through 19, and also includes a battery configured to power one or more microcontroller units, wherein the non-transient computer-readable medium further includes program code executable by one or more processors to periodically verify the capacity of the battery powering the one or more microcontroller units by depleting and recharging the battery at predetermined time intervals.

[0135] Example 21 is an energy management system of Examples 1 to 20, wherein the non-transient computer-readable medium further includes program code that can be executed by one or more processors to: identify one or more phases to which one or more load devices are respectively connected.

[0136] Example 22 is a method comprising: monitoring a microgrid by an energy management system using multiple sensors, wherein the multiple sensors are associated with a public grid, one or more power sources in the microgrid, and one or more load devices in the microgrid; determining one or more load profiles corresponding to one or more load devices in the microgrid by the energy management system based on measurements from the multiple sensors; determining a priority order of one or more load devices in the microgrid by the energy management system based on the one or more load profiles corresponding to one or more power sources; and dynamically connecting and disconnecting one or more power sources from one or more load devices by the energy management system based on public grid conditions, available power from one or more power sources, one or more load profiles, and the priority order of one or more load devices.

[0137] Example 23 is a method of Example 22, wherein one or more power sources include a set of solar panels connected to an energy management system via at least one microinverter, wherein the at least one microinverter is connected to at least one relay switch coupled to a current sensor and a voltage sensor, wherein the method further includes: determining available power from the set of solar panels by communicating with the at least one microinverter and the current sensor and voltage sensor coupled to the at least one relay switch coupled to the at least one microinverter.

[0138] Example 24 is a method of Examples 22 to 23, wherein the one or more power sources further include one or more batteries connected to an energy management system via a bidirectional power supply device, wherein the method further includes: being able to charge at least one of the one or more batteries in response to determining that the available power from a set of solar panels is greater than the total load value of one or more load devices in the microgrid.

[0139] Example 25 is a method of Examples 22 to 24, wherein enabling charging of at least one of one or more batteries includes providing a predetermined current to at least one of the one or more batteries.

[0140] Example 26 is a method of Examples 22 to 25, further comprising: enabling at least one of one or more batteries to discharge to the microgrid in response to determining that the available power from a group of solar panels is less than the total load value of one or more load devices in the microgrid.

[0141] Example 27 is a method of Examples 22 to 26, wherein enabling at least one of one or more batteries to discharge to the microgrid includes providing a predetermined current to the microgrid from at least one of the one or more batteries.

[0142] Example 28 is a method of Examples 22 to 27, further comprising: connecting an additional load device to the microgrid in response to determining that the total available power from one or more power sources is greater than the total load value of one or more load devices in the microgrid.

[0143] Example 29 is a method of Examples 22 to 28, further comprising: disconnecting the load devices from the microgrid based on a priority order of the one or more load devices in response to determining that the total available power from one or more power sources is less than the total load value of one or more load devices in the microgrid.

[0144] Example 30 is a method of Examples 22 to 29, and further includes: determining the priority order of one or more load devices in a microgrid based on user input.

[0145] Example 31 is a method of Examples 22 to 30, and further includes: determining multiple power consumption parameters associated with a load device based on measurements collected during a predetermined time interval; and using a machine learning model to determine a load profile of the load device based on the multiple power consumption parameters.

[0146] Example 32 is a method of Examples 22 to 31, and further includes: determining a load profile corresponding to a load device in the microgrid based on the identifier of a load circuit in the microgrid that includes the load device.

[0147] Example 33 is a method of Examples 22 to 32, further comprising: using a temperature sensor to monitor the temperature of a relay associated with a relay switch; determining a thermal trend based on the relay temperature over a predetermined time period; determining that the temperature rise associated with the relay switch during the predetermined time period meets or exceeds a predetermined threshold; and transmitting an alarm message indicating an abnormal condition of the relay switch to a user equipment based on the determination that the temperature rise meets or exceeds the predetermined threshold.

[0148] Example 34 is a method of Examples 22 to 33, further comprising: disconnecting the relay switch in response to determining that a temperature rise associated with the relay switch during a predetermined time period meets or exceeds a predetermined threshold.

[0149] Example 35 is a method of Examples 22 to 34, further comprising: calibrating the relay switching time for opening or closing the relay switch based on (i) a control signal for opening or closing the relay switch, (ii) an estimated relay aging condition, and (iii) voltage and current data associated with the relay switch.

[0150] Example 36 is a method of Examples 22 to 35, and further includes: periodically verifying the capacity of the battery powering the energy management system by depleting and recharging the battery at predetermined time intervals.

[0151] Example 37 is a method of Examples 22 to 36, and further includes identifying one or more phases to which one or more load devices are respectively connected.

[0152] Example 38 is a non-transient computer-readable medium including program code executable by one or more processors to: monitor a microgrid using multiple sensors, wherein the multiple sensors are associated with a public grid, one or more power sources in the microgrid, and one or more load devices in the microgrid; determine one or more load profiles corresponding to one or more load devices in the microgrid based on measurements from the multiple sensors; determine a priority order of one or more load devices in the microgrid based on the one or more load profiles corresponding to one or more power sources; and dynamically connect and disconnect one or more power sources from one or more load devices based on public grid conditions, available power from one or more power sources, one or more load profiles, and the priority order of one or more load devices.

[0153] Example 39 is a non-transient computer-readable medium of Example 38, and also includes program code executable by one or more processors to connect additional load devices to the microgrid in response to determining that the total available power from one or more power sources is greater than the total load value of one or more load devices in the microgrid.

[0154] Example 40 is a non-transient computer-readable medium of Examples 38 to 39, and also includes program code executable by one or more processors to: disconnect load devices from the microgrid based on a priority order of one or more load devices in response to determining that the total available power from one or more power sources is less than the total load value of one or more load devices in the microgrid.

[0155] Example 41 is a non-transient computer-readable medium of Examples 38 to 40, and also includes program code that can be executed by one or more processors to: determine the priority order of one or more load devices in a microgrid based on user input.

[0156] Example 42 is a non-transient computer-readable medium of Examples 38 to 41, and also includes program code that can be executed by one or more processors to: determine a plurality of power consumption parameters associated with a load device based on measurements collected during a predetermined time interval; and determine a load profile of the load device based on the plurality of power consumption parameters using a machine learning model.

[0157] Example 43 is a non-transient computer-readable medium of Examples 38 to 42, and also includes program code executable by one or more processors to: determine a load profile corresponding to a load device in a microgrid based on the identifier of a load circuit in a microgrid including a load device.

[0158] Example 44 is a non-transient computer-readable medium of Examples 38 to 43, and also includes program code executable by one or more processors to: use a temperature sensor to monitor the temperature of a relay associated with a relay switch; determine a thermal trend based on the relay temperature over a period of time; determine that a temperature rise associated with the relay switch during a predetermined time period meets or exceeds a predetermined threshold; and, based on the determination that the temperature rise meets or exceeds the predetermined threshold, transmit an alarm message indicating an abnormal condition of the relay switch to a user equipment.

[0159] Example 45 is a non-transient computer-readable medium of Examples 38 to 44, and also includes program code that can be executed by one or more processors to: disconnect a relay switch in response to determining that a temperature rise associated with the relay switch during a predetermined time period meets or exceeds a predetermined threshold.

[0160] Example 46 is a non-transient computer-readable medium of Examples 38 to 45, and also includes program code that can be executed by one or more processors to: calibrate the relay switching time for opening or closing the relay switch based on (i) a control signal for opening or closing the relay switch, (ii) an estimated relay aging condition, and (iii) voltage and current data associated with the relay switch.

[0161] Example 47 is a non-transient computer-readable medium of Examples 38 to 46, and also includes program code executable by one or more processors to: identify one or more phases to which one or more load devices are respectively connected.

[0162] While examples and features of the disclosed principles are described herein, modifications, adjustments, and other implementations are possible without departing from the spirit and scope of the disclosed embodiments. Furthermore, the words “comprising,” “having,” “including,” and “containing,” as well as other similar forms, are intended to be equivalent in meaning and are open-ended, as one or more items following any of these words do not imply an exhaustive list of such items or that the list is limited to only one or more items. It must also be noted that, as used herein, the singular forms “a,” “an,” and “the” include plural references unless the context clearly indicates otherwise.

[0163] It should also be understood that the examples and embodiments described herein are for illustrative purposes only, and various modifications or variations based on the examples and embodiments will occur to those skilled in the art, and such modifications or variations will be included within the spirit and scope of this application and within the scope of the appended claims.

Claims

1. An energy management system, comprising: One or more relay switches are configured to be connected to one or more power sources and one or more load devices in the microgrid; Microgrid interconnection devices, which are configured to connect to or disconnect from the public power grid; and One or more microcontroller units, wherein the one or more microcontroller units include: One or more processors; and A non-transient computer-readable medium comprising program code executable by the one or more processors as follows: The microgrid is monitored using multiple sensors, wherein the multiple sensors are associated with the utility grid and the one or more relay switches; One or more load profiles corresponding to one or more load devices in the microgrid are determined based on measurements from the plurality of sensors. The priority order of the one or more load devices in the microgrid is determined based on the load profiles corresponding to the one or more load devices; and The one or more load devices are dynamically connected to and disconnected from the one or more power sources based on the public power grid conditions, the one or more load profiles, and the priority order of the one or more load devices.

2. The energy management system according to claim 1, wherein, The one or more power sources include a set of solar panels connected to the energy management system via at least one microinverter, wherein the at least one microinverter is connected to at least one relay switch coupled to a current sensor and a voltage sensor, wherein the non-transient computer-readable medium further includes program code executable by the one or more processors as follows: Available power from the set of solar panels is determined by communicating with the at least one microinverter and the current sensor and the voltage sensor connected to the at least one relay switch connected to the at least one microinverter.

3. The energy management system according to claim 2, wherein, The one or more power sources also include one or more multi-functional batteries connected to the energy management system via a bidirectional power supply device, wherein the one or more multi-functional batteries are coupled to one or more inverters, wherein the non-transient computer-readable medium also includes program code executable by the one or more processors to charge at least one of the one or more multi-functional batteries in response to determining that the available power from the set of solar panels is greater than the total load value of the one or more load devices in the microgrid.

4. The energy management system according to claim 3, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to enable at least one of the one or more multifunctional batteries to discharge into the microgrid in response to determining that the available power from the set of solar panels is less than the total load value of the one or more load devices in the microgrid.

5. The energy management system according to claim 1, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to connect additional load devices to the microgrid in response to determining that the total available power from the one or more power sources is greater than the total load value of the one or more load devices in the microgrid.

6. The energy management system according to claim 1, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to disconnect load devices from the microgrid based on the priority order of the one or more load devices in response to determining that the total available power from the one or more power sources is less than the total load value of the one or more load devices in the microgrid.

7. The energy management system according to claim 1, wherein, Each relay switch is associated with a current sensor configured to collect current data associated with a corresponding power supply or load device connected to the relay switch, wherein the current sensor is located at a predetermined distance from the corresponding relay switch, the predetermined distance being operable to maintain the current sensor within a predetermined temperature range.

8. The energy management system according to claim 1, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to determine the priority order of the one or more load devices in the microgrid based on user input.

9. The energy management system according to claim 1, wherein, The non-transient computer-readable medium further includes program code that can be executed by the one or more processors as follows: Multiple power consumption parameters associated with the load device are determined based on the measurements collected during predetermined time intervals; and The load profile of the load device is determined using a machine learning model based on the multiple power consumption parameters.

10. The energy management system according to claim 9, wherein, The plurality of power consumption parameters include instantaneous power, average power within a first time window, average power within a second predetermined time window less than the first time window, maximum power within a third time window, peak power during a fourth time window starting from when the load device is turned on, or any combination thereof.

11. The energy management system according to claim 9, wherein, The non-transient computer-readable medium further includes program code executable by the one or more processors to determine a peak load value and a steady-state load value based on the plurality of power consumption parameters, wherein the load profile includes the peak load value and the steady-state load value.

12. The energy management system according to claim 9, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to adjust the load profile based on updates to the plurality of power consumption parameters.

13. The energy management system according to claim 1, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to: determine a load profile corresponding to the load device in the microgrid based on the identifier of a load circuit in the microgrid including the load device.

14. The energy management system according to claim 1, wherein, The one or more microcontroller units are configured to communicate with a remote server, wherein the remote server is configured to provide an interface for communication between the user equipment and the energy management system.

15. The energy management system according to claim 1, wherein, The one or more relay switches are connected to one or more relay boards, the microgrid interconnect device is connected to the microgrid interconnect device board, and the one or more microcontroller units are connected to the control board; The one or more relay boards, the microgrid interconnection device board, and the control board are enclosed in a metal casing; and The control board is separately mounted in the metal casing from the relay board and the microgrid interconnection device board.

16. The energy management system according to claim 15, wherein, The metal housing is connected to the one or more relay boards and the microgrid interconnect device via one or more thermal pads.

17. The energy management system according to claim 1, wherein, The non-transient computer-readable medium further includes program code that can be executed by the one or more processors as follows: Use a temperature sensor to monitor the temperature of the relay associated with the relay switch; The thermal trend is determined based on the relay temperature over a period of time; Determine whether the temperature rise associated with the relay switch during a predetermined time period meets or exceeds a predetermined threshold. as well as Based on the determination that the temperature rise meets or exceeds the predetermined threshold, an alarm message indicating an abnormal condition of the relay switch is transmitted to the user equipment.

18. The energy management system according to claim 17, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to disconnect the relay switch in response to determining that a temperature rise associated with the relay switch during the predetermined time period meets or exceeds the predetermined threshold.

19. The energy management system according to claim 1, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to: calibrate the relay switching time for opening or closing the relay switch based on (i) a control signal for opening or closing the relay switch, (ii) an estimated relay aging condition, and (iii) voltage and current data associated with the relay switch.

20. The energy management system of claim 1, further comprising a battery configured to power the one or more microcontroller units, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to periodically verify the capacity of the battery powering the one or more microcontroller units by depleting and recharging the battery at predetermined time intervals.

21. The energy management system according to claim 1, wherein, The non-transient computer-readable medium also includes program code executable by the one or more processors to identify one or more phases to which the one or more load devices are respectively connected.

22. A method comprising: The energy management system uses multiple sensors to monitor the microgrid, wherein the multiple sensors are associated with the public grid, one or more power sources in the microgrid, and one or more load devices in the microgrid; The energy management system determines one or more load profiles corresponding to one or more load devices in the microgrid based on measurements from the plurality of sensors; The energy management system determines the priority order of the one or more load devices in the microgrid based on one or more load profiles corresponding to the one or more power sources; and The energy management system dynamically connects and disconnects the one or more power sources and the one or more load devices based on the status of the public power grid, the available power from the one or more power sources, the one or more load profiles, and the priority order of the one or more load devices.

23. The method according to claim 22, wherein, The one or more power sources include a set of solar panels connected to the energy management system via at least one microinverter, wherein the at least one microinverter is connected to at least one relay switch coupled to a current sensor and a voltage sensor, wherein the method further includes: Available power from the set of solar panels is determined by communicating with the at least one microinverter and the current sensor and the voltage sensor connected to the at least one relay switch connected to the at least one microinverter.

24. The method according to claim 23, wherein, The one or more power sources further include one or more batteries connected to the energy management system via a bidirectional power supply device, wherein the method further includes: In response to determining that the available power from the set of solar panels is greater than the total load value of the one or more load devices in the microgrid, at least one of the one or more batteries can be charged.

25. The method according to claim 24, wherein, Being able to charge at least one of the one or more batteries includes providing a predetermined current to at least one of the one or more batteries.

26. The method of claim 24, further comprising: In response to determining that the available power from the set of solar panels is less than the total load value of the one or more load devices in the microgrid, at least one of the one or more batteries is enabled to discharge into the microgrid.

27. The method according to claim 26, wherein, Enabling at least one of the one or more batteries to discharge into the microgrid includes supplying a predetermined current to the microgrid from the at least one of the one or more batteries.

28. The method of claim 22, further comprising: Additional load devices are connected to the microgrid in response to determining that the total available power from the one or more power sources is greater than the total load value of the one or more load devices in the microgrid.

29. The method of claim 22, further comprising: In response to determining that the total available power from the one or more power sources is less than the total load value of the one or more load devices in the microgrid, the load devices are disconnected from the microgrid based on the priority order of the one or more load devices.

30. The method of claim 22, further comprising: The priority order of the one or more load devices in the microgrid is determined based on user input.

31. The method of claim 22, further comprising: Multiple power consumption parameters associated with the load device are determined based on the measurements collected during predetermined time intervals; as well as The load profile of the load device is determined using a machine learning model based on the multiple power consumption parameters.

32. The method of claim 22, further comprising: The load profile corresponding to the load device in the microgrid is determined based on the identifier of the load circuit in the microgrid, which includes the load device.

33. The method of claim 22, further comprising: Use a temperature sensor to monitor the temperature of the relay associated with the relay switch; The thermal trend is determined based on the relay temperature within a predetermined time period; Determine whether the temperature rise associated with the relay switch during a predetermined time period meets or exceeds a predetermined threshold. as well as Based on the determination that the temperature rise meets or exceeds the predetermined threshold, an alarm message indicating an abnormal condition of the relay switch is transmitted to the user equipment.

34. The method of claim 33, further comprising: The relay switch is disconnected in response to determining that the temperature rise associated with the relay switch during the predetermined time period meets or exceeds the predetermined threshold.

35. The method of claim 22, further comprising: The relay switching time for opening or closing the relay switch is calibrated based on (i) the control signal for opening or closing the relay switch, (ii) the estimated relay aging condition, and (iii) the voltage and current data associated with the relay switch.

36. The method of claim 22, further comprising: The capacity of the battery powering the energy management system is periodically verified by depleting and recharging the battery at predetermined time intervals.

37. The method of claim 22, further comprising identifying one or more phases to which the one or more load devices are respectively connected.

38. A non-transient computer-readable medium comprising program code executable by one or more processors as follows: Multiple sensors are used to monitor the microgrid, among which... The plurality of sensors are associated with a public power grid, one or more power sources in the microgrid, and one or more load devices in the microgrid; One or more load profiles corresponding to one or more load devices in the microgrid are determined based on measurements from the plurality of sensors. The priority order of the one or more load devices in the microgrid is determined based on the one or more load profiles corresponding to the one or more power sources; as well as The one or more power sources are dynamically connected to and disconnected from the one or more load devices based on the status of the public power grid, the available power from the one or more power sources, the one or more load profiles, and the priority order of the one or more load devices.

39. The non-transient computer-readable medium of claim 38, further comprising program code executable by the one or more processors to: connect additional load devices to the microgrid in response to determining that the total available power from the one or more power sources is greater than the total load value of the one or more load devices in the microgrid.

40. The non-transient computer-readable medium of claim 38, further comprising program code executable by the one or more processors to: disconnect load devices from the microgrid based on the priority order of the one or more load devices in response to determining that the total available power from the one or more power sources is less than the total load value of the one or more load devices in the microgrid.

41. The non-transient computer-readable medium of claim 38, further comprising program code executable by the one or more processors to: determine the priority order of the one or more load devices in the microgrid based on user input.

42. The non-transient computer-readable medium of claim 38, further comprising program code executable by the one or more processors as follows: Multiple power consumption parameters associated with the load device are determined based on the measurements collected during predetermined time intervals; and The load profile of the load device is determined using a machine learning model based on the multiple power consumption parameters.

43. The non-transient computer-readable medium of claim 38, further comprising program code executable by the one or more processors to: determine a load profile corresponding to the load device in the microgrid based on an identifier of a load circuit in the microgrid including the load device.

44. The non-transient computer-readable medium of claim 38, further comprising program code executable by the one or more processors as follows: Use a temperature sensor to monitor the temperature of the relay associated with the relay switch; The thermal trend is determined based on the relay temperature over a period of time; Determine that the temperature rise associated with the relay switch during a predetermined time period meets or exceeds a predetermined threshold; and Based on the determination that the temperature rise meets or exceeds the predetermined threshold, an alarm message indicating an abnormal condition of the relay switch is transmitted to the user equipment.

45. The non-transient computer-readable medium of claim 44, further comprising program code executable by the one or more processors to: disconnect the relay switch in response to determining that a temperature rise associated with the relay switch during the predetermined time period meets or exceeds the predetermined threshold.

46. ​​The non-transient computer-readable medium of claim 38, further comprising program code executable by the one or more processors to: calibrate a relay switching time for opening or closing the relay switch based on (i) a control signal for opening or closing a relay switch, (ii) an estimated relay aging condition, and (iii) voltage and current data associated with the relay switch.

47. The non-transient computer-readable medium of claim 38, further comprising program code executable by the one or more processors to: identify one or more phases to which the one or more load devices are respectively connected.