ibpsa / modelica-ibpsa

Modelica library for building and district energy systems developed within IBPSA Project 1
https://ibpsa.github.io/project1
140 stars 83 forks source link

Add simplified PV system model based on 5p analytical modeling approach #1575

Open LauraMaier opened 2 years ago

LauraMaier commented 2 years ago

The IBPSA library is currently missing a PV system model which can be used in the context of building performance simulations. The intended model will have the following features:

The sub-models have the following characteristics:

1. Cell temperature model

2. I-V-characteristic

3. Radiation and absorbance model

What steps are necessary to solve this issue?

LauraMaier commented 2 years ago

@mwetter What do you think about the model's features?

mwetter commented 2 years ago

@LauraMaier : This would be a good addition. I would prefer to put it in IBPSA.BaseClasses.PVSystems because most if not all electrical libraries have some electrical connector (but not all use the same connector). Then, these libraries can extend from your basic model and add in their extended model the appropriate connector. Users can then access the model with the compatible connectors. For example, in Buildings, we would probably have something like

within Buildings.Electrical.DC.Sources.PVSimple;
model PVDetailed
  extends Buildings.Electrical.BaseClasses.PVSystems.YourNewModel;

// Terminal that will use the real output, but in the physical quantities used in the library
Buildings.Electrical.DC.Interfaces.Terminal_p terminal "Terminal for electrical connection";
....

...

nytschgeusen commented 2 years ago

@LauraMaier: This is a very a good suggestion. As I told you in our discussion during BS 2021 in Bruges we also have in our BuildingSystems library a PV generator model which is subdivided in an electrical, an optical and a thermal model (https://github.com/UdK-VPT/BuildingSystems/tree/master/BuildingSystems/Technologies/Photovoltaics). If we put all together our knowledge in a common PV model for the IBPSA library this would be great.

I think one important topic which we should duchess will be the accuracy of the model (e.g. one diode or two diode model) and the availability of the therefor needed model parameters. For this purpose, it could also help to take a look on the database of the Polysun simulation tool. This database includes thousand of different PV generators from worldwide manufactures and also for generic PV generators.

LauraMaier commented 2 years ago

@mwetter Thanks for th suggestion. I will gladly adapt it to the proposed structure

LauraMaier commented 2 years ago

@nytschgeusen Thanks, Christoph. Indeed, I have already scanned your very good models and will merge our modeling approach with yours! If you prefer to have a bilateral discussion before I start implementing, I am happy to arrange an online meeting. What do you think?

nytschgeusen commented 2 years ago

@LauraMaier: yes, an online Meeting would be great. Here you can find for the beginning of our discussion a relatively old publication, in which our PV model was applied for solar driven cooling systems: https://www.aivc.org/sites/default/files/p_1460.pdf

LauraMaier commented 1 year ago

@Mathadon and @nytschgeusen:

@mwetter and me just discussed about the potential structure of the PV system and inherently also the structure of the new electrical package of the IBPSA library. As you might remember, we had a discussion on which connectors we would be using in the future as electrical connectors and all of us decided that we would opt for the electrical interfaces as they are currently implemented in the buildings library: https://github.com/lbl-srg/modelica-buildings/blob/master/Buildings/Electrical/Interfaces/ Buildings.Electrical.Interfaces Following this approach, we would introduce a partialTerminal and a Terminal as connector. In addition, PhaseSystems would have to be defined as repleceable package. Basically, by agreeing on using the connectors as implemented in the Buildings library, we would also adopt the whole package structure (AC and DC package, Separation into different phase type models, etc.). As we are not sure, if you are fine with the additional requirements which add up to "we use the electrical connectors of the building library", we wanted to check with you before implementing it.

So what do you think? Would you favor another solution/structure?

nytschgeusen commented 1 year ago

@LauraMaier and I just discussed the proposed reuse of the electrical infrastructure models of the Buildings library. We agreed that we will use a subset of them for the new PV system package.

LauraMaier commented 1 year ago

Hi @nytschgeusen, @mwetter, and @Mathadon: I just pushed a first version of the new Electrical package structure following and using many existing models of the Buildings library. I found many of the already implemented models extremely helpful but did not include all of them to reduce redundancy.

Please note that the packages DataBase, BaseClasses and PVSystem still follow an old logic that we first wanted to implement and can be ignored!

As these changes greatly affect the further model development, I would like to get your feedback if you agree with the basic structure and the use of existing smaller models (Interfaces, Sources, Loads, etc.) of the Buildings library. If so, I can proceed with the integration of the PV models following the implemented structure as described in this issue and also add the conversion scripts of the newly introduced models.

Mathadon commented 1 year ago

@LauraMaier The package structure looks ok! I have looked into the connectors and components and they aren't exactly light weight, using replaceable packages etc. I think that for our needs we would benefit from more simplified equations. To be more specific:

A minor note: The components have only one connector while in practice there are always two (or more) wires connected to a device. This is fine for most purposes but it's harder to interpret a schematic physically. You also can't chain two resistances in series as you would be able to do in a real physical system. It is however easier to connect components since you have to make one instead of two connections.

mwetter commented 1 year ago

@Mathadon : If I remember correctly, the differential equation omega = der(theRef) is required for all components having the same phase angle, and it is also used in Modelon's library from which we obtained the connector.

@LauraMaier : The structure looks good but it looks like some wrong edits where introduced. If you try to merge it back to the Buildings library (commit bc0aed7099d787323abbf424947d5bbbdfa49cf8) you will see the diffs, such as a wrong link to Modelica.Electrical.QuasiStationary which should be ...QuasiStatic. Also, some within statements still have Buildings rather than IBPSA.

nytschgeusen commented 1 year ago

@LauraMaier: I added a first version of a two diodes pv model to the branch (this model is still under heavy construction and is still not running at the moment)