pvlib

PVLIB - AC result clipped


I am trying to get the AC power of a mixed orientation array facing east and west like in https://pvlib-python.readthedocs.io/en/stable/gallery/irradiance-transposition/plot_mixed_orientation.html#sphx-glr-gallery-irradiance-transposition-plot-mixed-orientation-py

As I have different numbers of modules on each side I use this code with minor changes to the example above:

from pvlib import pvsystem, modelchain, location
import pandas as pd
import matplotlib.pyplot as plt

array_kwargs = dict(
    module_parameters=dict(pdc0=1, gamma_pdc=-0.004),
    temperature_model_parameters=dict(a=-3.56, b=-0.075, deltaT=3)
)

arrays = [
    pvsystem.Array(pvsystem.FixedMount(40, 275), name='West',
                   modules_per_string=5,
                   **array_kwargs),
    pvsystem.Array(pvsystem.FixedMount(40, 85), name='East',
                   modules_per_string=6,
                   **array_kwargs),
    ]

# latitude, longitude 
loc = location.Location(50.0, 10.0, 'Etc/GMT-1')
system = pvsystem.PVSystem(arrays=arrays, inverter_parameters=dict(pdc0=3))
mc = modelchain.ModelChain(system, loc, aoi_model='physical',
                           spectral_model='no_loss')

times = pd.date_range('2023-05-29 04:00', '2023-05-29 21:00', freq='5min',
                      tz='Etc/GMT-1')
weather = loc.get_clearsky(times)
mc.run_model(weather)

fig, ax = plt.subplots()
for array, pdc in zip(system.arrays, mc.results.dc):
    pdc.plot(label=f'{array.name}')
mc.results.ac.plot(label='Inverter')
plt.ylabel('Power')
plt.legend()
plt.show()

But I don't get a sum for the AC (inverter) output, instead it is clipped: plot


Solution

  • The following line sets the inverter size to 3:

    system = pvsystem.PVSystem(arrays=arrays, inverter_parameters=dict(pdc0=3))
    

    To make the inverter bigger and avoid clipping just increase the value, for example to 5:

    system = pvsystem.PVSystem(arrays=arrays, inverter_parameters=dict(pdc0=5))
    

    You should choose a reasonable value based on the number of modules in your system.