pmunanka
pmunanka

Reputation: 25

Using TMY data with ModelChain

I am using PVlib to generate the PV power output of the PV system. Using, the modelchain, I tried to generate the PV power output. The code used for the PV system is given below:

surface_tilt = 30
surface_azimuth = 180
albedo = 0.2
golden = pvlib.location.Location(meta['latitude'], meta['longitude'], tz='US/Mountain', 
                                     altitude=meta['altitude'], name=meta['Name'].replace('"',''))
print(golden)

# Trying to design a 4 kw detailed solar with inverter and modules 
sandia_modules = pvlib.pvsystem.retrieve_sam('SandiaMod')
cec_inv = pvlib.pvsystem.retrieve_sam('cecinverter')

module = sandia_modules['SunPower_SPR_220__PVL____2006_']
#module = sandia_modules.Canadian_Solar_CS5P_220M___2009_
inv = cec_inv['SMA_America__SB4000TL_US_22__208V__208V__CEC_2018_']

#Making a system 
system = pvlib.pvsystem.PVSystem(module_parameters = module,
                                 inverter_parameters = inv,
                                 surface_tilt = surface_tilt,
                                 surface_azimuth = surface_azimuth,
                                 albedo = albedo,
                                 modules_per_string = 7,
                                 strings_per_inverter = 3)

mc_system = pvlib.modelchain.ModelChain(system, golden)
mc_system.run_model(times = tmy_data.index, weather = tmy_data)

But I do not see the variation in PV power output compared to single module PV generation with codes in the tutorial [https://github.com/pvlib/pvlib-python/blob/master/docs/tutorials/tmy_to_power.ipynb ]. I used the same weather file in both. In the PVsystem of tutorial (with single module), we can see the variation in the PV output enter image description here.

But the in the system that I created, there is not much variation in the PV system output enter image description here.

Specially, at the time of the lower effective solar irradiance, I expected the designed PV output to lower. Am I missing something?

Upvotes: 2

Views: 603

Answers (1)

Will Holmgren
Will Holmgren

Reputation: 735

You're not seeing the variation you're expecting because ModelChain is not able to find irradiance data in your tmy_data and therefore runs the calculation assuming clear sky values.

My guess is that you're using unprocessed TMY data read directly from the read_tmy3 function. If so, you'll need to rename your GHI, DNI, and DHI columns in your tmy_data. ModelChain.run_model requires columns named ghi, dni, dhi, and optionally temp_air and wind_speed.

Also consider shifting your time index by 30 minutes to account for the difference between the measured hourly intervals and the modeled instantaneous solar position.

Upvotes: 1

Related Questions