question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

backtracking for rare case when sun below tracker improvement

See original GitHub issue

Describe the bug

  • related to #656
  • in the rare case when the sun rays are below the tracker, then the top of the next row is shaded
  • currently tracker backtracks away from sun, back is facing sun instead of front
  • this only happens for tilted trackers and very low sun angles, either early morning or late evening when the sun rays are furthest north or south

To Reproduce Steps to reproduce the behavior:

  1. create a tilted tracker
# in Brazil so facing north
axis_azimuth = 0.0 
axis_tilt = 20
max_angle = 75.0
gcr = 0.35
  1. pick the earliest morning (or latest evening) timestamp
import pvlib
import pandas as pd

# Brazil, timezone is UTC-3[hrs]
starttime = '2017-01-01T00:30:00-0300'
stoptime = '2017-12-31T23:59:59-0300'
lat, lon = -27.597300, -48.549610
times = pd.DatetimeIndex(pd.date_range(
    starttime, stoptime, freq='H'))
solpos = pvlib.solarposition.get_solarposition(
    times, lat, lon)
# get the early times
ts0 = '2017-01-01 05:30:00-03:00'
ts1 = '2017-01-01 12:30:00-03:00'
apparent_zenith = solpos['apparent_zenith'][ts0:ts1]
azimuth = solpos['azimuth'][ts0:ts1]
sat = pvlib.tracking.singleaxis(
    apparent_zenith, azimuth, axis_tilt, axis_azimuth, max_angle, True, gcr)
  1. notice that the tracker suddenly jumps from one side facing east to west
                           tracker_theta        aoi  surface_azimuth  surface_tilt
2017-01-01 05:30:00-03:00     -21.964540  62.721237       310.299287     29.368272
2017-01-01 06:30:00-03:00      16.231156  69.264752        40.403367     25.546154
2017-01-01 07:30:00-03:00      69.073645  20.433849        82.548858     70.389280
2017-01-01 08:30:00-03:00      54.554616  18.683626        76.316479     56.978562
2017-01-01 09:30:00-03:00      40.131687  17.224233        67.917292     44.072837
2017-01-01 10:30:00-03:00      25.769332  16.144347        54.683567     32.194782
2017-01-01 11:30:00-03:00      11.439675  15.509532        30.610665     22.923644
2017-01-01 12:30:00-03:00      -2.877428  15.358209       351.639727     20.197537
  1. AOI is also wrong

Expected behavior The tracker should avoid shade. It should not jump from one direction to the other. If the sun ray is below the tracker then it will need to track to it’s max rotation or backtrack. If there is shading at it’s max rotation then it should track backtrack to zero, or perhaps parallel to the sun rays. Perhaps if bifacial, then it could go backwards, 180 from the correct backtrack position to show it’s backside to the sun.

proposed algorithm (updated after this comment):

if backtracking:
    # cos(R) = L / Lx, R is rotation, L is surface length,
    # Lx is shadow on ground, tracker shades when Lx > x
    # x is row spacing related to GCR, x = L/GCR
    lrot = np.cos(tr_rot_no_lim)  # tracker rotation not limited by max angle

    # Note: if tr_rot > 90[deg] then lrot < 0 
    # which *can* happen at low angles if axis tilt > 0
    # tracker should never backtrack more than 90[deg], when lrot = 0
    cos_rot = np.minimum(np.abs(lrot) / self.gcr, 1)

    # so if lrot<0 tracker should backtrack forward
    # backtrack_rot = np.sign(lrot) * np.arccos(cos_rot)

    # NOTE: updated after comment from @kevinsa5 at Nov 27, 2019, 8:16 AM PST
    # to remove sign()
    backtrack_rot = np.arccos(cos_rot)

also remove abs from aoi calculation

https://github.com/pvlib/pvlib-python/blob/c699575cb6857674f0a96348b77e10c805e741c7/pvlib/tracking.py#L461

Screenshots If applicable, add screenshots to help explain your problem.

Versions:

  • pvlib.__version__: 0.6.3
  • pandas.__version__: 0.24
  • python: 3.7

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
kevinsa5commented, Nov 27, 2019

I’m not sure that this point is necessarily true:

it appears that at the instant after the sun crosses the “system” plane and the sun drops below it, the PV surface if backtracking would have to flip 180[deg] forward in order to face downward at the sun

From my understanding, there are two backtracking positions that eliminate row-to-row shading and present the same cross section to incoming beam irradiance. In the below diagram (another that I already had laying around), the sun has crossed below the system plane and it shows the two possible backtracking positions. P1 is what you’re describing where the front face of the module has rotated around and is now facing backwards/down and P2 is what I tried to describe above where the modules are still facing forwards/up. I believe the two are equivalent in terms of DNI collection and shading, but the forwards/up variant would presumably have better diffuse collection and is more accommodating of tracker rotation limits.

image

I don’t have the math already coded up for this so I can’t generate a comparison plot of tracker angle, but I think it would look something like the absolute value of your blue line – a moment where tracker_angle=0 when the sun crosses the system plane, with positive tracker angle on both sides of the zero.

1reaction
cwhansecommented, Nov 22, 2019

Related to #65 is a typo? I’m not following step 1, what is system_plane defining?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slope-Aware Backtracking for Single-Axis Trackers - NREL
In that case, the array should operate at increased angle of incidence when the sun is low in the sky to prevent row-to-row...
Read more >
Backtracking system provide less yield than without ...
Hello, guysI would like to ask you why backtracking give less yield than the one without backtracking in the simulation report of PVsyst ......
Read more >
Backtracking Algorithm for Single-Axis Solar Trackers installed ...
In this paper we present a backtracking algorithm that improves the energy production of a single-axis solar tracker by reducing the shadow ...
Read more >
Backtracking: Tracking Tool to Improve Project Performance
Solar backtracking is a tracking control program that aims to minimize PV panel-on-panel shading, thus avoiding production losses.
Read more >
Tracking and backtracking - Universidad Politécnica de Madrid
Solar tracking is been used with PV flat modules for more ... ideal tracking in the case of shadowing, (b) back-tracking. where LEW...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found