This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mission:tech:odyssey:sku:solar-prediction-model [2014-11-12 07:40] – [Solar-Output prediction model] chrono | mission:tech:odyssey:sku:solar-prediction-model [2015-05-21 13:05] (current) – created chrono | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Solar-Output prediction model ====== | + | Moved to [[lab:ucsspm]] |
- | + | ||
- | Using the sun as a renewable energy source isn't really a new invention. Plants have been relying on it for millions of years and our - mostly - green friends seem to handle it pretty well on an // | + | |
- | + | ||
- | Let's have a simplified look on how much we already depend on solar energy: | + | |
- | + | ||
- | * Global freshwater distribution (oceans-> | + | |
- | * Global atmospheric conditions/ | + | |
- | * Global flora -> atmospheric conditions/ | + | |
- | + | ||
- | and which parts we use technically: | + | |
- | + | ||
- | * Agriculture (photosynthesis) -> Food | + | |
- | * Solar energy conversion to heat (mirror/ | + | |
- | * Direct solid-state photon-> | + | |
- | + | ||
- | Global solar radiation (Rs) is of funfamental importance for human life on earth. We're depending very much on knowing how much solar energy can be harvested on a certain point on the planet' | + | |
- | ===== Use-Cases ===== | + | |
- | + | ||
- | ==== Photo-Voltaic Systems ==== | + | |
- | + | ||
- | * being able to have a more accurate prediction of maximum PV output for a given site/ | + | |
- | * keep PV panel at optimum elevation without a separate optical solar tracker | + | |
- | + | ||
- | ==== Solar-Ovens ==== | + | |
- | + | ||
- | The system can be easily extended to estimate the optimum parabolic oven-reflector size, to satisfy the energy needs for a given community and their specific position on the planet. | + | |
- | + | ||
- | + | ||
- | ==== Pyranometer Reference Model ==== | + | |
- | + | ||
- | Possibility to calibrate a pyranometer in the field, without another calibrated reference, on a clear-sky day. | + | |
- | + | ||
- | ==== Agricultural ==== | + | |
- | + | ||
- | Usable as basis for agricultural applications (growth/ | + | |
- | ===== Development ===== | + | |
- | + | ||
- | This model is based on algorithms developed by the // | + | |
- | + | ||
- | By now it has become a very advanced clear-sky prediction model, incorporating the following factors: | + | |
- | + | ||
- | * Position on Earth | + | |
- | * Day of Year | + | |
- | * Distance Sun-Earth | + | |
- | * Angle through atmosphere | + | |
- | * Water in atmosphere | + | |
- | * Atmospheric turbidity (smog, dust etc.) | + | |
- | * Direct/ | + | |
- | * PV-Module surface/ | + | |
- | ===== Code ===== | + | |
- | + | ||
- | <sxh python; toolbar: | + | |
- | # | + | |
- | # -*- coding: UTF-8 -*- | + | |
- | # | + | |
- | ######################################################################## | + | |
- | # | + | |
- | # This program is free software: you can redistribute it and/or modify | + | |
- | # it under the terms of the GNU General Public License as published by | + | |
- | # the Free Software Foundation, either version 3 of the License, or | + | |
- | # (at your option) any later version. | + | |
- | # | + | |
- | # This program is distributed in the hope that it will be useful, | + | |
- | # but WITHOUT ANY WARRANTY; without even the implied warranty of | + | |
- | # | + | |
- | # GNU General Public License for more details. | + | |
- | # | + | |
- | # You should have received a copy of the GNU General Public License | + | |
- | # along with this program. | + | |
- | # | + | |
- | ######################################################################## | + | |
- | + | ||
- | import math, calendar | + | |
- | from math import pi | + | |
- | + | ||
- | # Solar constant for the mean distance between the Earth and sun ####### | + | |
- | + | ||
- | sol_const = 1367.8 | + | |
- | + | ||
- | ######################################################################## | + | |
- | # GEO Parameters (to be fed from GPS) | + | |
- | + | ||
- | lat = 23 | + | |
- | lon = 11 | + | |
- | alt = 0 | + | |
- | + | ||
- | ######################################################################## | + | |
- | # Time and Offsets (to be fed from GPS) | + | |
- | + | ||
- | day = 22 | + | |
- | month = 06 | + | |
- | year = 2011 | + | |
- | ToD = 12 | + | |
- | tz_off_deg = 0+lon | + | |
- | dst_off = 0 | + | |
- | + | ||
- | ######################################################################## | + | |
- | # Atmospheric Parameters (to be fed from Argus current sensor data) | + | |
- | + | ||
- | # air temperature | + | |
- | + | ||
- | atm_temp = 25.0 | + | |
- | + | ||
- | # relative humidity | + | |
- | + | ||
- | atm_hum = 20.0 | + | |
- | + | ||
- | # turbidity coefficient - 0 < tc < 1.0 - where tc = 1.0 for clean air | + | |
- | # and tc < 0.5 for extremely turbid, dusty or polluted air | + | |
- | + | ||
- | atm_tc = 0.8 | + | |
- | + | ||
- | ######################################################################## | + | |
- | # PV System Parameters (actual PV data of Odysseys modules) | + | |
- | + | ||
- | # Solar Panel Surface in m² | + | |
- | + | ||
- | pv_a = 1.67 | + | |
- | + | ||
- | # Module Efficiency % | + | |
- | + | ||
- | pv_eff = 20 | + | |
- | + | ||
- | # Mod. neg. Temp. Coeff (0.35=mono) | + | |
- | + | ||
- | pv_tk = 0.35 | + | |
- | + | ||
- | # Mod. Temperature in °C - should be measured on the back of module | + | |
- | + | ||
- | pv_temp = 30 | + | |
- | + | ||
- | # Mod. Age related Coeff (95% after 1-2y) | + | |
- | + | ||
- | pv_ak = 0.98 | + | |
- | + | ||
- | + | ||
- | + | ||
- | ######################################################################## | + | |
- | ## MAIN | + | |
- | ######################################################################## | + | |
- | + | ||
- | # get Julian Day (Day of Year) | + | |
- | + | ||
- | if calendar.isleap(year): | + | |
- | + | ||
- | # Leap year, 366 days | + | |
- | lMonth = [0, | + | |
- | + | ||
- | else: | + | |
- | + | ||
- | # Normal year, 365 days | + | |
- | lMonth = [0, | + | |
- | + | ||
- | DoY = lMonth[month-1] + day | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | print "Solar Constant | + | |
- | print " | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | + | ||
- | # inverse relative distance factor for distance between Earth and Sun ## | + | |
- | + | ||
- | sun_rel_dist_f = 1.0/ | + | |
- | + 0.01671*math.cos(DoY)- \ | + | |
- | + 1.489e-4*math.cos(2.0*DoY)-2.917e-5*math.sin(3.0*DoY)-\ | + | |
- | + 3.438e-4*math.cos(4.0*DoY))**2 | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | + | ||
- | # solar declination #################################################### | + | |
- | + | ||
- | sun_decl = (math.asin(0.39785*(math.sin(((278.97+(0.9856*DoY)) \ | + | |
- | + (1.9165*(math.sin((356.6+(0.9856*DoY)) \ | + | |
- | * (math.pi/ | + | |
- | / math.pi | + | |
- | + | ||
- | + | ||
- | print "Sun declination | + | |
- | + | ||
- | + | ||
- | # equation of time ##################################################### | + | |
- | # (More info on http:// | + | |
- | + | ||
- | eqt = (((5.0323-(430.847*math.cos((((2*math.pi)*DoY)/ | + | |
- | + (12.5024*(math.cos(2*((((2*math.pi)*DoY)/ | + | |
- | + (18.25*(math.cos(3*((((2*math.pi)*DoY)/ | + | |
- | - (100.976*(math.sin((((2*math.pi)*DoY)/ | + | |
- | + (595.275*(math.sin(2*((((2*math.pi)*DoY)/ | + | |
- | + (3.6858*(math.sin(3*((((2*math.pi)*DoY)/ | + | |
- | - (12.47*(math.sin(4*((((2*math.pi)*DoY)/ | + | |
- | / 60 | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | + | ||
- | # time of solar noon ################################################### | + | |
- | + | ||
- | sol_noon = ((12+dst_off)-(eqt/ | + | |
- | + | ||
- | print "Solar Noon : %s " % sol_noon | + | |
- | + | ||
- | + | ||
- | # solar zenith angle in DEG ############################################ | + | |
- | + | ||
- | sol_zen = math.acos(((math.sin(lat*(math.pi/ | + | |
- | * (math.sin(sun_decl*(math.pi/ | + | |
- | + (((math.cos(lat*((math.pi/ | + | |
- | * (math.cos(sun_decl*(math.pi/ | + | |
- | * (math.cos((ToD-sol_noon)*(math.pi/ | + | |
- | * (180/ | + | |
- | + | ||
- | # in extreme latitude, values over 90 may occurs. | + | |
- | #if sol_zen > 90: | + | |
- | + | ||
- | print "Solar Zenith Angle : %s° " % sol_zen | + | |
- | + | ||
- | + | ||
- | # barometric pressure of the measurement site | + | |
- | # (this should be replaced by the real measured value) in kPa | + | |
- | + | ||
- | atm_press = 101.325 \ | + | |
- | * math.pow(((288-(0.0065*(alt-0)))/ | + | |
- | , (9.80665/ | + | |
- | + | ||
- | atm_press=100.5 | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | + | ||
- | # Estimated air vapor pressure in kPa ################################### | + | |
- | + | ||
- | atm_vapor_press = (0.61121*math.exp((17.502*atm_temp) \ | + | |
- | / (240.97+atm_temp))) \ | + | |
- | * (atm_hum/ | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | + | ||
- | # extraterrestrial radiation in W/m2 ################################### | + | |
- | + | ||
- | extra_terr_rad = (sol_const*sun_rel_dist_f) \ | + | |
- | * (math.cos(sol_zen*(math.pi/ | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | + | ||
- | # precipitable water in the atmosphere in mm ########################### | + | |
- | + | ||
- | atm_prec_h2o = ((0.14*atm_vapor_press)*atm_press)+2.1 | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | + | ||
- | # clearness index for direct beam radiation [unitless] ################# | + | |
- | + | ||
- | clr_idx_beam_rad= 0.98*(math.exp(((-0.00146*atm_press) \ | + | |
- | / (atm_tc*(math.sin((90-sol_zen)*(math.pi/ | + | |
- | - (0.075*(math.pow((atm_prec_h2o \ | + | |
- | / (math.sin((90-sol_zen)*(math.pi/ | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | + | ||
- | # transmissivity index for diffuse radiation [unitless] ################ | + | |
- | + | ||
- | if (clr_idx_beam_rad > 0.15): | + | |
- | trns_idx_diff_rad= 0.35-(0.36*clr_idx_beam_rad) | + | |
- | else: | + | |
- | trns_idx_diff_rad= 0.18+(0.82*clr_idx_beam_rad) | + | |
- | + | ||
- | print " | + | |
- | + | ||
- | + | ||
- | # Model Estimated Shortwave Radiation (W/m2) ########################### | + | |
- | + | ||
- | est_sol_rad = (clr_idx_beam_rad + trns_idx_diff_rad) \ | + | |
- | * extra_terr_rad | + | |
- | + | ||
- | print " | + | |
- | print "Model Estimated Shortwave Radiation (RSO) : \033[1; | + | |
- | + | ||
- | + | ||
- | # Estimate Output of Odyssey (solar panels at nominal Efficiency) ###### | + | |
- | + | ||
- | est_p_out = (est_sol_rad*pv_a) / 100 * pv_eff | + | |
- | + | ||
- | print "Model Estimated Max. PV-Power Output | + | |
- | + | ||
- | + | ||
- | # Estimate conversion loss due to module temperature ################### | + | |
- | + | ||
- | if ( pv_temp > 25 ): | + | |
- | + | ||
- | pv_p_loss = (pv_temp-25 ) * pv_tk | + | |
- | pv_p_loss_p = (est_p_out/ | + | |
- | + | ||
- | print "Model estimated PV-Module temp conv. loss : \033[1; | + | |
- | + | ||
- | # Estimate conversion loss due to module age | + | |
- | + | ||
- | est_pv_age_loss = est_p_out - (est_p_out*pv_ak) | + | |
- | + | ||
- | print "Model estimated PV-Module aging loss : \033[1; | + | |
- | + | ||
- | # Optimal PV Module Angle to Sun | + | |
- | + | ||
- | print "Model recommends PV-Module angle to Sun : \033[1; | + | |
- | + | ||
- | # Estime Power output of Odyssey (solar panels at corrected Efficiency) | + | |
- | + | ||
- | est_real_p_out = est_p_out - est_pv_age_loss-pv_p_loss_p | + | |
- | + | ||
- | print " | + | |
- | print "Model Estimated Real PV-Power Output | + | |
- | + | ||
- | + | ||
- | </ | + | |
- | + | ||
- | <WRAP round download> | + | |
- | **Download: | + | |
- | [[https:// | + | |
- | </ | + | |
- | + | ||
- | <WRAP round important> | + | |
- | Please feel free to contribute by verifying these calculations or extend them to an even more accurate/ | + | |
- | </ | + | |
- | + | ||
- | <code bash> | + | |
- | # python solar-prediction.py | + | |
- | -------------------------------------------------------------- | + | |
- | 22.6.2011 | 173 | 12.000000 | | + | |
- | -------------------------------------------------------------- | + | |
- | Solar constant | + | |
- | Atmospheric turbidity coefficient | + | |
- | -------------------------------------------------------------- | + | |
- | Inverse relative distance factor | + | |
- | Sun declination | + | |
- | Equation of time : -1.71440597602 min | + | |
- | Solar Noon : 12.0285734329 | + | |
- | Solar zenith angle : 0.593383030197° | + | |
- | Estimated barometric Pressure at site : 100.5 kPa | + | |
- | Estimated vapor pressure at site : 0.633406906142 kPa | + | |
- | Estimated extraterrestrial radiation | + | |
- | Estimated precipitable water in atmosphere | + | |
- | Clearness index for direct beam radiation | + | |
- | Transmissivity index for diffuse radiation | + | |
- | -------------------------------------------------------------- | + | |
- | Model estimated shortwave radiation (RSO) : 1032.1 W/m² | + | |
- | Model estimated max. PV-Power output | + | |
- | Model estimated PV-Module temp conv. loss : 6.0 W / 1.8% | + | |
- | Model estimated PV-Module aging loss : 6.9 W | + | |
- | Model recommends PV-Module angle to Sun : 0.6° | + | |
- | -------------------------------------------------------------- | + | |
- | Model estimated real PV-Power output | + | |
- | </ | + | |
- | ===== Sources ===== | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | + | ||
- | {{tag> | + |