0

I'm using the ModelChain class to estimate DC and AC values for a fictitious solar plant. Input parameters include module, inverter, number of strings, number of modules, number of inverters, albedo, PVGIS TMY data, etc. I apply simple math to calculate number of modules per string and number of strings per inverter then I create one PVSystem object consisting of a single PVArray, per inverter. The I run the ModelChain model for each inverter and, for simplicity, add up the AC output to estimate the total AC for all arrays like this:

for idx in range(0, num_of_inverters):
   array = {
       'name': f'pvsystem-{idx+1}-array',
       'mount': mount,
       'module': module_name,
       'module_parameters': module_parameters,
       'module_type': module_type,
       'albedo': albedo,
       'strings': strings_per_inverter,
       'modules_per_string': modules_per_string,
       'temperature_model_parameters': temperature_model_parameters,
   }
   pvsystem=pvlib.pvsystem.PVSystem(arrays=[pvlib.pvsystem.Array(**array)], inverter_parameters=inverter_parameters)
   mc = pvlib.modelchain.ModelChain(pvsystem, location)
   mc.run_model(tmy_weather)
   total_ac += mc.results.ac.sum()

According to PVLib documentation, the AC output is yearly in Watts hour.

But now I need to get the DC output as well (yearly in Watts hours) so I can calculate the DC/AC ratio. Running mc.results.dc gives me a Dataframe with several values (columns) that are hard to grasp for a newbie like me:

i_sc : Short-circuit current (A)
i_mp : Current at the maximum-power point (A)
v_oc : Open-circuit voltage (V)
v_mp : Voltage at maximum-power point (V)
p_mp : Power at maximum-power point (W)
i_x : Current at module V = 0.5Voc, defines 4th point on I-V curve for modeling curve shape
i_xx : Current at module V = 0.5(Voc+Vmp), defines 5th point on I-V curve for modeling curve shape

I tried using p_mp and adding it up: mc.results.dc['p_mp'].sum() but the output is much bigger than the estimated AC. I usually expect the DC/AC ratio to be somewhere > 1 and <= 1.5, roughly. However, I'm getting DC values that are like 3-5 times bigger which probably means I'm doing something wrong.

Example: 1 string, 1 inverter, 10 modules per string:

Output (yearly):

AC: 869.61kW
DC: 3326.36kW
Ratio: 3.83

Any help is appreciated.

Marcilio
  • 11
  • 1
  • Hi @Marcilio, probably the answer to this question lies in the inputs to your Array and PVSystem. Can you edit the question and include the full code? See https://stackoverflow.com/help/minimal-reproducible-example – kevinsa5 Mar 29 '22 at 20:37
  • Can't seem to find the edit button (maybe because I'm new to StackOverflow?) Anyway, here's a Gist with the core of the implementation => https://gist.github.com/marcilio/c830c6e88895bca4b09f4dcf166e10f8 – Marcilio Mar 29 '22 at 22:09
  • Thanks for the gist. The edit button should be at the bottom of the question, under the "pvlib" tag and beside your little profile box. Maybe you're right that it only shows up if you have sufficient "reputation", I don't know. – kevinsa5 Mar 30 '22 at 02:07

1 Answers1

0

As for why the total DC and AC generation values are so different, it's because the inverter is way undersized for the array. The inverter is rated for 250 W maximum, which is not much more than what a single module produces at STC (calculate by Impo * Vmpo as below, or noticing the "220" in the module name), and you have ten modules total. So the inverter will be saturated at even very low light, and the total AC production will be severely curtailed as a result. I think if you make a plot (mc.results.ac.plot()) you will see that the daily inverter output curve is clipped at 250 W while the simulated DC power can be nearly 10x higher. It's always a good idea to plot your time series when things aren't making sense!

In [23]: pvlib.pvsystem.retrieve_sam('cecinverter')['ABB__MICRO_0_25_I_OUTD_US_208__208V_']['Paco']
Out[23]: 250.0

In [24]: pvlib.pvsystem.retrieve_sam('sandiamod')['Canadian_Solar_CS5P_220M___2009_'][['Impo', 'Vmpo']]
Out[24]: 
Impo    4.54629
Vmpo    48.3156
Name: Canadian_Solar_CS5P_220M___2009_, dtype: object

A couple other notes:

  • Please be careful about units:
    • Summing (really, integrating) an hourly time series of power (Watts) produces energy (Watt-hours). An annual output in kW doesn't make sense, since kW is for power and power is an instantaneous rate of energy generation. If this is new to you, it might be helpful to think about speed vs distance: a car might be traveling at 60mph at any given time point, but the total distance it travels in a year is measured in miles, not mph. Power is energy per unit time just like speed is distance per unit time.
    • Summing voltages (num_of_inverters * mc.results.dc['v_mp'].sum()) makes no sense that I can see. Volt-hours doesn't seem like a useful unit to me outside of some very specialized power electronics engineering contexts.
  • The term "DC/AC ratio" is typically understood to mean the ratio of rated capacities, not annual productions. So for the example in your gist, the DC/AC ratio would be calculated as (220 W/module * 10 modules/string * 2 strings/inverter = 4400 W DC) / (250 W AC) = 17.6 (which is a crazy DC/AC ratio).
kevinsa5
  • 3,301
  • 2
  • 25
  • 28
  • Sorry for the long delay to respond. Was off in the past weeks. Thank you so much for the explanations. Makes total sense. – Marcilio Apr 11 '22 at 15:00