The EV model object defined by {evprof} is generated with function get_ev_model(). This function returns an object of class evmodel. This object prints a summary of its components. The package provides an example of evmodel created in the California study case article, using the charging sessions data provided by ACN.

evprof::california_ev_model
## EV sessions model of class "evmodel", created on 2023-05-16 
## Timezone of the model: America/Los_Angeles 
## The Gaussian Mixture Models of EV user profiles are built in:
##   - Connection Models: logarithmic scale
##   - Energy Models: logarithmic scale
## 
## Model composed by 2 time-cycles:
##   1. Workday:
##      Months = 1-12, Week days = 1-2
##      User profiles = Visit, Worktime
##   2. Weekend:
##      Months = 1-12, Week days = 6-7
##      User profiles = Visit

The evmodelobject has two components:

The model itself is composed by multiple Gaussian models (GMM). The connection_models are Gaussian models of two variables (connection start time and connection duration) and the energy_models are built with a single variable (energy). Thus, the statistic features of connection_models are a centroid (\(\mu\)), a covariance matrix (\(\Sigma\)) and the weight or ratio of the corresponding model. Besides, the statistic features of energy_models are a mean (\(\mu\)), a standard deviation (\(\sigma\)) and the weight or ratio of the corresponding model.

Let’s take a look to these statistical features of the Worktime user profile for Working days in the California model:

california_ev_model$models
## # A tibble: 2 × 4
##   time_cycle months     wdays     user_profiles   
##   <chr>      <list>     <list>    <list>          
## 1 Workday    <int [12]> <int [5]> <tibble [2 × 4]>
## 2 Weekend    <int [12]> <int [2]> <tibble [1 × 4]>
workday_model <- california_ev_model$models$user_profiles[[1]]
workday_model
## # A tibble: 2 × 4
##   profile  ratio connection_models energy_models   
##   <chr>    <dbl> <list>            <list>          
## 1 Visit    0.519 <tibble [4 × 3]>  <tibble [1 × 2]>
## 2 Worktime 0.481 <tibble [3 × 3]>  <tibble [1 × 2]>
worktime_model <- workday_model[2, ]

The connection model is a mixture of 3 bi-variate Gaussian Models:

worktime_model$connection_models
## [[1]]
## # A tibble: 3 × 3
##   mu        sigma         ratio
##   <list>    <list>        <dbl>
## 1 <dbl [2]> <dbl [2 × 2]> 0.292
## 2 <dbl [2]> <dbl [2 × 2]> 0.343
## 3 <dbl [2]> <dbl [2 × 2]> 0.366

To properly visualize the statistic features’ values the function print_connection_models_table prints the LaTeX code and provides a nice table.

latex_code <- print_connection_models_table(worktime_model, label = "tab:connection", caption = "Worktime connection Gaussian Models", full_width = FALSE)
cat(latex_code)
## \begin{table}
## \resizebox{\linewidth}{!} {
## \begin{tabular}{l|c|c|c}
## \hline
## User profile & Centroid ($\mu$) & Covariance ($\Sigma$) & Share (\%) \\
## \hline
## \multirow{3}{*}{Worktime}& $\begin{array}{cc} 1.9884 \\ 2.2609 \end{array}$&$\begin{array}{cc} 0.0018 & -0.0014 \\ -0.0014 & 0.0096 \end{array}$&29\\ \cline{2-4} & $\begin{array}{cc} 1.8872 \\ 2.2682 \end{array}$&$\begin{array}{cc} 0.0096 & -0.0018 \\ -0.0018 & 0.0064 \end{array}$&34\\ \cline{2-4} & $\begin{array}{cc} 2.2242 \\ 2.1199 \end{array}$&$\begin{array}{cc} 0.0138 & -0.0155 \\ -0.0155 & 0.0383 \end{array}$&37 \\ \hline
## \end{tabular}}
## \caption{\label{tab:connection}Worktime connection Gaussian Models}
## \end{table}

On the other hand, the energy models can be based on the charging rate (Power variable) of the sessions. It has been observed that the energy demand increases together with the charging power (big vehicles have larger batteries and can charge at higher rates). Thus, function get_energy_models has the logical parameter by_power to fit the Energy Gaussian Models for the different groups of charging powers separately. In the case of California study case, we set by_power=FALSE, that’s why we got the Unknown in the energy_models tibble:

worktime_model$energy_models[[1]]
## # A tibble: 1 × 2
##   charging_rate energy_models   
##   <chr>         <list>          
## 1 Unknown       <tibble [8 × 3]>

Thus, the energy model of all Worktime sessions is a mixture of 9 Gaussian models:

worktime_model$energy_models[[1]]$energy_models[[1]]
## # A tibble: 8 × 3
##      mu  sigma  ratio
##   <dbl>  <dbl>  <dbl>
## 1 0.366 0.354  0.0392
## 2 1.64  0.408  0.182 
## 3 1.83  0.157  0.140 
## 4 2.20  0.155  0.115 
## 5 2.49  0.0912 0.127 
## 6 2.67  0.130  0.116 
## 7 3.07  0.275  0.186 
## 8 3.62  0.124  0.0949

The function print_user_profile_energy_models_table is provided to print the energy models in LaTeX and properly visualize the content of the models. It has to be specifically for a single user profile (unlike print_connection_models_table) since every user profile could have multiple models according to the different charging rates.

latex_code <- print_user_profile_energy_models_table(worktime_model$energy_models[[1]], label = "tab:energy", caption = "Worktime energy Gaussian Models", full_width = FALSE)
cat(latex_code)
## \begin{table}
## \resizebox{\linewidth}{!} {
## \begin{tabular}{l|c|c|c}
## \hline
## Charging rate (kW) & Mean ($\mu$) & Std. deviation ($\sigma$) & Share (\%) \\
## \hline
## \multirow{8}{*}{Unknown}& 0.3664&0.3542&4\\ \cline{2-4} & 1.637&0.4077&18\\ \cline{2-4} & 1.827&0.1566&14\\ \cline{2-4} & 2.1967&0.1551&12\\ \cline{2-4} & 2.4934&0.0912&13\\ \cline{2-4} & 2.6708&0.1303&12\\ \cline{2-4} & 3.0745&0.2747&19\\ \cline{2-4} & 3.6219&0.1243&9 \\ \hline
## \end{tabular}}
## \caption{\label{tab:energy}Worktime energy Gaussian Models}
## \end{table}