Charging ESS without selling power to grid

Hello,

I’m using openEMS for an university project. I’m currently running a simulation before connecting real hardware. My goal is to charge the battery with max. allowed power, while PV generation is present, without power being sold to grid.

My configuration consists of an ESS, simulated NRC meter that I feed with real consumption data, simulated PV meter and a reacting grid meter. I’m using a balancing controller to keep the reacting grid meter at 0 with the power from ESS.

The console shows:
[e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-1207 W Grid:-1686 W Production:3500 W Consumption:607 W] ess0[SoC:50 %|L:-1207 W|On-Grid] meterLOAD[536 W] meterPV[3500 W] meterREACT[-1757 W]

I’d like to charge the battery with the total residual power from the PV array (2964W), instead of selling 1686W to the grid. I’ve tried adding Ess Sell-to-Grid Limit controller, unfortunately an error appears, saying that no feasible solution is available. Is it the right approach? How should I configure my controllers?

I’d appreciate any help. Thanks for your time.

Hi,

thanks for getting in touch. I tried to simulate your environment. I do not have your CSV input files, but just took your values as static input - and it worked for me using the following configuration:

  • Simulator DataSource: CSV Direct [datasource0]
    • Source: 536
  • Simulator NRCMeter Acting [meterLOAD]
    • Datasource-ID: datasource0
  • Simulator DataSource: CSV Direct [datasource1]
    • Source: 3500
  • Simulator ProductionMeter Acting [meterPV]
    • Datasource-ID: datasource1
  • Simulator EssSymmetric Reacting [ess0]
  • Simulator GridMeter Reacting [meter0]
  • Controller Balancing Symmetric [ctrlBalancing0]
    • Ess-ID: ess0
    • Grid-Meter-ID: meter0

Because of the integrated PID filter the target value is not set immediately, because in reality the consumption would likely change constantly. (PID parameters can be configured in “ESS Power” if required).

This is my output:

2020-02-25 11:00:45,427 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:0 W Grid:-2964 W Production:3500 W Consumption:536 W] ess0[SoC:50 %|L:0 W|On-Grid] meter0[-2964 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:46,847 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-889 W Grid:-2964 W Production:3500 W Consumption:-353 W] ess0[SoC:50 %|L:-889 W|On-Grid] meter0[-2075 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:47,891 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-1423 W Grid:-2075 W Production:3500 W Consumption:2 W] ess0[SoC:50 %|L:-1423 W|On-Grid] meter0[-1541 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:48,866 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-1921 W Grid:-1541 W Production:3500 W Consumption:38 W] ess0[SoC:50 %|L:-1921 W|On-Grid] meter0[-1043 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:49,877 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2237 W Grid:-1043 W Production:3500 W Consumption:220 W] ess0[SoC:50 %|L:-2237 W|On-Grid] meter0[-727 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:50,887 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2473 W Grid:-727 W Production:3500 W Consumption:300 W] ess0[SoC:50 %|L:-2473 W|On-Grid] meter0[-491 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:51,887 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2629 W Grid:-491 W Production:3500 W Consumption:380 W] ess0[SoC:50 %|L:-2629 W|On-Grid] meter0[-335 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:52,917 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2737 W Grid:-335 W Production:3500 W Consumption:428 W] ess0[SoC:50 %|L:-2737 W|On-Grid] meter0[-227 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:53,977 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2810 W Grid:-227 W Production:3500 W Consumption:463 W] ess0[SoC:50 %|L:-2810 W|On-Grid] meter0[-154 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:54,907 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2860 W Grid:-154 W Production:3500 W Consumption:486 W] ess0[SoC:50 %|L:-2860 W|On-Grid] meter0[-104 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:55,926 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2893 W Grid:-104 W Production:3500 W Consumption:503 W] ess0[SoC:50 %|L:-2893 W|On-Grid] meter0[-71 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:56,928 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2916 W Grid:-71 W Production:3500 W Consumption:513 W] ess0[SoC:50 %|L:-2916 W|On-Grid] meter0[-48 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:57,935 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2932 W Grid:-48 W Production:3500 W Consumption:520 W] ess0[SoC:50 %|L:-2932 W|On-Grid] meter0[-32 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:58,944 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2942 W Grid:-32 W Production:3500 W Consumption:526 W] ess0[SoC:50 %|L:-2942 W|On-Grid] meter0[-22 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:00:59,945 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2949 W Grid:-22 W Production:3500 W Consumption:529 W] ess0[SoC:50 %|L:-2949 W|On-Grid] meter0[-15 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:00,958 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2954 W Grid:-15 W Production:3500 W Consumption:531 W] ess0[SoC:50 %|L:-2954 W|On-Grid] meter0[-10 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:01,989 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2957 W Grid:-10 W Production:3500 W Consumption:533 W] ess0[SoC:50 %|L:-2957 W|On-Grid] meter0[-7 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:02,989 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2959 W Grid:-7 W Production:3500 W Consumption:534 W] ess0[SoC:50 %|L:-2959 W|On-Grid] meter0[-5 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:03,999 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2961 W Grid:-5 W Production:3500 W Consumption:534 W] ess0[SoC:50 %|L:-2961 W|On-Grid] meter0[-3 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:04,999 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2962 W Grid:-3 W Production:3500 W Consumption:535 W] ess0[SoC:50 %|L:-2962 W|On-Grid] meter0[-2 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:06,019 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2963 W Grid:-2 W Production:3500 W Consumption:535 W] ess0[SoC:50 %|L:-2963 W|On-Grid] meter0[-1 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:07,027 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2963 W Grid:-1 W Production:3500 W Consumption:536 W] ess0[SoC:50 %|L:-2963 W|On-Grid] meter0[-1 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:08,034 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2963 W Grid:-1 W Production:3500 W Consumption:536 W] ess0[SoC:50 %|L:-2963 W|On-Grid] meter0[-1 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:09,052 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2964 W Grid:-1 W Production:3500 W Consumption:535 W] ess0[SoC:50 %|L:-2964 W|On-Grid] meter0[0 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:10,052 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2964 W Grid:0 W Production:3500 W Consumption:536 W] ess0[SoC:50 %|L:-2964 W|On-Grid] meter0[0 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:11,072 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2964 W Grid:0 W Production:3500 W Consumption:536 W] ess0[SoC:50 %|L:-2964 W|On-Grid] meter0[0 W] meterLOAD[536 W] meterPV[3500 W] 
2020-02-25 11:01:12,082 [re.Cycle] INFO  [e.controller.debuglog.DebugLog] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50 %|L:-2964 W Grid:0 W Production:3500 W Consumption:536 W] ess0[SoC:50 %|L:-2964 W|On-Grid] meter0[0 W] meterLOAD[536 W] meterPV[3500 W] 

Simulation capabilites were also adjusted in the last release, so make sure you use current code. See the release info for details: https://github.com/OpenEMS/openems/releases/tag/2020.4.0

Regards,
Stefan

Hello Stefan,

Thank you for your reply and your time.

Even with this configuration I couldn’t get the right results - it seemed, as if parameters from an old configuration were taken.
Finally, reinstalling the local repository and completely deleting previous configuration´s files solved the problem.

Hi!

I’ve tried out a couple of different scenarios for the operation of the ESS. One case is still unclear to me: when the battery arrives at 100% SOC.

I’m charging the battery with help of PV-generation.When 100% SOC is achieved, the residual power is sold to grid - everything is fine. Problem appears, when the PV-generation is not present any more. I’ve assumed that the battery should start discharging again, but in my case the power is being bought from the grid. (picture attached)

Why is this happening? I presume it wouldn’t happen in a real system, because the 100% would never actually be reached?

Hi,
I’d like to understand how you created the diagram in your last comment.
Currently I am struggling with the visualization of simulated data.

Thanks in advance!

Hey,

I set up a time-series database locally on my computer, the influxdb. Then I configured it in Apache Felix through the Timedata component. This way the data from openEMS is written to influxdb.

If you want to visualize the data you can use an interface like Grafana (as in my example).
This thread helped me a lot: Influx DB Log Datei

I hope it answers your question!

1 Like