Original scientific paper Received: May 11, 2016 Accepted: June 16, 2016 DOI: 10.1515/rmzmag-2016-0008 Natural gas consumption prediction in Slovenian industry - a case study Napovedovanje odjema zemeljskega plina v slovenski industriji - študija primera Miha Kovačič1, Božidar Šarler2, Uroš Župerl3 1Štore Steel d.o.o., Železarska cesta 3, Štore, Slovenia and Institute of Metals and Technology, Lepi pot 11, Ljubljana, Slovenia institute of Metals and Technology, Lepi pot 11, Ljubljana, Slovenia 3Univerza v Mariboru, Fakulteta za strojništvo, Smetanova ulica 17, 2000 Maribor, Slovenia Abstract In accordance with the regulations of the Energy Agency of the Republic of Slovenia, each natural gas supplier regulates and determines the charges for the differences between the ordered (predicted) and the actually supplied quantities of natural gas. Yearly charges for these differences represent up to 2% of supplied natural gas costs. All the natural gas users, especially industry, have huge problems finding the proper method for efficient natural gas consumption prediction and, consequently, the decreasing of mentioned costs. In this study, prediction of the natural gas consumption in Štore Steel Ltd. (steel plant) is presented. On the basis of production data, several models for natural gas consumption have been developed using linear regression, genetic programming and artificial neural network methods. The genetic programming approach outperformed linear regression and artificial neural networks. Key words: natural gas, consumption, modeling, linear regression, genetic programming, artificial neural networks, industry Izvleček V skladu s pravili Agencije republike Slovenije za energijo vsak dobavitelj regulira in določa stroške na račun razlik med naročeno in dejansko količino odjetega zemeljskega plina. Letni stroški zaradi teh razlika znašajo do 2% stroškov odjetega zemeljskega plina. Vsi odjemalci zemeljskega plina imajo tako težave s samim napovedovanjem odjema in posledično zmanjšanjem omenjenih stroškov. V članku je predstavljeno napovedovanje odjema zemeljskega plina v Štore Steel d.o.o. (železarna). Na podlagi podatkov o proizvodnji je bilo razvitih več modelov s pomočjo linearne regresije, genetskega programiranja in nevronskih mrež. Genetsko programiranje prekaša linearno regresijo in nevronske mreže. Ključne besede: zemeljski plin, poraba, modeliranje, linearna regresija, genetsko programiranje, nevronske mreže, industrija [Mm © 2016 Miha Kovačič, Božidar Šarler, Uroš Župerl, published by De Gruyter Open. This work is licensed under the Creative Commons Attributio Broughttoyouby| National& UniversityLibrary Authenticated Download Date | 4/18/17 12:24 PM Introduction Natural gas represents the most environmentally preferred source of fossil fuel. Slovenia depends almost entirely on natural gas supplied from abroad (Russia and North Africa]. Natural gas is transmitted over the gas pipelines in its gaseous state. The participants of the natural gas market in Slovenia are the traders and the suppliers delivering natural gas to the customers. Natural gas is transmitted to the customers over the transmission and distribution networks by the system operators. The customers have the option to choose their supplier. Each supplier regulates and determines the additional charging for gas-related imbalances between the ordered and the supplied quantities [1, 2]. This article presents an attempt for reducing additional charging for gas-related imbalances between the ordered and the supplied natural gas quantities for Štore Steel Ltd. with more than 500 employees. Differences between the ordered and the supplied natural gas quantities, as well as the corresponding charges, depend on the precision of natural gas consumption prediction. In this study, natural gas consumption prediction using linear regression, genetic programming and artificial neural network (ANN] methods is presented. Natural gas ordering procedure According to the contract between the supplier and natural gas user, by 10 AM each Thursday, the ordered natural gas quantities for the next week are to be reported to the natural gas supplier. Already ordered quantities can be changed by 10 AM one day before the actual supply; there is no charge if the change is made in time. The ordered quantities are provided by the specialist responsible for natural gas consumption based on his/her experience and with the help of the in-house applications or databases. The usual procedure is to collect the actually supplied natural gas quantities for the past days and check for deviations in production. Accordingly, the official prediction for the entire next week is formed. In the case of very large production variations also, the already ordered natural gas quantities is changed by 10 AM day before the actual supply. According to the contract between the supplier and the Štore Steel Company, the maximum daily gas consumption qmax is agreed to be 50,000 Nm3 (normal metre-cubed]. A penalty p for imbalance between the ordered and the supplied quantities is defined according to the following analytical expressions: \\< 0.03 ^ p = -0.0013 0.03 0.08 ^ p = ~[qs - {qp + 0.08 • qmax )]• 0.59 (4] where a stands for the relative gas consumption deviation ®=(qs -qpr/qmax, whereas qs and qs stand for the supplied gas quantity and the predicted gas quantity, respectively, in 1 day. The additional charge the company has to pay per day is c = p • P g (5] where c stands for the daily charge, and pg is the gas price (Nm3]. The average relative gas consumption deviation in a period of n days is defined as follows: 1 " n ,=i (6] and the charge the company has to pay in a period of n days is defined as follows: ,=Z p. • ps (7] Experimental data Štore Steel Ltd. is one of the biggest spring steel producers in Europe. Its natural gas consumption represents approximately 1.10% of Slovenia's natural gas consumption. CD 1=1 Figure 1: Štore Steel Ltd. layout and consumption spots. The following data were collected during the period from 6.1.2005 until 20.12.2012 based on the actual ordering pattern: — drawing plant shifts (shifts), — steel plant production (batches), — rolling plant production (tons), — annealing furnace #1 production (annealj, — annealing furnace #2 production (aanneal2) and — date (month). For the fitness function, the sum of daily penalties (Equation 7) in the period from 6.1.2005 until 20.12.2012 was used. Linear regression-based prediction of natural gas consumption On the basis of the collected data, the following correlations can be defined as in Table 1. For the given data and defined correlations, the sum of penalties and average relative gas consumption deviation are 1,297,616.4 pg and 0.0710, respectively, where pg is the price of natural gas. Genetic programming-based prediction of natural gas consumption Genetic programming is probably the most general evolutionary optimization method [3]-[5]. The organisms that undergo adaptation are in fact mathematical expressions (models) for the gas consumption. The prediction consists of the available function genes (i.e. basic arithmetical functions) and terminal genes (i.e. independent input parameters, and random floating-point constants). Usually the models consist of the following function genes: addition (+), subtraction (-), multiplication (*) and division (/), in addition to the terminal genes (e.g. x,y, and z). Random computer programmes of various forms and lengths are generated by means Table 1. Contribution Consumption spot Natural gas consumption (Nm3) Electric arc furnace 9i batches-151.63+7,099.2 Heating furnace #1 92 27.785-tons+3,297.5 Heating furnace #2 q3 Heating furnace is turned off: 0 Heating furnace is turned on: 296.17 Annealing furnace #1 94 Annealing furnace is turned off: 0 Annealing furnace is turned on: 2,828.32 Annealing furnace #2 95 Annealing furnace is turned off: 0 Annealing furnace is turned on: 1,468.04 Cold finishing plant 96 No production: 0 One shift: 634.32 Two shifts: 1,466.68 Boiling house 9y 321,08 Quantity error 9e January, February, December: 2,496.86 Other months: 1,398.92 Figure 2: Random programme tree. Figure 3: Crossover -genetic operation. of the selected genes at the beginning of the simulated evolution. The varying of the computer programmes is performed by means of genetic operations (e.g. crossover, mutation) over several iterations, known as generations. After completion of the variation of the computer programmes, a new generation is obtained. Each generation is compared with the experimental data. The process of changing and evaluating organisms is repeated until the termination criterion of the process is fulfilled. The maximum number of generations is chosen as a termination criterion in the current algorithm. The following evolutionary parameters were selected for the process of simulated evolutions: 1,000 for the size of the population of organisms, 100 for the maximum number of generations, 0.4 for the reproduction probability, 0.6 for the crossover probability, six for the maximum permissible depth in the creation of the population, ten for the maximum permis- sible depth after the operation of crossover of two organisms, and two for the smallest permissible depth of organisms in generating new organisms. Genetic operations of reproduction and crossover were used. For selection of organisms, the tournament method with tournament size seven was used. The AutoLISP based in-house genetic programming system was run 100 times in order to develop 100 independent civilizations. Each run lasted approximately 4 h and 40 min on a 3.0 GHz processor with 4 GB of RAM. The best model for natural gas consumption prediction in Štore Steel Ltd. is as follows: 9665.77 + 3024 ■ anneal + 3417 .08 ■ shifts - 2899.81 ■ month + 33.972 ■ tons + 790. 126 ■ batches + ( , - 3.67 ■ shifts + 0.04299 ■ tons 624299 ^ anneal H---1---h anneal + shifts tons 3417.08 ■ tons + 790. 126 ■ batches shifts - 2899.81 • shifts + 33.972 • tons 790.126 • tons ^ w , -+ 791. 126 • batches shifts + roll ^ shifts anneal(shfts + 33.972 • tons + 790.126 • batches anneal • shifts + 790. 126 • tons tons(2699920 • tons + 624299 • batches) (2899.81 ■ shifts - 33.972 ■ tons)2 batches Jy shits + batches (8) with sum of penalties 1,209,809.6 Pg, and average relative gas consumption deviation = 0.0729. ANN-based prediction of natural gas consumption ANNs consist of a large number of processing elements called neurons that operate in parallel [6, 7]. Computing with neural networks is non-algorithmic. They are trained through examples rather than being programmed by software. The multilayer back-propagation network is a supervised, continuous valued, multi-input and multi-output feed-forward multilayer network that follows a gradient descent method. The gradient descent method alters the weight by an amount proportional to the partial derivative of the error with respect to the weight in question. The back-propagation phase of the neural network alters the + Figure 4: Artificial neural network architecture. weights wji so that the error of the network is minimized. This is achieved by taking a pair of input/output vectors and feeding the input vector into the net, which generates an output vector, which is compared to the output vector supplied, thus gaining an error value. The error is then passed back through the network (back-propagation process], modifying the weights due to this error using the equations. Hence, if the same set of input/output vectors is presented to the network, the error would be smaller than previously found. For modelling the natural gas consumption, a three-layer feed-forward neural network was used. It contained six neurons in the input layer and one in the output layer. The number of neurons in the hidden layer was varied in different experiments. Signals passed through the neurons in the hidden and output layers are transformed on the basis of tangent (non-linear] function, which allows the identification of the non-linear system. The data are automatically normalized in order to make the training process faster. This was done by mapping each term to a value between zero and one using the max -min method. These normalized data were utilized as the inputs and outputs to train the ANN. Training of the ANN is finished when the testing error is less than the tolerance limit. This tolerance limit is defined as 10% at the begin- ning of the training. On average, the networks needed 182 iterations to achieve this goal. Approximately 12 min of training are needed to set up the full prediction performance of ANN. After the neural network had been trained, it was applied to 30 examples that did not take part in the training process. In this case, the solutions of the examples were not supplied, so that the network had to estimate them. The testing prediction error was 9.8%. The sum of penalties and the average relative gas consumption deviation are 1,469,811.1 pg and 0.0733, respectively. Conclusions The Energy Agency of the Republic of Slovenia regulates and determines the charges for the differences between the ordered (predicted] and the actually supplied quantities of natural gas. Accordingly, the most precise natural gas consumption prediction is appreciated. In this study, the prediction of the natural gas consumption of Štore Steel Ltd. using linear regression, genetic programming and ANN methods is presented. For efficient prediction, the following influential parameters were used for modelling: • drawing plant shifts, • steel plant production, • rolling plant production, • annealing furnace #1 production, • annealing furnace #2 production and • month of the year. For the fitness function, the sum of daily penalties (Equation 7] in the period from 6.1.2005 until 20.12.2012 was used. On the basis of the relative gas consumption deviation, the penalties are calculated according to the contract between the natural gas supplier and Štore Steel Ltd., which also depends on the price of natural gas pg. The following results have been obtained: — The sum of penalties (where pg stands for price of Nm3 natural gas ]: • linear regression: 1,297,616.4 pg, • genetic programming: 1,209,809.6 p and • ANNs: 1,469,811.1 pg, g — Average relative gas consumption deviation: • linear regression: 0.0710, • genetic programming: 0.0729 and • ANNs: 0.0733. The genetic programming approach outperformed linear regression and ANN methods. With slight modifications, the herein-presented approaches are extremely practical for any kind of natural gas consumption prediction. ter Manuf Process 2013;28:783-7. doi: 10.1080/ 10426914.2012.718475. [6] Zuperl U., Cus F., System for off-line feedrate optimization and neural force control in end milling. Int J Adapt Control Signal Process 2012;26:105-23. doi: 10.1002/acs.1277. [7] Zuperl U., Cus F., Reibenschuh M., Modeling and adaptive force control of milling by using artificial techniques. J Intell Manuf 2012;23:1805-15. doi: 10.1007/s10845-010-0487-z. References [1] Kovacic M., Sarler B., Genetic programming prediction of the natural gas consumption in a steel plant. Energy 2014;66:273-84. doi: 10.1016/j.energy. 2014.02.001. [2] Kovacic M., Dolenc F., Prediction of the natural gas consumption in chemical processing facilities with genetic programming. Genet Program Evolvable Mach 2016. doi: 10.1007/s10710-016-9264-x. [3] Kovacic M., Sarler B., Genetic Algorithm-Based Batch Filling Scheduling in the Steel Industry. Mater Manuf Process 2011;26:464-74. doi: 10.1080/ 10426914.2010.525576. [4] Kovacic M. Modeling of Total Decarburization of Spring Steel with Genetic Programming. Mater Manuf Process 2014;30:434-43. doi: 10.1080/ 10426914.2014.961477. [5] Kovacic M., Rozej U., Brezocnik M., Genetic Algorithm Rolling Mill Layout Optimization. Ma-