Photovoltaic inverter control using programmable logic device

Solar power plant system represents the clean energy generation systems which convert and deliver the large amounts of solar radiation energy to the grid. The main purpose of the study is to maximize the amount of energy delivered to the grid from the solar photovoltaic cells. The solar irradiance and the grid voltage are the complex and dynamic system and need the universal solution which can provide more power at high dynamics of changes in external, various conditions. This work focuses on investigations provided in detail for the fuzzy logic-based synchronization technique which significantly increases the energy efficiency of the photovoltaic system. The multi-photovoltaic system’s controller concept was elaborated and evaluated using the programmable logic device, particularly useful for power critical drives. The dynamic responses of photovoltaic system were measured, which refers to the start procedure, solar irradiance, grid frequency and phase angle change. The results of the photovoltaic system investigation are made to appoint the efficiency in relation to the standard solution. The proposed fuzzy logic-based synchronization method delivers more energy to the grid in dynamic states in relation to the standard phase-locked loop method. The normal operation of the photovoltaic system is the dynamic operation. Therefore, the solution described in work allows to increase the efficiency of solar farms.


Introduction
The electrical energy consumption still shows an upward trend. The production of energy-efficient appliances is an insufficient action which leads to the reduced energy consumption. The EU (European Union) directives enforce the extension of the renewable energy consumption. In such a situation, investigations of PV (photovoltaic) systems are at a very high priority. The use of solar energy in many applications is a part of the eco-trend, positively affecting processes in the environment [1]. One of the most important elements of the PV system is the power electronic converter, which converts electrical energy parameters of PV cells into electrical energy with the energy parameters accepted by electrical devices or accepted by the grid. The conversion of the electrical energy consumed by the local equipment shall be made in off-grid converters, while the energy injection to the grid requires on-grid converters [2]. Parameters of the electrical energy produced by the PV cells strongly depend on the PV converter control method. Usually, the whole control process with modulation processes is provided by the digital devices. In case of the microprocessor-based control system, the physical structure of CPU (Central Processing Unit) is fixed and cannot be changed. Thus, the calculations of the control process variables are limited in connection with the assumed, constant digitalization level and clocking. This limitation results in the accuracy reduction of control processes or reduces the operation number per time unit. As a consequence, the structure of control system is not flexible and cannot be dynamically extended, during operation or initialization states. Such restrictions are not observed for the PLDs (Programmable Logic Devices) [3]. The control structure and control processes can be defined as an independent set of instants, which can be modified in fly, depending on the device mode and type. This makes the control processes flexible and easy for adaptation [4]. The grid converter control process must complete three requirements: (i) the maximum produced in PV cells power should be delivered to the grid in various solar irradiances and temperature conditions; (ii) the required power quality should be generated in order to minimize the reactive power [7,8]; and (iii) safety operation resulting in an antiislanding detection process implementation [9,10]. To achieve these requests, there are few control algorithms proposed in the literature [5,6]. In this paper, a two-stage control structure was implemented: one as interdependent tasks and one as an independent task. The maximum power point tracking task is interdependent with the current PI control process, while the anti-islanding detection process monitors the grid as a high-priority task. There are two main maximum power tracking algorithms: perturb and observe (P&O) described in [11,12] and incremental conductance. Due to fast response, the P&O method was implemented in the presented investigations. The power generated in PV cells must be delivered to the one-phase AC grid. Therefore, the reference current must be synchronized with the grid voltage in order to maximize the active power delivered from PV cells. Many solutions described in the literature use the phase-locked loop (PLL) method [13]. This voltage synchronization strategy was assumed as a standard method compared with the fuzzy logic-based (FLC) synchronization method proposed in this paper as a new solution for grid-connected inverter. The idea of the FLC-based synchronization method and its basics for onephase system was described in [14]. This paper is structured using the following sections: Sect. 2 presents a brief description of the photovoltaic system topology, used control structure and shows the hardware setup with a programmable logic device implementation; Sects. 3 and 4 present the comparative analysis of the photovoltaic system control with the two types of synchronization strategy in static and dynamic states and the energy efficiency of the FLC-based solution compared with the standard solution and conclusion.

Methodology
In the presented project, the instances needed for PV inverter control were implemented in the FPGA (Field Programmable Gate Array) as a single control device for each independent PV inverter control, as shown in Fig. 1.
The investigation of PV system control was conducted for on-grid one-phase system with the three system requirements implementation: (i) maximum usage of energy sources; (ii) required power quality; and (iii) safety requirements. In order to obtain the maximum power from a photovoltaic system, the MPPT (Maximum Power Point Tracking) algorithm was implemented of P&O type. The individual load of the PV panels was fixed as an independent control instant operated in the same control device. The power quality and safety requirements were taken from the norms and standards in the field of: harmonic current limits [15][16][17][18], frequency and line voltage monitoring for the connection of microgenerators in parallel with public low-voltage grid and anti-islanding operation [19], constant components limit for grid currents and power factors [20] and overall efficiency of grid-connected PV inverters [21].
The main task of the control device is the current control for each PV system operating in parallel. The reference current for the grid-connected inverter is calculated on the basis of the MPPT algorithm by the current value for maximum power and referenced waveform multiplication. The referenced waveform for current depends on the first harmonic of the grid voltage in order to obtain the unity power factor. The sinusoidal signal of the first harmonic of the line voltage is generated using proper grid synchronization technique for one-phase system. The time domain system of PLL type was used for the standard solution and compared with the fuzzy logic-based one-phase grid synchronization technique as a new problem solution. The additional control instance is the capacitor voltage control in the DC-link. This is standard 2-level control method for the boost type DC-DC converter. The first level controls the voltage for the DC-link voltage stabilization. The second level controls the current of the DC-DC converter. The anti-islanding detection was conducted based on the method of the voltage frequency deviations, widely described in [22][23][24]. In case of the observed frequency FPGA-based grid converters control system using independent controllers for each PV system operating in parallel deviation, when the frequency is out of the nominal range, the controller is shutting down the inverter. Then, the grid converter does not supply the distribution network. The general diagram of PV system controller is shown in Fig. 2 [25].
The maximum usage of the energy sources needs the information about the grid current value from the controller or other load current setting in relation to the actual level of the maximum power of PV panels. This level dynamically changes as an effect of sunlight level and actual temperature. This requirement was achieved by perturb and observe technique which is a very popular MPPT method [26]. The basis of this technique is the power comparison after and before the load change moment. The power and voltage comparisons determine the increase or decrease process of the referenced voltage. The diagram of this technique is shown in Fig. 3.
Grid synchronization of one-phase grid converters is the main task of control devices. This task realization corresponds to the grid voltage first harmonic detection by the phase angle and frequency calculations. In general, the synchronization methods refer to the frequency or time domain analysis based on the Fourier transformation or using the PLL structure. In the grid converter applications, the PLL method is the most interesting method and is often used. In the performed investigations, the standard structure of PLL type grid synchronization method was used and compared with the fuzzy logic grid synchronization method for one-phase systems as a new solution of PV system controller. This method was elaborated and discussed widely in [14]. The FLC-based synchronization technique uses the quadrature signal generator as phase detector and based on the actual and previous sample of the phase angle error and previous sample of the output calculates the synchronization signal using linguistic rules which were determined in a heuristic way. The block diagram of this synchronization block is presented in Fig. 4.
The bandwidth of the classical single-phase PLL should be very low, and the second harmonic component in the synchronization signal appears. As shown in [14], the fuzzy logic grid synchronization technique cancels out oscillations at twice the grid frequency in the phase angle error signal and controls the output oscillator frequency faster.
The system control algorithms were firstly tested using simulation tool. The theoretical model of investigated  Flowchart of the "perturb and observe" technique for PV system system was implemented in the PSIM (Power Electronics Simulator) software using standard control blocks and embedded models of PV cells. Then, the theoretical concept was examined by a set of experiments. The control structure was elaborated as a digital system in the form of independent instances operating in parallel. To implement control rules, the Quartus II software environment was used with the embedded tools for data acquisition and in order to control parameters and structure modified during driver operation. A laboratory setup was elaborated based on the FPGA Altera EP4CE22E22C6N device used for grid converter and DC-DC boost converter control. The DC-DC boost converter and grid converter parameters are shown in Table 1. As a PV system emulator, the ITECH IT6526C DC power supply was used with the solar panel curve simulation. Measurements and data acquisition were realized using Yokogawa DLM2000 mixed signal oscilloscope and embedded signal tool Signal Tap II Logic Analyzer. The Signal Tap II Logic Analyzer tool was used to visualize and acquire FPGA-based controller internal data, after analog to digital conversion. So, the analyzed data are the same data as used in control processes. The photograph of hardware setup is shown in Fig. 5.

Laboratory test results
In this section, the one-phase grid converter control device used for PV systems was comprehensively evaluated experimentally and using simulations in terms of the required power quality. The maximum usage of energy sources problem was omitted due to standard solution to the problem by typical, known in the literature P&O method. The PV energy flow control was taken into special attention for PLL-based and FLC-based solutions. Investigations were performed for the various levels of the solar light intensity under the standard temperature condition. The light intensity was changed between 800 and 1600 W/ m 2 at the temperature 298 K. The PV output power-voltage curve for different solar irradiances is shown in Fig. 6.
The PV panels output current and output voltage curves for investigated cases are presented in Fig. 7.
The examination of FPGA-based PV system controller was performed for different solar irradiances using the PLL-based and FLC-based synchronization techniques. As shown in Fig. 8, the solar irradiance s was changed by step between 800 and 1500 W/m 2 . As an effect of higher energy production in PV panel, the controller increases the current reference value as an MPPT tracking effect in case of both FLC-based synchronization and PLL-based synchronization.
The examination of the PV system controller was performed next, when the solar irradiance s was varied linearly. The cases of different synchronization techniques  were investigated by electrical quantities measurement and internal signals of the FPGA record. Figure 9 shows the investigation results for line solar irradiance change. As shown in Figs. 8 and 9, the energy delivered to the grid is different for the driver synchronized using standard PLLbased method and FLC-based method. As a result of that observation, the current controller must have the different reference signals for the tested variants. In both cases, the MPPT algorithm is the same and its operation gives the same grid current amplitude reference signal. Thus, the synchronization signal must be different. Both the FLC-based and PLL-based synchronization techniques generate the unified sinusoidal signal which can be different only during transient state. It can be concluded that the energy delivered to the grid depends on the response time of the synchronization process. This response time t r was measured using Signal Tap II Logic Analyzer tool for a different initial angle θ of the synchronization signal triggered between the initial moment and the moment when the phase angle error achieves 1% value. Measurement results are presented in Fig. 10.
The FLC-based synchronization technique is faster than the PLL-based technique resulting in an increase in the delivered electrical energy to the grid in dynamic states, especially for the big phase error. It can be concluded that in dynamic states the PV system synchronized by FLC method can deliver more energy to the grid than the standard PV system with the PLL-based synchronization strategy. In order to compare and show the energy efficiency of the investigated cases during dynamic state, the percentage energy coefficient ΔE was defined as follows: where ΔE FLC and ΔE PLL are the measured energy delivered to the grid from the time of the dynamic state beginning to the 110% of the maximum response time for FLC-based and PLL-based method, respectively.
The influence of grid voltage parameter changes on the percentage energy coefficient was investigated. The voltage frequency change in the range from 50 Hz to 50.5 Hz was generated, and the energy delivered from the PV system to the grid was measured. The relation between the energy coefficient and the frequency change range shows the linear trend, as shown in Fig. 11.
As shown in Fig. 11, the PV system with the FLC-based synchronization method can deliver to the grid more energy per frequency step than in case of the PLL-based synchronization method usage. In case of the dynamic grid voltage frequency changes for the photovoltaic farms, the FLC-based synchronization method can deliver more energy to the grid and increase the energy coefficient of the PV farm. Next, the step grid voltage phase change was investigated. The voltage phase angle disorder was generated by the angle step Δθ in the range from − 90° to 90°. The calculated percentage energy coefficient is shown in Fig. 12.
The analysis of presented results in Fig. 12 confirms the assumption that the shorter response time observed in Fig. 10 for the FLC-based synchronization method affects the value of delivered energy, increasing it up to 14% per one-phase angle disorder (for Δθ = −70°) in relation to the PLL-based synchronization. It can be concluded that during system response time, the reactive current components appear.
The variable solar irradiance conditions were tested as shown in Figs. 8 and 9. For the falling and rising solar irradiance step, the energy delivered to the grid was measured and the comparative analysis was performed. The obtained results are shown in Fig. 13.
The energy delivered to the grid is greater in the case of the system with FLC-based synchronization technique than for the PV system with standard, PLL-based synchronization. The difference in energy for the tested cases depends on the value of solar irradiance changes with a line trend and depends on the step type. While the solar irradiance is falling by a step, the power changes in the oscillating way. Then, the FLC-based synchronization method is faster than the standard method (case A in Fig. 13) and delivers up to 1.5% more energy per irradiance step. In case of rising step, there was no power oscillation and percentage coefficient is smaller. This observation allows to suppose that PV system with FLC-based synchronization method operates more efficiently under oscillating power changes.
The yearly energy produced in the discussed PV system strongly depends on the specific parameters, such as technical condition of PV cells, PV cells localization, weather, local grid condition in PCC and number of devices operating on the same power line. These parameters are random and unpredictable, and their number is variable in a period of time. In the hardware setup localization, the registered average number of the grid voltage disorders per hour was 2400. In such condition, the standard PV system delivers 928 kWh energy to the grid per year, while the PV system with the fuzzy logic grid synchronization method delivers 949 kWh per year. Using proposed control algorithm, the annual energy delivered to the grid has been increased by 21 kWh, which represents 2.27% of the energy delivered by standard PV system.

Conclusion
In this paper, the PV system controller designed for the programmable logic device of FPGA type has been comprehensively evaluated with respect to the different changes of solar irradiances and grid voltage disorders. The two types of synchronization techniques were adopted, and investigation results were compared to each other. The fuzzy logic-based synchronization technique used for PV converter synchronization with grid shows that the faster synchronization gives more energy from PV system than using the standard, PLL-based grid synchronization technique. It is also concluded that at the same operating condition of the input signal, response time of the FLC type synchronization is shorter than of PLL type synchronization method, especially when the initial phase angle is big. Designated on the basis of energy measurement, percentage coefficient ΔE shows the positive values for the tested dynamic cases relating to sunlight, grid voltage frequency and phase angle changes. This allows to conclude that the PV system with the FLC-based synchronization method in the dynamic states is more energy efficient in relation to the standard PLL-based synchronization method, in specific case up to 14% per phase angle disorder. In case of the static operation conditions, the investigated PV controller has the similar energy efficiency as standard controller with PLL-based method. The PV system controller with FLC-based synchronization method in order to operate effectively must perform a series of complex operations in a short period of time. FPGA-based driver implementation allows to use it using parallel calculation for one or more PV systems. In real PV plants, the solar activity is big and grid voltages are disturbed as a result of the switching processes or generators operation, which makes presented controller concept more energy efficient.
Funding This work is financed by Polish Ministry of Science and Higher Education under the program "Regional Initiative of Excellence" in 2019-2022, Project number 027/RID/2018/19, Govt. of Poland.

Compliance with ethical standards
Conflict of interest The author declares that he has no conflict of interest.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creat iveco mmons .org/licen ses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.