Novel Fuzzy Controller for a Standalone Electric Vehicle Charging Station Supplied by Photovoltaic Energy

: The electric vehicle (EV) is one of the most important and common parts of modern life. Recently, EVs have undergone a big development thanks to the advantages of high efﬁciency, negligible pollution, low maintenance, and low noise. Charging stations are very important and mandatory services for electric vehicles. Nevertheless, they cause high stress on the electric utility grid. Therefore, renewable energy-sourced charging stations have been introduced. They improve the environmental issues of the electric vehicles and support remote area operation. This paper proposes the application of fuzzy control to an isolated charging station supplied by photovoltaic power. The system is modeled and simulated using Matlab/Simulink. The simulation results indicate that the disturbances in the solar insolation do not affect the electric vehicle charging process at all. Moreover, the controller perfectly manages the stored energy to compensate for the solar energy variations. Additionally, the system response with the fuzzy controller is compared to that with the PI controller. The comparison shows that the fuzzy controller provides an improved response.


Introduction
Recently, electric vehicles (EVs) have been replacing the traditional internal combustion engine (ICE) vehicles [1,2]. Compared to the ICE vehicles, the EVs have the advantages of negligible maintenance, high efficiency, low acoustic noise, and low environmental pollution. Nevertheless, the development of EVs has many obstacles regarding the services. One important service is the charging stations, which have many issues to be solved regarding the time of charging of the EV and the distribution of these stations, as well as the best way to make the stations compatible with the utility grid. There are many charging techniques utilized for the EV charging stations. The fastest charging technique is DC charging, which can be accomplished in a few minutes [3,4]. However, it causes a large electrical load in a short time that has negative effects on the utility grid. In addition, with a large number of charging stations, the utility grid will suffer from instability and overload problems [5,6]. It is proven in the literature that introducing an energy storage system (ESS) to the EV charging stations provides performance benefits to the utility grid [7][8][9], and helps in slightly reducing the loading stress of the grid.
To ensure zero emissions and pollution from the EV system, including the related services, renewable energy systems must be utilized for the charging stations. 2 of 13 Commonly, wind energy, biogas energy, and photovoltaic (PV) energy are utilized to supply power to EV charging stations [10,11]. However, PV-powered charging stations are associated with high efficiency and simplicity. In the literature, much research has been proposed for charging stations that are supplied by PV [12]. In Reference [13], a high-power biogas EV charging station was introduced and designed. The authors of [14] introduced a multiport converter connected to a PV array to be utilized in the EV charging station. Nevertheless, there is a large distortion in the grid current. Another strategy was proposed in [15] for the energy management of the EV charging station, where it was suggested to reduce the energy consumption from the grid and store the reserve PV energy. The authors of [16] presented a grid-tied station with a PV panel that has a power Z-source converter. The system performance was better, but its applications are locked to the gridtied operation. In Reference [17], a charging station powered by PV was proposed. The system included an ESS to help in improving the peak load performance. An optimization for the energy management of a PV-powered station linked to an ESS is proposed in [18]. In Reference [19], a new power management technique was proposed to serve small EVs in remote areas. The authors of [20] introduced an optimization technique for the EV charging stations' schedule. In Reference [21], a two-way EV charging station powered by solar PV has been proposed. However, the AC charging could not be used.
Conventionally, proportion integral derivative (PID) controllers have been used to control the EV charging stations [22]. These controllers are stable, simple, reliable, and easy to tune. However, they have many problems, such as high overshoot, and their performance depends on the setpoint [23]. Moreover, they are not suitable for complex, nonlinear systems, time-delay, higher-order systems, and systems with uncertainties. Therefore, the controller behavior may cause deterioration of the system performance. These drawbacks can be overcome by using an intelligent controller, such as fuzzy logic [24,25]. It has been found that fuzzy logic-based PID controllers have better capabilities of handling the previously mentioned systems.
In this paper, a novel fuzzy PID controller is proposed for an isolated EV charging station supplied from a PV panel. The proposed system involves a PV array, a boost converter, bidirectional charging converters, a lead-acid battery representing the energy storage system, and a lithium-ion battery representing the electric vehicle. All the system components are modeled. Then, the fuzzy controller is designed in detail. A simple energy management technique is adapted to regulate the energy flow. Finally, the proposed system has been simulated using the Matlab platform simulation program. The results compare the system performance of the FPID controller and the conventional PID. The reason behind using the FPID controller for the proposed system is the complexity of the system. Additionally, the setpoint of the proposed system is time-varying as the solar insolation level usually varies. Hence, the conventional PID controller has a poor response to the proposed system. The paper structure is as follows: Section 2 presents the charging station description. The proposed charging station model is described in Section 3. Section 4 presents the control system design. The simulation results have been discussed in Section 5. Section 6 presents the conclusions.

Charging Station Description
The structure of the proposed system is presented in Figure 1. The EV charging station system is a standalone charging station that is supplied by a PV panel. However, the PV panel converts the insolation solar energy into electrical energy that is fed to the EV charging station. A boost regulator is attached to the PV output. Its function is matching the DC link voltage with the PV output voltage. Additionally, it is used to ensure the maximum power point tracking (MPPT) state of the PV array. The DC bus is linked to two DC/DC converters. The converters are called the ESS converter and the EV charge converter. The EV charge converter is a simple step-down converter. Its function is the charging of the EV battery. On the other hand, the ESS converter is a two-directional step-down converter. Its function is the regulation of the charging/discharging processes of the ESS. Additionally, it contributes to the DC bus voltage regulation. ensure the maximum power point tracking (MPPT) state of the PV array. The DC bus linked to two DC/DC converters. The converters are called the ESS converter and the E charge converter. The EV charge converter is a simple step-down converter. Its functio is the charging of the EV battery. On the other hand, the ESS converter is a two-direction step-down converter. Its function is the regulation of the charging/discharging process of the ESS. Additionally, it contributes to the DC bus voltage regulation.

Proposed Charging Station Modeling
To achieve the analysis, simulation, and design of the proposed system, syste modeling is usually mandatory. The models of the system components are selected to as close to the practice as possible. Therefore, all types of losses, snubber circuits, an voltage drops are present. The models of each component of the proposed system a discussed in the following sections.

The PV Array Model
The proposed system has a PV array that is formed by 32 solar cells connected as series cells in two parallel strings. An approximate actual model for the PV panel is show in Figure 2 [26]. The short circuit current of the PV array is represented by the curre source (IS). The series and parallel resistances (rp, rs) shown in the figure represent t string and contact resistances of the panel.

Proposed Charging Station Modeling
To achieve the analysis, simulation, and design of the proposed system, system modeling is usually mandatory. The models of the system components are selected to be as close to the practice as possible. Therefore, all types of losses, snubber circuits, and voltage drops are present. The models of each component of the proposed system are discussed in the following sections.

The PV Array Model
The proposed system has a PV array that is formed by 32 solar cells connected as 16 series cells in two parallel strings. An approximate actual model for the PV panel is shown in Figure 2 [26]. The short circuit current of the PV array is represented by the current source (I S ). The series and parallel resistances (r p , r s ) shown in the figure represent the string and contact resistances of the panel.

Proposed Charging Station Modeling
To achieve the analysis, simulation, and design of the proposed system, system modeling is usually mandatory. The models of the system components are selected to be as close to the practice as possible. Therefore, all types of losses, snubber circuits, and voltage drops are present. The models of each component of the proposed system are discussed in the following sections.

The PV Array Model
The proposed system has a PV array that is formed by 32 solar cells connected as 16 series cells in two parallel strings. An approximate actual model for the PV panel is shown in Figure 2 [26]. The short circuit current of the PV array is represented by the current source (IS). The series and parallel resistances (rp, rs) shown in the figure represent the string and contact resistances of the panel.

The Charging Converters Model
The proposed system charging converters are called the ESS converter and the EV charge converter. Both are DC/DC converters. However, the EV charge converter is of a step-down type. On the other hand, the ESS converter is an up/down-type converter. It is capable of two-directional operations. The two converters may have the same topology, as shown in Figure 3. However, the operation of the topology may be adapted to act as a one-quadrant or two-quadrant converter. It is assumed that the converters operate in the continuous conduction mode. The converter consists of two transistors (Q 1 , Q 2 ) and a filter. Usually, each transistor has a built-in parallel diode. The input to the converter is the DC link voltage and the output is the ESS. There are two modes for the converter, called the step-down/up modes. It can operate in the step-down mode when the transistor Q 1 is on and the transistor Q 2 is off, and this occurs in the charging process of the ESS. On the other hand, it operates in the step-up mode when switch Q 2 is on and the switch Q 1 is off, and this occurs in the discharging process of the ESS. as shown in Figure 3. However, the operation of the topology may be adapted to act as a one-quadrant or two-quadrant converter. It is assumed that the converters operate in the continuous conduction mode. The converter consists of two transistors (Q1, Q2) and a filter. Usually, each transistor has a built-in parallel diode. The input to the converter is the DC link voltage and the output is the ESS. There are two modes for the converter, called the step-down/up modes. It can operate in the step-down mode when the transistor Q1 is on and the transistor Q2 is off, and this occurs in the charging process of the ESS. On the other hand, it operates in the step-up mode when switch Q2 is on and the switch Q1 is off, and this occurs in the discharging process of the ESS.
The model of the converter can be presented as: The step-down mode of operation: where (vb, il) are the ESS terminal voltage and the inductor current, (rb, Eb) are the ESS internal resistance and voltage, S1 is a binary number that represents the switch S1 state, Vdc is the DC link voltage, and (C, L) are the filter capacitance and the inductance. The step-up mode of operation: where S2 is a binary number that represents the switch S2 state.

Control System Design
There are three control loops utilized in the proposed EV charging station, as presented in Figure 4: the EV charge controller, the ESS converter controller, and the MPPT controller. The EV charge controller is used to regulate the EV charging process. Furthermore, the ESS converter controller is utilized to regulate the charge and discharge of the ESS. Additionally, it controls the DC link voltage. The third controller is the MPPT controller, which helps in extracting the maximum power from the PV array. The details of these controllers are discussed in the following sections. The model of the converter can be presented as: The step-down mode of operation: .
where (v b , i l ) are the ESS terminal voltage and the inductor current, (r b , E b ) are the ESS internal resistance and voltage, S 1 is a binary number that represents the switch S 1 state, V dc is the DC link voltage, and (C, L) are the filter capacitance and the inductance. The step-up mode of operation: where S 2 is a binary number that represents the switch S 2 state.

Control System Design
There are three control loops utilized in the proposed EV charging station, as presented in Figure 4: the EV charge controller, the ESS converter controller, and the MPPT controller. The EV charge controller is used to regulate the EV charging process. Furthermore, the ESS converter controller is utilized to regulate the charge and discharge of the ESS. Additionally, it controls the DC link voltage. The third controller is the MPPT controller, which helps in extracting the maximum power from the PV array. The details of these controllers are discussed in the following sections. Appl. Syst. Innov. 2021, 4, 63 5 of 14

The MPPT Controller
The utilization of the system can be greatly increased using the MPPT controller. There are many techniques for applying the MPPT [27][28][29]. In this research, a simple approach is used, named "Perturb and Observe". The procedure of this approach is as follows: • An initial value for the duty ratio is suggested and applied to the boost converter. • Then, the current and voltage of the PV are sensed.

•
The change in the PV power is calculated [29].

•
The output of the controller is the boost converter duty ratio to obtain the MPPT state.

The EV Charger Controller
The EV charger controller controls the EV charging process by regulating the related converter. Usually, the control consists of two nested loops. The outer loop is the voltage loop and the inner one is the current loop. This technique is a constant voltage and constant current technique. This controller is implemented using a PID controller. The PID coefficients or gains are adapted by the Ziegler-Nichols tunning approach.

The MPPT Controller
The utilization of the system can be greatly increased using the MPPT controller. There are many techniques for applying the MPPT [27][28][29]. In this research, a simple approach is used, named "Perturb and Observe". The procedure of this approach is as follows: • An initial value for the duty ratio is suggested and applied to the boost converter. • Then, the current and voltage of the PV are sensed.

•
The change in the PV power is calculated [29].

•
The output of the controller is the boost converter duty ratio to obtain the MPPT state.

The EV Charger Controller
The EV charger controller controls the EV charging process by regulating the related converter. Usually, the control consists of two nested loops. The outer loop is the voltage loop and the inner one is the current loop. This technique is a constant voltage and constant current technique. This controller is implemented using a PID controller. The PID coefficients or gains are adapted by the Ziegler-Nichols tunning approach.

The Storage Battery Charger Controller
This controller serves as a regulator for the charging/discharging of the ESS and DC link voltage. The stabilization of the DC link voltage is very important for the system's operation and stability. Consequently, a fuzzy PID controller is implemented for this job. The details of the design of this controller are discussed in the following sections.

The Fuzzy PID Controller
In the literature, there is a lot of research on the PID controller based on some intelligent techniques using fuzzy logic principles [23][24][25]. A self-tuning fuzzy PID controller is proposed for this research. It uses the fuzzy inference system to tune the gains of the PID controller. This is accomplished by manipulating the error (e) and the derivative of the error (∆e). The block diagram of the ESS charge controller is shown in Figure 4b. The self-tuning fuzzy PID controller description is shown in Figure 4d.
The idea is to implement the fuzzy rules and reasoning and then produce PID controller gains. It is well-known that the PID controller output is given by: where (y) is the PID controller output, which is the reference current (I b-ref ) for the ESS constant current control loop. The PID controller gains (k p , k i , k d ) are determined based on the measured error (e) and the difference of the error signal (∆e): where (T) is the sampling rate and (i b , i b-ref ) is the ESS current and reference current. The procedures of fuzzification of the controller parameters, fuzzy reasoning, and defuzzification will be explained in the following sections.

The Fuzzification Process
In this stage, the crisp values of the controller inputs are converted into fuzzy sets. Therefore, the converted data can be used by the inference algorithm to manipulate the control rules. It is assumed that e and ∆e are within the limits [e min , e max ] and [∆e min , ∆e max ], respectively. The values (e, ∆e) should be normalized within [zero, one] with the help of: The periods of each linguistic value of (e n , ∆e n ) are selected to be a fuzzy partition with seven parts, assigning the linguistic values of NB: negative big, NM: negative medium, NS: negative small, ZE: zero, PS: positive small, PM: positive medium, and PB: positive big. The membership function with the triangular waveform is assigned to the linguistic values. The membership functions of (e, ∆e) are shown in Figure 5a.
In the same way, let the limits of (∆k p and ∆k d ) be [0,1]. Let (∆k p and ∆k d ) be the changes of the proportional and derivative gains. These were assigned to adjust the proportional and derivative parameters. The equation is given by: where (k pp , k dd ) are constant factors for the proportional and the derivative gains. The Gaussian membership functions, shown in Figure 5b, are assigned to the linguistic values of (∆k p and ∆k d ). These values are assumed to be either big or small.
The gain of the integration part of the PID controller can be calculated using the relation in Equation (7). Figure 5c shows the membership function for the parameter (α). Its linguistic values are set to be S (small), MS (medium-small), M (medium), or B (big). The Gaussian membership functions, shown in Figure 5b, are assigned to the linguistic values of (kp and kd). These values are assumed to be either big or small.
The gain of the integration part of the PID controller can be calculated using the relation in Equation (7). Figure 5c shows the membership function for the parameter (α). Its linguistic values are set to be S (small), MS (medium-small), M (medium), or B (big).

The Fuzzy Rule Base
The fuzzy rules used to calculate the gain parameters (kp and kd) may be written as: The fuzzy rules used to calculate the gain parameters (∆k p and ∆k d ) may be written as: If e n (i) is A m1 and ∆e n (i) is A m2 , then ∆k p is B m1 , ∆k d is B m2 , and α is B m3 . Let (e n (i), ∆e n (i)) be the i th observation for the normalized error and difference in error, (A m1 , B m1 ) are a fuzzy set for input and output (1) and the m th rule, and (m) is the ruling order.
The normalized gain parameters have the rule base presented in Table 1.

Simulation Results
The proposed charging station, shown in Figure 1, was simulated using the Matlab/Simulink platform. The specifications and parameters of the charging station are listed in Table 2. Applying step disturbances of the insolation level, the system controllers' performances were tested and compared, as shown in Figures 6-9. Figures 6 and 7 show the response using the fuzzy controller, while Figures 8 and 9 show the response using the PI controller. EV charging and store the excess energy in the ESS. The charging current is positive in this period. Nevertheless, at low insolation levels, at ≤50%, the solar energy is not sufficient to charge the EV. Hence, the ESS discharges to keep the EV charging process steady by compensating for the solar energy drop. Figure 6d shows the EV current response with the reference value produced by the voltage controller. It is seen that the EV current tracks the reference well and has nearly no disturbance corresponding to the insolation step changes.  Figure 7a shows the variations of the system powers corresponding to the variations of the insolation level. The PV power, shown in Figure 7b, precisely tracks the MPPT power and follows the insolation level. However, there are steep drops in the PV power at the instant of the step change in the insolation. It can be explained as follows: The sample time of the MPPT algorithm is relatively larger than the system sample. Hence, the absorbed power from the PV will be kept at its high level until the MPPT sample occurs. Figure 7c shows the EV charging power. It is steady and has not been affected by the PV power disturbances. Figure 7d shows the ESS power response to the insolation level variations. When the insolation is ≥50%, the generated PV power is sufficient to charge the EV and store the reserve power in the ESS. However, at the insolation levels of ≤50%, the energy is not enough to charge the EV. Therefore, the ESS discharges to compensate for the drop in solar energy. It is noted that the discharge power level of the ESS is higher than the charging power. This phenomenon occurs due to the internal ESS losses. Furthermore, the charging/discharging processes follow and compensate for the insolation variations.  Figure 8 shows the response of the DC bus voltage, the ESS battery current, and the EV battery current against the solar insolation level for the PI controller. All the variables track the references very well. Nevertheless, the performances are less than that of the fuzzy controller shown in Figure 6.  Figure 6a shows the variations of the insolation level, while Figure 6b shows the response of V dc compared to the reverence value. It can be recognized that there is no steady-state error with a small settling time and percentage overshoot. The ESS charging current is shown in Figure 6c. It follows the reference produced by the V dc controller very well, however the reference value changes according to the insolation level. When the insolation level is relatively high, ≥50%, the PV energy is sufficient to supply energy to the EV charging and store the excess energy in the ESS. The charging current is positive in this period. Nevertheless, at low insolation levels, at ≤50%, the solar energy is not sufficient to charge the EV. Hence, the ESS discharges to keep the EV charging process steady by compensating for the solar energy drop. Figure 6d shows the EV current response with the reference value produced by the voltage controller. It is seen that the EV current tracks the reference well and has nearly no disturbance corresponding to the insolation step changes.  Figure 8 shows the response of the DC bus voltage, the ESS battery current, and the EV battery current against the solar insolation level for the PI controller. All the variables track the references very well. Nevertheless, the performances are less than that of the fuzzy controller shown in Figure 6.   A comparison of the system response with the two controllers is presented in Figure  10. Figure 10a shows the variation of the overshoot in the DC bus voltage with the insolation level for the two controllers. The FPID provided the lowest overshoot in all cases. The percentage improvement in the overshoot was in the range of 15% to 60%, which may be considered a good achievement. On the other hand, Figure 10b shows the variation of the settling time of the DC bus voltage according to the insolation level disturbances. It can be noticed that the FPID provided smaller settling times under all circumstances. There was an excellent drop in the settling time, within the range of 25% to 58%.  The sample time of the MPPT algorithm is relatively larger than the system sample. Hence, the absorbed power from the PV will be kept at its high level until the MPPT sample occurs. Figure 7c shows the EV charging power. It is steady and has not been affected by the PV power disturbances. Figure 7d shows the ESS power response to the insolation level variations. When the insolation is ≥50%, the generated PV power is sufficient to charge the EV and store the reserve power in the ESS. However, at the insolation levels of ≤50%, the energy is not enough to charge the EV. Therefore, the ESS discharges to compensate for the drop in solar energy. It is noted that the discharge power level of the ESS is higher than the charging power. This phenomenon occurs due to the internal ESS losses. Furthermore, the charging/discharging processes follow and compensate for the insolation variations. Figure 8 shows the response of the DC bus voltage, the ESS battery current, and the EV battery current against the solar insolation level for the PI controller. All the variables track the references very well. Nevertheless, the performances are less than that of the fuzzy controller shown in Figure 6. Figure 9 shows the response of the PV power, the ESS battery power, and the EV battery power against the solar insolation level for the PI controller. All the variables track the references very well. However, the performances are less than that of the fuzzy controller shown in Figure 7.
A comparison of the system response with the two controllers is presented in Figure 10. Figure 10a shows the variation of the overshoot in the DC bus voltage with the insolation level for the two controllers. The FPID provided the lowest overshoot in all cases. The percentage improvement in the overshoot was in the range of 15% to 60%, which may be considered a good achievement. On the other hand, Figure 10b shows the variation of the settling time of the DC bus voltage according to the insolation level disturbances. It can be noticed that the FPID provided smaller settling times under all circumstances. There was an excellent drop in the settling time, within the range of 25% to 58%. A comparison of the system response with the two controllers is presented in Figure  10. Figure 10a shows the variation of the overshoot in the DC bus voltage with the insolation level for the two controllers. The FPID provided the lowest overshoot in all cases. The percentage improvement in the overshoot was in the range of 15% to 60%, which may be considered a good achievement. On the other hand, Figure 10b shows the variation of the settling time of the DC bus voltage according to the insolation level disturbances. It can be noticed that the FPID provided smaller settling times under all circumstances. There was an excellent drop in the settling time, within the range of 25% to 58%.  Table 3 summarizes the comparison of the two controllers. The system efficiency was calculated against the solar insolation level for the fuzzy and PI controllers. The efficiency value was not affected by the controller type.   Table 3 summarizes the comparison of the two controllers. The system efficiency was calculated against the solar insolation level for the fuzzy and PI controllers. The efficiency value was not affected by the controller type.

Conclusions
In this paper, a novel fuzzy PID controller was proposed for an isolated EV charging station supplied from a PV panel. The proposed system involves a PV array, a boost converter, bidirectional charging converters, a lead-acid battery representing the energy storage system, and a lithium-ion battery representing the electric vehicle. However, it was shown that the conventional PID controller is not the best choice for the system response, due to the system complexity and the frequently varying setpoint of the proposed system as the solar insolation level varies normally. Hence, the FPID controller was adapted for the proposed system. All the system components were modeled. Then, the fuzzy controller was designed in detail. A simple energy management technique was adapted to regulate the energy flow. The system was modeled and simulated using Matlab/Simulink. The simulation results indicated that the disturbances in the solar insolation did not affect the electric vehicle charging process at all. Moreover, the controller perfectly managed the stored energy to compensate for the solar energy variations. Additionally, the system response with the fuzzy controller was compared to that with the PI controller. The comparison showed that the fuzzy controller provided an improved response. An average improvement in the overshoot and settling time of about 35% was achieved with the FPID controller. For step variations in the insolation level, the results indicated steady charging of the EV without disturbance. In addition, the charging/discharging processes of the ESS acted precisely to compensate for and store the insolation disturbances. Furthermore, the MPPT controller closely followed the maximum point of the solar energy.