8000 Implement dynamic faiman model and function to fit this to measurements by adriesse · Pull Request #1878 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Implement dynamic faiman model and function to fit this to measurements #1878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rework example some more.
  • Loading branch information
adriesse committed Oct 9, 2023
commit df66b39d351d37af32bf49f663145ff90d85a59b
26 changes: 19 additions & 7 deletions docs/examples/operating-temperature/plot_dynamic_faiman.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,23 @@

# %%
#
# This example reads a csv file containing one-minute average monitoring data.
# The function fit_faiman_dyn is used to determine the model parameters, and
# the function faiman_dyn is used to demonstrate how well it worked.
# Applying a moving average filter to the PV array operating conditions
# is a simple technique to compensate for the thermal inertia of the module,
# which delays and dampens temperature fluctuations.
# It is useful for simulating at small time steps, but even more useful for
# fitting models to field data as demonstrated in [1]_.
# The functions :py:func:`pvlib.temperature.faiman_dyn` and
# :py:func:`pvlib.temperature.fit_faiman_dyn` incorporate this moving average
# technique.
#
# Contributed by Anton Driesse, PV Performance Labs, October 2023
# This example reads a csv file containing one-minute average monitoring data.
# The function :py:func:`pvlib.temperatur 8000 e.fit_faiman_dyn` is used to determine
# the model parameters and the function :py:func:`pvlib.temperature.faiman_dyn`
# is used to demonstrate how well it worked.
#
## Contributed by Anton Driesse, PV Performance Labs, October 2023.
#
# References
## References
# ----------
# .. [1] Driesse, A. (2022) "Module operating temperature model parameter
# determination" DOI TBD
Expand Down Expand Up @@ -64,8 +73,8 @@
# %%
#
# With the full_output option you can obtain the results for all the values
# of thermal_inertia that were evaluated. The minimum is clearly visible
# below, but 1 minute shorter or longer doesn't make much difference
# of thermal_inertia that were evaluated. The optimal point is clearly visible
# below, but a minute shorter or longer actually doesn't make much difference
# in the RMSE.
#

Expand All @@ -92,6 +101,7 @@
df.wind_speed, **params)

DAY = slice('2020-03-20 7:00', '2020-03-20 19:00')
# sphinx_gallery_thumbnail_number = 2
plt.figure()
plt.plot(df.temp_pv[DAY])
plt.plot(df.temp_pv_faiman[DAY], alpha=0.5, zorder=0)
Expand All @@ -102,6 +112,8 @@
plt.ylabel('PV temperature [C]')
plt.show()

# %%

dfs = df.sort_values('wind_speed')
plt.figure()
l1 = plt.plot(dfs['temp_pv'], dfs['temp_pv_faiman'], '.', color='C1')
Expand Down
0