HOMER Energy Support

Battery Control (discharge, charge, & operate as desired)

Last Updated: Jul 25, 2016 03:11PM MDT

Control of the batteries is one of the more nuanced corners of HOMER. Just like everything else in HOMER, battery control decisions are based on economics, but the reasons for HOMER's specific decisions are not always clear. There are many settings in HOMER that affect the charge, discharge, and operation of the batteries.

I. Settings that affect battery control

  1. Cycle charging or Load following. In the "System" tab, click on the "Project" button, and then the "System Control" tab. This controls when the battery charges.
    • Cycle charging dispatch strategy runs the generator(s) at full load whenever they are turned on. Excess power charges the batteries.
      • If you have selected a setpoint state of charge, the generator(s) will stay on and charge the batteries until they reach the setpoint.
      • If you do not choose a setpoint (uncheck the box for "Apply setpoint state of charge") the dispatch will reconsider whether to keep charging the batteries each timestep (see "Battery dispatch decisions" below). If the generator is not needed to supply the load for the current time step, and using the batteries is cheaper (also only considering the current time step), HOMER will turn off the generator and stop charging the batteries.
    • Load following dispatch strategy only runs the generators as needed to meet the load. Batteries are charged only with excess electricity. The batteries are discharged whenever it is the cheapest option (see "Battery dispatch desicions" below).
  2. Minimization option. Also in the "System Control" tab (see #1), you can choose Economic, Fuel, or Weight minimization. If you select "Fuel minimization", HOMER will set the battery energy and wear cost to zero (see "Battery dispatch decisions" below). This is intended for standalone systems with generators, batteries, and any renewable sources. This encourages HOMER to use the batteries more, which reduces fuel use in a generator-battery system. The impacts may be different in a grid-connected system.
     
  3. Battery Replacement Cost and Lifetime Throughput. You can change these parameters in the battery component menu. These affect the battery wear cost calculation (described below in "Battery dispatch decisions").
     
  4. Grid "Control parameters". In the grid component menu, in Real Time Rates or Scheduled Rates mode, you can set control parameters that change the battery behavior. These options are relatively straightforward. In Scheduled rates mode, you can set these options for each rate that you define. In Real time rates mode, you can set threshold prices for each option (for example, prohibit any battery charging above a grid price of $0.50). The last two parameters in this list are included for completeness and do not directly affect battery control:
    • Prohibit grid from charging battery: In any single time step, if HOMER is purchasing any energy from the grid, the batteries cannot be charging. In scheduled rates mode this will apply whenever the rate is scheduled. In real time rates mode this will apply whenever the power price exceeds the specified value.
    • Prohibit any battery charging when this rate is scheduled or when the real time power price exceeds the specified value.
    • Prohibit grid sales from battery: In any single time step, if HOMER is selling any energy to the grid, the batteries cannot be discharging (if the batteries are discharging, the system can't sell power to the grid).
    • Prohibit any battery discharging when this rate is scheduled or when the real time power price is below the specified value.
    • Prohibit any grid sales when this rate is scheduled or when the real time sellback price is below the specified value.
    • Outage: prohibit grid purchases or sales: The grid is turned off when this rate is scheduled. In real time power price mode, you can accomplish this by setting power price in the imported file to "-999.0" for the time steps when you want the grid turned off.

 

II. Battery dispatch decisions

Like all dispatch decisions, battery dispatch is decided by economics. Battery charging is decided as described above under "Cycle charging or Load following" above. Here we will discuss how HOMER decides to discharge the batteries.

Each time step, HOMER computes a cost of discharging the batteries, compares it to the cost of each other available power source, and chooses the lowest-cost combination that meets the load (or the combination which serves the largest portion of the load if it can't be met). The cost of discharging the batteries is the sum of the "battery energy cost" and the "battery wear cost".

 

Battery energy cost, Cbatt,Energy,n is the average cost that the system has incurred for deliberately charging the battery bank in all time step before time step n:

Ccc,i is the "cost of cycle charging" is the extra cost incurred by the system specifically for charging the battery in time step i. If the batteries are charged with excess energy (i.e. excess renewable output) the energy cost is zero. The battery energy cost under the load following control strategy is always zero, since it only charges the batteries with excess (free) energy. Ecc,i is the quantity of energy put into the batteries in time step i.

Battery wear cost, Cbatt,Wear is the battery replacement cost divided by the lifetime throughput of the battery:

Cbatt,repl is the replacement cost of the battery, and Qlifetime is the lifetime throughput. The battery efficiency ηrt is also taken into account in this calculation. If the battery life is specified as float life (calendar life) only, the wear cost is zero.

If Cbatt,discharge is lower than the alternatives, HOMER will discharge the batteries. If it is higher, HOMER will use the other, cheaper generator sources first.

 

III. I want my batteries to...

Charge: My batteries won't charge. How do I make them charge? If you are using load following control strategy HOMER will only charge the batteries when there is excess energy. Regardless of the dispatch strategy, excess energy will always go to charge the batteries (if they aren't already full). If you are using cycle charging, the generators will operate at full load (when turned on) and the excess energy will charge the battery. The generators will turn on when the load can't be met with other generation sources.

Discharge: HOMER won't use my batteries -- they just stay full. How do I make HOMER use them? HOMER will only discharge the batteries when that is the lowest-cost way to meet the load. See battery dispatch decisions, above, for a discussion of battery cost calculations and dispatch decisions. A high replacement cost or low lifetime throughput can make the cost of discharging the batteries too high, so HOMER won't do it. You can test this by setting the replacement cost to zero and seeing if it changes the results. Alternately, only in cycle charging mode, the battery energy cost might be too high if the batteries were charged at a high marginal cost. Several situations can cause this to happen -- certain grid schedules, generator specifications, or fuel prices are possible causes. You can determine if this is the problem by looking at the battery energy cost over time. Go to simulation results (double click a row in the optimization table) and click "Plot..." to view the time series results. Check the box for "[battery] Energy Cost" (i.e. "Generic 1kWh Lead Acid Energy Cost"). This will plot the battery energy cost at each time step. If the battery energy cost is higher than the cost of turning on a generator or purchasing from the grid, HOMER won't discharge the battery. The battery energy cost is zero at the start of the simulation, so a step up in battery energy cost may indicate the charging event that led to the high battery energy cost.

Store my renewable generation: HOMER will first use renewable generation to meet the load. HOMER will charge the batteries before selling to the grid. Any excess electricity will always charge the batteries. If wear costs are set too high, HOMER might not choose to discharge the batteries to meet your load (see "Discharge" above).

Peak shave: Peak shaving requires the Advanced Grid module. Some rate structures include a demand charge based on the highest power you purchase from the grid. Reducing the highest peak(s) of grid purchases can reduce the demand charge. You can set up peak shaving in a model with a grid, battery, load and any other components. Start with just a grid, battery, and load. In the Grid menu, in Real Time rates or Scheduled rates mode, choose the Demand Rates tab. Then "Edit..." the rate, and select "Keep battery fully charged".

In the grid component menu, in real time rates or scheduled rates mode, you can enter values for the perchase capacity into your search space. The default is a very large purchase capacity (i.e. 1 GW). Start by running your model without changing this value. Look at the simulation results (double click a row in the optimization table) and go to the "Grid" tab. Notice the column in the table for "Peak Demand (kW) and note the values (the overall annual value is at the bottom of the table). Now return to the grid menu and enter several values for purchase capacity, starting with the peak demand you noted, and going lower. This will cut off the demand peaks to the level you specify here. Click calculate, and HOMER will try simulations for each value you enter. Values of purchase capacity that are too low may not be able to meet the load (which may produce an infeasible result), or may turn on a generator if you have any. If the demand charges are high enough and the battery wear costs are low enough, the lowest feasible purchase capacity will be the optimal solution. Adjust the search space to find the lowest feasible purchase capacity, thus minimizing the demand charge.

You can also include a search space on the number of batteries to investigate the cost tradeoff between more batteries and a lower purchase capacity (thus lower demand charge), and fewer batteries and a higher purchase capacity (higher demand charge but less cost of batteries).

Prevent capacity shortage: If you are designing a system served by an unreliable grid, you might consider a battery bank to supply backup power. You also might use batteries just to serve the load peaks, or just for operating reserve.

HOMER uses the batteries whenever they are the "lowest cost" option, with costs estimated using the methods described above, but HOMER never looks into the future, nor does it plan for scheduled generator maintenance or random grid outages.

If your batteries are used to prevent capacity shortage (rather than for arbitrage or energy cost savings), you may want to tell HOMER to keep the batteries as fully charged as possible so they are ready to prevent a capacity shortage. You can do this with the "Keep battery fully charged" setting described above in "Peak Shave". You can select this in the Demand Rates tab, under the Rate Properties menu accessed by the "Edit..." button. The option is only available for systems with a Grid.

Grid arbitrage: This requires the Advanced Grid module. In your model, you need at least a grid, battery, converter, and load. Choose the "cycle charging" dispatch strategy and make the setpoint 100% (in the System tab, Project, System control tab). You need to have a load, but if you don't want it you can make it very small -- a constant DC load at 0.1 kWh per day should work. You can use the grid in scheduled rates mode or real time rates mode.

  • Scheduled rates: Set peak and off-peak rates (and shoulder rates etc., if desired). For peak rate(s), select the control parameter "Prohibit grid from charging battery". For the off-peak rate(s), set the control parameter for "Prohibit grid sales from battery".
  • Real time rates: Import your price time-series file. Check the control parameters for "Prohibit grid from charging battry above a price of ($/kWh)" and "Prohibit grid sales from battery below sellback rate of ($/kWh)". You can set these to the same price, and you can adjust it to find the optimal price.

 

 

See also:

http://support.homerenergy.com/index.php?/Knowledgebase/Article/View/124/0/10115---homer-battery-operation

http://support.homerenergy.com/index.php?/Knowledgebase/Article/View/275/0/10149---lf-versus-cc-in-homer

http://support.homerenergy.com/index.php?/Knowledgebase/Article/View/21/0/10086---failure-criteria-for-batteries-in-homer

http://support.homerenergy.com/index.php?/Knowledgebase/Article/View/94/0/10078---selling-vs-storing-electricity-in-homer

http://support.homerenergy.com/index.php?/Knowledgebase/Article/View/265/0/10274---simulating-a-fuel-cellbattery-system-in-homer

http://support.homerenergy.com/index.php?/Knowledgebase/Article/View/129/0/10127---how-homer-operates-grid-battery-systems

6924ac4808f5d29ae43f4a51e5c6646f@homerenergy.desk-mail.com
http://assets0.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete