# Smart Electric Vehicle Charging via Adjustable Real-Time Charging Rates
## 2 Materials and Methods  
### Problem Formulation  
In this study, a controller is assumed to be attached to distribution transformers and strategically vary the charging rate supplied to each vehicle. The controller enables an aggregator to use smart metering technology to access PEV information, such as when a PEV is plugging into the grid, requesting charging and dwelling duration. The algorithm uses fuzzy logic to produce a valley-filling effect by monitoring when distribution transformers operate close to a load limit, which will be determined in this study. When baseloads are close to or above the load limit, ARVF administers low rates. Likewise, charging vehicles receive high rates when baseloads are not close to the load limit, reducing high peaks caused by uncontrolled charging and creating a valley-filling effect. The charging rate that is administered to vehicles is the optimization variable used in this study. The objective function defined by Equation (1),  
\[\min\,F=\left|l_{i}-\left(\sum_{j=1}^{n}y_{i}+x_{i}\right)\right| \tag{1}\]  
is used to determine the charging rate, \(y_{i}\), delivered to PEVs at each 1 min timeslot expressed as \(i\). This function ensures that the difference between the load limit curve denoted as \(l_{i}\) and total load is minimized. The variables \(l_{i}\) and \(x_{i}\), the forecasted load, in the objective function are known variables that do not change during each timeslot. During each timeslot, ARVF analyzes the number of PEVs connected to the transformer and assigns them a charging rate based on their priority ratio, \(p\), defined by Equation (2),  
\[p=\frac{\text{Requested Charge (kWh)}}{\text{Remaining Dwell Time (minutes)}} \tag{2}\]  
and the load difference (\(\Delta\)), defined by Equation (3) is the load limit minus the current baseload and is expressed in kW. \[\Delta(i)=l_{i}-x_{i} \tag{3}\]  
The amount of electricity PEVs receive is determined via a fuzzy logic approach. Fuzzy logic is a formal framework for simulating and executing human heuristic knowledge to regulate a system [51; 52]. The four fundamental components of fuzzy logic are fuzzification, inference mechanism, rule-base, and defuzzification. Inputs are translated into fuzzy sets that are understood by the algorithm, the inference mechanism utilizes the rule-base to interpret inputs, and defuzzification reverts the output of the protocol back to a real number. Figure 2 depicts a fuzzy logic controller, as shown in [PERSON] and [PERSON] [52] and [PERSON] and Yurkovich [51], providing a more comprehensive definition of fuzzy logic. The fuzzy logic decision mechanism used in this study begins by identifying the number of vehicles that are charging, the requested charge, and their remaining dwell time, to calculate \(p\). The load difference, \(\Delta\), is determined and used along with the priority ratio  
Figure 2: Fuzzy Logic Diagram. as inputs to determine \(y_{i}\) in Equation (1). The interpretation of load difference and each vehicle's priority ratio is determined by a set of criteria. The following framework is used to organize these rules,  
If premise, Then consequence  
This generalizes to  
If \(u_{1}\) is \(A_{1}^{j}\) and \(u_{2}\) is \(A_{2}^{j},\text{ and }u_{n}\) is \(A_{n}^{j}\) then \(y_{q}\) is \(B_{q}^{p}\)  
where \(y_{q}\) is an output variable interpreted as a linguistic variable and \(B_{q}^{p}\) is a linguistic variable denoted by Equation (4). \[B_{i}=\left\{B_{i}^{p}:p=1,\;2,M_{i}\right\} \tag{4}\]  
An expert specifies the sets of linguistic rules used to control the system to the desired state. Both values are used as inputs and return an output of 1, 2, or 3, corresponding to small, medium, and large membership functions, shown in Figure 3. These classifications are used to group similar values of load difference and priority ratio together. The load difference membership functions are created using 1.9, 3.3, and 7.2 kW as the center of the three triangle membership functions, respectively.