
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 04 | Apr 2025 www.irjet.net p-ISSN: 2395-0072
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 04 | Apr 2025 www.irjet.net p-ISSN: 2395-0072
Vivek Shingne1 , Animesh Tiwari2 , Vinay Yadav3, Divyesh Surve4 , Dr. Anil Kale5
1,2,3,4Student at Mahatma Gandhi Mission’s College of Engineering And Technology, Navi Mumbai 5Associate Professor at Mahatma Gandhi Mission’s College of Engineering And Technology, Navi Mumbai
Abstract – Due to increase in demand for electricity and rising depletion of fossil fuels, there is a growing shift towards the renewable sources of energy. Out of which, solar energy is a crucial one. However, its dependency on weather conditions creates challenges in forecasting and efficient usage. Our aim is to build an intelligent system that provides accurate solar energy predictions based on location and helps the user to estimate energy generation, cost savings and environmental impact. In this paper, we propose a system titled “AI Based Solar Energy Forecasting” that will predict solar energy generation using weather-based parameters. The system utilizes a Linear Regression model trained on historical solar and weather data to provide reliable energy forecasts based on location. In addition to this it also offers option to input number of solar panels, panel area, efficiency and local electricity rate to estimate electrical energy output, cost savings and C02 emissions avoided.
Key Words: Solar Energy, Renewable Energy Forecasting, Linear Regression, Machine Learning, CO2 Emission Reduction.
Theincreaseintheneedforcleanandsustainableenergyis increasingdaybyday.Insuchconditions,thesolarenergy has come out as one of the proper solution to this. Solar energyisrenewable,widelyavailableandenvironmentally friendly. But the production of solar energy relies on the weather factors which makes it difficult to predict it accurately. So the inaccurate forecasts might lead to the energy loss and increased dependency on non-renewable energy. Accurate forecasting will help people plan their energyusagesmuchbetterandalsosavemoneywhilealso contributing to the environment due to reduced carbon footprint.Inthisproject,wefocusonbuildinganAIBased SolarEnergyForecastingusingmachinelearningtechniques, particularlyLinearRegressiontopredictsolarenergybased ontheweatherfactorsofalocation.Alsooursystemallows user to estimate their energy outputs, cost savings and environmental benefit through an easy to use web application.
In the old one or we can say traditional solar energy generation systems, getting the predictions regarding the solar energy has always been difficult. Most of the conventionalmethodsrelyonstaticdataorfixedassumption,
whooftenfailtoadapttothesuddenchangesintheweather factorslikeforexample,unexpectedcloudcover,changesin temperatureordustintheatmosphere.Thisfactorshavea directeffectonthepotentialofthesolarpanels,whichmight lead to fluctuations in the energy generation that are very hardtopredictwiththeoldmodels.
Furthermanyoftheseapproacheswerestronglydependent onmanualfeatureselectionandstaticformulaswhichmade themlessflexible whenappliedacross differentlocations. This challenges gave rise to the need for more dynamic system providing consistent and reliable forecasts, regardlessoflocation,timeoryear.
1. By taking these limitations into consideration, we thoroughly explored themachinelearningtechniquesand developedaLinearRegressionbasedmodelforsolarenergy prediction. Our approach removes the need for difficult manualcomputationsbyautomaticallylearningmeaningful patterns from the environmental data like temperature, cloudcoverandsolarirradiation.
2.Inspiredbymoderndatadrivenmethodswetrainedand fine-tuned our model using historical weather and solar generation datasets that allows it to adapt to the varying conditionsandgivemoreaccuratepredictionsascompared tothestandardrulebasedforecastingtechniques.
3.Whencomparedwiththeconventionalsolarforecasting systems, this framework achieves an effective balance between the prediction accuracy and computational simplicitywhichmakesithighlysuitableforbothresidential and small scale commercial use. In addition to that, our systemnotonlyprovidesforecastsbutalsogivesinsightinto potentialcostsavingsandenvironmentalimpact(through CO2 emissions reductions) which makes it a practical applicationinthefieldofsmartenergymanagement.
As we previously discussed traditional solar energy forecastingmethods/techniquesstronglydependuponthe statistical models and weather based simulations, which were focusing upon historical datasets of temperature, sunlight hours and other related factors. While these methods provide a reasonable accuracy in stable weather conditionsbuttheyoftenfailtoadapttosuddenchangeslike temperaturesshiftsetc.Theselimitationscreateareduction intheireffectivenessinrealworldsituationswhereweather
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 04 | Apr 2025 www.irjet.net p-ISSN: 2395-0072
is constantly unpredictable. And also the earlier systems depended on the manual features and static formula and they struggled when applied to different geographical locationsresultingintheoutdatedpredictions.Toovercome thisourprojectusesarealtimeweatherdatafetchingusing the API that keeps our model updated with the latest environmentalfactors.
Solar energy forecasting systems are crucial for efficient planning and utilization of solar power across residential, commercialandindustrialenvironments.Therearedifferent existingsystemsthatpredictsolarenergyproductionusing differentmethodsandtechnologies.Here’saquickrecap:
Manual calculation methods: Traditionally, solar energy potentialiscalculatedmanuallyusingmathematicalmodels using the solar angles, historical weather data and geographicalparameters.Thismethodsaretime-consuming.
StaticPVsimulationtools:SoftwaretoolslikePVWattsmake useofhistoricalweatherdataandfixedassumptionstoget solarpoweroutput.Eventhoughthistoolsareusefulthey lackrealtimeadaptability.
Weather-basedforecastmodels:Thesesystemsdependon generalizedweatherforecastsfrommeteorologicalservices toestimatesolargeneration.
IOTBasedSolarMonitoringSystems:ThismakeuseofIOT sensorsplacedonsolarpanelsforcollectingrealtimedata aboutpanelperformanceand environmentalconditions.But theyaremorefocusedaboutprecisemonitoringratherthan precisefutureenergyforecasting.
Satellite-imagebasedmodels:Thisforecastingsystemuses satellite imagery to monitor cloud movements and solar irradiance. This system offers improved prediction capabilities.
AIandMachineLearningmodels: Nowemergingsystems areadoptingAIandMLtechniquestoimprovetheaccuracy of the prediction by learning patterns from historical and realtimedata.Howevermostofthesesystemarestillunder researchandmaynotbeaccessibletotheendusers.
Overall while there are many existing system for solar energyforecastingmanyeitherlackrealtimeadaptabilityor they might require complex infrastructure or may not provideuserfriendlyoutputsforeverydayconsumers.
The proposed system aims to a more advanced and an efficient solar energy forecasting solution by integrating artificialintelligenceandrealtimeenvironmentdatausing API-based collection. The system will automatically fetch
weather factors like temperature, cloud cover, solar irradiation and process this data using machine learning algorithmstogenerateaccuratesolarenergyforecasts.This forecastswillhelpuserscalculatethesolarenergypotential fortheirspecificlocation,takingintoaccountthedailyand seasonalvariations.Inadditiontothisthesystemwillalso beincludingasmartcalculationsectionthatwillallowthe enduserstoinputthedetailssuchasnumberofsolarpanels, panelarea,andefficiencyandelectricitycosts. Onthebasis ofthisinputs,thesystemwillcalculateexpectedelectrical output,costsavingsandcarbonemissionsavoided.Further the platform will feature an interactive user friendly web interface with real time graphical visualization of the forecasteddatathatwillhelpinenhancingtheusabilityfor the end users. Remote accessibility will enable users to monitor solar energy potential anytime thus helping in proper planning and decision making. The system is designed such that it will be scalable, adaptable and compliantwithmodernenergyefficiencystandards.Overall theproposedsystemaimstopromotethesustainableenergy usage by providing accurate real time solar forecasts and delivering insights regarding environmental benefits and energysavingstotheusers.Sincethelastdecade,thesolar energyforecastingtechniqueshavelargelyreliedonstatic modelsordifficultempiricalformulasthatdependheavily uponhistoricalaveragesandgeneralizedassumptionsthese conventional methods often fail to capture the dynamic nature of weather patterns and local environmental conditions, which might lead to inaccurate energy predictions and inefficient energy planning. Manual data collectionandlackofrealtimeadaptabilityfurtherrestrict thepracticalapplications.
To overcome these limitations, we aimed our research on integratingmachinelearningmodelswithrealtimeweather data API’s thus enabling dynamic and location specific forecasting. By using advance regression techniques and continuously updated environmental updates, our system significantly improves the accuracy of solar energy predictions.Thisapproachempowersenduserstomakethe data driven decisions, optimizing solar panel usage and maximizing the energy while maintaining a user friendly webinterfaceforeasyaccessibility.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 04 | Apr 2025 www.irjet.net p-ISSN: 2395-0072
Since Linear Regression is a supervised machine learning algorithm that basically maps the linear relationships betweenindependentanddependentvariables.Itpredicts the value of the dependent variable by getting the best fit straightlinethroughthedatapoints,whichisgivenbythe equation : Y=mx+c This approach has been used for forecastinglikesalesforecasting (bybusinesses), weather prediction(by meteorology departments), stock market analysis(byfinancialanalysts)etc.Thegoalofthisapproach istoreducethepredictionerrorsbyadjustingthecoefficient (m)andintercept(c)duringtraining.
The Linear Regression approach goes with four steps as follows:
1)DataCollection:Collecttheinputdataandtheoutput.
2) Training: This phase helps identify the relationship betweenthevariables.
3)Prediction:Usingderivedequation,itpredictsoutputsfor newinputs.
4)Accuracy:Theaccuracyistestedusingevaluationmetrics likeMSE(MeanSquaredError)andR2score.
WeselectedLinearRegressionasthecorealgorithmofour projectduetoitssimplicity,efficiencyandstrongabilityto model the relationship that present between the weather factors and solar energy output. Since the solar energy generation is directly affected by the various continuous numericalfactorslikesunlighthours,cloudcover,humidity, solarirradiationetcsoLinearRegressionsuitsthisproject idea.
Itallowsustounderstandandquantifyhoweveryweather factorimpactthesolarenergyproduction.MoreoverLinear Regressionmodelsarecomputationallylightweight,enabling fastrealtimewhichisrequiredforprovidingquickfeedback tousers.Asabaselinealgorithmitgivesusareliablestarting pointforforecasting,anditsresultscanbeeasilyinterpreted whichmakesituserfriendlyforbothtechnicalandthenontechnical audiences. Also it allows for the system to be accessible, scalable and easy to maintain that can be later improvedbyintegratingmorecomplexmodels.
The system fetches real time and historical weather data using an API. The parameters include temperature, cloud cover,humidity,windspeed,solarirradiationetc.Thenthe LinearRegressionmodelistrainedusinghistoricalweather data using historical weather data combined with actual solar energy output. The model learns the relationship between the input features(weather factors) and output solar energy generation in kWh. Whenever a user enters theirlocation(takeacitynameexample:Surat)oursystem automaticallyfetchestheupdatedweatherconditionsusing API.Thenthetrainedmodel(LinearRegression)usesthis inputs to predict expected solar energy output for the location. The predicted solar output feeds into our calculation module. Based on the user inputs (number of panels, panel area, efficiency, electricity cost) the system further calculates a) an estimate of electrical energy consumption b) the potential cost savings c) the carbon emissions avoided. The final output is visualized using interactivechartsandtablesonourwebapplication.Users canseedailypredictions,helpingthemtakebetterenergy planningdecisions.
As the system collects more data over time, the Linear Regressionmodelcanberetrainedperiodicallyovertimeto improveaccuracy.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 04 | Apr 2025 www.irjet.net p-ISSN: 2395-0072
Thefollowingstepsdescribethemethodologythatwasused forthemodeldevelopmentandevaluation.
a) Data Collection and Pre-Processing: First we obtained historical weather data containing features such as solar radiation,UVindex,temperature,windspeedandmore.Data cleaningwasdonetoselecttargetvaluesandthenfeatures andtargetvariableswerecarefullyselectedthatfocusedon strongcorrelationtosolarenergyoutput.
b) Correlation Analysis: To understand the influence of differentfactorsonsolarenergygeneration,weconducteda correlation analysis. The results returned that solar radiation and uv index had highest correlation with solar energy.
c) Model Selection And Training: We experimented with three algorithms (Linear Regression, Random Forest, GradientBoosting). Wesplit thedataset into80:20 with a random state of 42. We trained and evaluated the performance of these models using metrics like MAE, R2scoreandRMSE.
RMSE:0.105
R2score:0.999
Given strong linear correlation among features and target variable,LinearRegressionprovidedthemostefficientand interpretablesolution.
We built an interactive web application using Flask, fully integrated with the trained model. The web application allowsusersto:
Enterlocation(cityname)forforecasting.
Optionallyprovidepanel-specificdetails(numberof panels,area,efficiency,andcost).
View detailed outputs including solar energy forecast, expected electrical output, cost savings, andcarbonemissionreduction.
Fig 7.1: UserInterfaceI
Fig 7.2: UserInterfaceII
Theusercanentertheinputstoreceivepersonalizedsolar energyrecommendations.
d)ModelSelection
Afterproperanalysis,LinearRegressionturnedouttobethe bestperformingmodelwith:
MAE:0.085
Fig 7.3: InputSectionI
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 04 | Apr 2025 www.irjet.net p-ISSN: 2395-0072
7.4:
8. Conclusion
TheAIBasedSolarEnergyForecastingeffectivelyshowsthe integration of machine learning with user-friendly web applicationtopredict/forecastsolarenergygenerationwith highaccuracy.Afterexploringandtestingmultiplealgorithm
LinearRegressionwasfoundtobemostappropriate.
The project focuses on technical performance but also keepingusabilityinmind.Usingthewebapp,usercanenter inputsandgetclearandproperinsightsaboutsolarenergy
generation, cost savings and carbon emission reductions. This makes it easy for households and small energy to considersolarenergyadoptions.Alsothemodulardesignof this system ensures scalability and future enhancements, making it a solid foundation for a real world deployment. Overall, this project successfully aligns with academic objectives,showingacademicobjectives,relevancetosocial cause,practicalimplementation.
a) Geo-Location Auto Detection: Implement the automatic locationfetchingtoimprovetheuserexperienceandreduce manualinputerrors.
b) Push Notifications and Alerts: Allows the users to subscribe for regular updates on solar energy potential throughemailorSMS.
c) MobileApp:Buildaplatformindependentmobileappto increaseaccessandmakingitmoreconvenienttouse.
d) Energy Storage Recommendations: Provide battery storageonbasisofextraenergy.
10. References
[1]Kumari, Pooja And Anoop Kumar, “ Solar Power ForecastingusingARIMAmodel” ,InternationalJournalof RenenewableEnergyResearch(IJRER),2018.
[2]Sharma, Prabhakar, et al., “Enhancing and optimizing Solar power Forecasting in Dhar district of India using machine learning “, Smart Grids and Sustainable Energy, 2024
[3]Wang,Feietal.,“Areviewofdeeplearningforrenewable energyforecasting”,EnergyConversionandManagement.
[4]Yadav,AmitKumaretal.,“IntelligentDataAnalyticsfor SolarEnergyforSolarEnergyPredictionandForecasting”, Elsevier,2021.
[5]Antonazas, Javier,et al.,”Review Of Photovoltaic Power Forecasting”,SolarEnergy,2016.