-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
plots negative power too #130
Comments
Is this still an issue, or did we sovle this? |
I think this is solved after taking 7day data |
Shall we close this then? |
Yes this could be closed |
Negative production still occurs for me when I run the script for a site in the Caribbean using the
|
@peterdudfield guess we'll have to reopen this? Can perhaps cap the values at 0 so that they don't go below |
@aryanbhosale is your project / data / models trained only for the UK? The forecast of this lib for my system is completely off. |
It's not exactly my project, I've only worked with integrating solar inverters to get live data, |
Yea we train on uk systems, but we would be very interested in testing it and possibly expanding it. In principle we should be able to make a global model. Can you share any plots and code you used? Any comparisons with real data would be great There could be a chance there are some timezone issues |
Here is the code I used @peterdudfield
It's kind of weird that a PV production forecast would ever return a negative value 🙃 |
Thanks. Yea negative numbers are odd. What are the constant like lat and lon you used? Just so we can reproduce. Also you can round your lat and lons, if you want to keep the location slightly more prviate |
@peterdudfield I was checking it for Antigua. |
Thanks. I'll have to test out there. Ultimately the ML model is trained on UK sites, but it should work globally. We only trained on UK sites, as we have UK data |
Hi @iRonin, I just ran a forecast for Antigua, I got some results like this. Is this what you get? """ Example code to run the forecast"""
from quartz_solar_forecast.forecast import run_forecast
from quartz_solar_forecast.pydantic_models import PVSite
from datetime import datetime, timedelta
import plotly.express as px
def main():
# make input data
site = PVSite(latitude=17, longitude=-61, capacity_kwp=1.0)
ts = datetime.now()
# User has three options for the 'nwp_source': 'icon', 'gfs', or 'ukmo'.
predictions_df = run_forecast(site=site, ts=ts, nwp_source="icon")
print(predictions_df)
print(f"Max: {predictions_df['power_kw'].max()}")
fig = px.line(predictions_df.reset_index().rename(columns={"index": "date"}),
x="date", y="power_kw",
labels={"power_kw": "Power (kw)"},
title="Solar Energy Prediction")
fig.show()
if __name__ == "__main__":
main() |
I'll email you my coordinates as these seem to still produce negative forecast values. |
Thanks, and what about for the coordiantes above, does it work for you? |
No negative values but your coordinates are somewhere close to St. Lucia. It seems the negative values start happening once you add capacity. Try this: site = PVSite(latitude=17.0742, longitude=-61.8869, capacity_kwp=15.48) |
Ah interesting, out training set was using capacities from 1 - 4 is kwp, so could you try it with a smaller number? We could also scale the results if the capacity is above 5. I.e
@zakwatts I'd be interested in your opinion on this? |
Default 1kW works. |
Describe the bug
I plotted the live enphase data at 9:06pm IST against the fake data and i can see negative power in the curve
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No negative power should be plotted
Additional context
Should the negative part be taken 0 or modded?
The text was updated successfully, but these errors were encountered: