Cyber-Physical System Demonstration of an Automated Shuttle-Conveyor-Belt Operation for Inventory Control of Multiple Stockpiles: A Proof of Concept

Smart manufacturing in the so-called Industry 4.0 age pushes the research and development of laboratory-scale proof of concepts before its deployment in pilots and real-size equipment. As such, we present a cyber-physical system (CPS) demonstration in the mining industry field engineered to autonomously manage the handling of solids flowing in a conveyor-belt that drops materials in containers, forming multiple stockpiles per belt. The CPS operates to control multiple stockpiles’ inventories using mixed-integer optimization that minimizes the square deviation of the measured inventory to their targets (heights). Within the sensing-optimizing-actuating (SOA) cycle, the CPS demonstration is performed as follows. First, the sensing (data measurement, data processing, and system evaluation) uses a deep neural network in real-time to assess the level of materials stored in transparent containers. Second, the optimizing (mathematical programming, optimization techniques, and decision-making capabilities) is performed using a flowsheet network formulation called unit-operation-port-state superstructure (UOPSS) that permits a fast solution for the position-idle-time-varying discrete manipulated variables as operational schedules. Third, the actuating (cyber-physical integration) implements a physical actuation solution through an integrated CPS environment. According to the findings of our experimentation, stockpiling process control in a smart manufacturing context has enormous potentials to control multiple stockpiles’ inventory autonomously.


I. INTRODUCTION
The rapid growth of the Industry 4.0 (I4) segments classified here as information and communication technologies (ICT), modeling and solving algorithms (MSA), highperforming computing (HPC), and mechatronics (MEC) has introduced enhanced decision-making tools, unprecedented computational power, management of a broader set of information, higher operational efficiency, increased capacity of visualization, control, monitoring, among others [1], [2], [3]. Among these, recent technological advances in (a) image The associate editor coordinating the review of this manuscript and approving it for publication was Ton Duc Do . processing with deep learning algorithms and (b) decisionmaking capabilities with novel flowsheet framework, provide the resources required for handling complex problems in a wide variety of applications such as in online scheduling strategies [4], in which systematic and autonomous systems have been increasingly employed for industrial processes, permitting the integration of design and control environments [5].
Such unprecedented technological and scientific developments in engineering have been driven by the increasing industrial needs to achieve higher efficiency, desired resilience, reduced costs, and better solutions [6]. These sine qua non qualities are closely associated with digital transformation technologies, in which applications of artificial intelligence (AI), big data, and the Internet of Things (IoT) play a fundamental role in providing proper capabilities for addressing large-scale and complex-scope applications that attend to the industrial requirements [7]. In such a dynamic I4 environment, within a never before seen technological improvement pace towards its fastest stage, data-driven approaches using real-time IoT sensors and AI algorithms have been increasingly employed for achieving smart production manufacturing [8], [9].
In this context, novel and improved methodologies and tools paved the way for enhanced processes with more efficient, flexible, resilient, sustainable, and safer operations. These are widely applied for smart (or advanced) manufacturing and automation, in which computer-aided resources assist in handling highly complex systems [10]. In fact, smart manufacturing is still an emerging research stream in I4 that represents enterprise-wide applications of advanced technologies, systems, and tools towards the integration of a multi-scope environment to plan, design, operate, control, and manage manufacturing facilities [11]. It relies on achieving more efficient systems in terms of design, operations, economics, robustness, integration, regulatory control, safety, and environmental protection, among others [12].
An important application and usefulness of smart manufacturing are the cyber-physical systems. They combine mathematical concepts, computer-aided tools, and online measurements from physical systems to construct its digital twin, delivering real-time decision-making capabilities to improve the overall efficiency of industrial systems [13]. Considering the recent advances in manufacturing processes, we address the use of smart decision-making in cyberphysical systems and present one application in the mining industry. The importance of integrating smart decisionmaking and I4 technologies in the mining value chain have been increasingly discussed in recent works [14], [15], [16], [17], and [18]. Moreover, a mathematical formulation used as a model predictive control for a continuous cycle of sensing, calculating, and actuating has been proposed for applications in the mining industry, whereby addressing the connections among MSA, ICT, HPC and MEC pillars of the I4 [1]. Such continuous and autonomous cycle aims to provide smart methodologies aided by diverse technologies, including real-time measurements (sensing), online data processing and decision-making (optimizing), and cyber-physical integration for real-time decision-making implementation (actuating).
This work aims to highlight the importance of the interplay between smart decision-making and cyber-physical manufacturing systems and identifies opportunities for employing smart decision-making capabilities to better control and manage the conveying-stockpiling operations in the mining of minerals. The ICT, HPC, MSA, and MEC technologies assist the construction of such capabilities that manage the operations by a sensing, optimizing, and actuating cycle in an autonomous, innovative, and efficient fashion. A cyberphysical system (CPS) is proposed to systematically manage the transportation of solid materials in a conveyor-belt to be segregated into distinct stockpiles. The allocation of solids is controlled by a sensing-optimizing-actuating (SOA) capability comprised of three main stages. First, the CPS apparatus collects information on the actual state of the system, which is processed and evaluated by a machine learning algorithm. Second, modeling and optimization decision-making determines the optimal scheduling of operations to be implemented in the process. Finally, the scheduling solution is transformed into a sequence of automatic steps and integrated to the physical system. The contributions of this work rely on introducing a decisionmaking approach that addresses a combination of smart manufacturing and I4 technologies to provide systematic and efficient management of cyber-physical systems. The proposed integrated cyber-physical system environment cycle is comprised of: 1) Sensing (data measurement, data processing, system evaluation), by applying a deep neural network real time to assess the level of materials in glass containers. 2) Optimizing (mathematical programming, optimization techniques, decision-making capabilities), by developing a predictive scheduling operation as a hybrid model predictive control (HMPC), whereby the pair position and idle-time represents the binary decisions to be determined over the control of the stockpiles' inventories (continuous variables).

3) Actuating (cyber-physical integration and solution
implementation from the optimizing) in a systematic fashion by converting, executing, and deploying the scheduling operations commands in the physical system. Such a methodology is developed and employed for a mining industry application, but the concepts can be widely extended for other industrial processes and applications (e.g., cement plants, metal industries, thermal power plants, incineration plants, mills, food industry, petrochemicals, and chemicals, among others). The current practice from mines to mills for grinding the crushed-ore of minerals can briefly be described as maximizing the throughput of the output FIGURE 2. a) Laboratory setup (1) camera, (2) Robotic arm with rail and conveyor belt system, and (3) beaker, and solid raw material. b) Industrial case conveying and stockpiling process in mining industry [19].
process of drilling and blasting. The goal is to maintain crushed-ore moving in conveyor-belt systems as an input (source) to be fed into stockpiles inlets for the following process in grinding or milling (sink), as seen in Fig 1. In the system, each stockpile dynamically feeds an apron feeder (another conveyor-belt) located in a tunnel underneath the stockpile, where multiple of these are combined to a belt feeder to charge a grinding mill which ultimately produces concentrates of minerals.
From this dynamic flow process of raw material (crushed ore) to grinding mills, there is a manual process controlled by a human operator who feeds the stockpiles by a rotating conveyor belt truck. The current practice of the feeding process is to form one stockpile at a time and maintaining a setpoint of the stockpile's height level decided by an expert operator's observation. From this dynamic flow process of raw material (crushed ore) to grinding mills, there is a manual process controlled by a human operator who feeds the stockpiles by a rotating conveyor belt truck. The current practice of the feeding process is to form one stockpile at a time and maintaining a setpoint of the stockpile's height level decided by an expert operator's observation. On the other hand, the autonomous control of the heights of the multiple stockpiles by the CPS apparatus, as proposed in this proofof-concept demonstration, represents a better operation that minimizes or avoids the so-called bridging. This is when the solid materials start to be compacted, when they are outside of the targeted heights of the pyramidal forms of the piles, reducing or even impeding the flow-out to another conveyorbelt system beneath the stockpiles for further processing as in the grinding mills and flotation units. It is important to mention that different mines have different setups; this research shows a standard design capability through conceptualization of automating the conveying-stockpiling process. Fig. 2 shows the laboratory-scale prototype Fig. 2a to mimic the industrial case Fig. 2b found in the mining industry, although the case Fig. 2a prototypes the height control of multiple stockpiles per belt, as proposed by the utilization of such CPS apparatus, instead of a single one as in Fig. 2b, the current practice in this manufacturing field.
The mining industry represents one of the biggest shares among commodity-producing industries such as oil and gas, agriculture, and petrochemicals. Throughout the paper, explanations on the comparison between the industrial case and the small-scale proof of concept or demonstration are highlighted along with the connections of the I4 deployment within the bases of the sensing-optimizing-actuating (SOA) cycle in real-time as demanded in an achievable CPS environment.
The paper is structured as follows. Related work in smart decision-making for cyber-physical systems and the SOA cycle is introduced in Section II. A cyber-physical laboratoryscale example that illustrates the proposed methodology and application is presented in Section III. Demonstrated case studies with experimental results are explored in Section IV. The final remarks on the motivation and applicability of the proposed control mechanism for industrial processes are given in Section V. Future guidelines for the continuation of this research are highlighted in Section VI.

II. RELATED WORK IN SMART DECISION-MAKING FOR CYBER-PHYSICAL SYSTEMS
Mining operations are complex processes that require a unique plan to transform minerals into a saleable product. While the unique nature of the plan will dictate that a unique set of processes, smart decision-making is followed throughout the mine value chain. Managing such processes to assure accurate and timely delivery of resources that fit the agreed-upon specifications is a real challenge that must be fulfilled in order to satisfy end consumers. Currently, advanced real-time predictive control applications with the support of I4 advancements have allowed redefined business models, as many businesses today are progressively using IoT and autonomous robots. At the edge of the minute scheduling and control cycles, a CPS for positioning of shuttle-conveyor-belt tripper car apparatuses has been considered in this work as a model predictive control (MPC) since this is an effective technique for multiple constraintbased control of complex dynamic systems. There are several continuous-time techniques for MPC available; however, most implementations are formulated in discrete-time. In addition, the literature includes various MPC techniques that have been classified as hybrid [20], [21], [22], which may be attributed to characteristics of the system's configuration, its dynamics, or the controlling algorithm itself. Control systems or algorithms using both continuous-and discretevalue state variables are referred to be hybrid in the context of model predictive control. Therefore, processes that exhibit both continuous and discrete mechanisms are represented by a hybrid dynamical system, whereby the system variables are classified as either continuous or discrete, and their connectivity may be determined by logical principles [23]. Various modeling techniques can be employed to characterize hybrid systems. The piecewise affine (PWA) systems, that could approximate non-linear dynamics by linear models at various operating steps, are the group of systems that have received the most attention in the literature. The mixed logical dynamical (MLD) systems are another group of hybrid systems often employed in HMPC strategy development. In such systems, physical laws (mass, acceleration, motion), logical rules (identity, contradiction, middle exclusion, sufficient reason), and operational constraints are all linked in a linear representation [24]. The MLD systems help to model a variety of discrete variables and constraintbased systems. This characteristic has contributed to the system's widespread adoption in the development of HMPC strategies.
Except by Kelly and Menezes [25], previous works on the control of conveyor-belts has not addressed the run-length or idle-time of the shuttle-conveyor tripper car positions as proposed in this work. Nevertheless, the authors formulated the control strategy as a linear deviation from the target (instead of a square deviation as we propose) and without the integration to the sensing and actuating layers as proposed in this CPS demonstration. Furthermore, former works detail the operation of conveyor-belts related to modeling the transitory deposits of solid materials, energy expenditures and speed of the belts, considering a single stockpile formation at the end of the belt, whereby optimal regulatory control of operational efficiency of conveyor-belt systems is described in Zhang and Xia [26]. The authors extended their work to include energy balances considering modeling and energy efficiency optimization of belt conveyors [27]. Other authors developed formulations to calculate the varying amounts of the materials transported by the conveyor-belts [28], [29], [30], while Gao et al. [31] introduced a contactless measuring speed system of belt conveyor based on machine vision and machine learning approaches. Improvements in the modeling and operations of the conveyor belt systems allow more complex control strategies by varying more than the run-length or idle-time of the shuttleconveyor tripper car positions, although in the approach we introduce here, the changes in the velocity of the conveyorbelts and the amounts of the solid materials are neglected in the proof-of-concept demonstration. Therefore, within the whole time-horizon of the hybrid model predictive control (HMPC), the speed of the conveyor belt systems and the solid material amounts per area of the belts are constants.
Industrial real-world applications typically involve large and complex problems that require efficient technological solution approaches to be implemented in a systematic and timely manner. In such applications, real-time decisionmaking with constantly updating of online information is challenging given the complexity and size of industrial processes. Integration of computer-aided tools with the processing plant is often missing or incomplete, especially due to synchronization issues in highly dynamic environments [32]. However, recent technological advances in I4 have provided proper capabilities for the development of smart decisionmaking (fast, optimal, complex, large, mixed-integer domain, etc.) for cyber-physical systems, which is needed to enhance the current approaches, methodologies, and tools employed in the industry.
Smart decision-making relies on the integration of advanced manufacturing capabilities with ICT, HPC, MSA, and MEC technologies, including a real-time collection of data, image and data processing, data-driven strategies, modeling and optimization tools, cyber-physical interconnection, wireless integration, cloud computing, system monitoring, robotic automation, among others [10], [33], [34], [35]. This requires integrated capabilities to continuously and efficiently manage the entire process network. Such a robust cyber-physical system comprises a combination of diverse I4 and smart manufacturing technologies, including a computer platform within an integrated cyber-physical system, sensors for measurement, control, and monitoring, communication tools, artificial intelligence, data science, and smart decisionmaking.
Similar to the commonly used plan-do-check-act (PDCA) approach, which employs a systematic monthly cycle for continuous improvements by measuring deviations between the planned (or targeted) and the actual realization of the plans, we propose a cycle of sensing, optimizing, and actuating (SOA) as part of a smart decision-making procedure to be applied to cyber-physical systems within a near-online fashion, within seconds to minutes. The sensing stage relies on measurements to gather and process data, the optimizing stage uses mathematical programming and deterministic optimization as a solution approach, and the actuating stage performs cyber-physical integration whereby implementing the cyber solution (from the optimization) into the physical system. Fig.3 illustrates the SOA cycle with its key features of each stage.
Sensing, optimizing, and actuating technologies have been widely employed for smart decision-making of cyberphysical manufacturing systems, whereby many works address the use of data-driven technologies [36]; IoT solutions with real-time data collection through sensors [37], [38], [39]; modeling, simulation, optimization, machine learning, and AI solutions [34], [40], [41]; and actuation devices [42], [43]. In the following, the SOA components are discussed and their importance towards a smart CPS is highlighted.

A. PROCESS MONITORING VIA SENSING
Sensing in cyber-physical smart manufacturing systems has been addressed in many works and has been increasingly important for enhanced industrial decision-making [44]. Proper integration among sensing tools and the remaining parts of the system is fundamental, which has moved towards the increasing use of IoT and wireless technologies for faster interconnections.
The I4 operation and control strategies described in this work use measurements of the material contained inside transparent vessel containers to calculate the inventory levels or material contents of these containers. Some literature exists in the area of chemical laboratories and industrial mixing [45], [46], [47], in which a wide variety of techniques exist for detecting containers and estimating their contents. For example, capacitors or laser beams that detect the difference in dielectric or reflectance between liquid and air are used in several industrial approaches [48], [49]. Most recently, machine vision has gained prominence for addressing this issue. As a rule, a computer vision-based method determines the amount of material in each container. Only a camera is needed for this technique, which uses the contrast between edges and lines to determine the density of materials [50], [51], [52], [53], [54], [55], [56], [57]. More statistically sophisticated methods include horizontally scanning images to find the parabolic curve that most closely matches the shape of the liquid's surface [58].
More recently, state-of-art deep learning-based detectors like fast region-based convolutional neural network (R-CNN) have been trained to detect vessels. Fig 4 depicts the structure of a fast R-CNN consisting of deep convolution networks (ConvNets) and Region of Interest (RoI) projec-tions, followed by RoI pooling layers and fully connected layers. The network produces two outputs: a bounding box (bbox) regressor, which identifies the region, and a softmax layer, which identifies the object. Following fast R-CNN, this work proposes the use of faster R-CNN that achieves higher throughput in identifying vessels in images [59].
The task of identifying objects has been simplified by different pre-trained networks specialized in the task of object detection [60]. However, calculating the level of material still poses a challenge. The methods mentioned previously work properly when the uppermost level of the material aligns with a straight line. Eppel [61] proposed a solution using graph cut algorithms to identify the level of materials inside a transparent beaker. This is the solution used in this work. In contrast, in the mining field, for example, a highend industrial radar sensing system that uses ultra-sound supported by the I4 foundation can be installed to capture the real-time measurement of the stockpiles' initial inventories in real-time.

B. DECISION-MAKING VIA MATHEMATICAL MODELING
The second stage of the cyber-physical system relies on the computer-aided decision-making capability (e.g., simulation, optimization) that acts in the cyber dimension. In this work, we highlight the need for proper decisionmaking coherent with state-of-the-art technologies, whereby selecting advanced optimization tools is the main source of automatic decision-making. In fact, it is worth emphasizing the importance of optimization-based strategies rather than their manual or simulation counterparts. Simulation approaches have historically been used in the industry and represent a powerful tool for manufacturing processes, whereby most small and medium size enterprises still heavily rely on such methods for gathering data [62]. However, automated manufacturing and decision-making capabilities are fundamental for adequately developing and deploying of cyber-physical systems [63]. Even under integrated, autonomous, and optimized environments, major challenges still exist, mostly related to the flexibility, adaptability, and integrability of their interaction [64]. According to Ahueet-Garza and Kurfess [13], the capabilities needed for integrating information from computer-aided models with I4 technologies that are fundamental for a system-wide control still require further improvements, whereby research on such topics is anticipated to have a significant impact on the development of cyber-physical systems.

C. CYBER-PHYSICAL INTEGRATION VIA COLLABORATIVE ROBOTICS
Actuating concerns the physical dimension, which is often assisted by actuators (e.g., machines, robots, etc.). Important features include good calibration, autonomous operations, and proper cyber-physical integration, which is particularly critical for the efficiency of the network [65], [66]. This cyber-physical system is comprised of mechatronic components controlled by sensing-actuating technologies that are integrated to provide autonomous operations to be performed within machine-to-machine (M2M) communication capabilities with minimum or no human intervention required [67], [68]. They heavily rely on computer-aided tools and embedded networks to smartly control the physical system and require continuous and effective communication between the cyber and physical dimensions [69], [70]. Thus, the entire system network with the multiple technologies employed should be developed in an autonomous, systematic, robust, responsive, and efficient mode based on a smart decisionmaking framework and artificial intelligence algorithms.

III. MATERIALS AND METHODS
Smart manufacturing with integrated decision-making provides proper research and development capabilities for further development, testing, and implementation of small and large applications. We initially present a laboratoryscale experiment in which smart decision-making employs the SOA framework in a CPS that coordinates the segregation of solid materials in mining operations. After, we discuss the applicability of such methodology in industrial mining operations and highlight important aspects to be taken into consideration.
The proposed CPS is employed to systematically and autonomously manage the transportation of solid materials to be segregated into multiple stockpiles per a single belt. An advanced control system simultaneously manages the multiple stockpile levels using an integrated environment with sensing, optimizing, and actuating stages. There is continuous feeding of solid materials (with chickpeas representing crushed ores) directly to a conveyor-belt (with a robotic arm representing tripper cars). There are assumed targets for the heights of each stockpile at each instant of time, and the SOA capability controls the allocation of solids, whereby modeling and optimization decisionmaking determines the scheduling of operations to be implemented. The scheduling solution manages the positioning FIGURE 5. Process network with semi-continuous feeding and segregation of solids, from Kelly and Menezes [25]. and movement of the robotic apparatus (which enforces the segregation of solids into the designated stockpiles) to control the stockpile levels by minimizing the deviation of the actual inventories to the optimal targets. Fig. 5 illustrates the schematics of the network in the real industrial case addressed by Kelly and Menezes [25], in which the solid material is semi-continuously fed to the stockpiles (considering the intermittent changes in the position and idle-time of the conveyor-belt the tripper car) and dropped to any of the three stockpiles by the tripper car (represented in the demonstration by the robotic arm) maneuvering.
The smart decision-making for the proposed CPS, comprised of the three main stages, namely, sensing, optimizing, and actuating, allows an autonomous and systematic operation without requiring human intervention. Fig. 6 presents the smart decision-making framework that manages the CPS integration of the application addressed in this work.
The CPS is managed through a cycle of SOA stages configured to autonomously handle the system, whereby there is a cyber-physical interconnection with the transfer and receive of information. The sensing stage is comprised of a sensing routine with an embedded machine learning algorithm for image processing (as shown in Fig. 4), which operates independently of the optimizing and actuating stages. The optimizing routine builds a mathematical formulation considering the incumbent state of the system (using the information continuously received from the sensing) and  employs an optimization algorithm for a model predictive control to identify the optimal scheduling of robotic arm position and idle-time operations. The actuating routine converts the scheduling into physical robotic instructions to be implemented in the system. The optimizing-actuating routines are sequentially and iteratively performed, as shown in Fig. 6. In the following, a detailed description of each stage with their interconnections is explored.

A. SENSING (DATA MEASUREMENT)
The sensing method involves harnessing computer vision and deep learning to ascertain the amount of deposit in different vessels. Continuous feed of images is received from a camera and the frames are captured and processed by pre-trained deep neural networks to identify the different vessels in the frame. Consequently, the amount of material present in the vessels is measured and the information is propagated to the optimizer. Fig. 7 shows the sensing procedure to be continuously running.
Until recently, computer vision algorithms have been based on techniques like edge and color detection to identify objects and materials [71], [72]. With the advent of convolution neural networks (CNN), the field of computer vision has been revolutionized to introduce a plethora of applications like medical imaging, autonomous surveillance and self-driving cars [73], [74], [75]. Given a large enough training dataset, the CNNs can achieve human-level accuracy in recognizing objects and scenes even in challenging conditions [74], [76]. However, in cases of new applications where labelled data is not present, the technique of using a pre-trained neural network is leveraged. In such situations, a model trained on a separate set of data is re-used in the current application to perform tasks like object detection and segmentation. A well-trained and generalized model can be quite effective in solving new problems where the data has some similarity with the data on which the models were pre-trained [77], [78]. The same approach is used in this experiment, where the requirement is to identify the level of material inside containers. As there is no pre-labelled dataset specific to this experiment, we identify models that have been trained on a wide array of images of vessels with different types of contents. These models generalize well and can detect different types of fluids and solids inside containers.
Eppel et al. [47] have trained a network on a dataset called Vector-LabPics, containing 2187 images of chemical experiments with materials in transparent vessels. The images were taken in laboratory settings under normal everyday conditions like beverage handling. The weights of the model trained on these images have been shared by the authors for use in research. Their work is adopted in this proof-ofconcept demonstration. The model can detect the following features from an image of a transparent container. • Cork -The lid or cork of the container. Fig. 8 shows the detection of various parts in the image. Fig. 8a is the image of a glass vessel containing salt. Fig. 8b highlights the entire container, Fig. 8c highlights the level of material present within the vessel while Fig. 8d shows the cork of the vessel. Fig. 9 shows the same experiment in our laboratory settings. The model can identify multiple vessels and each stockpile's heights. This is useful in our experiment where we have more than one vessel and the heights must be sent in real-time to the optimizer to decide the movement of the robotic arm. The stockpile is masked with a pink color and this information is later used to calculate its height by finding the highest and lowest pixel position of the mask in the image for each vessel as expressed in below equations. The difference between these two gives an estimate of content level in pixel size (2). The same can be multiplied with the pixel ratio (1) to obtain the actual height of the stockpile (3). The purpose of the optimization stage is to find an optimal scheduling that improves the multiple stockpile level control by automatically adjusting the idle time of the robotic arm apparatus that moves over each stockpile position. Hence, the robotic arm would perform a sequence of instructions (optimized in the scheduling problem) to segregate uniformly the solid materials in each container so that to minimize the deviation of the material heights in each container from given control targets of the multiple stockpiles. Upon capturing the current heights of each stockpile (measured values), mathematical programming is employed to determine the optimal scheduling of the shuttle-conveyorbelt operations to be implemented in the system. For that, the optimization problem is formulated as a mixedinteger quadratic programming (MIQP) to minimize the square deviation of the stockpiles' heights. This program is considered as a real-time hybrid model predictive control (HMPC) with both discrete and continuous variables within a moving prediction time-horizon. This advanced control strategy is an efficient process control engine to predict future events and employ control actions in an anticipatory manner.
The schematic figure shown in Fig. 5 from Kelly and Menezes [25], which is similar to the network of three containers as in the CPS of this work, is represented mathematically by building a formulation that is coherent with the real problem. This includes: • Developing the process network; • Determining the parameters, variables, constraints, and objective function needed to model the problem; • Employing optimization techniques to determine the optimal solution that yields the scheduling of operations to be implemented in the CPS (i.e., allocation of solids to the stockpiles).
The network of the proof-of-concept demonstration in Fig. 10 is based on the unit-operation-port-state superstructure (UOPSS) formulation [79], which includes: unitoperations m for sources and sinks (♦) that represent the semicontinuous feeding system (MINE) and the feeders (F1 to F3), continuous-processes ( ) that represent the transfer of solids through the shuttle-conveyor (SC) from the feeding system to the stockpiles (ST 1 to ST 3), represented by the ( ) shapes. There is a single physical shuttle-conveyor associated with three stockpiles, which is mathematically represented using four distinct operational modes (A, B_GO, B_BACK , C). The arrows (→) connect out-port-states j ( ) to in-portstates i ( ). There are binary y and continuous variables x associated with the unit-operations and their connections, the unit-operations-port-states (upstream) to unit-operationsport-states (downstream). As to be seen in the following formulation, there is a need to declare the mode of operation of the shuttle-conveyor position B as B_GO and B_BACK to allow the inclusion of the grouping constraints that forces the stopping in the position B when it goes forward and comes backward.
When using the UOPSS formulation from Kelly [79], Brunaud et al. [80] demonstrated that large-scale discrete optimization problems for flowsheet network are solved within a minute. Compared to the traditional state-task network (STN) [81], [82] and resource-task network (RTN) [83] formulations for flowsheet network solutions, the instances are reduced around four-to ten-fold in the optimization processing time or CPU in the UOPSS formulation.
The UOPSS flowsheet network is formed by three sets, they are: units-operations (UO), units-operations' in-and out-port-states (UOPS), and their connections (UOPSUOPS). These structures are formulated in more complex constraints than those in STN or RTN since it includes semi-continuous constraints (a) to itself (for throughput of unit-operations and flows of connections) and (b) to neighboring flows of the connections to the throughputs of unit-operation setups they are connected. By comparing the STN, RTN and UOPSS formulations, the fastest solution of the large-scale model, for the same settings in the solving algorithms, is solved in UOPSS close to a minute and within a quarter of hour in STN and RTN [80].
The UOPSS flowsheet network is used in this work in the optimizing layer of the CPS. The mathematical formulation is built as a mixed-integer quadratic programming (MIQP) problem P that includes continuous variables x ∈ R and binary variables y ∈ [0, 1]. The sets M MN , M SC , M ST , and M FD , respectively, represent the unit-operations m for the mine, shuttle-conveyor, stockpile, and feeder. There are semi-continuous constraints for the flows of the connections (arrows) x j,i,t and for the flows of the process-units x m,t (or more specifically their throughput). The objective function (4) of the problem (P) minimizes (or maximizes the negative of) the absolute deviation of the stockpile inventories xh m,t considering coefficients for the 2-norm (or square deviation) w D and excursion or penalties w E .
The optimal solution from the optimizing routine generates the scheduling of operations to be further implemented in the physical system. This includes the binary decisions on how to allocate the solid materials to multiple stockpiles (i.e., which stockpile should be selected to receive material at each time-step) and their respective amounts (i.e., how much solid materials will be allocated to a given stockpile at a given timestep). Once the optimal solution is determined, the scheduling of operations is sent to the actuating routine as a set of binary and continuous variables that will be read and properly interpreted/converted into commands to be executed.
The constraints of the MIQP problem are formulated as follows. Equation (5) (7) and (8) for flows of process-units x m,t and arrows x j,i,t , respectively, although without excursion variables. The out-port-states j from an upstream unit are connected to the in-port-states i downstream, forming the JI set of the out-port-states to in-port-states ji pairs.
x L j,i,t y j,i,t ≤ x j,i,t ≤ x U j,i,t y j,i,t ∀(j, i) ∈ JI , t (8) As opposed to semi-continuous constraints it itself (for the throughputs of unit-operations and flows of connections) in equations (6)  Equations (9) and (10) represent limits of the sum of material flows leaving from the out-port-states j of the sources (the feed from the mining MN ) and equations (11) and (12) the sum of the material flows arriving in the in-port-states i of the shuttle-conveyor (SC) positions (or operations) defined in the belts. Their summation is constrained by the bounds of the unit-operation m (positions A, B_GO, B_BACK , and C of the shuttle-conveyor) connected to them (in the set j ∈ J MN connections). Equations (13) and (14) represent the material flows between the SC unit-operations that form the stockpiles ST connected to them and equations (15) and (16) the material flows between the ST unit-operations and the feeders FD connected to them.
i∈I SC x j,i∈I ST x j,i∈I ST Relating continuous variables of the flows of the inlets and outlets in the unit-operations, equations (17) and (18) manages the process transformations in the SC unit-operations with the material flows of the inlet and outlet as the same of the source from the mining MN and the accumulated (every time-step t) in the stockpiles ST . Equation (19) equalizes the outlet of the stockpiles with the demands in the feeders FD.
Equation (20) is a material balance for calculating the inventory xh m,t of tank unit-operations (m ∈ M ST ), which considers initial inventories xh m,t−1 and inlet/outlet streams of tanks. The initial inventories (xh m=ST ,t=0 ) are measured every control cycle when these amounts are updated in a new re-optimization problem as opening inventory. The initial position of the SC operation (y m=SC,t=0 ) is taken from the previous solution cycle for the initialization of the next optimizing layer run.
Equation (21) imposes that at most one unit-operation m (m ∈ M SC ) (as y m,t for procedures, modes, or tasks) is allowed for a given physical unit m at each time step t. m∈M SC y m,t ≤ 1 ∀t (21) Equation (22) represents the zero-downtime constraint to determine that at least one unit-operation m (m ∈ M SC ), in each time-step over the entire time-horizon, is active (binary variable is true).
Equation (23) consists of a logic valid cut that reduces the branch-and-bound (BB) search by removing nodes to be tested every BB iteration. In the constraint, if the binary variable of a stream connecting a unit-operation y m,t to its upstream unit-operation y m up ,t is true (y j up ,i,t = 1), then the unit-operations must be active.
Equations (24) to (26) manage the sequence of operations of unit-operations m ∈ M SC , in which the binary variable y m,t controls the dependent start-up, shut-down, and switch-overto-itself variables (zsu m,t , zsd m,t , and zsw m,t , respectively), which are relaxed as continuous variables in the interval [0, 1] [84].
zsu m,t + zsd m,t + zsw m,t ≤ 1 ∀m, M SC , t (26) Equations (27) to (29) model the run-length or up-time (time of operation once starts up to operate) considering UPT L and UPT U as the lower and upper bounds, t end as the end of the time horizon, t as the time-step and n p as the total number of periods [84], [85]. (29) To complete the logistics of the shuttle conveyor, besides (a) the management of the sequence of their modes of operations given by equations (24) to (26) and (b) the uptime or active time within the operational mode (in this case, the idle-time in each position) governed by equations (27) to (29), the sweeping policy of the back and forth movements of the shuttle conveyor is formulated. By fixing the sequence (neighbor to neighbor) of the SC modes of operation, the grouping constraints (30) to (33) coordinate the grouping setup variable yg u,g,t for yg ∈ [0, 1] to update the shuttle-conveyor operation-group to operation-group (G SC ) sequence-dependent phasing (or fixed transition between neighbor modes of the SC, e.g.,

C. ACTUATING (AUTONOMOUS AUXILIARY MECHATRONICS)
The optimized scheduling process is translated into a series of automatic tasks to be executed by a robotic arm apparatus, which controls the actuators' back-andforth (sweeping) motions to separate the solids into the stockpiles. The movement from one stockpile to the next in a predetermined sequence from neighbor to neighbor creates multiple stockpiles rather than one per belt. This smart sweeping motion is based on the implementation of process automation in smart manufacturing foundations to be applied with the control cycle of sensing, optimizing (via mathematical programming), and actuating in narrower time steps (in seconds) instead of couple of minutes (as in the real world case) to be re-implemented in the cycle. The feeding flow to the system, i.e., how much solid material is being continually supplied per time unit, is compacted for the experimental laboratory scale. However, such control might be easily implemented in industrial processes, offering the optimization capabilities a greater flexibility level in conjunction with enhanced scheduling algorithms. As discussed earlier, the suggested architecture consists of three layers: a camera-based sensing layer, a mathematical optimization-based layer, and a robotic apparatus-based actuation layer. In order to simulate closed-loop scheduling with a shifting horizon, the optimized plan should be translated into an actuating routine, which is the structure of the implementation or execution. It should be made clear that the goal of the moving horizon simulation framework is to emulate the physical development of such systems in the actual world, whereby a single scheduling problem is handled at each time-step by integrating input through updated opening inventory and position variables or states captured by the sensing routine.
For real-world applications, the measurement updates, which is followed by a scheduling optimization within a fixed time clock delay, is carried out incessantly. That is to say, the closed-loop emulation of future time-steps replicates the ongoing scheduling operations throughout a range of time-steps as they would occur in a real system. The mathematical model solutions that show the system's current state is put into action by the actuation routine. This presents an updated scheduling solution (y m=SC,t>0 ) that will be executed by translating scheduling operations into commands and executing them in the physical system. For that, in the proof-of-concept demonstration in this work, the commercial actuating platform Dobot Studio 1.9.4 shown in Fig.11 from Dobot Company is employed to execute the scheduling solution. Fig. 12 shows the concatenated stages and the proposed CPS framework. The structure is comprised of three blocks that accommodate all functionalities required for the integration of the processes.

IV. IMPLEMENTATION OF THE PROTOTYPE SYSTEM
1) The vision block represents image acquisition of the ingredients inside the three containers in real-time facilitated by OpenCV, a machine learning (ML) tool that provides a real-time optimized computer vision library. Then, it handles the image processing of the ingredient level inside the containers (in pixels), creating a concatenation of steps between multiple assets through a data communication server (socket) to exchange data between other processes (ZeroMQ library).

2) The optimization block comprises:
• The optimized pair positioning and idle-timing (discrete manipulated variables of the control strategy) depending on the measured level of the ingredients (chickpeas) inside the containers, the initial position of the robotic arms, and the remaining inputs to be seen in the scenarios A to C.
• The time clock of the command to be sent to the optimization algorithm coded in Python programming language for a new run, considering the updated information from the sensing layer measurements.
• The data reception from the vision and data serving to the robot executions.
3) The robot block executes the solution that results from optimization commands (data reception process) aided by Dobot studio software. The three-layer structure to construct the closed-loop optimum scheduling solution consists of sensing, optimizing, and actuating routines, as seen in problem flowsheet Fig. 13. The framework's core structure is the optimization routine, which simulates closed-loop scheduling with a shifting horizon to determine the positions and idle-times of the robotic arm. It is important to notice that the goal of the moving horizon simulation framework is to emulate how a comparable system usually evolves in the real world, where a single scheduling problem is solved at each time clock delay by incorporating feedback through updated controlled variables or states of inventory levels (by the sensing routine). This sequential process of updating states and then optimizing scheduling is performed repetitively. So, the closed-loop simulation for the future time-steps simulates the continuous scheduling activities over a period of time-steps (e.g., minutes, hours, shifts, etc.) in the actual system.
In order to determine the optimal solution, the optimization procedure should first solve the mathematical model of the current system state. This yields an updated scheduling solution that is likely to be executed in the actual process by triggered actuating apparatus. The optimization procedure can be configured sufficiently to accommodate a wide variety of problem formulations, including linear (LP), nonlinear (NLP), mixed-integer linear (MILP), and mixedinteger nonlinear problems (MINLP). For the optimizing layer, a closed-source commercial modeling platform from Industrial Algorithms Limited called IMPL (Industrial Modeling and Programming Language) [22], is used to build the mathematical formulation, and a commercial solver (Gurobi 9.5.1) is utilized to optimize the model.
The optimization for the proposed problem scenarios is performed using an Intel Core (TM) i7 machine at 1.6 GHz (6 threads) with 16 GB of RAM. The results can be addressed or demonstrated in three scenarios; a) initialization phase where all initial holdups in the beakers are zeros, b) Beakers A and C have a defined initial holdup and Beaker B is empty (zero) to validate assignment routine, and c) random initial holdup values are sensed by camera to test the concatenation of solutions at every new cycle and re-optimized scheduling solutions.

A. SCENARIO 1: INITIALIZATION PHASE
In this scenario, the system's behavior in startup mode is tested; thus, we considered having no initial hold-up (opening inventories) to experiment at which time-step the stockpiles reach the pre-defined controlled targets. The configuration of operation policy, parameters, and assumptions are: • The flow-in rate in the conveyor-belt is fixed in 10 chickpea seeds per time step, with a 10% of uncertainty to show a more realistic behavior. Chickpea seeds are used in our experiment since their size is equivalent to the pieces of crushed raw material (ore) that are suitable for use as grinding mill feeds (less than 0.4 to 0.6 inches in diameter or 10 to 14 millimeters each grain) [86]. Also, in this demonstration the stockpiles' flow-out is considered zero.
• The time-horizon is defined as 1-minute (60 seconds) with 1 seconds as time-step in the optimization.
• The sequencing or phasing policies that the robotic arm spends over each tunnel is described as a fixed-sequence but with a variable idle-time in each position in which the SC travels along both rail sides in a predetermined order for both forward (A → B_GO → C) and backward (C → B_BACK → A) among tunnels, known as sweeping. The robotic arm is assigned to start at position A.
• Target holdup is defined as 180 pixels height. A penalty cost is assumed to be $100, with a lower and upper holdup threshold of 150 and 210 pixels to avoid infeasibility, by using excursion variables as in equation (6), as long as the accumulation is out of the lower and upper bound limits, since this initialization phase starts with no inventory. The results for the assignment of the robotic arm and the details of the holdup accumulation in the beakers ST 1, In this scenario, we assumed no initial holdup (opening inventories) in Beaker B and defined initial holdup values in Beakers A and C to perform the experiment. This scenario was chosen to verify if the control strategy would compensate with more idle time in the position B by adding more material on the empty beaker. The configuration of operation policy, parameters, and assumptions are the same as in scenario 1 except that the initial holdup in beakers A and C is defined as 120 pixels.
In this case, the results of the assignment of the robotic arm and the details of the holdup accumulation in stockpiles ST 1, ST 2, and ST 3 can be illustrated in Fig. 15. The accumulation of stockpiles can be noticed in which at time steps t = 31,     from the beakers. This is defined as the flow-in (10 chickpea seeds) divided by 3 (with a 10% random uncertainty as well) in each time-step. In the real experiment there is no flow out as per experiment's set up and components defined earlier as seen in Fig2.
The solutions in the online strategy in a pre-defined closedloop time clock are illustrated in Fig.16. It shows the details of the holdup accumulation ST 1, ST 2, and ST 3 of three control cycles in which the optimization routine minimizes the square deviation of the measured inventory to their targets (heights) within the defined thresholds. Also, an uncertainty of 10% in the flow in and flow out of the stockpiles is imposed in the control cycle to provide more dynamic and trustworthy figures that confirm the system's stability.
The optimization found 23 MIQP feasible solutions solved in 24.09 seconds. The best solution is the MIQP solution 23 (objective = $1.86). In this case, with the three cycles of the control strategy, in the stockpiles ST 1 and ST 3, that were far from the target at the beginning, the deviation of the heights are being reduced progressively.

V. FINAL REMARKS ON CONTROL STRATEGIES
The digital transformation of mining activities with the support of cyber-physical systems allows the moving from manual to automated control in the conveying and stockpiling systems of the logistics of crude-ore (or simply ore) raw materials. This system can be considered a type of autopilot or auto-driven process, known as an expert system. They are non-optimal systems by their inherent uncertainties. Therefore process control and monitoring must be carried out to achieve objectives. Furthermore, a system is never considered a realistic model of the process because the governing-based constraints and variables cannot be completely understood and programmed. Instead, a system is regarded as a tool for deciding (in the case of this paper) control actions to be performed, with actual operator devices mimicking the digital to the physical model.
Basic regulatory control measures are only conducted when they are absolutely necessary, such as when a process profile needs to be rectified or when the process has to be brought back into the stable operating zone. Because regulatory control activities are not performed on a regular basis, it is possible for several time steps (minutes or hours) to pass without any control action being performed. These approaches have many drawbacks, the most significant of which is that they are ineffective in the context of complex variable interaction and process dynamics. It is believed that such systems will not offer long-term resilience, which is defined as consistent performance that is superior to the performance produced by human control while requiring an acceptable tuning or maintenance resource load (or both). Since the goal of this experiment is to test and emulate operator behavior patterns and introduce consistency, it is desirable to implement real-time optimization through the use of other techniques, such as model predictive control, which can push the process to higher performance and significantly more extended periods of time without interruption.

VI. CONCLUSION
Smart decision-making presented in advanced process control promotes the design and development of laboratoryscale demonstrations prior to the actual implementation in pilots and real-size equipment. In this study, a proposed CPS that uses an optimization technique to minimize the live inventory's deviation from its target values by autonomously controlled tripper car on a conveyor belt has been explored. The significance of such a proposition is represented in offering an entirely novel level of safety, VOLUME 10, 2022 stability, and predictability to maximize the ratio of ore output while offering an opportunity to minimize operating and capital costs. The prospectus of this work results from the crushed-ore stockpiling process optimization considering smart decision-making in a smart manufacturing context. Further investigation on time synchronization for image processing and IoT device latency, optimization, and robot maneuvers are all required for appropriate CPS management inside the sense-optimize-actuate loop.
Following the same design approach, further future work can be developed and configured by using multiple conveyor-belt systems to consider ore quality and blending problems. Such blending problems will be solved as a mixedinteger quadratic and nonlinear programming (MIQP+NLP) decomposition that uses factors for qualities as a linear programming (LP) approximation instead of neglecting the values of the qualities in the MIQP problem [87]. Our next modeling step aims to provide a better mixing technique by simultaneously blending the different quality ore raw materials. By maintaining consistent feed volumes and ore grades, leveraging lower operating costs can be achieved.
It is likely that human operators will no longer be required in the field to perform some hazardous tasks on sites if more sophisticated forms of automation of mining sub-systems are implemented. There should be an integration of the three main pillars of smart manufacturing incorporated into the architecture of cyber-physical systems to create a digital twin of the actual mining process. First, the information and communication technologies (ecosystems, e.g., IoT and computing edges, e.g., cloud, fog, etc.) for real-time inventory acquisition using sensing-based systems. Second, highperformance computing can quickly solve the continuous and discrete optimization problems in aggregated machine cores. Third, the mechatronics for automatic actuation and scheduling execution while taking into account an integrated package of the main I4 attributes in an I4-age manufacturing system. unit-operations i:

AI
in-port-states j: out-port-states m up : upstream unit operation j up : out-port-states upstream to in-port-states i t: time-periods g: operation group unit-operation-port-state-unit-operation-port -state setup between j and i at time t yg u,g,t : grouping setup

CONTINUOUS VARIABLES
x m,t : unit-operation flow of m at time t xh m,t : unit-operation holdup of m at time t x i,j,t : unit-operation-port-state-unit-operation-port -state flow between j and i at time t xh D m He has more than 15 years of international experience as a process engineer and a researcher in smart manufacturing and engineering management. He has published many papers in top academic international journals, such as Computers and Chemical Engineering, Industrial Engineering Chemistry Research, Computer Aided Process Engineering, and among many others. His current research interests include simulation and optimization, LNG value chain, process industry, and machine learning. VOLUME 10, 2022