Patent attributes
Systems, methods, and devices related to a microgrid system for providing power to a facility. A self-contained power system provides power to a facility using a combination of power storage elements and renewable energy sources. A connection to an external power grid may also be provided. The system optimizes power flow to the facility using power from the storage elements and the renewable energy sources and, if necessary, the external power grid. The optimization process predicts future power usage by the facility using power usage data from a predetermined time window. The optimization process can also take into account predicted energy generation amounts by the renewable energy sources. To optimize economic effects, the optimization process can also determine whether to buy and when to buy power from the external power grid.