Home

Awesome

emobility-smart-charging

Build Status REUSE status

Contents:

  1. Description
  2. Requirements
  3. Download and Installation
  4. Getting Started
  5. Known Issues
  6. How to obtain support
  7. To-Do (upcoming changes)

Description

This repository is an implementation of smart charging for electric vehicles (EVs). It contains a charging optimizer which schedules EVs for charging throughout the day. The optimization algorithm addresses the following goals:

Refer to [1] for a detailed explanation of the algorithm.

On a technical note, this repository contains the following components:

[1] O. Frendo, N. Gaertner, and H. Stuckenschmidt, "Real-Time Smart Charging Based on Precomputed Schedules", IEEE Transactions on Smart Grid, vol. 10, no. 6, pp. 6921 – 6932, 2019.

Requirements

The application may be run either with or without Docker.

With Docker

The application can be containerized using Docker and the Dockerfile in this repository. If the application is run via Docker the other requirements may be ignored.

Without Docker

The server requires Java and the dependency management tool Maven. The minimum required Java version is Java 8.

Enter java -version and mvn -version in your command line to test your installation.

The frontend is optional. The server and its REST API will work without the frontend. The requirements for the frontend are Node.js and its package manager NPM.

Enter node --version and npm --version in your command line to test your installation.

Download and Installation

With Docker

The simplest way to run this application is to use the public Docker image. First, pull the Docker image:

docker pull sapemob/evse_emobility-smart-charging

Next, start the application by running the Docker container (the server runs on port 8080). Parameters:

docker run -d -p 8080:8080 sapemob/evse_emobility-smart-charging

Alternatively, you can build the Docker image yourself using the Dockerfile in this repository. This will compile the server and the frontend. Parameters:

docker build -t sapemob/evse_emobility-smart-charging .

Without Docker

This section is relevant if the application should be run without Docker, for example for development purposes.

First, compile the server:

mvn clean install

(Optional) Prepare and compile the frontend:

cd frontend/
npm install
npm run build:playground

Start the server (from the root directory of the repository):

java -jar target/emobility-smart-charging-0.0.1-SNAPSHOT.jar

Accessing the application

After you have started the application it runs on localhost:8080. The frontend can be accessed via /playground/index.html. The API documentation is implemented via Swagger and can be accessed via /swagger-ui.html.

Generate TypeScript mappings (optional)

If you plan to use the API in a project which uses TypeScript you can generate the expected types of API requests and responses using the following command:

mvn typescript-generator:generate

This approach is used in the frontend. Type declarations are generated in the file frontend/src/assets/server_types.d.ts.

Getting Started

The purpose of this section is to get you started on using the charging optimizer API.

The easiest way to understand the interface of the API is to tinker with the playground (/playground/index.html). The playground is a visual interface which lets you edit the input for the charging optimizer in a natural way. The playground translates your model into a JSON request which is the technical input to the charging optimizer. You can easily pick up how to assemble JSON requests for the optimizer by observing how your playground input is reflected in the generated request.

Understanding charging optimizer input

In the top part of the playground screen you can edit the following input parameters:

Use the button “Show circuit diagram of fuse tree” to visualize the wiring of the configured charging infrastructure.

Understanding charging optimizer output

To trigger the charging optimizer us the button labelled Optimize charge plans. The resulting JSON response contains a list of charge plans, one per car. Note that the actual charge plan for the car is labelled currentPlan and consists of a list of 96 entries. Each entry corresponds to a 15 minute interval since midnight. The entered value specifies the charging current which the optimizer assigns to this car in the given interval.

Additionally, the playground visualizes the aggregated charge plans in a stacked diagram. Each vehicle’s charge plan is represented by one color. The placement of the colored boxes along the horizontal axis indicates start and end of the charging intervals. The height of the boxes corresponds to the respective charging power (in Watt).

Known Issues

Please refer to the list of issues on GitHub.

How to obtain support

Please use the GitHub issue tracker for any questions, bug reports, feature requests, etc.

To-Do (upcoming changes)