Overview Storage optimizer block



This control element belongs to the function block Storage optimizer block. It shows the energy flow in the house, the computed schedule for the next up to 48 hours and contains all settings of the block. Only the grid connection limit remains on the block itself.

The element is linked to the function block with the right mouse button. Without a link it stays empty.


Display

Four tiles The grid at the top, the generation on the left, the consumption on the right and the battery at the bottom. The battery tile also shows the state of charge in percent. The centre stays empty — this is where the flow lines cross.
Grid and battery additionally show their setpoint in brackets directly below the measured value — for the grid the target at the connection point, for the battery the charging and discharging power. It is shown in the colour of the corresponding energy flow.
Where no value is available, -.-- appears instead of a number: for the measured values when the input has no address assigned, and for the setpoints additionally when there is no schedule and the block does not specify anything either. If it runs own consumption in emergency operation without a schedule, that is a real setpoint and is shown.
Two price circles To the left and right of the grid tile, in the same size: Import is the current consumption price, Export the current feed-in price, both in cents per kilowatt hour. They show the current billing interval of the price source. Both circles are always black and do not follow the text colour of the style.
Energy flows Up to seven connections are drawn between the tiles: from the generation to consumption, battery and grid, from the grid to consumption and battery, and from the battery to consumption and grid. A line appears from about 50 W upwards. The colour shows where the energy comes from. If source and target are opposite each other, the line runs straight through the centre, otherwise around a rounded corner.
Click on the element Every tile opens its chart — see below. A click on the gear at the bottom right or on any free area opens the schedule; from there the settings and the computed data are reached through the icons in the title bar.

Charts

Generation tile Generation per hour. Summary: total and the most productive hour of the period.
Grid tile Consumption from and feed-in to the grid as two curves in one chart, plus the state of charge on the right axis — this shows whether grid consumption met an empty battery. Summary: consumption, feed-in and the resulting balance on one line, below it the minimum and maximum state of charge. The individual amounts in euros are shown in the charts of the two price circles.
Consumption tile Consumption per hour. Summary: total and the part taken from the grid on one line, below it the degree of self-sufficiency derived from them.
Battery tile The tile has two click areas: above the symbol discharging, below it charging. In both charts the state of charge is drawn as a second curve in the background.
The state of charge has its own axis on the right with a fixed scale from 0 to 100 %; the energy stays on the left in kilowatt hours as usual. Both values can therefore be read directly. Minimum and maximum of the state of charge are also given in the summary.
Import circle The cost of the grid consumption per hour in euros. Summary: cost and quantity on one line, below it the average price actually achieved over the period.
Export circle The revenue from feeding in per hour in euros, otherwise as above.
Time range The button at the bottom opens the selection: 6, 12 and 24 hours, day, 2, 7, 30 and 90 days, year or a freely chosen from-to date. The arrows to the left and right page through the data, the magnifier stretches the time axis. Paging into the future is not possible.
The waste bin in the selection deletes the entire recording of this block.

About the recording. The function block stores one value per hour, kept for two years. The data lives in the controller, in a separate file per block — without a connection to the controller the charts stay empty.

The amounts in euros are not computed from kilowatt hours times a price at display time, but continuously with the price valid at that moment. They are therefore correct even with a tariff whose price changes every hour. Only this makes the average price in the summary meaningful.

Only what is measured gets recorded. If an input is not connected at all — neither to an address nor to a neighbouring block — the corresponding channel is not created and the chart reports "No data available"; a zero line would look like a measurement. An internal wire is enough for the recording; the tiles, by contrast, need an address (see below). For cost and revenue the grid power input is enough; the block knows the prices itself.


Important: the measurement inputs of the block need addresses. The four tiles read their values from the inputs grid power, PV power, consumption, battery power and state of charge. If these inputs are only wired internally to a neighbouring block, there is no address for them and the tile shows "-.--". Assign addresses to these inputs. The block itself keeps computing correctly without those addresses — the requirement only concerns the display.

If the input "Consumption" has no address assigned, the consumption tile falls back to the output "Consumption measured". The block computes that value itself anyway.


Schedule dialog

Bars One column per hour, in three bands from top to bottom: the planned power setpoint, below it the planned state of charge and at the bottom the feed-in price of that hour. All three bands are the same height and separated by a gap.
What is shown is the feed-in price and not the consumption price: it is the revenue a discharge into the grid earns in that hour, and therefore the value against which the planned setpoint above it can be read. The consumption price of the current interval is shown in the "Computed data" dialog.
Each band has a frame per column spanning its full height. That gives the reference: for the state of charge the bottom edge is 0 % and the top edge 100 %, for the price the top edge is the highest price of the whole schedule. The gap between the fill and the top edge therefore shows directly how far an hour is from the maximum.
All bars start at the bottom edge of their frame. For the setpoint the magnitude is shown; whether the battery charges or discharges is given by the bar colour and the sign of the label.
Every bar carries its value in the centre of its band: power in kW, state of charge in percent, price in cents. A feed-in price of 0 gets no bar, but the label still appears.
Time axis The display always starts at the current hour and runs from there to the right until the end of the schedule. Past hours are not shown.
Each column is labelled with its clock time. The first column is the current hour and is marked at its label. Hours that already belong to the following day carry a dimmed label; they only appear once the prices of the following day are known. Until then the schedule ends at midnight and correspondingly fewer columns are shown.
The schedule reaches as far as the planning horizon under "Forecast and recording" is set — at most 48 hours, and only as far as prices are available.
Where a new day begins, a vertical line is drawn.
Paging Side by side there are 24 hours in landscape and 12 in portrait; in landscape the dialog uses the full width of the page. If the schedule is longer, it is paged — by dragging, with the mouse wheel or via the arrow buttons at the bottom. The arrow buttons only appear then; if the schedule fits on one page they are absent.
The Settings and Computed data dialogs stay square in every orientation.
Update The schedule is updated on every recomputation and on every change of hour. An open dialog takes that over immediately, it does not have to be closed.

The schedule lives in the controller. Without a connection to the controller the dialog shows "No schedule available".


Icons in the title bar

Gear Settings.
List Computed data.

Computed data dialog

Schedule Group
Schedule valid Yes as long as a computed schedule is available. If this shows No, the block runs in emergency operation.
Schedule computed Minutes since the last recalculation. The value must not stay permanently above the configured interval between two recalculations.
Target state of charge Planned state of charge at the end of the current hour in percent.
Planned charging Sum of the planned charging energy over the next 24 hours in kWh.
Planned discharging Sum of the planned discharging energy over the next 24 hours in kWh.
Expected yield Expected profit of the schedule over the next 24 hours in euros, after deducting all losses. With a flat price this shows 0, because shifting energy does not pay off.
Next charging in Minutes until the next planned charging window. The value counts down with every control cycle. If the window is already running it reads active — in self-consumption mode that is the normal case, because charging or discharging then runs almost continuously. If the schedule holds no further window, it reads "none".
On an address the output delivers the minutes as a number: 0 for a running window, -1 when none is planned.
Next discharging in Minutes until the next planned discharging window, otherwise as above.
Prices Group
Current consumption price Consumption price of the current interval in cents per kilowatt hour.
Current feed-in price Feed-in price of the current interval. If the price source does not know a feed-in price, the configured fixed feed-in tariff is shown here.
State Group
Operation The operating state in plain text: standby, charging from PV, charging from grid, discharging for self-consumption, discharging to grid, manual, emergency operation, off or charging at the feed-in limit.
Charging active Yes as long as the storage is being charged.
Discharging active Yes as long as the storage is being discharged.
Grid charging active Yes if the charging energy comes from the grid.
Feed-in active Yes if the storage is delivering to the grid.
Grid charging locked Yes if grid charging would be profitable but is prevented by the lock or by the minimum profit. This tells apart a setting that is holding things back from there simply being nothing to earn.
In the manual and off modes this always reads "no" — the storage does not follow the schedule there, so a statement about a prevented grid charge would be meaningless.
Error Yes if there is no valid price series or the battery capacity is 0. Missing or outdated measured values do not set this output; the configured behaviour on data loss applies there.
Recording Group
Measured consumption The consumption currently in use — either from the "Consumption" input or computed from grid, generation and battery.
Learned consumption The learned value applied for the current hour. If the cell of this weekday is still empty, the average of the same hour across the weekdays already learned is shown. 0 means nothing has been learned for this hour yet and the base load applies.
Coverage Share of the already filled cells of the consumption profile in percent. The profile has one cell for every hour of every weekday; after a full week of operation this shows 100 %. Until then the block uses the base load for the hours still empty.

This dialog is display only. It reads the outputs of the block and is therefore complete even when the measurement inputs have no addresses assigned. Only "Schedule computed" does not come from an output but from the schedule itself.


Settings dialog

Operation Group
Operating mode Automatic — the storage follows the computed schedule.
Own consumption — the schedule is still computed and displayed, but not executed: surplus is charged, import is covered from the storage. Grid charging and feed-in do not take place.
Manual — the manual setpoint applies.
Off — the setpoint is 0, the storage stands still.
In manual and off the two locks have no effect. The protective limits — state of charge and grid connection limit — apply in every operating mode.
Manual setpoint Only acts in the operating mode manual. It follows the parameter plant type of the block Storage optimizer block: with battery command it is the power of the storage (negative = charge, positive = discharge) and is limited to the configured charging and discharging power, with grid command it is the setpoint at the grid connection point (positive = import, negative = feed-in). There it is passed on unchanged — without conversion from measured values, without dead band and without ramp. Only the grid connection limit is applied.
Lock grid charging Not equal to 0 prevents a charge from the grid foreseen in the schedule from being executed — the setpoint is 0 during those hours. The schedule itself is computed unchanged and keeps showing those hours; the output grid charging locked reports the situation. Default is 0, that is not locked.
Lock feed-in Not equal to 0 prevents a delivery into the grid foreseen in the schedule from being executed. Discharging for own consumption stays allowed. Like the grid charging lock it only acts on the execution, not on the computation. Default is 0.
Battery Group
Battery capacity Usable capacity in Wh. It is the reference for all percentages in this dialog. With 0 no schedule is computed and the output error goes to yes.
Maximum charging power Highest power allowed for charging. It limits both the amount of energy the schedule may assign to an hour and the setpoint handed out.
Maximum discharging power Counterpart of the charging power, for discharging.
Charging efficiency
Discharging efficiency
Both values together form the round-trip efficiency. It is part of the cost of every planned shift: what is stored has to come out again more expensive by the amount of the losses. An efficiency set too high makes deals look profitable that are not — especially with grid charging. Permitted are 10 to 100 %; a value outside is set to 95 %.
Minimum state of charge
Maximum state of charge
Working range of the storage in percent. Below the minimum it is no longer discharged, above the maximum no longer charged — in the planning as well as in the execution. If the maximum is not greater than the minimum, 10 % and 100 % apply instead.
Emergency reserve Raises the minimum state of charge over the whole planning period. The higher of the two limits wins. Default is 0 %, so the minimum state of charge stays in force.
Reserve at the end of the horizon Lower limit for the last six hours of the planning horizon, and there only while the prices of the following day are still missing. It prevents the schedule from emptying the storage in the evening just because it sees no expensive hour beyond the horizon. As soon as the exchange has published tomorrow's prices it no longer takes effect.
Feed in only above A separate, higher lower limit that applies to delivery into the grid alone. Below it the stored energy stays reserved for own consumption — energy sold would otherwise have to be bought back later at the higher consumption price. In the schedule this shows as the feed-in hours stopping while own consumption continues.
Economics Group
Price source Automatic takes the price series from the price blocks present in the project: a source with its own feed-in price beats any pure exchange source, with equal suitability the most recently updated one wins.
eFriends, aWATTar and ENTSO address exactly that source. If the corresponding block is missing, no price series is available.
Fixed prices builds a flat hourly series from the fixed consumption price and the feed-in tariff. There are then no price differences, every margin stays below the minimum profit and no charging or discharging plan is created — the storage runs on own consumption. No error is reported in this case.
Maximum grid charging power Highest power that may be used to charge from the grid; the charging power of the storage applies in addition. The value 0 switches grid charging off completely in the planning — unlike the lock, which leaves the schedule untouched.
Minimum profit PV Threshold for every shift whose energy comes from the generation or from the energy already in the storage. Only if the margin between revenue and cost — losses included — is at least this large is the hour scheduled. The value covers ageing and wear of the storage; the higher it is, the fewer transfers take place.
Minimum profit grid charging The same threshold for energy bought from the grid. It is usually higher than for own consumption, because the price risk is carried here as well. If grid charging would be profitable but stays below this threshold, the output grid charging locked reports it — that is how to tell whether this setting is holding things back.
Fixed consumption price Energy price in ct/kWh. It is used only with the price source "fixed prices".
Feed-in tariff Revenue in ct/kWh for energy that goes into the grid. It is used whenever the price source knows no feed-in price of its own — which is the case for the pure exchange sources. The value is at the same time the price forgone when charging from the generation: it forms the cost of a PV shift.
Forecast and recording Group
Base load Assumed consumption in W for every hour for which nothing has been learned yet, and for the case that the recording of the consumption is switched off. A value set too low lets the schedule sell more energy than the house has to spare later on.
Record consumption Learns the consumption into a profile with one cell per hour and weekday. For an hour not yet filled on that weekday the average of the same hour across the other weekdays applies; only when nothing at all exists for that hour does the base load take over. Without the inputs consumption or generation nothing is recorded on purpose — a wrongly learned profile would be worse than the fixed value.
Record PV yield Learns the daily course of the generation into a profile with one cell per hour. The daily total of the forecast is distributed along it instead of along a fixed bell curve between 6 and 20 o'clock — in winter that curve is hours off. If no forecast value is linked, the profile itself serves as the expected value.
Learning rate Weight with which the average of the elapsed hour enters the profile cell (1 to 50 %). Small means sluggish and calm, large means fast adaptation but also more deflection after an unusual day. A cell still empty is always filled immediately with the first measured value, and a single outlier is limited to four times the previous value.
Planning horizon How far the schedule reaches into the future (2 to 48 hours). A wide horizon finds deals across the night, but it only uses as many hours as the price source actually delivers — beyond the end of the price series nothing is planned. The horizon also determines where the reserve at the end of the horizon takes effect: in its last six hours.
Maximum age of the prices What is meant is not the period the prices cover, but how long ago the last successful request to the price source may lie.
Every price block remembers the moment at which it last fetched a complete, valid price series. If that moment lies further back than set here, the optimizer discards the series: no schedule is computed, schedule valid goes to no, error to yes, and the storage runs according to the configured behaviour on data loss.
Important: if a request fails, the price block keeps the prices it fetched last — only the time stamp does not move on. So the setting says how long computation may continue with the prices at hand after the last successful request. The price blocks query their source once an hour; the default of 120 minutes therefore bridges two unsuccessful attempts.
Set too small, a short disturbance of the internet connection already stops the schedule although the prices for today and tomorrow have long been complete. Set too large, a permanently failed source no longer shows up; that only becomes truly critical once the price series runs into the past — then too few hours remain and the schedule is dropped anyway.
With the price source fixed prices the setting has no effect, the series is built anew with every computation. After a restart of the controller a price series restored from the database counts as ageless at first; the check only starts once the source has been queried successfully at least once. The adjustable range is 5 to 1440 minutes.
Recompute every Largest interval between two computations of the schedule. In between the schedule is additionally computed as soon as an hour of the plan has elapsed, the measured state of charge deviates from the planned one by more than 5 % of the capacity, or the PV forecast changes by more than 10 %. These event-driven computations run at the earliest 60 seconds after the last one. A short interval costs computing time, a long one lets the schedule lag behind new measured values.
Control Group — the first four values only act when the parameter plant type of the block is set to battery command. With grid command the system regulates itself and the block forms no control loop. The behaviour on data loss applies to both plant types.
Control cycle Interval in seconds at which a new setpoint is formed (1 to 300 s). The grid power is averaged over the elapsed cycle, a single sample would be chance. A very short cycle makes a sluggish system regulate against its own measurement that has not settled yet.
Dead band Changes below this value are not handed out, the previous setpoint stays. That keeps the number of commands small — some storage systems block their interface when it is written to too often. A change forced by a limit and an operator entry are not affected.
Control gain Share of the control deviation that is compensated per cycle. At 100 % the error is corrected in one step, below that it decays over several cycles — which is exactly what keeps a sluggish system calm. Permitted are 1 to 100 %; a value outside is set to 50 %.
Ramp Largest change of the setpoint in W per second. The figure refers to the second and therefore applies independently of the control cycle. If a hard limit — grid connection or state of charge — demands the change, it takes effect immediately; a ramped reduction would violate the limit for several cycles.
Behaviour on data loss Applies as soon as no valid schedule exists — for example because the prices are missing or too old.
Standby: the setpoint is 0, the storage stands still.
Own consumption: surplus is charged, import is covered from the storage. This is the default — the storage therefore stays usable even without prices.
Diagnostics Group
Diagnostic messages Switches on the messages of the block in the log. Intended for commissioning only.

The state of charge therefore has four lower limits side by side — the highest one wins: minimum state of charge always applies, to everything, the emergency reserve raises it over the whole planning period, the reserve at the end of the horizon only during its last six hours, and feed in only above applies to delivery into the grid alone.

Changes are made on a working copy: only Save transfers the values to the controller. If the dialog is closed without saving, everything stays as it was.

The settings live in the controller, not in the project. They survive the transfer of a project, but they can only be read and written while a connection exists. If several control elements or development environments are open at the same time, a change appears there immediately.