This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
[Medium] Calculate output of a PV system #7
cwhanse
started this conversation in
Project Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Explore using pvlib's
ModelChain
to model a PV system and calculate a year of output.ModelChain
provides some automation to the modeling process, from solar position to POA irradiance to electrical power. Alternatively, you can build the model chain by choosing among the functions pvlib provides.Step 1. - Copy and run the code in pvlib's Introductory Tutorial. This code shows how to model output of a one-module PV system with a microinverter, in five different locations, using weather from PVGIS. The first half of the tutorial code uses pvlib's functions, the second half runs a
ModelChain
.For the following steps, it is useful to select one of the locations from the tutorial and remove the other locations.
Step 2. - Repeat
mc.run_model
and examinemc.results
. Plot one of these results, for example,poa_global
which is plane-of-array irradiance. Make a scatterplot of POA irradiance vs. AC power. What other plots can you make from theModelChain
results?Step 3. - Change the weather to model a year of clear-sky irradiance. Hint: in the calculation using
ModelChain
, a pvlibLocation
is defined.Location
has a methodget_clearsky
that returns clear-sky irradiance. You will need to replace the irradiance in theweather
DataFrame with values from the clear-sky model.Plot the resulting POA irradiance and AC power.
Bonus Challenge - The Introductory Tutorial models a one-module PV system, using the Sandia module, temperature and inverter models. Change the calculation to use the CEC module model by selecting a different module. Use
pvlib.pvsystem.retrieve_sam('CECMod') to select a module with CEC model parameters. Assign the module parameters to
module_parameterswhen the
PVSystem` is defined.Beta Was this translation helpful? Give feedback.
All reactions