Seeking Help with a Tracking Agri PV System Simulation

28 views
Skip to first unread message

Thomas P

unread,
Jul 17, 2024, 9:11:23 AM (2 days ago) Jul 17
to pvlib-python

Hello dear pvlib community,

I am working on a university project to simulate a tracking Agri PV system. For this setup, I plan to use a total of 37326 modules, each with a capacity of 565 watts, and 250 kW inverters distributed across 50 module rows that will track along a single axis. (It may seem like a lot, but the field covers an area of 70 hectares.)

As far as my experience with pvlib goes, I am still a beginner. I have watched a few tutorials and have managed to develop some initial code, which is as follows:


import pvlib
from pvlib.modelchain import ModelChain
from pvlib.location import Location
from pvlib.pvsystem import PVSystem, Array, SingleAxisTrackerMount
from pvlib.temperature import TEMPERATURE_MODEL_PARAMETERS
import matplotlib.pyplot as plt
import pandas as pd

# Define location data
location = Location(latitude=51.079928,
                    longitude=6.490433,
                    tz='Europe/Berlin',
                    altitude=2,
                    name='Tagebau')

# Define the time series for the simulation
times = pd.date_range(start="2021-01-01",
                      end="2021-12-31",
                      freq="h",
                      tz=location.tz)

# Load weather data
tmy = pd.read_csv("pvlib_TMY_Demoflaeche.csv", index_col=0)
tmy.index = pd.to_datetime(tmy.index)

# Retrieve PV modules and inverters from the SAM database
sandia_modules = pvlib.pvsystem.retrieve_sam('SandiaMod')
cec_inverters = pvlib.pvsystem.retrieve_sam('CECInverter')

module = sandia_modules['Canadian_Solar_CS5P_220M___2009_']
inverter = cec_inverters['ABB__MICRO_0_25_I_OUTD_US_208__208V_']
temperature_parameters = TEMPERATURE_MODEL_PARAMETERS['sapm']['open_rack_glass_glass']

# Configure the single-axis tracking system
mount = SingleAxisTrackerMount(axis_tilt=0,
                               axis_azimuth=180,
                               max_angle=90,
                               backtrack=False)

# Calculate solar positions
sol_pos = location.get_solarposition(times)
orientation = mount.get_orientation(solar_zenith=sol_pos['apparent_zenith'],
                                    solar_azimuth=sol_pos['azimuth'])

# Configure the PV array and system
array = Array(mount=mount,
              module_parameters=module,
              temperature_model_parameters=temperature_parameters,
              modules_per_string=10,
              strings=1)

system_sat = PVSystem(arrays=[array], inverter_parameters=inverter)

# Create the ModelChain for the single-axis tracking system
modelchain_sat = ModelChain(system_sat, location)

# Run the simulation with the weather data
modelchain_sat.run_model(tmy)

# Plot the results
modelchain_sat.results.ac.plot(figsize=(16,9))
plt.title('AC Power Output of Single-Axis Tracking System over One Year')
plt.xlabel('Time')
plt.ylabel('AC Power (W)')
plt.legend(['Single-Axis Tracking'])
plt.show()


I am currently facing a couple of challenges and would appreciate any guidance or advice. 

I would like to use custom modules and inverters that are not available in the CEC or SandiaMod databases. How can I integrate my own module and inverter specifications into pvlib?

Additionally, how can I adjust my current system to simulate 37326 modules across 50 module rows?

I have tried experimenting with ChatGPT, but haven't made significant progress.

Could anyone be so kind as to offer some assistance or direct me to resources where I can find more information?

Thank you all very much in advance, and best regards,

Thomas =)

cwh...@sandia.gov

unread,
Jul 18, 2024, 3:28:25 PM (yesterday) Jul 18
to pvlib-python
Hi Thomas,

>   How can I integrate my own module and inverter specifications into pvlib?

For the SAPM module model, you can't (yet) since the parameter estimation process isn't available in open source code (I expect something will become available in the near future).

As an alternative, I would import the CEC module list and see if the module you want is in that data. If not, please consult pvlib.ivtools.sdm.fit_cec_sam.

For an inverter which isn't in the Sandia database, see pvlib.inverter.fit_sandia, which may not help since the required data would need to be obtained, perhaps by digitizing curves from an inverter spec sheet which risks being inaccurate. 

If you are primarily interested in AC power, for a simpler alternative for both the module and inverter models, you can use the PVWatts models for both devices, which don't require much data at all.

>  how can I adjust my current system to simulate 37326 modules across 50 module rows?

The Array you define is a single string of 10 modules. You can increase the number of strings; the output of each string is added as if the strings are in parallel.

Output from Arrays (yes you can have several) is the input to a _single_ inverter. pvlib doesn't not currently allow more than one inverter in a PVSystem. The workarounds are:
- multiple the power from the single inverter by the number of inverters that have the same Array configuration.
- define several PVSystems, and a ModelChain for each, run each ModelChain and add the resulting power. I think this is necessary only if some inverters are connected to Arrays that have different configurations.

Cheers,

Cliff
Reply all
Reply to author
Forward
0 new messages