## 1 Introduction  
In the mining industry, technological advancements are being successfully applied to enhance the productivity and the performance using the industry 4.0 concept [1]. However, energy management and efficiency have not kept pace with these changes, which is a key element to directly optimize the energy consumption and increase profitability. The objective of this work is to design a new architecture for a smart energy management system according to ISO 50001 standard [2] for mining industry [3]. The application was oriented to an experimental open-pit mine respecting all requirements and needs. After studying these requirements, we proposed a prototype which simulates the control and data acquisition system of the open-pit architecture. The use of the plan-do-check-act methodology proposed by the ISO 50001 standard shows the integrity of the applied architecture with the requirements [3].  
In the design phase of this application and before implementation, a full study on the control system was done, showing lack of infrastructure. The open-pit mine was designed in the first place for production regardless of energy consumption or grid quality predictive maintenance. So, to overcome this challenge, new hardware was installed in parallel with the existent infrastructure, including smart meters, programmable logic controllers and servers [4]. The developed communication and data recording program was tested and validated through the prototype before implementing it in the open-pit mine. After acquiring data, a predictive model was proposed using the fast forest quantile regression to forecast the energy consumption. The visualization of real time [5] and predicted values was developed in the same SCADA system using the Citect Scada software and for web access using things board solution which still under design for security reasons [6; 7].  
One of the biggest challenges in applying the energy 4.0 transition in the open-pit mine was infrastructure. A large investment in hardware was required to monitor all types of loads in the three stations. Another issue was cybersecurity because the recorded data in the server must have access to production KPIs linked to the intranet, which has strict security standards.  
The study presents a full design and architecture for applying a smart energy management system in mining industry regardless the situation and the technology of the control system adapted because the use of OPC data transmission this system can be implemented in different types of open pit mines [3].  
The goal behind this work is offering a novel energy management system infrastructure for a typical open-pit mine, where the system can record, monitor different energy and electrical grid quality data, and give insights on the grid's real-time state of health. The system proposes a load forecasting algorithm to predict the energy demand response in the open-pit mine. This proposed and tested architecture will enable the different smart microgrid features such as optimization and load scheduling techniques, power shedding, decentralized energy production through renewable sources and energy storage systems, and making the energy audit procedures easy using report generation function.