Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

How to prevent grid charging when using `TrackChargeDischargeSchedules` in `ElectricLoadCenter:Distribution`?

asked 2026-03-05 08:10:18 -0500

Behnam's avatar

updated 2026-03-05 18:16:09 -0500

Hello EnergyPlus developers and users,

I have implemented a large-scale photovoltaic (PV) system with battery storage and defined specific schedules for charging and discharging. A relevant portion of the IDF file is provided below.

Thank you very much for your time and assistance. From the documentation and prior discussions, I understand that enabling scheduled battery charging and discharging requires using TrackChargeDischargeSchedules as the Storage Operation Scheme in the ElectricLoadCenter:Distribution object.

However, the issue I am encountering is that TrackChargeDischargeSchedules appears to allow the battery to charge using electricity from the grid, which is not my objective.

In my case, the battery capacity is relatively large. On sunny days, the battery can be fully charged during the scheduled period using PV generation alone. However, I would like to avoid any charging from the grid. If PV production is insufficient (e.g., on cloudy days), I prefer the battery to remain partially charged rather than drawing electricity from the grid.

I would greatly appreciate any guidance on how to configure the system so that the battery follows the specified charging and discharging schedules while being charged exclusively from on-site renewable generation (e.g., PV), without importing electricity from the grid.

Schedule:Compact, ALWAYS_ON, !- Name On/Off, !- Schedule Type Limits Name Through: 12/31, !- Field 1 For: AllDays, !- Field 2 Until: 24:00,1; !- Field 3

ElectricLoadCenter:Storage:Converter, Converter 1, !- Name ALWAYS_ON, !- Availability Schedule Name SimpleFixed, !- Power Conversion Efficiency Method 0.95, !- Simple Fixed Efficiency , !- Design Maximum Continuous Input Power {W} , !- Efficiency Function of Power Curve Name 20, !- Ancillary Power Consumed In Standby {W} , !- Zone Name 0.25; !- Radiative Fraction

ElectricLoadCenter:Storage:LiIonNMCBattery, NMC_Battery, !- Name ALWAYS_ON, !- Availability Schedule Name , !- Zone Name 0.0, !- Radiative Fraction KandlerSmith, !- Lifetime Model 13, !- Number of Cells in Series 80, !- Number of Strings in Parallel 0.7, !- Initial Fractional State of Charge , !- DC to DC Charging Efficiency 80, !- Battery Mass {kg} 10, !- Battery Surface Area {m2} 0.95, !- Maximum Storage State of Charge Fraction 0.20; !- Minimum Storage State of Charge Fraction

ElectricLoadCenter:Inverter:LookUpTable, Electric Load Center Inverter Simple 1, !- Name ALWAYS_ON, !- Availability Schedule Name , !- Zone Name 0.25, !- Radiative Fraction 14000, !- Rated Maximum Continuous Output Power {W} 200.0, !- Night Tare Loss Power {W} 368, !- Nominal Voltage Input {V} 0.839, !- Efficiency at 10% Power and Nominal Voltage 0.897, !- Efficiency at 20% Power and Nominal Voltage 0.916, !- Efficiency at 30% Power and Nominal Voltage 0.931, !- Efficiency at 50% Power and Nominal Voltage 0.934, !- Efficiency at 75% Power and Nominal Voltage 0.930; !- Efficiency at 100% Power and Nominal Voltage

ScheduleTypeLimits, Fraction, !- Name 0.0, !- Lower Limit Value 1.0, !- Upper Limit Value CONTINUOUS; !- Numeric Type

Schedule:Compact, Charge Schedule, !- Name Fraction, !- Schedule Type Limits Name Through: 12/31, !- Field 1 For: AllDays, !- Field 2 Until: 10:00,0.0, !- Field 3 Until: 14:00,1.0, !- Field 5 Until: 24:00,0.0; !- Field 5

Schedule:Compact, Discharge Schedule, !- Name Fraction, !- Schedule Type Limits Name Through: 12/31, !- Field 1 ...

(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2026-03-09 03:34:39 -0500

Behnam's avatar

Thank you @shorowit, for your reply. I tried the TrackFacilityElectricDemandStoreExcessOnSite but I noticed this is not the schedule that satisfies my objectives, since it does not work well with the schedules for charging/discharging. For example, during a specific time period (when electricity prices are low or demand is low), I want all the renewable generation to be stored in the storage.

I noticed when you set Design Maximum Continuous Input Power {W}, Ancillary Power Consumed In Standby {W}, and Radiative Fraction to zero for ElectricLoadCenter:Storage:Converter, the connection for getting electricity from the grid to be stored in the batteries will be zero and blocked.

With the below setup, my desired operation of interaction between battery, PV, and schedules is working:

ElectricLoadCenter:Storage:Converter, Converter 1, !- Name ALWAYS_ON, !- Availability Schedule Name (Use your existing schedule) SimpleFixed, !- Power Conversion Efficiency Method 0.95, !- Simple Fixed Efficiency 0.0, !- Design Maximum Continuous Input Power {W} , !- Efficiency Function of Power Curve Name 0.0, !- Ancillary Power Consumed In Standby {W} , !- Zone Name 0.0; !- Radiative Fraction

Thank you very much for your time, support, and assistance.

Sincerely, Behnam Mohseni Gharyehsafa Maynooth University, Ireland

edit flag offensive delete link more
0

answered 2026-03-08 12:54:16 -0500

Have you tried using TrackFacilityElectricDemandStoreExcessOnSite for the Storage Operation Scheme? As per the documentation:

TrackFacilityElectricDemandStoreExcessOnSite indicates that storage control will follow the facility power demand (meter Facility:Electricity) while accounting for any on-site generation. Only excess on site generation gets stored. This is the legacy control behavior before version 8.5 and is the default.

Maybe there is a reason you are trying to use a schedule, but the schedule appears to simply try to charge from PV during the day and discharge after the sun goes down. That's basically what the default option will do as well, except that it will only ever charge from the PV.

edit flag offensive delete link more

Comments

Thank you @shorowit for your message,I have checked my simulation and I guess it is working fine, Apology for interruption,I have a portion of my simulation including the eso, htm, and the idf file in the link below,would you kindly let me know whether there exist a problem:

https://drive.google.com/drive/folder...

The rule here based on the requirement of the project is to charge the batteries only with PV,and discharge the battery only for the building.The charge and discharge schedule is indexed in the IDF file.

Thank you for your time and help

Behnam's avatar Behnam  ( 2026-03-18 06:07:20 -0500 )edit

and for the hours of charging the batteries, I put all the generated electricity (not excess) for the battery.

Behnam's avatar Behnam  ( 2026-03-18 06:09:30 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Sponsor

Training Workshops

Question Tools

1 follower

Stats

Asked: 2026-03-05 08:10:18 -0500

Seen: 159 times

Last updated: Mar 09