Abstract

The main objective is to design a smart switch controlled using fuzzy logic which is able to take decisions on different sources of energy in a very brief “switching time” to avoid load shedding. For that, a fuzzy controller is implemented by considering input signals from three power sources: photovoltaic array, batteries, and grid. The inputs are irradiance being the instantaneous measurement of solar energy, voltage range for the power grid, and state of charge for the battery to be able to know if the battery can supply or not. For these corresponding inputs, Takagi’s fuzzy inference system was applied, that permitted to have linear constants as outputs. as such as to be able to control the switch with respect to the source available at a particular period of the day, either day or night. Designing the fuzzy logic controller was able to take decisions with respect to the conditions. The load feeding signal behaviour has been obtained when either of the switches are open or closed over a period of 1000 s. In this system, the batteries charge is either done by the PV array or the power grid according to the established rules of the system.

1. Introduction

Today, electric power plays a very important role in the lifeline of any country and its continuous availability at minimum cost certifies a country’s growth. That marks its very important factor in developing the country economically and ameliorating the living standards. The aspect of electric power in everyday requirements of the population cannot be exaggerated, especially in this era of spreading of consumer electronics and electrical appliances for both home and industrial use. The need is quite evident on an ever-increasing demand [1, 2]. The period of the inconsistency of supply electricity is long forgotten in many developed countries of the world while developing countries still writhe holdups arising from persistent power failure. Therefore, the poor state of power supply in these developing countries like Cameroon demands alternative sources of power in order to alleviate the constant load shedding caused by electric utility supply [3, 4]. Cameroon has a significant and mostly untapped potential for renewable energy, including hydro, solar, geothermal, biomass, and wind. To date, only a small fraction of the hydropotential has been utilised, and initial developments of commercial solar ventures are being supported and undertaken. There is good solar radiation in the northern part of the country (5.8 kWh/day/m2) and to a lesser extent in the more humid southern part of the country (4.5 kWh/day/m2) [57]. Solar technology will see growing opportunities, as there are currently only 50 photovoltaic (PV) installations across the country, mostly through distributed generation systems. In 2015, the northern region of Cameroon benefitted from a 500 MW PV installation (Cameroon 2020 PV Power Project) and piloted with a 72 MW first-stage PV plant (Solargis) [810]. The coupling of these different sources is done to fill the demand for electrical energy but still does not suffice. Cameroon benefits from a very good climate for the exploitation of solar energy not only in remote areas but also in urban areas, giving birth to hybrid systems that will help to reduce load shedding for the most sensible and vital sectors such as frozen goods companies, hospitals, domestic facilities, and telecommunication companies [1113].

Over time, automation of electrical power supply has become vital as the rate of power outage is predominantly high. To be assured of an efficient management of the proposed hybrid system, there comes in play an essential component named “changeover” whose role is to ensure a continuous and stable energy supply in case of failure of one source via its automatic switching ability [14, 15]. Therefore, a switch needs to be developed for the effective management of the different power sources present. Artificial intelligence, which puts in play the direct application of human reasoning, can easily be of benefit if applied to our system in order to be able to take care of varying weather conditions of renewable sources of energy (solar energy). Fuzzy logic is chosen in order to manage power in a hybrid system [1618]. Hence, the design of a changeover using fuzzy logic control will be applied to ensure the smart part of the system. Fuzzy logic amongst all because of its effectiveness for constant fluctuating systems and not based on mathematical equations has a rapid execution time. This smart changeover senses when solar energy is fluctuating with respect to sunlight and automatically swaps to the available source, respectively, to the rules established. The changeover is connected to more than one power supply source and supplies the load with power from one of the sources at any particular instant in time. Due to modern lifestyle, whether for private or public or personal use, the continuity of electricity is a prime need so as to keep the improvement of our economy. In Cameroon, most particularly in the northern region (Ngaoundere), the population experiences constant daily load shedding. Hence, our research path will focus on the design of a changeover with a minimized switching time taking into consideration climatic weather conditions using fuzzy logic control for the system [19].

For this work, the proposed hypotheses are as follows:(i)A well-designed grid-connected PV/battery system is appropriate to alleviate load shedding(ii)The efficient control of our system is done using fuzzy control so as to take care of the varying weather conditions

The significance of this study deals with designing a smart changeover that will not be able only to switch between power sources when one is absent but will be able to take care of the varying weather conditions and adapt the system according to the established rules so as to keep the consumer satisfied and hence helps in solving by reducing problems of electricity continuity and incidents blackouts. After the presentation of material and methods, results are presented in detail.

2. Materials and Methods

2.1. Block Diagram of the System

The block diagram of the system is represented in Figure 1. The following item is used.

A PV array is made up of many PV panels. The specifications of each PV panel, under standard test conditions (STC), are given in Table 1.

The bank of batteries is used to store energy which will be used to supply the load when the irradiance level is not good and the power grid is off. These batteries are charged either by the PV array (when the irradiance is high) or by the power grid (when the irradiance is low or medium). The most important parameter of the battery is its state of charge (SOC) which is the level of charge of a battery relative to its capacity. It can be determined using three different methods: chemical method, voltage method, and current method [20, 21]. The specifications of each battery are given in Table 2.

The company that provided the power grid and is in charge of electricity (in Cameroon ENEO) is the concerned company. The rated voltage is 220 V (for single-phase supply) and 380 V (for three-phase supply), with a 50 Hz frequency.

The charge controller is used to control the state of charge and discharge of the batteries’ bank.

The rectifier is used to charge the batteries’ bank from the power grid. A single-phase full-wave uncontrolled rectifier is used. The input voltage is stepped down from 220 V to 60 V before being rectified. The rectified voltage is filtered by an LC filter. Its Simulink model is shown in Figure 2 [2224].

A boost DC-DC converter is controlled by a suitable MPPT algorithm for the transfer of maximum power to the load. The Simulink model of the boost DC-DC converter is given in Figure 3.

The single-phase inverter is used to convert DC voltage, either from the PV array or from the batteries’ bank, into an AC one for the supply of the single-phase AC load. Its output voltage is stepped up to 220 V. The Simulink model is shown in Figure 4.

The switching system is made up of controlled switches (changeover). It connects the load to the PV array, or to the power grid, or to the batteries’ bank. The operation of the switching system is controlled by an electronic programmable card using the fuzzy logic method.

The fuzzy controller is the brain of the whole system.

2.2. Fuzzy Logic Controller

Table 3 shows the inputs and outputs of the fuzzy logic controller, with their respective membership function and range.(i)The first input is the irradiance (G) measured by a pyranometer in W/m2. For an irradiance less than 400 W/m2, the membership function is known as low. Between 400 W/m2 and 700 W/m2, the membership function is medium, while, for an irradiance greater than or equal to 700 W/m2, the membership function is high.(ii)The second input is grid voltage (Vac) represented by two membership functions: absent when the voltage is less than 150 V and present when it is greater than or equal to 150 V.(iii)The third input is the state of charge (SOC) of the battery represented by three membership functions: low when the SOC is less than 35%, medium when it is between 35% and 95%, and normal when it is higher than or equal to 95%.(iv)The first output is the switch control signal of the load supply by the PV panel (Spv). The control signal has two logic levels: 0 for the switch to be open and 1 for the switch to be closed.(v)The second output is the switch control signal of the load supply by the grid (Snet). It also has two logic levels: 0 and 1.(vi)The third output is the switch control signal of the load supply by the battery (Sbat), and it has two logic levels: 0 and 1.(vii)The fourth output is the switch control signal of the battery charge by the PV panel (Sbpv), which has two logic levels: 0 and 1.(viii)The fifth output is the switch control signal of the battery charge by the grid (Sbnet), which has two logic levels: 0 and 1.

It should be noted that the fuzzy inference system type is “sugeno” which allows the outputs to be set to two logic levels (0 and 1) representing two membership functions as shown in Figure 5.

The rules are given in Tables 4 and 5. These rules can be seen in Figure 6.(i)When Vac is absent: this means that in the case under voltage or blackout(ii)When Vac is present: this means that there is no problem with the power grid

2.3. Modelling of the System

The block diagram represented in Figure 1 has been implemented using MATLAB®/Simulink®. The Simulink model is shown in Figure 7. The three input signals of the fuzzy logic controller have been created by signal builder blocks of Simulink. All the various situations have been taken into consideration. The signals are represented in Figure 8. It should be noted that the sensing duration of each signal has been set to 50 seconds. Hence, for every 50 seconds, the fuzzy logic controller has to take a decision for a continuous supply of the load and also to charge the batteries’ bank. The load can be supplied only by the PV array, or by the PV array and the batteries, or only by the power grid. The batteries can be charged by the PV array or by the power grid.

3. Results and Discussion

3.1. Load Supply Scenarios from Simulink

Figure 9 represents the supply scenarios of the loads. The fuzzy logic controller closes or opens the switches according to the input signal levels. The voltage at the terminals of the loads is represented to indicate which source(s) is(are) used. Hence,(i)From 0 to 50 s, irradiance is at 755 W/m2 (high), SOC is at 25% (low), and grid voltage is at 220 V (present). The PV array is supplying the loads with Spv closed and Snet and Sbat open;(ii)From 50 to 100 s, irradiance is at 825 W/m2 (high), SOC is at 80% (medium), and grid voltage is at 220 V (present). The PV array is supplying the loads with Spv closed and Snet and Sbat open;(iii)From 100 to 150 s, irradiance is at 900 W/m2 (high), SOC is at 90% (medium), and grid voltage is at 50 V (absent). The PV array is supplying the loads with Spv closed and Snet and Sbat open;(iv)From 150 to 200 s, irradiance is at 1000 W/m2 (high), SOC is at 99% (normal), and grid voltage is at 0 V (absent). The PV array is supplying the loads with Spv closed and Snet and Sbat open;(v)From 200 to 250 s, irradiance is at 800 W/m2 (high), SOC is at 35% (low), and grid voltage is at 200 V (present). The PV array is supplying the loads with Spv closed and Snet and Sbat open;(vi)From 250 to 300 s, irradiance is at 700 W/m2 (high), SOC is at 35% (low), and grid voltage is at 24 V (absent). The PV array is supplying the loads with Spv closed and Snet and Sbat open;(vii)From 300 to 350 s, irradiance is at 400 W/m2 (medium), SOC is at 28% (low), and grid voltage is at 6 V (absent). The load signal is at 0 V, and Spv is open, Sgrid open, and Sbat open;(viii)From 350 to 400 s irradiance is at 300 W/m2 (Low), SOC is at 20% (low), and grid voltage is at 200 V (present). The grid is supplying the loads, and Spv is open, Snet closed, and Sbat open;(ix)From 400 to 450 s, irradiance is at 300 W/m2 (low), SOC is at 70% (medium), and grid voltage is at 220 V (present). The grid is supplying the loads, and Spv is open, Snet closed, and Sbat open;(x)From 450 to 500 s, irradiance is at 600 W/m2 (medium), SOC is at 85% (medium), and grid voltage is at 180 V (present). The PV array and the batteries are supplying the loads because the PV array alone cannot supply, and Spv is closed, Snet open, and Sbat closed;(xi)From 500 to 550 s, irradiance is at 800 W/m2 (high), SOC is at 100% (normal), and grid voltage is at 180 V (present). The PV array is supplying the loads, and Spv is closed, Snet open, and Sbat open;(xii)From 550 to 600 s, irradiance is at 650 W/m2 (medium), SOC is at 88% (medium), and grid voltage is at 0 V (absent). The PV array and the batteries are supplying the loads because the PV array alone cannot supply, and Spv is closed, Snet open, and Sbat closed;(xiii)From 600 to 650 s, irradiance is at 500 W/m2 (medium), SOC is at 98% (medium), and grid voltage is at 0 V (absent). The PV array and the batteries are supplying the loads because the PV array alone cannot supply, and Spv is closed, Snet open, and Sbat closed;(xiv)From 650 to 700 s, irradiance is at 200 W/m2 (low), SOC is at 31% (low), and grid voltage is at 50 V (absent). The load signal is at 0 V, and Spv is open, Snet open, and Sbat open;(xv)From 700 to 750 s, irradiance is at 150 W/m2 (low), SOC is at 31% (low), and grid voltage is at 180 V (present). The grid is supplying the loads, and Spv is open, Snet closed, and Sbat open;(xvi)From 750 to 800 s, irradiance is at 300 W/m2 (low), SOC is at 100% (normal), and grid voltage is at 0 V (absent). The batteries are supplying the loads, and Spv is open, Snet open, and Sbat closed;(xvii)From 800 to 850 s, irradiance is at 450 W/m2 (medium), SOC is at 99% (normal), and grid voltage is at 220 V (present). The PV array and the batteries are supplying the loads because the PV array alone cannot supply, and Spv is closed, Snet open, and Sbat closed;(xviii)From 850 to 900 s, irradiance is at 660 W/m2 (medium), SOC is at 32% (low), and grid voltage is at 220 V (present). The grid is supplying the loads, and Spv is open, Snet closed, and Sbat open;(xix)From 900 to 950 s, irradiance is at 900 W/m2 (high), SOC is at 30% (low), and grid voltage is at 70 V (absent). The PV array is supplying the loads, and Spv is closed, Snet open, and Sbat open;(xx)From 950 to 1000 s, irradiance is at 380 W/m2 (low), SOC is at 15% (low), and grid voltage is at 30 V (absent). There is no source to feed the loads, and Spv is open, Snet open, and Sbat open;

All the scenarios are summarized in Table 6.

3.2. Batteries Charging Scenarios from Simulink

There are three signals that are considered in Figure 10. Sbnet and Sbpv are the switch signals for charging the batteries from the power grid and from the PV array, respectively, and the signal at the terminals of the batteries.(i)From 0 to 50 s, irradiance is at 755 W/m2 (high), SOC is at 25% (low), and grid voltage is at 220 V (present). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(ii)From 50 to 100 s, irradiance is at 825 W/m2 (high), SOC is at 80% (medium), and grid voltage is at 220 V (present). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(iii)From 100 to 150 s, irradiance is at 900 W/m2 (high), SOC is at 90% (medium), and grid voltage is at 50 V (absent). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(iv)From 150 to 200 s, irradiance is at 1000 W/m2 (high), SOC is at 99% (normal), and grid voltage is at 0 V (absent). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(v)From 150 to 200 s, irradiance is at 1000 W/m2 (high), SOC is at 99% (normal), and grid voltage is at 0 V (absent). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(vi)From 200 to 250 s, irradiance is at 800 W/m2 (high), SOC is at 35% (low), and grid voltage is at 200 V (present). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(vii)From 250 to 300 s, irradiance is at 700 W/m2 (high), SOC is at 35% (low), and grid voltage is at 24 V (absent). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(viii)From 300 to 350 s, irradiance is at 400 W/m2 (medium), SOC is at 28% (low), and grid voltage is at 6 V (absent). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(ix)From 350 to 400 s, irradiance is at 300 W/m2 (low), SOC is at 20% (low), and grid voltage is at 200 V (present). Sbnet is closed (1), Sbpv is open (0), and the power grid is charging the batteries;(x)From 400 to 450 s, irradiance is at 300 W/m2 (low), SOC is at 70% (medium), and grid voltage is at 220 V (present). Sbnet is closed (1), Sbpv is open (0), and the power grid is charging the batteries;(xi)From 450 to 500 s, irradiance is at 600 W/m2 (medium), SOC is at 85% (medium), and grid voltage is at 180 V (present). Sbnet is open (0), Sbpv is open (0), and batteries are not being charged;(xii)From 500 to 550 s, irradiance is at 800 W/m2 (high), SOC is at 100% (normal), and grid voltage is at 180 V (present). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(xiii)From 550 to 600 s, irradiance is at 650 W/m2 (medium), SOC is at 88% (medium), and grid voltage is at 0 V (absent). Sbnet is open (0), Sbpv is open (0), and batteries are not being charged;(xiv)From 600 to 650 s, irradiance is at 500 W/m2 (medium), SOC is at 98% (medium), and grid voltage is at 0 V (absent). Sbnet is open (0), Sbpv is open (0), and batteries are not being charged;(xv)From 650 to 700 s, irradiance is at 200 W/m2 (low), SOC is at 31% (low), and grid voltage is at 50 V (absent). Sbnet is open (0), Sbpv is open (0), and batteries are not being charged, but they are being discharged;(xvi)From 700 to 750 s, irradiance is at 150 W/m2 (low), SOC is at 31% (low), and grid voltage is at 180 V (present). Sbnet is closed (1), Sbpv is open (0), and the power grid is charging the batteries;(xvii)From 750 to 800 s, irradiance is at 300 W/m2 (low), SOC is at 100% (normal), and grid voltage is at 0 V (absent). Sbnet is open (0), Sbpv is open (0), and batteries are not being charged, but they are being discharged;(xviii)From 800 to 850 s, irradiance is at 450 W/m2 (medium), SOC is at 99% (normal), and grid voltage is at 220 V (present). Sbnet is open (0), Sbpv is open (0), and batteries are not being charged;(xix)From 850 to 900 s, irradiance is at 660 W/m2 (medium), SOC is at 32% (low), and grid voltage is at 220 V (present). Sbnet is closed (1), Sbpv is open (0), and the power grid is charging the batteries;(xx)From 900 to 950 s, irradiance is at 900 W/m2 (high), SOC is at 30% (low), and grid voltage is at 70 V (absent). Sbnet is open (0), Sbpv is closed (1), and the PV array is charging the batteries;(xxi)From 950 to 1000 s, irradiance is at 380 W/m2 (low), SOC is at 15% (low), and grid voltage is at 30 V (absent). Sbnet is open (0), Sbpv is open (0), and batteries are not being charged, but they are being discharged;

All the scenarios are summarized in Table 7.

3.3. Implementation of the System Using a PIC16F876 Microcontroller

The implementation of the fuzzy controller validated the real behaviour of the changeover when simulations are close to the real world. After having loaded the program in the PIC microcontroller, different cases were obtained due to how the input signals vary too. From Figure 11, each switch turned on the lamp as the variation of the inputs corresponds to one of the rules. It should be noted that a pyranometer is used to sense the irradiance (in W/m2), an AC voltage sensor to sense the power grid voltage, and a DC voltage sensor to know the state of charge (SOC) of the batteries.(i)Case 1: Irradiance is low, SOC is low, and grid is absent. No source of energy is present; hence, no lamp is turned on.(ii)Case 2: Irradiance is low, SOC is medium, and grid is absent. Switch BATT is on, and the battery is the present source of energy; hence, lamp 3 is turned on.(iii)Case 3: Irradiance is medium, SOC is medium, and grid is absent or present. Sw BATT is on, and sw PV is on. In these both, PV and the battery are the present sources of energy because, at medium state, the PV cannot satisfy the loads alone. Hence, lamp 1 and lamp 3 are turned on.(iv)Case 4: Irradiance is high, SOC is medium or low, and grid is absent or present. Sw BATT is off, sw PV is on, and sw BPV is on. Here, the PV alone is the present source of energy, and it satisfies the loads alone and charges the battery which is at a medium state. Hence, lamp 1 is turned on.(v)Case 5: Irradiance is low, SOC is low or medium, and grid is present. Sw BATT is off, sw PV is off, sw GPV is off, and sw_Grid is on. Here, the grid is the present source of energy, and it satisfies the loads and charges the battery which is at low state. Hence, lamp 2 is turned on.

4. Conclusion

In this work, a comprehensive study based on fuzzy logic for applications in the hybrid renewable system is the main focus. The constant power outages faced in some regions where this study was carried out have been solved through the proposed solution. Hence, coupling power grid to photovoltaic array and batteries’ bank for backup in case of the absence of the main sources is the solution. Here, the PV array is the primary source since there is enough sunlight. But the main problem is how to use these various sources efficiently following their availability and by considering the weather conditions in which the PV panel highly depends on for its productivity. A smart switch power circuit is designed as a replacement technique for the future solution of power outages. A more convenient modern energy system with a high grade of reliability and stability by choosing the optimum power sources has been designed. The simulations have been done with MATLAB®/Simulink®. Furthermore, the system has been implemented with a PIC16F876 microcontroller for a partial real-time simulation. The obtained results gave us an effective control of our switches via the designed fuzzy controller. Hence, from this, the application of fuzzy logic was effectively done.

Data Availability

The data used in this research work are available upon request.

Disclosure

This work has been published as a preprint by Research Square before the peer review process.

Conflicts of Interest

The authors declare that they have no conflicts of interest.