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

Set update / Clear external charging limits #828

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

couryrr-afs
Copy link
Contributor

Describe your changes

This is the implementation for section 5.2. External Charging Limit based Smart Charging of SmartCharging in OCPP2.0.1.
We expose two methods on the ChargePoint to be called when external limit events occur.

on_external_limits_changed - covering the case for setting or changing an external limit.
on_external_limits_cleared - covering the case when an external limit is removed when a transaction is ongoing.

These methods can be invoked by the systems withing the Charging Station that interact with the DSO and will handle the ocpp communication to the CSMS.

Issue ticket number and link

Checklist before requesting a review

@couryrr-afs
Copy link
Contributor Author

@shankari - this is ready for your review.

Creates an initial implementation for handling K12 that takes in an
external limit and its delta from previous limits and determines whether
or not to send a notification to the CSMS.

We expose a public function on the ChargePoint so that some external
system (such as the energy manager) may call it to alert us of the
external limit.

Signed-off-by: Christopher Davis <[email protected]>
Ensure we either build a charging schedule from a given limit or use the
given charging schedule and return it in our notification to the CSMS.

Signed-off-by: Christopher Davis <[email protected]>
Take in the charging limit source, and ensure we don't propagate a
source of CSO in the off chance we receive it.

Signed-off-by: Christopher Davis <[email protected]>
When receiving an external limit from another system, we need to know
two things: the limit, and what unit the limit is in. Previously
we only knew the limit (if we're not given a schedule) and made up
a unit.

Now when we receive a constant charging limit we take it as the new type
ConstantChargingLimit, which holds the limit and the unit.

Signed-off-by: Christopher Davis <[email protected]>
…d TransactionEventRequest

Signed-off-by: Coury Richards <[email protected]>
…ut some details are still needed.

Signed-off-by: Coury Richards <[email protected]>
@couryrr-afs couryrr-afs force-pushed the feature/k12-set-update-external-limits branch from 60226e9 to 075ab82 Compare October 9, 2024 17:50
@Pietfried Pietfried self-assigned this Oct 14, 2024
Copy link

@shankari shankari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The big ticket item here is why K11.FR.04 was not implemented.
I also have a couple of other high-level questions and some test suggestions.
No code-level feedback this time; good job!

include/ocpp/v201/smart_charging.hpp Outdated Show resolved Hide resolved
lib/ocpp/v201/charge_point.cpp Outdated Show resolved Hide resolved
Comment on lines +628 to +638
ChargingSchedule create_schedule_from_limit(const ConstantChargingLimit limit) {
return ChargingSchedule{
.id = 0,
.chargingRateUnit = limit.charging_rate_unit,
.chargingSchedulePeriod = {ChargingSchedulePeriod{
.startPeriod = 0,
.limit = limit.limit,
}},
};
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

future fix/discussion: I understand that the intention of K11 was to specify hard grid limits directly to the charge station. However, tariffs are generally a better option to influence demand than hard limits because they are more flexible. As far as I can tell, OpenADR supports dynamic pricing.

Could pricing information could also be specified by the external controllers @RobertDeLeeuw?

This does not need to be addressed in this PR, this is purely for the community to decide how to track this potential requirement in the future

lib/ocpp/v201/smart_charging.cpp Show resolved Hide resolved
lib/ocpp/v201/smart_charging.cpp Outdated Show resolved Hide resolved
lib/ocpp/v201/smart_charging.cpp Show resolved Hide resolved
tests/lib/ocpp/v201/test_charge_point.cpp Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants