1 Introduction

The electrification of the transportation sector is significantly contributing to a lesser carbon footprint [1]. The sales of electric vehicles (EVs) are increasing, where more on-road EVs are predicted in the foreseeable future [2]. The twenty-first century saw the rapid development of EV technology, where some EVs were shown to have a better performance than regular internal combustion engine vehicles (ICEVs) in terms of energy conversion efficiency, maximum torque and distance covered per full charge [3]. Hence, the projection of EV to replace the ICEV in the nearest future is quite inevitable [4]. In Malaysia, the National Automotive Policy had distributed soft loans amounting to RM 100 million per year to the EVs vendor for installing and developing advanced EV technology and machinery [5].

Meanwhile, the International Energy Agency had reported that, in the most recent time, the industrial sector has the highest electricity consumption worldwide [6]. Fortunately, the adoption of renewable energy sources (RES) has slowly reduced the world's dependency on fuel-based electric generators. The deployment of distributed solar photovoltaic (PV) systems is growing exponentially over the last decade [7]. Many countries have started promoting rooftop solar PV for homes, commercial buildings and industry [8]. The Sustainable Energy Development Authority, a statutory body in Malaysia, had introduced several solar PV policies, such as Feed-in-Tariff, Self-Consumption and Net Energy Metering (NEM) for residential, commercial, agricultural and industrial sectors [9]. The NEM is a scheme that consumes the electrical energy produced by the solar PV system and exports any excess to the distribution licensees. The installation of solar PV can provide a long-term investment.

Unfortunately, the pure RES installation can cause the power factor (PF) at the industry’s incomer (PFind) to reduce drastically. The minimum PFind value stipulated by the electrical utility in Malaysia is 0.85 lagging [10]. A PFind lower than that will result in a greater power loss where it leads to equipment overloads, equipment overheating and a shorter service life [11]. So, if the owner of the industry fails to fulfill the regulation, the utility will penalize them with a higher monthly electricity bill [10]. Due to this reason, a need to install a master PF controller to regulate the PFind to an intended value without additional installed equipment is imperative.

The literature in [12] had mentioned installing reactive power (Q) compensating devices such as the synchronous condenser, static VAr compensator (SVC) and static synchronous compensator to solve low PFind. Authors in [13] proposed the hybrid control strategies of SVC for Q compensation. However, the authors further added that maintenance is difficult and expensive. Another study in [14] had discussed in-depth the power factor (PF), active power (P) and Q control techniques used in the solar PV system. The control techniques are designed with either quadrature frame-based (dq), alpha–beta frame-based (αβ) or abc frame-based (abc) structures. Authors in [15] had listed five control techniques used for Q management in the RES system, namely sliding mode control, model predictive control, soft computing methods, droop speed control and current mode control. The soft computing method has the fastest response speed among all these control techniques, but its algorithm is rather complicated. Elsewhere, a reliable and flexible bidirectional EV charging system with multi-controller was designed [16], where it can perform discharging control (D-control), current control (I-control), voltage control (V-control), Q-control and PF-control. However, the Q compensating devices and controllers mentioned in [12,13,14, 16] are incapable of regulating PFind to attain an intended value throughout its operation, and the control techniques mentioned in [15] are complex, correspondingly expensive.

This paper proposes a master PF controller that can regulate the PFind to attain the desired value by a single preset reference throughout its operation. This case study involves the operation of a medium voltage industrial system comprising an 11-kV industrial load with Cbank, PF-controlled 400 kWpk solar PV system, bidirectional I-controlled EV fast-charging system and a master PF controller to coordinate them all. This paper discusses the details of each equipment design and control processes involved. The key contributions of this paper are (1) the design of the master PF controller which encompass RES, EV and Cbank to regulate the PFind to any preset reference value, (2) the mathematical formula for calculating the Cdclink and LC filter sizing and (3) validation of the robustness of the master PF controller.

2 Systems modeling

2.1 Overview of the industrial plant

This case study was formulated based on a typical Malaysian 11-kV industrial system integrated with a PF-controlled 400 kWpk solar PV system and a bidirectional I-controlled EV fast-charging system with three charging ports. The ANSI/IEEE 1585–2002 standard stated that 11-kV is a medium level voltage [17], used in industrial facilities with their step-down transformers for connecting to low-rated voltage systems. In this case study, the installation utilized an 11-kV/ 400 V transformer for connecting to the solar PV system and EV charging system. The EV model used is the Nissan LEAF 2019, which is powered by lithium-ion (Li-Ion) battery with a capacity of 40 kWh, 114.3 Ah and a nominal voltage of 350.4 V [18]. There are three EVs in total, which act as flexible and dynamic loads. Each of them receives approximately 50 kW with 125 A current transfer during charge mode [19]. The case study in this paper only focuses on charge mode. The proposed master PF controller was connected to the industry’s current transformer (CT), voltage transformer (VT) and the PF-controlled DC/AC converter of the solar PV system. Figure 1a, b illustrates a general diagram of the industrial system and a detailed framework of the interconnection of RES and EV, respectively [20].

Fig. 1
figure 1

a General diagram of the designed industrial system. b A detailed framework of the designed industrial system

For the base case in this research, the industrial load has an unimproved PF (PFload) of 0.8 lagging. It was then installed with Cbank to ensure that the PFind is maintained at 0.95 lagging. Next, the industrial system was connected to the solar PV system operating at unity PF and the EV charging system where it causes further reduction and alternation in PFind, respectively. Finally, the industrial system was installed with the proposed master PF controller to regulate the PFind at 0.95 lagging by utilizing the PF-controlled solar PV system for Q support. The master PF controller sends a dynamic control signal to the PF-controlled solar PV system as its instantaneous PF reference (PFrefPV) during the controlling process. A detailed explanation of the proposed control algorithm is given in the control section.

2.2 Capacitor bank control

The capacitor bank (Cbank) with a control system [21] is reliable and capable of regulating PFind to an intended value. The size of the Cbank varies according to the load and the intended PF [22]. The industrial load was installed with a 600 kVAr Cbank to improve the PFind from 0.8 lagging to 0.95 lagging. The industrial load reference (PFrefload) was set to 0.95 lagging because it is more than 0.85 lagging and includes an additional safety margin. The designed Cbank comprises thirty fixed stackable and switchable 20 kVAr capacitors. The amount of Q needed to attain PFrefload, and the number of 20 kVAr capacitors that need to be operated (Cbankneed) is the base calculation of this PF control. A too large and fixed capacitor size was not preferred as it can cause the PFind to be in over and under correction [23]. Figure 2 shows the flow algorithm of the Cbank operated at PFrefload of 0.95 lagging.

Fig. 2
figure 2

Flow diagram of the designed Cbank operated at PFrefload of 0.95 lagging

2.3 Solar PV control

The PF-controlled solar PV system was designed by referring to previous studies [14, 24, 25]. The DC link voltage (Vdclink) control was used for improving the system stability. The solar PV system design was based on the DC–DC–AC inverter topology, also known as two-stage power conversion [24]. The DC/DC converter was placed in between the solar PV panel and the DC/AC converter to enhance the design flexibility, voltage gain and energy harvesting capability [24]. A detailed configuration of the PF-controlled solar PV system and the flowchart of the Vdclink and PF control process are presented in Figs. 3 and 4, respectively.

Fig. 3
figure 3

Vdclink and PF control algorithm flow diagram of the designed solar PV system

Fig. 4
figure 4

Detailed control configuration for the designed solar PV system

The DC/DC converter was installed with a maximum power point tracking (MPPT) device for maximizing the instantaneous DC power output of the solar PV panel. The MPPT device controls the duty ratio of the DC/DC converter (Dcon) until the DC supply voltage (VS) of the solar PV panel is reached and maintained at the maximum power point voltage (VMPP) [25]. The best MPPT method for a 400 kWpk solar PV system is the incremental conductance method [25]. The DC link voltage reference (Vdclinkref) should not be too low and too high, respectively, for an admirable dynamic control and to avoid redundant switching losses [16]. In this case study, the Vdclinkref for the solar PV system is permanently set at 950 V. The relationship between the VS, Vdclink and Dcon is expressed as per mathematical Eq. (1) [16]:

$$ {\varvec{V}}_{{{\text{dclink}}}} = - \frac{{{\varvec{V}}_{{\varvec{S}}} }}{{{\varvec{D}}_{{{\text{con}}}} - 1}} $$
(1)

The Vdclink and PF controller was constructed based on the dq control structure due to easy controlling and filtering accomplishment [14]. Based on Figs. 3 and 4, initially, the instantaneous three-phase phase-to-ground voltages (Vabc) and three-phase phase-to-ground currents (Iabc) output of the solar PV system were obtained by tapping at the AC side after passing the LC filter. The Vabc and Iabc were converted into a three-phase active power (PPV) form. The PPV and PFrefPV then undergo a mathematical transformation to obtain current quadrature reference (Iqref).

Meanwhile, the instantaneous three-phase phase-to-ground voltages were obtained at the grid side (Vgabc) and sent to the phase-locked loop (PLL) device to get the Vgabc phase angle (ωt). In this control system, the PLL device was used for synchronizing the grid phase signal and the solar PV system phase signal [26]. The phase angle was then used in Park and inverse Park transformation. Park transformation is a process of simplifying the fundamental equation, whereas inverse Park transformation is vice versa [27]. In this solar PV system control process, the Iabc was simplified to be a direct and quadrature current (Id and Iq). The instantaneous Vdclink was obtained by tapping at the Cdclink. It was then compared to the DC link voltage reference (Vdclinkref) to get the current direct reference (Idref). Next, the Id and Iq were compared to the Idref and Iqref, respectively. The output of these comparisons goes through the PI controller to reduce the offset [28]. It becomes a current direct control (Idcontrol) and a current quadrature control (Iqcontrol) before undergoing the inverse Park transformation and finally, Sine Pulse Width Modulation (SPWM) process. The proportional gain (KP) value and integral gain (KI) value of the PI controller were manually tuned based on experiences [28]. Finally, the output of SPWM was fed to the DC/AC converter switches (S1-S6), as shown in Figs. 3 and 4.

The instantaneous PFrefPV and the instantaneous PPV will determine the amount of instantaneous Q delivered from the solar PV system (QPV) to the industrial system. The designed solar PV system has a maximum active power output (PmaxPV) of approximately 400 kW. As referred to the guidelines [29], if the PPV is equal or greater than 20% of the DC/AC converter rated power, the PFrefPV value should not be lower than 0.9 leading or else the DC/AC converter will get exhausted. So, the PFrefPV limit (PFreflimitPV) parameter was set at 0.9 leading. The mathematical equation to calculate the amount of QPV and QmaxPV based on trigonometric power theory is shown in Eq. (2) and (3). Equation (2) indicates that the closer the PFrefPV is to unity, the lower the QPV. The QmaxPV value is vital for Cdclink sizing calculation.

$$ Q_{PV} = P_{PV} .\tan (\cos^{ - 1} (PF_{refPV} )) $$
(2)
$$ Q_{\max PV} = P_{\max PV} .\tan (\cos^{ - 1} \left( {PF_{ref\lim itPV} } \right)) $$
(3)

2.4 EV charger control

The designed EV charging system comprises three bidirectional I-controlled half-bridge non-isolated DC/DC converter and a Vdclink and PF-controlled DC/AC converter, as illustrated in Fig. 1. The previous studies [16, 30] are the reference for designing the bidirectional EV charging system. Figure 5 presents a detailed configuration of the designed EV charging system with one charging port.

Fig. 5
figure 5

A detailed configuration of the designed EV charging system

The Vdclink and PF control system used in the designed EV charging system is identical to the control system used in the designed solar PV system; thus, the control process is the same as in Fig. 4. The advantages of a bidirectional half-bridge non-isolated DC/DC converter are the high-efficiency, low active component and relatively cost-effective [30]. The PF reference for the designed EV charging system (PFrefEV) was set to unity. The designed EV charging system can single-charge EV battery with a maximum DC power transfer of 62.5 kW with 125 A of current transfer (IEV) based on CHAdeMO 1.1 standard charging protocol. It can cater simultaneous charge up to three EVs.

The Cdclink and LC filter are two vital components in the solar PV and EV charging system. The Cdclink is typically utilized to reduce the ripples of Vdclink [31] and for providing Q support [32]. Oversized and undersized Cdclink will result in over expenditure and system failure, respectively. An LC filter is used for smoothening the AC signal [33]. Improper LC filter design will lead to low system power quality.

2.4.1 DC link capacitor modeling

The Cdclink is an intermediary electronic component located between the DC/DC converter and the DC/AC converter, as shown in Fig. 1. The QmaxPV is the maximum limit of the amount of Q (Qmax) that Cdclink can support. The mathematical steps to calculate the sizing of Cdclink based on Qmax start with the three-phase apparent power (S) equation as per Eq. (4):

$$ S = \sqrt 3 VI^{*} $$
(4)

Since only alternating current (AC) is involved, the resistance (R) is replaced with impedance (Z) by using Ohm’s law and shown in Eq. (5):

$$ V = IZ $$
(5)

Substituting Eq. (4) and Eq. (5) gives Eq. (6):

$$ S = \frac{{\sqrt 3 \left| V \right|^{2} }}{{Z^{*} }} $$
(6)

By considering Q only, the impedance is replaced by capacitor reactance (XC) as per Eq. (7):

$$ Q = \frac{{\sqrt 3 \left| V \right|^{2} }}{{X_{C} }} $$
(7)

where Eq. (8) gives XC:

$$ X_{C} = \frac{1}{{2\pi f_{s} C}} $$
(8)

Finally, the size of the capacitor (C) in terms of Qmax and Vdclink derived by Eq. (9):

$$ C = \frac{{Q_{\max } }}{{\sqrt 3 .V_{{{\text{dclink}}}}^{2} .2\pi f_{s} }} $$
(9)

By considering 25% as a safety margin, the Cdclink is assumed to be 25% larger than in Eq. (9). Hence, Eq. (10) established:

$$ C_{{{\text{dclink}}}} = 1.25C $$
(10)

The size of Cdclink is measured in Farad (F). The system frequency (fs) regulated by Malaysian Distribution Code is 50 Hz [34]. Equations (9) and (10) show that a higher Qmax consumed larger Cdclink, and a higher Vdclink will increase Cdclink’s Qmax support. Table 1 shows the important parameter value used in this PF-controlled solar PV system design.

Table 1 Important parameter’s value used for the Cdclink sizing in the designed solar PV system

2.4.2 LC filter modeling

The LC filter is also known as the low-pass second-order filter. It was installed at the AC side of the designed solar PV system and EV charging system. It can block high-frequency signals and allow only low-frequency signals to pass through it [33]. Figure 6 shows the basic configuration of an LC filter.

Fig. 6
figure 6

Basic configuration of an LC filter

The switching frequency (fsw) is 10 kHz. The cut-off frequency (fc) of the LC filter is the allowable frequency signals upper limit, and it should be less than 1/10th of fsw [33]. Meanwhile, one research [35] has reported that the fc value is recommended to be more than 1/14th of the fsw for less attenuation effect. By considering less attenuation effect and within 0.3% distortion as in IEEE1547 guidelines [35], a mathematical equation for fc and fsw expressed by Eq. (11):

$$ \frac{{f_{sw} }}{k} < f_{c} < \frac{1}{10}f_{sw} \;where\;k \simeq \, 14 $$
(11)

As to prevent less than 3% voltage drop across the Lfilter, the size of Lfilter is calculated by Eq. (12) [33]:

$$ L_{filter} < \frac{{0.03 U_{inv} }}{{I_{L\max } \left( {2\pi f_{s} } \right)}} $$
(12)

where ILmax is the maximum RMS load current value, and Uinv is the unfiltered output voltage of the DC/AC converter. Finally, the size of Cfilter is calculated as per Eq. (13) [33]:

$$ C_{filter} = \frac{1}{{\left( {2\pi .f_{c} } \right)^{2} .L_{filter} }} $$
(13)

Table 2 presents the important parameter’s value used in the designed LC filter.

Table 2 The parameter’s value used to design the LC filter

2.5 Master PF control

The proposed master PF controller is specialized for regulating the PFind to attain an intended value by using a single preset reference. The control process is based on the trigonometric power theory calculation. Figure 7 illustrates the flowchart of the master PF control process.

Fig. 7
figure 7

Flowchart of the control process for the master PF controller

The master PF reference (PFmref) was preset to 0.95 lagging because of the same reason stated in industrial load’s capacitor bank section. The industry’s CT and VT sends the total instantaneous currents and voltages received by the industrial system and converted into active power (Pind), reactive power (Qind) and PFind forms. The proposed controller had used the PFmref, Pind and Qind to get the amount of Q needed to achieve PFmref (Qneed). Then, the Qneed was converted into PF form and fed to the PF-controlled solar PV system (PFneedPV) regarding control of the QPV. In short, in this master control process, the value of Qneed is the same as QPV. Equations (14) and (15) show the mathematical equations to obtain the Qneed and PFneedPV.

$$ Q_{{{\text{need}}}} = Q_{{{\text{ind}}}} - P_{{{\text{ind}}}} .\tan (\cos^{ - 1} \left( {PF_{{{\text{mref}}}} } \right)) $$
(14)
$$ PF_{{{\text{needPV}}}} = \cos \left( {\tan ^{{ - 1}} \frac{{P_{{PV}} }}{{Q_{{{\text{need}}}} }}} \right) $$
(15)

3 Results and discussion

The Matrix Laboratory/Simulink software was used to simulate each of the designed equipment. One second in simulation presented as an hour. This section starts with the base case scenario where industrial load without Cbank. The industrial load profile was adopted from another study [36]. Figure 8a, b show the simulation result of the power load profile and the instantaneous PFind before PF-controlled Cbank was installed, respectively.

Fig. 8
figure 8

a Load profile of the designed industrial load. b Instantaneous PFind before installed with PF-controlled Cbank

Based on Fig. 8a, in a daytime (0700 – 1700), the P load reached around 1 MW and 1.2 MW. The daily average of unimproved PFload was nearly 0.8 lagging. The designed PF-controlled 600 kVAr Cbank then was installed to improve the PFind within 0.95 lagging. Figure 9a shows the simulation result of the PFind after installed with the designed PF-controlled Cbank at 0.95 lagging PFrefload. The simulation result of the total Q compensated by the PF-controlled Cbank is shown in Fig. 9b.

Fig. 9
figure 9

a Instantaneous PFind, after installed with the designed PF-controlled Cbank at 0.95 lagging PFrefload. b The total Q compensated by the PF-controlled Cbank at 0.95 lagging PFrefload

Results in Figs. 8a and 9b prove that the PFind had improved from around 0.8 lagging to nearly 0.95 lagging. In Fig. 9a, the PFind had experienced slightly over and under correction due to fixed capacitors size [23]. The maximum Q compensated by the Cbank was nearly 600 kVAr. Next, the industrial system was connected to the designed PF-controlled solar PV system. Figure 10a, b shows the simulation results of the instantaneous power output of the designed solar PV system at unity PFrefPV. Figure 10c shows the simulation result of the instantaneous PFind and PFrefload value after the designed solar PV system was installed.

Fig. 10
figure 10

a PFrefPV at unity. b The instantaneous power output of the designed solar PV system. c Instantaneous PFind and 0.95 lagging PFrefload

Figure 10b shows that the designed solar PV system started to deliver P at the 5th to 19th second (0500 – 1900). It reached PmaxPV of approximately 400 kW at 11th second (1100). There was no QPV because the PFrefPV was set at unity. Figure 10c proves the instantaneous PFind drops drastically after the installation of the solar PV system at unity PF. The larger PPV leads to lower PFind. Hence, this will be a critical case scenario in this case study. Figure 10c also shows that the PFind was not affected by 0.95 lagging PFrefload as the PFrefload is only for PFload correction. The fluctuations occurred in between the 9th and 13th second are because of the Cbank switching alternately on and off [23].

The total harmonic distortion current (THDi) of the solar PV system is measured at the point of common coupling. According to the Energy Commission of Malaysia [29], the THDi percentage for the solar PV system should be less than 5% to avoid low power quality. The mathematical formula to calculate THDi percentage is given as per Eq. 16 [37]:

$$THD\left( \% \right) = 100.\left( {\sqrt {\frac{{I_{2}^{2} + I_{3}^{2} + I_{4}^{2} + \ldots + I_{n}^{2} }}{{I_{1}^{2} }}} } \right) $$
(16)

where In is the root mean square of the output current and n represents the harmonic number. Figure 11 shows the highest THDi percentage of the designed solar PV system (4.33%) with its relevant spectrum in a graphical form by using a fast Fourier transform analysis feature in Matrix Laboratory/Simulink software.

Fig. 11
figure 11

THDi percentage of the designed solar PV system and its Fourier spectrum

The designed EV fast-charging system with three charging ports subsequently had been connected to the industrial system. An EV charging event will slightly increase the PFind. Figure 12 shows the amount of power transferred to the first, second and third EV. The negative power value indicates the EV in charge mode. There was no Q transfer as the PFrefEV is at unity.

Fig. 12
figure 12

Three EVs were charging in its time pattern based on the CHAdeMO 1.1 standard charging protocol

Figure 12 illustrates that at the 1st–5th second, the next 6th to 10th second, and the following 11th–15th second, the first, second and third EV is in charge mode, respectively. In the 21st–23rd second, all EVs are simultaneously charged. Thus, this result validates the designed EV charging system can perform a single-charge at nearly 50 kW and can cater a simultaneous charge at almost 150 kW.

Finally, the proposed master PF controller was integrated into the designed industrial system. The PFmref was preset to 0.95 lagging, as shown in Fig. 13c. Figure 13a shows the simulation result of the PFneedPV sent from the master PF controller to the solar PV system, which becomes its PFrefPV. Figures 13a, b also validates the design of the solar PV system, as per the guidelines [29]. The amount of instantaneous QPV is related to the instantaneous PPV and the instantaneous PFrefPV. Figure 13c shows the simulation result of instantaneous PFind after the proposed master PF controller was implemented. It shows that the master PF controller is capable of regulating the PFind to attain 0.95 lagging even though under a critical case scenario.

Fig. 13
figure 13

a Instantaneous PFrefPV. b Instantaneous PPV and QPV. c Instantaneous PFind, after the proposed master PF controller was implemented

4 Conclusion

The main contribution of this paper is the design of a master PF controller, which can regulate the PFind to an intended value by following the PFmref. In this case study, the master PF controller coordinates with the PF-controlled solar PV system to perform the PFind regulation. The proposed master PF controller design is simple, correspondingly cost-effective. The mathematical formulas for calculating the sizing of Cdclink and LC filter for a solar PV system and EV charging system were also included in this paper. The size of Cdclink will determine its Q support capability. The LC filter was used instead of L and LCL filters, respectively, because of lesser power losses and cheaper. A bidirectional EV charger was designed in this case study for future research continuation, using the vehicle-to-grid concept. The results and discussion section conclude that the industrial load with a PF-controlled Cbank, the PF-controlled solar PV system, the I-controlled EV charging system and the proposed master PF controller are able to operate effectively with the proposed control. The proposed master PF controller can ensure that the PFind to be at 0.95 lagging throughout its operation even under a critical case scenario. Hence, these also verify the parameter values used for the Cdclink and LC filter.