1 Introduction

A large proportion of the population of sub-Saharan Africa does not have access to reliable electrical energy. Despite electricity grids being present in cities and most large towns, grid connections are often unaffordable for low-income households, leaving more than 600 million people off utility grids [1]. In addition, customers who can afford a connection are subject to maximum power limitations during peak demand hours and are faced with frequent unplanned blackouts. According to the latest World Bank Enterprise Surveys, customers in sub-Saharan Africa face an average of 9 power outages per month, each lasting about 5.7 h, whereas in a developed country such as France, they only occur 0.1 times per month for 1.6 h in average [2]. This significant disparity underscores the challenge of energy reliability in sub-Saharan Africa. The primary causes behind such stressed utility grids in sub-Saharan Africa can be attributed to a combination of factors such as insufficient power generation capacity, weak grid infrastructure, and inefficient appliances [3]. Such a situation warrants the need for wider deployment of renewable energy systems to provide sustainable, reliable and affordable electricity. As the sub-Saharan region receives a large amount of solar radiation throughout the year [4], solar energy is the most suitable renewable energy to develop. In addition, reasonable initial costs, ease of installation and maintenance have led to a rapid growth in the use of solar energy systems [5]. One of the most popular uses of solar energy relies on combining photovoltaic (PV) panels with batteries to supply electricity for domestic customers. Not only can this combination be used for homes that do not have access to a utility grid, but it can also increase the quality of electricity for customers who are connected to a weak and stressed electricity network [6]. In addition to PV and battery storage, solar water heaters can also be considered as part of a solar solution for integrated hot water and electricity supply systems. By introducing solar water heaters, electrical energy consumption can be reduced and the stability of delivered hot water improved [7].

Integrated PV/Thermal systems need a power management strategy (PMS) to control the power flow and its operation. Many studies have suggested strategies for optimal control, including self-consumption maximization. This is a simple but effective approach to reducing energy costs. It relies on the information available at the time in terms of renewable energy resources, battery storage and electrical loads [8]. This type of controller, which is very common in microgrids, supplies the electrical loads using the generated power from renewable energies such as PV panels and wind turbines. Energy storage units are used to compensate for any energy shortage. Finally, if further energy is needed, it is supplied by either the utility grid or a diesel generator. At all times, excess energy is stored in batteries to be used in times of need [9,10,11,12]. Another approach to controlling power flow in microgrids depends on a prediction-based power management strategy. By taking advantage of prediction values of both power consumption and generation and using optimization methods, the power flow and trading between microgrid and utility grids can be managed efficiently [13, 14]. Several advanced optimization methods have been utilized in previous works such as mixed-integer linear programming [6], stochastic optimization [15] and evolutionary algorithms [16]. Although these methods deliver good performance, they are not suitable for implementation on autonomous systems controlled by microcontrollers in continuous mode due to their high computational volume and modelling complexity [17]. Alternatively, a prioritized energy resource allocation strategy, which offers simplicity of implementation and high reliability, can be considered for integrated solar systems. Such an approach has been employed to control the energy resources and supply the demands in autonomous microgrids [18, 19]. In addition, Kato et al. presented a priority-based PMS to manage the operation of multiagent microgrids [20]. Their approach allocated energy to several electricity consumers with different priorities. This strategy was also used for a microgrid consisting of a micro turbine, a wind turbine, a PV panel, and a battery [21]. Their proposed PMS controls the power flow for critical and non-critical loads and manages electricity trading.

Although many methods have been developed for power management of domestic solar systems in both grid-connected and islanding modes, systems connected to a weak and stressed grid have received less attention.

Given an integrated hot water and electricity supply solar system consisting of PV panels, a battery, and solar water heating technology, and access to a weak and stressed grid, this paper presents an integrated PMS to control the power flow, electricity trading and temperature of the hot water to deliver affordable and reliable energy and hot water access to low-income households in sub-Saharan countries. Due to cost and power constraints, solutions must be of low computational complexity so that they can be implemented on a microcontroller. A specificity of the proposed strategy is its ability to supply the critical loads despite the grid constraints. Based on the requirements associated with this scenario, a two-level prioritized-based PMS is designed to optimize the power flow and electricity trading between a home and a utility grid while considering the risk of unplanned brownouts. The proposed solution is analyzed and evaluated using actual electricity and hot water demand profiles monitored in a rural house in Botswana.

The main contributions of this paper can be summarized as:

  • Development of a practical, reliable, and optimal PMS to manage the power flow in the presence of a weak and unreliable grid.

  • Mathematical modelling of a solar hot water system and integrated temperature controller.

  • Design and analysis of the proposed solution for a low-income customer as a case study.

The paper is organized as follows. Section 2 presents the optimal design of an integrated PV/thermal solar system. It includes a novel power management strategy and optimal sizing of the solar solution. In Sect. 3, a case study is described, and the mathematical modelling of the associated system is detailed. In Sect. 4, after presenting the outcomes of using the proposed solution for the case study, they are compared with those produced by other power management strategy methods. Finally, Sect. 5 concludes the paper.

2 The optimal design of an integrated PV/thermal solar system

Not only is access to energy unaffordable for most low-income households in sub-Saharan countries, but electricity is delivered by utility grids that are generally weak and unreliable. Consequently, an autonomous solar system consisting of PV panels, batteries and a solar water heater is a particularly attractive solution for those consumers. To develop its full potential, such a system needs a power management strategy to control its power flow and operations. Based on those requirements, a smart PMS is proposed (Sect. 2.1). Determining the optimal size of the solar system’s components ensures the delivery of the best service at the lowest cost, and therefore an optimal sizing strategy is also part of the offered solution (Sect. 2.2).

2.1 Power management strategy (PMS)

A PMS controls the power flow in domestic solar systems and manages electricity trading between a house and a utility grid. Moreover, in the case of small solar systems, there are constraints in terms of size and cost for the monitoring and control units. Thus, the use of microprocessor-based hardware platforms is a very common and efficient way to control autonomous solar systems [22]. These systems need a reliable PMS with low computational complexity which can be implemented on microprocessor-based hardware. This can be achieved using a priority-based PMS relying on optimal control rules [23]. In such an approach, the electrical loads should be categorized based on their priorities according to the specific requirements of the customer [24]. Whilst the previous authors considered different levels of priorities depending on the class of consumers, in this study the user’s electrical load is split into 3 different priority levels which are:

  • First priority—critical loads The power supply of these loads has to be maintained under any circumstances (e.g., Lighting and refrigerator).

  • Second priority—non-critical loads These loads can be powered off early to save additional battery runtime for the Critical Load (e.g., TV and oven).

  • Third priority—controllable loads These loads can be controlled or shifted based on the availability of the grid and remaining energy in the battery (e.g., Immersion heater of the hot water system).

To control these loads, a two-level prioritized-based PMS is developed. Figure 1 illustrates the various components of the proposed PMS with its two levels, i.e., optimal energy allocation and control.

Fig. 1
figure 1

The principle of the proposed two-level PMS

In the first level, prediction of both power generation (PV power output), and consumption (critical and non-critical loads) allows the determination of the energy allocated to non-critical loads (\(A{E}_{NCL}\)) and the controllable load (immersion heater \(A{E}_{H}\)), as well as the amount of energy that should be purchased from the utility grid and stored in the battery (\({E}_{G}\)). At first, predicted excess energy \({E}_{e}{\prime}\left(t\right)\), which can be allocated to non-critical load and immersion heater, is calculated by Eq. 1:

$${E^{\prime}}_{e}\left(t\right)={E^{\prime}}_{pv}\left(t\right)+{E}_{b}\left(t\right)-{{E}^{\prime}}_{CL}\left(t\right)$$
(1)

where: \(t\) is current time, \({E^{\prime}}_{pv}\left(t\right)\) is the predicted energy generated by PV, \({E}_{b}\left(t\right)\) is the amount of saved energy in the battery and \({E^{\prime}}_{CL}\left(t\right)\) denotes the predicted value of the critical load.

To determine the energy allocations \(A{E}_{NCL}\) and \(A{E}_{H}\), it is initially assumed that all the excess energy at time t is consumed, so the battery is empty at the beginning of time step t + 1 (i.e., \({E{\prime}}_{B}\left(t+1\right)=0)\). This assumption helps the system to estimate how much unmet load it will face in the future if all the excess energy is consumed during the period. Thus, the total unmet critical load (\({TUN}_{CL}\)) and total unmet non-critical load (\({TUN}_{NCL}\)) in 23 h ahead based on the prediction values are calculated according to the algorithm presented as a flow chart in Fig. 2.

Fig. 2
figure 2

Calculation of total unmet critical load and non-critical load in 23 h ahead

Then, the allocated energy to non-critical load (\(A{E}_{NCL}\)), immersion heater (\(A{E}_{H}\)) and the required amount to be purchased from the utility grid (\({E}_{G}\)) are determined according to the algorithm presented as a flow chart in Fig. 3.

Fig. 3
figure 3

Calculation of allocated energy to each load type and the amount of required energy from the utility grid

In the second level of the proposed PMS, the calculated values of \({E}_{G}\), \(A{E}_{NCL}\) and \(A{E}_{H}\) are provided to a real-time controller that manages the system’s power flow by using controllable switches. This relies on the following rules:

Rule 1: The critical load will be turned off if \({E}_{pv}\left(t\right)=0\) and \({E}_{b}\left(t\right)=0\) and the grid is off.

Rule 2: The non-critical load will be turned off if \({E}_{NCL}(t)>{AE}_{NCL}(t)\) and the grid is off (\({E}_{NCL}\) represents the electrical consumption of non-critical load).

Rule 3: If the battery is full, any surplus energy will be delivered to the immersion heater in the hot water system.

Rule 4: If \({E}_{b}\left(t\right)<{E}_{G}(t)\) and the grid is on, the battery will be charged with electricity from the grid.

To control the immersion heater two different strategies are considered:

  • Top-up controller:

    When the utility grid is on, a standard immersion heater is turned on if the temperature of hot water \(({T}_{HW}\left(t\right))\) is lower than the setpoint temperature \({(T}_{S})\). However, when the utility grid is off, in addition to the previous condition, it is important to ensure that the amount of energy consumed by the heater \(({E}_{H})\) does not exceed the amount of energy allocated to the heater. This is expressed by the following rules:

Rule 5: the immersion heater is turned off if \({E}_{H}\left(t\right)>A{E}_{H}(t)\) and, the grid is off or \({T}_{HW}\left(t\right)>{T}_{S}\)

  • Push Button request-based controller:

    When the household requires hot water, they activate the Push Button. Since the water should be heated quickly, a more powerful immersion heater is used. if the utility grid is on, the controller only compares the temperature of the hot water with the setpoint, but, if the grid is off, similar to the top-up controller strategy, the amount of energy consumed by the heater and the amount of energy allocated to it are compared. This is summarized by the following rules:

Rule 6: if the Push Button is active, the immersion heater is turned on if \({E}_{H}\left(t\right)<A{E}_{H}(t)\) and, the grid is off or \({T}_{HW}\left(t\right)>{T}_{S}\)

This proposed PMS can be integrated within a solar energy hardware solution using a microcontroller and three switches. As described above, its implementation is computationally very efficient as it only requires if-else statements and algebraic equations. Moreover, instead of using advanced optimization methods such as evolutionary optimization algorithms which require large numbers of iterations to converge to an optimal solution, the proposed PMS only needs to check the rules once which reduces further and significantly the processing time.

Figure 4 presents the associated electrical diagram. While the switches, i.e., SW1 ~ 3, control the on/off to the various electrical loads, the amount of energy stored in the battery is controlled through the battery charge controller. Trading between the house and the utility grid is managed through the inverter. In addition, two power meters are integrated into the system to measure the power consumption of critical and non-critical loads.

Fig. 4
figure 4

Electrical diagram of the solar solution integrating the proposed PMS

2.2 Optimal sizing

As the energy management strategy depends on the installed components of the system, optimizing their size is necessary to offer the best response to unplanned brownouts while minimizing the cost of the system [25]. Finding its optimal size, in terms of PV, battery and Solar hot water component corresponds to the minimization of a cost function according to energy balancing, reliability and temperature constraints.

That cost function (F), which includes all the individual costs of the system, is expressed by Eq. (2):

$$\begin{aligned} F &= \left[ {CAP_{pv} \cdot (CC_{pv} + CC_{con} ) + CAP_{batt} \cdot CC_{batt} + CAP_{hws} \cdot CC_{hws} + CC_{inv} + CC_{mis} } \right] \hfill \\&\quad + \frac{1}{CRF} \cdot [OMC_{pv} \cdot CAP_{pv} + C_{Grid} ] + k_{1} \cdot RC_{batt} \cdot CAP_{batt} + k_{2} .RC_{inv} + k_{3} .RC_{con} , \hfill \\ \end{aligned}$$
(2)

where: CAP, CC, OMC, RC represent the Capacity (size), initial Capital Cost, Operation and Maintenance Cost and Replacement Cost of the components, respectively. \({C}_{Grid}\) denotes the annual cost which the customer has to pay to the utility provider (electricity bill), while \(pv\), \(con\), \(batt\), \(inv\), \(hws\), and \(mis\) represent the costs of the PV panel, battery charge controller, battery, inverter, hot water system and miscellaneous items (including microcontroller, and meters), respectively. CRF is the capital recovery factor and k1, k2 and k3 are the present value factors for the battery, inverter and battery charge controller.

Those parameters are calculated using the following equations:

$$CRF=\frac{ir{(1+ir)}^{R}}{{(1+ir)}^{R}-1}$$
(3)
$$k_{i} = \mathop \sum \limits_{n = 1}^{{q_{i} }} \frac{1}{{\left( {1 + ir} \right)^{{L_{i} \times n}} }}, i = 1, 2,3$$
(4)

where:

$${q}_{i}=\left\{\begin{array}{c}\left[\frac{R}{{L}_{i}}\right]-1: if\; R\; is\; dividable\; by\; {L}_{i}\\ \left[\frac{R}{{L}_{i}}\right]: if\; R\; is\; not\; dividable\; by\; {L}_{i}\end{array}\right.,\quad i = 1, 2, 3$$
(5)

where R is the project lifetime, L1, L2 and L3 are the lifetimes of the battery, inverter, and battery charge controller, respectively, and ir is the discount rate.

To solve the cost function, the following three constraints need to be considered:

  1. (i)

    Energy balancing constraint:

    The amount of delivered power by PV (\({P}_{pv})\), battery (\({P}_{batt}\)) and utility grid (\({P}_{g}\)) should supply the total consumption as follows:

    $${P}_{pv}\left(t\right)+{P}_{g}\left(t\right)+{P}_{batt}\left(t\right)={P}_{cl}\left(t\right)+{P}_{ncl}\left(t\right)+{P}_{h}\left(t\right)+{P}_{s}\left(t\right)-{P}_{uncl}\left(t\right)-{P}_{unncl}\left(t\right),$$
    (6)

    where: \({P}_{cl}\left(t\right),\) \({P}_{ncl}\left(t\right)\) and \({P}_{h}\left(t\right)\) denote the critical load, non-critical load, and consumption of immersion heater, respectively. \({P}_{s}\left(t\right)\) represents the amount of power surplus, \({P}_{uncl}(t)\) and \({P}_{uncl}\left(t\right)\) represent the amount of critical and non-critical unmet loads at the tth hour.

  2. (ii)

    Reliability constraint:

    The Equivalent Loss Factor (ELF) index is considered as the reliability constraint for each critical and non-critical load as follows [26]:

    $${ELF}_{cl}=\frac{1}{H}\sum _{t=1}^{H}\frac{{P}_{uncl}(t)}{{P}_{tot}(t)}<{e}_{cl},$$
    (7)
    $${ELF}_{ncl}=\frac{1}{H}\sum _{t=1}^{H}\frac{{P}_{unncl}(t)}{{P}_{tot}(t)}<{e}_{ncl},$$
    (8)

    where: H describes the number of hours, and \({P}_{tot}(t)\) represents the total amount of electrical load at the tth hour.

  3. (iii)

    Temperature constraint:

    The temperature constraint represents the average temperature of the delivered hot water. It is estimated by Eq. (9):

    $${T}_{d}=\frac{1}{{M}_{T}}\sum _{t=1}^{H}M\left(t\right)\times T\left(t\right)>{e}_{t},$$
    (9)
    $${M}_{T}=\sum _{t=1}^{H}M\left(t\right),$$
    (10)

    where: \(M\left(t\right)\) and \(T\left(t\right)\) denote the hot water consumption and the temperature of delivered hot water at the tth hour.

3 Evaluation and optimization: case study

The evaluation of the proposed smart PMS and the optimal sizing strategy that determines the components of the associated solar solution was conducted using the case study described in this section. After introducing the hardware description of the selected solar system and the mathematical models that characterize its components, data collected from a low-income house are presented and relevant predictive models are proposed. The low-income house has been considered to access electrical supply at a tier 3 level. This level represents a house with essential electrical equipment and medium power appliances with daily electrical power consumption of between 1000 and 3425 Wh according to the multi-tier matrix proposed by the world Bank [27, 28].

3.1 Hardware description of the solar system

The selected solar system is a state-of-the-art solution which supports electricity and hot water demands in an efficient and cost-effective way by combining electrical and thermal energy storage with solar heat and electricity generation [29]. Developed in the SolaFin2Go project, the system principally consists of PV panels, battery, and solar water heating technology (the SolaCatcher—produced by SolaForm Ltd), which can be standalone, or grid connected (see Fig. 5).

Fig. 5
figure 5

Illustration of the selected solar system [41]

In this system, the photovoltaic panels provide the initial supply to the electrical load. It can be augmented by the energy stored in the associated batteries and finally from the grid. Hot water provided by the solar water heater is supported by an integrated internal electric immersion heater, which can provide an additional heat input when solar energy alone is not sufficient to meet requirements. At any time, if the batteries are full, surplus energy is delivered to the immersion in the solar water heater where it is stored as thermal energy.

As the optimal design of the system requires mathematical modelling of the different components, i.e., the photovoltaic panels, batteries and the hot water system, their respective models are presented as follows. While a detailed model of the converters and distribution system could have been used for more accurate modelling of the solar energy system [30], in this study, which is focused on system configuration and development of an intelligent power management system, only the power loss of AC–DC distribution systems was modelled.

3.2 Photovoltaic panel

The output power of a PV panel, \({p}_{PV}\), depends on the amount of solar radiation and the temperature of the PV cells within the panel. This is expressed by Eq. (11):

$${p}_{PV}\left(t\right)={P}_{R,PV}\times \frac{I(t)}{{I}_{ref}}\times [100+{N}_{T}\left({T}_{c}\left(t\right)-{T}_{ref}\right)/100]$$
(11)

where: I(t) describes the total solar radiation reaching the PV panel surface \(\left(W/{m}^{2}\right)\) at time tth, Iref is the solar radiation at a reference condition (conventionally 1000 \(\mathrm{W}/{\mathrm{m}}^{2})\), PR,PV is the PV rated power, Tref is the cell temperature at a reference conditions (conventionally 25 °C), NT is the temperature coefficient of the photovoltaic panel (%/°C).

The cell temperature \({T}_{c}\left(t\right)\), can be calculated by Eq. (12):

$${T}_{c}\left(t\right)={T}_{air}\left(t\right)+I\left(\frac{NOCT-20}{800}\right),$$
(12)

where: Tair(t) is the ambient air temperature and NOCT is the normal operating cell temperature when the PV module is operating under 800 \(\mathrm{W}/{\mathrm{m}}^{2}\) irradiance and 20 °C air temperature. NOCT is one of the PV module specifications provided by the manufacturer [31].

3.3 Battery

At the times of discharge and recharge, the battery energy per hour can be obtained from the following equations, respectively [32]:

$$E_{b} \left( {t + 1} \right) = max\left\{ {\left( {E_{b} \left( t \right) - \Delta t \cdot \frac{{P_{batt} \left( t \right)}}{{\mu_{d} }}} \right), E_{b, min} } \right\},$$
(13)
$$E_{b} \left( {t + 1} \right) = min\left\{ {\left( {E_{b} \left( t \right) + \Delta t \cdot \frac{{P_{batt} \left( t \right)}}{{\eta_{c} }}} \right), E_{b, max} } \right\},$$
(14)

where:

$${{P}_{batt,min}\le P}_{batt}\left(t\right)\le {P}_{batt,max},$$
(15)

\(E_{b} \left( t \right)\) denotes the energy in the battery at time t, \(\eta_{d}\) and \(\eta_{c}\) stands for the battery discharge and charge efficiency, \(E_{b, min}\) and \(E_{b, max}\) represents the minimum and maximum amount of allowed energy in the battery, \(P_{batt} \left( t \right)\) expresses the power supplied to or discharged from the battery at time t, \(P_{batt,min}\) and \(P_{batt,max}\) describe the minimum and maximum amount of allowed power supplied to or discharged from the battery.

3.4 Hot water system (SolaCatcher)

The hot water system consists of an integrated collector storage solar water heater. This technology combines solar collection and thermal storage and works by collecting solar radiation that is incident on the exposed absorbing surface and, then, transferring thermal energy into useful stored heat in the inner vessel. The temperature of hot water in the vessel is calculated by the following equation [33]:

$${T}_{w}\left(t+1\right)={T}_{w}\left(t\right)+\frac{{Q}_{H}\left(t\right)+X\bullet {Q}_{f}\left(t\right)+\left(1-X\right){ Q}_{r}\left(t\right)-{Q}_{D}\left(t\right)}{m{c}_{p}},$$
(16)

where: \({T}_{w}\) is the hot water temperature (˚C), \({Q}_{H}\), \({Q}_{f}\),\({Q}_{r}\) and \({Q}_{D}\) represent, respectively, the energy of the immersion heater, the forward mode solar gain energy, the reverse mode energy loss and the energy delivered by the system at time t. If \({Q}_{f}\left(t\right)>{Q}_{r}\left(t\right)\) then the thermal diode is in the forward operating mode and X = 1, otherwise it is in the reverse operating mode and X = 0.

The forward mode solar gain energy is defined as:

$${Q}_{f}\left(t\right)=A.\Delta t\left(K\bullet G F\tau \alpha -{FU}_{L}\left[{T}_{w}\left(t\right)-{T}_{a}\left(t\right)\right]\right){\left[{e}^{ \frac{{A.FU}_{L}\Delta t}{m{\bullet c}_{p}}}\right]}^{-1},$$
(17)

where: \(A\) is the planar area of the absorber exposed to direct sunlight (m2), \(\Delta t\) is the time period (s), \(G\) is the solar radiation (W·m−2), \(F\tau \alpha\) is the optical coefficient, \({FU}_{L}\) is the thermal loss coefficient during the forward mode operation (W·m−2 C−1), \({T}_{a}\) is the ambient air temperature (˚C), \(m\) is the mass of water in the storage tank (kg), and \({c}_{p}\) is the specific heat capacity at constant pressure (J·kg−1C−1). Finally, K is a solar incidence angle parameter dependent upon the time of day (where h = 0 corresponds to solar noon) and the orientation of the hot water system.

For a SolaCatcher with its axis-oriented east–west, the parameter K can be approximated by:

$$K = \left\{ {\begin{array}{*{20}c} {1,} & { - 2 < h < 2} \\ {\sqrt {\frac{2.5}{{\left| h \right|}}} , } & { at\; other\; times} \\ \end{array} } \right..$$
(18)

The reverse mode energy loss is:

$$Q_{r} \left( t \right) = - Q_{w} \left( t \right)\left( {1 - \left[ {e^{{ \frac{{A \cdot U_{r} \Delta t}}{{m \cdot c_{p} }}}} } \right]^{ - 1} } \right),$$
(19)

where \({U}_{r}\) is the thermal loss coefficient during the reverse mode operation (W·m−2 C−1), and \({Q}_{w}\left(i\right)\) is the thermal energy contained in the stored hot water.

It is calculated as follows:

$${Q}_{w}\left(t\right)=m{c}_{p}\left[{T}_{w}\left(t\right)-{T}_{a}\left(t\right)\right].$$
(20)

If hot water is extracted from the system, \({Q}_{D}(t)\) represents the heat energy delivered by the system at time t.

$${Q}_{D}\left(t\right)=M\left(t\right). {c}_{p}\left[{T}_{w}\left(t\right)-{T}_{in}\left(t\right)\right],$$
(21)

where: \(M\) represents the mass of water draw-offs (kg) and \({T}_{in}\) is the temperature of incoming water at the inlet of the hot water system (°C).

3.5 Low-income house

The simulation of the proposed solution is performed using data collected from a house equipped with the solar and storage solution described in the previous section (see Fig. 6). This house located in Jamataka, Botswana, at the coordinates 21.08° S and 27.14° E [29] was occupied by a low-income one-child household. Electricity and hot water consumption were measured from this house for a period of one year from 01/10/2018 to 30/09/2019. However, as consumption of an electric hob cooker was not available, it is simulated through a uniform distribution function relating to the usual cooking hours of the family.

Fig. 6
figure 6

a Low-income house in Jamataka. b Solar and storage solution installed at that house [29]

In some parts of Botswana, grid constraints are imposed by the utility provider which limit maximal delivery per household during the morning peak from 6:00 to 10:00 and during the evening peak from 18:00 to 22:00 [34]. Finally, to demonstrate further the robustness of the proposed solution, unplanned brownouts are also considered. Thus, in this simulation, it is assumed that unplanned brownouts occur randomly 4.5% of the time with an average duration of 5 h per event, which is a common occurrence in the region.

As mentioned before, the proposed PMS is a prediction-based method that relies on predicted values of output power of PV, critical loads, and non-critical loads for 24 h. Thus, a predictive model needs to be developed for each of these three time series. In addition, as the hot water demand affects both electricity consumption and the optimal size of the components, the house’s hot water consumption data is also discussed.

3.6 Output power of PV

As the house is equipped with a 280 W PV panel installed on a North facing 27° sloped roof, it is possible to estimate its associated output power using Eq. (11) from relevant solar radiation and temperature data. Fortunately, the Photovoltaic Geographical Information System provides free and open access to hourly datasets of solar radiation, temperature, and wind speed for regions all over the globe from 2005 to 2016 [35]. Thus, the required data could be retrieved for a nearby location (coordinates 17.82° S and 31.05° E) for a suitable period, i.e., from 01/10/2014 to 30/09/2015.

Exploration of the data revealed that the average daily power generation was 1488 (Wh/Day) with a minimum and a maximum of 179 (Wh/Day) and 1897 (Wh/Day), respectively. Figure 7 displays the output power of a 280 W PV panel in December 2014.

Fig. 7
figure 7

The output power of the house’s PV panel per hour from 01/12/2014 to 31/12/2014

In order to select an appropriate predictive model, linear correlation of data was first investigated. Figure 8 illustrates the Auto-Correlation Function (ACF) of output power of PV data. As shown in Fig. 8, since there is a strong linear relationship among the data, usage of linear models is suitable for predictions. The linear methods, in addition to being easy to implement on a microcontroller, are very reliable and can be used in autonomous mode in the smart PMS.

Fig. 8
figure 8

Auto-correlation function of output power of PV data

The next issue to consider is the seasonal behavior of the output power of PV data. Indeed, the different seasons are associated with changes in ambient temperature and solar radiation that reaches the earth's surface. Such behavior can be investigated by using a rolling window linear regression [36]. The strength of this method, as shown in Fig. 9, is that in each window period, its associated data are used to update the regression coefficients. This allows the predictive model to adjust itself dynamically for seasonal changes.

Fig. 9
figure 9

Principle of a rolling window linear regression

In order to determine the regression model’s inputs, a phase space reconstruction of the power output of the PV data is utilized [37]. Given a time series \(A=\left\{{a}_{1}, {a}_{2}, \dots , {a}_{n}\right\}\), the kth phase space reconstruction vectors,\({x}_{k}\), for this time series are defined as:

$${x}_{k}=\left\{{a}_{k},{a}_{k+\tau },{a}_{k+2\tau },\dots ,{a}_{k+(d-1)\tau }\right\},$$
(22)

where d and \(\tau\) represent dimension and delay, respectively.

The false nearest neighbor method is used to calculate the dimension [38], and the mutual information method is used for delay calculation [39]. Based on these methods, the dimension and delay values of output power of PV data have been estimated as 5 and 5, respectively. Hence, a regression model with five inputs is considered as follows:

$$P^{\prime}_{pv} \left( t \right) = \alpha_{1} P_{pv} \left( {t - 24} \right) + \alpha_{2} P_{pv} \left( {t - 29} \right) + \cdots + \alpha_{5} P_{pv} \left( {t - 44} \right),$$
(23)

where: \(P_{pv}\) is the actual value of the output power of PV, \(P^{\prime}_{pv}\) is the predicted value of the output power of PV and \(\alpha\) represents the regression coefficients which are calculated by the LSE method [40]. The mean absolute percentage error (MAPE) of the prediction is 19.55%.

3.7 Critical and non-critical loads

Since the case study’s target is a low-income household, the fridge and lighting are considered as critical loads, whereas the electric hob, TV and receiver, fan and other electrical devices are defined as non-critical loads. Accordingly, data reveal that the average critical load is 1873 Wh/Day, while its minimum and maximum are 1346 Wh/Day and 2160 Wh/Day, respectively. The average non-critical load is 915 Wh/Day, the minimum is 91 Wh/Day and the maximum is 1278 Wh/Day. Figure 10 displays the measured critical and non-critical loads for a period of one month (December 2017).

Fig. 10
figure 10

Hourly electrical demand for the case study from 01/12/2017 to 31/12/2017: a critical load, and b non-critical load

First, linear correlations of both critical and non-critical loads datasets are investigated to choose an appropriate predictive model. Figure 11 reports the Auto-Correlation Function of critical and non-critical loads.

Fig. 11
figure 11

Auto-correlation function a critical load data, b non-critical load data

Due to the strong linear relationship between the data, the linear regression model is selected for both critical and non-critical loads. Delay and dimension for critical load are 5 and 9 respectively and for non-critical load they are 5 and 3. Thus, Eq. (24) is used for critical load and Eq. (25) is used for non-critical load.

$$CL^{\prime}\left( t \right) = \alpha_{1} CL\left( {t - 24} \right) + \alpha_{2} CL\left( {t - 33} \right) + \cdots + \alpha_{5} CL\left( {t - 60} \right),$$
(24)
$$NCL^{\prime}\left( t \right) = \alpha_{1} NCL\left( {t - 24} \right) + \alpha_{2} NCL\left( {t - 27} \right) + \cdots + \alpha_{5} NCL\left( {t - 36} \right),$$
(25)

where: \(CL\) and \(NCL\) are actual values of critical and non-critical loads, \(CL^{\prime}\) and \(NCL^{\prime}\) are predicted values of critical and non-critical loads and \(\alpha\) represents the regression coefficients which are calculated by the LSE method.

The results show that the MAPE for the critical load is 4.9%, while it is 20.7% for the non-critical load. This difference in prediction accuracy is due to the fact that, whereas the critical load tends to display a periodic behavior, the non-critical load results from usage of many electrical devices, some of which are operated in a rather arbitrary fashion.

3.8 Hot water consumption

The average considered hot water consumption for the house is 49.4 L/Day, the minimum and maximum are 0 L/Day and 197.5 L/Day, respectively. As the collected data do not include the hot water consumption for taking showers, the associated hot water consumption was estimated to be 20 L per day assuming one shower a day between 15:00 and 19:00. This assumption is in line with the average hot water consumption of an electric shower that is reported to be 22.6 L per event [41].

4 Results and discussion

In this section, the performance and financial benefits of using the proposed solution for the presented case study are analyzed. As the lifetime of its main components is 25 years (see Table 1), the lifetime of the solution is also considered to be 25 years. Thus, the optimal sizing of each component is calculated for this period of time. The costs and specifications of the individual components installed on the low-income house in Jamataka are reported in Table 1 (Provided by SolaForm [42]). In addition, electricity tariffs are retrieved from those provided by the Botswana Power Corporation [34]. The average total electricity demand of the household including the critical and non-critical loads and required energy for hot water is 3230 W/Day.

Table 1 Costs and specifications of the solar solution’s components

4.1 Optimization results

In order to not only investigate the performance of the solar and storage solution, but also evaluate the efficiency of the proposed smart PMS, four different systems are considered (their characteristics are summarized in Table 2).

Table 2 Characteristics of the four systems that are considered in this experiment

Case 1: The baseline case where the electrical load is supplied by the utility grid and hot water is provided by a standard electric hot water heater, known as an electric geyser. Here, a 28 L capacity is considered so that it matches that of the SolaCatcher and allows for meaningful comparisons. The control of the electric hot water relies on a Push Button request.

Case 2: Usage of the solar and storage solution where the power flow is managed by the proposed smart PMS using a top-up controller for SolaCatcher equipped with a standard 100 W immersion heater.

Case 3: Usage of the solar and storage solution where the power flow is managed by the proposed smart PMS using a SolaCatcher with a Push Button and a more powerful 400W immersion heater is also included in this case.

Case 4: Usage of the solar and storage solution where the power flow is managed by a self-consumption maximization strategy. More specifically, the electrical load is supplied by the power generated by the PV. Any electrical shortage is compensated with energy stored in the battery. If it is not sufficient, the utility grid supplies the required additional energy. At all times, surplus energy is stored in the battery and if the battery is full, it is delivered to the SolaCatcher. Control of the SolaCatcher equipped with the powerful 400 W immersion heater is based on a Push Button request.

Following simulations in MATLAB, the results for all cases are presented in Table 3. For Cases 2 and 3, the optimal sizes of the PV, the battery, and the SolaCatcher were determined by a genetic algorithm using Eqs. (2)–(8). Regarding the setpoint temperature, while it was calculated using Eqs. (9) and (10) in Case 2, in Case 3, it was fixed at 40 °C, which is in line with a typical shower water temperature [41].

Table 3 Results in terms of costs and reliability for the considered solar and storage solutions

While the reliability constraints, \({ELF}_{cl}\) and \({ELF}_{ncl}\), can be customized according to a consumer’s requirements, environment, and budget, in this study, they are set to be lower than 0.001 and 0.005, respectively. As the house of this case study operates in an environment with a weak electricity grid and unplanned brownouts, it is expected that the delivery of such reliability is a realistic goal when compared to, on one hand, that of developed countries, i.e., below 0.0001, and, on the other hand, that of off-grid buildings, i.e., below 0.01 [26]. Regarding the temperature constraint needed in Eq. (9), it is set to 32 °C to ensure basic minimum comfort for the user.

As shown in Table 3, if one only considers the total cost for a 25-year period, Case 1 is clearly the cheapest solution. However, the associated quality of delivered energy is very poor. Indeed, the ELF index is even higher than the recommended threshold for off-grid buildings, i.e., 0.01 [26], which indicates the reliability of the utility grid is very low. As provision of such quality of service is considered unacceptable, governments and/or utility providers in sub-Saharan countries look for investment opportunities in terms of energy generation solutions that are able to increase reliability of the provided energy. It is in this context that the other cases are discussed to establish the best option for investment. The results show that the annual electricity bill for the house without using a solar solution is $132.4. Moreover, the total amount of unmet loads is 4.56%, which reflects the common situation that low-income households in sub-Saharan countries often have unreliable access to energy even if connected to a national grid.

In all other cases, i.e., involving a smart PMS, simulations report that the optimal number of solar panels is three and a single 28L SolaCatcher is sufficient to cover hot water consumption. However, the size of the required battery varies.

In Case 2, the optimal size of the solar and storage solution consists of three 280W PV panels, a 2640Wh battery and a 28L SolaCatcher. As reported in Table 3, management of that equipment with the proposed smart PMS and usage of a Top-Up temperature controller lead to a reduction of the annual electricity bill by 52%. Experiments also show that the smart PMS performs well in managing the power flow in cases of unplanned brownouts: unmet critical load is reduced from 3.05 to 0.05%, which indicates a significant increase in energy security, and unmet non-critical load decreases from about 1.5% to less than 0.5%. In this case, the SolaCatcher with its 100W immersion heater satisfies the hot water demands by delivering an average hot water temperature of 32.2 °C, which is above the 32 °C temperature constraint.

Case 3 is very similar to Case 2, with the exception that the hot water temperature is controlled by activation of a Push Button. This modification leads to an optimal system with a slightly reduced battery size, 2520 Wh instead of 2640 Wh. Not only does it reduce the cost of equipment, but, as less energy is used to heat the water, the annual bill is also further reduced with a decrease of 64% compared to the baseline case. In addition, the average temperature of the delivered hot water is 36.5 °C, which is 4.3 °C higher than in the previous two cases. Consequently, lower energy consumption and the provision of hotter water demonstrates the value of using a Push Button controller instead of a top-up, especially given that electricity reliability is not affected.

Case 4 corresponds to the solar and storage solution managed by a self-consumption maximization strategy. As the results show, the amount of unmet critical load in this case is 0.53%, which is ten times more than for Case 3. The superiority of the smart controller can be explained by the fact that it takes advantage of the predicted values of both power generation and consumption to store spare energy in the battery allowing it to provide better resilience when unplanned brownouts occur.

The effect of the smart solar and storage solution on reducing stress on the utility grid was also investigated. This is important because this may give a strong incentive for utility providers to invest and subsidize the installation of the proposed solution. Figure 12 compares the average of energy demanded from the utility grid in Case 1 and Case 3.

Fig.12
figure 12

Average amount of purchased energy from the utility grid in Case 1 and Case 3

As shown in Fig. 12, the proposed solution leads to an average grid energy demand reduction by 87% during a 24-h period. Moreover, the reduction is 89% during the morning peak and 75% in the evening peak. Therefore, in addition to providing affordable and stable energy, the proposed solution supports weak and stressed electricity grids by reducing power demand in peak load hours.

4.2 Load growth analysis

Since there is currently only essential electrical equipment and one considers a 25-year investment, it is important to consider how an increase in electrical load during the period would affect the performance of the installed system. Figure 13 reports changes of the reliability indices in the case of load growth. It is assumed that critical and non-critical loads increase by the same coefficient.

Fig. 13
figure 13

Changes of the reliability indices in case of load growth: a critical load, b non-critical load

Figure 13a shows that with up to a 25% load growth, the smart PMS is still able to maintain the same reliability in terms of critical load. However, further load growth increases the unmet critical load linearly. An important point to consider is that even in the case of a 50% load growth, the amount of unmet critical load remains lower than the acceptable criterion for unmet critical loads, i.e., 0.1%. This demonstrates that the smart PMS has the capacity to manage the critical load even in situations of significant load growth. Regarding the non-critical load, as shown in Fig. 13b, load growth directly increases the unmet load. However, since this type of load is non-critical, a higher percentage of unmet load could be acceptable. Fortunately, since the system is modular, if the customers were to require higher reliability, this could be accommodated by adding extra components.

5 Conclusion

This paper presents an optimal design solution for the use of solar energy to deliver affordable and reliable energy access and supply hot water demand based on the requirements of a typical low-income household in a sub-Saharan country. As a part of the solution, a smart power management strategy is developed to manage the power flow in the system.

The proposed PMS is a practical and reliable two-level method which is able to control the system autonomously. In the first level, the allocated energy to each electrical load is optimally determined based on their priorities. It relies on the predicted values of power production and power consumption to decrease the unmet loads in the case of unplanned brownouts. The second level is an integrated real-time control of the electrical feeders and hot water temperature. This controller provides the customer with both reliable energy and stable hot water.

Indeed, performance evaluation on a case study shows that the solar solution that is controlled by the proposed PMS is able to increase the reliability of the electricity supply from 95.5 to 99.5%. In addition, the temperature of the delivered hot water is 4.5 °C higher than the required minimum value. Moreover, compared to conventional controllers, not only does this smart PMS reduce the amount of unmet critical load by a factor of 10, but, in the case of significant load growth, it is still able to deliver the desired reliability for the critical load. Finally, in addition to good reliability performance, the proposed solution provides affordable energy for low-income customers by delivering a 64% reduction in associated annual electricity bills.