Introduction
Imagine a home or commercial building with:
- Solar panels
- LiFePO4 battery storage
- Hybrid inverter
- Time-of-use electricity pricing
Electricity is inexpensive at 2:00 a.m.
Solar energy will become available several hours later.
Should the battery charge to 100% from the grid overnight?
Not always.
If the battery is already full when the sun rises, there may be little room available to store free or low-cost solar energy.
But if the system avoids grid charging completely, the customer may not have enough backup energy if the morning is cloudy or a power outage occurs.
This creates a more interesting question:
How much should a LiFePO4 battery charge from the grid before the solar day begins?
The correct answer depends on electricity price, expected solar generation, battery capacity, load profile and backup requirements.
What Is Time-of-Use Charging?
Time-of-use, or TOU, electricity pricing divides the day into periods with different electricity prices.
Typical categories may include:
- Off-peak
- Standard
- Peak
A battery can take advantage of these differences.
The basic strategy is:
Charge when electricity is inexpensive.
Discharge when electricity is expensive.
This is sometimes called:
energy arbitrage
However, solar energy adds another variable.
If solar panels can recharge the battery for much of the day, excessive grid charging may reduce solar utilization.
The Simplest Strategy Is Not Always the Best
A basic inverter setting might say:
02:00–05:00: Charge battery to 100% from grid
This guarantees high morning SOC.
But consider what happens at sunrise.
The battery is already full.
Solar production increases.
House loads use only part of the solar energy.
If export is not allowed, the remaining solar power may be curtailed.
In this situation, cheap overnight electricity has replaced energy that could have been provided by solar.
Leaving Battery Headroom for Solar
“Battery headroom” means unused battery capacity available for future charging.
Suppose a 20kWh battery begins the morning at: 60% SOC
Available capacity before 100%: 40%
Approximate storage headroom:
20kWh × 40% = 8kWh
If the solar system expects approximately 8kWh of surplus energy during the morning, this may be a useful operating strategy.
The battery can absorb solar instead of reaching full charge before sunrise.
Example: 20kWh Home Battery
Assume:
Battery capacity: 20kWh
SOC at midnight: 20%
Overnight backup requirement: low
Expected surplus solar tomorrow: 8kWh
Instead of grid-charging from 20% to 100%, the system might charge from:
20% → 60%
Energy added from grid:
20kWh × 40% = 8kWh
Remaining battery headroom:
20kWh × 40% = 8kWh
During the next day, solar can potentially fill much of the remaining capacity.
This is a simplified example, but it demonstrates the principle.
But What If Tomorrow Is Cloudy?
This is where fixed charging schedules become less effective.
If the system expects strong sunshine but the weather becomes cloudy, the battery may remain at a low SOC.
The customer may then have insufficient energy for:
- Evening loads
- Peak-price periods
- Backup operation
More advanced energy management systems can adjust grid charging according to:
- Solar forecast
- Historical consumption
- Weather forecast
- Electricity price
- Required backup reserve
This is sometimes called:
forecast-based energy management
Backup Reserve Changes Everything
Consider two customers.
Customer A
Has a very reliable utility grid.
The battery is mainly used to reduce electricity cost.
Customer B
Experiences frequent power outages.
The battery is primarily emergency backup.
Customer A may comfortably begin the day at a lower SOC to maximize solar charging.
Customer B may prefer a high minimum SOC because:
An outage can happen before the solar panels have recharged the battery.
Therefore, the economically cheapest charging strategy is not always the operationally safest strategy.
What Is a Backup Reserve?
A backup reserve is the battery capacity intentionally kept available for emergency use.
For example:
Battery capacity: 20kWh
Backup reserve: 30%
Approximate reserve energy:
20kWh × 30% = 6kWh
The normal TOU strategy should avoid using this portion unless:
- Grid fails
- Emergency condition occurs
Some hybrid inverters allow separate configuration of:
- Normal minimum SOC
- Backup SOC
- Grid charging target
These controls can make TOU operation much more flexible.
Grid Charging vs Solar Charging Cost
Grid energy has a direct monetary cost.
Solar energy may have a much lower marginal cost once the PV system is installed.
Therefore, if both sources can charge the same battery, it is generally useful to prioritize solar when sufficient production is expected.
However, grid charging may still make economic sense when:
- Off-peak tariff is very low
- Peak tariff is very high
- Solar forecast is poor
- Backup reserve is required
The decision should be based on the complete daily energy cycle.
Do Not Forget Conversion Losses
Suppose off-peak electricity costs less than peak electricity.
It may seem profitable to:
- Charge battery from grid at night.
- Discharge battery during peak price.
But the system loses some energy through:
- AC/DC conversion
- Battery charging
- Battery discharging
- DC/AC conversion
Therefore, the price difference must be large enough to compensate for:
- Round-trip energy losses
- Battery degradation cost
- Other system operating costs
For commercial projects, this should be calculated rather than assumed.
Solar Should Usually Supply Loads First
A common control priority is:
- Solar supplies active loads.
- Excess solar charges battery.
- Remaining solar is exported or curtailed.
Why?
Direct solar consumption avoids unnecessary battery conversion.
For example:
PV → AC load
usually requires fewer energy conversions than:
PV → battery → inverter → AC load
Therefore, solar self-consumption can improve overall system efficiency.
A Practical Daily Schedule
A residential ESS may operate like this:
00:00–05:00
Electricity is off-peak.
Battery grid-charges only to a calculated morning target.
06:00–09:00
Battery supports early-morning household demand if required.
09:00–15:00
Solar supplies loads and charges the battery.
17:00–22:00
Battery discharges during expensive electricity periods.
Late Night
System returns to off-peak grid operation.
This type of strategy uses both:
solar energy and electricity price differences
Why 100% Is Not Always the Best Grid-Charging Target
If the battery is always charged to 100% from the grid overnight, three things can happen.
Less Room for Solar
Morning PV cannot charge the battery.
Increased Grid Consumption
The customer buys energy that solar could have supplied later.
Longer Time at High SOC
Depending on application, the battery may spend many hours at very high SOC unnecessarily.
However, keeping a high SOC may still be justified where backup reliability is the main priority.
The correct target depends on the project.
Commercial Peak Shaving
Commercial battery systems often use TOU charging differently.
Consider a factory with:
- Cheap night electricity
- High afternoon tariff
- Large peak demand
The battery may charge overnight and discharge during the afternoon peak.
The goal is not only to reduce energy cost.
It may also reduce: maximum grid demand
where applicable to the local tariff structure.
This is called: peak shaving
For commercial customers, peak shaving can sometimes provide more value than residential-style backup operation.
Solar + Peak Shaving Requires Headroom
Suppose a commercial building has significant rooftop solar.
If the battery charges fully overnight, it cannot absorb midday solar surplus.
One possible strategy is to divide battery capacity into different functions:
- Backup reserve
- Solar storage capacity
- Peak-shaving capacity
The exact allocation can change according to:
- Season
- Weather
- Electricity price
- Expected load
This is one reason large ESS projects increasingly use energy management systems rather than fixed battery settings.
Example: 50kWh Commercial Battery
Suppose:
Battery capacity: 50kWh
Emergency reserve: 20%
Expected surplus solar: 15kWh
Peak-period requirement: 20kWh
A possible strategy might preserve:
- 10kWh for backup
- 15kWh of space for solar
- Remaining usable energy for tariff management
The exact SOC schedule must be calculated from real load data.
But this illustrates why “charge to 100% every night” can be too simplistic.
What Happens During Rainy Seasons?
A charging strategy that works perfectly in summer may fail during rainy months.
If solar production becomes unreliable, the system may need more grid charging.
Therefore, TOU settings can be:
- Seasonal
- Forecast-based
- Manually adjusted
Distributors should explain to customers that ESS settings may need optimization after several weeks of real operating data.
Dynamic Electricity Pricing Adds More Complexity
Some markets have electricity prices that vary more frequently than traditional day/night tariffs.
In such systems, the battery may charge during the cheapest hours and discharge during high-price periods.
A sophisticated EMS can evaluate:
- Current price
- Expected future price
- Solar forecast
- Load forecast
- Current SOC
before deciding whether to charge.
This transforms the battery from simple backup equipment into an active energy-management asset.
Do Not Cycle the Battery Without Economic Benefit
One potential mistake is programming the battery to charge and discharge every day simply because it can.
Every battery cycle has some long-term degradation cost.
If the electricity price difference is extremely small, unnecessary grid arbitrage may provide little benefit.
For commercial ESS calculations, consider:
- Electricity savings
- Conversion losses
- Cycle life
- Battery replacement cost
The purpose is to maximize economic value, not simply maximize daily cycling.
Important Inverter Settings
Depending on the inverter, TOU operation may involve parameters such as:
- Grid charge enable
- Charge time
- Target SOC
- Minimum SOC
- Backup reserve
- Discharge schedule
- Peak-shaving power
- Grid export limit
Different brands use different terminology.
Always confirm whether the setting controls:
battery SOC or battery voltage
because they are not equivalent.
BMS Communication Improves TOU Control
Accurate SOC is important for scheduled charging.
If the inverter receives battery information through CAN or RS485, it may have access to:
- SOC
- Battery voltage
- Maximum charge current
- Maximum discharge current
- Protection status
Without communication, the inverter may estimate SOC from voltage.
LiFePO4 has a relatively flat voltage curve through much of its operating range, making voltage-only SOC estimation less precise.
For advanced TOU operation, reliable BMS communication is therefore useful.
Questions to Ask Before Setting the Schedule
For distributors and EPC contractors, collect:
- Battery capacity
- PV capacity
- Daily energy consumption
- Daytime consumption
- Nighttime consumption
- Peak electricity price
- Off-peak electricity price
- Typical solar production
- Required backup time
- Minimum acceptable emergency SOC
Then build the charging strategy around the customer’s real objectives.
Three Different Customers, Three Different Strategies
Solar Self-Consumption Customer
Priority:
Use as much solar energy as possible.
Morning SOC can be relatively low to leave room for solar.
Backup Customer
Priority:
Maximum emergency energy.
Battery may remain at higher SOC.
TOU Commercial Customer
Priority:
Reduce electricity cost and peak demand.
SOC varies according to price and load schedule.
The same LiFePO4 battery can therefore use very different charging strategies.
Common TOU Charging Mistakes
Avoid:
- Charging to 100% every night without checking solar forecast
- Setting morning SOC too low in outage-prone areas
- Ignoring battery round-trip losses
- Ignoring active loads during charging
- Cycling battery when price difference is too small
- Using voltage-only SOC for precise energy scheduling
- Forgetting seasonal solar variation
The goal is not to create the most complicated schedule.
The goal is to create a schedule that matches the customer’s real energy needs.
Conclusion
In a solar-plus-storage system, the question is no longer simply:
“Can the grid charge the LiFePO4 battery?”
A better question is:
“When should the grid charge it, and how much capacity should be left for solar?”
For TOU energy storage, an effective charging strategy balances:
- Off-peak electricity
- Solar production
- Peak tariffs
- Backup reserve
- Battery capacity
- Daily consumption
Charging to 100% overnight may be correct for one project and inefficient for another.
HIZN provides LiFePO4 energy storage batteries with CAN/RS485 communication for residential, commercial and off-grid energy systems.
Send us your battery capacity, PV size, inverter model, electricity tariff periods and daily energy consumption. We can help evaluate a practical charging configuration for your ESS project.