Keywords

1 Introduction

The sun is the largest source of renewable energy available on the planet, so it makes sense the global effort to develop solutions for its use on a large scale. Until a few years ago, the price of solar technologies and their low efficiency in the conversion were constrains to its growth. However, today, with the price decreasing together with the increasing of PV modules efficiency, the photovoltaic solar energy becomes an interesting solution.

The objective of this paper is to develop of a computational model that predicts the behavior of a PV stand-alone system, knowing the incident solar radiation and the temperature of the site. To achieve this goal, different blocks like PV solar panels, batteries, charge controller and DC/AC inverter were modeled under Matlab/Simulink, which proved to be a robust and versatile tool for this kind of study.

Several authors have studied this topic, mainly the development of models for the photovoltaic system blocks. In the references [1, 2], we can find examples of models for the PV panels developed in Simulink. For the battery block development, there are several types of possible solutions, but the most used are those that use the blocks belonging to the Simulink’s library itself, as used in references [3, 4], there is also the option to create new solutions, such as [5, 6]. The model of the inverter block is addressed in several references [7, 8] where different mathematical models of an inverter were created in Simulink.

2 Photovoltaic Systems

The use of solar energy to produce electrical power is done through photovoltaic systems which convert this energy through the photovoltaic effect. This conversion takes place in the photovoltaic cell but its production is low, so it becomes necessary to associate several cells in series and in parallel, forming the photovoltaic panels. The energy produced by these panels can be stored in batteries which in turn needs to be controlled by charge controllers to extend the batteries lifespan. To supply AC loads, photovoltaic systems need an inverter, whose function is to convert direct current to alternating current.

2.1 Photovoltaic Modules

The photovoltaic cell can be approached by a current source in parallel with a diode, where the output is proportional to the incident solar radiation on the cell. The PV current source represents the equivalent current generated by solar radiation and the diode representing the electron exchange at a p-n junction crossing by ID current, which is dependent of its own saturation current (Ipv) and voltage between the photovoltaic cell terminals, given by Eq. 1.

$${I}_{D}={I}_{0}\left({e}^{\frac{V}{m{V}_{T}}}-1\right)$$
(1)

where m is – is the diode ideality factor and VT – is the thermal equivalent potential, k the Boltzmann constant (1,38 × 10−23 J/K), T – cell’s temperature, in (°K); q – electron’s electric charge (1,6 × 10−19 C). To better understand the behavior of photovoltaic cells, many manufacturers provide the values of VOC, ISC and Pmax, at Standard Test Conditions (STC, cell temperature of 25 ℃ and an irradiance of 1000 W/m2). Photovoltaic cells have a limited potential, since the open circuit voltage is independent of the solar cell area and is limited by the semiconductors properties. The maximum power of a cell does not exceed 2 W, which is insufficient for supply most applications, so, the cells are grouped into photovoltaic modules, which in turn are also grouped together forming a photovoltaic panel [9]. The parameters that characterize photovoltaic modules are usually [10]:

  • Constant parameters, like the ideality factor (m) given by Eq. 2.

    $$m=\frac{{V}_{max}-{V}_{OC}}{{V}_{T}ln\left(1-\frac{{I}_{max}}{{I}_{SC}}\right)}$$
    (2)
  • Parameters that depend on radiation, like short-circuit current (ISC), given by Eq. 3, where G represents the solar radiation.

    $${I}_{SC}={I}_{SC}^{STC}\frac{G}{{G}^{STC}}$$
    (3)
  • Parameters that depend on temperature, like reverse saturation current (IO), given by Eq. 4.

    $${I}_{O}={I}_{O}^{STC}{\left(\frac{T}{{T}^{STC}}\right)}^{3}{e}^{\frac{\epsilon }{{m}^{^{\prime}}}\left(\frac{1}{{V}_{T}^{STC}}-\frac{1}{{V}_{T}}\right)}$$
    (4)

2.2 Battery Model

The possibility of storing energy produced by photovoltaic modules for later consumption, during the night or on lower solar radiation days, is one of the great advantages in this type of systems, being the batteries a fundamental part of the solution, because they allow the storage of the electric energy. Photovoltaic systems use rechargeable batteries and the most commonly used are lead-acid batteries; Nickel-Cadmium batteries (NiCd); Nickel-metal hydride batteries (NiMH) and Lithium-ion batteries (Li-ion). The battery capacity is measured by the amount of electrical charge, ie by the number of hours that a given current can be supplied by a fully charged battery, expressed in Ampere hour (Ah), given by the product of the supplied current and the time in hours, corrected for the reference temperature [4]. Many batteries models have been developed, including [11] which developed an equation to describe its electrochemical behavior in terms of the final voltage, the open circuit voltage, internal resistance, discharge current and the state of charge (SOC) that can be applied to both cycles (charge and discharge). The simple electric model that represents a rechargeable battery consists of an ideal voltage source in series with an internal resistance. This model, assumes the same characteristics for the charging and discharging cycles, as shown in the Fig. 1. The controlled voltage source is described by Eq. 5.

Fig. 1.
figure 1

Equivalent circuit of a battery [8].

$$E={E}_{0}-K\frac{Q}{Q-it}+A{e}^{-B\cdot it}$$
(5)

where E – open circuit voltage; E0 – initial cell potential; K – polarization coefficient in Ωcm2; Q – Battery charge in coulomb; A and B – empirical constants; R – internal resistance; i – discharging/discharging current. The battery voltage is then obtained from Eq. 6.

$${V}_{batt}=E-R\cdot i$$
(6)

2.3 Charge Controller and Inverter

The batteries lifetime depends on its charge and discharge profile. The charge controller monitors the battery’s voltage by analyzing its voltage during the charging process, helping to increase their life cycle. When the charging is complete, the controller stops supplying current to the battery avoiding the loss of electrolyte and a possible batteries overheating, and typically the state of charge should not exceed 90%. Then, whenever the battery’s voltage decreases to a certain value, the charge controller allows a charging current and the charging process starts again. Usually, the charge controllers are chosen according to the system’s power and the battery type and can be either series or shunt.

The inverters have an important role in photovoltaic systems, because they establish the link between the DC current generated by the photovoltaic module and the AC grid. The inverter’s main function is to convert the DC voltage in a single or three-phase AC voltage, and adjust it to the frequency’s characteristics and the appropriate voltage level for its network connection or for use in a stand-alone system. There are two main groups of inverters, the ones corresponding to stand-alone PV systems and those used in grid-connected PV systems.

3 System Modelling

The process developed to obtain the proposed PV system will be presented and analyzed in detail, namely the several system blocks, always showing the simulation results that prove its accuracy.

3.1 Photovoltaic Module

The developed module consists in two inputs, which represents the temperature and the solar radiation and three outputs: current, voltage and generated power. Each PV module has its own characteristics that depend on the manufacturer. These characteristics, are introduced into the system before each simulation. The PV module model was developed with the help of several sets of blocks, called “Embedded MATLAB Function”, which allow performing mathematical calculations, based on standard values and some introduced parameters. To develop this module were necessary eight blocks:

  • Block 1 – Ideality factor;

  • Block 2 – Equivalent ideality factor;

  • Block 3 – Reverse saturation current;

  • Block 4 – Cell operating temperature: This block is responsible for calculating the cell operating temperature (TC), using Eq. 7.

    $${T}_{c}={T}_{a}+\frac{G\left(NOCT-20\right)}{800}$$
    (7)

    where, G – solar radiation (W/m2); Ta – ambient temperature (℃); NOCT – normal operation cell temperature (℃).

  • Block 5 – Thermal potential;

  • Block 6 – Output current;

  • Block 7 – Output voltage: this block joins the calculated values obtain in Blocks 1, 2, 3 and 5. The maximum voltage is very dependent of short circuit current, maximum current and reverse saturation current variation with temperature and can be calculated based in Eq. 8.

    $${V}_{max}={mV}_{T}\mathrm{ln}\left[\frac{\frac{G}{{G}^{STC}}\left({I}_{SC}^{STC}-{I}_{max}^{STC}\right)}{{I}_{0}^{STC}{\left(\frac{T}{{T}^{STC}}\right)}^{3}{e}^{\frac{\epsilon }{{m}^{^{\prime}}}\left(\frac{1}{{V}_{T}^{STC}}-\frac{1}{{V}_{T}}\right)}}\right]$$
    (8)
  • Block 8 – Output power: multiplies two signals from blocks 6 and 7, which correspond to the current and voltage of the PV module, respectively.

The entire structure described above is shown in Fig. 2. To verify the accuracy of the developed PV module, several tests were performed based on results obtained in several references [12] and the results confirm the good approximation between the developed model and those previously mentioned.

3.2 Battery

For lead-acid battery model was used a Simulink block approaching. Figure 3 shows the internal structure of the battery, which has as input parameters the current drawn by photovoltaic module/panel (input 1) and ground (input 2) and as output the parameter m. The output parameter m is divided into three parameters of special importance, which are the SOC (state of charge), the discharge current and the output voltage. The Model Continuous block is very important because there will result the values of SOC, battery current and voltage.

Fig. 2.
figure 2

Complete diagram of the photovoltaic module model.

To test the operation of this block was used the same battery of the reference [13], whose characteristics are presented in Table 1, this is the BP 1.2-12 battery (B.B. Battery, country).

Table 1. Characteristics of BP 1.2–12 battery.
Fig. 3.
figure 3

Battery internal structure.

This model was used to simulate the battery behavior in a charge/discharge test, and the results are shown in Fig. 4.

Fig. 4.
figure 4

Charging and discharging test with 12 V and 1.2 Ah battery.

3.3 Charge Controller

The charge controller block was developed with the objective of creating limits to the charging and the discharge processes. For this purpose, upper and lower limits were defined for the SOC parameter. Whenever the SOC value is only 20% or below, the battery will no longer supply the loads, only doing it again when its value exceeds 20%. In the case of the upper limit, the battery charge must not exceed 90% of its capacity, returning to the charging process when it returns to 86% or below. Figure 5 shows the internal structure of the charge controller block.

Figure 6 shows the battery charge current curve and the battery state of charge (SOC). Taking into account that from time t = 12,5 s the battery SOC reaches 90%, thus, between 12,5 s and about 18 s, the battery does not charge, waiting the moment where the SOC reaches 86%. Thus, it is possible to confirm the reliable operation of the developed charge controller.

Fig. 5.
figure 5

Internal structure of the charge controller block.

Fig. 6.
figure 6

Example of charge controller operation during the battery charging and discharging processes.

3.4 Inverter

In order to supply AC loads it is necessary to include an inverter block. A Matlab/Simulink model was developed to simulate the inverter, depicted in Fig. 9. To test the inverter behavior, a 12 V DC voltage source was used to simulate the battery output voltage. As can be seen in Fig. 7, the power supply is connected to the “Universal Bridge” block, which is a model that can be configured with a series of electronic power devices, such as IGBT, MOSFET and thyristors, among others. The “Universal Bridge” allows to choose the characteristics to use and in addition the choice of the power device, the number of bridges as well others specific parameters. In this study, IGBT’s and Diodes with three bridges were chosen in order to constitute a three-phase inverter, and also the values of the damping resistance Rs and the damping capacity Cs are chosen, which when dealing with IGBT devices must be purely resistive, thus choosing Rs = 5000 Ω and Cs = ∞. The “g” signal is an input parameter to control the electronic power devices, being in this case a six-pulse PWM wave with a frequency of 1080 Hz. The transformer block is used to rise the voltage value to the desired levels and simultaneously filter high frequencies. Figure 8 shows the voltage waveform in the inverter output, in this case voltage value between two phases.

Fig. 7.
figure 7

Inverter block diagram.

Fig. 8.
figure 8

Three-phase voltage between two phases at the transformer output (Uab).

3.5 Loads

The loads will be modeled by a variable resistance RL that represents the instantaneous power consumed in the circuit (PL). The resistance value can be calculated through Eq. 9.

$${R}_{L}=\frac{{V}^{2}}{{P}_{L}}$$
(9)

Figure 9 shows the structure of the load block. The input current from the load controller is injected into the input 1 through the equivalent low-values cables resistances. The load supply is controlled by a switch that acts according the load consumption diagram. Therefore, the “Signal Builder” block defines the moments when the loads are switched ON or OFF.

Fig. 9.
figure 9

Load block diagram.

After the implementation of the different blocks belonging to the PV system (previously described), they were connected in order to work as a complete system, Fig. 10. This model proves to be reliable, flexible and can be used at any time for different number of photovoltaic panels, batteries and loads.

Fig. 10.
figure 10

Complete photovoltaic system modeled in Matlab/Simulink.

4 Simulation Results and Analysis

To test entire model, several simulations were performed under different conditions of temperature, solar radiation and different load regimes. The first test is based on the meteorological data for one day of December in the city of Vila Real, Portugal. The PV system is constituted by 20 photovoltaic modules BP 3230 and 16 batteries OPzS SOLAR 420, 48 V connected. A load with 800 W was considered to be connected between the following ranges: 0–27,000 s and 63,000–86,400 s (00 h 00 min–07 h 30 min and 17 h 30 min–24 h 00 min) to simulate the public lighting behavior. It should be noted that the two intervals at which the load is connected coincides practically with the absence of solar radiation, being the responsibility of the batteries to supply the system. Figure 11(a) shows the daily current produced by the panels on a typical December day while Fig. 11(b) shows the evolution of the batteries state of charge (SOC).

Fig. 11.
figure 11

Simulations results with an 800 W load. (a) PV system daily current production. (b) Batteries SOC evolution.

Analyzing Fig. 11(b), it is possible to verify the batteries behavior along the day. The simulation starts at 0 s, corresponding to midnight, so it is clear that the battery will be discharging because at that time there is no solar radiation and the load is supplied, the SOC reaches 78%. Around 26,000 s of simulation time, which corresponds more or less at seven o’clock am, the load is switched OFF and solar radiation appears. At this point, the SOC curve changes, starting the batteries charge and SOC increases until the batteries are fully charged, stabilizing at 90% until 63,000 s, moment where the load is switched ON again.

Considering a different scenario with an increase in load with more 1,000 W, working throughout all the simulation interval, the result would be quite different. As can be seen from Fig. 12, in this case there is a greater need for battery energy, SOC reaches 55% and so throughout the day batteries do not fully charge as in the previous simulation.

Fig. 12.
figure 12

SOC simulation result with a 1,800 W load.

In order to better verify the reliability of the developed model, another study was carried out for a one-week simulation time, considering a scenario of low solar radiation (typical of winter). The curve describing the solar radiation behavior throughout the week is presented in Fig. 13(a), where the first and last day of the week presents average values and the remaining days present 75%, 50%, 10%, 25% and 50% of daily average radiation. The daily load behavior will be the same as been considered in the previous simulations, switched ON between 0–27,000 s and 63,000–86,400 s. The main objective of this simulation is to test the model over several days and to see how it would behave in a period when the solar radiation is below the normal values.

Fig. 13.
figure 13

Simulations results for a week, with an 800 W load. (a) Solar radiation. (b) Batteries SOC evolution.

In Fig. 13(b) it is possible to observe the batteries behavior during the study week and it is observed that even with a significant reduction of solar radiation in this period, the batteries never reach the minimum limit, reaching capacity values close to 21%. Comparing Figs. 13(a) and 13(b), the solar radiation influence on the batteries state of charge can be verified. It is visible that on low irradiance days, the batteries SOC has small increments, insufficient to fully charge. This simulation shows that the system for this case would be well-sized. Thus, the developed model demonstrates a benefit to better understand the behavior of the PV systems.

5 Conclusions

With the exponential growth of photovoltaics, expected for the next years, it is fundamental to understand the behavior of the different blocks that constitute PV stand-alone systems, mainly its operation during the different periods of the year. Being the knowledge of the storage systems behavior a fundamental factor to use efficiently the energy produced. In this context, the models developed in this study brings a benefit for the planning and sizing of PV stand-alone systems, allowing understanding the system behavior under different meteorological and load conditions. Five blocks were developed in Matlab/Simulink that reflect the behavior of the photovoltaic panel, charge controller, batteries, DC/AC inverter and the loads. Thus, the results obtained in the performed tests allow to conclude about the good reliability of the developed models. One of the main parameters analyzed was the batteries SOC with different solar radiation conditions and different loads, thus allowing to verify the PV system autonomy, a fundamental reliability aspect for stand-alone systems.