• Ei tuloksia

Modelling of photovoltaic generators in Simulink

2. Photovoltaic power systems

2.4. Modelling of photovoltaic generators in Simulink

As discussed in the previous sections, from the electrical circuit point of view, a photo-voltaic cell can be modelled as a parallel connection of a current source and a diode, where the current source is responsible for photocurrent and the diode represents diode saturation current. In addition, a real photovoltaic cell would also have losses due to the p-n junction and metal contacts. These losses can be represented with the help of series and shunt resistances. Such an equivalent model is also suitable for representing a pho-tovoltaic array with a versatile configuration of series and parallel connections.

Matlab and Simulink have many ways of modelling devices or components and modelling complex systems. This section outlines three different approaches of varying degree of complexity for modelling a photovoltaic system in Matlab/Simulink. First a simple mathematical model is provided. This is followed by the use of advanced com-ponent libraries to design a cell. Then, a more sophisticated approach based on experi-mental data is provided. For the interested reader, the following reference [25] is rec-ommended, which has been used as foundation for photovoltaic cell model implemented in this thesis.

2.4.1. Mathematical model

The mathematical model, shown in this section is based on a Simulink implementation of a single diode photovoltaic module. Using the fundamental mathematical blocks from the Simulink library, it is straight-forward task to build the algebraic relationship. The set of equations used for the modelling of the cell are:

= − −1 − (2.6)

= (2.7) where is the photocurrent and is the thermal voltage. The Simulink implementa-tion of the mathematical model is presented inFigure 2.13.

Figure 2.13. Mathematical model of a solar cell in Simulink.

This model of a photovoltaic cell can be used to model a photovoltaic array. The on-ly change required is to scale up parameters. It is important to note that this is a simpli-fied model, which does not take into account changes in ambient temperature. There-fore, some of the parameters were adjusted to fit the standard test conditions. However, as discussed in the previous chapter, changes in the ambient temperature are not so cru-cial to the performance of the photovoltaic cell. Furthermore, in real-life situations, changes in temperature exhibit a slow dynamics. On the contrary, changes in irradiance are vast in scale and can happen many times during a short interval.

2.4.2. Physical model

Simulink has advanced libraries including a tool called Simscape. Simscape is the basis for physical modelling techniques. Simscape has electrical components making it possi-ble to model any electrical circuit. So it gives the opportunity to construct an equivalent model. Such functionality gives the advantage of being able to avoid mathematical equations when retrieving a mathematical algorithm, is problematic. Figure 2.14 shows an equivalent, one-diode circuit of a photovoltaic cell implemented with the help of Simscape. The physical model corresponds directly to equation shown in (2.6).

Figure 2.14. Physical model of a solar cell in Simulink.

A physical model may also be obtained with the use of an advanced component library, such as SimElectronics. The sources library of SimElectronics has the implemented model of a photovoltaic cell. It is a very detailed model of a solar cell, enabling the implemention of a single-diode or an eight parameter model, which is a double-diode model. In addition, it gives the opportunity to include the temperature behaviour of a device and to model temperature effects. It provides a model for microlevel analysis with very detailed simulation results.

2.4.3. Modelling based on experimental data

Matlab is a very flexible modelling and calculation platform, it provides the opportunity to design models based on the measured experimental data. One possible approach is to use the curve-fitting toolbox that facilitates the generation of mathematical models of the excitation-response kind. It is valuable solution when the actual solar panel is avail-able and real data can be used. The data should include the behaviour of the photovolta-ic module under different test conditions. The surface-fitting tool, whphotovolta-ich is a supplement to the curve fitting toolbox, allows creating a surface which aligns the loaded I-V curves in a mathematically reasonable form and generates Matlab code based on it. The gener-ated code will correspond to the performance of the experimental photovoltaic panel.

The code can be used to build an equivalent mathematical model, which later on can be used as a function for Lookup Table block. The main function of the Lookup Table block is to match the input variables to output values by interpolating previously de-fined data. The Simulink implementation of this concept is illustrated in Figure 2.15. In such a model the value of irradiance and the value of voltage determine the output cur-rent produced by the photovoltaic module.

Figure 2.15. Model of a solar cell using experimental data.

Matlab provides other design instruments for setting up experimental driven model, such as the system identification toolbox which provides tools for constructing dynamic models and transfer functions. Another tool is the neural network toolbox, which is used for predictive modelling. It is extremely useful for modelling complex non-linear sys-tems. For the interested reader in experimental driven models the following source [26]

is recommended.