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 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/m2). 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 high-pressure 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, 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 bulk-boost converter [14] which results in the voltage which matches the requirement of the load. Two power sources are connected with power MOSFETs switch module (IRF4095PBF) 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 (Vs) 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 (IL) and solar source (IS) are used to evaluate the difference of current (ei). 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.

Fig. 1
figure 1

Configurations of a hybrid power supply system

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. Vs is the output voltage generated by the solar panel, while ei is the difference between current consumption of the load and current supply from the solar panel. Vs and ei 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 (tp). The tp is a time base for generating the dual pulses t1 and t2 that are out of phase signal. t1 and t2 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. t1 and t2 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 t1 controls the solar power side and t2 controls the utility grid side.

Fig. 2
figure 2

Topologies of hybrid power sharing controller

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 (Vs) signal of the solar cell system is the input of the system but also the percentage difference (%ei) between the current signal feedback of the load device (IL) and the current signal of the solar cell (Is). Two parameters are considered for fuzzy logic input as demonstrated in Fig. 3. The membership function of Vs input is assigned to the linguistic parameter, using three fuzzy subsets: L (Low), M (Medium), and H (High). While, the membership function of ei input is similarly assigned with Vs 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.

Fig. 3
figure 3

Fuzzy logic membership functions of a voltage signal input, b current signal input, and c time period output

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.

Table 1 Fuzzy rule table

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:

$$\% TD\; = \;\frac{{\int {\mu_{A} \left( {y_{i} } \right)\; \times \;y_{i} \;dy} }}{{\int {\mu_{A} \;\left( {y_{i} } \right)\;dy} }},$$
(1)

where %TD is the time period ratio or % duty cycle and μA(yi) is the aggregated output of membership function.

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 [VO (t)] of the modeling is the sum of those from solar power (VPV) and utility grid (VDC). The power ratio between two power sources is controlled by phases \((\phi_{1} ,\bar{\phi }_{1} )\) where both parameters are estimated using a fuzzy algorithm (Eq. 1) with comparing a feedback input signal between the VO (t) and the solar power voltage (Vs), as shown in Eqs. 2, 3, 4, and 5:

Fig. 4
figure 4

Feedback control block diagram of the hybrid load sharing system

$$V_{0} \;\left( t \right) = v_{{\phi_{1} }} \left( t \right) + v_{{\bar{\phi }_{1} }} \left( t \right),$$
(2)

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_{{\bar{\phi }_{1} }} \left( t \right)\) 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 [Vs (t)] and it can be calculated using the following equation:

$$V_{\text{s}} \;\left( t \right) = KV_{\text{PV}} \left( t \right),$$
(3)

where K is the attenuation coefficient. The relationship of the precision converter circuit from I to V is as follows:

$$V_{\text{f}} \left( t \right) = K_{\text{z}} I_{\text{f}} \left( t \right).$$
(4)

Here, KZ is a constant which refers to the transimpedance gain of the circuit. Thus, the different input voltage ei (t) of the COA is as follows:

$$e_{\text{i}} \left( t \right) = V_{\text{PV}} \left( t \right) - V_{\text{f}} \left( t \right).$$
(5)

Here, ei (t) is the difference between output voltage feedback [Vf (t)] and voltage of the solar power (VPV) 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 ei (t) and Vs (t), and the equation can be written as follows:

$$\% TD = \phi_{1} \left\{ {V_{\text{S}} ,e_{\text{i}} } \right\},$$
(6)

where %TD is the time period ratio at t1 or at which the solar power side is selected as a power input. \(v_{{\phi_{ 1} }} \left( t \right)\) can be evaluated from the following equation:

$$v_{{\phi_{1} }} \left( t \right) = V_{PV} \left\{ {V_{{S\phi_{1} }} ,e_{{i\phi_{1} }} } \right\}.$$
(7)

On the contrary, at t2 or the utility grid is chosen as a power input of the system. \(v_{{\bar{\phi }_{ 1} }} \left( t \right)\) can be determined using the following equation:

$$v_{{\bar{\phi }_{ 1} }} \left( t \right) = V_{\text{DC}} \left\{ {V_{{{\text{S}}\bar{\phi }_{ 1} }} ,e_{{{\text{i}}\bar{\phi }_{ 1} }} } \right\}.$$
(8)

Therefore, the total output of the system, V0 (t) is the summation of Eq. 7 and 8. Therefore

$$V_{ 0} \left( t \right) = V_{\text{PV}} \left\{ {V_{{{\text{S}}\phi_{ 1} }} ,e_{{{\text{i}}\phi_{ 1} }} } \right\} + V_{\text{DC}} \left\{ {V_{{{\text{S}}\bar{\phi }_{ 1} }} ,e_{{{\text{i}}\bar{\phi }_{ 1} }} } \right\}.$$
(9)

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 t1 and t2 to control the amount of power from the solar and the utility grid source via the MOSFETs. The pulse width of both t1 and t2 depends on the defuzzification (%TD) of the fuzzy logic control. The %TD is estimated by Vs and %ei level comparing with the level of fuzzy set. For high level of sunlight, the panel will generate high output voltage and current. Lowering of ei is obtained as a result of high output current from solar panel and the on time for solar-based electrical energy will be longer compared to that of utility grid, as shown in Fig. 5. t1 is the %TD that is added on the dead time while t2 is a pulse that has the opposite phase of t1. t1 and t2 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.

Fig. 5
figure 5

Time-division multiplexing input and output combining with dead time

Experimental results and discussions

The experimental results are divided into three parts as follows:

1. Laboratory scale testing of electrical power sharing

The power output signals can be laboratory simulated by selecting the suitable time interval of the t1 and t2 to feed to the MOSFET switch module. The simulated t1:t2 ratios of 30:70, 50:50, and 70:30, which are generated by MCU, as shown in Figs. 6a, 7a, and 8a, were chosen. t1 and t2 are small signals that have the amplitude approximately 3.3 V. Amplification of the small signals relies on the MOSFET gate driver to provide a suitable amount of power to drive the MOSFET. The amplified signals can be displayed in Figs. 6b, 7b, and 8b, respectively. Load sharing of two electrical power sources occurs when the amplified signals are fed to the MOSFET switch. The output power signals can be demonstrated in Figs. 6c, 7c, and 8c, respectively. It is noted that two 12 VDC power supplies were employed in the laboratory testing as two separate power source.

Fig. 6
figure 6

a The small signals of t1 and t2 on 30:70 ratio, b the control signals of t1 and t2 through the gate driver on 30:70 ratio, and c the combined electrical power of t1 and t2 on 30:70 ratio

Fig. 7
figure 7

a The small signals of t1 and t2 on 50:50 ratio, b the control signals of t1 and t2 through the gate driver on 50:50 ratio, and c the combined electrical power of t1 and t2 on 50:50 ratio

Fig. 8
figure 8

a The small signals of t1 and t2 on 70:30 ratio, b the control signals of t1 and t2 through the gate driver on 70:30 ratio, and c the combined electrical power of t1 and t2 on 70:30 ratio

2. 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 (T1) and the electric utility power source (T2) 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 (T1:T2), while the system efficiency is more than 90%.

Table 2 Efficiency of hybrid power sharing system
Table 3 Electrical parameters of hybrid power sharing system

3. Experimental results of an automatic electrical power sharing

The ratio of the solar power source (T1) and the utility grid power source (T2) 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.

Fig. 9
figure 9

a Current and voltage of 50 W halogen load on 40 W solar cell source, b power of 50 W halogen load on 40 W solar cell source, c current and voltage of 50 W halogen load on 80 W solar cell source, and d power of 50 W halogen load on 80 W solar cell source

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, time-division 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.