EvManager

This module implements a Car simulator that can execute charging sessions using the car_simulator interface.

Handwritten Documentation

This Module implements the car simulator for a charging session.

Configuration

connector_id

The connector id of the EVSE Manager to which the simulator connects to.

session_logging
Logs the id of every V2G response the EV accepted to the console, the EV-side counterpart of the EvseManager option of the same name. The ISO15118_ev provider reports no requests, so every line reads EVSE ISO V2G <message>.
Default: false
dc_min_voltage_limit
Minimum voltage in V the EV can accept, sent to the ISO15118_ev provider with the other DC parameters at startup. It is emitted into DC_PreChargeReq and DC_ChargeLoopReq, where it is mandatory.
Default: 150

External MQTT

The module listens to the following MQTT topics:

everest_external/nodered/{connector_id}/carsim/cmd/enable
Used to enable or disable the car simulator.
Disabling an active vehicle discards its running command list and unplugs it before disabling the board support. Re-enabling does not resume that list. An idle plugged-in vehicle stays plugged in.
Possible values are:
  • true

  • false

everest_external/nodered/{connector_id}/carsim/cmd/execute_charging_session
Used to execute a charging session based on the semicolon separated provided command string.
"sleep 1;iso_wait_slac_matched;iso_start_v2g_session DC;iso_wait_pwr_ready;sleep 36000"
(For all available commands see: Simulator Commands)
everest_external/nodered/{connector_id}/carsim/cmd/modify_charging_session
Used to modify the current charging session.
Follows the same format as execute_charging_session.

Ending a command list does not stop charging. The vehicle keeps its active state until a stop command, a charger stop, or an unplug ends the session. Unless the vehicle is at A or B, execute_charging_session logs a refusal, even if no list is running (this includes E, diode fault and BCB toggle). With an ISO15118_ev connected, use modify_charging_session to send a stop command such as iso_stop_charging. At A or B, execute can replace a parked or waiting list, or start another list after one finishes.

In basic AC charging (CHARGING_REGULATED), an ended list leaves no state-machine ticks running. PWM changes, including an EVSE pause by PWM, are not followed until a list runs again.

Simulator Commands

sleep {time in seconds}
Sleeps for the specified time.
Example: sleep 10

test

cp_c_pulse {time in seconds}
Holds the control pilot in state C for the given time, then releases it to B (to A if the vehicle is unplugged). A command list that replaces it mid-pulse releases the pilot the same way.
On MCS this is the readiness claim the EV firmware turns into the wake-up toggle of a sleeping EVSE; hold it for at least 2 seconds.
Example: cp_c_pulse 4
iso_wait_pwm_is_running
Sets the vehicle plugged in (CP B) and waits until the EVSE drives a PWM duty cycle between 4 % and 97 %.
iso_wait_pwm_is_running {timeout in seconds}
Like iso_wait_pwm_is_running, but continues without PWM once the timeout expires, so matching can start on the CP state alone against an EVSE that keeps a static +12 V.
Example: iso_wait_pwm_is_running 10
iso_start_v2g_session {energy mode}[,{payment option}][,{departure time},{energy amount}]
Asks the ISO15118_ev provider to start a V2G session. Payment option is auto (default), externalpayment or contract. Departure time and energy amount default to the departure_time and e_amount configuration.
Energy modes:
  • ac: AC, single phase or three phase per three_phases

  • ac_bpt: AC bidirectional power transfer (ISO 15118-20)

  • ac_der: AC with IEC DER control (ISO 15118-20)

  • dc: DC

  • dc_bpt: DC bidirectional power transfer (ISO 15118-20)

  • mcs: Megawatt Charging System, an ISO 15118-20 DC service of its own

three_phases selects the phase count an AC session starts with (and the single or three phase service for ac); iso_draw_power_regulated sets the phases it draws on. DC modes use the DC power path. An unknown energy mode, or a start the provider rejects, fails the command and ends the command list.
Example: iso_start_v2g_session dc_bpt,contract
iso_wait_for_stop {time in seconds}

Requests a stop when the timer expires or the charger requests it. CP stays in C until power_delivery_stopped confirms PowerDelivery(Stop), or the V2G session ends. MCS ignores power_delivery_stopped and holds C until session end because C-exit under power latches CEFAULT on the bench and release after an accepted Stop has not been verified there. The hold expires after 10 seconds if the session has not ended and no applicable stop signal arrives. The contactor then opens and CP stays in B for the stop dwell.

Auto-Generated Reference

Module Configuration

connector_id: integer <required>
Connector id of the evse manager to which this simulator is connected to
auto_enable: boolean <optional>
default: False
Enable this simulation directly at start. Set to true for pure SIL configs, set to false for HIL.
auto_exec: boolean <optional>
default: False
Enable automatic execution of simulation commands at startup from auto_exec_commands config option.
auto_exec_infinite: boolean <optional>
default: False
If enabled the simulation commands executes infinitely.
auto_exec_commands: string <optional>
default: “”
Simulation commands, e.g. sleep 1;iec_wait_pwr_ready;sleep 1;draw_power_regulated 16,3;sleep 30;unplug
session_logging: boolean <optional>
default: False
Log every V2G response the EV accepted in the HLC session to the console (the ISO15118_ev provider does not report the requests it sends) – the EV-side counterpart of the EvseManager option of the same name. Debug aid; off by default.
ac_nominal_voltage: number <optional>
default: 230
Nominal AC voltage between phase and neutral in Volt
dc_max_current_limit: integer <optional>
default: 300
Maximum current allowed by the EV
dc_max_power_limit: integer <optional>
default: 150000
Maximum power allowed by the EV
dc_max_voltage_limit: integer <optional>
default: 900
Maximum voltage allowed by the EV
dc_min_voltage_limit: integer <optional>
default: 150
Minimum voltage the EV can accept. Emitted into DC_PreChargeReq and DC_ChargeLoopReq, where it is mandatory.
dc_energy_capacity: integer <optional>
default: 60000
Energy capacity of the EV
dc_target_current: integer <optional>
default: 5
Target current requested by the EV
dc_target_voltage: integer <optional>
default: 200
Target voltage requested by the EV
support_sae_j2847: boolean <optional>
default: False
Supporting SAE J2847 ISO 2 bidi version
dc_discharge_max_current_limit: integer <optional>
default: 300
Maximum discharge current allowed by the EV
dc_discharge_max_power_limit: integer <optional>
default: 150000
Maximum discharge power allowed by the EV
dc_discharge_target_current: integer <optional>
default: 5
Discharge target current requested by the EV
dc_discharge_v2g_minimal_soc: integer <optional>
default: 20
Discharge minimal soc at which the evse should shutdown
max_current: number <optional>
default: 16
Ac max current in Ampere
three_phases: boolean <optional>
default: True
Support three phase
departure_time: integer <optional>
default: 86400
Departure time in seconds after the session starts
e_amount: integer <optional>
default: 0
Energy amount in kWh that should be charged during the session
soc: integer <optional>
default: 30
SoC at start of a simulated charging process
keep_cross_boot_plugin_state: boolean <optional>
default: False
Keep plugin state across boot (use for simulation only).
plugin_commands: string <optional>
default: “”
Simulation commands for the EV on “plugin” sim command, e.g. sleep 1;iec_wait_pwr_ready;sleep 1;draw_power_regulated 16,3;sleep 30;unplug
force_payment_option: boolean <optional>
default: False
Force the use of the selected payment option
pause_charging_at_full_soc: boolean <optional>
default: False
Pause charging like a real EV once the simulated battery reaches 100% SoC. The EV stays plugged in and the charging session remains active, so the EVSE reports a charging pause instead of ending the transaction. Disabled by default so long-running simulations keep drawing power indefinitely.

Provides

This implements the car simulator
ev_manager: ev_manager
Implementation of the ev manager to provide additional information such as detailed EV info

Requirements

ev_board_support: ev_board_support 1
ev: ISO15118_ev 0..1
slac: ev_slac 0..1
powermeter: powermeter 0..1
kvs: kvs 0..1

Metadata

Authors

Cornelius Claussen
Sebastian Lukas
Tobias Marzell

License