Incorrect AOI from pvlib.tracking.singleaxis
See original GitHub issuepvlib.tracking.singleaxis
produces an incorrect AOI when the sun is above the earth horizon but behind the module plane.
To Reproduce Model a fixed tilt system (90 tilt, 180 azimuth) and compare to a vertical single axis tracker with very small rotation limit.
import pandas as pd
import pytz
import pvlib
from matplotlib import pyplot as plt
loc = pvlib.location.Location(40.1134, -88.3695)
dr = pd.date_range(start='02-Jun-1998 00:00:00', end='02-Jun-1998 23:55:00',
freq='5T')
tz = pytz.timezone('Etc/GMT+6')
dr = dr.tz_localize(tz)
hr = dr.hour + dr.minute/60
sp = loc.get_solarposition(dr)
cs = loc.get_clearsky(dr)
tr = pvlib.tracking.singleaxis(sp['apparent_zenith'], sp['azimuth'],
axis_tilt=90, axis_azimuth=180, max_angle=0.01,
backtrack=False)
fixed = pvlib.irradiance.aoi(90, 180, sp['apparent_zenith'], sp['azimuth'])
plt.plot(hr, fixed)
plt.plot(hr, tr['aoi'])
plt.plot(hr, sp[['apparent_elevation']])
plt.show()
plt.legend(['aoi - fixed', 'aoi - tracked', 'apparent_elevation'])
Expected behavior
The AOI for the fixed tilt system shows values greater than 90 when the sun is behind the module plane. The AOI from singleaxis
does not.
I think the source of the error is the use of abs
in this line.
Screenshots
Versions:
pvlib.__version__
: 0.8.1
First reported by email from Jim Wilzcak (NOAA) for the PVlib Matlab function pvl_singleaxis.m
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
pvlib.tracking.singleaxis — pvlib python 0.9.3 documentation
Determine the rotation angle of a single-axis tracker when given particular solar zenith and azimuth angles. See 1 for details about the equations....
Read more >pvlib.tracking.SingleAxisTracker
A class for single-axis trackers that inherits the PV modeling methods from PVSystem . For details on calculating tracker rotation see ...
Read more >pvlib.tracking.singleaxis
Determine the rotation angle of a single-axis tracker when given particular solar zenith and azimuth angles. See 1 for details about the equations....
Read more >pvlib.tracking — pvlib python 0.9.3 documentation
See also -------- pvlib.tracking.singleaxis pvlib.tracking.calc_axis_tilt ... Returns ------- aoi : Series The angle of incidence in degrees from normal.
Read more >pvlib.tracking.SingleAxisTracker
class pvlib.tracking. ... False denotes no backtrack capability. ... A tracker system with modules 2 meters wide, centered on the tracking axis, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should we just replace that entire line with a call to
irradiance.aoi
?Yes, my initial port of the matlab code was as close to 1:1 as I could make it. I don’t recall second guessing the
abs
at the time, but I certainly should have.