WHAT IS CLAIMED IS:

1. A power controller system for controlling an energy storage device comprising:

a memory for storing program instructions; and

a power controller processor, the power controller processor is coupled to the memory and the power controller processor is in communication with at least one power generation system, at least one energy storage system, and at least one power load, the power controller processor is operative to execute program instructions to:

acquire time parameters, including a time window having at least one calculation cycle;

determine a maximum effective energy storage capacity of the at least one energy storage system for the time window;

perform a first sort of the at least one calculation cycle of the time window by sorting in a numerical order according to a ratio of a load demand of the at least one power load to a total available power from the at least one power generation system at each of the at least one calculation cycle;

assign a unique, charge priority value to each of the at least one calculation cycles sorted by the first sort;

determine, responsive to the first sort and starting from a highest charge priority value, a charge power for each calculation cycle until a total charge power satisfies the maximum effective energy storage capacity;

determine, responsive to the first sort and starting from a lowest sorted charge priority value, an available discharge power for the each calculation cycle until a total discharge power exceeds the maximum effective energy storage capacity;

perform, responsive to the total charge power satisfying the maximum effective energy storage capacity and responsive to the total discharge power exceeding the maximum effective energy storage capacity, a second sort in a temporal order of the at least one calculation cycle;

determine, starting from an earliest calculation cycle of the second sort, an available state-of-charge (SOC) of the at least one energy storage system; and

adjust the SOC of the at least one energy storage system for the each calculation cycle organized by the second sort.

2. The power controller system of claim 1, wherein the determine a maximum effective energy storage capacity of the at least one energy storage system for the time window further comprising program instructions to:

determine an effective energy storage capacity of the at least one energy storage system for the time window;

determine a number of allowed duty cycles of the at least one energy storage system for the time window;

calculate a product of the effective energy storage capacity of the at least one energy storage system for the time window and the number of allowed duty cycles of the at least one energy storage system for the time window.

3. The power controller system of claim 2, wherein the determine the effective energy storage capacity of the at least one energy storage system for the time window is based on a degradation of the at least one energy storage system.

4. The power controller system of claim 1, wherein the total available power from the at least one power generation system at each of the at least one calculation cycle is based on a degradation of the at least one power generation system.

5. The power controller system of claim 1, wherein the charge power is a minimum value selected from: an available power from the at least one power generation system at the each calculation cycle and a power rating of the at least one energy storage system at the each calculation cycle.

6. The power controller system of claim 1, wherein the available discharge power is a minimum value selected from: a power rating of the at least one energy storage system at the each calculation cycle, an available charge of the at least one energy storage system at the each calculation cycle, and an available power output capacity of the at least one energy storage system at the each calculation cycle.

7. The power controller system of claim 1, wherein the ratio of the load demand of the at least one power load to the total available power from the at least one power generation system at each of the at least one calculation cycle is directly proportional to an energy cost value at the at least one calculation cycle.

8 A method comprising:

acquiring time parameters, including a time window having at least one calculation cycle;

determining a maximum effective energy storage capacity of the at least one energy storage system for the time window;

performing a first sort of the at least one calculation cycle of the time window by sorting in a numerical order according to a ratio of a load demand of at least one power load to a total available power from at least one power generation system at each of the at least one calculation cycle;

assigning a unique, charge priority value to each of the at least one calculation cycles sorted by the first sort;

determining, responsive to the first sort and starting from a highest charge priority value, a charge power for each calculation cycle until a total charge power satisfies the maximum effective energy storage capacity;

determining, responsive to the first sort and starting from a lowest sorted charge priority value, an available discharge power for the each calculation cycle until a total discharge power exceeds the maximum effective energy storage capacity;

performing, responsive to the total charge power satisfying the maximum effective energy storage capacity and responsive to the total discharge power exceeding the maximum effective energy storage capacity, a second sort in a temporal order of the at least one calculation cycle;

determining, starting from an earliest calculation cycle of the second sort, an available state-of-charge (SOC) of the at least one energy storage system; and adjusting the SOC of the at least one energy storage system for the each calculation cycle organized by the second sort.

9. The method of claim 8, wherein the determining a maximum effective energy storage capacity of the at least one energy storage system for the time window further comprising:

determining an effective energy storage capacity of the at least one energy storage system for the time window;

determining a number of allowed duty cycles of the at least one energy storage system for the time window;

calculating a product of the effective energy storage capacity of the at least one energy storage system for the time window and the number of allowed duty cycles of the at least one energy storage system for the time window.

10. The method of claim 9, wherein the determining the effective energy storage capacity of the at least one energy storage system for the time window is based on a degradation of the at least one energy storage system.

11. The method of claim 8, wherein the total available power from the at least one power generation system at each of the at least one calculation cycle is based on a degradation of the at least one power generation system.

12. The method of claim 8, wherein the charge power is a minimum value selected from: an available power from the at least one power generation system at the each calculation cycle and a power rating of the at least one energy storage system at the each calculation cycle.

13. The method of claim 8, wherein the available discharge power is a minimum value selected from: a power rating of the at least one energy storage system at the each calculation cycle, an available charge power of the at least one energy storage system at the each calculation cycle, and an available power output capacity of the at least one energy storage system at the each calculation cycle.

14. The method of claim 8, wherein the ratio of the load demand of the at least one power load to the total available power from the at least one power generation system at each of the at least one calculation cycle is directly proportional to an energy cost value at the at least one calculation cycle.

15. A non-transitory computer-readable medium storing instructions that, when executed by a computer processor, cause the computer processor to perform a method comprising:

acquiring time parameters, including a time window having at least one calculation cycle;

determining a maximum effective energy storage capacity of the at least one energy storage system for the time window;

performing a first sort of the at least one calculation cycle of the time window by sorting in a numerical order according to a ratio of a load demand of at least one power load to a total available power from at least one power generation system at each of the at least one calculation cycle;

assigning a unique, charge priority value to each of the at least one calculation cycles sorted by the first sort;

determining, responsive to the first sort and starting from a highest charge priority value, a charge power for each calculation cycle until a total charge power satisfies the maximum effective energy storage capacity;

determining, responsive to the first sort and starting from a lowest sorted charge priority value, an available discharge power for the each calculation cycle until a total discharge power exceeds the maximum effective energy storage capacity;

performing, responsive to the total charge power satisfying the maximum effective energy storage capacity and responsive to the total discharge power exceeding the maximum effective energy storage capacity, a second sort in a temporal order of the at least one calculation cycle;

determining, starting from an earliest calculation cycle of the second sort, an available state-of-charge (SOC) of the at least one energy storage system; and adjusting the SOC of the at least one energy storage system for the each calculation cycle organized by the second sort.

16. The medium of claim 15, wherein the determining a maximum effective energy storage capacity of the at least one energy storage system for the time window further comprising:

determining an effective energy storage capacity of the at least one energy storage system for the time window;

determining a number of allowed duty cycles of the at least one energy storage system for the time window;

calculating a product of the effective energy storage capacity of the at least one energy storage system for the time window and the number of allowed duty cycles of the at least one energy storage system for the time window.

17. The medium of claim 16, wherein the determining the effective energy storage capacity of the at least one energy storage system for the time window is based on a degradation of the at least one energy storage system.

18. The medium of claim 15, wherein the total available power from the at least one power generation system at each of the at least one calculation cycle is based on a degradation of the at least one power generation system.

19. The method of claim 15, wherein the charge power is a minimum value selected from: an available power from the at least one power generation system at the each calculation cycle and a power rating of the at least one energy storage system at the each calculation cycle.

20. The method of claim 15, wherein the available discharge power is a minimum value selected from: a power rating of the at least one energy storage system at the each calculation cycle, an available charge of the at least one energy storage system at the each calculation cycle, and an available power output capacity of the at least one

energy storage system at the each calculation cycle.