EVPVSynergies¶
Electric Vehicle – Photovoltaic (EV–PV) energy synergy analyzer.
The EVPVSynergies class quantifies the temporal and energetic interaction
between electric vehicle (EV) charging demand and photovoltaic (PV) electricity
production. It evaluates how effectively on-site or nearby PV generation
can support EV charging loads. *
The class computes daily energy and synergy indicators including
- Energy coverage ratio
- Self-sufficiency ratio
- Self-consumption ratio
- Excess PV production ratio
- Spearman rank correlation between PV and EV profiles
All metrics are evaluated on a 24-hour basis and can be aggregated across a user-defined date range.
Required inputs
- A
PVSimulatorinstance containing PV capacity factor time series - An EV charging demand load curve
- Installed PV capacity (MW)
Attributes:
| Name | Type | Description |
|---|---|---|
pv_capacity_MW |
float
|
Installed photovoltaic capacity (MW). |
pv_capacity_factor |
dict
|
Daily interpolation functions of PV capacity factors. |
ev_charging_demand_MW |
callable
|
Interpolated EV charging demand profile (MW). |
Notes
- All integrations are performed over a 24-hour horizon (0–24 h)
- Time resolution is defined by interpolation and integration settings
- Results represent theoretical energy synergies, not operational dispatch
Attributes¶
ev_charging_demand_MW
property
writable
¶
Interpolated EV charging demand profile.
Returns:
| Name | Type | Description |
|---|---|---|
interp1d |
interp1d
|
Continuous EV charging demand function (MW vs time). |
pv_capacity_MW
property
writable
¶
Installed PV capacity.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
PV capacity in megawatts (MW). |
pv_capacity_factor
property
writable
¶
Daily PV capacity factor interpolation functions.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary mapping 'MM-DD' to interpolation functions returning PV capacity factors as a function of hour. |
Functions¶
__init__(pv, load_curve, pv_capacity_MW)
¶
Initialize the EV–PV synergy analyzer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pv
|
PVSimulator
|
Object containing PV capacity factor results. |
required |
load_curve
|
DataFrame
|
EV charging demand profile containing: - time_h - depot - stop - terminal |
required |
pv_capacity_MW
|
float
|
Installed PV capacity in megawatts (MW). |
required |
daily_metrics(start_date, end_date, n_points=100)
¶
Compute all EV–PV synergy metrics over a date range.
Metrics computed for each day include
- PV production
- EV demand
- Energy coverage ratio
- Self-sufficiency ratio
- Self-consumption ratio
- Excess PV ratio
- Spearman correlation coefficient and p-value
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
str
|
Start date in 'MM-DD' format. |
required |
end_date
|
str
|
End date in 'MM-DD' format. |
required |
n_points
|
int
|
Temporal sampling resolution. Defaults to 100. |
100
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
pd.DataFrame: Daily EV–PV synergy metrics. |
energy_coverage_ratio(day='01-01')
¶
Energy coverage ratio.
Defined as
PV production / EV charging demand
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
str
|
Day in 'MM-DD' format. Defaults to '01-01'. |
'01-01'
|
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Energy coverage ratio. |
ev_demand()
¶
Total daily EV charging demand.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Daily EV electricity demand (MWh). |
excess_pv_ratio(day='01-01', coincident_power=None)
¶
Excess PV production ratio.
Defined as
(PV production − coincident energy) / PV production
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
str
|
Day in 'MM-DD' format. Defaults to '01-01'. |
'01-01'
|
coincident_power
|
float
|
Precomputed coincident energy (MWh). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Excess PV ratio. |
pv_power_MW(day='01-01')
¶
PV power output function for a given day.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
str
|
Day in 'MM-DD' format. Defaults to '01-01'. |
'01-01'
|
Returns:
| Name | Type | Description |
|---|---|---|
callable |
callable
|
Function returning PV power output (MW) at time t. |
pv_production(day='01-01')
¶
Total daily PV electricity production.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
str
|
Day in 'MM-DD' format. Defaults to '01-01'. |
'01-01'
|
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Daily PV energy production (MWh). |
self_consumption_ratio(day='01-01', coincident_power=None)
¶
Self-consumption ratio.
Defined as
Coincident PV–EV energy / PV production
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
str
|
Day in 'MM-DD' format. Defaults to '01-01'. |
'01-01'
|
coincident_power
|
float
|
Precomputed coincident energy (MWh). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Self-consumption ratio. |
self_sufficiency_ratio(day='01-01', coincident_power=None)
¶
Self-sufficiency ratio.
Defined as
Coincident PV–EV energy / EV charging demand
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
str
|
Day in 'MM-DD' format. Defaults to '01-01'. |
'01-01'
|
coincident_power
|
float
|
Precomputed coincident energy (MWh). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Self-sufficiency ratio. |
spearman_correlation(day='01-01', n_points=100)
¶
Spearman rank correlation between PV production and EV demand profiles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
str
|
Day in 'MM-DD' format. Defaults to '01-01'. |
'01-01'
|
n_points
|
int
|
Number of temporal samples. Defaults to 100. |
100
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple
|
(Spearman correlation coefficient, p-value). |