Full text
International Journal For Technological Research in Engineering Volume 13 Issue 3 November-2025 ISSN (online) 2347-4718 www.ijtre.com Page 1 A RESEARCH ARTICLE ON SMART EV CHARGING SCHEDULER WITH DYNAMIC PRICE PREDICTION USING MACHINE LEARNING 1Asst. Prof. Bishnu Prasad Panda, 2Asst Prof. Amaresh Choudhury, 3Sr. Lect. Pinaki Bisoyi, 4Sr. Lect .Rupa Barik 1,2,3,4Dept. of Electrical Engineering Gandhi School of Engineering, Berhampur ABSTRACT With the rapid adoption of Electric Vehicles (EVs), efficient and cost-effective charging strategies are becoming essential for both consumers and power systems. This project presents a smart EV charging scheduler that leverages machine learning to predict dynamic electricity prices and optimize charging times accordingly. The system is designed to minimize the total charging cost while ensuring that the required energy is delivered within a given time frame. Historical electricity pricing data is used to train a Linear Regression model, which forecasts hourly electricity prices for the next 24-hour period. Based on these predictions, the system intelligently selects the cheapest hours to schedule EV charging, considering a fixed charging rate and energy requirement. The project demonstrates the integration of basic machine learning techniques with real-world EV charging applications, offering a scalable and flexible solution to time-of-use pricing challenges. The model achieves reasonable prediction accuracy, and the scheduling logic successfully identifies cost-optimal time slots, reducing electricity bills for EV users. A graphical interface visualizes the predicted prices and charging schedule, enhancing the system's usability and interpretability. This approach lays the groundwork for future enhancements involving more complex models, real-time pricing data, and integration with renewable energy sources or smart grid infrastructure. I. INTRODUCTION The global shift toward sustainable transportation has led to the rapid growth of Electric Vehicles (EVs), which offer a cleaner and more efficient alternative to conventional fossil fuel-based vehicles. As EV adoption increases, the demand for intelligent and cost-effective charging strategies becomes critical—not only to reduce energy costs for consumers but also to reduce stress on the electrical grid. One of the major challenges faced by EV users is the fluctuating cost of electricity throughout the day due to dynamic or time-of-use (TOU) pricing models adopted by utility providers. Electricity prices typically vary by hour, depending on factors such as demand, generation cost, and grid load. Charging an EV during peak hours can result in significantly higher costs compared to off-peak periods. Therefore, smart charging strategies that schedule charging during cheaper hours can provide considerable financial savings while supporting grid efficiency. In this project, we propose a Smart EV Charging Scheduler that uses machine learning (ML) to predict electricity prices and determine the most economical hours to charge an electric vehicle. We simulate a historical dataset of hourly electricity prices and train a Linear Regression model to forecast prices for the next 24 hours. Based on these predictions, the system selects the optimal charging hours that fulfil the energy requirement at the lowest possible cost. The proposed scheduler: Considers the required energy (kWh), Considers a fixed charging rate (kW), and selects the cheapest hours within the forecast period for charging. By integrating machine learning with energy management, this solution provides a practical approach to real-time decision-making in EV charging. It is lightweight, easy to implement, and forms the foundation for future enhancements involving
International Journal For Technological Research in Engineering Volume 13 Issue 3 November-2025 ISSN (online) 2347-4718 www.ijtre.com Page 2 real-time data feeds, more advanced ML models, and smart grid integration. This project not only highlights the importance of intelligent energy scheduling in EV systems but also demonstrates how data-driven methods can be employed to solve practical energy management challenges in modern electric mobility ecosystems. Figure 1:IMAGE SHOWING CHARGING AN EV AT A CHARGING STATION II. LITERATURE REVIEW The Smart EV Charging Scheduler project integrates concepts from Electric Vehicle (EV) energy systems, time-of-use electricity pricing, and machine learning-based price forecasting. The system is designed to simulate real-world scenarios where electricity prices fluctuate hourly and EV users seek to minimize charging costs without compromising energy needs. EVs are powered by rechargeable battery packs that require periodic charging from the power grid. The amount of energy needed for a full charge depends on the battery capacity and the existing state of charge (SoC). The charging power is generally defined in kilowatts (kW), while energy consumption is measured in kilowatt-hours (kWh). The time required to charge is determined by: In this project, the EV is assumed to charge at a constant rate, and the goal is to complete the required charging (e.g., 20 kWh) in the cheapest hours of the day. Electricity rates are not constant throughout the day. Utility companies use dynamic pricing models to balance demand and supply: Peak hours (morning/evening): Higher prices, Off-peak hours (late night/early morning): Lower prices. This project simulates dynamic pricing using sinusoidal patterns with added noise to mimic real-world fluctuations and uses these prices for scheduling decisions. The project uses a Linear Regression model—a simple supervised learning algorithm—to predict electricity prices based on the hour of the day. The model assumes a relationship between time and price, fitting a line that minimizes prediction errors. Linear Regression Formula: The model is trained using historical pricing data (simulated), and then used to predict prices for the upcoming 24 hours. Once the price prediction for 24 hours is available, the system: Sorts the predicted prices in ascending order. Selects the cheapest n hours required to charge the EV based on the energy demand and charging rate.
International Journal For Technological Research in Engineering Volume 13 Issue 3 November-2025 ISSN (online) 2347-4718 www.ijtre.com Page 3 Calculates the total expected cost of charging during those hours. This decision-making strategy ensures that the EV is charged at minimum cost, making use of data-driven insights. The accuracy of the price prediction model is measured using Root Mean Squared Error (RMSE), which indicates the average deviation between predicted and actual values. A lower RMSE implies better prediction performance. In this project, the RMSE remains within acceptable bounds, demonstrating the effectiveness of even a simple linear model for this use case. This theoretical framework supports the practical implementation of the smart EV scheduler and provides a foundation for expanding the system with more advanced algorithms, real-time pricing APIs, and renewable energy integration in future iterations. III. SIGNIFICANCE OF THE WORK The growing popularity of Electric Vehicles (EVs) is transforming the global transportation and energy sectors. However, this transition brings with it new challenges, particularly in the efficient management of energy consumption and cost. The significance of this project lies in its ability to address these challenges by combining data-driven decision-making with smart energy scheduling to improve both cost-efficiency and grid sustainability. 1. Promotes Cost-Effective Charging for EV Users: Electricity tariffs can vary significantly throughout the day due to time-of-use pricing models. Unaware consumers may end up charging during expensive peak hours. This project provides a solution that automatically identifies the most economical hours for charging, allowing users to minimize their electricity bills without manual effort. 2. Encourages Smart Energy Usage: By shifting EV charging to off-peak hours, this system reduces the burden on the electrical grid during high-demand periods. Such smart scheduling helps balance demand and supply, contributing to better grid stability, especially in urban areas with high EV penetration. 3. Demonstrates the Power of Machine Learning in Energy Applications: This project highlights the practical application of machine learning in energy systems. Even a basic model like Linear Regression can be used to make informed decisions based on patterns in historical data. This demonstrates how data science and energy engineering can work together to solve real-world problems. 4. Scalable for Real-Time and Future Smart Grid Integration: Although this project uses simulated data, the approach is fully scalable. It can be enhanced to use real-time price feeds, integrate renewable energy sources, and connect with IoT-enabled smart chargers, making it ideal for future smart city infrastructures. 5. Educational and Research Relevance: This project serves as an excellent educational tool for students learning about Energy management in EVs, Dynamic pricing and Applied machine learning in engineering It also opens pathways for more advanced research in areas like demand response, V2G (Vehicle-to-Grid), and hybrid optimization techniques.
International Journal For Technological Research in Engineering Volume 13 Issue 3 November-2025 ISSN (online) 2347-4718 www.ijtre.com Page 4 IV. METHODOLOGY ADAPTED The methodology of this project is structured into a sequence of logical steps that integrate machine learning-based electricity price prediction with smart charging decision-making. The objective is to ensure that an Electric Vehicle (EV) receives the required amount of energy at the lowest possible cost, using forecasted electricity prices for the upcoming 24-hour period. Step 1: Data Preparation (Simulated Historical Pricing Data) ➢ Since real-world electricity pricing data was not used, a simulated dataset was generated to represent hourly price fluctuations over a 30-day period: • Input variables: Hour of the day (0 to 23) • Output variable: Electricity price (₹/kWh) ➢ The price pattern was created using a sinusoidal function (to mimic daily peaks and troughs) and random noise to reflect natural market volatility. ➢ This dataset serves as the training data for the machine learning model. Step 2: Machine Learning Model – Linear Regression ➢ A Linear Regression model was implemented using the scikit-learn library. The model was trained to learn the relationship between the hour of the day and electricity prices. • Features (X): Hour of the day • Target (y): Electricity price (₹/kWh) • The model was trained on 80% of the simulated data, while 20% was used for testing. • Evaluation metric: Root Mean Squared Error (RMSE) to evaluate prediction accuracy. ➢ After training, the model was used to predict the prices for the next 24 hours. Step 3: Charging Parameters and Requirements ➢ Charging requirements were defined as: • Total energy needed: 20 kWh • Charging rate: 5 kW/hour • Therefore, the EV needs to be charged for 4 hours. ➢ These values are configurable based on different EV battery capacities or user preferences. Step 4: Smart Charging Scheduler Based on the predicted 24-hour electricity prices: ➢ The system sorted the hours by price (from lowest to highest). ➢ It then selected the 4 cheapest hours to fulfill the 20-kWh energy requirement. ➢ The total cost was calculated using: Step 5: Visualization and Output To enhance interpretability, the following outputs were generated: ➢ A table of predicted prices for each hour ➢ A list of selected charging hours ➢ The total estimated charging cost ➢ A plot showing: • Price trend across 24 hours • Highlighted points representing selected charging hours This helps visualize the cost-saving achieved by smart scheduling. This methodology forms a complete workflow, starting from data simulation and model training, all the way to intelligent scheduling and visualization. It effectively showcases how machine learning can be applied in real-time energy management systems for EVs.
International Journal For Technological Research in Engineering Volume 13 Issue 3 November-2025 ISSN (online) 2347-4718 www.ijtre.com Page 5 V. PYTHON CODE FOR SMART EV CHARGING SCHEDULER WITH DYNAMIC PRICE PREDICTION USING MACHINE LEARNING Project Concept: ➢ Use historical electricity pricing data (or simulate it) to train a machine learning model. ➢ Predict the next 24 hours of electricity prices. ➢ Schedule EV charging during the cheapest predicted hours. Tools Required: ➢ Python ➢ pandas, numpy, matplotlib ➢ scikit-learn (for ML model like Linear Regression) ➢ (Optional) joblib for saving the model ALGORITHM: • Initialize environment • Import required libraries (numpy, pandas, matplotlib, sklearn). • Generate simulated historical data • Set RNG seed for reproducibility (e.g., np.random.seed(0)). • Create arrays for hours (0–23 repeated for N days) and days (0..N-1 repeated per day). • Build a deterministic base price curve (e.g., sinusoidal daily pattern). • Add random noise to the base curve to simulate variability. • Combine into a DataFrame: columns day, hour, price. • Prepare features and labels • Choose features (at minimum hour). Optionally add day, lagged prices, weekend flag, holiday flag, temperature, etc. • Set X = df[['hour']] and y = df['price']. • Split dataset • Split into training and test sets (e.g., train_test_split with test_size=0.2, random_state). • Train model • Instantiate a regression model (Linear Regression in your example). • Fit model on training data. • Evaluate model • Predict on the test set. • Compute error metric(s) (e.g., RMSE). Print or log results.
International Journal For Technological Research in Engineering Volume 13 Issue 3 November-2025 ISSN (online) 2347-4718 www.ijtre.com Page 6 • Predict next 24 hours • Create a DataFrame for the next-day hours 0..23. • Use the trained model to predict predicted_price for each hour. • Decide charging requirements • Input or set charging_needed_kWh and charging_rate_kW. • Compute hours_needed = ceil(charging_needed_kWh / charging_rate_kW) (or int(...) if exact division is guaranteed). • Select cheapest hours • Sort predicted hours by predicted_price ascending. • Pick the lowest hours_needed hours. • Optionally, impose constraints (e.g., charging must be contiguous, cannot charge during a no-charge window, or prefer off-peak contiguous block). • Compute cost and schedule • For each selected hour, compute cost = predicted_price * charging_rate_kW. • Sum costs to get total estimated charging cost. • Prepare schedule output (list of selected hours and their prices). • Visualize (optional) • Plot predicted price curve over 24 hours. • Mark scheduled charging hours on the plot. • (Optional) Save / report • Save predictions and schedule to CSV, display in UI, or return from function. VI. RESULTS AND DISCUSSION Model Performance: RMSE (Root Mean Squared Error): 1.066. This indicates a decent accuracy for a simple Linear Regression model based on hour-of-day pricing patterns. Predicted Electricity Prices for Next 24 Hours Hour Predicted Price (₹/kWh) 0 6.78 1 6.62 2 6.46 3 6.30 4 6.15 5 5.99 6 5.83
International Journal For Technological Research in Engineering Volume 13 Issue 3 November-2025 ISSN (online) 2347-4718 www.ijtre.com Page 7 7 5.67 8 5.52 9 5.36 10 5.20 11 5.04 12 4.89 13 4.73 14 4.57 15 4.41 16 4.26 17 4.10 18 3.94 19 3.78 20 3.63 21 3.47 22 3.31 23 3.15 Scheduled Charging Hours (Cheapest 4 hours): Hour Predicted Price (₹/kWh) 20 ₹3.63 21 ₹3.47 22 ₹3.31 23 ₹3.15 Estimated Total Charging Cost: ₹67.79 (for 20 kWh at 5 kW/hour over 4 hours) Figure 2: VISUALISATION PLOT OF THE PYTHON CODE Here is the visualization showing: • The predicted electricity prices for each hour (0–23) • The selected charging hours (4 cheapest hours) marked in red This clearly demonstrates how the system schedules EV charging during the most cost-effective hours using machine learning-based predictions.
International Journal For Technological Research in Engineering Volume 13 Issue 3 November-2025 ISSN (online) 2347-4718 www.ijtre.com Page 8 VII. CONCLUSION This project successfully demonstrates a simple yet effective approach to smart EV charging by integrating machine learning-based electricity price prediction with intelligent scheduling logic. By forecasting the dynamic electricity prices for the upcoming 24 hours using a Linear Regression model, the system can identify the most cost-efficient hours to charge an electric vehicle, thereby minimizing energy costs for users. The results show that even a basic machine learning algorithm, when combined with a clear energy requirement and price-based decision strategy, can significantly enhance the economic and operational efficiency of EV charging. The methodology not only benefits EV users by reducing their electricity bills but also contributes to grid stability by promoting off-peak charging. This project establishes a foundational framework that can be scaled with more advanced forecasting models, real-time pricing APIs, renewable integration, and user interfaces. As EV adoption continues to rise, such intelligent charging solutions will become increasingly critical for both consumers and energy providers in a smart grid ecosystem. REFERENCES [1]. Gellings, C. W. (2009). The Smart Grid: Enabling Energy Efficiency and Demand Response. CRC Press. [2]. Singh, A. K., & Maheshwari, R. P. (2021). "Smart Charging of Electric Vehicles in Smart Grid: A Review," IEEE Access, 9, 134971–134989. [3]. James, G., Witten, D., Hastie, T., & Tibshirani, R. (2013). An Introduction to Statistical Learning. Springer. [4]. scikit-learn developers. (n.d.). scikit-learn: Machine Learning in Python. https://scikit-learn.org [5]. Python Software Foundation. (n.d.). Python Programming Language. https://www.python.org [6]. U.S. Department of Energy. (n.d.). Electric Vehicle Charging Basics. https://afdc.energy.gov/fuels/electricity_infrastructure.html