Dual-Mode Power Operation for Grid-Connected PV Systems with Adaptive DC-link Controller

Photovoltaic (PV) power systems are integrated with high penetration levels into the grid. This in turn encourages several modifications for grid codes to sustain grid stability and resilience. Recently, constant power management and regulation is a very common approach, which is used to limit the PV power production. Thus, this article proposes dual-mode power generation algorithm for grid-connected PV systems. The developed system considers the two-stage PV configuration for implementation, where the dual-mode power generation technique is executed within the DC–DC conversion (boost) stage. Most of the techniques adopted for dual-mode power operation employ the conventional perturb and observe method, which is known with unsatisfactory performance at fast-changing atmospheric conditions. Considering this issue, this study suggests a modified maximum power point tracker for power extraction. Furthermore, a new adaptive DC-link controller is developed to improve the DC-link voltage profile at different operating conditions. The adaptive DC-link controller is compared with the traditional PI controller for voltage regulation. The inverter control is accomplished using finite-set model predictive control with two control objectives, namely reference current tracking and switching frequency minimization. The overall control methodology is evaluated at different atmospheric and operating conditions using MATLAB/Simulink software.


INC
Incremental conductance VOC Voltage-oriented control DPC Direct power control THD Total harmonic distortion STC Standard test conditions

Introduction
The penetration of renewable energy sources in power system is growing significantly [1]. The most commonly utilized renewable energy source is the hydro-power one. Wind energy comes in the second place and then the photovoltaic (PV) power. However, the construction rate of PV power is increasing rapidly. Thus, it is a matter of time till the PV power dominates the renewable energy market. Numerous reasons easify spreading the PV source of energy. For instant, the source of PV power is naturally abundant and universe (the sun), unlike hydro and wind power, which need specific site properties for installation [2]. That fast increase necessitates many grid codes' updates to insure safe operation of the PV systems under different circumstances. Hence, stability and resilience of the PV system are getting more interest. However, the nonlinear behavior of the PV source coming from dependency on the atmospheric conditions (radiation and temperature) makes that task more challenging [3]. Among modern grid codes, constant power regulation is considered the most common technique alongside the maximum power point tracking (MPPT) operation [4]. For low power scale PV application, it is important to extract the maximum available power from the PV source at various atmospheric conditions, which is known as MPPT [5]. However, at high power levels, the MPPT operation is allowed if the PV power is lower than a certain threshold. If the power exceeds this value, the power will be limited and sustained at this level. This operation is known as constant power generation (CPG) [6]. The reason for that regulation is to limit the power variation, specially at fast-changing atmospheric conditions. Under these circumstances, if the MPPT is enabled, high power oscillations will occur. Thus, frequency deviations may happen due to the power change in a very short time [7].
Furthermore, flexible power regulation, which is desired for grid support, cannot be realized if the MPPT is enabled; thus, constant power generation algorithm can simplify different flexible power regulation schemes for new grid codes [4]. To be specific, PV systems are expected to support the grid frequency during any potential disturbances [8]. For example, for 50-Hz system, the PV source should produce the full capacity of the system if the operating frequency is within a predefined range (47 Hz to f 1 ), where f 1 is larger than 47 Hz. For frequencies larger than this value ( f 1 ), a reserved amount of PV power ( P) should be considered. The value of P is kept till the frequency rises to a certain value (normally larger than 50 Hz). If the frequency is still increasing, then the PV generator starts to decrease the produced power. The PV power production falls to zero and disconnected from the grid, if the frequency hits the maximum allowable operating frequency (52 Hz) [9].
The two-stage grid-connected PV system utilizes a boost converter in the first stage, where the control of the PV power production is accomplished in this stage. Furthermore, the boost converter increases the voltage of the PV side to appropriate voltage level for grid connection. Normally, the MPPT is executed at this level of control [10]. However, due to the variable nature of the PV power, an additional power regulation is included with the MPPT function. In the literature, the most popular techniques for MPPT extraction are perturb and observe (P&O) and incremental conductance (INC) methods [11]. However, both of them have a poor performance at fast-changing atmospheric conditions [12]. Soft computing methods are also addressed for MPPT to consider the partial shading conditions, where the power voltage (P-V) curve exhibits several maxima. Thus, the optimization technique is searching for the global one among them. Numerous techniques are utilized for such purpose, to mention a few, particle swarm optimization [13], genetic algorithms [14], simulated annealing method [15], ant colony technique [16], firefly algorithm [17], grey wolf optimization [18], and bat algorithm [19]. However, these methods suffer from high calculation burden and slow transient behavior inherited from their searching nature. Recently, constant power regulation is adopted in conjugation with the MPPT operation. This new regulation can be implemented using additional devices (storage elements) [9]. However, the most cost-effective procedure is to modify the MPPT algorithm [20].
The second stage of the two-stage system is the inversion stage, which is concerned with active and reactive power regulation. Popularly, the voltage-oriented control (VOC) and direct power control (DPC) are applied for such purpose. On the one side, the VOC relies on the cascaded structure of the voltage and current loops and its performance is mainly dependent on a proper tuning of the PI controllers. On the other side, the DPC avoids the cascaded structure of the VOC. However, it presents higher peak-to-peak ripples in the steady-state waveforms. More recently, predictive control techniques become competitive with the conventional controllers. They are simple to implement and straightforward. Furthermore, additional control objectives and constrains can be easily implemented and included in the quality function design [10,21].
In the literature, some efforts have been made to limit the PV power combining the MPPT algorithm with the constant power concept. In [22], single-stage three-phase grid-connected system was introduced, where P&O method has been integrated with the constant power approach. In this method, an extra amount of voltage ( v) is added to the PV voltage to make the system operate at the right side of the maximum power point (MPP) due to the single-stage operation. A similar approach was used in [23]. However, two-stage configuration was utilized in this system. A proportional controller (P) was employed for both the MPPT and the CPG operations in [24], where the two-stage system is considered. However, the methodology exhibits high ripples at steady state; thus, an adaptive step is suggested in [20] to enhance the system's performance. Furthermore, the operation of the system is restricted to the left side of the MPP to account for sudden drop of the atmospheric conditions, where the system may operate nearly to the open-circuit condition at such situation. Most of the studies in the area of CPG employ the conventional techniques like P&O or INC, which are known with their unsatisfactory performance at fast-changing atmospheric environment. Furthermore, drift can occur during these conditions, resulting in fluctuation of the injected power. Moreover, undesirable offset can happen at the DC-link [25].
Considering the aforementioned drawbacks, a modified drift-free MPPT technique is proposed in this paper. The proposed MPPT depends on a newly formulated reference voltage expression for the MPP location. This method is integrated with CPG concept for the two-stage grid-connected system. Furthermore, and to enhance the steady-state performance of the proposed control methodology, an adaptive step size is utilized. The DC-offset associated with the drift problem is totally solved using a new adaptive DC-link controller. The inverter control, to manage the active and reactive power injection, is adopted with the finite-set model predictive control (FS-MPC) technique. The proposed inverter control considers two control objectives for power management, which are current control and switching frequency minimization. The total harmonic distortion (THD) of the injected currents was used as a rule of judgment to tune the weighting factor included in the cost function design. The proposed methodology is compared with the conventional technique at various radiation conditions using simulation results.
The remainder of this paper is organized as follows: Section 2 introduces the model of the two-stage grid-connected PV system. Section 3 proposes the modified drift-free MPPT algorithm with the CPG approach. The adaptive DC-link with the inverter control using FS-MPC technique is investigated in Sect. 4. Section 5 presents the simulation results, and finally the paper is concluded in Sect. 6.
2 Model of the two-stage grid-connected PV system

PV source modeling
The single-diode model is commonly used in the literature to describe the behavior of the PV source due to its simplicity and accuracy. Therefore, the current-voltage (I-V) relation of the PV source shown in Figure 1 can be expressed as [10,12] where i ph is the photovoltaic current, n is the diode ideality factor, i o is the saturation current of diode, R s is the module series resistance, R sh is the module shunt resistance, v t = kT /q is the thermal voltage, N s is the number of series cells in the module, i pv is the output current, and v pv is the output voltage.

Boost converter modeling
Generally, the state-space model of system can be written as [10] x = Ax + Bu, where x is the state vector, u is the input value or vector, and y is the output. Furthermore, A, B, C, and D are the system matrices.
The boost converter has two modes of operation specified by the switch condition (ON or OFF). Figure 2 shows the two states of the boost converter. Thus, when the switch is open, i.e., OFF, the behavior of the boost converter can be described as where i l is the inductor current, L is the inductance value, and v dc is the output capacitor voltage (DC-link).
where c dc is the DC-link capacitance, and i inv is the output current. Furthermore, when the switch is ON (closed), the converter performance can be described as As a conclusion, the full model of the boost converter can be summarized by where d is the duty cycle, x= [i l v dc ] T , u = [v pv i inv ] T , and y = v dc .

Model of the two-level inverter with grid integration
The configuration of the grid-connected inverter is shown in Figure 3, where a two-level inverter is connected to the grid via an RL filter. The response of this part of the system can be determined from where v abc are the voltages of grid side, i abc are the line currents, u abc are the inverter-side voltages, L f is the filter inductance, and R f is the filter resistance. Furthermore, the output voltages of the inverter are deduced as [26] where S abc is the switching states of the two-level inverter, and T abc is the transformation matrix, which can be expressed as In the rotating reference frame (d − q), Eq. (8) can be rewritten as where v dq are the dq components of the abc voltages, i dq are the line currents in dq reference frame, and ω is the angular frequency of the grid. Furthermore, the active and reactive powers are obtained as:

Modified drift-free MPPT algorithm with constant power generation
The proposed drift-free MPPT depends on the model of the PV source, whereas an expression for the MPP location is pursued in this part of study. Several studies have tried to allocate the locus of the MPPs. In [27,28], linear and cubic equations were introduced based on the curve-fitting procedure. Logarithmic function was suggested in [21,[29][30][31]. However, up to date, there is no straightforward derivation for the locus of the MPP. Considering this gap in the literature, an analogy between the open circuit point and the MPP is used in this work to investigate the effect of both the temperature and radiation on the MPP's location. It is worth mentioning that the location of the MPP depends on the atmospheric conditions (temperature and radiation). In [31], the radiation effect is only considered, while the temperature effect is only regarded in [32,33]. However, the current study is considering both of them. It should be mentioned that the open-circuit point is intentionally used here due to the simple calculation at this point. The effect of the radiation and temperature on this point will be investigated, and using the similarity principle, the effect of these conditions will be transferred to the MPP. Firstly, to examine the radiation effect, at open-circuit condition (i pv = 0, v pv = v oc ), the behavior of the PV source (the circuit shown in Fig. 1) can be formulated as Normally, the value of R sh is high; thus, neglecting the current flowing into this resistance, Eq. (13) can be further simplified to Solving Eq. (14) for v oc , the following yields The value of the saturation current of the diode i o (in the numerator) can be neglected with respect to i ph ; thus, Equation (15) can be further simplified to The previous equation is valid at the standard test condition (STC), i.e., 25 • C, 1000 W/m 2 . As we now considering the where v ocn is the open-circuit voltage at the new radiation level, and I phn is the corresponding photovoltaic current.
As v t and i o are mainly dependent on the temperature, hence, their values will not be updated. Subtracting Eq. (16) from (17), the open-circuit voltage in comparison with another one can be derived as The photovoltaic current is proportional to the radiation (G) [34,35]; thus, replacing the currents with the radiation results in where G 1 is the radiation at STC, and G 2 is the new radiation value. Figure 4 shows the power-voltage (P-V) curve of the PV module (KC200GT module) at different radiation conditions. It is clearly obvious that the open-circuit points have a logarithmic relation among each other, where the spacing among these points is small at high radiation conditions. However, the spacing becomes relatively high at low radiation conditions. Let us transfer the above observation to the MPPs as shown in Fig. 4. It is quite obvious that the decreasing (falling) manner of the MPPs is smaller than the open-circuit ones; thus, the natural logarithm (to the base e) in Eq. (19) is replaced with the common one (to the base 10), and hence, it can be rewritten as where v mppn is the new MPP voltage at certain radiation level, and v mpp is the MPP voltage at STC.
Secondly, the effect of the temperature on the MPPs will be investigated. Figure 5 shows the P-V curve at various temperature conditions, where the open-circuit voltage variation range is linear. The same behavior applies also for the MPP voltage, and hence where v mppt is the modified MPP voltage due to temperature effect, k v is the open-circuit voltage temperature constant, and T n is the temperature at STC. Finally, and combining Eqs. (20) and (21), to get the impact of both radiation and temperature on the MPP voltage, the following can be deduced where v mppl is the location of MPP voltage at any atmospheric condition. Further simplification can be subjected to where k = n N s v t /v mpp . It is quite interesting that k is written as a constant (0.0539) in many publications in the literature [21,[29][30][31], and it can be modified for better tuning of

MPPs locus
Open circuit points the MPP voltages. The reason is that the value of this constant is very small. Therefore, the temperature effect can be neglected. Moreover, the calculated value of this constant for the used PV module is 0.0708. So far, the MPP voltage locus is determined using the atmospheric conditions (G, T ). As a next step, the PV voltage of the installed array is sensed with the atmospheric conditions. Then, the error between the estimated voltage from Eq. (24) and the sensed one is adjusted adopting adaptive step-size as where d is the duty cycle change, and N 1 is a factor to be calibrated. A similar approach to adjust the duty cycle of the converter at CPG condition can be employed as where P ref is the reference power limit, N 2 is a factor to be regulated, and P pv is the output power of the PV source. The final algorithm for dual-mode power generation from the PV source is further illustrated in the flowchart shown in Fig. 6.

FS-MPC principle and design
The FS-MPC principle depends on the discrete-time model of the system. Therefore, such model is derived to control the active and reactive powers injected into the grid. Solving Eq. (11) for the current and applying the Euler method for discretization, one gets Fig. 6 The proposed dual-mode power generation algorithm with adaptive step-size where T s is the sampling period. The two-level inverter has 8 switching vectors; hence, according to the cost function design, the best one will be selected. FS-MPC adds flexibility to the design of the cost function; thus, in this work the switching frequency minimization is added as a secondary control objective. Furthermore, the absolute function, which is known with stability issues [36], is replaced with the square function as follows where S(k) is the current switching instant, S(k − 1) is the previous one, and λ is the weighting factor. It is also recommended to use the square function when considering more than one control objective in the cost function design [37]. The predicted reference currents can be evaluated using linear extrapolation as [38] i dref (k + 1)

Adaptive DC-link voltage controller
Normally, the DC-link between the boost converter and the inverter is controlled using PI controller to provide the reference current for Filter inductance L f (mH) 12 Filter resistance R f ( ) 0.25

Fig. 7
The proposed adaptive DC-link controller the inverter control loop. As mentioned previously, the behavior of the PI controller at rapidly changing atmospheric conditions is poor [25].
Furthermore, it has poor disturbance rejection capability [39]. Although in [25], a modification to the PI controller of the voltage loop is adopted to solve the drift occurrence in the single-stage topology, the DC-link in the two-stage system still suffers from offsets even if the drift problem is solved. This phenomenon is not well-documented in the literature in the area of PV systems. Therefore, a new adaptive DC-link controller is designed in this study to solve this problem. The adaptive step-size of the reference current for the inverter control loop can be evaluated as where N 3 is a tuning factor, and v dcref is the reference value of the DC-link voltage. Figure 7 shows the updating procedure of the adaptive DC-link controller.

Simulation results and discussion
The proposed dual-mode power generation system utilizes a 15-kW PV array, which is followed by boost converter for MPPT with CPG. Furthermore, the boost converter increases the PV array voltage to a proper level for the grid connection. The outer PI controller at the DC-link is substituted with the adaptive DC-link controller. The two-level inverter manages the active and reactive power control as a main objective and reduces the switching frequency as a secondary purpose. This is accomplished using a modified cost function design for FS-MPC. Finally, the output of the two-level inverter is interfaced with the grid via RL filter. Table 1 summarizes the system components and control parameters, and Fig. 8 shows the whole configuration of the system.

Weighting factor tuning of the FS-MPC
The weighting factor (λ) included in the quality function should be adjusted properly, so as not to deteriorate the main objective of the inverter control (active and reactive power control). The THD of the currents is used to judge and tune the value of the weighting factor. Figure 9 shows the THD versus the weighting factor. It is obvious that the THD of the currents within the IEEE standard [40] when λ ≤ 0.7. However, to maintain the quality of the injected currents, a value of 0.1 is selected. It should be mentioned that the curve shown in Fig. 9 is drawn at low power level; thus, when the power exceeds this level, the THD will be further enhanced.

Performance of the dual-mode power generation algorithm under different atmospheric conditions
The performance of the proposed dual-mode power generation technique is investigated under different radiation profiles. For better evaluation, step changes, ramp variations, and sinusoidal ones are created and studied using MATLAB. The ramp profiles with different slopes are suggested by the European efficiency test [41] to assess the performance of the PV systems. Furthermore, the atmospheric conditions can follow a random pattern. Thus, and under fast-varying atmospheric conditions, the step changes are simple waveforms to judge the performance of the PV system. This necessitates to develop numerous profiles to describe the changing manner of the atmospheric conditions as near as possible. Firstly, the performance of the proposed system under different step changes of radiation is investigated and compared with the conventional approach. The conventional approach is implemented using the P&O method in combination with the FS-MPC for inverter control. Figure 10 shows the behavior of the two-mode power operation with the traditional and the proposed algorithms, where the PV power ( p pv ), voltage (v pv ), and current (i pv ) are illustrated, respectively. The reference for the CPG mode is assumed to be 70% (about 10 kW for the utilized system) of the rated power according to the regulations adopted in Germany [4].
In Figure 10, and in the first two intervals, where the radiations equal 400 W/m 2 and 600 W/m 2 , respectively, the MPPT is enabled and the algorithm tracks the maximum power. As the radiation increases in the following intervals, where the radiations are 800 W/m 2 and 1000 W/m 2 , respectively, the CPG is activated. (The PV power exceeds the reference value.) Thus, the power is maintained at 10 kW. The proposed adaptive drift-free MPPT technique has a lower ripple content at steady state in comparison with the traditional P&O, and hence, the gained average power from the PV source increases. It is worth mentioning that the P&O is also designed with adaptive step-size [42]. Furthermore, in the power waveform, moderate overshoots exist when the system operates with the CPG, the reason is the abrupt step changes of radiation.
It might seem that the two algorithms have a similar behavior under step change of radiation. This proves the aforementioned claim that the step changes are simple to judge the performance of the MPPT and CPG approach. Thus, the behavior of the proposed system is further investigated at more complex and challenging profile like the ramp one. Figure 11 shows the PV power, voltage, and current waveforms, respectively. The P&O method is known with its unsatisfactory performance at gradual increase or decrease of the radiation [21]. This is very obvious from the PV voltage (v pv ) in Fig. 11, where it exhibits a higher ripple. Furthermore, it shows a diverging behavior, which is known as the drift problem [21,25,34]. This phenomenon causes a significant power drop as shown after the end of CPG span, where the MPPT is expected to operate at the beginning of the descending interval of PV power. On the one hand, the PV voltage at this interval presents a constant behavior.
However, the PV current is decreasing causing the same for the PV power. On the other hand, the PV voltage with proposed algorithm is tracking its locus, which leads to an elegant maximum power extraction. Furthermore, with the traditional P&O, the drift problem interferes with the CPG function causing higher ripples in the power as shown at the end of the CPG interval. Figure 12 shows the same results but with sinusoidal radiation profile, where the drift problem is getting worse. The PV voltage presents an approximately constant value corresponding to the descending interval of the sinusoidal profile. Furthermore, the PV current is decreasing in this interval, and the power also is decreasing. At the ascending interval of the sinusoidal waveform, the PV voltage fluctuates in a wide range resulting in a significant drop in the PV power. (The PV power drops to     Figure 13 presents the DC-link voltage (v dc ), the active power (P) injected into the grid, reactive power (Q), the d-axis current (i d ), the q-axis current (i q ), and the abc currents (i abc ), respectively, at different step changes of radiation. The transient behavior of the proposed algorithm is very fast in comparison with the conventional one with PI controller, specially at the start-up. The reason behind that is the proposed adaptive DC-link controller, which utilizes a large step when the DC-link voltage is far from its reference (700 V), and a smaller one as the voltage approaches its reference. Furthermore, the overshoots are approximately negligible in comparison with the traditional PI. The injected active power and the d-axis current have a slower transient behavior inherited from the outer PI controller of the traditional scheme. The reactive power and the q-axis current have a higher oscilla-tory behavior in comparison with the proposed algorithm. Moreover, the total harmonic distortion (THD) of the abc currents for the proposed algorithm is enhanced despite the reduction in the average switching frequency by approximately 20% in comparison with the traditional one. Table 2 summarizes the comparison between the two algorithms. Figure 14 shows the same results at ramp profile of radiation. For the conventional technique, the DC-link voltage exhibits undesirable offsets in conjunction with the ascending and descending power waveform, where the offset is positive at the increasing interval of power, and negative at the deceasing one. In contrast to the proposed adaptive DClink controller, no offset can be observed. The active power and the d-axis current show a drop as a result of the drift in the P&O method. Furthermore, the ripple content in the reactive power and the q-axis current are improved with the proposed algorithm.

Investigation of the inverter control using FS-MPC and adaptive DC-link controller
The system performance is further investigated at sinusoidal radiation waveform. The inverter results are shown in Fig. 15, where the DC-link voltage presents a random offset profile. However, it is still positive in accordance with the increasing power waveform and negative with the deceasing one. The high oscillatory behavior of the active power and the d-axis current is inherited from the MPPT due to the drift. This in turn affects the interval of the CPG algorithm. The reactive power and the q-axis current have higher ripples with the traditional method. Moreover, due to the drift, distorted currents are injected into the grid. On the other side, the proposed algorithm has an efficient MPPT and the dual-mode power generation is very smooth with lower ripples. Furthermore, the injected power into the grid is higher due to drift avoidance.
As mentioned previously, unlike the single stage [25], if the drift problem of the MPPT is solved, the DC-link voltage still exhibits unwanted offsets. This is further investigated in Fig. 16, where the drift-free MPPT with a PI controller for the DC-link is shown in the left-hand side of the figure. In the right one, the drift-free MPPT is utilized with the adaptive DC-link controller. The results show that the DC-link voltage is still having offsets when PI controller is used. The upper part of the figure is at ramp waveform of radiation, and the lower one is at sinusoidal profile. However, the adaptive DC-link controller (left-handed part) is offset-free.

Robustness assessment
In this subsection, the effect of the system's parameters on the performance of the inverter control is investigated. The parameters of the system are the filter resistance and inductance. The impact of the resistance's variation can be neglected [10]. However, the step changes of inductance are studied and shown in Fig. 17. The mismatch range is assumed to be ± 50%. For the traditional FS-MPC algorithm, the DClink voltage has some offsets at low inductance values. Furthermore, the active power and the d-axis current have very notable fluctuations. On the other side, with the proposed algorithm, no offsets are observed. At low inductance values, the active power and the d-axis current have a reasonable ripple content. Also, the oscillation in the reactive power and the q-axis current with proposed methodology are lower. Furthermore, distorted abc currents are injected into the grid with the conventional FS-MPC.

Conclusion
In this article, the detailed model of the two-stage grid-connected PV system has been presented. The dual-mode power operation is developed by combining the MPPT and the CPG algorithms. The MPPT function is implemented using a modified drift-free method, where the location of the MPP is accurately tracked by a new formulation. The proposed formulation has taken the analogy between the open-circuit point and the MPP into consideration. In both of the MPPT and the CPG regions, an adaptive step-size is adopted to enhance the steadystate performance. The results have shown that the drift problem of P&O method has caused a significant power drop and oscillatory behavior. Furthermore, it has affected and interfered with the CPG algorithm. The inverter control has been accomplished using a FS-MPC algorithm with two objectives for the cost function design. Moreover, the outer PI controller is removed and replaced with a new adaptive DC-link controller to generate the reference current. That adaptive DC-link controller not only enhances the transient behavior but also removes the undesirable offsets at the DC-link side. Furthermore, it simplifies the overall control algorithm. Finally, the proposed methodology is more robust than the traditional FS-MPC against parameter variations.
Funding Open Access funding enabled and organized by Projekt DEAL.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.