-
-
Notifications
You must be signed in to change notification settings - Fork 6
battery charging economics
When using a battery system, it's crucial to consider the cost of wear and tear associated with charging and discharging the battery. This cost is referred to as depreciation per kWh, and understanding it allows you to determine the minimum price difference (charging vs. discharging) that makes it economically viable to charge the battery.
The battery wear cost for each kWh of energy charged and discharged. It accounts for the battery's purchase price, capacity loss over its lifetime, the number of charge/discharge cycles it can handle, and the total energy throughput.
For LiFePO4 batteries, a cycle is one complete charge and discharge:
- A full cycle: charged from 0% to 100% and discharged back to 0%.
- Partial cycles also count. E.g., charging from 50% to 100% and back to 50% = half a cycle. Two partial 50% cycles = one full cycle.
LiFePO4 batteries are designed for 6,000–8,000 full cycles before capacity degrades significantly (typically 20–30% reduction).
Measures how much of the battery's total capacity is used during a cycle. A 70% DoD means only 70% of the battery's energy is used, which increases overall lifespan compared to 100% DoD.
This model calculates depreciation per kWh assuming:
- Full cycles (100% DoD).
- Uniform capacity loss (degeneration) over the battery's lifetime.
- No operational inefficiencies (e.g., energy conversion losses).
Let:
| Symbol | Parameter | Description |
|---|---|---|
| Purchase price | Total battery system cost (in your currency) | |
| Capacity loss | Maximum capacity reduction over lifetime as a fraction, e.g. |
|
| Number of cycles | Total expected complete charge/discharge cycles | |
| Battery capacity | Total usable energy storage in kWh | |
| Depreciation per kWh | Battery wear cost per kWh |
The simplified depreciation per kWh is:
Parameters for a LiFePO4 battery system:
- Purchase Price: 48,000 DKK
-
Capacity Loss: 30% (
$L = 0.30$ ) - Number of Cycles: 6,000 full cycles
- Battery Capacity: 10 kWh
Each kWh stored and discharged through the battery costs 0.24 DKK in wear and tear.
To make charging economically viable, the price difference between charging and discharging must exceed the depreciation cost:
For example, if charging electricity costs 1.00 DKK/kWh:
- Partial Cycles & DoD: The calculation assumes 100% DoD. Real-world usage involves partial cycles that extend battery life.
- Efficiency Losses: Charging/discharging involve 5–15% energy loss in the battery and inverter not accounted for here.
- Operating Conditions: Temperature, charging speed, and discharging rate impact battery lifespan.
- Time-Based Degradation: Batteries degrade over time even when not cycled.
- Maintenance Costs: Does not include potential maintenance or replacement costs for inverters or BMS.
For a more accurate assessment, include DoD, conversion losses, and real-world operating conditions in a comprehensive analysis.
HSEM uses a round-trip cycle-cost formula in the Excess Battery Export feature and battery schedule economics. The recommended threshold is calculated automatically during configuration using the battery purchase price, expected cycles, capacity loss, usable capacity, efficiency, and grid-fee inputs you provide.
Let:
| Symbol | Parameter | Description |
|---|---|---|
| Purchase price | Battery system purchase price | |
| Capacity loss percent | Lifetime capacity loss percentage | |
| Expected cycles | Expected full-cycle lifetime | |
| Usable capacity | Usable battery capacity in kWh | |
| Cycle cost per kWh | HSEM battery wear cost per kWh |
The canonical HSEM cycle-cost formula is:
The
- Home — User-facing overview: features, FAQ, working modes, battery schedules, excess export, consumption sensors
- Battery Charging Economics — How to calculate the minimum charging price for a battery schedule
- Architecture Overview — System context, layered architecture, module map, planning pipeline
- Planner Specification — Normative — all planner invariants, rules, and constraints
- Planner Technical Guide — How the planner works with worked examples
- Cost Function Math — Complete mathematical formulation of the 8-term cost function
- Energy Accounting — Physical energy flow model, SoC simulation, efficiency math
- Candidate Generation — How candidates are generated, assumptions, partial-SoC
- MILP Optimization — Full LP formulation, variable layout, constraints, and solver pipeline
- Consumption Prediction — Weighted-average model, IQR outlier detection, spike suppression
- Safety Modes — Degraded mode, read-only gate, write-verify applier, runtime resolver
- Price Scaling — EDS price scaling, eds_share conversion factor
- Services Reference — All 4 HSEM services with examples
- Sensors Reference — Complete entity reference: all sensor, select, switch, number, and time entities
- Dashboard Setup — Step-by-step ApexCharts dashboard with full YAML, layout reference, and troubleshooting
- Config Flow Reference — Every config/options flow step and field
- EV Charge Plan Setup — EV planned load configuration guide
- EV Surplus Charging Automation — Wire your physical EV charger (go-e, Easee, Zaptec) to follow HSEM surplus recommendations
- EV Optimal Charging Template — Legacy Home Assistant template sensor for cost-optimal EV charging
- Forecast Accuracy Tracking — Forecast vs actual tracking system
- Huawei Entities — Canonical HA entity ID reference
- Troubleshooting Guide — Diagnose and fix common problems: missing data, wrong prices, write failures, battery behaviour
- Quality Checks — Static quality tools and CI configuration