# Patent

## Title
Method for real-time control of energy storage units to reduce electricity cost

## Abstract

A method for controlling an energy storage unit having a model which tracks each charging instances includes, for each charging event, capturing energy charged into the energy storage unit and an unit energy price of the charging source(s) at the time of charging; updating a unit price of total energy stored in the storage unit at each time-step; during a discharging event, updating the unit price of energy in the storage unit on a selected cost model; comparing the unit price of energy in the storage unit with other generation sources in the microgrid and a utility tariff; selecting a lowest cost combination from generation, storage, and grid and using the lowest cost combination to supply a load; and if a controller decides to use stored energy at any time, sending a discharge command to the energy storage unit.

## Background
The present application is a non-provisional of and claims priority to Provisional Application Serial 61/670,411 filed Jul. 11, 2012, the content of which is incorporated by reference.


BACKGROUND
This application relates real-time control of energy storage units to reduce the electricity cost.
Distributed generation, also called on-site generation, dispersed generation, embedded generation, decentralized generation, decentralized energy or distributed energy, generates electricity from many small energy sources. Most countries generate electricity in large centralized facilities, such as fossil fuel (coal, gas powered), nuclear, large solar power plants or hydropower plants. These plants have excellent economies of scale, but usually transmit electricity long distances and negatively affect the environment. Distributed generation allows collection of energy from many sources and may give lower environmental impacts and improved security of supply.
Right-sized resources such as microgrids are able to offer important but little-known economic advantages over central plants. Smaller units offered greater economies from mass-production than big ones could gain through unit size. Batteries can act as a buffer to alleviate the mismatch of generation and demand in a microgrid. In this way, when DGs output power is more than the demand, battery is charged. The battery is discharged during times of low generation and high demand to reduce the power mismatch.
Due to rapid changes in the power output of renewable energy sources over time and variations in the demand, a battery might experience a very irregular pattern of charge and discharge in a microgrid if not controlled properly. This will have a negative impact on battery lifetime and will increase the overall operational cost of the microgrid. Therefore, in addition to balancing supply and demand in real-time, power management system should operate the battery in a way to minimize operational cost of a microgrid.
Since one goal of controller in energy usage optimization of microgrids is to reduce the cost of consumed energy for the end-users, it is necessary to calculate or obtain the unit price of energy from each generator, energy storage unit, and the grid (in case of grid-tied microgrids) at each step of microgrid operation. In this way the controller can identify the cheapest sources of energy in a microgrid and send commands to them in order to match the electricity supply and demand in the system.
Conventional systems are based on passive control of energy storage units. Examples include peak-shaving control were a storage unit discharges only if the load exceeds a certain threshold. Another example is schedule-based control in which a storage unit charges and discharges at certain times during the day. However, passive control lacks the general knowledge about real-time changes in generation and demand levels as well as operational costs of the system; thus it cannot guarantee an optimal operation of the storage unit.
SUMMARY
In one aspect, a method for controlling an energy storage unit having a model which tracks each charging instances includes, for each charging event, capturing energy charged into the energy storage unit and an unit energy price of the charging source(s) at the time of charging; updating a unit price of total energy stored in the storage unit at each time-step; during a discharging event, updating the unit price of energy in the storage unit on a selected cost model; comparing the unit price of energy in the storage unit with other generation sources in the microgrid and a utility tariff; selecting a lowest cost combination from generation, storage, and grid and using the lowest cost combination to supply a load; and if a controller decides to use stored energy at any time, sending a discharge command to the energy storage unit.
Advantages of the management system may include one or more of the following. The system provides a method for assessing the value of stored energy in an energy storage unit in real-time. It also shows a mechanism to use the assessed value of stored energy for real-time control of energy storage units to reduce the final cost of electricity. The preferred embodiment provides a lower electricity cost for energy systems because maximizing the revenues from energy storage utilization is a built-in feature of the controller. The system is also technology agnostic which allows customer's choice of storage technology. The system is easier to implement and compatible with different electricity tariffs which result in plug and play features and minimizes the installation cost. Also, the system provides robust real-time control capability of electricity flow in the system which results in a cost-effective response to contingencies (such as changes in weather condition and load variations). The system includes a levelized cost model for the storage which provides the cost of energy from the battery to be compared with the grid price. Deciding in real-time if a demand response execution (load shedding) can result in savings in terms of the utility bill. This method provides a realistic price signal for the cost of energy from the battery. This enables the end-user or an automated energy management system to decide when to use the battery, when to use the grid and use the storage over any predefined period of time. Also, it detects in real-time when is necessary to buy the power from the grid and how much saving can be achieved by cutting the load. Real-time control takes into account any unexpected changes in the distributed generation, demand, and the grid price signal. The whole algorithm presents relatively small complexity and very fast solution so that it can be easily implemented in real-time. Overall, it characterizes demand as a virtual resource.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 shows an exemplary energy storage device which is charged by a variety of generators.
FIGS. 2A-2B show an exemplary process for supplying a load and charging the energy device of FIG. 1.
FIG. 3 shows another exemplary process for determining the charging or discharging of the energy device.



DESCRIPTION
FIG. 1 shows an exemplary energy storage device 9 which is charged by a variety of generators 1 . . . n. Energy storage units are different from conventional generators in a sense that they do not have any fuel costs. Therefore, to obtain the unit price of energy for storage units, charging costs should be calculated and converted to a unit energy price as will be described later.
The energy storage device 9 can be a rechargeable battery module. The battery module can be charged at different rates by different generators. The rate for generator(n) can be expressed as yn(k) $/kWh. The device is charged through a unit price of electricity (UPOE) The UPOE determination at time step k when sources 1 . . . n are charging the battery can be expressed as




  
    UPOE
    ⁡
    
      (
      k
      )
    
  
  =
  
    
      
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
        ×
        
          
            y
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
        ×
        
          
            y
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      ...
      +
      
        
          
            x
            n
          
          ⁡
          
            (
            k
            )
          
        
        ×
        
          
            y
            n
          
          ⁡
          
            (
            k
            )
          
        
      
    
    
      
        
          x
          1
        
        ⁡
        
          (
          k
          )
        
      
      +
      
        
          x
          2
        
        ⁡
        
          (
          k
          )
        
      
      +
      ...
      +
      
        
          x
          n
        
        ⁡
        
          (
          k
          )
        
      
    
  




where x1(k) represents the total stored amp-hour in the battery from source 1 at time k. During discharging, x1 to xn decreases with the same proportion.

FIG. 2A shows an exemplary process for supplying a load and charging the energy device of FIG. 1. First, the process obtains a unit price of electricity (UPOE) for each online generator, including grid UPOE (22). Next, the process checks if inexpensive electricity is available to supply the load (24). If not, the process jumps to 40 (FIG. 2B0 through connector 2 and otherwise the process proceeds to 26 where it checks if cheap electricity generation is available to charge the energy storage unit. If so, the process supplies the load and charges the storage unit (28) and then updates the UPOE for the storage unit based on the storage cost model (30) and loops back to 22 through connector 1. From 26, if there is insufficient cheap electricity to charge the storage unit, the process supplies the load with cheap electricity while keeping the storage unit on standby (32). The process keeps the UPOE for the storage unit unchanged (34) and loops back to 22 via connector 1.
FIG. 2B is a continuation of FIG. 2A, and the process compares the UPOE of the storage unit and generators with each other (40). The process then checks if the storage unit and the generators in combination can provide cheaper electricity for the load compared to only the generator (42). If so, the process causes the storage unit to discharge (44) and updates the UPOE for the storage unit based on the storage cost model (46) and loops back to 22 via connector 1. From 42, if the storage device and the generators in combination cannot provide cheaper electricity than the generators alone, the process supplies the load with the cheapest available generators while keeping the storage unit on standby (50) and the UPOE for the storage unit unchanged (52).
FIG. 3 shows another method 1 for real-time control of energy storage unit to reduce the electricity cost: These methods operate storage units in real-time based on the instantaneous values of generation, demand, cost of electricity and other parameters in microgrids. In 1.1, the system performs Unit price of electricity (UPOE) calculation for storage units, including methods to calculate UPOE stored in a storage unit based on the cost of electricity from sources which charged the storage unit and storage characteristics. In 1.1.1, the process can apply an amp-hour cost model—a cost model which relies on charged and discharged Amp-hours in a battery for calculating UPOE. In 1.1.1.1, the process can apply a detailed cost model—a cost model which calculates and keeps track of Amp-hours charged from each charging sources into the storage unit and the cost of electricity from that source during the charging time. In this way, in addition to UPOE from the storage unit, at each instant of time it is clear which percentage of the storage unit is charged from which source. In 1.1.1.1, the process can use a recursive cost model, which only keeps the last values of Amp-hours in the battery and its associated cost. The UPOE is then calculated in a recursive way. This model does not show the individual source contributions but it needs less calculation and memory to obtain UPOE for a storage unit. In 1.1.1.1, the process can alternatively use a Peukert-based cost model. In a Peukert-based cost model, UPOE during charging periods is similar to detailed or recursive cost model. However, during a discharge, UPOE is not constant anymore. According to Peukert's law the capacity of a battery is dependent on its discharge rate. So in this model based on the estimated discharge capacity of a battery, UPOE is adjusted. In this way, high power (current) discharges will be more expensive because at higher discharge rates battery capacity is less. In 1.1.1, a watt-hour cost model can be used. This model is similar to Amp-hour cost model except that charged and discharged watt-hours are used instead of charged and discharged Amp-hours. Similar to the Amp-hour model, watt-hour cost model can also be implemented as a detailed, recursive, or Peukert-based model.
In 1.2, OPOE-based charge and discharge of energy storage units can be used where a real-time control method for storage units in microgrids uses the UPOE of a storage unit as a reference and compares it with UPOE of other sources of electricity in a system (e.g. generators or the grid). In this way the controller can identify the cheapest sources of energy in a microgrid and send commands to them in order to match the electricity supply and demand in the system.
In 1.2.1, the process uses combined peak-shaving and energy optimization: In this control method, the first objective is to shave the peak load. Any extra energy stored in the battery after the peak shaving event will be used for energy optimization according to 1.2. In 1.2.2, pure energy optimization can be used: In this method, all charges and discharges in the battery are UPOE-based as in 1.2. In 1.2.3, the process can provide combined UPS capability and energy optimization. In this method, energy stored in a storage unit is divided into two parts: 1) Energy used for energy optimization (similar to 1.2) 2) UPS application which is only used if a loss of generation occurs in the system. In 1.2.3.1, a voltage-based end of discharge control can be used. In this method, if the battery voltage drops below a certain value the energy optimization application stops to maintain the UPS capability of the storage unit. In 1.2.3.2, the process can use a state of charge (SOC)-based end of discharge control: In this method, if the battery SOC drops below a certain value the energy optimization application stops to maintain the UPS capability of the storage unit.
The UPOE concept for storage units in 1.1 provides a reference price signal for the energy in the storage unit. This reference signal enables the controller to decide in real-time how to operate the storage unit for energy optimization purpose. Different cost models presented in the claim diagram provide different methods based on battery characteristics and the available measurement units in the system to calculate UPOE for the storage units. The process can also apply control methods for combining energy optimization applications with other applications of the energy storage units.
A real-time load management controller can be used in conjunction with the power management units described above. The power management units determine whether it is more cost-effective to use on-site storage unit or to buy the power from the grid to balance the electric supply and demand in case of any power shortage. When the purchase of power from the grid is recommended, the load management controller can decide to drop part of the load during peak grid prices to reduce the utility bill. The main differentiation of the proposed load management technique compared to previous methods is that it decides in real-time if a demand response execution (load shedding) can result in any saving in terms of the utility bill.
In one embodiment, a load management unit in the controller decides when the demand response can be applicable in order to reduce the utility bill. If the power management unit decides to discharge the battery no demand response is necessary. On the other hand, if the power management unit decides to buy the power shortage from the grid then the end-user can dynamically decide to cut its load if the grid price is high. The demand response algorithm can be carried out without the user interaction by specifying the percentage of the load shedding based on the grid price in advance. The proposed demand response algorithm is new and different from the state of the art.
The foregoing presents an intelligent power and load management system for cost-effective real-time operation and control of distributed energy resources (microgrids) including distributed generations, batteries and controllable loads. Special attention is paid to the battery cost model since batteries are the most expensive components of a microgrid. The model to derive the cost of energy from battery (CEB) is based on the number of necessary battery replacements over the micro grid useful lifetime. This cost model is later used for electric power sharing between the battery and the grid as the two controllable sources of electric energy in a microgrid. The new cost model dynamically adjusts the number of battery replacements in a way to keep the cost of energy from the battery comparable to the grid price. This battery cost model is compared with HOMER energy modeling software cost model to show its superior performance.
The load management technique is also presented which complements the power management technique in order to maximize the operational cost saving for the microgrid owner. The load management technique is activated when the power management system decides to import power from the grid. In this way, the overall management system tries to optimally utilize the installed battery in a microgrid before applying load shedding in the system. This new load management system considers impacts of both on-site storage capacity and grid price signal while current demand response programs are only based on the grid price or other signals from the utility.
The invention may be implemented in hardware, firmware or software, or a combination of the three. Preferably the invention is implemented in a computer program executed on a programmable computer having a processor, a data storage system, volatile and non-volatile memory and/or storage elements, at least one input device and at least one output device.
By way of example, a block diagram of a computer to support the system is discussed next. The computer preferably includes a processor, random access memory (RAM), a program memory (preferably a writable read-only memory (ROM) such as a flash ROM) and an input/output (I/O) controller coupled by a CPU bus. The computer may optionally include a hard drive controller which is coupled to a hard disk and CPU bus. Hard disk may be used for storing application programs, such as the present invention, and data. Alternatively, application programs may be stored in RAM or ROM. I/O controller is coupled by means of an I/O bus to an I/O interface. I/O interface receives and transmits data in analog or digital form over communication links such as a serial link, local area network, wireless link, and parallel link. Optionally, a display, a keyboard and a pointing device (mouse) may also be connected to I/O bus. Alternatively, separate connections (separate buses) may be used for I/O interface, display, keyboard and pointing device. Programmable processing system may be preprogrammed or it may be programmed (and reprogrammed) by downloading a program from another source (e.g., a floppy disk, CD-ROM, or another computer).
Each computer program is tangibly stored in a machine-readable storage media or device (e.g., program memory or magnetic disk) readable by a general or special purpose programmable computer, for configuring and controlling operation of a computer when the storage media or device is read by the computer to perform the procedures described herein. The inventive system may also be considered to be embodied in a computer-readable storage medium, configured with a computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner to perform the functions described herein.
The invention has been described herein in considerable detail in order to comply with the patent Statutes and to provide those skilled in the art with the information needed to apply the novel principles and to construct and use such specialized components as are required. However, it is to be understood that the invention can be carried out by specifically different equipment and devices, and that various modifications, both as to the equipment details and operating procedures, can be accomplished without departing from the scope of the invention itself.

## Claims

1. A method for controlling an energy storage unit having a model which tracks each charging instances, comprising:
for each charging event, capturing energy charged into the energy storage unit from one of a plurality of energy sources and an unit energy price of the charging source(s) at the time of charging;
updating a unit price of total energy stored in the storage unit at each time-step;
during a discharging event, updating the unit price of energy in the storage unit on a selected cost model;
determining a unit price of electricity (UPOE) as





  
    UPOE
    ⁡
    
      (
      k
      )
    
  
  =
  
    
      
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
        ×
        
          
            y
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
        ×
        
          
            y
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      ...
      +
      
        
          
            x
            n
          
          ⁡
          
            (
            k
            )
          
        
        ×
        
          
            y
            n
          
          ⁡
          
            (
            k
            )
          
        
      
    
    
      
        
          x
          1
        
        ⁡
        
          (
          k
          )
        
      
      +
      
        
          x
          2
        
        ⁡
        
          (
          k
          )
        
      
      +
      ...
      +
      
        
          x
          n
        
        ⁡
        
          (
          k
          )
        
      
    
  



where xn(k) represents a total stored amp-hour in the storage device from source n at time k and y is a rate for a generator;
comparing the unit price of energy in the storage unit with other generation sources in a microgrid and a utility tariff;
selecting a lowest cost combination from generation, storage, and grid and using the lowest cost combination to supply a load; and
if a controller decides to use stored energy at any time, sending a discharge command to the energy storage unit.

2. The method of claim 1, comprising generating an amp-hour cost model or a wart-hour cost model.

3. The method of claim 2, comprising generating a detailed cost model.

4. The method of claim 2, comprising generating a recursive cost model.

5. The method of claim 2, comprising generating a Peukert-based cost model.

6. The method of claim 1, comprising determining the unit price of electricity charge and discharge of the energy storage unit.

7. The method of claim 1, comprising charging or discharging with peak shaving and energy optimization.

8. The method of claim 1, comprising charging or discharging with energy optimization.

9. The method of claim 1, comprising charging or discharging with uninterruptible power supply (UPS) and energy optimization.

10. The method of claim 9, comprising providing one of: voltage-based end-of-discharge control and state of charge based end-of-discharge control.

11. The method of claim 1, comprising determining a unit price of electricity (UPOE) as




  
    UPOE
    ⁡
    
      (
      k
      )
    
  
  =
  
    
      
        
          
            
              
                
                  UPOE
                  ⁡
                  
                    (
                    
                      k
                      -
                      1
                    
                    )
                  
                
                *
                Total
                ⁢
                
                  
                
                ⁢
                
                  Ah
                  ⁡
                  
                    (
                    
                      k
                      -
                      1
                    
                    )
                  
                
              
              +
            
          
        
        
          
            
              
                
                  
                    electricity_
                    ⁢
                    cost
                  
                  1
                
                ⁢
                
                  (
                  k
                  )
                
                *
                charged
                ⁢
                
                  
                
                ⁢
                
                  
                    Ah
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              ...
              +
            
          
        
        
          
            
              
                electricity_cost
                n
              
              ⁢
              
                (
                k
                )
              
              *
              charged
              ⁢
              
                
              
              ⁢
              
                
                  Ah
                  n
                
                ⁡
                
                  (
                  k
                  )
                
              
            
          
        
      
      
        
          Total
          ⁢
          
            
          
          ⁢
          
            Ah
            ⁡
            
              (
              
                k
                -
                1
              
              )
            
          
        
        +
        
          charged
          ⁢
          
            
          
          ⁢
          
            
              Ah
              1
            
            ⁡
            
              (
              k
              )
            
          
        
        +
        ...
        +
        
          charged
          ⁢
          
            
          
          ⁢
          
            
              Ah
              n
            
            ⁡
            
              (
              k
              )
            
          
        
      
    
    .

12. The method of claim 1, comprising determining a unit price of electricity (UPOE) as




  
    UPOE
    ⁡
    
      (
      k
      )
    
  
  =
  
    
      
        UPOE
        ⁡
        
          (
          
            k
            -
            1
          
          )
        
      
      *
      Total
      ⁢
      
        
      
      ⁢
      
        Ah
        ⁡
        
          (
          
            k
            -
            1
          
          )
        
      
    
    
      Estimated
      ⁢
      
        
      
      ⁢
      Ah
      ⁢
      
        
      
      ⁢
      capacity
      ⁢
      
        
      
      ⁢
      
        (
        
          k
          ,
          p
        
        )
      
    
  



where p represents discharged power and Ah represents ampere hours.

13. A method for controlling an energy storage unit in a microgrid, comprising:
an energy storage unit having a model which tracks each charging instances;
a controller coupled to the energy storage unit, comprising code for:
capturing energy charged into the energy storage unit and an unit energy price of the charging source(s) at the time of charging for each charging event;
updating a unit price of total energy stored in the storage unit at each time-step;
during a discharging event, updating the unit price of energy in the storage unit on a selected cost model;
determining a unit price of electricity (UPOE) as






  
    UPOE
    ⁡
    
      (
      k
      )
    
  
  =
  
    
      
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
        ×
        
          
            y
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
        ×
        
          
            y
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      ...
      +
      
        
          
            x
            n
          
          ⁡
          
            (
            k
            )
          
        
        ×
        
          
            y
            n
          
          ⁡
          
            (
            k
            )
          
        
      
    
    
      
        
          x
          1
        
        ⁡
        
          (
          k
          )
        
      
      +
      
        
          x
          2
        
        ⁡
        
          (
          k
          )
        
      
      +
      ...
      +
      
        
          x
          n
        
        ⁡
        
          (
          k
          )
        
      
    
  



where xn(k) represents a total stored amp-hour in the storage device from source n at time k and y is a rate for a generator;
comparing the unit price of energy in the storage unit with other generation sources in the microgrid and a utility tariff;
selecting a lowest cost combination from generation, storage, and grid and using the lowest cost combination to supply a load; and
if a controller decides to use stored energy at any time, sending a discharge command to the energy storage unit.

14. The system of claim 13, comprising code for generating an amp-hour cost model or a wart-hour cost model.

15. The system of claim 14, comprising code for a detailed cost model.

16. The system of claim 14, comprising code for generating a recursive cost model.

17. The system of claim 14, comprising code for generating a Peukert-based cost model.

18. The system of claim 14, comprising code for determining a price of electricity (UPOE) based on ampere hour Ah as




  
    UPOE
    ⁡
    
      (
      k
      )
    
  
  =
  
    
      
        
          
            
              
                
                  UPOE
                  ⁡
                  
                    (
                    
                      k
                      -
                      1
                    
                    )
                  
                
                *
                Total
                ⁢
                
                  
                
                ⁢
                
                  Ah
                  ⁡
                  
                    (
                    
                      k
                      -
                      1
                    
                    )
                  
                
              
              +
            
          
        
        
          
            
              
                
                  
                    electricity_
                    ⁢
                    cost
                  
                  1
                
                ⁢
                
                  (
                  k
                  )
                
                *
                charged
                ⁢
                
                  
                
                ⁢
                
                  
                    Ah
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              ...
              +
            
          
        
        
          
            
              
                
                  electricity_
                  ⁢
                  cost
                
                n
              
              ⁢
              
                (
                k
                )
              
              *
              charged
              ⁢
              
                
              
              ⁢
              
                
                  Ah
                  n
                
                ⁡
                
                  (
                  k
                  )
                
              
            
          
        
      
      
        
          Total
          ⁢
          
            
          
          ⁢
          
            Ah
            ⁡
            
              (
              
                k
                -
                1
              
              )
            
          
        
        +
        
          charged
          ⁢
          
            
          
          ⁢
          
            
              Ah
              1
            
            ⁡
            
              (
              k
              )
            
          
        
        +
        ...
        +
        
          charged
          ⁢
          
            
          
          ⁢
          
            
              Ah
              n
            
            ⁡
            
              (
              k
              )
            
          
        
      
    
    .

19. The system of claim 14, comprising code for determining a price of electricity (UPOE) as




  
    UPOE
    ⁡
    
      (
      k
      )
    
  
  =
  
    
      
        UPOE
        ⁡
        
          (
          
            k
            -
            1
          
          )
        
      
      *
      Total
      ⁢
      
        
      
      ⁢
      
        Ah
        ⁡
        
          (
          
            k
            -
            1
          
          )
        
      
    
    
      Estimated
      ⁢
      
        
      
      ⁢
      Ah
      ⁢
      
        
      
      ⁢
      capacity
      ⁢
      
        
      
      ⁢
      
        (
        
          k
          ,
          p
        
        )
      
    
  



where p represents discharged power and Ah represents ampere hours.