Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New controller for flexibility trading with Levl Energy #2873

Open
wants to merge 43 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2ce884e
initial commit
LevlLuca Oct 21, 2024
308857b
levl-1290/1295: add business logic and json rpc handling
DennisLevl Oct 22, 2024
9c18e66
levl-1290/1295: add handling for influenceSellToGrid and update levlSoc;
DennisLevl Oct 23, 2024
2f23cc4
levl-1290/1296: add unit tests and fix related bugs
DennisLevl Oct 24, 2024
3b7122c
levl-1290/1296: add test for handleRequest and clean up
DennisLevl Oct 25, 2024
3eb88cd
levl-1290/1299: add logging
DennisLevl Oct 25, 2024
d3f55d4
levl-1290/1295: add efficiency class
DennisLevl Oct 25, 2024
9a59568
levl-1290/1295: Add controller to EdgeApp.bndrun config
DennisLevl Oct 25, 2024
bfbc870
levl-1290/1298: test for null values; set request values as class
DennisLevl Oct 29, 2024
f2f5d32
levl-1290/1303: add efficiency channel
DennisLevl Oct 29, 2024
e2c743b
levl-1290/1303: WIP: change class variables to channels
MarcoLevl Oct 29, 2024
4433191
levl-1290/1303: WIP: adjust unit tests after using channels in
DennisLevl Oct 31, 2024
ab68b2c
levl-1290/1308: Add tests based on OpenEMS Test Framework.
DennisLevl Oct 31, 2024
48b3496
levl-1290/1203: clean up junit tests
DennisLevl Oct 31, 2024
125a356
add integration test for reserved capacity with full percent steps, r…
LevlLuca Nov 3, 2024
64a9f9b
levl-1290/1308: add further openems integration tests and fix edge cases
DennisLevl Nov 4, 2024
2746309
levl-1290/1308: review and minor changes of integration tests
MarcoLevl Nov 5, 2024
8206db4
levl-1290/1303: Fix unit tests with channels; adjust channel error
DennisLevl Nov 5, 2024
5b6b3ed
levl-1290/1297: add comments; fix checkstyle warnings; remove unused
DennisLevl Nov 6, 2024
7f9326e
levl-1290/1316: add default values for lastRequestRealizedEnergyGrid and
DennisLevl Nov 6, 2024
78a318a
levl-1290/1316: log correct levl request for start; remove log as value
DennisLevl Nov 7, 2024
a1abc47
levl-1290/1297: add comments
DennisLevl Nov 8, 2024
e60f1f1
levl-1290/1316: add channels for realized values of current request as
DennisLevl Nov 8, 2024
42a6782
levl-1290/1316: add temporary logging for analysis
DennisLevl Nov 8, 2024
d5f76b4
levl-1290/1316: fix int overflow by using long in calculation of
DennisLevl Nov 8, 2024
b223db7
levl-1290/1297: add readme
DennisLevl Nov 11, 2024
d56ecb3
levl-1290/1316: fix int overflow in next levl soc calculation in
DennisLevl Nov 11, 2024
34ba47a
levl-1290/1297: add beta version hint to readme
DennisLevl Nov 11, 2024
f9e940a
levl-1290/1302: cleanup; clarify comments and readme; fix nextPucSoc
DennisLevl Nov 12, 2024
72148ee
levl-1290/1302: fix checkstyle
DennisLevl Nov 12, 2024
7997951
levl-1290/1302: add tests for soc limit edge cases
DennisLevl Nov 13, 2024
a0acffe
levl-1290/1302: change bundle properties
DennisLevl Nov 13, 2024
eb591b2
levl-1290/1302: move edgeapp config lines to the right place
DennisLevl Nov 13, 2024
020dad4
levl-1290/1302: clean up and sort bnd files
DennisLevl Nov 13, 2024
aa4f5ee
levl-1329/1332: implement pull request review comments
DennisLevl Nov 15, 2024
72cff76
levl-1329/1332: fix checkstyle
DennisLevl Nov 18, 2024
bf3e9f9
levl-1329/1332: minor review adjustments
DennisLevl Nov 21, 2024
78fc378
levl-1404: move from systemClock to componentManager clock
DennisLevl Dec 18, 2024
c203b7a
levl-1404: add fitWithin method for long values and use them instead of
DennisLevl Dec 18, 2024
7514d4d
levl-1404: adjust code formatting to align with code convention
DennisLevl Dec 18, 2024
06e6a99
Merge branch 'develop' into pr/2873
sfeilmeier Jan 4, 2025
745ba86
Merge branch 'develop' into pr/2873
sfeilmeier Jan 7, 2025
805b31e
apply tools/prepare-commit.sh (still failing)
sfeilmeier Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions io.openems.edge.application/EdgeApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
bnd.identity;id='io.openems.edge.kaco.blueplanet.hybrid10',\
bnd.identity;id='io.openems.edge.katek.edcom',\
bnd.identity;id='io.openems.edge.kostal.piko',\
bnd.identity;id='io.openems.edge.levl.controller',\
bnd.identity;id='io.openems.edge.meter.abb',\
bnd.identity;id='io.openems.edge.meter.artemes.am2',\
bnd.identity;id='io.openems.edge.meter.bcontrol.em300',\
Expand Down Expand Up @@ -328,6 +329,7 @@
io.openems.edge.kaco.blueplanet.hybrid10;version=snapshot,\
io.openems.edge.katek.edcom;version=snapshot,\
io.openems.edge.kostal.piko;version=snapshot,\
io.openems.edge.levl.controller;version=snapshot,\
io.openems.edge.meter.abb;version=snapshot,\
io.openems.edge.meter.api;version=snapshot,\
io.openems.edge.meter.artemes.am2;version=snapshot,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,19 @@ public static int fitWithin(int lowLimit, int highLimit, int value) {
return Math.max(lowLimit, //
Math.min(highLimit, value));
}

/**
* Fits a value within a lower and upper boundary.
*
* @param lowLimit the long lower boundary
* @param highLimit the long upper boundary
* @param value the long actual value
* @return the adjusted long value
*/
public static long fitWithin(long lowLimit, long highLimit, long value) {
return Math.max(lowLimit, //
Math.min(highLimit, value));
}

/**
* Fits a value within a lower and upper boundary.
Expand Down
12 changes: 12 additions & 0 deletions io.openems.edge.levl.controller/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="src" output="bin_test" path="test">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
3 changes: 3 additions & 0 deletions io.openems.edge.levl.controller/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/bin/
/bin_test/
/generated/
23 changes: 23 additions & 0 deletions io.openems.edge.levl.controller/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>io.openems.edge.levl.controller</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>bndtools.core.bndbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>bndtools.core.bndnature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
16 changes: 16 additions & 0 deletions io.openems.edge.levl.controller/bnd.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Bundle-Name: Ess Balancing with flexibility trading
Bundle-Vendor: Levl Energy GmbH
Bundle-License: https://opensource.org/licenses/EPL-2.0
Bundle-Version: 0.1.0.${tstamp}

-buildpath: \
${buildpath},\
io.openems.common,\
io.openems.edge.common,\
io.openems.edge.controller.api,\
io.openems.edge.ess.api,\
io.openems.edge.ess.generic,\
io.openems.edge.meter.api

-testpath: \
${testpath}
19 changes: 19 additions & 0 deletions io.openems.edge.levl.controller/readme.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
= Levl Controller for ESS Balancing

This is a beta version.

This controller combines the optimization of self-consumption with flexibility trading by levl.
Note: This controller can only be used in combination with an optimization contract with Levl Energy. For contact und more information please visit https://levl.energy

== How it works
This controller receives charging and discharging instructions from Levl Energy and executes these taking into account local optimization and various constraints (such as SoC, grid limits, etc.).

== Requirements
The following components are required to use this controller successfully:
- Contract with Levl Energy for system optimization
- ManagedSymmetricEss - a controllable energy storage system
- ElectricityMeter - a meter at the grid connection point

== Further information
Detailed information on self-consumption optimization can be found in the OpenEMS source code.
https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.controller.ess.balancing[Source Code icon:github[]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package io.openems.edge.levl.controller;

import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;

@ObjectClassDefinition(//
name = "Levl Controller Ess Balancing", //
description = "Combines the optimization of self-consumption with flexibility trading by levl.")
@interface Config {

@AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component")
String id() default "ctrlLevlBalancing0";

@AttributeDefinition(name = "Alias", description = "Human-readable name of this Component; defaults to Component-ID")
String alias() default "";

@AttributeDefinition(name = "Is enabled?", description = "Is this Component enabled?")
boolean enabled() default true;

@AttributeDefinition(name = "Ess-ID", description = "ID of Ess device.")
String ess_id();

@AttributeDefinition(name = "Grid-Meter-ID", description = "ID of the Grid-Meter.")
String meter_id();

@AttributeDefinition(name = "Ess target filter", description = "This is auto-generated by 'Ess-ID'.")
String ess_target() default "(enabled=true)";

@AttributeDefinition(name = "Meter target filter", description = "This is auto-generated by 'Meter-ID'.")
String meter_target() default "(enabled=true)";

String webconsole_configurationFactory_nameHint() default "Levl Controller Ess Balancing [{id}]";
}
Loading