NEWS
[gelöst] Optimale Neigung Solarmodule errechnen
-
Hallo,
ich möchte ein PV-Tracking (nur Neigung) bauen für mein Wohnmobil. Dafür möchte ich die optimale Neigung der Module in Abhängigkeit der Uhrzeit, aktuellen Koordinaten und Ausrichtung berechnen. Koordinaten und Ausrichtung liegen vor. Ich scheitere aber kläglich an der Berechnung. Ich habe zwei Varianten gebaut auf Grundlage von unten genannten Threads, aber beide bringen nicht das erhoffte Ergebnis. Ich bin mit der Mathematik leider überfordert und benötige hier eure Hilfe. Die Herausforderung ist nicht, den besten Winkel zu berechnen, sondern die konkrete, theoretische Leistung in Abhängigkeit von Uhrzeit, aktuellen Koordinaten, Neigung und Ausrichtung zu berechnen. Den Rest bekomme ich dann hin.
Variante 1: https://forum.iobroker.net/topic/4953/script-sonnenstand-und-einstrahlung
Ausgabe: 0:00 Uhr: 0 | 1:00 Uhr: 0 | 2:00 Uhr: 0 | 3:00 Uhr: 0 | 4:00 Uhr: 0 | 5:00 Uhr: 0 | 6:00 Uhr: 0 | 7:00 Uhr: 0 | 8:00 Uhr: 0 | 9:00 Uhr: 183.35 | 10:00 Uhr: 401.56 | 11:00 Uhr: 551.24 | 12:00 Uhr: 632.75 | 13:00 Uhr: 641.67 | 14:00 Uhr: 577.46 | 15:00 Uhr: 443.85 | 16:00 Uhr: 244.08 | 17:00 Uhr: 0 | 18:00 Uhr: 0 | 19:00 Uhr: 0 | 20:00 Uhr: 0 | 21:00 Uhr: 0 | 22:00 Uhr: 0 | 23:00 Uhr: 0
var suncalc = require('suncalc'); //var lat = getState("0_userdata.0.Router.gpslat").val; // var long = getState("0_userdata.0.Router.gpslat").val; // var modtilt = 38; //Dachneigung in Grad (Solar panel's tilt angle) // var modazi = 200; //Ausrichtung des Hauses in Grad zB SSW (Solar panel's azimut) var modsufrace = 1; //Paneloberfläche in m2 (Solar panel's surface in sq. meters) var modeff = 0.183; //Annäherung an Panel-Wirkungsgrad zB 18 Prozent (modules efficiency correction) // Hier kann an einem klaren Tag etwas geschraubt werden ;-) var altitude; // Calculated Elevation var azimuth; // Calculated Azimuth // ganz am Ende die setStates anpassen nicht vergessen! // Do not change below, until You know what You are doing! // ******************************************************** Math.degrees = function(radians) {return radians * 180 / Math.PI;}; Math.radians = function(degrees) {return degrees * Math.PI / 180;}; var now = stunde; var sunpos = suncalc.getPosition(now, lat, long); // log("Script Sonnenstand; latitude : " + result.native.latitude + " / longitude: " + result.native.longitude,'debug'); // log("Script Sonnenstand; sunpos: " + JSON.stringify(sunpos),'debug'); altitude = Math.degrees(sunpos.altitude); azimuth = Math.degrees(sunpos.azimuth) + 180; // The intensity of the direct component of sunlight throughout each day can be determined as // a function of air mass. based on: http://pveducation.org/pvcdrom/properties-of-sunlight/air-mass#formula var airmass = 1/Math.cos((90-altitude)*4*Math.asin(1)/360); // Sincident is the intensity on a plane perpendicular to the sun's rays in units of kW/m2 and AM is the air mass. // The value of 1.353 kW/m2 is the solar constant and the number 0.7 arises from the fact that about 70% of the radiation incident on the atmosphere is transmitted // to the Earth. The extra power term of 0.678 is an empirical fit to the observed data and takes into account the non-uniformities in the atmospheric layers. // ykuendig: use different values because of pv instead thermal panels var Sincident = (1.367*Math.pow(0.78,Math.pow(airmass,0.6))); var fraction = Math.cos(altitude*4*Math.asin(1)/360)*Math.sin(modtilt*4*Math.asin(1)/360)*Math.cos(azimuth*4*Math.asin(1)/360-modazi*4*Math.asin(1)/360)+Math.sin(altitude*4*Math.asin(1)/360)*Math.cos(modtilt*4*Math.asin(1)/360); // W/m² light intensity on the module * module's surface var SmoduleInt = Sincident * fraction * modsufrace * 1000; if(SmoduleInt<0) { SmoduleInt = 0; } // Module Effective in relation of the efficiency of the used panel var SmoduleEff = SmoduleInt * modeff; if( altitude < 0 ) { SmoduleInt = 0; SmoduleEff = 0; altitude = 0; } return SmoduleInt;
Ich rechne mit dem Skript die Leistung für jede Stunde heute aus. Leider passen die Werte null mit denen vom Adapter PV-Forecast überein, auch nicht verhältnismäßig. Für mich ist der reale Ertrag zwar irrelevant, da ich ja nur die beste Ausrichtung berechnen möchte, trotzdem habe ich große Zweifel, dass das stimmt
Werte PVForecast von 9-16h zum vergleich
Variante 2: https://forum.iobroker.net/topic/42892/mathe-genie-gesucht-kurvenberechnung/87?_=1674170079397&lang=de
Ausgabe: 30.658461704697068
var suncalc = require('suncalc'); var lat = getState("0_userdata.0.Router.gpslat").val; var long = getState("0_userdata.0.Router.gpslat").val; Math.degrees = function(radians) {return radians * 180 / Math.PI;}; var sunpos = suncalc.getPosition(stunde, lat, long); return Math.degrees(sunpos.altitude);
var suncalc = require('suncalc'); var lat = getState("0_userdata.0.Router.gpslat").val; var long = getState("0_userdata.0.Router.gpslat").val; Math.degrees = function(radians) {return radians * 180 / Math.PI;}; var sunpos = suncalc.getPosition(stunde, lat, long); return Math.degrees(sunpos.azimuth) +180;
Diese Ausgabe macht für mich auch keinen Sinn, weil um 6 Uhr ist die Sonne noch garnicht aufgegangen, da kann es noch keine Leistung geben...
Welche Variante ich am Ende nutze ist mir wurscht, hauptsache ich kann die Nachführung realisieren. Kann mir jemand weiterhelfen?
Vielen Dank für eure Hilfe!
-
@christian_ffm sagte: Dafür möchte ich die optimale Neigung der Module in Abhängigkeit der Uhrzeit
Wie man aus den Formeln sieht, ist die optimale Neigung = 90° - Elevation.
@christian_ffm sagte in Optimale Neigung Solarmodule errechnen:
var lat = getState("0_userdata.0.Router.gpslat").val; var long = getState("0_userdata.0.Router.gpslat").val;
lat
undlong
können nicht aus dem gleichen Datenpunkt kommen, wenn sie dort als Zahl vorliegen.EDIT: Die passende Formel für die PV-Leistung bei klarem Himmel unter Berücksichtigung der Globalstrahlung findet man hier.
-
@paul53 oh je, was ein blöder Fehler. Copy paste ist was für fortgeschrittene. Danke Paul! Funktioniert jetzt beides einwandfrei mit plausiblen Ergebnissen.