Development of a dynamic pricing algorithm for the application of electric car charging processes
Abstract
Departamento de Ingeniería de Sistemas y Automática
Full text
UNIVERSIDAD DE VALLADOLID ESCUELA DE INGENIERIAS INDUSTRIALES Grado en Ingeniería en Organización Industrial DEVELOPMENT OF A DYNAMIC PRICING ALGORITHM FOR THE APPLICATION OF ELECTRIC CAR CHARGING PROCESSES Autor: Lorenzo Calvo, Alicia D. Eusebio de la Fuente López Hochschule Magdeburg Stendal
Valladolid, agosto 2022. TFG REALIZADO EN PROGRAMA DE INTERCAMBIO TÍTULO: DEVELOPMENT OF A DYNAMIC PRICING ALGORITHM FOR THE APPLICATION OF ELECTRIC CAR CHARGING PROCESSES ALUMNO: Alicia Lorenzo Calvo FECHA: 04.08.2022 CENTRO: Fachbereich Ingenieurwissenschaften und Industriedesign UNIVERSIDAD: Hochschule Magdeburg-Stendal TUTOR: Dr.-Ing. Prof. WUST Przemyslaw Komarnicki y M.Sc. Marcel Hallmann
I Resumen Actualmente, el creciente uso del automóvil, junto con la preocupación por el medio ambiente fomenta la investigación en los vehículos eléctricos. Por ello, la industria del VE ha crecido enormemente durante los últimos años, planteando nuevos problemas a la sociedad. Este trabajo tiene como objetivo desarrollar un algoritmo basado en precios dinámicos para la carga de VE. Se trata de paliar la demanda en horas punta, beneficiando la economía del consumidor y de los operadores de recarga. Primeramente, se introduce la base técnica de este proyecto. Después, se define la metodología utilizada para el modelo algorítmico, señalando las entradas, la función objetivo y los posibles algoritmos vinculados a la inteligencia artificial que pueden dar solución. Finalmente, utilizando la herramienta MATLAB Simulink, se ha realizado una simulación implementando el algoritmo, analizando posteriormente su efectividad, llegando a determinadas conclusiones a partir de los resultados y proponiendo futuras líneas de trabajo relacionadas. Palabras clave: Vehículos eléctricos, precios dinámicos, aprendizaje automático, estado de la red, algoritmo
Fachbereich Ingenieurwissenschaften und Industriedesign Institut für Elektrotechnik Bachelorarbeit DEVELOPMENT OF A DYNAMIC PRICING ALGORITHM FOR THE APPLICATION OF ELECTRIC CAR CHARGING PROCESSES am 01.08.2022 vorgelegte Bachelorarbeit von Alicia Lorenzo Erstprüfer: Prof. Dr.-Ing. Prof. WUST Przemyslaw Komarnicki Betreuer: M.Sc. Marcel Hallmann
Declaration of Authorship I hereby declare that I have written this Bachelor's Thesis independently and only using the literature and aids indicated. The passages taken directly or indirectly from external sources are marked as such. The thesis has not been submitted to any other examination authority in the same or a similar form and has not been published. Magdeburg, 01.08.2022 …………………………………………………….. Place, Date Signature
VI II Abstract Nowadays, the increasing use of automobiles, together with environmental concerns and the development of intelligent systems, encourages the research in the field of electric vehicles. Therefore, the electric vehicle industry has grown enormously during the last recent years, posing new problems to society. This work aims to develop an algorithm based on dynamic pricing for charging electric vehicles at public charging stations. It attempts to alleviate the high demand at peak hours, benefiting both the consumer's economy as well as the charging operators' profit. The structure of this project is divided into several sections. Firstly, an introduction of the technical basis for this project is given. Secondly, the methodology carried out for the algorithm model is defined, pointing out the inputs, the objective function and the possible algorithms linked to artificial intelligence that can help to solve it. Finally, using a block diagram model with the MATLAB Simulink tool, a simulation has been carried out implementing the algorithm, through which its effectiveness has been analyzed, reaching certain conclusions from the results obtained and future lines of work related to this field have been proposed. Key words: Electric vehicles, dynamic pricing, machine learning, state of the grid
VII III Table of Contents I Abstract ........................................................................................................... VI II Table of Contents.......................................................................................... VII III List of figures ............................................................................................... VIII IV List of tables .................................................................................................... IX V List of acronyms ............................................................................................... X 1 Introduction ...................................................................................................... 1 1.1 Problem .............................................................................................................. 2 1.2 Objective ............................................................................................................ 3 1.3 Approach ............................................................................................................ 4 2 Basis ................................................................................................................... 5 2.1 Technical basics standards ................................................................................. 5 2.2 Software and standards ....................................................................................... 8 2.3 Payment concepts ............................................................................................... 9 2.4 Grid parameters ................................................................................................ 10 3 Methodology.................................................................................................... 12 3.1 Inputs ................................................................................................................ 13 3.2 Aim ................................................................................................................... 17 3.3 Search Algorithm ............................................................................................. 22 4 Results.............................................................................................................. 26 5 Discussion ........................................................................................................ 33 6 Summary and outlook .................................................................................... 34 7 Bibliography.................................................................................................... 35 A Annex Function Code ..................................................................................... 37
VIII IV List of figures Figure 1 Energy structure of an EV charging system (Benysek, 2012). 6 Figure 2 Electric vehicle components (Cavagnis, 2021) 8 Figure 3 Connection via ISO 15118 and OCPP 2.0 (Ampcontrol, 2021) 9 Figure 4 Algorithm inputs 13 Figure 5 Necessary parameters for irradiation curve 14 Figure 6 Chart of solar energy by month 15 Figure 7 Necessary parameters for wind curve 15 Figure 8 Necessary parameters for biomass power curve 16 Figure 9 Flow chart to obtain the loading time 17 Figure 10 Daily price of the EPEX SPOT market in Germany (AleaSoft, 2021) 26 Figure 11 Graph of the weighted price from the state of the grid 27 Figure 12 Graph comparing the market (yellow) and availability (blue) price. 27 Figure 13 Graph comparing the availability (blue) and final dynamic prices (purple). 28 Figure 14 Overall comparison of the prices obtained in this work 29 Figure 15 Graph comparing demand with static and dynamic prices 29 Figure 16 Graph comparing market and dynamic price according to the load 30 Figure 17 Price increase example 31 Figure 18 Price decrease example 31 Figure 19 Market price values 32 Figure 20 Final price values 32
IX V List of tables Table 1 Distint charging modes and their characteristics (Adil Amin, 2020) .................. 7 Table 2 Examples of lineal models of supervised algorithms ........................................ 23 Table 3 Examples of decision tree models of supervised algorithms............................. 24 Table 4 Different results while implementing the dynamic pricing algorithm .............. 30
6 EVs in the most efficient way. In the following, the mentioned parts will be described one by one. Figure 1 Energy structure of an EV charging system (Benysek, 2012). • Electrical grid The city's electricity grid, which provides power for EV batteries, gets its energy in different ways. According to a 2020 study in Europe, it is estimated that 38% of the electricity comes from renewable energies, followed by fossil energies with 37% and finally nuclear with 25% (Pita, 2021). • Charging infraestructure This electric transport system, like any other transport system, requires an infrastructure that allows access to the recharging service or access to a source that powers its engine. In this case it is electricity, this is a challenge for the insertion of electric vehicles due to the need to have a reliable, accessible and convenient service for the end user (Ministry of Industry & IDAE, 2012). Currently there are three different types of charging, slow, semi-fast and fast, the first one being mostly located in homes and the second two for public charging. This parameter will be of important relevance when setting prices (Armijos, 2021).
7 Table 1 Distint charging modes and their characteristics (Adil Amin, 2020) • Artificial intelligence Artificial intelligence is used to optimize resources and make the most of renewable energies. In this way, electricity can be distributed efficiently through the available infrastructures. The design of vehicles also requires greater driving autonomy, faster recharging, and durability, and this is where artificial intelligence comes in, allowing drastic reductions in development and research times. • Electric Vehicle The EV is the main component of the chain, as it is the consumer of the energy coming from the grid. The following is a brief definition of the three main components of an electric vehicle as shown in Figure 2. They will be the electric motor, responsible for converting the electrical energy into mechanical energy which will be transferred to the vehicle's transmission and will turn the wheels. Another element to consider is the vehicle control unit or controller, which is responsible for controlling the starting, running, forward and reverse rotation, speed and stopping of the vehicle components. Finally, the main component of an electric car is its battery, which receives and stores energy from the charger. It is currently a decisive element in the decision to choose an electric vehicle.
8 Figure 2 Electric vehicle components (Cavagnis, 2021) 2.2 Software and standards Once the necessary elements for charging an electric car have been analyzed, the connections between all of them will be specified. ISO 15118 Road vehicles -Vehicle to grid communication interface is an international standard that specifies the communication between an electric car and its charging point. The standard defines aspects that influence the identification, association, control, and optimization of charging or discharging, payment, load levelling, cybersecurity and privacy for high-level communication (HLC) conductive and wireless communication between the electric vehicle communication controller (EVCC) and the supply equipment communication controller (SECC).This is not only limited to message encryption and user authentication, but also allows energy data to be transferred between EVs and the charging station. In this way, better charging management decisions can be made (Ampcontrol, 2021). In this case, the car would send the battery state of charge to the charging station, transmitting the actual amount of energy requested and specifying the intelligent charging output. With this improvement, we avoid problems such as charging the EV with an insufficient amount of energy, inefficient optimization of inter-vehicle charging or complicated solutions requiring too many time resources to do so. Once the vehicle energy data has been sent to the charging station, this data must be transmitted by the CPO to the central charging management system (CMS) via the Open Charging Point Protocol (OCPP). The protocol is responsible for communicating the EV
9 charging station and a central management system, it describes the messages that the charging stations and the IT backend send to each other to authenticate new EV users, track energy meter values or give charging orders. With ISO 15118 and OCPP 2.0, the vehicle sends the requested amount of energy to the charging point, and the charging point forwards this information to the backend system, so that vehicle charging can be planned as optimally as possible. Figure 3 Connection via ISO 15118 and OCPP 2.0 (Ampcontrol, 2021) 2.3 Payment concepts Nowadays the payment method has evolved drastically, being able to pay with our phone or even with a watch. The billing model for charging an electric vehicle can follow several different formats. There are some charging stations that can be used free of charge, but this is less occasional. In general, a small initial connection fee is usually charged to initiate charging of the electric car. Subsequently, it can be billed either by time in minutes or by consumption in kWh. The payment model may vary depending on the supplier and can be made with a credit card or on the basis of a subscription model in which the account is billed. Regardless of the billing method used, payments are usually processed in a similar way using a physical credit or debit card terminal. It is necessary to take into account the qualities that it must have, since the environments in which they will be available are usually outdoors and the customer will want to make the transaction as quickly as possible. In order to go deeper into the subject, different concepts related to the payment method will be defined below: • Payment gateway: Allows acceptance of credit cards and other alternative payment methods. This authorizes the transfer of funds between the customer and the
10 electrical load provider. This gateway can be created through a web portal, mobile application, or contactless point-of-sale devices. • Card payment: Carrying cash is becoming less and less popular, so PIN terminals or contactless technology is being implemented to make it quicker and easier for drivers to refuel. • E-Commerce: In this case drivers can go to their brand's website or app and pay for a charge when needed, so secure online transfers can be made with the credit card. 2.4 Grid parameters Power distribution networks are made up of three main components, the generating plants that produce electricity from fossil or renewable fuels, the transmission lines that carry the electricity from the generating plants to the demand centres, and the transformers that reduce the voltage so that the distribution lines can deliver power to the end consumer. Generally, power distribution networks employ electrical circuits that operate with AC alternating current, which means that both the voltage and the current of the circuit vary sinusoidally in time, with a given angular frequency. The nominal frequency in Germany of the distribution system is set at 50Hz. This level should be kept as constant as possible, allowing a tolerance of 0.050 Hertz. When there is a potential difference between two points across a conductor, a flow of electrons occurs. The charge from the point with the higher potential is transferred to the lower one until its electric potential is equalized, thus creating an electric current. This parameter gives us the information in which direction the electricity flows. In this way we can know if the energy is being required by the network or on the contrary demanded by the consumer. This can be high voltage, medium voltage or low voltage. First of all, high voltage installations are used to transport energy over long distances. For this purpose, it is necessary to raise the voltage in order to reduce the current flowing through the line and thus avoid energy losses due to heating of the conductor cables and electromagnetic phenomena. This group includes installations that exceed a voltage of 36Kv. Next, once the energy is at its destination, it passes through an electrical substation to be transformed into medium voltage energy, with voltages between 1 and 36kW. And finally there is the low voltage when the electricity finally reaches the consumer being the least dangerous, below 1 kW. If a lot of electricity feeds the grid in relation to the amount consumed, the electrical frequency increases, exceeding 50Hz. Since power plants are designed to operate with a
11 certain frequency range, there is a risk that they will disconnect from the grid after a period. On the other hand, if we supply too little power to cope with the demand, the frequency drops. From 49 Hz, automatic load shedding plan is activated to avoid power outages. This is because, if the frequency drops too much, the voltage plants are shut down one after the other, until there is a complete collapse of the grid, which is known as power blackout. In the case of Germany, 45% of grid energy consumption was obtained through renewable sources, mainly from biomass plants and volatile sources such as wind and solar PV during the 2020 period. As a result, it is undergoing a major transformation, causing a disruption in the traditional electricity supply chain. Currently, Germany has a total transmission grid length of about 35,000 kilometers, transmitting power with maximum voltages between 220 and 380kV, usually through alternating current. Although it is true that the new lines between northern and southern Germany, which are expected to be completed in 2025, will be more efficient using high voltage direct current (HVDC) technology. (Russell, 2021).
12 3 Methodology An algorithm is a set of instructions that specify the sequence of operations to be followed to solve a problem. It is independent of both the programming language in which it is expressed and the computer on which it is executed. (Rodriguez, 2002). As a condition, an algorithm must be generally precise and easy to understand when indicating the steps to be performed. In addition, it must be predictable when starting from the same initial conditions since the same results must be obtained. The algorithm must be finite it must end up in a fine without ending in a loop (Nuñez Camacho, 2017). In this paper, a rule-based algorithm for EV charging price estimation is developed for simulations in MATLAB. The algorithm uses input parameters such as wind, solar and biomass energy production, charger occupancy, energy consumption and grid status. With this information the model calculates and assigns a certain price per kWh.It has been decided to use MATLAB mathematical software because of its simple and easy to use environment. The software has its own programming language, M-Code, which allows working with matrices, functions, algorithm development or even communicating with other programming languages such as Java or C++. The main program also has many extensions with a wide variety of ToolBoxes, such as Modbus Explorer, PID Tuner or Simulink, which is the extension used for the simulation of our model. Simulink is a graphical programming environment mostly used for modeling, simulation, and analysis of dynamic systems. The platform allows us to implement many different blocks within its library. In it we can simulate both continuous and discrete systems, being able to have a large number of applications, especially in the fields of automatic control and signal processing. In addition, like MATLAB, BlockSets can be added, which are different extensions to larger ones. In this section the steps followed for the design of the model will be developed. First, the inputs of our model (3.1) are explained, followed by the constant parameters necessary for its development. Next, the objective function (3.2), in which our algorithm is promoted with its relevant constraints, is presented. Finally, different machine learning related algorithms are proposed (3.3).
13 3.1 Inputs All algorithms are composed of three main sections: the inputs, where the data are entered, the process, which is the set of operations to be performed to provide a solution to the problem, and the output, where we obtain the final result after the process. Below is a summary of the inputs and outputs of the algorithm. In this case the inputs are given as xls files created in Excel. We will now analyze the different fields to be studied according to the variables. Figure 4 Algorithm inputs
14 • Radiation The energy supply comes from different sources. Among them we find solar energy. Photovoltaic systems generate energy that converts light into electricity using semiconductor materials. The photons contained in the sun's rays strike the photovoltaic cell, exciting the electrons in the cell due to charge separation in the absorber material. The movement of the electrons creates a small voltage producing direct current, which is stored in batteries and through a voltage inverter can be converted into alternating current. To analyze it, we must study the amount of solar irradiation and according to this the energy obtained depending on the location and the period of the year at that time. The user must choose the latitude and longitude of the location to perform the study, to obtain the location and be able to download the irradiance data in that area (Trujillo, 2015). Subsequently, the user must choose the day and month to continue with the study. With the data, a date is obtained, from which an average is made of the same date in previous years for which there is a record. In this way we manage to homogenize the data. The result of this block is an irradiance curve (W/m2) throughout the day. A bell shape is observed due to the hours of daylight presence during the day. For its analysis we will start from the data collected in 2009, measured in W/m2, with a total of more than 35,000 data in total, with a difference of 15 minutes between each measurement. The solar irradiance for each month during 2009 is illustrated above. Figure 5 Necessary parameters for irradiation curve
15 Figure 6 Chart of solar energy by month • Wind In case of wind energy, the analysis will be similar to the solar irradiation one, since being the kinetic energy of the wind, the data will depend both on the location and the period of the year in which the study is to be carried out. In this way we can obtain the average wind speed according to these parameters (Faiella & Gesino, 2002). 𝑃𝑤𝑖𝑛𝑑= 1 2∗𝑝∗𝑣3∗𝜋∗𝑟2 This expression indicates that the maximum wind power available from the wind is proportional to the density of the air, the area exposed perpendicularly to the wind flow and the cube of the wind speed (Francisco Eraso-Checa, 2018). In reality, not all kinetic energy can be converted into useful energy. The Betz limit, aerodynamic and mechanical frictions, electric generator efficiency, etc. will only allow us in practice, in the best case, to obtain 40% of the available wind power. 0 100000 200000 300000 400000 500000 600000 700000 800000 ene feb mar abr may jun jul ago sep oct nov dic W/m^2 Figure 7 Necessary parameters for wind curve
22 o How energy is stored in the battery ( 3ª) 𝑆𝑂𝐶𝑛(𝑖+1)= 𝑆𝑂𝐶𝑛(𝑖)+𝑒𝑛 +(𝑖)∗𝜇+ ∀ i ∈ D; n ∈ N o Battery charge limits (max, min) 𝑆𝑂𝐶𝑜𝑖 =𝑆𝑂𝐶𝑖(𝑡0) ∀ i ∈ I 𝑆𝑂𝐶𝑓𝑖 ≤𝑆𝑂𝐶𝑖(𝑡𝑓) ∀ i ∈ I 3.3 Search Algorithm The complex task of determining the right prices requires that a company know not only its own operating costs and availability of supply but also how much the customer values the product, what the future demand would be, where the energy comes from and several other variables. It is needed a wealth of information of its customers, of demand and supply, as well as of the weather for adjusting the prices at minimal cost. This has led to increased adoption of dynamic pricing and to increased interest in dynamic pricing research (Jaehyun Lee, 2020). Different AI-based models have been proposed for the algorithm developed in this work in order to obtain the optimal price and cost of electric car charging. In our case, it is necessary to quickly process large amounts of data using algorithms that change over time and improve in what they are intended to do, which is why we will now analyze different algorithms that would allow us to solve our model based on machine learning. Machine learning is an application of AI that allows systems to learn and improve automatically from experience without be expressly programmed to do so. This is a very important ability to make predictions, through the identification of patterns in a series of data. Machine learning models can be classified according to the way they establish patterns and rules, i.e., according to their learning process. We divide them into unsupervised supervised and hybrid models. (Hush & Horne, 1993). • Supervised: This type of algorithm uses already classified training samples. In this way, rules and patterns will be established based on the distribution of features to categorize the observation. This block includes SVM algorithms, MLP and Näive Bayes neural networks (Antón, 2014).
23 Within this group we can make a further subclassification. On the one hand linear models, where a line of best fit is created to predict the data, giving as a solution a linear combination of features. Table 2 shows the most common algorithms of this group, with their different applications, advantages and disadvantages. Table 2 Examples of lineal models of supervised algorithms ALGORITHM DESCRIPTION APPLICATION ADVANTAGES DISADVANTAGES Linear Regression Simple algorithm modeling linear relationship between inputs and a continuous numerical output variable -Prediction of stock or housing prices. -Easy to understand -Interpretable results by output coefficient -Assumes linearity between inputs and outputs. -Sensitive to outliers. Logistic Regression Similar to the previous one but a categorical output is obtained. -Customer churn prediction. -Easy to understand - Useful for multi-class predictions -Assumes linearity between inputs and outputs -Can be over-fit with small or large data Ridge Regression Penalizes features with low predictive scores -For classification or regression. -Predictive maintenance of vehicles. -Less prone to overfitting -Good fit to data with multicollinearity - Predictors are retained in the final model. - Does not perform feature selection Lasso Regression Same performance as ridge regression -Predicting housing prices. -Prediction of clinical data. -Less prone to overfitting -Can handle high dimensional data -It can maintain highly correlated variables. On the other hand, there are models based on decision trees, where "if-then" rules are used. Table 3 Examples of decision tree models of supervised algorithms Table 3 shows the most common algorithms of this group, with their different applications, advantages, and disadvantages.
24 Table 3 Examples of decision tree models of supervised algorithms ALGORITHM DESCRIPTION APPLICATION ADVANTAGES DISADVANTAGES DECISION TREE They produce preconditions through decision rules on features. -For classification or regression. - Credit score modeling - Understandable -Can handle missing values -Prone to overadjustment -Sensitive to outliers RANDOM FORESTS Combines the output of different decision trees -Predicting housing prices -Reduced overadjustment -Higher accuracy than other models -High complexity of training -Not very interpretable XGBoost Efficient and flexible gradient boosting algorithm. -For classification or regression -Insurance claims processing -Accurate results -Capture nonlinear relationships -Adjustment of complex hyperparameters -Does not work well on sparse parameter set Regresor LightGBM Gradient bracing frame designed to optimize efficiency -Airline flight time prediction -Cholesterol levels prediction -Can handle large amounts of data -High computational training speed -Can be overadjusted -Hyperparameter adjustment can be complex • Unsupervised: A priori in these models it is not known what the set of features represents. The purpose of this algorithm is to find similarities between the data that allow them to be grouped according to their similarity. This block includes clustering algorithms such as k-means. Two subgroups can also be distinguished here. On the one hand clustering models that allow you to categorize records into a certain number of clusters and in this way be able to indentify natural groups in the data. In this group we find algorithms such as K-means, hierarchical clustering or Gaussian mixture models. On the other hand, we find the a priori association algorithms, based on rules that identify the most frequent set of elements in a data set. • Hybrids: The benefits of both supervised and unsupervised algorithms are combined. This is the case of radial basis function (RBF) neural networks.
25 After the analysis of all the different algorithms included in the machine learning discipline, it has been concluded that to solve the algorithm of this work the most recommendable are the Linear Regression or Lasse Regression, since both offer us predictions on the numerical variable that is the price in a fast way and with great volume of data.
26 4 Results Although our model has both time and cost as outputs, in the practical part of this work we have only worked with cost for the simulation. In order to perform the algorithm, the market price of energy has been obtained first. For this purpose, a minimum and maximum price has been established according to the maximum power points found in the network. Then, the rest of the energy values have been interpolated to give an estimation of the market price. To obtain the values of the minimum and maximum kWh price when charging the car, the average price per kWh in Germany in December 2021 has been taken as a reference which is 0.3234 €/kWh. Figure 10 Daily price of the EPEX SPOT market in Germany (AleaSoft, 2021) In Figure 10 we can observe the variation of prices throughout the first half of the year 2021. We have taken this period as they are recent data in time and similar to the current ones, but without being affected by the war crisis. After analyzing the data, it has been concluded that the price should have a tolerance of 30% from the average price. In this way, the most significant data will remain relevant, but we will limit the outlier prices that are not beneficial to the study. The price limits have been calculated multiplying 0.3234 €/kWh by 1.3 resulting in 0.4204 €/kWh for the maximum price and multiplying 0.3234 €/kWh by 0.7 resulting in 0.2264 €/kWh for the minimum price. Figure 11 shows how the price variation would be between the stipulated limits.
27 Figure 11 Graph of the weighted price from the state of the grid The next parameter to take into account is the availability of space to charge the car. We assume that the total number of chargers available is 5. For this purpose, we have created a uniform random variable whose output data are numbers between 0 and 5. Based on this, it has been decided to increase the price by 3% if more than three loaders are being used and the same discount if less than three are being used. ¡Error! No se encuentra el origen de la referencia. shows a comparison of the price change after being altered: Figure 12 Graph comparing the market (yellow) and availability (blue) price.
28 Subsequently, another parameter to be taken into account was the state of the power grid. In this case, if the grid suffered overproduction, it was decided to discount the price by 5% with respect to the market price. On the other hand, if there is an energy deficit in the grid, the price will increase by 5%. Figure 13 Graph comparing the availability (blue) and final dynamic prices (purple). It is interesting to compare how the price varies from the beginning. In yellow colour we find the market price, on the other hand in blue the price after suffering the availability
29 variations and the last one in purple after suffering variations due to the state of the network. Figure 14 Overall comparison of the prices obtained in this work Finally, once the new price has been calculated, it has been decided to see how this affects demand. In this case we observe how the demand increases when prices are lower or how it increase when it reaches the 2740 seconds, due to a drop in prices. Figure 15 Graph comparing demand with static and dynamic prices
30 Figure 16 Graph comparing market and dynamic price according to the load Next, we are going to study the different possible cases, depending on the state of the variables of our algorithm: Table 4 Different results while implementing the dynamic pricing algorithm RATE Number of chargers State of the grid Market Price Abailability Price Final Price Variation Price increase 4 -6100GW 0.3608 0.3716 0.400 10.86% Price dicrease 0 17.848 GW 0.2264 0.2196 0.2086 -8.53% Equal price 3 1107GW 0.2545 0.2545 0.2545 0% Price increases & decreases 5 11584GW 0.2264 0.2332 0.2215 -2.21% Price decreases & increases 0 -2730GW 0.3110 0.3017 0.3168 4.11%
31 In the first example the price rises by a total of 10.86%. This is due to the fact that first of all, the charging station ports are mostly occupied, with only one free port. This first parameter increases the price by 2.99%. Next, the grid is in deficit of electricity, which causes the price to increase by 7.46%, compared to the previous price. In the second example, both parameters benefit the consumer. It can be seen that out of the 5 loading ports, all of them are empty and there is a large overproduction in the network, which causes the price to decrease by 8.53%. Figure 18 Price decrease example For the third case, the price remains constant. This is because the standard parameter for charger availability has been set to 3. On the other hand, even though the grid state has 1107 GW of overproduction, this does not influence the final price, since a tolerance has been set in the grid ranging from -2000GW to 5000GW, where the price remains constant. In the next two examples, we see how the parameters influence the price in opposite ways. In the first case there are no chargers available, so when a free slot is found, the next user Figure 17 Price increase example
38 pa=b*1.03 %If it is higher, the price increases else pa=b end abprice = pa; Function for dynamic final price: function g = fcn(s, data) if s>5000 %Superior tolerance for over-production data=data*0.95 elseif s<-2000 %Lower tolerance for power deficit data=data*1.05 else data=data end g = data; Function for final load: function y = fcn(cn, cv, load) if cv>cn; %Comparation of previous price and dynamic price loadn=load*0.7; elseif cv<cn; loadn=load*1.3; else loadn=load; end y = loadn;
39