A prototype of a low-cost solar-grid utility hybrid load sharing system for agricultural DC loads

The main objective of this work is to design a prototype of a low-cost solar-grid utility hybrid load sharing system to support the agricultural DC equipment that has already been used in the rural area of Thailand. Time-division multiplexing (TDM) technique is employed in the prototype construction, and it is used to evaluate the time interval for two power MOSFETs to switch between two applicable power supplies: in this case, solar panels and grid utility. The time interval is generated by the internal timer from a microcontroller and is divided into two square waves which are 180° out of phase (opposite sides). Each time interval is derived by the fuzzy logic controller and is calculated based on the consumption of electrical load. The experimental results are divided into three parts; first result shows a smooth output level that is consisted of the signal between solar panels and grid utility for each particular ratio. The second result shows a high efficiency of this system upon the variation of load power. Finally, we demonstrate a relatively good sharing of the electrical power when this system is operated under various capacities of the power sources. Our prototype offers the feasibility of hybridization of renewable energy and grid utility in which the technology is easily accessible by agriculturists throughout the world.

The difference between current consumption and current solar source (A) %e i The fraction between the I L and I s (%) V s The output voltage of the solar panel (V) t p Time periods (mS) t 1 Time periods with dead time to control the solar power side (mS) t 2 Time periods with dead time to control the utility grid side (mS) %TD The output membership function (%) μ A (y i ) The aggregated output of membership function V PV The solar power (V) V DC The utility grid power (V) K The attenuation coefficient K z The transimpedance gain of the circuit V f The relationship of the precision converter circuit The output voltage of system (V) ϕ 1 The power ratio of the solar power sidē 1

Introduction
The use of renewable energy for power generation plays an important role in the economy and the society in Thailand.
In 2015, the proportion of renewable energy that has already been utilized was accounted for 13.83% of the final energy consumption [1]. This is a result of the Alternative Energy Development Plan 2015 (AEDP 2015) supporting by the government where the target of the strategy is to replace 30% of the conventional energy by renewable energy. Several private companies have already responded to the plan through expanding commercial renewable energy power plants. Governmental organizations, on the other hand, have 1 3 tried to emphasize the importance of renewable energy and have encouraged people in the community to rely on more renewable energy in their daily life. However, the supporting of renewable energy is not limited in electrical power generation technologies. The field of energy control and management using a smart system has also been received widespread attention from governmental and private sectors. Integrated intelligent energy management systems or smart energy management systems will play a vital role in the energy technology in the near future. The issue also relates to the control and management system of the conventional fossil fuel-based energy and combined renewable energy sources such as solar, biomass, wind, and biofuel. Instability of the power source, however, hinders the growth of renewable energy utilization and the solution to this problem must be established before employing the technology. Solar energy is only available during the daytime and when there is less cloud in the sky. Wind energy suffers from the instability of the wind flow and the power varies accordingly to the wind speed. The quality of the feedstock greatly affects biomass and biofuel energy, since different types of feedstock provide different energy density. The advantages of the intelligent energy management system are to increase the power stability and to reduce the risk in case of instability power supply where the electrical energy comes from renewable power sources.
Currently, the agricultural sector consumes about 5% of the final energy consumption where the major consumption lies in the irrigation, the aerator in fish farming, the cooling system for animal and plant cultivation, as well as various alternating current (AC) electrical equipment and control systems in the greenhouse. With a constant increase of the electricity price, a high production cost is inevitable to farmers. It, therefore, is reasonable to explore the other sources of energy that can be converted to electrical energy and can be applied to the agricultural sector, since Thailand is located relatively close to the equator and hence is received an intense solar radiation throughout the year (4-5 kWh/ m 2 ). Consequently, this source of alternative energy attracts a wide attention from farmers as this might eventually be the solution to the energy crisis. Solar radiation can be straightly converted to direct current (DC) using a solar panel and it can directly be used with the DC electrical equipment through the assistance of the voltage regulator as well as DC/DC converters [2].
In the smart farming and energy management applications, several research groups have already replaced AC devices with DC devices to enhance the productivity and to lower the cost. Some researchers have demonstrated the feasibility of using solar energy for agricultural irrigation with the detail described as follows. Babkir has investigated the cost-effective of solar water pumping system for irrigation in Sudan and has found that the levelized energy cost is 0.33 $/ kWh which is relatively lower compared to that of the other method [3]. Korpale et al. studied a characteristic of water pumping system which employed both solar photovoltaic and conventional electrical power [4]. They found that the efficiency of the solar-based water pump is much higher than that of the conventional power. Renu et al. have carried out the experiment to study the performance optimization of SPV water pumping systems in the practical operating conditions [5]. They have observed that the efficiency of SPV is in the range of 38-60%. Various research groups have modified the cooling system by replacing the AC compressor with the DC one. Daffallah et al. have evaluated a photovoltaic DC refrigerator with and without AC/DC converter to investigate power consumption of both system and have found that the photovoltaic DC refrigerator greatly effects on the energy consumption [6]. While Jamal et al. investigated a split air condition system using a hybrid PID controller to control the fan speed and the water mist flow rate to enhance the efficiency of the system [7]. The coefficient of performance of the improved system increases by 17.14% and 10.91% at ambient temperature of 40 °C and 57 °C, respectively. The energy saving is calculated to be higher by 20.67% and 46.63% compared to the conventional air conditioning system, respectively. Zhongbao et al. studied a performance of quasi grid-connected photovoltaic powered DC air conditioner in a hot summer zone [8]. It is shown that the system can conserve grid electricity by more than 67% and 77% during summer daytime and summer nighttime, respectively. Several works on the application of solar energy for aquatic ponds have also been reported. Igib et al. designed the optimum sizing of electrical power to support the electricity demand of fish pond aeration system. A highpressure DC oxygen pump is occasionally used to feed oxygen into the pond instead of the traditional AC aerator where the efficiency of the later one is relatively lower. This is the most economically feasible and the cost of energy (COE) is about 0.769 $/kWh [9]. All of these applications focus on applying the smart technologies and energy management with DC equipment loads.
Therefore, the primary goal of initiating the utilization of renewable energy is to reduce the dependence of fossil fuel and to lower the cost but still maintain a good stability of the electrical energy in the system. Hence, it is desirable to develop a prototype of a low-cost hybrid DC load sharing to be able to implement on agricultural systems. The prototype, which is properly designed for farmers, will satisfy the need of using the DC electrical system in the agricultural sector with a reasonable price. The operation of the prototype device relies on the combination of more than one power source where renewable energy power source, i.e., electrical power from solar panels, is used together with the electrical power from utility grid. The former power source helps reducing the energy cost as well as the production cost, 1 3 while the latter one maintains the stability of the energy level in case of low energy input from the solar energy source. The operation of the system uses the hybrid energy sharing technique to distribute the energy to the loads. The solar panel is employed as a mean to generate electricity from sunlight (renewable energy source) and will be used as the first priority. In case of low level of electrical power from solar energy source, the electrical energy from utility grid is fed into the system by appropriate ratio and this ratio is estimated using the fuzzy logic algorithm [10][11][12][13] which is favorable algorithm for feedback controlling. The details of this system are elaborated in the below section.

Configurations of the hybrid load sharing system
Configurations of the hybrid load sharing system can be shown in Fig. 1. The system consists of two separate power sources. The first one is solar power where 40 W and 80 W of polycrystalline Si solar panels are used to generate electricity. The electricity from the utility grid (220 VAC 50 Hz single line) is added to the system to ensure that the electrical power is enough for load requirement. The AC electric utility is converted to DC signal by AC-to-DC converter where 220 VAC is transformed to 12 VDC or to the requirement voltage of the load. The energy from the solar panel, on the other hand, is regulated by the bulkboost converter [14] which results in the voltage which matches the requirement of the load. Two power sources are connected with power MOSFETs switch module (IRF-4095PBF) to share the electrical power to the loads using the time-division multiplexing technique. Each MOSFET runs under a signal command from microcontroller unit (MCU; ATmega328p). The MCU receives a voltage signal (V s ) from the solar energy source that has already been decreased the voltage level to the appropriate level using a normal voltage divider. Two current signals (ACS712) measuring from the current of both load (I L ) and solar source (I S ) are used to evaluate the difference of current (e i ). The fuzzy logic control algorithm is applied to estimate the current difference and to set the ratio of time interval to activate or deactivate each MOSFET.
The MCU is the main controller that transforms the signal sensors into control parameters. Figure 2 shows topologies of the MCU for hybrid power sharing controller. V s is the output voltage generated by the solar panel, while e i is the difference between current consumption of the load and current supply from the solar panel. V s and e i are then used to estimate and to set the ratio of time interval using fuzzy logic control. The output of fuzzy logic control is presented on time periods (t p ). The t p is a time base for generating the dual pulses t 1 and t 2 that are out of phase signal. t 1 and t 2 are generated by the internal timer of the MCU and are added on the dead time of the falling edge signal to prevent the crash of two MOSFETs while supply electrical energy to the load. t 1 and t 2 are fed to FET gate driver (TLP250) to amplify the signal to drive the MOSFET and hence control the power from each energy source where t 1 controls the solar power side and t 2 controls the utility grid side.

Fuzzy logic controller design
In this work, the fuzzy logic control is divided into three parts: fuzzification part, fuzzy inference or decision-making part, and defuzzification part. Here, not only the voltage (V s ) signal of the solar cell system is the input of the system but also the percentage difference (%e i ) between the current signal feedback of the load device (I L ) and the current signal of the solar cell (I s ). Two parameters are considered for fuzzy logic input as demonstrated in Fig. 3. The membership function of V s input is assigned to the linguistic parameter, using three fuzzy subsets: L (Low), M (Medium), and H (High). While, the membership function of e i input is similarly assigned with V s input using three fuzzy subsets to simplify the control rule: ZE (zero), PS (positive small), and PB (positive big). The output membership function (%TD) is divided into five parts to increase accuracy of the output control by ranging the power quantity of solar source. Abbreviations are described as the following; VLP (very low power), LP (low power), M (medium power), HP (high power), and VHP (very high power). Linear triangle and trapezoidal membership function are performed due to simplification and efficient computation.
The fuzzy rules of two inputs and one output are shown in Table 1. Nine rules are chosen in the subsequent case for inference method.
Mamdani model [15][16][17] is applied in this research to evaluate the fuzzification, inference, combination, and defuzzification. In this system, defuzzification is the center of area [15][16][17] (COA) and is used to estimate the output of %TD which is the duty ratio. The COA method is both simple and fast method. The COA defuzzification method calculates the weighted average of a fuzzy set using the following equation: where %TD is the time period ratio or % duty cycle and μ A (y i ) is the aggregated output of membership function.

3
The pulse width modulation, which generates pulse to control MOSFET switch in each power source, is used to control %TD or duty ratio of fuzzy logic control.

Mathematical modeling
Mathematical modeling of the configurations of a hybrid power supply system and fuzzy logic controller design is created using a feedback control block diagram, as shown in Fig. 4. The output voltage [V O (t)] of the modeling is the sum of those from solar power (V PV ) and utility grid (V DC ). The power ratio between two power sources is controlled by phases ( 1 ,̄1) where both parameters are estimated using a fuzzy algorithm (Eq. 1) with comparing a feedback input signal between the V O (t) and the solar power voltage (V s ), as shown in Eqs. 2, 3, 4, and 5: where v ϕ1 (t) is the output voltage level from the solar power side which is directly fed into the system at ϕ 1 (V), and v̄1(t) is the output voltage level of the utility grid which is linked to the system at ϕ 1 (V). Equation 2 can be used to estimate the system output voltage.
The voltage will be used to determine the input signal [V s (t)] and it can be calculated using the following equation: where K is the attenuation coefficient. The relationship of the precision converter circuit from I to V is as follows: Here, K Z is a constant which refers to the transimpedance gain of the circuit. Thus, the different input voltage e i (t) of the COA is as follows: Here, e i (t) is the difference between output voltage feedback [V f (t)] and voltage of the solar power (V PV ) which is derived from the current feedback of load output.
After the fuzzification and fuzzy rule base determination, %TD is found to be directly proportion to both e i (t) and V s (t), and the equation can be written as follows: where %TD is the time period ratio at t 1 or at which the solar power side is selected as a power input. v 1 (t) can be evaluated from the following equation: On the contrary, at t 2 or the utility grid is chosen as a power input of the system. v̄1(t) can be determined using the following equation: Therefore, the total output of the system, V 0 (t) is the summation of Eq. 7 and 8. Therefore

Wave generator and controller
This is applied using time-division multiplexing (TDM) technique that is combining of several signals into one medium. In this research, the dual-square waves with the frequency of 31.3725 kHz are generated by internal timer mode of microcontroller (atmega328p). The characteristic of square wave consists of two pulses that are similar in amplitude but 180° out of phase (opposite sides). First and second pulses are generated with the dead time t 1 and t 2 to control the amount of power from the solar and the utility grid source via the MOSFETs. The pulse width of both t 1 and t 2 depends on the defuzzification (%TD) of the fuzzy logic control. The %TD is estimated by V s and %e i level comparing with the level of fuzzy set. For high level of sunlight, the panel will generate high output voltage and current. Lowering of e i is obtained as a result of high    1 3 output current from solar panel and the on time for solarbased electrical energy will be longer compared to that of utility grid, as shown in Fig. 5. t 1 is the %TD that is added on the dead time while t 2 is a pulse that has the opposite phase of t 1 . t 1 and t 2 are fed into MOSFET switch module and the combination of both electrical power sources can be achieved to match the power requirement of the load.

Experimental results and discussions
The experimental results are divided into three parts as follows:

Laboratory scale testing of electrical power sharing
The power output signals can be laboratory simulated by selecting the suitable time interval of the t 1 and t 2 to feed to the MOS-FET switch module.

System efficiency
Various halogen lamps (10, 30, and 50 W) are used to simulate the efficiency of the system. The efficiency of this system is calculated by dividing the total output power with that of the input. The total input power comes from the combination of the solar power source and the utility grid. The power measurement methodology and instrumentation can be shown in Fig. 1. In this experiment, the ratio of the solar power source (T 1 ) and the electric utility power source (T 2 ) are provided to the testing load, as shown in Table 2 (full data set as shown in appendix Table 3). The results of system efficiency testing reveal that the current, voltage, and electrical power under various ratios changed significantly according to the ratios of two power sources (T 1 :T 2 ), while the system efficiency is more than 90%.

Experimental results of an automatic electrical power sharing
The ratio of the solar power source (T 1 ) and the utility grid power source (T 2 ) is calculated using the fuzzy logic algorithm to share the two electrical powers to 50 W halogen lamp. Two different size of solar panels, lower solar power (40 W) and higher solar power (80 W) than the load consumption, were used in this experiment to test the system. The results of testing conditions in the sunshine day show that, in the case of 40 W solar panel, the electrical power from both sources are shared to the 50 W halogen lamp at all time, since the energy production from solar panel alone is not sufficient as displayed in Fig. 9a, b. Figure 9a also indicates that solar voltage is dropped down, since the production power is lower than the power of the load, while solar current, electric utility current, and two electrical powers are shared by appropriate ratio to load. For 80 W solar panel, the testing under the similar conditions has demonstrated that the load receives 100% of electrical power from the solar panel during the solar intensity peak time (13.30-15.00), as shown in Fig. 9c-d, but a similar load sharing behavior as 40 W panel is also observable during the low solar intensity period indicating insufficient electrical power production from solar panel. The solar current, utility grid current, and two electrical powers have displayed similar characteristics, as well.

Significance of finding
A prototype of a low-cost hybrid load sharing system is an appropriate technology for Thailand and other countries where a high level of solar energy is available throughout the year. The prototype system was designed for DC loads in agricultural sectors and this, in particular, will support Thailand Smart Agricultural Society. The prototype affects the traditional agriculture in terms of energy management and utilization and, as a result, leads to energy saving. The low-cost hybrid load sharing system relies on power sharing between two separate sources, solar power, and utility grid. The power from solar panel will be used as the first priority, and if the power demand from loads is greater than the power generation from solar panel, the system will acquire the difference from the utility grid using the fuzzy logic control algorithm assessment. Therefore, this system can be applied for all the conditions of solar intensity or load conditions.

Conclusions
This paper proposes a new technique that can be applied for agricultural DC devices. The prototype of hybrid load sharing system consists of the fuzzy logic control, timedivision multiplexing, and dual-square generator with dead time. The prototype supplies the electrical power from both sources to the DC load, and it leads to good productivity and low cost. The hybrid load sharing system also provides a high efficiency under variation of both load and capacity of power sources as well as offers a good shape of power output signal.
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.