Reducing energy costs and CO 2 emissions by production system energy flexibility through the integration of renewable energy

In recent years, the production of renewable energy has increased continuously to reduce fossil fuel consumption and CO 2 emissions and to increase energy efficiency. The challenge of industries is to integrate renewable energy systems into the existing power system of manufacturing industries. In the energy flexibility approach, the manufacturing energy demand is aligned with renewable energy availability, to improve the use of the renewable energy source. This paper aims to investigate a manufacturing system supplied by a photovoltaic plant coupled with a battery storage system. A basic storage model has been developed and implemented to pursue this issue. The model is applied in the simplified case of a manufacturing system composed of a cutting numerical control machine, which can adapt the cutting speed to align the power needed to the power supplied by the photovoltaic plant. However, the model can be extended to realistic production cases characterized by complex systems as long as the time evolution of energy consumptions are known in detail. The introduction of battery storage allows reducing the cutting speed fluctuations, improving the cutting life derived from the fatigue effect. This solution reduces the costs of the machine and improves the forecasting of the means needed for the manufacturing system. Finally, a detailed analysis of greenhouse gas reduction is discussed.


Introduction and motivation
In the European Union, the production of renewable energy increased continuously in the last decade up to 20% and the European target drives to increase this share of renewable energy in the next years [1,2]. Moreover, industrial activities have produced relevant contributions of direct and indirect annual greenhouse gas emissions [3]. The energy demand of manufacturing systems is quite stable and depends on customer demand, while the sources of renewable energy are characterized by temporarily changing availability. For the reasons mentioned above, it is essential to align the energy supplied by the renewable source with the energy demand of the manufacturing system to obtain optimal use of the renewable energy source.
The energy consumption of a manufacturing system can be adjusted by modifying the parameters of the operations. An example regarding the machining operations, in which the energy consumption depends on the cutting parameters as the speed cut and the feed rate, is given by Gutowski et al. [4].
The major part of the research activities is focused on the reduction of energy consumption and minimization costs, as in the case of variable energy price and reduction of peak power.
Several mathematical and numerical models have been proposed on these themes: minimization of the production costs [5], minimization of carbon footprint and production time [6], minimization of the total energy consumption [7] and the reduction of peak power periods with the 1 3 introduction of buffers in a flow line [8]. Renna and Materi [9] focused on the design problem of the production lines with the aim of energy saving using switch-off policies. Dehning et al. [10] provided a methodology, valid for several types of production systems, to identify and to reduce the energy consumption required during the non-production times.
Considering the energy supplied by renewable sources, Popp et al. [11] proposed a real-time control approach to schedule the use of machine tool components characterized by energy-flexibility. To evaluate the economic feasibility, the approach has been applied in a manufacturing system composed of thirty machines and with on-site renewable sources.
A method to control a production system composed of several processes and buffers with the availability of intermittent renewable energy sources (RES) has been developed in Beier et al. [12]. The energy flexibility control has been applied considering the throughput as a constraint to preserve the production.
Schulze et al. [13] proposed a model to improve the use of variable renewable energy by the introduction of battery storage. The reduction of the energy demand of the manufacturing system is based on a switch-off policy. The energy management and the implementation of energy storage systems allow obtaining high self-consumption and high productivity. The main limit of this work is that it was considered a particular day with 12 h of work without the evaluation of the customer demand with its fluctuations. The economic and environmental consequences have not been considered.
The only recent work that supports the alignment of demand energy of the manufacturing system and the intermittent RES was proposed by Materi et al. [14]. The model maximizes the monthly profit to satisfy customer demand for items with the introduction of an electric grid and by a photovoltaic (PV) system. In the model, the energy cost and the penalty for the unsatisfied demand have been considered, together with the stocked units, the tool cost and the analytical time evolution of the cutting speed on a hourly basis.
The main results show how the proposed model improves profit and reduction of CO 2 , especially when the fluctuations of the product demand are higher. The economic gain can be obtained by the optimization of the use of electricity (grid and PV), reducing the energy sold in the framework of an energy-flexibility approach.
The alignment of the energy demand for the production to the energy supplied by intermittent RES requires the continuous adaptation of machine parameters. In fact, the cutting speed can be modified to improve the use of renewable energy. However, its modification has several effects on the manufacturing process, as investigated by Akyildiz and Livatyali [15], in particular, addressing the influence of different machining parameters on the fatigue strength of threaded specimens. Akyildiz and Livatyali found that the most important factors on fatigue behavior are tool wear and cutting speed. Angseryd and Andrén [16] focused on the microstructure of PCBN cutting tools and reported the effects of cutting speed on tool wear. It is shown that a higher cutting speed increases the chemical degradation of the machine. Chinchanikar and Choudhury [17] argued that cutting speed in hard turning is the most relevant parameter for tool life. In addition, together with the feed rate and cutting depth, the cutting speed has a remarkable effect on surface roughness. Considering precision hard turning for the finishing of AISI 52100 bearing components, Revel et al. [18] reported that the higher cutting speed results in an increment of residual compressive stress. The cutting speed also affects the white layer in the hard turned surface, as shown in Liu et al. [19]; the higher the cutting speed, the thicker the white layer. Choi [20] discussed the influence of cutting speed on the surface condition and fatigue behavior, considering hard machined surfaces. The study concluded that the cutting speed has a significant impact on fatigue performances.
The research proposed in this paper is an improvement of the model presented in Materi et al. [14], aimed at deepening the impact of the introduction of battery storage in a manufacturing production system and on technological operations, energy cost and CO 2 emissions. This paper is organized as follows. Section 2 introduces the CO 2 reduction due to the integration of renewable electrical power and battery storage. Section 3 deals with the reference context and the mathematical model. Section 4 shows the simulation experiments and the results. Section 5 reports the conclusions and future research developments.

CO reduction through the integration of renewable electrical power
The simultaneous growth of the use of photovoltaic technology and the reduction in its cost has favoured the diffusion of solar power on a large scale, leading the solar power contribution to more than 20% of the world's electricity by 2050, as reported by the International Energy Agency (IEA) [21], of which 16% is covered by photovoltaic systems [22]. Moreover, in [21] solar energy, used for power generation and heating in buildings and industry, is considered to become by 2070 the largest primary energy resource, serving more than 20% of the global primary energy demand. The direct consequence is the reduction of a significant fraction of the growing global CO 2 emissions from fossil generation. Renewable sources typically produce emissions during manufacture but reduce carbon emissions considerably by replacing carbon-intensive sources. In order to calculate the 1 3 emissions reduction, the energy that is replaced and its carbon intensity must be evaluated. Moreover, the energy consumed in manufacturing processes by installing the renewable system must be computed and added. In PV energy conversion, solar radiation is directly converted into electric current self-consumed, dispatched to the grid or stored. The crystalline or multi-crystalline silicon (c-Si) devices convert sunlight to electricity with efficiency in the range 15-25% and cover around the 90% of the market due to the consolidated experience in manufacture and processing from the microelectronics industry. The cost of silicon PV modules has felt down from 15 €/Wp to lower than 1 €/Wp encouraging its growth [23,24]. Alternative technologies are represented by thin films, characterized by lower cost (0.6 €/Wp) and efficiency, and multiple layers of different semiconductors with efficiency over 30%, but, due to the expensive manufacturing production, lower diffusion [25].
Carbon intensity is strictly related to the characteristics of different PV technologies and ranges between 15 gCO 2 / kWh and 38 gCO 2 /kWh in the case of CdTe systems or c-Si, respectively, considerably lower than the intensity of fossil fuel (500 gCO 2 /kWh), according to de Wild Schotten [26].
The reduction of anthropogenic CO 2 (and, more generally, greenhouse gas GHG) emissions is seen as a mandatory objective for the next years to avoid harmful global warming problems [27]. However, the CO 2 emissions related to the energy sector continued to increase in the last five years, at an annual rate of 1.3% [28]. The effect of the pandemic started in 2020 has reduced the industrial activity for some months [29]. Consequently, the energy-related CO 2 emissions at the global scale have been reduced, also creating a conceptual discontinuity in the way to consider the time series of CO 2 emissions. This discontinuity, together with the future effects of the current period, need a rethinking of the way to determine the future scenarios. In any case, the emission reduction targets set at 2030 and 2050 [30] could be maintained, to avoid losing the slight environmental benefits forcedly gained during the period of activity lockdown.
According to IRENA [28], "Renewable electricity paired with deep electrification could reduce CO 2 emissions by 60%, representing the largest share of the reductions necessary in the energy sector". In addition, the combined effect of electrification and increased RES (renewable energy sources) deployment, together with a better energy efficiency of the energy components and systems, reduces the total energy demand from power plants based on fossil fuels. The corresponding environmental impact leads to a substantial reduction of CO 2 emissions.
Besides the energy consumption aspects of energy flexibility, the assessment of the environmental impact of the products is crucial to enable the decision-makers reaching their strategic decisions. In this respect, the study carried out in Pfeilsticker et al. [31] for the manufacturing industry considers the overall production cost (composed of energy cost, inventory cost, and processing costs defined with hourly rates per machine), as well as the emissions costs due to the use of energy during the production process.
The greenhouse gas emissions are considered by determining the CO 2 -equivalent mass [32], by using the emission factor (i.e., the specific emissions in g/kWh of a greenhouse gas produced by an energy source in the production process, multiplied by the global warming potential (GWP g ) to obtain the CO 2 -equivalent mass. The emission factors depend on the production process, as different equipment and energy sources are used in each process. The emission factor referring to the electricity taken from the grid depends on the energy mix for electricity production in the country. An updated emission factor database can be found in IPCC [33]. For energy flexibility analyses, in which the variations of the operational schedules with respect to a baseline scenario are of interest, the relevant emission factors can be the marginal emission factors instead of the average emission factors [34]. In fact, considering the average emission factors would imply that all the equipment undergo some changes, while flexibility is assessed by considering only the changes occurring for some equipment that form the operational energy and emission profiles. The application of energy flexibility strategies results in changing the energy used at different time intervals, with the consequent variation of the equivalent CO 2 emissions. Alternative expressions based on similar concepts are provided as the Carbon Emission Signature [35], in which the primary energy sources replace the production processes.
In the realm of sustainable manufacturing, an established method for CO 2 emission assessment is the carbon emission accounting (CEA), which considers energy, raw materials, and waste disposal. Recent advances include the extension of the CEA method to consider also capital factors and labour, leading to the Extended Carbon-Emission Accounting (ECEA) [36].
Some solutions that provide significant energy and CO 2 emissions savings in industrial plants include: 1. Enhancing self-sufficiency through flexible energy production in the manufacturing processes, also using demand response and energy storage to shape the energy demand profiles [37]. However, self-sufficiency cannot guarantee CO 2 -neutrality (i.e., the absence of anthropogenic CO 2 production), because the type of equipment used in the energy systems could not be CO 2 -free. 2. Enhancing energy flexibility from the combination of RES and carbon capture and utilization (CCU) solutions [38]. The CO 2 "wasted" from a manufacturing process can be used in other energy and chemical processes, also at relatively low scale. Since the actions needed to make CO 2 available for other processes may require energy, the CCU solution is viable only when this energy is produced from RES. Moreover, CCU could be more expensive than other solutions (e.g., energy storage [39]), then a specific analysis of convenience has to be carried out for the case under consideration. 3. Including recovering solutions and recycling strategies in the manufacturing processes [40], provided that the related costs are reasonable, and the corresponding energy requested comes from RES.
The solutions indicated above have the common advantage to require energy inputs from RES. This fact can be positive when the manufacturing system is located in an area in which a large extent of RES is available, or even the existing RES would be curtailed in the absence of further energy demand.

Basic considerations and assumptions
The reference context, as described in Materi et al. [14], concerns a manufacturing system composed of a single machine that performs a face milling of a prismatic workpiece. The work center is active 24 h a day and is coupled with a PV plant and a battery storage system. The demand for pieces is considered on a daily basis, follows a discrete uniform distribution, and the storage of surplus products is allowed. Furthermore, if the demand is not satisfied, the payment of a penalty is considered mandatory. The machine is linked to the electrical grid; in this manner, the production continues even when the energy supplied by the PV system and by the storage system is not sufficient. The addition of electric storage allows storing the excess of the energy supplied by the PV plant in order to use it, for example, during the dark hours of the day. The aim is to find the cutting speed profile that achieves the maximum profit, including the possibility of storing energy. By using battery storage, the cutting speed profile has a lower fluctuation during a single day compared The model is applied to a single work center but can be extended to realistic production cases characterized by complex systems as long as the time evolution of energy consumptions are fully analyzed. Figure 1 represents the reference context, i.e. the manufacturing system linked to the power system, composed of photovoltaic system (photovoltaic plant and battery) and of electrical grid, affected by the market demand.
The mathematical model and the objective function have been taken from Materi et al. [14] in which the hourly energy production of the PV plant has been considered [41][42][43]. In addition to the previous formulation, the availability of battery storage has been considered and the mathematical model has been properly updated. The mathematical model adopted has been shortly reported in the appendix.

Energy calculations
The energy characterization of the machine is developed, according to Calvanese et al. [44] and Albertelli et al. [45]. By resorting to the trust region method [46], the maximization of the monthly profit has been implemented in order to calculate the time evolution of the cutting speed on an hourly basis. The manufacturing, the tool, the energy and the storage costs are considered together with the penalty for unsatisfied demand. The battery charge level is also calculated on an hourly basis, as follows (Eq. 1): where Eac i,j is the energy in the battery in the ith hour of the jth day, Epv i,j is the energy supplied by PV plant during the production of a piece in the ith hour of the jth day, Ep i,j is the energy required for the production of a piece during the ith hour of the jth day, and prodh i,j is the hourly productivity during the ith hour of the jth day. Using Eq. (1), the battery is charged when the energy given by the PV plant is higher than the energy required for the production. The battery can be in one of the following states: For the first hour of a day, the stored energy must include the battery charge level of the previous day as follows (Eq. 2): Similarly, the battery charge level at the beginning of a generic month must take into account the energy stored in the battery at the end of the previous months, as follows (Eq. 3): where the subscript "l" denotes the last day of the previous month.
By using Eqs. (1)- (3), the level of the charge of the battery is initialized only the first day of the year.
Considering the presence of the battery, the energy bought by the grid is given by the following equation: where Eb i,j is the energy bought from the electrical grid during the ith hour of the jth day. When the energy required is higher than the energy given by the PV plant and by the energy storage, it is necessary to buy energy from the electrical grid for the production. The energy for the production of a single piece, is calculated as follows: where Ebu is the energy bought from the grid for a single piece. Then the unit cost is calculated as: where C u is the unit cost, C m is the hourly manufacturing cost, t p is the production time, C t is the tool cost, n ct is the number of tools needed for the production of a single unit and C E is the energy cost.

Assessment of the CO 2 equivalent emissions
The emission factor model is used to assess the CO 2 equivalent emissions. The emissions considered are the ones due to the use of electrical energy taken from different sources. The emission factor (s) g represents the specific emissions of the greenhouse gas g emitted by the energy source s to generate electricity). The global warming potential GWP g of greenhouse gas g is introduced to obtain the CO 2 equivalent emissions. The electrical energy E (s) kt refers to the production process k supplied by the energy source s at time interval t.
Let us denote with G the set of greenhouse gases, with S the set of energy sources, and with K the set of production processes. The CO 2 -equivalent mass emitted during the production process in the time period composed of successive time intervals t = 1,…, T, is calculated as follows: where the CO 2 -equivalent emission factor is expressed as: The Eq. (7) can be used with regular or non-regular time intervals, provided that the actual energy values are used in each time interval.
The usage of different energy sources s to supply the electrical energy E (s) kt changes the emissions because of the different emission factors involved. Hence, different ways to supply the same demand through the electrical grid or with local sources (photovoltaic systems and batteries) correspond to different emissions.
The combined effect of reducing the energy needed to carry out the process and using electricity taken from the local sources leads to reducing the CO 2 -equivalent emissions. To quantify the emission savings, a baseline scenario is considered, in which no actions are done to enhance the effectiveness of the production process and the electricity is taken from the grid. In this case, the emission factor referring to the electricity taken from the grid depends on the energy mix for electricity production in the country [47]. For example, in Italy the GHG emission factor for electricity production from the national energy mix has decreased from 575.9 g/kWh in 1990 to 477.7 g/kWh in 2005, and to 307.7 g/kWh in 2017 [48].
For photovoltaic systems, the emission factor is the GHG emission rate of per unit electrical energy generated by the photovoltaic system [49]; the CO 2 -equivalent emission factors reported in the literature vary from 14 to 73 g/kWh [50]. The GHG emission factor 40 g/kWh has been used in applications of photovoltaic systems with batteries [51].
For battery systems to be used together with photovoltaic systems, the GHG emission factor represents the preoperation phase and is expressed in g/kWh with respect to the maximum energy capacity (in kWh) of the batteries; the value 200 kg/kWh has been considered in [51] for a battery lifetime of 10 years and has to be multiplied by the energy capacity of the battery storage system to get the overall mass of CO 2 emitted during the construction phase. This information is not directly translated into a GHG emission factor to be used during the battery operation, for example depending on the energy discharged by the battery.
The CO 2 -equivalent mass m base CO 2 eq is then calculated from Eq. (7). Furthermore, the CO 2 -equivalent mass m CO 2 eq is calculated after applying changes in the production process and/or changing the electricity supply sources. The GHG Emission Savings (GHGES) indicator is then introduced as: Positive values of the GHGES indicator represent satisfactory cases in which the CO 2 -equivalent emissions are reduced. The maximum value that can be obtained is GHGES max = 1, when the local electricity is totally produced from sources that do not produce GHGs. On the other side, negative values indicate that the new situation is worse than the baseline scenario, and the minimum value is not limited.
The energy balance due to the supply of the useful electrical energy E demand kt from the grid ( E gen,grid kt ) and from the local sources (photovoltaic E gen,PV kt , and battery discharge E discharge,battery kt ) is: In the situation analyzed here, in which the presence of a photovoltaic system with batteries is expected to reduce the GHG emissions, the battery is connected in such a way that can be charged only by the photovoltaic system and is never charged by the grid, to avoid increasing the GHG emissions.

Energy and tool wear analysis
In the model, the energy can be bought from the grid, supplied directly by the PV plant and by the battery storage, which is sized in order to minimize the energy sold to the grid. In fact, if the PV production is greater than the energy demand for production, the excess energy is used to charge the battery. The energy costs during the day are reported in Table 1.
Regarding the daily demand of products, three different fluctuation ranges have been identified considering the production capacity of the system: high, medium and low fluctuations have been analyzed. In the case of low fluctuation, the lower and upper limit of the daily demand have been chosen respectively equals to daily productivity at the minimum production cost and to the maximum daily productivity. In the medium and high fluctuation case, the upper limit has been set again equal to maximum daily productivity, whereas the lower bound has been chosen respectively half and one-third of the daily productivity at the minimum production cost. The upper limit represents the maximum production capacity of the system and therefore is the maximum demand that can be satisfied. The daily demand is generated by a discrete uniform distribution, and the mean values of the daily demand of high, medium and low fluctuation cases are respectively 141, 159 and 203 pieces. Replications have been performed to achieve a 5% and a 95% of the confidence interval and of the confidence level, respectively. The basic assumptions of the model are: infinite storage capacity and level of unit stocked cleared the first day of each month.  According to Materi et al. [14], the maximum power of the PV system is 10 kW, and the irradiance and ambient temperature have been taken from the PVGIS database [52]. It has been considered that the PV plant is located in Potenza (Italy). The three test cases have been applied both to the production system assisted by the PV plant with energy storage and linked to the grid and to the production system equipped only with the PV plant and connected to the electrical grid (no battery storage). In the second case, the excess energy is sold to the electrical provider.
The percentage of variations has been obtained referring to the system assisted by the PV plant and linked to the grid (no battery storage). In the last case, energy costs are mainly reduced by the PV plant up to about 33%, 31%, and 26% respectively in the high, medium and low fluctuation of the demand, as shown in Materi et al. [14].
To evaluate the effect of the battery storage, the following performances were considered: • Yearly profit; • Energy cost; • Energy bought; • Self-consumed energy.
In the following figures, the hourly profiles of the cutting speed are reported. Figure 2 shows the cutting speed (Vc) profile in January obtained finding the maximum of the monthly profit in the case of high demand fluctuation. The hourly profile of the cutting speed is characterized by a slow variation, due to the different value of the energy costs during the day. In January, for the lower energy supplied by the PV system, the behavior of the system with and without the battery storage is the same, due to the low energy produced by the PV system.
During the summer, when the energy supplied by the PV plant is higher, the cutting speed profile for the two production systems (with and without battery storage) is different. Figure 3 shows the two cutting speed profiles in August in the case of high demand fluctuation. It can be noticed that, in contrast to the system without energy storage, the presence of the battery storage reduces the fluctuations considerably during the day by finding a different cutting speed due to an increased self-consumed energy at a more favorable  fare. The different values of the cutting speed in different days depending on the daily demand. The higher the daily demand, the higher the cutting speed. Higher increases in cutting speed during the light hour in the case without the battery storage occur when demand is low. To obtain profit it's required to meet the demand, for this reason when the market requires few pieces in a day to satisfy the requirements it's not necessary to produce at high cutting speed during the day. Incrementing the production during the light hours allows to reduce energy costs compensating the tool costs. Indeed, the lower the cutting speed, the lower the tool cost, but the higher the machining costs.
In the second test case, i.e. medium fluctuation demand, the cutting speed profiles for the two systems analyzed have the same behavior of the case with high fluctuation demand. In the case of low fluctuation demand, the cutting speed profiles present low variations during the days, due to the lower variations of pieces to be produced and to the higher daily demand. Figure 4 shows the energy bought from the electrical grid during January and August in the case of a system with battery storage and high fluctuation of demand. During January the battery storage never charges and energy must be taken from the grid even during the light hours. On the other side, during the summer months, the battery storage system increases the self-consumed energy, so it is not necessary to buy energy from the grid. Figure 5 shows the energy stored during April and August. The peaks of stored energy occur during the summer months. The level of charging depends on daily demand: the lower the demand, the higher the energy stored during the same day. Figure 6 represents the self-consumed energy in the system in the presence of battery storage and high fluctuation of demand. The figure shows that the presence of the battery allows to increase self-consumed energy over a long period of time, so that even when there is no photovoltaic energy available. The addition of the energy storage extended the time of using the self-consumed energy instead of selling it to the electrical provider at a non-affordable tariff. It can be noticed that the system can use the energy produced by the PV plant or stored in the battery, reducing considerably the energy bought from the electrical grid. When the energy supplied by the PV system and by energy storage  is not enough for the production, the system is powered by the grid. Figure 7 shows the charge level of the battery during the year. It can be noticed that energy is mainly stored between hours 2000 and 6500 and, for this reason, the addition of the battery storage has influence mainly during the spring and the summer. The level of charge is also influenced by the daily demand. In particular, the peaks of charge occur when the demand is low. For about 88% of the total time the energy stored, for this single work center model, ranges between 0 to 2 kWh.
The cutting speed profile requires further investigation and discussion, as reported in the following. Figure 8 shows the cutting speed during the hours of one day simulated in the three cases: electrical grid (grid), PV plant and grid (PV + grid) and PV plant with battery storage and electrical grid (PV + energy storage + grid). In the case of only connection to the electrical grid, the cutting speed profile presents a decrement in the central hour of the day due to the higher electricity tariff. Considering the power system composed of the photovoltaic plant and linked to the electrical grid, the cutting speed raises during the light hour reducing the energy cost optimizing energy self-use. The introduction of the battery implies a constant cutting speed to optimize the profit. As described above, this circumstance allows to reduce the stress of the cutting tools and to improve the cutting life derived from the fatigue effect. The constant cutting speed reduces the percentage of life used for the manufacturing operation compared to the other two cases. Figure 9 shows the percentage consumed of the cutting tools for the three cases studied. Integrating the curve of the cutting speed the total life consumed for the day can be obtained. It can be noticed that the percentage of the tool wear follows the cutting speed profile; analyzing the case of photovoltaic plant and electrical grid, the reduction of energy cost during the light hour allows increment the stress of the tools, and then their cost, in order to maximize the profit.
As shown in Table 2, the introduction of the battery reduces the life consumed at the same level as the network supplier. The benefit of this condition is the reduction of the Fig. 8 Cutting speed (Vc) during the 5th of August in the three power systems (grid, PV and grid, PV with energy storage and grid) Fig. 9 Percentage of tool wear during the 05th August in the three power systems (grid, PV and grid, PV with energy storage and grid) tools used, and the management of the tool's inventory is simpler. The forecast for the tools is stable, and this allows us to improve the performance of inventory management. Table 3 reports the percentage variations of the performances analyzed with respect to the chosen benchmark. Energy costs are reduced by the PV plant up to 30% [14] and the addition of battery storage leads to an additional reduction in energy cost, especially in the case of high fluctuation of demand.
In fact, it can be seen, in particular in the case of high fluctuation in demand, a reduction of about 3% the energy cost and an increase of more than 6% in self-consumed energy, producing for the system composed by PV plant and energy storage savings up to 35%. On the other side, in the case of medium fluctuation of the demand, the benefits obtained adding the battery storage are reduced and, in the low fluctuation demand, the performance variations from the benchmark are negligible. In fact, in this case, the system absorbs almost all the energy supplied by the PV system due to the higher production required and does not charge the storage system, behaving as if it were practically absent. As previously discussed, the addition of the battery results in a cutting speed profile with lower fluctuation during the day and this circumstance allows to reduce the stress of the cutting tools and to improve the cutting life derived from the fatigue effect.
Moreover, the addition of the battery results in a cutting speed profile with lower fluctuation during the day. This phenomenon implies the reduction of the stress of the cutting tools and the improvement of the cutting life derived from the fatigue effect.

GHG emission savings
The use of renewable energy sources in the manufacturing system allows reducing the energy bought from the electrical grid. The integration of the battery permits a further reduction of purchased energy. Electrical consumption involves CO 2 emissions due to the different technologies used in power plants. For this reason, the reduction of energy bought from the electrical grid by the integration of in-situ renewable and clean energy sources decreases proportionally the CO 2 emissions.
The assessment of the GHG emission savings is carried out by using the Eq. (9). The GHG emission factors considered are: -for the electricity taken from the grid: (gen,grid) CO 2 eq = 307.7 g/ kWh for Italy [48]; -for the electricity taken from the photovoltaic system: (gen,PV) CO 2 eq = 40 g/kWh [51]; -for the electricity taken from the battery: (discharge,battery) CO 2 eq = 0, neglecting in the operational phase the GHG emissions referring to the battery construction [51].
The GHG Emission Savings (GHGES) indicator for high, medium and low fluctuation case is respectively 0.28, 0.26, and 0.21.
In the following figure (Fig. 10) has been reported the prevented CO 2 for each month in one replication of the high fluctuation case with the integration of the photovoltaic plant and energy storage.
The annual value of the prevented CO 2 emissions in the case of high, medium and low fluctuation is the same, as the presence of the battery allows storing excess energy without selling it to the electrical grid and enables maximizing selfconsumed energy. The yearly mass of saved CO 2 emissions is about 3.82·10 6 gCO 2 .

Conclusions
The alignment of renewable energy supply with the machining requirement leads to the reduction of energy cost (up to 30%, as shown in Materi et al. [14] and to 35% in the present work) but also to the relevant fluctuation of the cutting speed in the machining process. The fluctuation of the cutting speed leads to reduce the tool life due to the fatigue stress, and the forecast of the tools to order is more difficult, increasing the costs of inventory. For the above reasons, the research proposes the introduction of battery storage to reduce these effects. The numerical results show that in the framework of the proposed model with constant rate production, the battery does not affect appreciably the profit with respect to the case of a system powered by a PV plant without storage, but reduces the fluctuation of the cutting speed drastically.
Numerical results demonstrated a constant value of the cutting speed and an increment of the use of the energy supplied from the PV plant, with a consequent reduction of CO 2 emissions and the introduction of battery storage leads to reduce the fatigue stress of the cutting tools with improvement in the tool costs (reduction of the tools required) and inventory costs (reduction of the inventory level).
Future works will focus on the investigations of a complex plant composed of several work centers, also concentrating on the calculation of the size of the nominal power of the PV plant, of the battery storage system. The model could also be applied to production systems characterized by a non-uniform profile of daily production in order to evaluate the effect of the storage on the profit.

Appendix
In this Section, the mathematical model developed and adopted is shortly presented. It consists of the maximization of the profit by recurring to the trust region method [46].
The objective function is the maximization of the monthly profit (P m ) (Eq. 11) calculated as the sum of daily profit: where P d,j is the daily profit of the jth day of the month, R d,j is the daily income of the jth day of the month, C d,j is the daily cost of the jth day of the month, C st is the cost of a unit in storage, St j-1 is the number of units in storage from the production of the day before, d m is the number of days of the month and v c (t) is the time-dependent machining parameter (i.e., the cutting speed). The outcome of the maximization procedure is given by the hourly profile of the cutting speed.
More, in particular, the daily incomes, i.e. the number of units sold times the selling price, are obtained as follows where P s is the unit selling price, Un av,j are the available units on the jth day, and Dem j is the effective demand on the jth day. In turn, the available units can be calculated as the sum of the produced units on the jth day, Un p,j , and the units stocked the day before, St j−1 , as follows: Un av,j = Un p,j + St j−1 while the effective demand (Eq. 14) is calculated as the sum of the daily demand (De j ) and the unsatisfied demand of the day before, i.e.: Finally, stocked units of the jth day depend on the available units and on the effective demand of the (j-1)th day as follows: The following non-linear system can express double formulations given by Eqs. (14) and (15) in the unknown's Dem j and St j By introducing the penalty for unit cost, Pen s , the daily penalty for unsatisfied demand is expressed as and the daily cost is defined as where C h,i is the hourly cost, which is strictly related to the hourly productivity, prodh, using the following equation where C u is the unit cost and the hourly productivity, i.e. the inverse of the unit production time t p , depends on the cutting speed.
The unit cost, considering that the production system is equipped with a photovoltaic system without battery and is linked to the electrical grid, can be calculated by the following equation where C m is the hourly machining cost, C t is the tool cost, n ct is the number of tools for single piece, C E is the energy cost, S E is the selling price of energy to the grid, Epv and Ep are the energy given by the photovoltaic plant and the energy needed for the production of a single unit, respectively. The addition of the battery allows storing the surplus energy, and then this cannot be sold to the grid. For this reason, the unit cost, in the case that the production system is equipped with a PV plant and battery and is linked to the grid, is calculated as shown in Eq. (6) where Ebu is the energy bought from the grid for a single piece. The energy bought for a single piece and the energy bought from the electrical grid during the ith hour of the jth day can be calculated using Eqs. (4) and (5), respectively. Equations (1)-(3), reported in the paper, allow the addition of the energy storage in the production system model.
The energy required to produce a single unit and the unit production time have been calculated (as in [14,44,45]) to find the dependence of the monthly profit as a function of the time-dependent profile of the cutting speed. All the quantities are expressed as a function of the cutting speed except for the time evolution of the PV power and for the demand, considered as input quantities of the model. The model calculates the time profile of the cutting speed on an hourly base which maximizes the monthly profit.
In the model, the hourly time evolution of the PV power and the energy produced by the PV system for a single unit in the time interval represent input data, and have been calculated using empirical correlations based on the International standard for electrical performances of PV systems [53,54]. Moreover, the effects of the cell temperature, Tc, and of the irradiance, G, have been accounted for [14,41]. The values of G(t) are based on calculations from satellite images performed by CM-SAF, and the database represents a total of 12 years of data [55,56].
Finally, the unit selling price, the penalty and the cost of the unit stocked are defined as follows: where C u,vC and C u,vP are, respectively, the units cost at the speed that minimizes the cost and at the speed that maximizes the production.