Model to determine the expected power output of Photovoltaik-System (PV-System) based on DWD weather forecast data.
The basic procedure of the program has been derived from Kilian Knoll "DWDForecast" tool: https://github.com/kilianknoll/DWDForecast Many thanks for the ideas!
The following libraries are used:
Create a virtual environment using Python > 3.8.1 interpreter (Python 3.7.x may cause issues with pytables.)
Then install packages from requirements.txt
This implementation is used to verify a forecast-model against the measured valus from the PV-System
Thefore, the following plan was initiated:
Later, the results of this verification will be the baseline for production forecast to schedule the optimal order of utilization of...
where the target is to maximize own consumption of self generated electicity.
Therefore, the forecast will be set up as a regularly running thread that will update the forecast each e.g. 6 hours. Then, the forecast data will be stored in a SQL-Library to be displayed in a Node-Red environment.
The current values of the PV inverter will be stored on a regular basis (e.g. minutely) in an InfluxDB.
The weather forecast is taken from DWD Mosmix model. The station closest to the location of the PV system is defined in the configuration.ini file in the Section "DWD".
Basically, for validation purpose, it is possible to base the simulation on forecast data as well as on historical data (measured values). The historical data includes global irradiation as well as diffuse irradiation
Since the available rooftop area is quite limited, I have a small PV System installed.
Configuration:
The basic configuration of the PV System is done in the configuration.ini-file in the SolarSystem-Section.
The DWD Mosmix forecast provides global irradiation (ghi) values in a hourly resulution. To run the PVLIB Model Chain, also the diffuse horizontal irradiation (dhi) and the direct normal irradiation (dni) is required.
PVLIB comes up with a couple of alogrithms to determine dni from ghi. Here we use multiple of them, but the DISC model seems to work good.
For dhi computation, the Erbs model is used. It showed a good compliance between forecasted and measured (by DWD) values.
After running the main.py, a csv-file carrying wheater data, irradiation and computet PV system results. This file is stored in the "output" directory.
* 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