5. PV Generator API

Module: typhoon.api.pv_generator

This module is used for generating various PV panel settings file (.ipvx) following selected PV models.

Later , this settings file can be used in HIL API and HIL SCADa for initializing appropriate PV panel.

API references section display all methods which you can use.

5.1. API references

generate_pv_settings_file(modelType, fileName, parameters)

Generate PV panel settings (.ipvx extension) with specified parameters.

Parameters:
  • modelType (str) – PV model type that will be used for generating settings file.
  • fileName (str) – file name of resulting .ipvx file.
  • parameters (str) – dictionary with parameters.
Supported PV modelType are:
  • 'Detailed' or pv.PV_MODELS[0]
  • 'EN50530 Compatible' or pv.PV_MODELS[1]

Depending on used PV model type available parameters are:

  • 'Detailed' model

    Dictionary key Meaning Value
    “Voc_ref” Open-circuit voltage (Voc [V]) float
    “Isc_ref” Short-circuit current (Isc [A]) float
    “dIsc_dT” Temperature coefficient of Isc [%Isc/C] float
    “Nc” Number of cells float
    “dV_dI_ref” Curve gradient in Voc_ref point (dV/dI at Voc [V/A]) float
    “Vg” Band gap voltage string (“cSi” or “Amorphous Si”)
    “n” Curve gradient in Voc_ref point (dV/dI at Voc [V/A]) float
    “neg_current” Allow negative current boolean (True or False)
  • 'EN50530 Compatible' model

    Dictionary key Meaning Value
    “Voc_ref” Open-circuit voltage (Voc [V]) float
    “Isc_ref” Short-circuit current (Isc [A]) float
    “pv_type” PV type string (“cSi” or “Thin film”)
    “neg_current” Allow negative current boolean (True or False)
Returns:
tuple(status, message)
  • status (bool): True if everything OK otherwise return False
  • message (str): status message

Example:

import typhoon.api.pv_generator as pv

params = {"Voc_ref": 45.60,                     # Open-circuit voltage (Voc [V])
          "Isc_ref": 5.8,                       # Short-circuit current (Isc [A])
          "dIsc_dT": 0.0004,                    # Temperature coefficient of Isc [%Isc/C]
          "Nc": 72,                             # Number of cells
          "dV_dI_ref": -1.1,                    # Curve gradient in Voc_ref point (dV/dI at Voc [V/A])
          "Vg": pv.DETAILED_PV_TYPE[0],         # Band gap voltage ("cSi", "Amorphous Si")
          "n" : 1.3,                            # Curve gradient in Voc_ref point (dV/dI at Voc [V/A])
          "neg_current": False }                # allow negative current

# generate settings file using Detailed type of PV Model
(status,msg) =  pv.generate_pv_settings_file(pv.PV_MT_DETAILED,"./setDet.ipvx",params)


params = {"Voc_ref": 45.60,                     # Open-circuit voltage (Voc [V])
          "Isc_ref": 5.8,                       # Short-circuit current (Isc [A])
          "pv_type": pv.EN50530_PV_TYPES[0],    # "cSi" pv type ("cSi" or "Thin film")
          "neg_current": False }                # allow negative current

# generate settings file using EN50530 type of PV Model
(status,msg) =  pv.generate_pv_settings_file(pv.PV_MT_EN50530,"./setEN.ipvx",params)