Hardware-in-the-Loop to Test an MPPT Technique of Solar Photovoltaic System: A Support Vector Machine Approach

: This paper proposes a new method for maximum power point tracking (MPPT) of the photovoltaic (PV) system while using a DC-DC boost converter. The conventional perturb and observe (P&O) method has a fast tracking response, but it presents oscillation around the maximum power point (MPP) in steady state. Therefore, to satisfy transient and steady-state responses, this paper presents a MPPT method using support vector machines (SVMs). The use of SVM will help to improve the tracking speed of maximum power point of the PV system without oscillations near MPP. A boost converter is used to implement the MPPT method, where the input voltage of the DC-DC converter is regulated using a double loop where the inner loop is a current control that is based on passivity. The MPPT structure is validated by hardware in the loop, a real time and high-speed simulator (PLECS RT Box 1), and a digital signal controller (DSC) are used to model the PV system and implement the control strategies, respectively. The proposed strategy presents low complexity and it is implemented in a commercial low-cost DSC (TI 28069M). The performance of the MPPT proposed is presented under challenging experimental proﬁles with solar irradiance and temperature variations across the panel. In addition, the performance of the proposed method is compared with the P&O method, which is traditionally most often used in MPPT under demanding tests, in order to demonstrate the superiority of the strategy presented.


Introduction
Photovoltaic power generation is a renewable energy source with numerous advantages. Its characteristics in solar energy are recognized by good dynamics that are easy to incorporate into residential microgrids. The low energy conversion efficiency of PV systems is a significant disadvantage in PV systems, notwithstanding, there are important improvements, such as cost reduction, cell efficiency increment, and enhancement in the structural integration of buildings. On the other hand, the surrounding environment, which includes solar irradiance and ambient temperature, affects the amount of energy that is generated by PV systems [1]. Therefore, a control that is associated with maximum power point tracking (MPPT) should provide an appropriate duty cycle, so that DC-DC converters can obtain the maximum level of energy from PV modules [2][3][4]. Several studies for MPPT methods have been developed, with the best-known methods being perturb and observe (P&O) [5], extremum seeking control methods (ESC) [6], and incremental conductance algorithm (INC) [7]. Usually, these methods take the instantaneous values of output voltage of PV module or current to generate the control signals, using a reference voltage, reference current, or duty ratio for maximum power point tracking. The P&O method has the advantages of simple structure and low computational cost. The literature also presents algorithms that are based on estimating the MPP through data with previous values of radiation or temperature. Among them are those based on fuzzy logic (FL) and artificial intelligence (AI) [8]. In order to improve the PV system efficiency, an appropriate DC-DC converter and a MPPT algorithm must be integrated and configured, and the following conditions must be satisfied [9]: • Fast tracking response (transient response). • No oscillations around the MPP (steady-state response). • Response performance against solar irradiance and temperature changes. • Simple structure with a low computational cost.
Several papers have been published that are related to MPPT algorithms using support vector machines (SVMs). The SVM is a supervised machine learning algorithm that is used for linear regression and problem classification. In [10], the SVM was used as a classifier to generate a large amount of training data that were used to train an artificial neural network. However, this method exhibits power oscillations near the MPP and the used training data set is not satisfactory for generating an accurate learning. In [11], a conventional support vector regression was used to estimate the irradiance levels from PV electrical characteristics, using input features that are not identically and independently distributed (i.i.d), which makes the proposed method complex for implementing on a low-cost microprocessor. In [12], the P&O method has been utilized, where the sized perturbation step was computed using an identification model of solar irradiance based on SVM, for two different locations. However, the selection of the perturb step size is realized off-line for a specific location, updated monthly or seasonally, so that the effects of partial shading is not considered. This paper proposes a novel MPPT algorithm that is based on SVM. The SVM is used to estimate the unknown transfer function of the multivariable non-linear P-V characteristics of a PV module. In machine learning, this problem is known as regression estimation for multiple variables. The main motivations to use the SVM based method are advantages, such as: the ability to estimate the parameters with limited data, robust predictions when nonlinearities and noise appear in the system, and considering all of the inputs and outputs together to construct each regressor [13]. The main contributions of this paper are the following: • Provide a new method to determine the MPP of the PV module based on multipleinput multiple-output SVM, without oscillations around the MPP in steady state. The training phase of the SVM only requieres the 10% of the data of the P-V characteristic curves (at different levels of irradiation and temperature) that are given by the manufacturer of the PV module. • The proposed MPPT algorithm and the double loop control of the DC-DC boost converter can be implemented in a commercial low-cost DSC. • The performance of the proposed method has been verified through simulations and hardware-in-the loop experiments, showing good accuraccy and reproducibility.
The remaining of this paper is structured, as follows: Section 2 presents the structure of the MPPT control using a DC-DC boost converter. Section 3 describes the proposed MPPT approach. Section 4 presents the simulated and hardware in the loop results. Finally, Section 5 draws the concluding remarks. Figure 1 illustrates the MPPT control diagram for a PV module using a DC-DC converter. The PV module supplies voltage and current, converting incident solar radiation into electrical energy through the photoelectric effect, to charge a battery through the DC-DC converter. Figure 2 shows the non-linear I-V characteristic and P-V of the commercial module BP365 for different irradance and ambient temperatures, which include 0 • C, 25 • C, and 50 • C. This PV module is modelled for PLECS simulations, which is presented in [14]. In this work, a boost converter is the selected topology to be used as DC-DC converter. Figure 1 shows the topology of the boost converter. Subsequently, the following system of differential equations for the boost are obtained:

MPPT Control by DC-DC Boost Converter
with i L being the inductor current, v o the output voltage, and u the control variable ∈ {0, 1}. The duty cycle for the boost converter is:

Average Current Control Based on Passivity
The current control that is based on passivity is applied using the output feedback passive in power electronics devices [15]. The system can be written in the following Hamiltonian form: where D is a positive definite diagonal matrix, J is a skew-symmetric matrix, and R is a symmetric, positive semi-definite, matrix. The matrix J represents the linear terms of the variable control u, R represents the dissipative terms in the system, and the expression ce u is the energy term to control the system. Therefore, the exact regulation error passive output of the system is denoted by e y [16]. Defining the error as e = x −x, wherex is the desired equilibrium of the average states, the state-vector for the systems under study is , and the error of the input is e u = u −ū, with the corresponding equilibrium inputū. Being H = 0.5x T x, doing so, the definition of the error is: The incremental control input is e u = −γe y , therefore u = −γe y +ū, where γ is a positive scalar quantity. Consequently, the matrices that represent the dynamics of the exact regulation error for the system (1) and (2) are: The control law for the boost converter is:

Discrete-Time PI Voltage Control
To regulate the input voltage of the boost converter v g , a double loop is implemented while using a proportional-integrator voltage control external loop; this external module gives the input current reference for the inner loop and works with the voltage reference provided by the MPPT algorithm. The controller transfer function can be expressed in the z domain using the forward Euler method, as follows: where T samp = 1/ f samp . The forward-Euler method is used to find the recurrence equation for the discrete-time integral PI control, as follows: where K pv = 2 π f c C in (11) and with C in being the input capacitor, the value of the crossover frequency (CF) for the voltage loop ( f c ) should be lower than the CF for the current loop. The location of the PI zero should be lower than f c (1/(2πT i ) < f c ).

MPPT Algorithm
The Maximum Power Point Tracking (MPPT) control allows a good performance in a PV system under different solar irradiance and temperature values. Usually, the operation of this MPPT is based on the control of the switching converter to extract the maximum power generated by the PV module [17,18]. In this section, the most common and used MPPT method and the proposed MPPT method are presented.

P&O Method
The P&O MPPT method has been widely used [19][20][21]. It is popular for its simplicity and high tracking capabilities. The aim of this algorithm is tracking the MPP by varying the reference voltage while observing the output power PV module. If the current measured power P[n] is greater than its previous sampled value P[n − 1], then the voltage change is continued in the same direction. Otherwise, it is reversed. The PV module voltage is compared with the maximum voltage in order to predict the MPP. Following this, a small step of reference voltage results in a power step of the PV module [19,22].

Proposed Support Vector Machine MPPT Method
This subsection presents the proposed MPPT method based on support vector machine. The proposed method requires voltage and current measurements of the PV module, and the dataset of the P-V characteristic curves shown in Figure 2. The maximum power point (V m , P m ) of each curve are known; therefore, if the operating curve of the PV module is determined, it is possible to know the voltage V m . The operating curve of the PV module is determined as follows: with the actual voltage of the PV module, it is possible to estimate the corresponding powers of all P-V characteristic curves, to this end, the SVM is used to find the mapping between an input voltage and the output powers. The vector P = P 1 , . . . , P Q comprises the Q powers of all characteristic curves that correspond to a sample voltage v g [n]. The relationship between v g and P is assumed, as follows [13]: where matrix β and the vector b are known as the regressors, which are optimized during the training phase, with an iterative reweighted least squares procedure proposed in [13], and k is a vector that contains the kernel of the input voltage v g [n] and the training voltage measurements. The kernel function that is used in this paper is the radial basis function kernel given as [23]: where the vector v contains the training samples of voltage, and the hyperparameter σ is usually known as the bandwidth. It is worth noting that the datasets taken from the P-V characteristic curves are divided into 10% for training and 90% for validation. Subsequently, from a given current i L [n] and voltage measurements v g [n] of the PV module, its actual power P[n] can be determined. With the vector P and the actual power P[n], the actual operating curve (C) of the PV module is determined with the position of the component of P nearest to P[n]. Once the operating curve is determined, it is possible, with the prior knowledge of the maximum voltage of each curve, to set the voltage V m for maximum power P m . In brief, the proposed method is described in Figure 3. MPPT algorithm

Results
Different tests have been carried out in order to validate the proposed MPPT algorithm using a DC-DC boost converter. The simulated and hardware in the loop (HIL) results have been presented to show the performance of different controls that integrate the the PV system global control scheme, as shown in Figure 1. The values of the boost converter components are: L = 800 µH, C in = 88 µF, switching frequency f s = 25 kHz and V o = 36 V. Figure 4 shows the HIL setup. The Hardware-in-the-loop (HIL) testing system consists of: Where the evaluation kit, a TI 28069M LaunchPad (the red board), is connected to the RT Box via an RT Box LaunchPad Interface (the green board). The plant (PV module and boost converter) has been modelled using PLECS RT Box 1 (Zúrich, Suiza) , the sampled time to model the converter is 3 µs. In this way, the global control scheme shown in Figure 1 has been implemented using TI28069M LaunchPad of Texas Instruments (TI) (Dallas, TX, USA), which is a low cost TI microcontroller. Inner loop control, double loop control, and MPPT algorithm are validated and the proposed MPPT method is compared with the P&O algorithm. Hence, the realized tests to validate the proposed MPPT algorithm are: • Inner loop current control test. The current control is validated through a step change of the inductor reference current from 2 A to 6 A and back to 2 A for the current control strategy that is based on passivity. • Double loop control test. Once the inner loop is validated, we proceed to implement a double loop control using an external voltage control to regulate the input voltage (the PV module voltage); this control is a proportional-integrated control; for these tests, voltage reference changes are realized from 15 V to 18 V, in order to demonstrate that the input signal of the converter tracking the reference and the inductor current follow the changes.
• A comparison with P&O method is realized, where three comparison tests are performed: of the system start-up, of change in irradiance between 1000 W/m 2 and 500 W/m 2 , and vice versa, as well as the dynamic behavior of the MPPT algorithms, according to a profile of irrandiance and ambient temperature. a c d b The signals sampled for the control are v g , v o , and i L . The sampling time of the MPPT controller is set to 0.1 s, the sampled time to the voltage regulator is 400 µs, which follows the settling time that is required by the DC-DC converter. The switching sampled for the inner current loop is f samp = f s = 25 kHz. The PV module used in the simulation is the BP365 65 W, and the electrical characteristic is stated in Table 1.   Figure 5, the transitions during reference changes are smooth, without overshoot and settling times near to 150 µs, The simulated results are in good agreement with the experimental results. As shown, the output current is well regulated. The controlled current adequately follows the current reference at all times from the steady-state to the variations in the current reference. Thus, the proposed current control strategy performance during current step reference change is validated. Figure 6 shows the commutations of the current signals, which are in good agreement with the switching frequency of 25 kHz.  Figure 7 shows the simulated and HIL test responses of external loop for voltage references variations from 15 V to 18 V with a step between variations of 1 V. These voltage reference values are in accordance with the maximum power voltage, as can be observed in Figure 2. The selected crossover frequency (CF) corresponds with f c = 500 Hz which can allow the calculation of the proportional gain according with (11). The location of the PI zero of Equation (12) is lower than f c (1/(2πT i ) < f c ), whereby a T i = 3.18 × 10 −3 s was selected. In Figure 1, the voltage regulator (G vpi (z)) calculates the inductor current reference every 400 µs. Figure 7 shows the simulated and HIL responses of voltage loop for a voltage reference variations from 15 V to 18 V with a step between variations of 1 V. This experiment was realized at a fixed ambient temperature of 25 • and a fixed irradiance of 600 W/m 2 for the PV module. The voltage reference is accurately tracked and the current transitions caused by the voltage changes are smooth, changing its value with the voltage steps, as can be observed in Figure 7. Hence, the performance of the current control that is based on passivity adding an output voltage loop are validated to be implemented using the MPPT algorithm.

Comparison of MPPT Methods Results
The MPPT results for the proposed algorithm are compared with the classical P&O algorithm approach. The MPPT algorithms have been implemented to provide a new voltage reference for the voltage loop, every 100 ms, as shown in Figure 1 for the MPPT algorithm block. The exponential function seen in (15) for the proposed MPPT method was efficiently implemented for C code, while using the following approximation: where n is a positive large integer number, setting n = 256. Figure 8 presents the simulation and HIL results of the start-up for the MPPT methods. This figure depicts the transient behavior from zero current to an equilibrium point corresponding to the maximum power at a fixed irradiance of 1000 W/m 2 and an ambient temperature of 25 • C for the PV module.
In Figure 8a,b, the proposed MPPT reaches the steady state near to 2 s, while, for the P&O method in Figure 8c,d, the steady state is reached in around 6 s, with the proposed MPPT having a faster tracking than the P&O method during system start-up. It is important to note that the P&O algorithm generates an oscillating signal around the maximum. The proposed MPPT algorithm works at the optimum point, and there is no oscillation after it has been tracked.   Figure 9 shows the simulated and HIL results of the MPP tracking performance under step irradiation variations from 500 W to 1000 W and returning to 500 W with a fixed ambient temperature of 25 • C. Figure 9a,b present the results for the proposed MPPT and where P mpp is the available MPP power of the solar module, ∆T is the sampling time (0.1 s), and T m is the overall time interval measurement . The overall MPPT tracking efficiency for the test presented in Figure 9 is 97.56% for the P&O method and 99.46% for the proposed MPPT. For the classical P&O method, the PV system always operates in an oscillating mode, as can be observed by the inductor current and input voltage of the converter in Figure 9c,d. Therefore, the proposed MPPT method achieves a superior performance during abrupt irradiation variations than the classical P&O method.
The system is tested and the MPPT methods are compared over the irradiance and ambient temperature profile that is shown in Figure 10. This test probes the controller's robustness and the ability to keep extracting the maximum power within these abrupt variations. Figure 11a,b, for the proposed MPPT, present an overall MPPT tracking efficiency of 99.3%, while, for the P&O method, the tracking efficiency is 97% in Figure 11c,d. Moreover, the proposed MPPT does not present oscillations signals (power, current, and input voltage) when compared with the P&O.   Table 2 shows the quantitative analysis of the proposed MPPT method and P&O method for the results that are shown in Figure 8. This table demonstrates a high performance of the proposed MPPT method during the start-up in comparison to the P&O method; when presenting a high tracking factor, the mean power tracked value is close to the power global maximum and the setting time is short. Table 3 shows the sensitivity of the algorithms by mean absolute error (MAE), relative error (RE), and root means square error (RMSE) for the results that are shown in Figure 9. The standard error equations are given in [24]: where P pvi represents the power of the PV module and m represents the number of samples. The standard errors values indicated that the performance of the proposed MPPT algorithm has a higher effectiveness to tracking the maximum power point.   Table 4 shows a summary of MPPT techniques comparison, where the proposed MPPT is highlighted for its high efficiency and precision.

Conclusions
This paper proposes a method for tracking the MPP of a PV system. P&O is commonly used as a MPPT strategy of PV systems, but it uses a constant voltage step to obtain the tracking power limits its performance. In this paper, a MPPT control that is based on SVM is proposed to avoid oscillations around the MPP. The proposed MPPT method works, as follows: an SVM is used to estimate the non-linear P-V characteristic of a PV module through regression estimation for multiple variables with scarse training data, and this information is then used to select the optimal output reference voltage. Hardware in the loop tests show that the proposed MPPT has a better performance and efficiency in comparison to the P&O method for constant and varying weather conditions. The model of the power system was modelled by PLECS simulation tool using a RT Box 1 and the control strategies were implemented in a commercial low-cost DSC using C programming software. In this way, it is demonstrated that the proposed strategy has the advantage of a moderate computational cost that allows it to be implemented in low-cost DSC. Future research will address the study of shading in solar panels extending the proposed SVM-based method.