Giter Site home page Giter Site logo

christiankral / photovoltaics Goto Github PK

View Code? Open in Web Editor NEW
25.0 6.0 17.0 35.08 MB

Modelica library for the simulation of photo voltaic cells and modules

License: Other

Modelica 94.88% Python 0.67% Motoko 4.45%
modelica-library modelica photo-voltaic-cells

photovoltaics's Introduction

PhotoVoltaics

A paper about this library was published at the Modelica Conference 2019.

Modelica library for the simulation of photo voltaic cells, modules and plants. The library provides:

  • Simple cell models based on one diode and a irradiance dependent current source including temperature dependence of the open circuit voltage and the short circuit current
  • Simple symmetric modules and non-symmetric module including shading of cells
  • Simple symmetric plant
  • Solar pyramid model
  • Cell, module and plant parameters can be taken directly from manufacturer data sheets
  • Data of commercial modules stored in Modelica Records for convenient investigations
  • Analytical irradiance model without weather conditions
  • Single and three phase quasi static converters
  • Three phase transient converter
  • Maximum power tracker based on continuous voltage regulation
  • Linear, symmetric and chargable battery model, parameterized by cut off voltage, charge voltage, energy

PhotoVoltaics library

Application Examples

Phileas Rover

The maximum power harvest of a solar pyramid, which may be applicable to the Phileas Rover of the Austrian Space Forum, OEWF, can be investigated by the PhotoVoltaics library.

Phileas Rover Image source: OEWF

TGM Photovoltaic Power Plants

Actual irradiance and electric power measurement data of the TGM power plants in Vienna are provided in the PhotoVoltaics_TGM library. Measurements and simulation results can be compared by the provided example models. The PhotoVoltaics_TGM library relies on the Buildings library.

TGM

Award

This libray was awarded with the second price at library award of the 13th Modelica Confernce, Regensburg 2019.

License

The Modelica code of the PhotoVoltaics library, the images and the measurement data of the TGM are released under the BSD 3-clause license.

The package also contains weather data of Vienna retrieved from EnergyPlus. The data of EnergyPlus are distributed under the EnergyPlus Licensing conditions.

Development and contribution

The library was developed during a Diploma project at the Technical Engineering College, TGM, Wexstraße 19-23, 1200 Vienna, Austria. Library authors are Jovan Brkic, Muaz Ceran, Mohamed Elmoghazy, Ramazan Kavlak, and Christian Kral.

The three phase transient multi phase converter was contributed by Luiz Bueno, RWTH Aachen, Germany.

Contact

e-mail: dr.christian.kral(at)gmail.com

photovoltaics's People

Contributors

christiankral avatar tbeu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

photovoltaics's Issues

Implement AC current limitation of multi phase converter

As discussed in #11 and #12, additionally, an AC current limitation (maximum current IACMax) shall be implemented. This feature shall consider the following aspects:

  • If active power does not exceed the IACMax, reactive power is limited such way that IACMax is not exceeded
  • If active power exceeds IACMax, an assert shall be triggered

Change output path of result files

If the PhotoVoltaics library is included as a read only library in, e.g., OpenModelica, the examples of PhotoVoltaics_TGM cannot be executed, as the output files are set to overwrite the (read only marked) files included in the library. This is not reasonable.

The output path of the result files shall be changed to the actual working directory, i.e., the output path shall not be specified explicitly.

documentation minor glitch

In the information of Diode2Exp the diode formula does not contain the ideality factor m, which is indeed included (and has a significant impact) in the equation section. I would recommend to include it.

I take the opportunity of this ticket to recommend changing the name "Bv" into "Vb", so that it becomes consistent with Vt: thermal voltage and Breakthrough voltage.

Wrong implementation of PhotoVoltaics.Components.MultiPhaseConverter

@luizhrbueno There is a bug in the implementation of the multi phase converter model. It actually revealed the issue when I double checked PhotoVoltaics.Examples.SimpleModuleMultiPhase based on 37e277f: I added a power sensor on grid side and used power factor = 1 to test the model with varying irradiance input. The power values are then equal.

After changing the power factor to 0.9 (the original value), the gird (real) power is smaller than the PV power. This is wrong.

The issue is related with performing a phase shift in add. Then the current phasor is calculated with the wrong magnitude as only the phase shift is changed, but P = 3*U*I*cos(phi)

Could you please consider a fix?

Contribution

How could I contribute to this library?
I developed a block to work with Modelica Electrical MultiPhase library as you can see in the figure below.
It has also reactive power control.

image

Replace power factor input by reactive power or phase angle input in multi phase converters

The transient multi phase inverter model now uses a power factor input. In the actual implementation the reactive power is generated such way, that an inductive load can be supplied. Alternatively, this model shall be adapted that the reactive power or the phase angle phi shall be used instead of the power factor cos(phi). This change will then enable to switch from inductive to reactive loads, if required.

@luizhrbueno Do you have a preference: reactive power or phase angle input?

Type of Temperature in Measurement Data

First of all: great work!

Now the question: In the measurement data for trina there are two temperatures:
T1(degC) T2(degC)

Are these ambient temperatures or module temperatures?

Diode2

Is PhotoVoltaics.Components.Diode2 comparable to Modelica.Electrical.Analog.Semiconductors.Diode2 of MSL v3.2.2?

Typos in irradiance

  1. Should the comment of PhotoVoltaics.Examples.SimpleCellTemperatureCharacteristic be corrected to "Voltage current characteristic for different temperatures"?
  2. There are also typos: irrandiance -> irradiance

Use absolute instance names in all module records of PhotoVoltaics.Records

The relative paths of, e.g.,

record TSM_200_DC01A "Comax monocrystalline SI cell 200W"
  extends ModuleData(final moduleName =...
end TSM_200_DC01A;

shall be changed to

record TSM_200_DC01A "Comax monocrystalline SI cell 200W"
  extends PhotoVoltaics.Records.ModuleData(final moduleName =...
end TSM_200_DC01A;

Problem simulating via FMPy

I have exported the model PhotoVoltaics_TGM.TGM_Comax_Measurement_20160808 as fmu and when I am trying to simulate it in python through FMPy I am getting the following error:

assert | debug | Model error: Argument of sqrt(converter.iAC.re ^ 2.0 + converter.iAC.im ^ 2.0) was nan should be >= 0

Any idea of what is going on?

Add example of (generic) table irradiance data supplying a PV module model

In order to not be dependent on the particular data structure of the example in PhotoVoltaics_TGM it makes sense to have a more generic example based on generic irradiance data. Such an example could also be used in a lecture course to better demonstrate the principle of measurement data based simulation.

Initialization of Testing models

All of the testing models do not succeed to initialize in SimulationX. E.g., PhotoVoltaics.Testing.SimpleCellResistor. Depending on the solver it raises a Floating Point overflow exception, or simply stops to iterate.

Improve solar pyramid model

  • Add parameter for shadows of each module
  • Use n vector of modules and converters, etc. to have arbitrary number of pyramid sides for n>=3

Dymola 2019FD01 warning on range of VRef

Dymola 2019FD01 checks the model PhotoVoltaics.Components.SimplePhotoVoltaics.SimpleModule false. It is stated that the parameter VRef is outside the range specified by the min attribute in PhotoVoltaics.Components.SimplePhotoVoltaics.SimpleModule.

Check of PhotoVoltaics.Components.SimplePhotoVoltaics.SimpleModule:
The variable diode[1].VRef=0 is not in range [1,1e+100].
Check of class aborted.
WARNINGS have been issued.
ERRORS have been issued.

This may be a Dymola bug, as the minimum range is defined in PhotoVoltaics.Interfaces.PartialDiode by:

parameter Modelica.SIunits.Voltage VRef(min = Modelica.Constants.small) = 0.6292 
    "Reference voltage > 0 at TRef" annotation (
    Dialog(group = "Reference data"));

Change sun azimuth in SolarPyramidBatteryCharge

The example PhotoVoltaics.Examples.SolarPyramidBatteryCharge evaluates a non-physical terrestrial situation, since the sun azimuth = 0, which means the sun is positioned in the direction of north. This azimuth parameter in azimuthConst.k shall be changed from 10*pi/180 to 260*pi/180 which is almost equivalent to west.

Additionally, the example shall be updated that way that the major investigated powers and the inclination angle shall be (output) variables on the root level of the model.

Are reference results available?

As a tool developer, it would be of interest to have reference results/baselines for expected results available, for the simulateable models in the PhotoVoltaics library. This would allow for a tool vendor to verify that the library works correctly in the tool.

Are such results available in any form?

Update library to Buildings 5.1.0

The PhotoVoltaics_TGM library shall be upgraded so that it works with a newer version of the Buildings library.

The Buildings library 3.0.0 processed the parameter filNam in Buildings.BoundaryConditions.WeatherData.ReaderTMY3 as URI, not as filename. This behavior seems to have changed in version 5.1.0. Therefore, the filename has the be determined applying the function Modelica.Utilities.Files.loadResource.

Converter apparent/real power comparison

The comparison should be with the apparent power, otherwise, the inverter will provide to the system more power that is generated in the PV module.
For example, for pf=0.9 the module is providing 185W and 90VAr.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.