我试图使用来自NREL的NRSDB数据集的生成数据来模拟公用事业规模的光伏电站,但还没有弄清楚如何在PVLib中这样做。我认为正确的方法应该是创建一个PVSystem对象,我在其中指定modules_per_string和strings_per_inverter(我使用SAM估计),然后将ModelChain与Location对象和来自NRSDB的天气数据结合使用。
使用NREL的SAM,使用BP Solar BP3220N模块和ABB Ultra 690V逆变器,我需要每串23个模块和9,897个并联串,以产生50兆瓦的电厂。我试图在下面重现这个配置。
以下是我一直在使用的代码。
import os
import pandas as pd
import numpy as np
import pvlib
from pvlib.pvsystem import PVSystem
from pvlib.location import Location
from pvlib.modelchain import ModelChain
from pvlib.modelchain import basic_chain
def importPSMData():
df = pd.read_csv('C:\\Users\\mtcraig\\Documents\\NSRDBData\\dd\\622240_30.77_-99.3_tmy.csv',skiprows=[0,1])
#Rename paramters for input to PVlib
df.rename(columns={'DHI':'dhi','DNI':'dni','GHI':'ghi','Temperature':'temp_air',
'Wind Speed':'wind_speed'},inplace=True)
#Rename date parameters in order to run to_datetime
df.rename(columns={'Year':'year','Month':'month','Day':'day','Hour':'hour',
'Minute':'minute'},inplace=True)
df['dt'] = pd.to_datetime(df[['year', 'month', 'day', 'hour', 'minute']])
#Set index to DT for run_model call
df.set_index(df['dt'],inplace=True)
#Drop unnecessary columns
df = df.drop('Dew Point', 1)
df = df.drop('Pressure', 1)
df = df.drop('year', 1)
df = df.drop('month', 1)
df = df.drop('day', 1)
df = df.drop('hour', 1)
df = df.drop('minute', 1)
df = df.drop('dt',1)
return df
sandia_modules = pvlib.pvsystem.retrieve_sam('SandiaMod')
cec_inverters = pvlib.pvsystem.retrieve_sam('cecinverter')
module = sandia_modules['BP_Solar_BP3220N_Module___2010_'] #18% eff, c-Si
inv = cec_inverters['ABB__ULTRA_1100_TL_OUTD_3_US_690_x_y_z_690V__CEC_2013_']
system = PVSystem(module_parameters=module,inverter_parameters=inv,surface_azimuth=180,
modules_per_string=23,strings_per_inverter=9897)
loc = Location(latitude=30.77,longitude=-99.3,tz='Etc/GMT+7',altitude=500)
mc = ModelChain(system,loc,name='test',
orientation_strategy='south_at_latitude_tilt')
weatherData = importPSMData()
mc.run_model(times=weatherData.index,weather=weatherData)
print(mc.ac)
这是1天的输出,但所有输出都是相同的:
print(mc.ac)
dt
2013-01-01 00:00:00 NaN
2013-01-01 01:00:00 NaN
2013-01-01 02:00:00 NaN
2013-01-01 03:00:00 NaN
2013-01-01 04:00:00 NaN
2013-01-01 05:00:00 NaN
2013-01-01 06:00:00 NaN
2013-01-01 07:00:00 NaN
2013-01-01 08:00:00 NaN
2013-01-01 09:00:00 NaN
2013-01-01 10:00:00 NaN
2013-01-01 11:00:00 NaN
2013-01-01 12:00:00 NaN
2013-01-01 13:00:00 NaN
2013-01-01 14:00:00 1170000.0
2013-01-01 15:00:00 1170000.0
2013-01-01 16:00:00 1170000.0
2013-01-01 17:00:00 1170000.0
2013-01-01 18:00:00 NaN
2013-01-01 19:00:00 NaN
2013-01-01 20:00:00 NaN
2013-01-01 21:00:00 NaN
2013-01-01 22:00:00 NaN
2013-01-01 23:00:00 NaN
我当天的天气数据如下:
dt dhi dni ghi temp_air wind_speed
1/1/2013 0:00 0 0 0 8.779901123 3
1/1/2013 1:00 0 0 0 8.503381348 3
1/1/2013 2:00 0 0 0 8.082849121 2
1/1/2013 3:00 0 0 0 7.553338623 3
1/1/2013 4:00 0 0 0 6.817102051 3
1/1/2013 5:00 0 0 0 6.063470459 3
1/1/2013 6:00 0 0 0 5.250634766 3
1/1/2013 7:00 0 0 0 4.292138672 3
1/1/2013 8:00 3 0 3 4.388421631 3
1/1/2013 9:00 49 0 49 4.977044678 3
1/1/2013 10:00 177 157 241 6.834771729 3
1/1/2013 11:00 239 131 307 8.402886963 2
1/1/2013 12:00 184 576 518 9.695245361 2
1/1/2013 13:00 90 939 643 10.30196533 2
1/1/2013 14:00 86 926 592 10.1447998 2
1/1/2013 15:00 91 729 420 9.404504395 2
1/1/2013 16:00 123 246 200 8.237115479 2
1/1/2013 17:00 29 0 29 6.443383789 2
1/1/2013 18:00 0 0 0 5.289483643 2
1/1/2013 19:00 0 0 0 4.527764893 2
1/1/2013 20:00 0 0 0 3.753839111 2
1/1/2013 21:00 0 0 0 2.97612915 2
1/1/2013 22:00 0 0 0 2.200036621 2
1/1/2013 23:00 0 0 0 1.460778809 2
感谢您提供的任何帮助。 -Michael
答案 0 :(得分:2)
PVSystem
+ ModelChain
计算一组模块,字符串和单个逆变器的功率。您的型号将所有约50兆瓦的直流电源放入一台1.1兆瓦的逆变器中,因此您可以在几乎所有白天使用变频器的最大交流电。根据您的确切工厂规格,您需要40-50个指定的逆变器才能达到额定交流电源。然后你可能会想要大约9897/45 = 220 strings_per_inverter
。最后,您需要将模型结果乘以逆变器的数量,以获得总的工厂功率。