Voltage Control at Building Integrated Photovoltaic and Wind Turbine System with PI-PD Controller

With the gradual decline in fossil fuels, the area of interest for electric power generation has shifted to wind turbines and other sources of DC electricity such as PV (photovoltaic). Since the voltage output values of these sources vary over a wide range, DC/AC inverters should be used which give a quality and constant value output voltage. In residential buildings that meet the energy need from noncontinuous renewable energy sources such as solar panels and wind turbines, it is very important to ensure constant quality power flow to the building, especially when energy demand varies sharply. In this study, it is aimed to control the voltage consumed in the houses by controlling the three phase PWM (pulses width modulation) voltage source inverter system (VSI) with PI-PD controller in the integrated smart building system of renewable energy sources (solar panel and wind turbine). First the building integrated solar and wind systems (BIPv/Wt-Building Integrated PV Panel and Wind Turbine) design, then the controller design and the simulation of the system have been made at this research. We used PI-PD, integer order PI and fractional order PI control structures to control the closed voltage control loop in the DC/AC inverter system used to control the voltage used in the building at the BIPv/Wt system. For that reason obtaining the transfer function of the BIPv/Wt system, then the parameters of the PI-PD controller were calculated using the frequency response analysis method. In order to compare the effects of the control structures on the voltage used in the building, we installed our system on the Matlab/Simulink platform and performed simulations for two test scenarios. Depending on the phase voltages plotting and the harmonic values measured, it is seen that PI-PD control structure has more positive results for the dynamic systems showing the energy demand for the day such as building systems.


Introduction
Due to rapidly developing technology, changing living standards and increasing world population, the energy demand is accelerating and increasing day by day. Fossil fuels are the most important natural resources in energy production. The rapid depletion of non-renewable natural resources, predicting the end of fossil fuels, the harm caused to the waste from fossil fuel use, air pollution, changes in seasons with the effects of greenhouse gases, global warming, degradation of ecosystems and so on. impacts have reached the level that threatens the world.
In the world; In order to reduce energy consumption and increase energy efficiency in new buildings, there are many new houses where successful results are achieved through the selection of high energy performance based design and integration of energy efficiency enhancing systems applied during construction. Building integrated solar and wind systems (BIPv/Wt-Building Integrated PV Panel and Wind Turbine), as a combination of integrated solar panels and wind turbines, will reduce the energy demand from the grid, increase the existing energy diversity and support the gain through smart grid systems (Chaib et al 2016, Gül and Tan 2019, Lind et al 2013, Nookuea et al 2016.When using discontinuous energy sources such as solar panels and wind turbines, and while the building's power demand varies very sharply, it is important to provide a constant and high-quality power flow to the building. In the study, the intelligent building system fed by the grid and the hybrid renewable energy system based on solar and wind power which the electrical schema shown in Figure 1 are modeled in Matlab/Simulink environment (Kaygusuz et al 2013). As can be seen in Figure 1, the energy integration station of the system consists of AC/DC converter, DC/AC inverter and 2 diodes which determine the direction of flowing power. As long as the energy obtained from renewable energy sources is more than the energy obtained from the grid, the energy obtained from renewable energy sources will be used in our system. The AC/DC converter converts the AC voltage obtained from the grid to DC voltage and transfers it to the DC bus. The DC voltage accumulated in the DC bus is converted to 311 sinwt voltage thanks to the DC/AC inverter and the voltage obtained will be consumed by the households living in the building. The aim of this study is to control the DC/AC inverter system and to provide consumers with a better quality voltage.

Figure1. Electrical schema of building a concept of integrated PV-wind system
Voltage source DC/AC converters (VSI) are widely used in AC power control systems. Control of these systems is particularly important when operating with non-linear or periodic loads. If the control action in this system is not successful, the output voltage and current of these systems may contain significant harmonic distortions and deformations. Various control methods are used to control the VSI system (Dai et al 2016, Kim et al 2017, Rafiei et al 2003, Rasoanarivo et al 2011. Despite advances in control strategies, structurally simple PI, PID and lag/lead controllers are widely used in industrial control systems. In recent years, some methods have been developed to determine the parameters of these controllers. The most popular methods are Ziegler-Nichols, Cohen-Coon, Ǻstrom-Hӓgglund Method, Ziegler-Nichols method derived methods, integral performance criterion (IMC), gain and phase share based design methods (Luo et  The PI-PD controller structure is a controller structure with four parameters that provide excellent control in stable, unstable, resonant and integrator processes. In this controller structure, the PD controller is used for feedback in the internal loop system and the PI controller structure is used in the outer loop. Therefore, this structure primarily aims to achieve the desired performance value of the system to be controlled with the PD controller, and in this way it is easier for the result system to give the desired optimum values with the PI controller (Tan 2009).
Since dynamic and/or variable household loads represent a high proportion of the total load in the BIPv/Wt system, problems with power quality are important in such systems (Lenzen et al 2006). The main determinant of the power quality assessment for integrated buildings is that the measured harmonic value of the voltage consumed in the building has less deformation, overshoot value and does not exceed the maximum allowed by the grid regulation of 5%. The aim of this study is to control the VSI system with PI-PD controller in smart building systems integrated with renewable energy sources to ensure that the voltage consumed in the houses is of the desired quality. For this purpose, the transfer function of the BIPv/Wt system is obtained first. Then, the coefficients of the PI-PD controller used to control the feedback voltage control loop in the BIPv/Wt system were designed based on 120 cut-off frequency and 60 ᶿ phase margin values, utilizing the system's time or frequency domain responses by frequency response analysis method. Integer order PI controller and fractional order PI controller (FOPI) designed for the same cut-off frequency and phase margin by using the same method. Simulations were performed in the Matlab/Simulink environment for comparing PI-PD, PI and FOPI controllers performance in terms of three-phase voltage distribution inside the building and total harmonic distortion (THD) household voltage for two test scenarios. The simulation results show that PI-PD controller shows better performance than PI and FOPI controllers.
Our study is classified as follows: firstly the mathematical modeling of the BIPv/Wt system is obtained and then the PI-PD controller is designed according to this mathematical model. In the result part, simulations were performed in Matlab/Simulink environment for two different test scenarios in in BIPv/Wt system controlled by PI-PD, PI and FOPI controllers and results were analyzed for different load conditions in the building. Figure 3 shows the circuit topology of the BIPv/Wt system (Mu et all 2011, Malek 2014. The VDC represents the DC voltage value at the Energy Integration Station. The VDC supplies a three-phase inverter system that converts the DC voltage to a three-phase AC voltage and supplies AC power to dwellings in the building load shown in ZL in Figure 2.

Mathematical Modeling of BIPv/Wt System
In these equations, Sa, Sb and Sc are input switching functions.
The output current of the inverter is equal to the input current when the transmission and switching losses of this system are not taken into account. If we rewrite equation 4 according to this condition; In this study, Park transformation was used to convert a three-phase, three-dimensional system into a two-dimensional system and also to convert the three-phase system into a single-phase system. If we apply Park transformation to the mathematical model of BIPv /Wt system, our new mathematical equations (Mu et all 2011) Where d and q represent the direct and quadratic part of the parameters and ω is the angular frequency of the system. If the two nonlinear terms LωIq and LωId are compensated in the feed forward voltage control loop (11); equations (7), (8) and (9) can be written as linear equations, as shown in equations (10), (11) and (12), respectively.
The linear transfer function of the inverter and the inverter output filter is obtained as an equation (13) by analyzing the voltage and current equations.
In the inverter system, when transferring the system with the inverter and its filter, the time delay caused by the inverter, the delay caused by the filter and the time delay caused by the DSP should be considered. But in simulation the sampling time is less than the sum of all these delays, so we can write the transfer function of the system in continuous time;

Control of BIPv/Wt System with PI-PD Controller
Compared to the classical PID and PI control structures, the PI-PD control structure offers users a more powerful and flexible control structure with four different controller parameters (Tan 2009). PI-PD design is done by making two separate analyzes for internal and external cycles to obtain the values of the parameters (Kd, Kf) and (Kp, Ki). The voltage control loop for both direct and quadrature voltage components at the output of the three-phase inverter in the BIPv/Wt system can be modeled as shown in Figure 3 to obtain values at the inverter output q-axis and d-axis voltages that correspond to the reference voltages we set. We want the values of quadrates part of reference voltage and current be zero so that the reactive power drawn by the load is zero.

Tuning of PI-PD Controller Parameters
The objective of this part is to determine the parameters of the PI and PD controllers that control the DC/AC inverter system in order to obtain the desired result for the voltages consumed in the households in the BIPv/Wt system.
In this study, the BIPv/Wt system which we researched was developed using matlab/simulink software. In the system realized by Matlab/Simulink, we perform 500 kHz for sampling frequency and 60 Hz for mains frequency. Due to the high sampling time, the phase delay that can be observed in the system is very small and can be ignored. In our system, resistance and inductance values of inverter filter are accepted as 20 mH and 0.7 Ω. If we rewrite the transfer function of our system according to these values for voltage control loop is; The transfer function of the internal loop feedback with PD controller, refer to Figure 3 is; ( ) = 1 (0.02 + ) + 0.7 + The roots of transfer function ( ) can be founded as ; (0.02 + ) + 0.7 + = 0 The system will be stable for real positive values of Kf and Kd by examined Equation 19.
In the study, we gave Kf value as 0.3. So transfer function of the system become as; In order to find the Kd value, we examined the unit step responses of system transfer function for different Kd values (0.03, 0.1, 1, 2) as shown in Figure 4. By obtaining the transfer function GT (s), the closed closed loop with feedback of the PI controller is generated as shown in Figure  5. The following design criteria should be considered when determining the system's parameters (Maiti et al 2008, Malek 2014. where φm is phase margin, ωc is the gain crossover frequency, GK (jω) is the open loop transfer function of the controlled system, CPI (jω) is the PI controller transfer function, and GT (jω) is the transfer function of the controlled system. According to Liu's work (Liu et all 2012), the cut-off frequency of the control loop for the three-phase system connected to the grid must be in the range of [100,640] rad/sec. In the simulations carried out in these studies, the cut-off frequency for the voltage control loop is assumed to be ωc = 140 rad/sec and in this condition the phase margin must be φm = 60ᶿ to have a damping ratio of ξ = 0.707.
The parameters of the PI controller that will control the system are obtained by drawing the Bode diagram which is the frequency response analysis for the dynamic system model by using FOMCON program on Matlab/Simulink software platform and considering the design criteria (22), (23) and (24). The parameter of PI controller was founded to Kp = 5,6 and Ki = 625.
To obtain a fair comparison between PI-PD controller and PI and FOPI controllers, the same tuning approach, which has been discussed previously is applied to tune the controllers which determined at Gül and Tan work (Gül and Tan 2019). The parameters of PI and FOPI controllers for 140 rad/sec cut-off frequency and 60ᶿ phase margin are defined; In the bode diagram we examined in Figure 6, it was seen that in the three control structures where we compared performances, the design criteria at equations (22), (23) and (24) were written.

Case Study
The simulations are applied for two different test scenarios to analyse the phase voltages at the building disturbition and the total harmonic distortion (THD) of home voltage in order to compare the advantages between PI-PD controller designed with PI and fractional order PI controllers which are used to improve the quality of the electrical energy supplied to the building. Our smart building is comosed of three floors and four houses on each floor. Each phase at the inverter outlet feeds one floor and therefore four houses. The dynamic load model in the building is designed according to the hourly energy consumption profiles of homes take into consideration of household activities. Table 1 shows the nominal energy consumption of household appliances between 0-24 hours used in this study. Hourly power values of photovoltaic panels and wind turbines are obtained from Capo-Vado site (Italy) power reports (Kaygusuz et al 2013).
Our simulations are performed for two different scenarios. In the first of these scenarios, it is assumed that each phase feeds an equal load (Ra = Rb = Rc = dynamic 4 house load), whereas in the second scenario each phase feeds different load values (Ra = dynamic 4 house load, Rb = dynamic 3 house load, Rc = dynamic 2 house load). Each hour of the day is conducted for 0.1 sec at Matlab/Simulink simulations in this study.

Stable Load Condition
In this section, our simulations are performed for stable load condition (Ra = Rb = Rc = dynamic 4 house load). The phase voltages (Va, Vb, Vc) used by consumers in building which volatges controlled by PI, FOPI and PI-PD controllers are shown in the Figure 7, Figure 8 and Figure 9. In Figure 7 Simulation graphics will be sketched between 08:00-10:00 hours to further thought the effect of the sharpest changes the power demand of home consumption drop from 477 watt to 227 watt at 09:00 hour.

(a)
(b) (c) Figure 7. Voltage each phase at distribution inside the building for stable load condition between 08:00-10:00 hours (a) PI controlled system (b) FOPI controlled system (c) PI-PD controlled system In Figure 8 and Figure 9, simulation graphics will be sketched respectively, between 13:00-15:00 hours and between 19:30-21:30 to further thought the effect of the sharpest changes the power demand of home consumption . When we examine Figure 7, Figure 8 and Figure 9 closely, we observe that the sinusoidal voltage waveforms b and c show deformation in the PI controlled system especially at 09:00, 14:00, 20:00 and 21:00 hours when the building's power demand changes sharply, and also in the FOPI controlled system deformation is observed at phase b voltage. In the PI-PD controlled system, no deformation has been observed in the phase voltages. When power demand at home drops from 477 Watts to 227 Watts at 14:00, the highest overvoltage values are measured at 350 and 345 Volts in phase b, respectively for the PI and FOPI controlled systems. And also the highest withdrawal value of voltage is 275 Volts in phase c for the PI controlled system at 09:00 hour. The overshoot or withdrawal value in phase voltages was not measured in the system controlled by PI-PD system. As a result, although there is a slight deformation and oveshoot values at phase b and phase c voltages in PI and FOPI controlled systems, these observations will not cause electrical fault in the system. However, in the system controlled by PI, it can be seen that it takes a certain time for the sinusadial wave to reach a proper form again when comparing FOPI controlled system.
When we examined the THD values shown in Table 2, it was seen that the PI-PD controller had more successful results compared to both the FOPI and PI controller. Also when we compare fractional PI and classical PI control, it is analyzed that THD values measured in the system controlled by the FOPI controller are well below the system controlled by the PI controller.
To summarize the simulation study for the stable load situation, better results were obtained in both the measured THD values and the phase voltages consumed at home in the system controlled by PI-PD control structure.

Unstable Load Condition
Our second test scenario is refer to unstable load condition. In this test scenario, we designed the system load as the load fed by phase a is the 3/2 times the load fed by phase b and 2 times the load fed by phase c. Figure 10, Figure 11 and Figure 12 demonstrate that phase voltages distribution inside the building from the test scenario of an unstable building load situation respectively, for between 08:00-10:00 hours, 13:00-15:00 hours and 19:30-21:30 hours.
Considering the overshoot values and deformation in the sinusoidal voltage wave of phases a, b, and c, the PI-PD controller performed significantly better than PI and FOPI controllers, as no observed deformation and overshoot phase voltage values changed especially power demands of load change sharply. When FOPI and PI control structures were compared, it was observed that PI controls were not successful in controlling the system in case of unstable load. Significant disturbances were observed in the sinisodial wave in which we examined the phase voltages. On the other hand, in the FOPI controlled system, only sinusoidal wave of phase b showed minor deformation and overshoot value at the time 09:00, 14:00, 20:00 and 21:00 when the home power consumption sharply change. Hence, the efficiency of the BIPv/Wt system with fractional order controllers is better compared to in cteger order controllers under the unstable building load condition.
Another result of this case study is that when we connect different load values to the phases, the voltage values measured in the phases decompose. Phase voltage decreases as phase-dependent load value increases Va = 260 V, Vb = 315 V, Vc = 365 V. In threephase systems with equal load distribution, phase voltages are either close to or equal to each other. Voltage unbalance is a measurement of the inequality of the phase voltages and the phase voltages should be equal or very close to equal in a balanced threephase system. Voltage unbalance situation cause malfunction of the household appliances and shorten the life of the electrical appliances.  Table 3 (6.51%, 8.01%, 11.06%) that the PI control structure fails to control the voltage consumed in the building for the unstable load condition by contrast with in the system controlled by FOPI, it was observed that the THD value measured at the voltage in phase c only exceeded the limit determined by IEEE. For all that, the measured THD values shows the superity of PI-PD controller.
As a result, while the simulation study performed in this test scenario proves that PI-PD controller is the most preferred control structure for controlling the BIPv/Wt system, it has been observed that FOPI control structure gives more successful responses to changes occurring in the system or the loads connected to the system than PI control structure.

Conclusion
This study provides a voltage control system using PI-PD control operator in smart residential building systems integrated into hybrid renewable energy source (photovoltaic panels and wind turbines). Firstly, mathematical modeling of BIPv/Wt system was obtained and according to this mathematical model, PI-PD controller was designed by using frequency response analysis methods according to the 140 cut-off frequency and 60 ᶿ phase margin values. To measure the success of PI-PD controller, PI and FOPI controls were designed by the same method with the same cutoff frequency and margin values.
For comparison between three different control structure, THD level of output voltages and voltage quality consumed in the building were analyzed in Matlab/Simulink software platform for both stable and unstable building load conditions. The simulation results show that less oscillation (less THD), less overshoot and deformation at three phase voltages injected to the building is observed at PI-PD controlled BIPv/Wt systems. When FOPI and PI control structures are compared, it is seen from the simulation results that FOPI control structure is more successful in controlling voltage compared to PI control structure and it is more advantageous to use more flexible control structures such as FOPI in systems with highly variable variables such as BIPv/Wt systems. The problem we face is that as the load values of the three phases connected to the inverter system change, the voltage values measured in the phases change as well, and different control strategies need to be considered. In this regard, this study will be an important resource for future research on voltage and/or current control in the integration of smart homes, buildings, sites and workplaces with renewable energy systems.