Highly Efﬁcient and Robust Grid Connected Photovoltaic System Based Model Predictive Control with Kalman Filtering Capability

: Renewable energy sources, especially photovoltaic (PV) ones, are gaining more and more interest due to the predicted lack of conventional sources over the coming years. That shortage is not the only concern, as environmental issues add to this concern also. Thus, this study proposes two-stage PV grid connected system, which is supported with extended Kalman ﬁlter (EKF) for parameter estimation. In the ﬁrst stage, maximum power point tracking (MPPT) for the boost converter is accomplished using new MPPT method in which the switching state of the converter is directly generated after the measurement stage, so it is called direct switching MPPT technique. This technique is compared with the conventional ﬁnite control set model predictive control (FCS-MPC) method, where the design of the cost function is based on minimizing the error between the reference and the actual current. The reference current is obtained by employing perturb and observe (P&O) method. In the second stage, the two-level inverter is controlled by means of model predictive control (MPC) with reduced computation burden. Further, to overcome the parameter variations, which is a very common problem in MPC applications, an extended Kalman ﬁlter is utilized to eliminate the control algorithm’s dependency on the parameters by providing an efﬁcient estimation. After the inverter, an RL ﬁlter is inserted to guarantee the quality of the currents injected into the grid. Finally, the system is validated using Matlab under different operating conditions of atmospheric variation and parameter changes.


Introduction
Photovoltaic (PV) energy sources are very promising due to several advantages over the conventional sources. PV sources provide clean, silent, friendly, naturally abundant and emissions-free energy to the installed systems [1]. These systems can be implemented with different topologies and control methodologies. However, they can be mainly classified into two main categories, including standalone and grid connected applications [2,3]. In the standalone systems, a DC-DC converter is utilized between the PV source and the DC load for the purpose of maximum power point tracking (MPPT) [4]. Actually, some systems use a direct coupling technique between the load and the source, but this method installs a lot of panels to provide the necessary energy to the load [5]. Additionally, and because of the night hours, the storage element is mandatory in case of the standalone schemes [6]. Batteries are a very common solution to this issue, but they require frequent replacement [7], which increases the overall system cost, especially for low power applications. Thus, FCS-MPC to estimate the parameters of the model and enhance the robustness of the control strategy. Various studies have been carried out using such things as the model reference adaptive system (MRAS) [44,45], the Luenberger observer [46], the disturbance observer [47] and the extended Kalman filter (EKF) [48]. However, these estimators can also be used for state estimation and hence sensorless control strategies [49]. Presently, limited work is done in this area, and that motivated the authors to go after this control strategy, particularly for PV grid connected systems.
In this paper, a two-stage, grid-connected PV system is proposed with an optimized control strategy considering high MPPT efficiency for the boost converter and high robustness for the two-level inverter scheme. Firstly, the maximum power is extracted from the PV source by a new direct switching MPPT algorithm. For investigation, the proposed methodology is compared with the FCS-MPC MPPT [50], which is designed with one step in the horizon, and the cost function is adopted based on the current. Secondly, a modified FCS-MPC is developed to control the inverter, wherein only three iterations are required to initiate the optimum voltage vector, unlike the case of the conventional FCS-MPC, wherein seven iterations are essential. This considerably decreases the required computation time. Further, to enhance the system's reliability and robustness, and even eliminate the FCS-MPC dependency on the parameters of the scheme, an EKF is employed to monitor and observe the parameters for the objective of online correction of potential variations. Finally, the behavior of the system is validated with simulation results using Matlab under different operating conditions and compared with the conventional FCS-MPC algorithm.
The rest of this paper is organized as follows. Section 2 presents the mathematical model of the PV source, boost converter and proposed MPPT. Section 3 describes the conventional and the proposed FCS-MPC algorithms for controlling the two-level inverter. The extended Kalman filter design is explained in Section 4. Finally, simulation results are illustrated in Section 5.

PV System Modeling and MPPT
The studied PV system, shown in Figure 1, consists of PV source (PV array), a boost converter, a two-level inverter, an RL filter and the grid. The PV source and the DC-DC converter stage are investigated in the coming subsections.

PV Array Modeling
The PV cells provide small output voltage, so normally the PV source is available in modules (panels) formed from series cells. The modules can further connected in series and parallel (array) to provide sufficient power to the system. Here, the single diode model is used for describing the behavior of the PV module as [20,51] where i ph is the photovoltaic current, n is the diode ideality factor, i o is the diode saturation current, 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 terminal current and v pv is the terminal voltage. The electrical circuit that describes this model is shown in Figure 2.

Boost Converter Model
The objective of the boost converter in PV systems is to interface the PV source with the two-level inverter, and to boost the voltage of the array to a convenient value for grid connection. The boost converter has two modes of operation, which are specified by the power switch cases on and off. Figure 7 shows the two modes of the converter, where its behavior can be formulated as follows: When the switch is off: where i l is the inductor current, v dc is the capacitor voltage, L b is the boost converter inductance, i inv is the inverter current and c dc is the coupling capacitor value (between the boost and the two-level inverter). And when the switch is ON: Using the state space averaging technique, the boost model can be finalized aṡ where x = [i pv v dc ] T is the state vector, u = [v pv i inv ] T is the input vector and y = v dc is the output. Further, A, B, C and D are the system matrices and are expressed as follows where d is the duty cycle of the boost converter.

MPPT Using FCS-MPC
Maximum power point tracking is an essential regulation to capture the obtainable power from the PV source during the variable operating conditions. At this stage, FCS-MPC technique is developed to extract the maximum power from the array. The FCS-MPC requires the discrete-time model of the boost converter, which can be derived from the above-mentioned model (Equations (2)-(5)), and using forward Euler discretization [53] where i pv ≈ i l , Equations (8) and (9) are valid when the switch is open. Equations (10) and (11) describe the on state, T s is the sampling time, k represents the actual sampling instant and (k + 1) is the future one. The design of the cost function is based on the current as where S is the switching state of the boost converter, and i re f (k + 1) is the reference current generated from the P&O method. The final scheme for the conventional FCS-MPC MPPT method is shown in Figure 8.

MPPT Using Direct Switching Technique
Maximum power can be harnessed from the PV source using the well-known direct control method [54][55][56][57], where the duty cycle is directly perturbed in the control algorithm without the need for PI controllers [54,58]. Combining this idea with the FCS-MPC MPPT principle, the duty cycle can be replaced with the converter switching state, as shown in Figure 8. The main advantages of the proposed MPPT are: (1) The avoidance of current predictions and cost function evaluations (i.e., low computational load), and (2) no dependency on system parameters.

Control of the Two-Level Inverter Using FCS-MPC
The PV generated DC energy is fed into the grid and converted to AC energy by means of inverters. In this study, a two-level inverter is utilized; its model and control strategies with the conventional and proposed FCS-MPC will be addressed in the coming subsections. Figure 9 shows the configuration of the inverter, filter and the grid. The two-level inverter has eight possible switching actions, shown also in Figure 9 with their sectors distribution (1-6). According to these potential actions, eight voltage vectors can be generated at the output terminals of the inverter. Table 1 summarizes the possible switching actions and output voltage vectors. It is worth mentioning that six active voltage vectors are produced from the inverter with two zero voltage vectors.  Table 1. Switching actions and output voltages of the two-level inverter in αβ and abc frames.

Voltage Vectors Switching States (S abc ) Output Voltages
Referring to Figure 9 and applying KVL at the inverter output side yields where x ∈ {a, b, c}, v x are the grid side voltages, u x are the inverter side voltages, L f is the filter inductance and R f is the filter resistance. The output voltages of the inverter is given by [59,60] where v dc is the coupling capacitor voltage; S x is the switching state vector of the two-level inverter and ∈{0, 1}; and T x is the coefficient matrix, which can be expressed as In the stationary reference frame (α-β), and using Clarke transformation, the inverter voltages are specified as so Equation (13) can be rewritten as Furthermore, and using Park transformation, the rotating reference frame (d-q) components of the voltages can be expressed as where ω is the grid frequency. Considering a balanced three phase system, the active and reactive power in different frames are obtained as where Equation (19) is in the α-β frame, while Equation (20) is in the d-q frame.

Conventional FCS-MPC
To design the FCS-MPC, the discrete time model of the grid-connected inverter (derived earlier) is required. Rearranging Equation (18) gives Applying forward Euler method, the following results The predicted currents are calculated for the possible switching actions (eight times). Then, the optimal voltage vector is applied to the inverter based on the cost function design as where i dre f (k + 1) and i qre f (k + 1) are the reference currents. The procedure for controlling the grid-connected inverter with conventional FCS-MPC is clarified in Figure 10.

Proposed FCS-MPC
The conventional FCS-MPC suffers from high calculation burden (seven prediction of current and the cost function is evaluated seven times), so-to decrease the computational effort as well-the reference voltage vector (RVV) is directly calculated in the proposed FCS-MPC. This can be accomplished by substituting i dre f (k + 1) and i qre f (k + 1) instead of i d (k + 1) and i q (k + 1) in Equation (22), which results whereR f andL f are the estimated filter parameters. Then, using Park transformation As a result, the position (sector) of the reference voltage in the α-β frame, as shown in Figure 9, can be computed as Therefore, the cost function subjected to minimization is modified to where u α (k) and u β (k) are the voltage vectors in a certain sector and adjacent to the reference voltage vector (u re f ) specified according to Equation (26), as illustrated in Figure 9. According to this design of cost function, and based on sector selection, only three calculations of the cost function are required to get the optimal switching vector. For example, if the selected sector is sector one, the two voltage vectors 100 and 110 along with one of the zeros voltage vectors (000 or 111) are evaluated in the cost function. The modified FCS-MPC scheme is illustrated in Figure 11.  Figure 11. Proposed FCS-MPC of the PV grid connected system.

Design of the Proposed Extended Kalman Filter
Extended Kalman filter is a powerful tool for states' and parameters' estimation. A great advantage of EKF is its filtering capability and noise rejection [61]. It is designed based on the nonlinear discrete-time model of the system [48,61]. Obviously, FCS-MPC depends also on the discrete model of the system, so EKF and FCS-MPC fit very well together. In fact, and as mentioned previously, the FCS-MPC depends on the system parameters. Hence, a major concern is selecting an inaccurate sector and a more incorrect voltage vector, if these parameters are subjected to change. A main contribution of this paper is to eliminate the FCS-MPC dependency on the parameters of the system by estimating the values of the RL filter; i.e., the filter resistance and inductance by means of EKF. In reality, the filter parameters are exposed to variation due to aging, heat or saturation.
To implement the EKF, the discrete time nonlinear state space model of the grid connected inverter can be derived by rearranging Equation (17) as Thus, the model of the grid-connected inverter including disturbance can be written aṡ T is the measurement, w is the system uncertainty with covariance matrix Q and v is the measurement noise with covariance matrix R. Further, A, B, C and D are the inverter system matrices, and based on Equation (28) they are defined as Hence, the discrete model can be expressed as where A d = I + AT s , B d = BT s , C d = C, D d = D and I is the identity matrix. Normally, the system uncertainty and measurement noise are not known, so the EKF is implemented as follows: where K(k) is the Kalman gain,x(k) andŷ(k) are the estimated quantities. Finally, the Kalman filter can be implemented through two stages of prediction and correction, following this procedure: 1. Initialize the state vector and covariance matrices.

Prediction of state vectorx
3. Error covariance matrix prediction where Kalman gain calculation
5. Error covariance matrix update 6. Go back to step 2.

Simulation Results and Discussion
The proposed PV system is shown in Figure 11. It consists of a PV array of 15 kW (15 series × 5 parallel), followed by a boost converter, where the MPPT function is accomplished by FCS-MPC and the direct switching technique. The FCS-MPC generates the switching state for the boost converter to follow the reference current coming from outer-side loop developed by the P&O technique. The switching state (0 or 1) identified by the cost function (g) will be enforced to the power switch in the boost circuit. In the proposed MPPT, the switching state is generated directly. Then, the extracted power from the PV source is fed to the two-level inverter. The two-level inverter has two control loops for the purpose of active and reactive power control. The first and outer loop is achieved by PI controller to stabilize the DC-link capacitor voltage at its reference value (v dcre f ) and to provide the reference current (i dre f ) to the inner loop, where i qre f is set to zero for unity power factor operation. In this study, the inner current loop is realized by the conventional and the proposed FCS-MPC technique. In the conventional one, the predicted currents is calculated and then the voltage vector (out of seven) corresponding to the minimum cost function (g i ) will be selected. It is obvious that to get this optimal vector, 14 iterations (seven for the currents, and seven for the cost function) are required in the inner loop. This in turn increases the computational burden. However, in the proposed FCS-MPC technique, the RVV is computed to narrow the calculation range from six sectors to only one sector. This greatly reduces the computation time as only three computations of the cost function (g m ) are required in the specified sector. Furthermore, and to avoid the potential variation in the parameters of the grid connected inverter, an EKF is employed to estimate and correct these values online. The parameters of the PV grid connected system are summed up in Table 2. The simulation results are divided to two subsections under different atmospheric conditions and parameter variations, where the performance of the proposed scheme is compared with the conventional FCS-MPC as follows: As there is no need for current prediction computation in the proposed algorithm, the calculation time is highly reduced. The tracking speed of the proposed direct switching method is 0.5 ms, while it is 1.6 ms for the conventional MPPT. Besides, the average switching frequency for the direct switching technique is 4.42 kHz, while the conventional technique has a higher average switching frequency of 4.85 kHz.

MPPT and System Behavior under Different Radiation Conditions
The performance of the inverter control using the conventional and the proposed FCS-MPC with EKF is investigated at the previous radiation conditions, and shown in Figure 14, where the DC-link voltage (v dc ), the active power injected into the gird (P), reactive power (Q), the direct axis current (i d ), the quadrature axis current (i q ) and the abc currents are illustrated respectively. The DC-link voltage tracks its reference value with a very low overshoot of 1.5% for both of the conventional and the proposed techniques. The active power behavior is similar in the two methods. However, the reactive power has a lower ripple content in the proposed strategy due to the enhanced tracking of i q , as clarified in Figure 15.   Furthermore, the total harmonic distortion (THD) of the proposed approach is better than the conventional one, despite of the lower average switching frequency of the proposed FCS-MPC. A comparative summary is provided in Table 3. Another merit of the proposed technique with EKF is eliminating the prior need of knowledge of the system parameters. Figure 16 shows the estimated filter parameters for the same previous atmospheric conditions. The EKF provides a very fast and accurate online monitoring for the filter inductance (L f ) with a maximum error of 1.7%. However, the filter resistance (R f ) estimation is relatively slower than the inductance estimation at the beginning of the simulation, but the estimation is very precise with a maximum error of 0.8%.

System Performance with Parameter Variations
In this subsection, the effects of parameter variations on the conventional and the proposed FCS-MPC are investigated. The atmospheric conditions for this test are kept constant at 800W/m 2 and 25°C. Figure 17 shows the PV power, voltage and current, respectively. The results of the conventional FCS-MPC MPPT exhibit higher ripples compared with the proposed MPPT in all the waveforms, where the proposed MPPT shows an increased average power extraction, and hence higher energy gain. Table 4 presents the energy calculation for the two MPPT techniques within a one day (10 h) period. The difference (saving) between the two methods is about 228 kWh; this amount is calculated through the simulation interval (0.3 s).   Figure 18 illustrates the DC-link voltage, the active power injected into the gird, reactive power, the d-axis current, the difference between the actual d-axis current and its reference value, the q-axis current and the abc currents at different step changes of the filter resistance, respectively. In the first interval, the filter resistance is kept constant at its nominal value R f = 0.25 Ω; after that the resistance is decreased to the half of its nominal value i.e., ∆R f = −50%, finally it is increased by +50%. Filter resistance change affects the steady state error between i d and i dre f , which is obvious at the last interval (0.2-0.3 s) of i d , where i d is deviated from its reference, unlike the proposed method. This error is further examined in Figure 19 for better observation. However, the effect of resistance change on the THD of the currents is small. Moreover, the estimated values of the filter resistance and inductance are presented in Figure 20, where the EKF provides a very efficient estimation for both of them. Figure 21 shows the DC-link voltage, the active power injected into the gird, reactive power, the d-axis current, the q-axis current and the abc currents at different step changes of the filter inductance, where the inductance is changed with a mismatch of ±50%, respectively. As a matter of fact, it is not strange that the performances of the conventional and the proposed FCS-MPC are enhanced with +50% mismatch in the filter inductance, as shown in the second interval (0.1-0.2 s); this due to the filtering capability of the inductor. However, this increase affects the steady state error of i q in the same interval, as shown in Figure 22, and hence the steady state error of the reactive power. Referring to Figure 22, it was found that the steady state error of the conventional FCS-MPC is about 75 (VAR), which is approximately three times the steady state error of the proposed FCS-MPC with 25 (VAR). Underestimating the filter inductance (the third interval) deteriorates the behavior of the conventional FCS-MPC, where the abc currents is greatly distorted. Furthermore, the injected active power exhibits very high ripples. In contrast, the proposed technique with EKF sustains a very good performance with reasonable active power ripples. Thanks to the accurate estimation provided by the EKF as revealed in Figure 23. Furthermore, Table 5 gives a comparative evaluation of the two techniques concerning the THD, where the proposed methodology has superior performance, especially when the inductance is underestimated (6 mH). The difference between the THD of the two techniques with this condition is approximately 5%, where the conventional FCS-MPC exceeds the IEEE standards [62].
The EKF is not only parameter estimation tool; it also has a filtering capability. To prove that, a current noise shown in Figure 24 is added to the αβ currents. The estimated currents exhibit a very good refined waveform in comparison with the noisy currents, as revealed in Figure 24.

Conclusions
A two-stage, grid-connected PV system is proposed in this paper, wherein the model of each component in the system is examined. The maximum power is extracted from the PV source by a new direct-switching MPPT technique. The proposed technique is very fast as there is no need for a PI controller or a modulation stage. For investigation, the methodology is compared with the conventional FCS-MPC algorithm. The cost function of the conventional MPPT is designed to minimize the error between the reference and the one-step in the horizon-predicted current. The inverter is controlled by a computationally-efficient FCS-MPC technique supported by an EKF to estimate the filter parameters. The proposed methodology determines the sector of the RVV directly from demanded currents, so the cost function is evaluated only three times in the identified sector. The proposed system was compared with the conventional FCS-MPC under different operating conditions of radiation and parameter variation, and validated using Matlab. The results show that the proposed MPPT gives better dynamic and steady state responses than the conventional MPPT with FCS-MPC. Moreover, the results of the proposed MPPT provide enhanced energy utilization in comparison with the conventional MPPT at steady state. Besides, and due to the very high transient behavior of the proposed MPPT, this gain will be higher in large PV arrays (i.e., 1 MW or higher). Furthermore, the results show that the filter inductance has a greater effect on the system's performance than the filter resistance, especially when considering the THD of the currents. Low inductance values of the filter deteriorate the conventional FCS-MPC behavior. However, the proposed technique offers robust performance, where the EKF presents a delicate estimation for the filter resistance and inductance. This improves the system's behavior against parameter uncertainties, even preserving the stability of the system. Additionally, the EKF rejects potential noise in the measurements (currents).