2

我正在尝试使用来自 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

感谢您提供任何帮助。-迈克尔

4

1 回答 1

3

PVSystem+ModelChain计算一组模块、组串和单个逆变器的功率。您的模型将所有约 50 兆瓦的直流电源放入一个 1.1 兆瓦的逆变器中,因此您几乎在整个白天都达到了逆变器的最大交流电。根据您的具体工厂规格,您需要 40-50 台指定的逆变器才能达到额定交流功率。那么你可能会想要大约 9897/45=220 strings_per_inverter。最后,您需要将模型结果乘以逆变器的数量,以获得工厂总功率。

于 2017-08-17T20:39:45.847 回答