scieee AI-readable full text Open interactive document viewer

Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models

Gómez Jiménez, Javier; Chicaiza Salazar, William David; Escaño González, Juan Manuel; Bordons Alba, Carlos

Abstract

An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.).

Full text

IFAC PapersOnLine 56-2 (2023) 8738–8743 ScienceDirect Available online at www.sciencedirect.com 2405-8963 Copyright © 2023 The Authors. This is an open access article under the CC BY-NC-ND license . Peer review under responsibility of International Federation of Automatic Control. 10.1016/j.ifacol.2023.10.057 10.1016/j.ifacol.2023.10.057 2405-8963 Copyright © 2023 The Authors. This is an open access article under the CC BY-NC-ND license ( https://creativecommons.org/licenses/by-nc-nd/4.0/ ) Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/bor[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗ , ∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Javier Gómez et al. / IFAC PapersOnLine 56-2 (2023) 8738–8743 8739 Copyright © 2023 The Authors. This is an open access article under the CC BY-NC-ND license ( https://creativecommons.org/licenses/by-nc-nd/4.0/ ) Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section Energy Demand Management in an Industrial Manufacturing Plant using MPC and Neurofuzzy Models ⋆ Javier G´omez, ∗William D. Chicaiza, ∗Juan M. Esca˜no, ∗ Carlos Bordons ∗,∗∗ ∗Dept. System Engineering and Automatic Control, Universidad de Sevilla, Spain (e-mail: jgomezj/wchicaiza/jescano/[email protected]) ∗∗ ENGREEN - Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Spain Abstract: An MPC controller is proposed to maximise the use of renewable energy in a manufacturing process. The strategy has been applied in a manufacturing system which has several machines, renewable generation resources, a combined heat and power (CHP) generator for power production, and a battery bank for energy storage. The work aims to maximise the use of renewable energy sources in this process, also taking into account the price of the electricity market, to reduce the cost. The use of neurofuzzy models for the prediction of the energy produced by renewable generators allows a dynamic prediction, using input values obtained from typical forecasting variables (wind speed, global irradiance, etc.). Keywords: Manufacturing processes, Model Predictive Control, Neurofuzzy systems, Energy management systems, Genetic algorithms, Intelligent control. 1. INTRODUCTION According to IEA (2022), the latest report of the International Energy Association, approximately 41% of global consumption is due to the industry and their CO2emis- sions represent 45% of total direct emissions from end-use sectors. Although energy optimisation techniques in other sectors (buildings and micro-grids) are already well known in the industrial field, a mature technology that takes into account all aspects involved has not yet been established. A summary of research on the integration of renewable energy into manufacturing processes is given in Renna and Materi (2021). The study concludes that the best integration is achieved when the problem is addressed by manipulating demand through replanning manufacturing. In Baruwa and Piera (2014), there is a planning optimisation approach based on a simulation-optimisation framework that combines evaluation methods (simulation) and search methods (optimisation). A different approach, based on particle swarm optimisation integrated into a neural network, is presented in Islam et al. (2022). Some research papers that address the problem of integration of renewable energy in industry within the planning problem are as follows: in Islam et al. (2018) the focus is on smart planning to solve the problem of overgeneration of renewable energy. In Rodr´ıguez-Garc´ıa et al. (2016); Duarte et al. (2020), other ways to solve the problem of integrating ⋆The authors would like to thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 renewables are seen, taking them into account in planning optimisation. Finally, in Yun et al. (2022) batteries are introduced into the planning, as a tool to visualise the improvements that this would entail. To the best of the authors’ knowledge, no work has presented a global approach, where the complex nature of industrial processes is taken into account. A holistic approach is required to address all the variables that influence the energy performance of a manufacturing system, such as the environment, components, material use and waste minimisation, machines and their maintenance, etc. Furthermore, no adequate methodology has been applied to dynamically predict the renewable energy to be generated using actual and available weather forecast data. Model-based predictive control (MPC) is well known in industry (Camacho and Bordons, 2007). There are good results of MPC in energy management of buildings (Roshany-Yamchi et al., 2017) and microgrids (Bordons et al., 2020), but no relevant work has been done for complete energy management in manufacturing processes. This paper proposes an MPC to maximise the use of renewable energy in a real factory with several machines, renewable generation resources, a combined heat and power (CHP) generator, and a battery bank for energy storage. In this strategy, predictions of the price of the electricity market, gas costs, and predictive models of renewable energy generation are taken into account. The result of the MPC will give the sequence of manufacturing operations as well as the operation of the batteries and the CHP. The rest of the article is organised as follows. Section 2 sets out the optimisation problem to be solved. Section 3 explains and develops neurofuzzy models of renewable energy production. The MPC strategy is presented in Section 4. Section 5 shows the results of the evaluation and the article ends with a section on conclusions and future work. 2. OPTIMISATION PROBLEM The main objective is to maximise the use of renewable energy. To achieve this, it is proposed to minimise the daily energy cost (Cday), the largest amount of which is associated with the energy purchased from the electricity supplier. The process to be controlled is part of a real manufacturing plant. The process consists of the following elements: a set of MComputerised Numerical Control (CNC) machines of one of the processes carried out within the factory, which are the only loads that can be manipulated; and a fixed consumption profile for the rest of the factory loads on the demand side (Remaining Consumption or RC). On the generation side, there are a wind turbine (WT) and a set of photovoltaic panels (PV), which are the only two renewable energy sources (RES); a CHP and a connection to the electricity supplier. Finally, a battery bank (B) has been included. The factory can be considered a microgrid (Bordons et al., 2020). A schematic of the microgrid can be seen in Figure 1. CNC₂ CNC₁ CNCM INTEGER nCNC Remaining Consumption APPROXIMATELY 89% OF TOTAL CONSUMPTION RENEWABLE ENERGY SOURCES Wind Turbine PV Panels nCHP Market Provider CHP BINARY Ba�eries CONTINUOUS nB Fig. 1. Microgrid Scheme Decision variables can be manipulated to modify the behaviour of the plant’s assets (generators and loads). Since RESs are to be maximised, they will not have decision variables because they will be used whenever they are available. There are multiple possibilities to represent the behaviour of the different elements of the plant with the decision variables. The computational cost of the optimisation depends on what each variable represents. The selected optimisation strategy of the decision variables (nk obj) is summarised into three types of variables: •nk CNC represents how many machines are in operation at time k. •nk CHP represents whether the CHP is on or off at time k. •nk Brepresents the percentage of battery power that is charged or discharged at time k. Table 1. Decision variables Symbol Type Limits lower & upper nk CNC Integer 0 M=7 nk CHP Integer 0 1 nk BReal -1 1 With this strategy for the decision variables associated with CNCs, two optimisations are decoupled: the number of machines needed at each instant to meet the DPT and, specifically, which machines to switch on at each instant. This second optimisation, given that the consumption implemented for the CNCs is identical for all of them, has been solved by switching on the CNCs with the lowest index ifirst. The limits of each decision variable can be seen in Table 1. The constraints associated with the decision variables are summarised in (1). Model Constraints ≡TPU ≥DPT SOCk≥SOCmin (1) That is, (1) The state of charge of the batteries at any instant (SOCk) must be greater than the minimum selected (SOCmin) to increase the battery life. (2) The total number of parts produced (TPU)mustbe equal to or greater than the number of parts required (DPT). The chosen sample time (∆t) is 0.5 hours and the optimisation horizon (OH) is equal to one day. This implies that the optimisation will run every 30 min and that there are 48 kinstants (OH = 48 samples) along the OH. This means that there are 144 decision variables to optimise. The daily energy cost (Cday) for the process is obtained from the energy balance of the system, resulting in (2). Cday = OH  k=1 Ck MP +Ck CHP = = OH  k=1 Ek MP ·Prk MP +Ek CHP ·ηCHP ·Prk gas (2) Being Ck MP/CHP the cost of energy purchased / produced by MP / CHP, Ek MP/CHP the energy purchased / produced by MP / CHP, Prk MP/gas the price of the electricity/gas used by the CHP and ηCHP the electrical efficiency rate of the CHP. Everything is relative to the instant k. All the subsystems that make up the system will be explained below. Each CNC machine has been modelled as an on/off machine, by integrating the average idle (Poff,mean CNC ) or running (Pon,mean CNC ) power over a period; as seen in (3). Ek CNC =∆t ·   Pon,mean CNC if nk CNC =1 Poff,mean CNC in other cases (3) 8740 Javier Gómez et al. / IFAC PapersOnLine 56-2 (2023) 8738–8743 Table 2. CNC model parameters Parameter Symbol Value Unit Daily Production Target DPT 378 parts Production Time PT 15 minutes Manipulated CNCs number M7machines The parameters needed to configure the CNC production model can be seen in Table 2. The DPT refers to the M manipulated CNCs, not to the total of the real factory. A linear model for battery charge and discharge has been included. The implemented model is described in (4, 5, 6). Eaux,k B=nk B·Pmax B·∆t (4) Ek B=                      if nk B≥0     Eaux,k B·ηdif SOCk≥Eaux,k B SOCk·ηdin other cases if nk B<0       Eaux,k B ηc if SOCk−Eaux,k B≤SOCmax SOCk−SOCmax ηc in other cases (5) SOCk+1 =SOCk−     Ek B ηd if nk B≥0 Ek B·ηcif nk B<0 (6) The model parameters can be found in Table 3. Table 3. Batteries model parameters Parameter Symbol Value Unit Minimum State of Charge SOCmin 0.3MWh Initial State of Charge SOC1SOCmin MWh Maximum Power Exchange Pmax B1MW Charge Performance ηc0.95 − Discharge Performance ηd0.95 − The implemented CHP model with an on/off operation can be seen in (7, 8). Ek CHP =nk CHP ·Pmax CHP ·∆t (7) Ck CHP =Ek CHP ·ηCHP ·Prk gas (8) The data required for the model are the price of gas throughout the day(Prk gas), the efficiency of the CHP and the percentage of electrical energy produced per MWh of gas (both of which are contained in ηCHP , from the CHP datasheet); and the nominal power of the CHP (Pmax CHP ). These parameters can be found in Table 4. The total energy generated by RES (Ek RES) is summed up in (9). The Remaining Consumption (Ek RC) is the result Table 4. CHP model parameters Parameter Symbol Value Unit Rated Power Pmax CHP 435 kW Electrical efficiency rate ηCHP 39.9% of subtracting the overall demand minus the consumption of the Original Behaviour (to be explained later) from the manipulable MCNCs (the factory owner provides these data). Eaux,k MP represents the unsatisfied demand, calculated in (10). As electricity cannot be sold on the market in the real system, it is saturated in (11). The electricity supplier, subject to the electricity market, will satisfy the demand when all other energy sources do not, with an associated cost, according to (12). The electricity price is obtained from a database of the real system supplier. Ek RES =Ek WT +Ek PV (9) Eaux,k MP =−(Ek CHP +Ek B+Ek RES)+Ek RC + M  i=1 Ek CNCi(10) Ek MP =0 if Eaux,k MP <0 Eaux,k MP in other cases (11) Ck MP =Ek MP ·Prk MP (12) 3. NEUROFUZZY MODEL OF RES Given that the meteorological variables that can be predicted over the horizon are scarce (wind speed and global irradiance) and that renewable energy generation responds to a complex nonlinear model, which includes several variables as input, it has been decided to use Fuzzy Inference Systems (FIS) to predict renewable energy generation. Fuzzy modelling has proven to be an effective technique for modelling and controlling nonlinear systems, successfully expressing the original nonlinear model. To predict the next active power value of the wind turbine, only the wind speed and current active power are used. For PV modelling, only direct global irradiance and active power are used. After data preprocessing (outlier removal, interpolation, and normalisation), the data sets are organised into training and validation sets to avoid overfitting by cross-validation. After the training procedure, two FISs (wind turbine and photovoltaic) are obtained with a structure described in (Chicaiza et al., 2022). The number of rules for both neurofuzzy models is 2. The validation process compares the predicted output FISswith the validation data set corresponding to each RES. For the photovoltaic installation, the validation set consists of 51 days and 58 days for the wind turbine. That is, a new data set with inputoutput samples that were not used in the learning process in both cases. Thus, three error indices were used to compare the FISsoutput with the actual predicted output data: the arithmetic error mean ( ¯ E), Root Mean Square Error (RMSE), and the coefficient of determination R2. Figure 2 shows that FISPv and FISWT are able to predict the actual value of active power in both RES, and these evaluations consider data during the day and night. The error indices obtained from both models are shown in Table 5. Javier Gómez et al. / IFAC PapersOnLine 56-2 (2023) 8738–8743 8741 Table 2. CNC model parameters Parameter Symbol Value Unit Daily Production Target DPT 378 parts Production Time PT 15 minutes Manipulated CNCs number M7machines The parameters needed to configure the CNC production model can be seen in Table 2. The DPT refers to the M manipulated CNCs, not to the total of the real factory. A linear model for battery charge and discharge has been included. The implemented model is described in (4, 5, 6). Eaux,k B=nk B·Pmax B·∆t (4) Ek B=                      if nk B≥0     Eaux,k B·ηdif SOCk≥Eaux,k B SOCk·ηdin other cases if nk B<0       Eaux,k B ηc if SOCk−Eaux,k B≤SOCmax SOCk−SOCmax ηc in other cases (5) SOCk+1 =SOCk−     Ek B ηd if nk B≥0 Ek B·ηcif nk B<0 (6) The model parameters can be found in Table 3. Table 3. Batteries model parameters Parameter Symbol Value Unit Minimum State of Charge SOCmin 0.3MWh Initial State of Charge SOC1SOCmin MWh Maximum Power Exchange Pmax B1MW Charge Performance ηc0.95 − Discharge Performance ηd0.95 − The implemented CHP model with an on/off operation can be seen in (7, 8). Ek CHP =nk CHP ·Pmax CHP ·∆t (7) Ck CHP =Ek CHP ·ηCHP ·Prk gas (8) The data required for the model are the price of gas throughout the day(Prk gas), the efficiency of the CHP and the percentage of electrical energy produced per MWh of gas (both of which are contained in ηCHP , from the CHP datasheet); and the nominal power of the CHP (Pmax CHP ). These parameters can be found in Table 4. The total energy generated by RES (Ek RES) is summed up in (9). The Remaining Consumption (Ek RC) is the result Table 4. CHP model parameters Parameter Symbol Value Unit Rated Power Pmax CHP 435 kW Electrical efficiency rate ηCHP 39.9% of subtracting the overall demand minus the consumption of the Original Behaviour (to be explained later) from the manipulable MCNCs (the factory owner provides these data). Eaux,k MP represents the unsatisfied demand, calculated in (10). As electricity cannot be sold on the market in the real system, it is saturated in (11). The electricity supplier, subject to the electricity market, will satisfy the demand when all other energy sources do not, with an associated cost, according to (12). The electricity price is obtained from a database of the real system supplier. Ek RES =Ek WT +Ek PV (9) Eaux,k MP =−(Ek CHP +Ek B+Ek RES)+Ek RC + M  i=1 Ek CNCi(10) Ek MP =0 if Eaux,k MP <0 Eaux,k MP in other cases (11) Ck MP =Ek MP ·Prk MP (12) 3. NEUROFUZZY MODEL OF RES Given that the meteorological variables that can be predicted over the horizon are scarce (wind speed and global irradiance) and that renewable energy generation responds to a complex nonlinear model, which includes several variables as input, it has been decided to use Fuzzy Inference Systems (FIS) to predict renewable energy generation. Fuzzy modelling has proven to be an effective technique for modelling and controlling nonlinear systems, successfully expressing the original nonlinear model. To predict the next active power value of the wind turbine, only the wind speed and current active power are used. For PV modelling, only direct global irradiance and active power are used. After data preprocessing (outlier removal, interpolation, and normalisation), the data sets are organised into training and validation sets to avoid overfitting by cross-validation. After the training procedure, two FISs (wind turbine and photovoltaic) are obtained with a structure described in (Chicaiza et al., 2022). The number of rules for both neurofuzzy models is 2. The validation process compares the predicted output FISswith the validation data set corresponding to each RES. For the photovoltaic installation, the validation set consists of 51 days and 58 days for the wind turbine. That is, a new data set with inputoutput samples that were not used in the learning process in both cases. Thus, three error indices were used to compare the FISsoutput with the actual predicted output data: the arithmetic error mean ( ¯ E), Root Mean Square Error (RMSE), and the coefficient of determination R2. Figure 2 shows that FISPv and FISWT are able to predict the actual value of active power in both RES, and these evaluations consider data during the day and night. The error indices obtained from both models are shown in Table 5. 3000 4000 5000 6000 7000 0 1 2 3105 Out Model Out Real 4900 4950 5000 5050 5100 0.5 1 1.5 2105 Out Model Out Real 6500 7000 7500 8000 0 1000 2000 3000 Out Model Out Real 7200 7300 7400 7500 7600 0 1000 2000 3000 Out Model Out Real Fig. 2. Validation results Table 5. Validation index of the neuro-fuzzy predicted models. Error FISPv FISWT indexes model model ¯ E7.424 [kW] 28.42 [kW] RMSE 24.587 [kW] 267.89 [kW ] R20.91 0.91 Validation metrics indicate that the neurofuzzy prediction model (FISs) has good accuracy and captures nonlinear dynamics throughout the operating range (day and night). Based on the mean error, it is possible to infer that the neurofuzy model superestimates the active power in both cases, as ¯ Eis positive respectly. The RMSE of FISPv is 24.587 kW and for FISWT is 267.89 kW, which are low values considering that the photovoltaic system has a nominal operating power of 210 kW and 3 MW in the case of the wind turbine. Finally, the linear regression between the predicted and actual active power of the outlet gives the coefficients of determination R2=0.91 for both models. It indicates that the model explains 91% of the variation in the output variable through the input variable. Therefore, it can be said that the obtained models show a good fit with the data, a high ability to explain the variability in the output variable through the input variable, and that both are good at making predictions. 4. MODEL PREDICTIVE CONTROL To design an MPC, three important components are necessary: an optimiser, predictive model, and feedback from the real system. The architecture of the implemented MPC can be seen in Figure 3. The optimisation problem, in this case, is composed of integer and real variables, i.e., it is of mixed type. One of the best algorithms (see (Gen and Lin, 2012)) to solve this problem is genetic algorithm (GA). The values of the most relevant GA parameters have been selected empirically, testing different possibilities, and obtaining the best results with the values shown in Table 6. There is an additional parameter that influences the precision and optimisation time: the mutation function. This Optimiser Predictive Model Data Processing Real System Feedback Forecast and current data Current data Freedom Variables Fig. 3. MPC Architecture Table 6. Selected parameters of the genetic algorithm Param Value Population size 288 Elite count 58 Crossover function crossoverscattered Crossover fraction 0.9 Selection function selectionstochunif function obtains the set of random individuals that try to prevent the GA from going to a local minimum. Two different mutation functions have been used: (1) Power mutation (PM) (Deep et al., 2009): more accurate, but requires a greater computational load on mixed problems. (2) Uniform mutation (UM) (Michalewicz, 1996): less accurate but less computational burden. The best combination for mixed-type problems is to use the UM function to approximate the desired minimum and then use PM, starting from the final value of the previous optimisation for the decision variables, to improve the final result. The following tasks are carried out in the block Data Processing: (1) Obtaining the actual input data for the models. (2) Creation of forecast data. (3) Feedback of the output data from the model: (a) Power at time kof PV and WT. (b) Current SOC of the batteries. (c) Part production was carried out. All actual data (Dataactual) for the models (price, wind speed, irradiance, etc.) have been obtained from openaccess databases. To mimic a realistic scenario, the MPC uses forecast data. These data are created from actual data, introducing an increasing uncertainty over time, following (13). This uncertainty is relative to the maximum value of the actual data to be modified. Datak forecast =Datak actual ±(k−1)∗K∗Datamax actual (13) In Figure 4, the actual wind speed is shown in orange and the value created with uncertainty in blue. At each instant k, the 24-hour interval (48 samples) of the forecast data is recalculated from the actual data. This 8742 Javier Gómez et al. / IFAC PapersOnLine 56-2 (2023) 8738–8743 0 5 10 15 20 25 Time [h] 2 4 6 8 10 12 14 16 Wind speed (m/s) Forecast data Actual data Fig. 4. Example of forecast data creation makes the information at time kthe same as the actual data. 5. RESULTS To compare the improvements obtained with the controller, a combination of decision variables has been created that will produce the behaviour of the real system without the controller. This combination has been called Original Behaviour. This sequence of decision variables has been obtained from the analysis of the behaviour followed by the workers of the real system on a normal day. Graphically, the sequence can be seen in Figure 5. The black segments represent the total demand and the black spots represent the manipulated demand (MCNCs). At each instant, the energy balance for each time interval is met with an excess of energy in some time interval produced by the wind turbine (this excess, as it cannot be stored, is discarded by saturating the wind turbine). The energy consumed by the MCNCs is approximately 15%, with respect to the consumption of the rest of the elements of the real system, which implies that the margin to touch demand is reduced. Furthermore, on that day, the power generated by CHP was zero, without taking into account the advantage of the price difference between the market and gas over time. Fig. 5. Energy consumption with the Original Behaviour on simulation day Through this sequence, 378 parts are produced. This will be DPT for the MPC (see Table 2). The MPC has been simulated for a full day. The gas and electricity prices for that day are shown in Figure 6. 0 5 10 15 20 25 Hours 150 200 250 300 350 400 450 500 PrCHP k on the next simulation day PrMP k on the next simulation day PrCHP k on simulation day PrMP k on simulation day Fig. 6. Gas and electricity prices for the day simulated and the next simulation day Figure 7 shows the behaviour of the system with the MPC. As can be seen, MPC causes parts production to accumulate at the beginning of the day since the energy cost is much lower (see Figure 6). It also takes advantage of the price difference between CHP and MP, introducing CHP when it is cheaper. In turn, batteries are used to store energy when it is cheaper and then used when the price of electricity (both CHP and MP) increases. This explains why the CHP charges the batteries at the end of the day, since the electricity and gas price in the early morning of the day following the simulated day is more expensive than in the late morning of the simulated day, as can be seen in the Figure 6. Fig. 7. Energy consumption with the MPC on simulation day The SOC of the batteries for that day can be seen in Figure 8. As can be shown, the MPC, while maintaining the minimum allowed SOC restriction to extend battery life, makes full use of the battery capacity. To compare the cost of the uncontrolled system and the MPC, the next-day optimisation has been performed on the actual data, obtaining the results in Table 7. Javier Gómez et al. / IFAC PapersOnLine 56-2 (2023) 8738–8743 8743 0 5 10 15 20 25 Time [h] 2 4 6 8 10 12 14 16 Wind speed (m/s) Forecast data Actual data Fig. 4. Example of forecast data creation makes the information at time kthe same as the actual data. 5. RESULTS To compare the improvements obtained with the controller, a combination of decision variables has been created that will produce the behaviour of the real system without the controller. This combination has been called Original Behaviour. This sequence of decision variables has been obtained from the analysis of the behaviour followed by the workers of the real system on a normal day. Graphically, the sequence can be seen in Figure 5. The black segments represent the total demand and the black spots represent the manipulated demand (MCNCs). At each instant, the energy balance for each time interval is met with an excess of energy in some time interval produced by the wind turbine (this excess, as it cannot be stored, is discarded by saturating the wind turbine). The energy consumed by the MCNCs is approximately 15%, with respect to the consumption of the rest of the elements of the real system, which implies that the margin to touch demand is reduced. Furthermore, on that day, the power generated by CHP was zero, without taking into account the advantage of the price difference between the market and gas over time. Fig. 5. Energy consumption with the Original Behaviour on simulation day Through this sequence, 378 parts are produced. This will be DPT for the MPC (see Table 2). The MPC has been simulated for a full day. The gas and electricity prices for that day are shown in Figure 6. 0 5 10 15 20 25 Hours 150 200 250 300 350 400 450 500 PrCHP k on the next simulation day PrMP k on the next simulation day PrCHP k on simulation day PrMP k on simulation day Fig. 6. Gas and electricity prices for the day simulated and the next simulation day Figure 7 shows the behaviour of the system with the MPC. As can be seen, MPC causes parts production to accumulate at the beginning of the day since the energy cost is much lower (see Figure 6). It also takes advantage of the price difference between CHP and MP, introducing CHP when it is cheaper. In turn, batteries are used to store energy when it is cheaper and then used when the price of electricity (both CHP and MP) increases. This explains why the CHP charges the batteries at the end of the day, since the electricity and gas price in the early morning of the day following the simulated day is more expensive than in the late morning of the simulated day, as can be seen in the Figure 6. Fig. 7. Energy consumption with the MPC on simulation day The SOC of the batteries for that day can be seen in Figure 8. As can be shown, the MPC, while maintaining the minimum allowed SOC restriction to extend battery life, makes full use of the battery capacity. To compare the cost of the uncontrolled system and the MPC, the next-day optimisation has been performed on the actual data, obtaining the results in Table 7. Fig. 8. SOC of batteries with the MPC on simulation day Table 7. Cost comparison Day Original Behaviour With MPC First 10,017e9,656e Second 11,157e10,061e Total cost 21,174e19,717e Total saving - 1,457e 6. CONCLUSION This paper presents an MPC-based controller to maximise the use of renewable energy, while decreasing the energy cost, for a real parts production system. The controller is designed to optimise the cost of parts production, taking into account the production costs of the parts, the energy costs, and the maintenance costs of the system elements. The controller has been validated with actual data from a parts production system, resulting in a cost saving of 1,457ein one day of production. Two works are in progress to improve the present work: (1) A model of all battery-related costs should be included in the objective function. (2) Inclusion of uncertainties within the controller to improve robustness. ACKNOWLEDGEMENTS The authors thank the European Union for funding this work under the DENiM project. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 958339. Also, by Grant PID2019-104149RB-I00 funded by MCIN/AEI/10.13039/501100011033 REFERENCES Baruwa, O.T. and Piera, M.A. (2014). Anytime heuristic search for scheduling flexible manufacturing systems: a timed colored petri net approach. International Journal of Advanced Manufacturing Technology, 75, 123–137. doi:10.1007/s00170-014-6065-3. Bordons, C., Garcia-Torres, F., and Ridao, M. (2020). Model Predictive Control of Microgrids. Advances in industrial control. Springer. URL https://books.go ogle.es/books?id=A7GezQEACAAJ. Camacho, E.F. and Bordons, C. (2007). Model Predictive control. Advanced Textbooks in Control and Signal Processing. Springer London, London. doi:10.1007/97 8-0-85729-398-5-1. Chicaiza, W.D., Ortiz-Machado, D., Gallego, A.J., Esca˜no, J.M., Bordons, C., de Andrade, G.A., and Normey- Rico, J.E. (2022). Neuro-fuzzy digital twin of a high temperature generator. IFAC-PapersOnLine, 55(9), 466–471. doi:https://doi.org/10.1016/j.ifacol.2022. 07.081. 11th IFAC Symposium on Control of Power and Energy Systems CPES 2022. Deep, K., Singh, K.P., Kansal, M., and Mohan, C. (2009). A real coded genetic algorithm for solving integer and mixed integer optimization problems. Applied Mathematics and Computation, 212(2), 505–518. doi:https:// doi.org/10.1016/j.amc.2009.02.044. Duarte, J.L.R., Fan, N., and Jin, T. (2020). Multiprocess production scheduling with variable renewable integration and demand response. European Journal of Operational Research, 281, 186–200. doi:10.1016/j.ejor .2019.08.017. Gen, M. and Lin, L. (2012). Multiobjective genetic algorithm for scheduling problems in manufacturing systems. Industrial Engineering and Management Systems, 11, 310–330. doi:10.7232/iems.2012.11.4.310. IEA (2022). World energy outlook 2022. Technical report, International Energy Agency, Rue de la F´ed´eration, Paris. URL https://www.iea.org/reports/worl d-energy-outlook-2022. Islam, M.M., Sun, Z., Qin, R., Hu, W., Xiong, H., and Xu, K. (2022). Flexible energy load identification in intelligent manufacturing for demand response using a neural network integrated particle swarm optimization. Proceedings of the Institution of Mechanical Engineers, Part C: Journal of Mechanical Engineering Science, 236, 1943–1959. doi:10.1177/0954406220933652. Islam, M.M., Zhong, X., Xiong, H., and Sun, Z. (2018). Optimal scheduling of manufacturing and onsite generation systems in over-generation mitigation oriented electricity demand response program. Computers and Industrial Engineering, 115, 381–388. doi:10.1016/j.cie. 2017.11.031. Michalewicz, Z. (1996). Genetic Algorithms + Data Structures = Evolution Programs. Springer Berlin Heidelberg, Berlin, Heidelberg. doi:https://doi.org/10.1007/978-3 -662-03315-9. Renna, P. and Materi, S. (2021). A literature review of energy efficiency and sustainability in manufacturing systems. Applied Sciences, 11, 7366. doi:10.3390/ap p11167366. Rodr´ıguez-Garc´ıa, J., ´alvarez Bel, C., Carbonell-Carretero, J.F., Alc´azar-Ortega, M., and nalvo L´opez, E.P. (2016). A novel tool for the evaluation and assessment of demand response activities in the industrial sector. Energy, 113, 1136–1146. doi:10.1016/j.energy.2016.07.146. Roshany-Yamchi, S., Witheepanich, K., Esca˜no, J.M., McGibney, A., and Rea, S. (2017). Selective distributed model predictive control for comfort satisfaction in multi-zone buildings. In 2017 21st International Conference on System Theory, Control and Computing (ICSTCC), 648–653. doi:10.1109/ICSTCC.2017.8107109. Yun, L., Li, L., and Ma, S. (2022). Demand response for manufacturing systems considering the implications of fast-charging battery powered material handling equipment. Applied Energy, 310, 118550. doi:10.1016/j.apen ergy.2022.118550.