How does energie27 calculate? The model
An hourly model of one household: 8,760 hours (365 × 24) with generation, consumption, battery and car, then consumption from and feed-in to the grid × the price of that hour. It runs entirely in the browser (TypeScript, no libraries); only postcode, orientation and tilt go through our server to PDOK and PVGIS. The explanation in plain language is in How does this calculator work?; this page is also available as A4 (pdf) download.
Input: 27 parameters
- Solar panels (8): number of panels, watt peak, orientation, kWh per kWp, age, degradation per year, measured annual yield and the distribution over the months.
- Household (7): annual consumption, workdays at home during the day, share of the shiftable consumption that runs smart, holidays, the day share, the weekend share and the night share.
- Car (5): annual consumption, charging moment, charging power, three phases and workdays the car is at home during the day.
- Heat pump and air conditioning (2): the annual consumption of each.
- Battery (3): capacity, power and losses (round-trip loss, standby, usable share, AC or DC).
- Year (1): the year whose hourly KNMI weather distributes the generation; the public holidays also come from that year.
- Meter (1): the start of the off-peak rate on workdays, 23:00 or 21:00.
Calibration tunes four of them to the annual statement: annual consumption, the day share, the weekend share and the night share (see below). That is the starting point for simulating all scenarios. Contract and prices are added separately.
Hourly balance
net = consumption + car + heat pump + air conditioning + standby + battery charging − generation − battery discharging
consumption = max(net, 0) and feed-in = max(−net, 0), for every hour
within the hour: consumption from the grid and feed-in each + 0.18 × min(consumption, generation)
The meter counts per moment, the model per hour. In an hour with both consumption and generation, 0.18 × the smaller of the two therefore goes back and forth through the grid (the kettle briefly above generation, a cloud); a battery absorbs this with the power left over in that hour, without changing its charge. Measured with per-minute household data (Open Power System Data): without this correction consumption from the grid was 7% too low, self-consumption 4 to 8 percentage points too high and battery savings 15% too low; with the correction it is within about 2%.
Hourly prices: the day-ahead prices (EnergyZero), converted to Dutch time. The duplicate hour in October is averaged, the missing hour in March copied; 29 February is dropped. Since the market prices per quarter hour, the hourly price is the average of the four quarter-hour prices; only a smart battery calculates per quarter hour within the hour (see below).
Generation
annual yield = panels × watt peak × kWh per kWp × (1 − age × degradation)
- The kWh per kWp and the monthly distribution come from PVGIS 5.3 (14% system losses, no shade); east-west is the average of two calculations. Without PVGIS: 1,000 kWh per kWp × a factor for orientation and tilt.
- The months are redistributed with the sunshine KNMI measured in the year of the hourly prices: weight = base × max(0, 1 + 0.85 × (sun ÷ normal − 1)), then normalized so the annual yield stays the same. The 0.85: sunny years are warmer and KNMI measures on a flat surface.
- The shape over the day is a solar arc, sin(πx) to the power 1.3 × a Gaussian weighting around solar noon, shifted by orientation (1.2 hours for south-east and south-west, 2.4 hours for east and west). For any orientation other than south the arc itself is skewed (time warped with a power), so the peak really falls at that hour: checked against the position of the sun and the meter of an east-facing roof. Each hour is scaled by the measured global radiation (KNMI, hourly values) relative to the monthly average for that hour, at most 5×; each month is then brought back exactly to the monthly yield.
- Measured annual yield is converted to a normal year with the sunshine at the three nearest KNMI stations, weighted by 1 ÷ distance.
Consumption
- The shape over the day comes from the Dutch standard profile (NEDU E1A, households without feed-in): per month a shape for workdays, Saturday and Sunday. On 0 to 5 workdays someone is home during the day; the shape is then adjusted by the ratio of our own profile for home and for away to their average (the standard profile is an average household, home 2 of 5 workdays). The weekend counts as home. A monthly factor from 0.86 in summer to 1.20 in December; a weekend day uses 5% more than a workday. The annual total stays the same.
- Public holidays (New Year's Day, Easter Monday, Whit Monday, King's Day, Ascension Day and both Christmas days) count as Sunday: at home, off-peak all day and the car at the charger as at weekends.
- Holidays: without input the expectation, each day a chance that the house is empty, with on average 19.6 holiday days a year (CBS: 13.4 from April to September, 6.2 from October to March), mostly in summer and the May holiday. With input 0 to 4 weeks per month, in the middle of the month, or none. On a holiday day 30% standby consumption, flat over the day (with a base load only that); the other days scale up.
- Base load (optional, in watts): the same every hour, also on holiday, at most 90% of household consumption; the rest follows the daily profiles.
- Shiftable consumption (washing machine, dishwasher and dryer: 530 kWh per year, at most 30%) goes greedily to the hours with the largest solar surplus, at most 2 kW per hour; with a dynamic contract the rest goes to the cheapest hours.
- Heat pump: the annual consumption you enter, or an estimate from gas: (gas − cooking) × 8.79 kWh per m³ × 0.9 ÷ SCOP (3.5 with radiators, 4.2 with underfloor heating). A fixed monthly distribution (17% in January, 2% in the summer months) and a daily profile; 25% (hot water) is shiftable, if the hot water comes from the heat pump.
- Water heater (under Hot water: heat pump water heater or electric water heater): by default 700 or 2,200 kWh per year, about the same every day (10% more in winter, 10% less in summer). Without control it heats up at 7–9 and 18–21 h. Smart-controlled it goes to the solar surplus first, at the power of the water heater (0.5 kW, electric 2 kW), and the rest to the cheapest hours of that day (without hourly prices at night). It shifts within a day, not across days.
- Air conditioning: m² × 50 to 90 W per m² × 400 full-load hours ÷ SEER 5.5; from May to September, mainly between 15:00 and 17:00, scaled per day by that day's sun.
Electric car
0.17 kWh per km, including charging losses. In the evening: from 18:00 at full power. During the day: up to 3.7 kW from 10:00. On solar surplus: the hours with the largest surplus, from 1.4 kW (4.1 kW for a charger that does not switch to 1 phase). On hourly price: sessions of 20 kWh (within a month) in the cheapest hours when the car is at home (weekends unless the car is away during the day then). Controlled by the supplier: the same sessions, spread evenly over the cheapest half of those hours, with at most a third of the charging power.
Home battery
- Efficiency per direction is the square root of (1 − round-trip loss), default 10% round-trip loss; 90% of capacity usable; 30 W standby; DC-coupled charging from solar × 1.06.
- Self-consumption: greedy per hour, charge surplus and discharge deficit, within power and state of charge; not from the grid.
- Smart on market prices: dynamic programming over a grid of the state of charge (10 to 60 steps of about 0.1 kWh). Every day a horizon of 48 hours (today and tomorrow, the day-ahead prices), solved by backward induction; only the first 24 hours are executed. The charge left at the end is valued at the lowest feed-in price in the horizon. Planned with a perfect forecast of sun and consumption; of that, 90% (good control) or 70% (simple) of the extra yield on top of self-consumption counts (PLANNING). Planned on an average (median) supplier; every supplier is billed on the same flows.
- Quarter-hour prices: the schedule stays per hour, but what the battery charges or discharges in an hour is spread over the four quarter hours: charging in the cheapest, discharging in the most expensive, up to the power per quarter hour or until the grid flow is zero. The difference from the hourly price is included in the bill. If the quarter-hour prices cannot be fetched, everything is calculated per hour.
- Imbalance trading: a table (capacity × power × customer share), precomputed with TenneT's quarter-hour imbalance prices, trilinearly interpolated and added to smart control.
Price and bill
dynamic: consumption × (market price × 1.21 + mark-up + energy tax) − feed-in × (market price × 1.21 + feed-in rule) + 12 × fixed costs per month
fixed: consumption × (supply rate + energy tax) − feed-in × (compensation − feed-in costs) − tier + 12 × fixed costs per month
bill = electricity + grid charges − tax reduction
- Mark-up and energy tax include VAT; VAT is added only to the market price. With curtailment, no feed-in at a negative price.
- Fixed contracts: the model contract with a 1-year fixed rate. A tier (staffel) is an amount per month per band of annual feed-in.
- Net metering (the past year): with a fixed contract on the annual balance; with a dynamic contract, energy tax and mark-up are refunded on the smaller of total feed-in and total consumption.
- Grid charges per grid operator (via the postcode) and connection, pro rata per day across tariff periods.
- Price change only on market prices: (1 + i) to the power of the number of years between the past year and the calculation year, with i the expected wholesale price from PBL (Climate and Energy Outlook) plus inflation according to CPB, without PBL only inflation, without both 10%. Energy tax is that of the year itself (Belastingdienst); for a year not yet published, the proposal from the Tax Plan, otherwise the last known year.
Calibration to the annual statement
Four parameters, on consumption from the grid, feed-in and the off-peak part of each, in kWh from the annual statement:
- Household consumption: a fixed-point correction on consumption from the grid − feed-in.
- The day share, the weight of consumption in the sunny hours, on feed-in (bisection in 20 steps, between 0.25 and 3). It acts most strongly on the hour with the most generation: each hour × day share to the power g, with g the average generation in that hour in that month relative to the best hour (0 to 1).
- The weekend share, the same for weekends and public holidays, on off-peak feed-in (which falls almost only at weekends); the day share then applies to workdays only, on normal feed-in. Without those kWh the day share applies to every day.
- The night share, the weight of consumption between 23:00 and 7:00, on off-peak consumption from the grid (bisection between 0.25 and 4).
The off-peak rate counts on workdays from 23:00 (in Noord-Brabant and Limburg from 21:00, as a suggestion based on the postcode that you can change) to 7:00, the whole weekend and on public holidays. At most three alternating rounds, five with more than two targets. The result applies to the past year, the calculation year and all comparisons.
With the hourly meter data (consumption and feed-in per hour for the past year, from the supplier or from a file), the model uses that hourly pattern instead of the profile: per hour, usage is consumption − feed-in + the model's generation, and whatever a comparison has in addition (more panels, a heat pump) is added as a difference from the model. Not with a home battery already installed: then the meter sees the battery.
Testing
Over 200 automated tests with golden values and invariants: the energy balance closes, the charge stays within the usable capacity, smart control is never more expensive than self-consumption, net metering never more expensive than without, a bigger battery never feeds in more, calibration hits its targets and the difference per option equals the difference of two calculations. Consumption is tested against the standard profiles (NEDU E1A and BDEW H25): per hour a correlation of 0.96 to 0.97 with E1A; 3% of the energy falls in a different hour, 2 to 2.5% on a different day.
Limitations
- The within-hour correction comes from German per-minute data of a few houses; a test with Dutch data will follow. With solar panels the model still takes slightly too little from the grid during the day: 17% of consumption from the grid between 9 and 17 o'clock, against 22.8% in the measured profile (NEDU E1B with feed-in).
- Smart control counts 90% or 70% of what a perfect forecast yields on top of self-consumption, rather too favourable. Imbalance trading assumes a trading party that responds about 5 minutes into the quarter hour; the range runs from responding to the previous quarter hour to knowing the price in advance.
- The car and the shiftable usage follow the hourly price, not the quarter-hour price.
- Heat pump and air conditioning follow a fixed pattern, not the temperature; the SCOP is a seasonal average.
- Charging on solar surplus is an upper limit: the car is not always at home.
- The difference between two choices is more reliable than the amount itself.
Questions and feedback about the model are welcome: info@magict.nl. Reuse only with attribution (energie27.nl).