LSTM - Predicting Values for Control

Hello,

I am interested in the possibility of using OpenEMS to create predicted values of parameters such as solar PV production and more to influence controllers. E.g to discharge a battery in the morning in expectation of significant PV generation.

I notice that there is an LSTM module in the Edge which can predict certain values based on a time series - it appears like it can use the channel value being predicted (like _sum.ProductionActivePower) as well as other variables and external factors (like weather forecast data) in theory.

I wanted to know how this can be implemented in practice, in several aspects:

  1. Deployment setup. I presume that the edge on which the predictor is enabled must have a Timedata provider (i.e a DB like InfluxDB) in place so that the input values can be stored. Is this correct?
  2. How to incorporate additional variables in the prediction? I can see that in Apache Felix, the only parameter that the predictor takes is the ‘Channel-Address’ of the value to be predicted. Can the model use additional values that may be relevant?
  3. Where are predictions used and how can they be accessed by other controllers? If I want to control my ESS based on predictions, how can this be done?

Perhaps some of this work has not been done yet, and we are interested in looking at this, but maybe the community has some experiences of using the predictors?

Thomas

Hi Thomas,

i just wanted to ask you in this matter if you are already member of openems :slight_smile:

I saw, that you use it for:

right? :slight_smile:

Greetings

Hi @Sn0w3y,

Yes correct that is us :slight_smile: Custom UI but yes the edge device is OpenEMS!

And yes we are members of the association since 2023 :slight_smile:

Thomas

1 Like

Hi Thomas,

  • Deployment setup. I presume that the edge on which the predictor is enabled must have a Timedata provider (i.e a DB like InfluxDB) in place so that the input values can be stored. Is this correct?

I recommend Timedata.Rrd4j as local Timedata provider, as it works well with flash storage.

  • How to incorporate additional variables in the prediction? I can see that in Apache Felix, the only parameter that the predictor takes is the ‘Channel-Address’ of the value to be predicted. Can the model use additional values that may be relevant?

I assume you would like to add weather or irradiation data this way. It’s not that simple unfortunately. The current LSTM predictor is designed to predict _sum/ConsumptionActivePower and _sum/UnmanagedConsumptionActivePower only. Prediction of _sum/ProductionActivePower will require a slightly adapted implementation.

For now I recommend using Predictor.PersistenceModel, as suggested here: Clarification about Genetic Algorithm and Time-of-Use Controller - #3 by stefan.feilmeier

  • Where are predictions used and how can they be accessed by other controllers? If I want to control my ESS based on predictions, how can this be done?

Most prominent Controllers to use predictions are Controller.Ess.GridOptimizedCharge and Controller.Ess.Time-Of-Use-Tariff.

E.g to discharge a battery in the morning in expectation of significant PV generation.

This is something we consider for future and will require adjustment e.g. of the Time-Of-Use-Tariff-Controller and the cost function of the Optimizer. This behaviour is not allowed without external trader under German legislation at the moment, which makes it a lower priority for us…

Regards,
Stefan