# Intelligent Control Using Metaheuristic Optimization for Buck-Boost Converter

Authors: P. Chanjira; S. Tunyasrirut
Journal: Journal of Engineering
 (2020)

---

## Abstract

This research aims to introduce an intelligent controlling system of windmill-generated voltage connected to a load of12V. As natural wind speed lacks consistency, the resultant irregular voltage can lead to system damage. In the experiment, a buck-boost converter is not only designed to control such voltage but also tuned by intelligent methods. It is very challenging to control the system. PI controller is developed using metaheuristic optimization, an artificial fish-swarm algorithm (AFSA). In testing, the buck-boost converter is controlled by the PI controller at a reference voltage of 14V and supplied with an input voltage Vin in the range of 5–100V. The result shows that, even with inconstant Vin, the system can effectively control the reference voltage at 14V.


---

## Body

## 1. Introduction

Energy is quite essential for modern life: almost every human activity nowadays needs energy, most commonly in the forms of heat and electricity, with the main source currently being fossil fuel formed by burying biomass, e.g., natural gas and coal. Not only are these sources of energy limited and nonrenewable, but such energy production also causes pollution to the environment, including the atmosphere, i.e., the greenhouse effect [1]. Therefore, it is necessary to change the energy usage behavior and to seek alternative energy.One of the alternatives attracting attention is wind power, as the wind is clean, pollutionless, and ubiquitous. It is also continually available both day and night. Production of wind energy involves conversion of kinetic energy into electrical energy: the turbine turns the airflow’s kinetic energy into mechanical power and drives the permanent magnet synchronous generator (PMSG). The obtained alternating current later goes through a rectifier and becomes direct current. However, the natural wind speed is not constant, causing the electric pressure gained from PMSG to exhibit high variation, which leads to inconstant electrical supply and discontinuous operation [2]; the same has been stated in a previous study by Chandan and Chayapathy. Furthermore, in the event of low wind speed, it is insufficient to recharge batteries. For this reason, a buck-boost converter is introduced for maintaining voltage [3].In a precedent work, Mittal and Arora have simulated windmills in MATLAB/Simulink [4] using PMSG and employed a buck-boost converter to control the electric pressure through such circuits as a chopper and inverter. This conforms with Porselvi and Muthu’s designed wind energy conversion system with boost converter and CHBMLI with single DC input, which retains the voltage at the DC link suitable for the fluctuating wind pressure [5]. Moreover, another study by Kamalakkannan and Arunkumar utilizes a buck-boost converter in upholding the voltage output at the DC-DC link [6]. Both suggest the necessity of controlling the changing electric tension at the DC-DC link onto an appropriate level for the grid-connected system.In this study, a buck-boost converter is thus chosen as a switching device to adjust the unstable electric pressure at the DC-DC link to a reference voltage of the system [7], since the buck-boost converter possesses the function of increasing and decreasing electric pressure, which resembles the natural wind speed. Valenzuela and Alarcon proposed the control of a boost DC-DC power converter using the new controller under constrained input, which is the duty cycle, the physically admissible values. Moreover, the uncertain supply voltage and unmeasurable inductor current are used as an observer for the proposed control law [8]. Ortigoza et al. used a two-stage control design which performs the sensorless angular velocity trajectory tracking task for the buck power converter/DC motor system. Not only is a first-stage controller based on the differential flatness property of the DC-motor model, but also a second-stage controller is based on flatness property on the buck power converter model to provide the input voltage to the DC motor [9]. Licea et al. presented a reconfigurable topology which consists of a reconfigurable buck, boost, and buck-boost DC-DC converter. Furthermore, a robust controller is designed by polytopic representation, and a Lyapunov based switched stability analysis of the closed-loop system is presented. The experimental results show that the robust stability under arbitrarily fast parameter variations and reconfiguration changes [10].However, a proper standard value of PI controller was tuned by various approaches. One interesting approach is the optimization algorithm, a mathematical process to obtain an optimal value. A supporting study by Siano and Citro suggests using multiobjective particle swarm optimization to design a fuzzy-logic controller for buck-boost converters with inconstant change of voltage [11]. The result obtained the quantity or numeric value of the problems set, to be further used as the suitable standard value. Similarly, Jalilvand et al. apply advanced particle swarm optimization, a sampling evolutionary algorithm efficient in finding optimal solutions in adjustment of PID controller’s parameters [12]. This is in accordance with Tehrani et al., who propose a theory and an adaptation of the multipurpose strength Pareto evolutionary algorithm (SPEA). This controlling method dynamically responds to the required PID sorting coefficient [13]. In controlling PI controller, thus, a controller is required to control the standard PI. Furthermore, Liu and Hsu adopt the particle swarm optimization (PSO) technique for a static synchronous compensator (STATCOM) in finding a suitable standard value of intelligent PI controller [14]. Ultimately, Çınar and Akarslan design an intelligent battery charger controller for PV panels due to the its various capabilities [15]. Hence, a PI controller is operated to control the farming load system, the battery charger system, and the system which can supply to grid-connected system. Yau et al. apply two-stage system which implements maximum power point tracking and optimal charge control of Li-ion battery. They use PI to control charge controller parameters. In determining the optimum parameters, the intelligent algorithms, PSO, and genetic algorithms (GAs) are utilized. The optimal parameter results for the controller of PSO have better performance than GA [16].The purpose of this research is to design a buck-boost converter for controlling the reference electric pressure at14V and to develop a PI controller enhanced with metaheuristic optimization, artificial fish-swarm algorithm (AFSA), as an intelligent voltage controlling system of an 18A load for continual usage.


## 2. Materials and Methods

### 2.1. Theories

#### 2.1.1. Wind Energy

Wind is one of the clean and renewable natural sources. Wind formation results from solar radiation upon Earth. Receiving and absorbing unequal amounts of heat leads to difference in temperature and atmospheric pressure between geolocations. Air then lifts up in areas with high temperature or low atmospheric pressure and is replaced by the air from cooler areas or higher atmospheric pressures. This movement of air mass causes the wind and its motion’s kinetic energy is harvestable. The wind energy has been harnessed more and more, especially in producing electrical power. In Thailand, when compared to other countries, such advantages of wind energy have been little brought into use [17].Winds in Thailand are seasonal, following rather precise annual pattern of occurrence. To exemplify, monsoons, e.g., Southeast Asian monsoon, occur with unchanged direction and last for the entire season. As Asia covers a large area, the temperature and atmospheric pressure between the inland and coastal regions vastly differ, leading to distinct wind direction in each season.


#### 2.1.2. Buck-Boost Converter

The buck-boost converter is a type of circuit which transforms one electric pressure to another, either higher or lower, within the same circuit. Its function is based on the principle of cutting the input direct voltage into parts using a switching device, controlled by signals of the pulse width modulation (PWM) at a particular frequency. The control frequency which yields the buck-boost converter’s highest efficiency is reached when the time periodT is the lowest, at 100 times the switching rate, as shown in Figure 1 [18].Figure 1
Buck-boost converter circuit.The operation of a buck-boost converter can be divided into two modes, according to the condition of the power switch device:(1) Buck-Boost Converter Switch, Closed Circuit Mode. From Figure 2, the current flows from the electrical power source through the switch and the inductor L cause the inductor to store power in the form of magnetic field [19], explained by the following equation:(1)VL=VS=LdiLdt,diLdt=VSL=ΔiLΔt,where VS is the voltage drops across the supply and VL is the voltage drops across the inductor.Figure 2
Buck-boost converter switch, closed circuit.Hence,ΔiL/Δt is the rate of change of the current in closed switch, where ton=DTs and D is the duty cycle at ton:(2)ΔiLΔt=ΔiLDTS=VSL,such that(3)ΔiLclose=VSLDTS.(2) Buck-Boost Converter Switch, Open Circuit Mode. Figure 3 shows the operation mode after the closed circuit condition. When the circuit is closed, the energy accumulated in the inductor creates self-induction, reversing the direction of electric pressure across the inductor and transforming itself into an electrical supply. Nonetheless, the current still flows through the inductor in the same direction as in the closed circuit. The diode is forward-biased, as in the closed circuit condition [12, 13], as described by the following equation:(4)VL=VS=LdiLdt,diLdt=V0L=ΔiLΔt,where VS is voltage drops across the supply and VL is voltage drops across the inductor. V0 is an output of buck-boot converterFigure 3
Buck-boost converter switch, open circuit.Hence,ΔiL/Δt is the rate of change of the current in open switch where toff=1−DTS, and D is the duty cycle at toff.(5)ΔiLΔt=ΔiL1−DTs=V0L,(6)ΔiLopen=V0L1−DTS.Combining (3) and (6), a change rate of the current can be rewritten as(7)ΔiLclose+ΔiLopen=0,(8)VSLDTS+V0L1−DTS=0.Rearranging (8), Vo is denoted by(9)V0=−VSD1−D,D≠0.


#### 2.1.3. Designed Circuit of Buck-Boost Converter

The equivalent circuit design of the buck-boost converter is shown in Figure4.Figure 4
Designed circuit of buck-boost converter.Based on Figure4, the parameters designed for buck-boost converter are shown in Table 1.Table 1
Parameter setting for a buck-boost converter.
No.ParametersValues1Voltage inputVin5–100V2Output voltageVout14V3Duty cycle78%4Switching frequencyf4kHz5LoadR0.78Ω6InductanceL33.6mH7CapacitanceC110μfAccording to Figure4 the designed circuit of buck-boost converter can receive an input voltage Vin in the range 5–100 V with standard value Vout at 14V compatible with a load of 18A. The load resistance is calculated as 0.78Ω according to Ohm’s law. All these parameters are revised, while the voltage input to the buck-boost converter ranges from 0V to 100V as the input should be lower or higher than the reference pressure Vout=14V. The output response of the buck-boost converter uses an inductance of 33.6mH, a capacitance of 110μf, and PWM signals for driving IGBT constant switching frequency at 4kHz. The state vector for the buck-boost converter is defined as(10)xt=ILVC,where IL is the current through the inductor and VC is the voltage across the capacitor. For the given duty cycle of 78%, the system is represented by the following set of continuous time state spaces equations:(11)x˙t=Axt+BVSt,(12)yt=Cxt+DVSt,where x˙ is the state vector, VS is the source vector, and A,B,C,D are the state coefficient matrices. The state model of the buck-boost converter is provided by the two modes as follows:The closed circuit mode is defined as(13)x˙t=A1xt+B1VSt.The open circuit mode is written as(14)x˙t=A2xt+B2VSt,where(15)A1=000−1RC;A2=0−1L1C1RC;B1=1L0;B2=00.The state space model is of the following form:(16)x˙t=Ax+Bu,where(17)B=db1+1−dB2,B=db1+1−dB2,A=0d−1L1−dC−1RC,B=dL0.Thend,LandC are substituted as shown in(18)A=0−6.54762000−11655,(19)B=23.2140.Hence, the transfer function of the buck-boost converter is shown as(20)Gs=464280.001s2+11655s+1.31.From Figure5, the process gain is defined as(21)KS=OutputInput.Figure 5
Open loop response of buck-boost convertor.In substituting variables in (21), the equation yields KS=3.54. According to Figure 5, τ=0.89, KS is a process gain, and τ is a time constant.


#### 2.1.4. PI Control of First-Order Systems

Suppose that the process can be described by the following first-order model [20]:(22)Gps=KSτs+1.In substitution, the transfer function of the controller for buck-boost converter is rewritten as(23)Gps=3.540.89s+1.Figure6 illustrates the first-order model buck-boost converter design.Figure 6
Closed-loop control of the first-order system.The two parameters are presented, the process gainsKs and the time constant Tis. By controlling this with the PI controller [21] provided as(24)Gcs=Kp1+1Tis,a buck-boost converter design with PI controller is achieved.According to Figure7, a second-order closed-loop system is obtained as(25)Gγs=GcsGps1+GcsGps.Figure 7
Closed-loop control system with PI controller designed by pole placement method.The two closed-loop poles can be chosen arbitrarily for a suitable choice of the gainKp and the integral time Ti of the controller. The poles are given by the characteristic equation [13](26)1+GpsGcs=0.Suppose that the desired closed-loop poles are characterized by their relative dampingς and frequencyω; the desired characteristic equation then becomes (27)s2+2ζωs+ω2=0.Substitution yields(28)τTis2+KSKp+1Tis+KSKp=0.The coefficients of these two characteristic equations for determiningKp and Ti are written as(29)Kp=2ζωτ−1Ks,(30)Ti=2ζωτ−1ω2τ,where ζ=0.707; note that in order to have positive controller gains, it is necessary that the chosen bandwidth ω be larger than 1/2ξτ. If ω is very large, the integration time Ti is given by(31)Ti=2ζω,and ω is hereby calculated as(32)ω=12ξτ.From the design,ζ=0.707 and then ω=1/2×0.707×0.89 so that ω=0.795.In definingωn=5ωωn=5ω, (33)ωn=3.795.By substituting the parameters into (29) and (30), the calculation of KP and Ti is shown as(34)Kp=2×0.707×3.795×0.89−13.54,Ti=2×0.7073.795.Consequently,Kp=1.131 and Ti=0.356. By substitution into (25), (35)Gγs=3.54/0.89s+1Kp1+1/Tis1+3.54/0.89s+1Kp1+1/Tis,Gγs=KpTis+Kp3.54Tis0.89s+1+KpTis+Kp3.54,Gγs=3.54KpTis+3.54Kp0.89Tis2+Tis+3.54KpTis+3.54Kp.Hence, a buck-boost converter design with PI controller is defined as(36)Gγs=3.54KpTis+3.54Kp0.89Tis2+3.54Kp+1Tis+3.54Kp.The simulation of closed-loop control using PI controller designed by pole placement method via input step command 0–14 V is shown in Figure8.Figure 8
Simulation of closed-loop control using PI controller designed by pole placement method.


#### 2.1.5. Artificial Fish-Swarm Algorithm (AFSA)

AFSA, metaheuristic optimization, is a decision-making process which employs mathematical and logical reasoning in selecting steps reason principle for choosing method or operation until the last step of separating and ordering the operation processes to increase the efficiency of finding and solving problems. Formulation of AFSA is inspired by the behavior of a school of fish, imitating their survival and feeding in nature. The characteristics can be categorized by behavior for finding solutions as follows: [22].(1)
Random behavior: in order to find companion and food, a fish swims randomly in the water(2)
Chasing behavior: if food is discovered by a fish, the others in the neighbourhood go quickly after it(3)
Swarming behavior: in order to guarantee survival of the swarm and avoid dangers from predators, fish move together in schools(4)
Searching behavior: fish go directly and quickly to a region, when more food is discovered, by instinct or vision(5)
Leaping behavior: fish leap to look for food in other regions, when they stagnate in a regionThe binary version of AFSA can be given as Figure9.Figure 9
The binary version of the AFSA search algorithm.Table2 shows the parameters set for AFSA in tuning the PI controller.Table 2
the parameters set for AFSA in tuning the PI controller [23].
Parameters of AFSAValueNumber of vehicles30–50Time of trying1000Visual area5Factor of crowding degree0.618One step1.5Maximum number of iterations5000Table3 show the gains Kp and Ti in AFSA for the intelligent tuning method for PI controller. From Table 3, the gains Kp and Ki are found optimal, using AFSA, at Kp=1.37 and Ti=0.812 with the minimum cost function of 0.1949. Thus, the aforementioned values are chosen. The simulation of closed-loop control using PI controller tuned by AFSA via input step command 0–14 V is shown in Figure 10.Table 3
Parameter setting of AFSA.
No.AFSA, 30 vehiclesAFSA, 40 vehiclesAFSA, 50 vehiclesKpTiCost functionKpTiCost functionKpTiCost function11.240.4950.5541.340.5030.53871.450.4950.561921.260.5230.49261.340.4880.57531.380.5730.403431.230.5060.52741.360.4310.76081.390.6400.317841.270.4070.85971.310.5390.46041.460.5050.536151.270.4800.59431.340.5270.48461.40.5340.471461.30.3611.11941.360.4560.70501.440.4500.693171.270.4920.56441.360.4650.64211.310.6150.346581.240.4820.58881.370.4510.68721.40.5700.408391.280.4870.57571.320.5620.42041.380.5480.4458101.270.4520.67911.350.4470.70041.430.4830.5918111.270.5050.53181.350.4600.65621.370.5990.3672121.270.4750.60701.340.5440.45291.40.5730.4041131.240.5050.53151.330.5120.51591.40.5600.4248141.230.4980.54761.350.5240.49121.450.5310.4796151.280.4500.68651.350.4950.55781.370.8120.1949161.270.4650.63921.350.4910.56731.430.4680.5823171.280.4210.79581.340.4870.57771.430.4660.6404181.270.4490.68951.370.4570.66821.390.5710.4075191.250.230.49131.340.5550.43231.430.4910.5711201.280.5020.53851.320.5920.37661.430.4910.5711211.240.5310.47661.360.5440.45251.390.5690.4106221.270.4170.81201.380.5380.46481.390.5380.4637231.290.4030.87671.340.4880.57581.410.5350.4705241.250.4930.55941.340.5250.49021.400.5750.4008251.260.5260.48591.360.4090.85021.400.5130.5162261.280.4090.84681.340.4850.58261.420.5070.5314271.270.4550.66801.350.4970.55221.420.5490.4442281.250.5290.48011.340.4660.63831.390.5320.4700291.260.4140.82601.360.4400.72471.350.5960.3708301.250.5360.46651.340.5220.49621.430.5220.4980Figure 10
Simulation of closed-loop control using PI controller tuned by AFSA.Figure11 shows the comparison of the closed-loop control, with the output voltage via input step command 0–14 V, using PI controller designed by pole placement method and tuning by AFSA.Figure 11
Comparison of the closed-loop control using PI controller designed by pole placement method and tuning by AFSA.


## 2.1. Theories

### 2.1.1. Wind Energy

Wind is one of the clean and renewable natural sources. Wind formation results from solar radiation upon Earth. Receiving and absorbing unequal amounts of heat leads to difference in temperature and atmospheric pressure between geolocations. Air then lifts up in areas with high temperature or low atmospheric pressure and is replaced by the air from cooler areas or higher atmospheric pressures. This movement of air mass causes the wind and its motion’s kinetic energy is harvestable. The wind energy has been harnessed more and more, especially in producing electrical power. In Thailand, when compared to other countries, such advantages of wind energy have been little brought into use [17].Winds in Thailand are seasonal, following rather precise annual pattern of occurrence. To exemplify, monsoons, e.g., Southeast Asian monsoon, occur with unchanged direction and last for the entire season. As Asia covers a large area, the temperature and atmospheric pressure between the inland and coastal regions vastly differ, leading to distinct wind direction in each season.


### 2.1.2. Buck-Boost Converter

The buck-boost converter is a type of circuit which transforms one electric pressure to another, either higher or lower, within the same circuit. Its function is based on the principle of cutting the input direct voltage into parts using a switching device, controlled by signals of the pulse width modulation (PWM) at a particular frequency. The control frequency which yields the buck-boost converter’s highest efficiency is reached when the time periodT is the lowest, at 100 times the switching rate, as shown in Figure 1 [18].Figure 1
Buck-boost converter circuit.The operation of a buck-boost converter can be divided into two modes, according to the condition of the power switch device:(1) Buck-Boost Converter Switch, Closed Circuit Mode. From Figure 2, the current flows from the electrical power source through the switch and the inductor L cause the inductor to store power in the form of magnetic field [19], explained by the following equation:(1)VL=VS=LdiLdt,diLdt=VSL=ΔiLΔt,where VS is the voltage drops across the supply and VL is the voltage drops across the inductor.Figure 2
Buck-boost converter switch, closed circuit.Hence,ΔiL/Δt is the rate of change of the current in closed switch, where ton=DTs and D is the duty cycle at ton:(2)ΔiLΔt=ΔiLDTS=VSL,such that(3)ΔiLclose=VSLDTS.(2) Buck-Boost Converter Switch, Open Circuit Mode. Figure 3 shows the operation mode after the closed circuit condition. When the circuit is closed, the energy accumulated in the inductor creates self-induction, reversing the direction of electric pressure across the inductor and transforming itself into an electrical supply. Nonetheless, the current still flows through the inductor in the same direction as in the closed circuit. The diode is forward-biased, as in the closed circuit condition [12, 13], as described by the following equation:(4)VL=VS=LdiLdt,diLdt=V0L=ΔiLΔt,where VS is voltage drops across the supply and VL is voltage drops across the inductor. V0 is an output of buck-boot converterFigure 3
Buck-boost converter switch, open circuit.Hence,ΔiL/Δt is the rate of change of the current in open switch where toff=1−DTS, and D is the duty cycle at toff.(5)ΔiLΔt=ΔiL1−DTs=V0L,(6)ΔiLopen=V0L1−DTS.Combining (3) and (6), a change rate of the current can be rewritten as(7)ΔiLclose+ΔiLopen=0,(8)VSLDTS+V0L1−DTS=0.Rearranging (8), Vo is denoted by(9)V0=−VSD1−D,D≠0.


### 2.1.3. Designed Circuit of Buck-Boost Converter

The equivalent circuit design of the buck-boost converter is shown in Figure4.Figure 4
Designed circuit of buck-boost converter.Based on Figure4, the parameters designed for buck-boost converter are shown in Table 1.Table 1
Parameter setting for a buck-boost converter.
No.ParametersValues1Voltage inputVin5–100V2Output voltageVout14V3Duty cycle78%4Switching frequencyf4kHz5LoadR0.78Ω6InductanceL33.6mH7CapacitanceC110μfAccording to Figure4 the designed circuit of buck-boost converter can receive an input voltage Vin in the range 5–100 V with standard value Vout at 14V compatible with a load of 18A. The load resistance is calculated as 0.78Ω according to Ohm’s law. All these parameters are revised, while the voltage input to the buck-boost converter ranges from 0V to 100V as the input should be lower or higher than the reference pressure Vout=14V. The output response of the buck-boost converter uses an inductance of 33.6mH, a capacitance of 110μf, and PWM signals for driving IGBT constant switching frequency at 4kHz. The state vector for the buck-boost converter is defined as(10)xt=ILVC,where IL is the current through the inductor and VC is the voltage across the capacitor. For the given duty cycle of 78%, the system is represented by the following set of continuous time state spaces equations:(11)x˙t=Axt+BVSt,(12)yt=Cxt+DVSt,where x˙ is the state vector, VS is the source vector, and A,B,C,D are the state coefficient matrices. The state model of the buck-boost converter is provided by the two modes as follows:The closed circuit mode is defined as(13)x˙t=A1xt+B1VSt.The open circuit mode is written as(14)x˙t=A2xt+B2VSt,where(15)A1=000−1RC;A2=0−1L1C1RC;B1=1L0;B2=00.The state space model is of the following form:(16)x˙t=Ax+Bu,where(17)B=db1+1−dB2,B=db1+1−dB2,A=0d−1L1−dC−1RC,B=dL0.Thend,LandC are substituted as shown in(18)A=0−6.54762000−11655,(19)B=23.2140.Hence, the transfer function of the buck-boost converter is shown as(20)Gs=464280.001s2+11655s+1.31.From Figure5, the process gain is defined as(21)KS=OutputInput.Figure 5
Open loop response of buck-boost convertor.In substituting variables in (21), the equation yields KS=3.54. According to Figure 5, τ=0.89, KS is a process gain, and τ is a time constant.


### 2.1.4. PI Control of First-Order Systems

Suppose that the process can be described by the following first-order model [20]:(22)Gps=KSτs+1.In substitution, the transfer function of the controller for buck-boost converter is rewritten as(23)Gps=3.540.89s+1.Figure6 illustrates the first-order model buck-boost converter design.Figure 6
Closed-loop control of the first-order system.The two parameters are presented, the process gainsKs and the time constant Tis. By controlling this with the PI controller [21] provided as(24)Gcs=Kp1+1Tis,a buck-boost converter design with PI controller is achieved.According to Figure7, a second-order closed-loop system is obtained as(25)Gγs=GcsGps1+GcsGps.Figure 7
Closed-loop control system with PI controller designed by pole placement method.The two closed-loop poles can be chosen arbitrarily for a suitable choice of the gainKp and the integral time Ti of the controller. The poles are given by the characteristic equation [13](26)1+GpsGcs=0.Suppose that the desired closed-loop poles are characterized by their relative dampingς and frequencyω; the desired characteristic equation then becomes (27)s2+2ζωs+ω2=0.Substitution yields(28)τTis2+KSKp+1Tis+KSKp=0.The coefficients of these two characteristic equations for determiningKp and Ti are written as(29)Kp=2ζωτ−1Ks,(30)Ti=2ζωτ−1ω2τ,where ζ=0.707; note that in order to have positive controller gains, it is necessary that the chosen bandwidth ω be larger than 1/2ξτ. If ω is very large, the integration time Ti is given by(31)Ti=2ζω,and ω is hereby calculated as(32)ω=12ξτ.From the design,ζ=0.707 and then ω=1/2×0.707×0.89 so that ω=0.795.In definingωn=5ωωn=5ω, (33)ωn=3.795.By substituting the parameters into (29) and (30), the calculation of KP and Ti is shown as(34)Kp=2×0.707×3.795×0.89−13.54,Ti=2×0.7073.795.Consequently,Kp=1.131 and Ti=0.356. By substitution into (25), (35)Gγs=3.54/0.89s+1Kp1+1/Tis1+3.54/0.89s+1Kp1+1/Tis,Gγs=KpTis+Kp3.54Tis0.89s+1+KpTis+Kp3.54,Gγs=3.54KpTis+3.54Kp0.89Tis2+Tis+3.54KpTis+3.54Kp.Hence, a buck-boost converter design with PI controller is defined as(36)Gγs=3.54KpTis+3.54Kp0.89Tis2+3.54Kp+1Tis+3.54Kp.The simulation of closed-loop control using PI controller designed by pole placement method via input step command 0–14 V is shown in Figure8.Figure 8
Simulation of closed-loop control using PI controller designed by pole placement method.


### 2.1.5. Artificial Fish-Swarm Algorithm (AFSA)

AFSA, metaheuristic optimization, is a decision-making process which employs mathematical and logical reasoning in selecting steps reason principle for choosing method or operation until the last step of separating and ordering the operation processes to increase the efficiency of finding and solving problems. Formulation of AFSA is inspired by the behavior of a school of fish, imitating their survival and feeding in nature. The characteristics can be categorized by behavior for finding solutions as follows: [22].(1)
Random behavior: in order to find companion and food, a fish swims randomly in the water(2)
Chasing behavior: if food is discovered by a fish, the others in the neighbourhood go quickly after it(3)
Swarming behavior: in order to guarantee survival of the swarm and avoid dangers from predators, fish move together in schools(4)
Searching behavior: fish go directly and quickly to a region, when more food is discovered, by instinct or vision(5)
Leaping behavior: fish leap to look for food in other regions, when they stagnate in a regionThe binary version of AFSA can be given as Figure9.Figure 9
The binary version of the AFSA search algorithm.Table2 shows the parameters set for AFSA in tuning the PI controller.Table 2
the parameters set for AFSA in tuning the PI controller [23].
Parameters of AFSAValueNumber of vehicles30–50Time of trying1000Visual area5Factor of crowding degree0.618One step1.5Maximum number of iterations5000Table3 show the gains Kp and Ti in AFSA for the intelligent tuning method for PI controller. From Table 3, the gains Kp and Ki are found optimal, using AFSA, at Kp=1.37 and Ti=0.812 with the minimum cost function of 0.1949. Thus, the aforementioned values are chosen. The simulation of closed-loop control using PI controller tuned by AFSA via input step command 0–14 V is shown in Figure 10.Table 3
Parameter setting of AFSA.
No.AFSA, 30 vehiclesAFSA, 40 vehiclesAFSA, 50 vehiclesKpTiCost functionKpTiCost functionKpTiCost function11.240.4950.5541.340.5030.53871.450.4950.561921.260.5230.49261.340.4880.57531.380.5730.403431.230.5060.52741.360.4310.76081.390.6400.317841.270.4070.85971.310.5390.46041.460.5050.536151.270.4800.59431.340.5270.48461.40.5340.471461.30.3611.11941.360.4560.70501.440.4500.693171.270.4920.56441.360.4650.64211.310.6150.346581.240.4820.58881.370.4510.68721.40.5700.408391.280.4870.57571.320.5620.42041.380.5480.4458101.270.4520.67911.350.4470.70041.430.4830.5918111.270.5050.53181.350.4600.65621.370.5990.3672121.270.4750.60701.340.5440.45291.40.5730.4041131.240.5050.53151.330.5120.51591.40.5600.4248141.230.4980.54761.350.5240.49121.450.5310.4796151.280.4500.68651.350.4950.55781.370.8120.1949161.270.4650.63921.350.4910.56731.430.4680.5823171.280.4210.79581.340.4870.57771.430.4660.6404181.270.4490.68951.370.4570.66821.390.5710.4075191.250.230.49131.340.5550.43231.430.4910.5711201.280.5020.53851.320.5920.37661.430.4910.5711211.240.5310.47661.360.5440.45251.390.5690.4106221.270.4170.81201.380.5380.46481.390.5380.4637231.290.4030.87671.340.4880.57581.410.5350.4705241.250.4930.55941.340.5250.49021.400.5750.4008251.260.5260.48591.360.4090.85021.400.5130.5162261.280.4090.84681.340.4850.58261.420.5070.5314271.270.4550.66801.350.4970.55221.420.5490.4442281.250.5290.48011.340.4660.63831.390.5320.4700291.260.4140.82601.360.4400.72471.350.5960.3708301.250.5360.46651.340.5220.49621.430.5220.4980Figure 10
Simulation of closed-loop control using PI controller tuned by AFSA.Figure11 shows the comparison of the closed-loop control, with the output voltage via input step command 0–14 V, using PI controller designed by pole placement method and tuning by AFSA.Figure 11
Comparison of the closed-loop control using PI controller designed by pole placement method and tuning by AFSA.


## 2.1.1. Wind Energy

Wind is one of the clean and renewable natural sources. Wind formation results from solar radiation upon Earth. Receiving and absorbing unequal amounts of heat leads to difference in temperature and atmospheric pressure between geolocations. Air then lifts up in areas with high temperature or low atmospheric pressure and is replaced by the air from cooler areas or higher atmospheric pressures. This movement of air mass causes the wind and its motion’s kinetic energy is harvestable. The wind energy has been harnessed more and more, especially in producing electrical power. In Thailand, when compared to other countries, such advantages of wind energy have been little brought into use [17].Winds in Thailand are seasonal, following rather precise annual pattern of occurrence. To exemplify, monsoons, e.g., Southeast Asian monsoon, occur with unchanged direction and last for the entire season. As Asia covers a large area, the temperature and atmospheric pressure between the inland and coastal regions vastly differ, leading to distinct wind direction in each season.


## 2.1.2. Buck-Boost Converter

The buck-boost converter is a type of circuit which transforms one electric pressure to another, either higher or lower, within the same circuit. Its function is based on the principle of cutting the input direct voltage into parts using a switching device, controlled by signals of the pulse width modulation (PWM) at a particular frequency. The control frequency which yields the buck-boost converter’s highest efficiency is reached when the time periodT is the lowest, at 100 times the switching rate, as shown in Figure 1 [18].Figure 1
Buck-boost converter circuit.The operation of a buck-boost converter can be divided into two modes, according to the condition of the power switch device:(1) Buck-Boost Converter Switch, Closed Circuit Mode. From Figure 2, the current flows from the electrical power source through the switch and the inductor L cause the inductor to store power in the form of magnetic field [19], explained by the following equation:(1)VL=VS=LdiLdt,diLdt=VSL=ΔiLΔt,where VS is the voltage drops across the supply and VL is the voltage drops across the inductor.Figure 2
Buck-boost converter switch, closed circuit.Hence,ΔiL/Δt is the rate of change of the current in closed switch, where ton=DTs and D is the duty cycle at ton:(2)ΔiLΔt=ΔiLDTS=VSL,such that(3)ΔiLclose=VSLDTS.(2) Buck-Boost Converter Switch, Open Circuit Mode. Figure 3 shows the operation mode after the closed circuit condition. When the circuit is closed, the energy accumulated in the inductor creates self-induction, reversing the direction of electric pressure across the inductor and transforming itself into an electrical supply. Nonetheless, the current still flows through the inductor in the same direction as in the closed circuit. The diode is forward-biased, as in the closed circuit condition [12, 13], as described by the following equation:(4)VL=VS=LdiLdt,diLdt=V0L=ΔiLΔt,where VS is voltage drops across the supply and VL is voltage drops across the inductor. V0 is an output of buck-boot converterFigure 3
Buck-boost converter switch, open circuit.Hence,ΔiL/Δt is the rate of change of the current in open switch where toff=1−DTS, and D is the duty cycle at toff.(5)ΔiLΔt=ΔiL1−DTs=V0L,(6)ΔiLopen=V0L1−DTS.Combining (3) and (6), a change rate of the current can be rewritten as(7)ΔiLclose+ΔiLopen=0,(8)VSLDTS+V0L1−DTS=0.Rearranging (8), Vo is denoted by(9)V0=−VSD1−D,D≠0.


## 2.1.3. Designed Circuit of Buck-Boost Converter

The equivalent circuit design of the buck-boost converter is shown in Figure4.Figure 4
Designed circuit of buck-boost converter.Based on Figure4, the parameters designed for buck-boost converter are shown in Table 1.Table 1
Parameter setting for a buck-boost converter.
No.ParametersValues1Voltage inputVin5–100V2Output voltageVout14V3Duty cycle78%4Switching frequencyf4kHz5LoadR0.78Ω6InductanceL33.6mH7CapacitanceC110μfAccording to Figure4 the designed circuit of buck-boost converter can receive an input voltage Vin in the range 5–100 V with standard value Vout at 14V compatible with a load of 18A. The load resistance is calculated as 0.78Ω according to Ohm’s law. All these parameters are revised, while the voltage input to the buck-boost converter ranges from 0V to 100V as the input should be lower or higher than the reference pressure Vout=14V. The output response of the buck-boost converter uses an inductance of 33.6mH, a capacitance of 110μf, and PWM signals for driving IGBT constant switching frequency at 4kHz. The state vector for the buck-boost converter is defined as(10)xt=ILVC,where IL is the current through the inductor and VC is the voltage across the capacitor. For the given duty cycle of 78%, the system is represented by the following set of continuous time state spaces equations:(11)x˙t=Axt+BVSt,(12)yt=Cxt+DVSt,where x˙ is the state vector, VS is the source vector, and A,B,C,D are the state coefficient matrices. The state model of the buck-boost converter is provided by the two modes as follows:The closed circuit mode is defined as(13)x˙t=A1xt+B1VSt.The open circuit mode is written as(14)x˙t=A2xt+B2VSt,where(15)A1=000−1RC;A2=0−1L1C1RC;B1=1L0;B2=00.The state space model is of the following form:(16)x˙t=Ax+Bu,where(17)B=db1+1−dB2,B=db1+1−dB2,A=0d−1L1−dC−1RC,B=dL0.Thend,LandC are substituted as shown in(18)A=0−6.54762000−11655,(19)B=23.2140.Hence, the transfer function of the buck-boost converter is shown as(20)Gs=464280.001s2+11655s+1.31.From Figure5, the process gain is defined as(21)KS=OutputInput.Figure 5
Open loop response of buck-boost convertor.In substituting variables in (21), the equation yields KS=3.54. According to Figure 5, τ=0.89, KS is a process gain, and τ is a time constant.


## 2.1.4. PI Control of First-Order Systems

Suppose that the process can be described by the following first-order model [20]:(22)Gps=KSτs+1.In substitution, the transfer function of the controller for buck-boost converter is rewritten as(23)Gps=3.540.89s+1.Figure6 illustrates the first-order model buck-boost converter design.Figure 6
Closed-loop control of the first-order system.The two parameters are presented, the process gainsKs and the time constant Tis. By controlling this with the PI controller [21] provided as(24)Gcs=Kp1+1Tis,a buck-boost converter design with PI controller is achieved.According to Figure7, a second-order closed-loop system is obtained as(25)Gγs=GcsGps1+GcsGps.Figure 7
Closed-loop control system with PI controller designed by pole placement method.The two closed-loop poles can be chosen arbitrarily for a suitable choice of the gainKp and the integral time Ti of the controller. The poles are given by the characteristic equation [13](26)1+GpsGcs=0.Suppose that the desired closed-loop poles are characterized by their relative dampingς and frequencyω; the desired characteristic equation then becomes (27)s2+2ζωs+ω2=0.Substitution yields(28)τTis2+KSKp+1Tis+KSKp=0.The coefficients of these two characteristic equations for determiningKp and Ti are written as(29)Kp=2ζωτ−1Ks,(30)Ti=2ζωτ−1ω2τ,where ζ=0.707; note that in order to have positive controller gains, it is necessary that the chosen bandwidth ω be larger than 1/2ξτ. If ω is very large, the integration time Ti is given by(31)Ti=2ζω,and ω is hereby calculated as(32)ω=12ξτ.From the design,ζ=0.707 and then ω=1/2×0.707×0.89 so that ω=0.795.In definingωn=5ωωn=5ω, (33)ωn=3.795.By substituting the parameters into (29) and (30), the calculation of KP and Ti is shown as(34)Kp=2×0.707×3.795×0.89−13.54,Ti=2×0.7073.795.Consequently,Kp=1.131 and Ti=0.356. By substitution into (25), (35)Gγs=3.54/0.89s+1Kp1+1/Tis1+3.54/0.89s+1Kp1+1/Tis,Gγs=KpTis+Kp3.54Tis0.89s+1+KpTis+Kp3.54,Gγs=3.54KpTis+3.54Kp0.89Tis2+Tis+3.54KpTis+3.54Kp.Hence, a buck-boost converter design with PI controller is defined as(36)Gγs=3.54KpTis+3.54Kp0.89Tis2+3.54Kp+1Tis+3.54Kp.The simulation of closed-loop control using PI controller designed by pole placement method via input step command 0–14 V is shown in Figure8.Figure 8
Simulation of closed-loop control using PI controller designed by pole placement method.


## 2.1.5. Artificial Fish-Swarm Algorithm (AFSA)

AFSA, metaheuristic optimization, is a decision-making process which employs mathematical and logical reasoning in selecting steps reason principle for choosing method or operation until the last step of separating and ordering the operation processes to increase the efficiency of finding and solving problems. Formulation of AFSA is inspired by the behavior of a school of fish, imitating their survival and feeding in nature. The characteristics can be categorized by behavior for finding solutions as follows: [22].(1)
Random behavior: in order to find companion and food, a fish swims randomly in the water(2)
Chasing behavior: if food is discovered by a fish, the others in the neighbourhood go quickly after it(3)
Swarming behavior: in order to guarantee survival of the swarm and avoid dangers from predators, fish move together in schools(4)
Searching behavior: fish go directly and quickly to a region, when more food is discovered, by instinct or vision(5)
Leaping behavior: fish leap to look for food in other regions, when they stagnate in a regionThe binary version of AFSA can be given as Figure9.Figure 9
The binary version of the AFSA search algorithm.Table2 shows the parameters set for AFSA in tuning the PI controller.Table 2
the parameters set for AFSA in tuning the PI controller [23].
Parameters of AFSAValueNumber of vehicles30–50Time of trying1000Visual area5Factor of crowding degree0.618One step1.5Maximum number of iterations5000Table3 show the gains Kp and Ti in AFSA for the intelligent tuning method for PI controller. From Table 3, the gains Kp and Ki are found optimal, using AFSA, at Kp=1.37 and Ti=0.812 with the minimum cost function of 0.1949. Thus, the aforementioned values are chosen. The simulation of closed-loop control using PI controller tuned by AFSA via input step command 0–14 V is shown in Figure 10.Table 3
Parameter setting of AFSA.
No.AFSA, 30 vehiclesAFSA, 40 vehiclesAFSA, 50 vehiclesKpTiCost functionKpTiCost functionKpTiCost function11.240.4950.5541.340.5030.53871.450.4950.561921.260.5230.49261.340.4880.57531.380.5730.403431.230.5060.52741.360.4310.76081.390.6400.317841.270.4070.85971.310.5390.46041.460.5050.536151.270.4800.59431.340.5270.48461.40.5340.471461.30.3611.11941.360.4560.70501.440.4500.693171.270.4920.56441.360.4650.64211.310.6150.346581.240.4820.58881.370.4510.68721.40.5700.408391.280.4870.57571.320.5620.42041.380.5480.4458101.270.4520.67911.350.4470.70041.430.4830.5918111.270.5050.53181.350.4600.65621.370.5990.3672121.270.4750.60701.340.5440.45291.40.5730.4041131.240.5050.53151.330.5120.51591.40.5600.4248141.230.4980.54761.350.5240.49121.450.5310.4796151.280.4500.68651.350.4950.55781.370.8120.1949161.270.4650.63921.350.4910.56731.430.4680.5823171.280.4210.79581.340.4870.57771.430.4660.6404181.270.4490.68951.370.4570.66821.390.5710.4075191.250.230.49131.340.5550.43231.430.4910.5711201.280.5020.53851.320.5920.37661.430.4910.5711211.240.5310.47661.360.5440.45251.390.5690.4106221.270.4170.81201.380.5380.46481.390.5380.4637231.290.4030.87671.340.4880.57581.410.5350.4705241.250.4930.55941.340.5250.49021.400.5750.4008251.260.5260.48591.360.4090.85021.400.5130.5162261.280.4090.84681.340.4850.58261.420.5070.5314271.270.4550.66801.350.4970.55221.420.5490.4442281.250.5290.48011.340.4660.63831.390.5320.4700291.260.4140.82601.360.4400.72471.350.5960.3708301.250.5360.46651.340.5220.49621.430.5220.4980Figure 10
Simulation of closed-loop control using PI controller tuned by AFSA.Figure11 shows the comparison of the closed-loop control, with the output voltage via input step command 0–14 V, using PI controller designed by pole placement method and tuning by AFSA.Figure 11
Comparison of the closed-loop control using PI controller designed by pole placement method and tuning by AFSA.


## 3. Results and Discussion

### 3.1. Proposed System

Figure12 shows the block diagram of an intelligent voltage control system with embedded buck-boost converter controller with input from the wind turbine and standard value at 14V. This is under the following conditions: in case that V≥5, supply control circuit on buck-boost converter; if V<5, supply control circuit on battery; when V≥30, farming system on buck-boost converter; in case that V<30, farming system on battery; if V>4, battery charger on buck-boost converter; and when V>60, grid-connected system on buck-boost converter.Figure 12
Block diagram of the intelligent controller voltage system.Figure13 portrays an electricity generating system powered by a wind turbine. The kinetic energy obtained from the wind flowing through the blades of windmill transforms into mechanical energy driving the shaft connected to the PMSG. The obtained alternating voltage is then rectified. Nonetheless, the voltage input to PMSG depends significantly on the fluctuating wind speed. A buck-boost converter, therefore, is used as a control device to ensure a suitable and constant voltage via a PI controller. Furthermore, suitable values of gains Kp and Ti are achievable via metaheuristic optimization using AFSA, taking into consideration the output voltage from the buck-boost converter Vout and the reference voltage Vref. Vref is used in setting Vout via an embedded system using Arduino Mega board.Figure 13
PI Control buck-boost converter based on wind turbine system.Arduino Mega is a microcontroller board with ATmega2560 chip, which has 54 digital input/output pins. These include 15 pins used as PWM, 16 pins as analogy inputs, and 4 sets of the UART. The board’s crystal frequency is16MHz. Arduino Mega also enables direct data transfer with computers via the board’s USB port. Its design is compatible with various types of shield. This facilitates and fully supports program development on the Arduino platform. The load conditions are coded as shown in Figure 14.Figure 14
Pseudocode of the load conditions.


### 3.2. Simulation and Experimental Results

In Figure15, the experimental result is compared with the simulation result of the closed-loop control, with the output voltage via input step command 0–14 V, using PI controller designed by pole placement method and tuning by AFSA.Figure 15
Comparison of the experimental and simulation results of the output voltages.According to Figure15, the experimental result of the output voltage is tested. In the simulation, the output voltage of proposed system, both tuned gains the PI controller by AFSA and the PI controller using pole placement method, are compared.Figure16 shows the experimental setup of the intelligent voltage control system with Arduino Mega board connected to a buck-boost converter using a PI controller adjusted by AFSA at objective output voltage of 14V using PI controller designed by pole placement method and tuning by AFSA. It can control operations of a supply control circuit system, farming load system, battery charger system, and grid-connected system.Figure 16
Experimental setup of intelligent control of the PI controller based on a buck-boost converter.In the experiment where the reference output voltage value is set to14V, the input supply voltage Vin inconstantly varies from 5 to 100 V, with no load present; the results for closed-loop control using PI controller designed by pole placement method are shown in the following figures.Figure17 shows the results of the voltage control system using a buck-boost converter tuning gains of PI controller by pole placement method of closed-loop system at reference voltage of 14V with no load, supplying input voltage Vin of 5–100 V. In Figure 17(a), the input supply voltage Vin starts from 5V to 100V. Even under step input of Vin changing rapidly, the output response is overshooting with no steady state error. In Figure 17(b), when Vin is constant, Vout is close to the voltage reference at 14 V. Moreover, the experiment testing of input voltage increased from 5V to 100V and decreased from 100V to 5V, and the output response is close to the voltage reference if the input voltage is constant.Figure 17
The output voltage response at no load. (a) The input supply voltage stair change varying from 5 to 100V. (b) The input supply voltage varying from 5 to 100 V
(a)(b)Next, in the experiment where the reference output voltage value is set to14V, the input supply voltage Vin inconstantly varies from 5 to 100 V, with no load present; closed-loop control by PI controller tuned by metaheuristic optimization using artificial fish-swarm algorithm (AFSA) is shown in the following figures.Figure18 shows the results of the intelligent voltage controlling system via a buck-boost converter by a PI controller tuned by metaheuristic optimization using artificial fish-swarm algorithm (AFSA) at reference voltage of 14V with no load, supplying input voltage Vin of 5–100 V. In Figure 18(a), the input supply voltage Vin starts at 5V and gradually increases to 100 V. It is observed that the output voltage Vout remains constant at the reference voltage Vref, 14V, throughout. Moreover, another test is implemented on the intelligent voltage control system when the input supply voltage Vin is not constant. Tuning is performed to create continuity. Vin is made equal to 5 V, rising to 100 V, and reduced back to 5 V. The intelligent electrical control system can effectively maintain the voltage Vout at a constant value of 14Vas shown in Figure 18(b).Figure 18
The output voltage response at no load. (a) The input supply voltage stair change varying from 5 to 100V. (b) The input supply voltage varying from 5 to 100 V.
(a)(b)According to Figures17 and 18, showing the output voltage of the experimental result of proposed system, with both tuned gains of the PI controller by a pole placement method and PI controller by AFSA, the results show that the simulation corresponds with the experiment result. In experiment result in a real plant, the comparison results revealed that the response of the output voltage with tuned gains by AFSA of PI controller is more approachable to the reference voltage at 14V.Figure19 shows the experimental results of the intelligent voltage control system when on load. An experiment on the intelligent voltage control system via a buck-boost converter using a PI controller tuned by AFSA at a reference voltage of 14V when on load is done. The test is performed with a supply load to the control circuit of 1 A, a farming load system of 10A, a battery charger system of 12Vat a current of 5A, and a grid-connected system of 5A, under the following conditions: in case that Vin≥5V, supply control circuit on buck-boost converter; if Vin<5V, supply control circuit on battery; when Vin≥30V, farming system on buck-boost converter; in case that Vin<30V, farming system on battery; if Vin>40V, battery charger on buck-boost converter; and when Vin>60V, grid-connected system on buck-boost converter.Figure 19
The output voltage response at load. (a) The input supply voltage stair change varying from 5 to 100V. (b) The input supply voltage varying from 5 to 100 V.
(a)(b)The experimental result is shown in Figure19(a). When the supplied input voltage Vin stair changes at 5Vand increases to 100V, it is found that the intelligent electrical control system is able to maintain the reference voltage at 14Vin any condition. IBattery is activated to the charging current of 5A when Vin>45V, and IGrid rises to 2A if Vin>60V. When the circuit is at full load, the total current (ITotal) measures approximately 18A. On the other hand, IControl Circuit and IFarming Load remain constant as per the condition set. Figure 19(b) shows experimental results of the intelligent voltage control system where the input voltage Vin is not constant. Continuity is acquired by adjusting Vin to 5V increasing to 100V and decreasing to 5V. The intelligent voltage control system can efficiently maintain the output voltage Vout at a constant value at the reference voltage of 14V as shown in Figure 17(b).


## 3.1. Proposed System

Figure12 shows the block diagram of an intelligent voltage control system with embedded buck-boost converter controller with input from the wind turbine and standard value at 14V. This is under the following conditions: in case that V≥5, supply control circuit on buck-boost converter; if V<5, supply control circuit on battery; when V≥30, farming system on buck-boost converter; in case that V<30, farming system on battery; if V>4, battery charger on buck-boost converter; and when V>60, grid-connected system on buck-boost converter.Figure 12
Block diagram of the intelligent controller voltage system.Figure13 portrays an electricity generating system powered by a wind turbine. The kinetic energy obtained from the wind flowing through the blades of windmill transforms into mechanical energy driving the shaft connected to the PMSG. The obtained alternating voltage is then rectified. Nonetheless, the voltage input to PMSG depends significantly on the fluctuating wind speed. A buck-boost converter, therefore, is used as a control device to ensure a suitable and constant voltage via a PI controller. Furthermore, suitable values of gains Kp and Ti are achievable via metaheuristic optimization using AFSA, taking into consideration the output voltage from the buck-boost converter Vout and the reference voltage Vref. Vref is used in setting Vout via an embedded system using Arduino Mega board.Figure 13
PI Control buck-boost converter based on wind turbine system.Arduino Mega is a microcontroller board with ATmega2560 chip, which has 54 digital input/output pins. These include 15 pins used as PWM, 16 pins as analogy inputs, and 4 sets of the UART. The board’s crystal frequency is16MHz. Arduino Mega also enables direct data transfer with computers via the board’s USB port. Its design is compatible with various types of shield. This facilitates and fully supports program development on the Arduino platform. The load conditions are coded as shown in Figure 14.Figure 14
Pseudocode of the load conditions.


## 3.2. Simulation and Experimental Results

In Figure15, the experimental result is compared with the simulation result of the closed-loop control, with the output voltage via input step command 0–14 V, using PI controller designed by pole placement method and tuning by AFSA.Figure 15
Comparison of the experimental and simulation results of the output voltages.According to Figure15, the experimental result of the output voltage is tested. In the simulation, the output voltage of proposed system, both tuned gains the PI controller by AFSA and the PI controller using pole placement method, are compared.Figure16 shows the experimental setup of the intelligent voltage control system with Arduino Mega board connected to a buck-boost converter using a PI controller adjusted by AFSA at objective output voltage of 14V using PI controller designed by pole placement method and tuning by AFSA. It can control operations of a supply control circuit system, farming load system, battery charger system, and grid-connected system.Figure 16
Experimental setup of intelligent control of the PI controller based on a buck-boost converter.In the experiment where the reference output voltage value is set to14V, the input supply voltage Vin inconstantly varies from 5 to 100 V, with no load present; the results for closed-loop control using PI controller designed by pole placement method are shown in the following figures.Figure17 shows the results of the voltage control system using a buck-boost converter tuning gains of PI controller by pole placement method of closed-loop system at reference voltage of 14V with no load, supplying input voltage Vin of 5–100 V. In Figure 17(a), the input supply voltage Vin starts from 5V to 100V. Even under step input of Vin changing rapidly, the output response is overshooting with no steady state error. In Figure 17(b), when Vin is constant, Vout is close to the voltage reference at 14 V. Moreover, the experiment testing of input voltage increased from 5V to 100V and decreased from 100V to 5V, and the output response is close to the voltage reference if the input voltage is constant.Figure 17
The output voltage response at no load. (a) The input supply voltage stair change varying from 5 to 100V. (b) The input supply voltage varying from 5 to 100 V
(a)(b)Next, in the experiment where the reference output voltage value is set to14V, the input supply voltage Vin inconstantly varies from 5 to 100 V, with no load present; closed-loop control by PI controller tuned by metaheuristic optimization using artificial fish-swarm algorithm (AFSA) is shown in the following figures.Figure18 shows the results of the intelligent voltage controlling system via a buck-boost converter by a PI controller tuned by metaheuristic optimization using artificial fish-swarm algorithm (AFSA) at reference voltage of 14V with no load, supplying input voltage Vin of 5–100 V. In Figure 18(a), the input supply voltage Vin starts at 5V and gradually increases to 100 V. It is observed that the output voltage Vout remains constant at the reference voltage Vref, 14V, throughout. Moreover, another test is implemented on the intelligent voltage control system when the input supply voltage Vin is not constant. Tuning is performed to create continuity. Vin is made equal to 5 V, rising to 100 V, and reduced back to 5 V. The intelligent electrical control system can effectively maintain the voltage Vout at a constant value of 14Vas shown in Figure 18(b).Figure 18
The output voltage response at no load. (a) The input supply voltage stair change varying from 5 to 100V. (b) The input supply voltage varying from 5 to 100 V.
(a)(b)According to Figures17 and 18, showing the output voltage of the experimental result of proposed system, with both tuned gains of the PI controller by a pole placement method and PI controller by AFSA, the results show that the simulation corresponds with the experiment result. In experiment result in a real plant, the comparison results revealed that the response of the output voltage with tuned gains by AFSA of PI controller is more approachable to the reference voltage at 14V.Figure19 shows the experimental results of the intelligent voltage control system when on load. An experiment on the intelligent voltage control system via a buck-boost converter using a PI controller tuned by AFSA at a reference voltage of 14V when on load is done. The test is performed with a supply load to the control circuit of 1 A, a farming load system of 10A, a battery charger system of 12Vat a current of 5A, and a grid-connected system of 5A, under the following conditions: in case that Vin≥5V, supply control circuit on buck-boost converter; if Vin<5V, supply control circuit on battery; when Vin≥30V, farming system on buck-boost converter; in case that Vin<30V, farming system on battery; if Vin>40V, battery charger on buck-boost converter; and when Vin>60V, grid-connected system on buck-boost converter.Figure 19
The output voltage response at load. (a) The input supply voltage stair change varying from 5 to 100V. (b) The input supply voltage varying from 5 to 100 V.
(a)(b)The experimental result is shown in Figure19(a). When the supplied input voltage Vin stair changes at 5Vand increases to 100V, it is found that the intelligent electrical control system is able to maintain the reference voltage at 14Vin any condition. IBattery is activated to the charging current of 5A when Vin>45V, and IGrid rises to 2A if Vin>60V. When the circuit is at full load, the total current (ITotal) measures approximately 18A. On the other hand, IControl Circuit and IFarming Load remain constant as per the condition set. Figure 19(b) shows experimental results of the intelligent voltage control system where the input voltage Vin is not constant. Continuity is acquired by adjusting Vin to 5V increasing to 100V and decreasing to 5V. The intelligent voltage control system can efficiently maintain the output voltage Vout at a constant value at the reference voltage of 14V as shown in Figure 17(b).


## 4. Conclusion

This research aims to design a buck-boost converter for controlling the output voltage at14V and to develop a PI controller tuned by AFSA, metaheuristic optimization, which is able to use intelligent voltage system of 18A load. The result of the experiment shows that the buck-boost converter can withstand the input voltage at 5–100 V using switching frequency f of 4kHz with inductance L of 33.6mH, capacitance C of 110uf, load R of 0.78Ω, and duty cycle of 78%. The PI controller tuned by AFSA, metaheuristic optimization, has provided the optimal gains at Kp=1.37 and Ti=0.812. It is an effectively intelligent system for controlling system at voltage reference of 14V when provided with input voltage in the range 5–100 V and can supply the load of 18A.



---

*Source: 5462871-2020-08-14.xml*