How can I estimate DC/AC output for a PV system varying the number and type of modules and inverters?

Viewed 189

I'm new to PVLib and to PV simulation in general so sorry if the question is too naive :)

I'm using procedural code provided here: https://pvlib-python.readthedocs.io/en/stable/introtutorial.html to estimate DC/AC output for a given technology set (module, inverter) and a given (lat,long,altitude). My region of interest is Georgia (country).

The calculation of annual energy for a given location (lat,long,alt) uses ac.sum() like it's show below (see original code in https://pvlib-python.readthedocs.io/en/stable/introtutorial.html):

...
dc = pvlib.pvsystem.sapm(effective_irradiance, cell_temperature, module)
ac = pvlib.inverter.sandia(dc['v_mp'], dc['p_mp'], inverter)
annual_energy = ac.sum()
energies[name] = annual_energy
...

1) Is this really annual energy production? The weather set has data from 2009-2015 so wouldn't sum() yield the total energy for all these years?

2) Is there any TMY dataset that provides more than 10 years? Currently, PVGIS is returning 7 years (2009-1015)?

3) Is the AC output for a single module and single inverter? If so, how can I add more modules and inverters to the system using procedural code (OO code provides Arrays and Mounts)? I tried setting parameters modules_per_string and strings_per_inverter for the system but it did not affect the output.

Example:

    system = {
        'module': [my-module-name],
        'inverter': [my-inverter-name],
        'surface_azimuth': 180,
        'modules_per_string': 5, 
        'strings_per_inverter': 2,
        'albedo': 0.3
    }

Thank you!

1 Answers
  1. Is this really annual energy production? The weather set has data from 2009-2015 so wouldn't sum() yield the total energy for all these years?

A TMY dataset contains a single year (365 days, or 8760 hours) of weather data. Yes, the TMY index may contain timestamps from several years, but if you take a closer look you'll find that it's only a subset of each year (January 2015, February 2010, etc) for only 12 months in total. So taking the sum of a TMY-based energy simulation will indeed yield an annual energy estimate.

  1. Is there any TMY dataset that provides more than 10 years? Currently, PVGIS is returning 7 years (2009-1015)?

Again, a TMY dataset is by definition is just 1 year of data sampled from many years. Also I think PVGIS actually samples from 10 years by default when creating a TMY, and it just so happens that it only pulled from fewer years this time. A TMY for a different location would sample from different years.

If you're interested in continuous (non-TMY) data, see other iotools functions like pvlib.iotools.get_pvgis_hourly and pvlib.iotools.get_psm3 which let you fetch weather data for specific calendar years, and you can iterate across however many years you want to use.

  1. Is the AC output for a single module and single inverter? If so, how can I add more modules and inverters to the system using procedural code (OO code provides Arrays and Mounts)? I tried setting parameters modules_per_string and strings_per_inverter for the system but it did not affect the output.

If you want to stick with the non-OO interface, that means you can't use the PVSystem class, since it's part of the OO interface alongside Array and the Mounts :) Note that pvlib.pvsystem is a python module while pvlib.pvsystem.PVSystem is a class. Setting attributes the attributes of an instance of the PVSystem class will only change the behavior of the methods of that instance. It won't change the behavior of the functions in the pvlib.pvsystem module not directly associated with that instance.

Anyway, check out pvlib.pvsystem.scale_voltage_current_power for the modules_per_string and strings_per_inverter. For multiple inverters you will need to have some kind of iterative loop and repeat the simulation process for each inverter. In the special case where all arrays and inverters are identical, you can just multiply the AC power output by the number of inverters.

Related