Skip to content

add SingleAxisTracker support to ModelChain #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 20, 2016

Conversation

wholmgren
Copy link
Member

@wholmgren wholmgren commented May 15, 2016

This code makes it so that you can use a ModelChain with a SingleAxisTracker.

It's a bit verbose due to a couple of potentially bad design decisions in SingleAxisTracker (overriding PVSystem.get_irradiance and setting the output of singleaxis to nan for zenith > 90). I'd prefer to merge this for a 0.3.3 release and make the API breaking changes in 0.4.

The code works and passes a new test, but I want to test it more thoroughly in the next few days. I'll probably merge it on Tuesday or Wednesday unless someone objects.

Closes #169

To do:

  • make a figure showing that it works
  • add an assert_equals for the mc.tracking attribute
  • add to whatsnew

@wholmgren wholmgren added this to the 0.3.3 milestone May 15, 2016
@wholmgren
Copy link
Member Author

Here's some code and a couple of figures demonstrating this feature plus the newly pulled scaling functions in #171.

module = modules['Canadian_Solar_CS5P_220M___2009_'].copy()
inverter = inverters['SMA_America__SC630CP_US_315V__CEC_2012_'].copy()

location = Location(32.2, -111, altitude=700)

system = SingleAxisTracker(module_parameters=module,
                           inverter_parameters=inverter,
                           series_modules=15,
                           parallel_modules=300)
mc = ModelChain(system, location)

times = pd.date_range(start='20160101 0000-0700', end='20160102 0000-0700', freq='1min')
ac = mc.run_model(times).ac

plt.figure()
ac.plot()
plt.ylim(0, 700000)
plt.ylabel('power (W)')
plt.title('Single axis tracker AC power calculated via a ModelChain, Jan 1')

times = pd.date_range(start='20160601 0000-0700', end='20160602 0000-0700', freq='1min')
ac = mc.run_model(times).ac

plt.figure()
ac.plot()
plt.ylim(0, 700000)
plt.ylabel('power (W)')
plt.title('Single axis tracker AC power calculated via a ModelChain, Jun 1')

mc sat jan
mc sat jun

@wholmgren wholmgren merged commit 4073821 into pvlib:master May 20, 2016
@wholmgren wholmgren deleted the mctracker branch May 20, 2016 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant