1 Introduction

Current and future market scenarios drive companies’ attention to customer satisfaction, which in turn moves companies to pursue increased product customization and quick response strategies for maintaining competitiveness. This behaviour has led to a radical change in the approach to production toward the pursuit of customer-needs-based value creation and no longer aiming solely at the reduction of costs. Already in 1989, Davis introduced this trend, referring to it as a production strategy focused on the broad provision of personalized products and services and naming it “mass customization" (MC) (Davis 1989). However, the fulfilment of such a paradigm requires the definition of new production concepts in order to achieve the requested increased level of flexibility, reconfigurability, and performance (Dashchenko 2006; Mourtzis and Doukas 2012; Mourtzis et al. 2012)

Many scientists have identified the fourth industrial revolution, known as Industry 4.0 (I4.0), as a response to these new challenges (Ivanov et al. 2020; Brad et al. 2018; Prinz et al. 2019).In the I4.0 context, information technology (IT) merges with operations technology (OT) to make possible the achievement of the expected performance targets in a highly customized market scenario (Grassi et al. 2020a; Thames and Schaefer 2016). This link is made possible thanks to the main innovations introduced by Industry 4.0, identifiable in the concepts of cyber-physical systems (CPS) and the internet of things (IoT) (Jeon et al. 2020; Liu and Xu 2017). There has been an abundance of development and research related to Industry 4.0 technologies, but to the best of the author’s knowledge, there is ongoing research activity into methodologies for efficiently using the data flows and interconnection capabilities provided by CPSs (Allgöwer et al. 2019; Gushev 2020; Oks et al. 2019). The CPS concepts itself is still debated within the literature. However, in this paper, CPS will refer to “engineering systems characterized by the integration of communication, control, and computation within a natural and/or man-made system governed by the laws of physics” (Gushev 2020).

The network of connected machines made possible by the introduction of the CPS concept may have a great impact on industrial production management, subverting consolidated manufacturing and production control (MPC) systems and making possible the implementation of innovative approaches based on the delegation of a decision-making quota to the shop-floor level. This trend involves a gradual shift away from classical centralized production planning and inventory control architectures, such as the MRP/MRP-II systems, to more decentralized ones focused on the scalability of the control system along different managerial levels, each of them characterized by a specific quota of autonomous decision-making. To this end, the literature contains numerous studies where researchers have investigated centralized approaches to tackling scheduling and inventory production control issues and pointing out their limitations (Habib and Chimsom 2019; Monostori et al. 2006; Windt and Jeken 2009).

Traditionally, in a centralized MPC system approach, the aim is to maximize production resource utilization while trying to meet the promised due date. The main problem of this approach is that firms are forced to lengthen the order crossing time by imposing fixed and long lead times between subsequent production stages, thus leading to an increase in stock levels within the production system, which helps, in turn, to compensate for production variability. In this way, each resource works as if it were isolated, theoretically achieving its own maximum production rate. However, the final result is that the production is systematically anticipated, provoking undesired queues and delays in the system (Bendul and Knollmann 2016; Grassi et al. 2020c; Knollmann and Windt 2013).

Moreover, the operational scheduling problem that, in the traditional centralized approaches is the methodology adopted to maximize production resource utilization, assumes a deterministic context, working on a frozen horizon in which known jobs are defined and assumed to be immutable. This results in (i) the dimension of the problem tending to increase as much as it is addressed at higher levels in the manufacturing control system, as a centralized approach implies, and (ii) the intrinsic NP-hard nature of scheduling problems resulting in planned order schedules tending to become unfeasible in the short term due to perturbations occurring at the shop-floor level (i.e. delays in production activities, unavailability of machines and operators, variability of production rates, and so on). This ends in a continuous call to reschedule activity and, in turn, increased unpredictability in the manufacturing system.

There are several examples in the scientific literature of attempts to solve this problem. For instance, some important studies dealt with assembly line sequencing and the optimization of production scheduling in manufacturing processes by requiring set-ups (Kendrick et al. 2017; Lou and Van Ryzin 1989; Minguillon and Lanza 2019; Plaga et al. 2019; Rolf et al. 2020; Sharifnia et al. 1991; Fragapane et al. 2020; Walker and Bright 2013). Other studies, however, have instead used heuristic methods for the scheduling of flexible flow-shop systems, aiming to find the overall optimum system through better utilization of resources (Paternina-Arboleda et al. 2008). Still other researchers have addressed the problem by adopting a control theory based approach (Ivanov et al. 2021; Dolgui et al. 2014; Ivanov and Sokolov 2019; Ivanov et al. 2018).

One of the main pillars of Industry 4.0 is the introduction of more autonomy in the system, paving the way to the adoption of a more decentralized MPC system (Guizzi et al. 2017). In this way, decisions are split among different managerial levels, each covering a confined physical part of the system while also addressing specific functional objectives. Only the lowest level executes precise scheduling activity based on the current detailed knowledge of the system state, while the upper levels control the general performance of the system (e.g. the average throughput) on a longer time scale and based on less detailed information, thus remaining tolerant to variations. Again, some examples are present in the literature (Bendul and Blunck 2019; Gonzalez et al. 2019; Jairo et al. 2019; Moghaddam and Deshmukh 2019). In particular, there is growing interest in hybrid MPC architectures that are neither centralized nor decentralized, in which the complex MPC system is broken down from a functional point of view. Grassi et al. (2020c) recently proposed a semi-heterarchical MPC architecture in which three different functional levels are introduced: (i) knowledge-based enterprise resource planning (KERP), which represents the business level and is also accountable for cloud interaction; (ii) high-level controller (HLC), which is liable for the general performance of a monitored system; and (iii) low-level controller (LLC), which is the operative level of a particular production unit.

By taking advantage of a semi-heterarchical architecture and integrating Industry 4.0 innovation, the presented work contributes to the design of the highest level of such an architecture. Extending the work of Vespoli et al presented at the MIM 2019 conference, the original contribution of this paper consists of the development of a control methodology allowing the HLC to follow performance targets imposed by the upper level (which may be an ERP system or the KERP system of the above-mentioned semi-heterarchical architecture). In particular, the performance target kept under control is the throughput that can be arbitrarily set by the upper level itself on the basis of order arrivals.

The proposed control system, designed to operate in an MC scenario in which the variability of job processing times is high due to the variability of the production mix resulting from customization requests, showed promising ability to keep the production system controlled to the throughput target value while minimizing the WIP value.

The reminder of the paper is organized as follows: Sect. 2 presents the problem statement, while Sect. 3 describes the proposed high-level control system, discussing its integration in a semi-heterarchical architecture. Section 4 shows the effectiveness of the proposed approach by means of simulated experimental campaigns, and Sect. 5 concludes the paper.

2 Problem statement

Consider a manufacturing system called to produce customized orders. Without loss generality, we consider a flow-shop manufacturing system in which each job moves forward following the same sequence of working stations (i.e., the same production route). Jobs are all different, meaning that even if the technological route is respected, their processing times at stations may differ significantly.

Looking at system performance, we will refer to throughput (TH) as the average output of a production process (machine, workstation, line, plant) per unit time (e.g., parts per hour) and to cycle time (CT) as the average time from release of a job at the beginning of the routing until it reaches an inventory point at the end of the routing (i.e., the time the part spends as WIP) (Spearman et al. 1990). If the system is observed for a sufficiently long time, then Little’s law holds:

$$\begin{aligned} WIP = TH \cdot CT \, . \end{aligned}$$
(1)

In an MC context, the complexity and high level of customization in customer orders result in an increased variability of job processing times within the production system (Fogliatto et al. 2012). Hence, to facilitate mathematical modelling while allowing for good representation of the variability of the MC and Industry 4.0 scenarios, we assume that job processing times are taken from an exponential distribution, given its memoryless property and its significant coefficient of variation.

Variability affects performance, so the adopted production control mechanism has to be able to contend with the effects of variability and show robustness in control capabilities. Among the different production control mechanisms produced by both scientists and practitioners in recent years is the constant-work-in-process (CONWIP) control system, based on direct WIP control over a long loop that covers a series of stations. It is a hybrid push/pull technique that limits the total number of jobs in the production system under processing at the same time, keeping the cycle time under better control and increasing the predictability of the system. In the CONWIP, the throughput is an observable performance parameter that can be modelled in mathematical terms and modulated by directly acting on the WIP level authorized in the system.

Hopp and Spearman (2011) studied the dynamics of a CONWIP system and produced mathematical models describing its behaviour in the functions of control variables and boundary conditions. In particular, they investigated the behaviour of the best condition available (no variability and balanced line, with the same performing times at the stations) and the worst possible condition. These scenarios are of interest because they represent the best and worst possible performance that a CONWIP production system may obtain. Moreover, the researchers evaluated the behaviour of the same system working in a practical case (i.e., the practical worst case, or PWC) in which the performing times of jobs at the stations are exponentially distributed, maintaining the balanced line condition in terms of average processing times. Table 1 shows a summary of the resulting laws, in which:

  • \(T_0\) represents the raw processing time of the line (the sum of the average processing times of each workstation at the steady state),

  • \(r_b\) represents the bottleneck rate of the line at the steady state, and

  • \(W_0\) represents the critical WIP of the line (i.e., the WIP level for which the line with a defined \(T_0\) and \(r_b\) achieves maximum throughput with a minimum cycle time if no variability exists in the system).

Table 1 Basic factory dynamics (Hopp and Spearman 2011)

As will be further clarified, the Hopp and Spearman’s laws reported in Table 1 will be used as performance benchmarks of a traditional CONWIP flow-shop production line scheduling architecture composed of the HLC and LLC levels, as shown in Fig. 1.

Fig. 1
figure 1

The semi-heterarchical architecture being considered (adapted from Grassi et al. 2020c)

The architecture being considered for the implementation of the dynamic production control developed in the present study, shown in Fig. 1, was derived from the semi-heterarchical architecture proposed by Grassi et al. (2020c). It is based on the three management levels in the production control breakdown from both physical and functional points of view: KERP, HLC, and LLC.

The KERP represents an evolution of the classical ERP system. It is at the top level of the structure, so its role covers the acquisition of customer orders and the negotiation of the delivery date, based on the knowledge of the general performance level at which the production system is operating in terms of TH and CT (i.e., it controls the profitability of the production). Accepted orders are then put in a queue of virtual orders waiting for admission to the lower levels. KERP is no longer liable for detailed production planning; it only defines the orders to be released to production and, most importantly, the target performances to be achieved from the lower HLCs.

The next level, HLC, is a sort of general performance controller of a production sub-system that inherits the performance targets from the upper level (KERP) and monitors the system state in terms of TH and CT, taking control actions as needed to dynamically maintain performance within the expected targets. The HLC then operates to quickly react to state variations of the controlled sub-system and/or to changes in the TH and CT inherited targets to keep actual performance as stable as possible and in line with expectations.

Finally, the LLC consists of a job-ready queue (JRQ), the Dispatcher, and the physical production system. Given the WIP-based control strategy adopted by the HLC, scheduling is addressed here with a dynamic approach, first, by means of a logical unit, the Dispatcher, that decides which order in the JRQ is the best one to be released into the production sub-system every time a completed one exits. Therefore, the LLC is affected by the HLC’s decisions and at the same time has the responsibility to establish priorities according to which pending jobs will be processed in such a way as to better compensate for variability, thus improving synchronization in the physical system.

Fig. 2
figure 2

Detail of the HLC control

In this work, we propose a cascade control for the HLC level that is able to keep the monitored throughput in line with the targets inherited from the KERP in a production context characterized by high variability, such as in the I4.0 context (Fig. 2). In order to facilitate understanding of the proposed control scheme, we first briefly detail the effects of the four different control knobs at the HLC level, as already analysed in Grassi et al. (2020b):

  1. 1.

    JRQ size This is the number of orders in the JRQ that have been admitted and are waiting for actual release into production. The size of the JRQ influences the effectiveness of the Dispatcher. A small JRQ size would result in a dispatcher having limited choices, while conversely, a large JRQ would leave the Dispatcher a wider range of choices but would also increase the total time required for a job to cross the entire system (Grassi et al. 2020b).

  2. 2.

    System WIP This refers to the number of jobs allowed in the production system, and it is the most important control knob of the HLC. A high level of WIP better compensates for the variability in the system, allowing for increased utilization of stations, thus making possible the achievement of a higher TH with the cost of an increase of the CT. Conversely, low WIP levels may help to obtain lower CT value at the expense of a loss in TH.

  3. 3.

    Dispatching rule This is the rule according to which the Dispatcher, as the heart of the LLC, dynamically updates the priority given to the jobs waiting for processing in the JRQ. In opting for one rule rather than another, the set of information that the Dispatcher considers in making its decisions is determined, along with the re-sequencing mechanism adopted. In the following, we will consider two different dispatching rules for the Dispatcher, as proposed in Vespoli et al. (2019) and deeply analysed in Grassi et al. (2020b), so only briefly discussed here:

    • Open Loop Dispatch Control—chooses the job to be admitted into production without considering feedback from the production system. This decision is made considering only the known characteristics of the job.

    • Closed Loop Dispatch Control—chooses the job to be admitted in production taking into consideration both the characteristics of the job and the state of the monitored production system.

  4. 4.

    Time-Out This is the maximum time that a job is allowed to wait in the JRQ. Jobs passing this time are forced to be released by the Dispatcher. This can be a fixed value (statically chosen) or dynamically adjusted by an appropriate computation mechanism, updated on the basis of the contingent situation of the production system (Grassi et al. 2020b).

Therefore, the HLC dynamic control we are proposing is based on the vertical control aspect of the considered semi-heterarchical architecture, where a given HLC has to maintain the performances of the monitored production sub-system on a particular inherited target (in terms of TH and CT) by appropriately varying its own control knobs.

3 The proposed HLC control approach

The HLC represents the top-level production controller, since it is directly connected to the KERP, with which it exchanges information about the desired performance levels to achieve. These performance levels are the expected TH and CT, estimated at the KERP level, with respect to a high-level knowledge of the production system and the queue of orders promised to customers. This work addresses only throughput control, leaving cycle time control to future works.

In order to keep the monitored throughput in line with the target inherited from the KERP level, it should be noted that the most relevant control knob is the allowed WIP value for the production system. The idea of searching for a direct relationship between the WIP and the TH is not new. For instance, Little’s law may be used to calculate the WIP value that a system should have in order to maintain a predefined TH level, given the knowledge of its CT. Other methodologies and tools that are able to statically estimate the best WIP value given a particular series of jobs have been proposed and analysed in studies contained in the body of scientific literature (Thürer et al. 2012). However, to the best of the author’s knowledge, the proposed algorithm and methodologies approach the problem with a static estimation of the WIP value instead of a dynamic evaluation of the WIP level. This kind of design approach may be useful when the variability of the production system is controlled, but it does not guarantee adequate performance in an MC scenario.

In this study, the objective was to keep the throughput in line with the targets inherited from the KERP in an MC scenario. Thus, a cascade control scheme was developed for the HLC level. This control scheme consists of an optimal control (based on the best-known analytical model of the controlled system) plus a PID controller. The rationale behind this choice is to couple the knowledge of the production system with the most-established industrial control loop algorithm.

Figure 2 presents the detail of the HLC control scheme, pointing to the role of the HLC and the dynamic adjustment activity delegated to it to pursue the \(TH_{TARGET}\). The control system here was developed considering a balanced CONWIP production line in which jobs’ processing times taken from an exponential distribution are assumed. Different working conditions can be further considered, provided that general (even approximated) performance analytical models are available. In this paper, the PWC laws will be used in the optimal control algorithm part, given that it provides the exact analytical model that fits with the considered working condition as modelled by Spearman et al. (1990).

Referring to \(T_0\) as the raw process time, which is the sum of the mean effective process times of the stations in the line; \(r_0\) as the bottleneck rate of the line, defined as the production rate of the station with the most utilization; \(W_0\) as the critical WIP level for the line, which is the WIP required for a line with no variability to achieve the maximum throughput (\(r_b\)) with minimum cycle time (\(T_0\)); and \({\overline{t}}\) as the given average processing time at stations, we can write

$$\begin{aligned} W_0= & {} r_b \cdot T_0 \nonumber \\ T_0= & {} m \cdot {\overline{t}} \nonumber \\ r_b= & {} \frac{1}{{\overline{t}}} \end{aligned}$$
(2)

Hence, according to Spearman et al. (1990), the best long-term predictor of the considered production line throughput \(TH_{PWC,k}\) is

$$\begin{aligned} TH_{PWC}=\frac{w}{W_0+w-1}r_b \end{aligned}$$
(3)

where w represents the WIP value set for the production line.

Considering a generic time step k, let us indicate with \(TH_{TARGET,k}\) the throughput value imposed by the KERP system. Then, the objective of the control algorithm is to dynamically estimate the WIP value so that the TH of the line is close to the desired one for each considered period. Therefore, the goal is to minimize, over the considered time horizon, the sum of the absolute deviations between the expected and target throughputs, which will also act as a sort of performance indicator:

$$\begin{aligned} min \sum \limits _{k=0}^N |TH_{PWC,k}-TH_{TARGET,k}| \end{aligned}$$
(4)

Figure 3 shows the reference schematics of the considered production line: the output of the control \(u_k\), which represents the input of the production line, sets the number of jobs to be introduced in the production system at the period k. The \(x_k\), instead, is the state variable representing the WIP in the system at the beginning of the period k, while \(y_k\) represents the number of jobs leaving the production system at the period k. Obviously, the WIP control action is operated by directly controlling \(u_k\).

Fig. 3
figure 3

Production system WIP dynamics

Due to the assumed PWC working condition, an estimator of \(y_k\), named \(\hat{y_k}\), can be written as

$$\begin{aligned} \hat{y_k}=\frac{\Delta T_k}{{\overline{t}}} \end{aligned}$$
(5)

where \({\overline{t}}\) represents the given mean processing time at a station, and \(\Delta T_k\) the time between k and \(k+1\). Hence, referring to Fig. 3, the WIP dynamics from \(k=0\) to \(k=1\) can be written as

$$\begin{aligned} x_{k+1}-x_k= u_k-\hat{y_k} \, . \end{aligned}$$
(6)

Finally, the optimal control problem may be summarized as

$$\begin{aligned} {\left\{ \begin{array}{ll} \min \limits _{ \{{u_k}\}_{k=0}^{N}}\sum _{k=0}^{N}| TH_{PWC,k}-TH_{TARGET,k}|\\ x_{k+1}=x_k+u_k-y_k\\ x(0)=x_0 \end{array}\right. } \end{aligned}$$
(7)

Trying to graphically understand the behaviour of the proposed control algorithm, let us refer to Fig. 4. When the \(TH_{TARGET,k}\) changes, the proposed law provides a forecast of the value of \(u_k\) such that the WIP in the production system moves from w to \(w^\prime \). To do this, we have to impose that \(TH_{PWC,k} = TH_{TARGET,k}\).

Fig. 4
figure 4

\( TH_{PWC}\) vs \(TH_{TARGET}\)

Hence, with reference to the Eq. 3, we may write

$$\begin{aligned} \frac{x_k+u_k-\hat{y_k}}{W_0+x_k+u_k-\hat{y_k}-1}r_b=TH_{TARGET,k} \end{aligned}$$
(8)

Hence, with some mathematical steps, the formulation of the control law can be found:

$$\begin{aligned} u_k=\hat{y_k}-x_k+\frac{TH_{TARGET,k}\cdot (W_0-1)}{r_b-TH_{TARGET,k}} \end{aligned}$$
(9)

Analysing the control law found in Eq. 9 in the function of the \(TH_{TARGET, k}\) (see Fig. 5), it may be observed that the function is discontinuous when \(TH_{TARGET,k}=r_b\). This is an expected behaviour because, when the \(TH_{TARGET}\) value is close to the \(r_b\) value, this translates into a nearly impossible target request for the production system, given that it is asked to achieve the TH value of the best case (refer to Table 1) even if there is variability in the system. Therefore, mathematically, this results in

$$\begin{aligned}&\lim _{TH_{TARGET,k}\rightarrow r_b^-}{u_k=+\infty } \end{aligned}$$
(10)
$$\begin{aligned}&\lim _{TH_{TARGET,k}\rightarrow r_b^+}{u_k=-\infty } \end{aligned}$$
(11)
Fig. 5
figure 5

The \(u_k\) (Eq. 9) graphical behaviour

Such situations are not practically feasible because it would mean that the HLC should permit an infinite amount of WIP on the line. Obviously, such a \(TH_{TARGET,k}>r_b\) is unachievable because a production system cannot perform at a TH higher than its bottleneck. For the sake of completeness, we observe that if \(TH_{PWC,k}-TH_{TARGET,k}>0\), then \(u_k<0\). Since we cannot reduce the WIP by physically removing jobs, in this situation, the control value is set to \(u_k= 0\).

Fig. 6
figure 6

The optimal control HLC scheme

In summary, the proposed HLC optimal control law, valid only if \(TH_{TARGET}\ge \gamma \cdot r_b\) and schematized in Fig. 6, is

$$\begin{aligned} u_k=\max \left\{ 0,\hat{y_k}-x_k+\frac{TH_{TARGET,k}\cdot (W_0-1)}{r_b-TH_{TARGET,k}}\right\} \end{aligned}$$
(12)

where \(\gamma \in [0,1]\) is a safety value that limits the maximum TH allowed in the system (i.e., to avoid a \(TH_{TARGET}\) equal to \(r_b\)).

Therefore, if the functioning of the system falls within the PWC hypothesis (i.e., in the case of a perfectly balanced line with exponential processing time distribution), the proposed law is able to control the system at its best. If, on the contrary, the assumptions of the PWC are not verified, the proposed law may cause the considered system to work in over-capacity conditions (e.g., showing a TH value always greater than the \(TH_{TARGET}\) due to less variability in the processes with respect to the exponential variability of the PWC), as well as in under-capacity conditions (i.e., the process variability is greater than the PWC variability). In both scenarios, the defined control system lacks an efficient TH feedback lever. In fact, the looped-back value is the amount of WIP actually taken out of the system (a sort of variation of the state), rather than the actual measured TH value. If the proposed law makes possible a more predictable control of the production system, it will not effectively hit the target \(TH_{TARGET}\) value because the PWC condition is no longer valid.

In order to overcome these limitations, a cascade regulator was introduced by adding a PID controller to the optimal control law. The aim is to equip the control system with a feedback of the recorded TH. Using the feedback of the TH value from the production process, the PID controller compares it with the \(TH_{TARGET}\) value; the difference, or so-called error signal, is then used to determine the value of the output variable. Hence, the PID evaluates the output according to the following:

  • The value of the error signal (proportional action)

    $$\begin{aligned} u_P=K_P\cdot e(t) \end{aligned}$$
    (13)
  • The past values of the error signal (integral action)

    $$\begin{aligned} u_I=K_I\cdot \int e(t)\, dt \end{aligned}$$
    (14)
  • How fast the error signal varies (derivative action)

    $$\begin{aligned} u_D=K_D\cdot \frac{de(t)}{dt} \end{aligned}$$
    (15)

where

$$\begin{aligned} e(t)=TH-TH_{TARGET} \end{aligned}$$
(16)

Figure 7 shows the final control scheme, where it can be seen that there are two different feedback actions. The first is represented by \({\hat{y}}_k\) (i.e., the estimated number of completed jobs in a time interval \(\Delta T_k\)), while the second is the observed TH value. The latter is not directly fed back from the production system because it is not possible to measure it directly. Instead, it must be observed over an interval of time \(\delta T\) that is, in general, significantly greater than \(\Delta T_k\) because it has to average the effects of variability. The higher the \(\delta T\) considered, the more stable the observed TH will be, but the reaction of the control will be slow.

Therefore, as will be shown in the following section, the choice of the \(\delta T\) value influences the behaviour of the PID control action. In fact, even if the sole PID controller could cope with WIP adjustment needs, its corrective action would start only after the effect of variations in TH occurred. The effect of the control actions, therefore, would have to first propagate to the controlled variable, and given the variability in the considered system, the control action of the PID alone would not be satisfactory. This is why a hybrid solution is proposed where, first, a near optimal WIP value is anticipated through the use of the optimal control (i.e., based on theoretical knowledge of the production line) and, second, it is further corrected through the use of the PID to account for the differences between the theoretical PWC condition and the real one.

Fig. 7
figure 7

The proposed HLC control scheme

4 Experimental tests and results

Due to the complexity of the proposed approach and the number of changes that an implementation in an industrial environment would require, we analysed the proposed dynamic control algorithm in a simulated scenario. To make sure that the built simulation model can consistently simulate the performance of a real system and to ensure that the simulation time chosen is sufficiently long to have consistent results, we conducted a validation phase against the above-mentioned PWC case. The objective of the validation phase was to verify that after a two-year-long simulation of the production system, the recorded performances in terms of TH and CT can be considered statistically representative of the theoretical performance proposed by Spearman et al. (1990), as already reported in Table 1.

After the validation phase, the behaviour of the proposed cascade control algorithm in different simulation scenarios was analysed by adjusting the variability of the generated jobs’ processing times, thanks to the help of a gamma distribution that included the exponential one as a particular case. Nine different scenarios were analysed where there were variations in the logic involved in the LLC, alternating between three levels (FIFO, open loop, and closed loop), and the variability of the job processing times. The promising results showed that the proposed dynamic approach was able to maintain the production line at a predefined \(TH_{TARGET}\) with a limited standard deviation value.

4.1 Experimental methodology

In order to show the effectiveness, behaviour, and dynamics of the proposed control approach, a hybrid simulation tool based on the mutual use of discrete event simulation (DES) and multi-agent simulation in the AnyLogic environment was developed and used as a test rig.

Fig. 8
figure 8

The developed simulation tool

In Fig. 8, the “main” agent of the developed simulation tool is shown. Modelling resources and jobs as agents made possible a wide parameterization of variables, including those related to the physical configuration of the system. In this case, the study focused only on some of them, without preventing the possibility of using the developed tool in future applications from different points of view.

Fig. 9
figure 9

Details of the developed simulation tool

Figure 9 shows a screen capture of the discrete event part of the simulation tool responsible for job generation and flow management of the production system. Specifically, it is composed of the following:

  • A source element (agent generator), named “JobGenerator”, able to generate job agents within the line

  • A queue element (order queue), named “buffer”, representing the JRQ from which the jobs still not released into production may be chosen by the Dispatcher to enter production

  • A hold element, named “HLCRelease", where the control action of the proposed HLC control scheme is actually carried out (i.e., the \(u_k\) action). This block limits the flow of the generated jobs, allowing only the predefined \(u_k\) job to flow in the system per period

  • Two restricted area elements, named “ProductionWIPStart” and “ProductionWIPEnd”, liable for maintaining the system’s WIP, controlled on the basis of the WIP level imposed from the HLC (this control action is complementary to the action of the previous “HLCRelease" element)

  • A sink, to destroy “Job” agents just completed

  • Various ancillary blocks to monitor line performance for statistical purposes

Coming back to the simulation tool analysis shown in Fig. 8, the Dispatcher is not immediately visible in the scheme. This one, in fact, is a dynamic control algorithm invoked every time a job enters the JRQ and every time a control signal is issued from the HLC. For the same reason, the processing machines are also absent: modelled as agents, they are in the restricted area elements.

Finally, the simulation tool has been enriched with some charts that make it possible to monitor, minute-by-minute, the trend of some indices and performance indicators. At the top left, the real-time TH value, measured by the observer (in blue), and the \(TH_{TARGET}\) imposed by the KERP system (in red) are shown. At the top right, the job cycle time, evaluated as the difference between the time a job enters the system and its completion, is displayed. The reported value represents the average value over all the jobs that have been produced in the same \(\Delta T\) considered for the evaluation of the TH. In the bottom left corner, the current allowed WIP value for the system is found (i.e., the value of \(x_k\)), while in the bottom right corner, the error sent back to PID \(e(t) = TH-TH_{TARGET}\) is shown.

Once the simulation model is built, in order to make sure that the model can consistently simulate the performance of a real system and, above all, that the simulation time chosen is sufficient to have consistent results, we conducted a validation phase against the above-mentioned PWC. For this test, we disabled the HLC control action and the Dispatcher logic, focusing the analysis on the TH value (expressed in jobs per hour) according to the PWC assumptions. After the evaluation of the TH for different (fixed) WIP values, a t-Student test was conducted to validate the results obtained by the simulator. The developed simulation tool statistically proved to produce the same TH and CT mean values of the one calculated with the PWC law proposed by Spearman et al. (1990) in a two-year simulation time run, with a confidence level of \(95 \%\). More detail about the validation phase can be found in Grassi et al. (2020b), due to the similarities of the methodology and simulation tools involved.

4.2 Results

To better point out the impact of the proposed HLC control action, a scenario in which jobs are always available for processing has been assumed. Hence, the unique constraints for the TH performance is the chosen WIP level in the production system since the JRQ is always full of jobs available for production. The intention is to show the behaviour of the introduced HLC control algorithm when facing a transient state (like the initial one) and a steady state, while tackling the variability of the introduced job.

For every experimental working condition, the jobs are generated with the same characteristic: every job has to be processed on all the machines in the system, with a variable processing time generated from a gamma distribution with a fixed mean of 10 minutes. As known, the gamma distribution is a two-parameter family of continuous probability distributions, which includes the exponential one as a special case. In this paper, we will refer to its parameterization with a shape parameter \(\alpha \) and an inverse scale parameter \(\beta \), called the rate parameter. With that formulation, the mean is defined as \(\mu =\frac{\alpha }{\beta }\), and, as noted, it was considered fixed at 10 minutes.

In order to explore the capabilities of the proposed HLC control, the shape parameter of the distribution was varied to simulate scenarios differing from the PWC case. In fact, choosing values of the shape parameter \(\alpha < 1\), scenarios with more variability than the exponential one were obtained; with a value \(\alpha =1\), the particular case of the exponential distribution was represented; and with values of \(\alpha >1\), scenarios with reduced variability were addressed. Clearly, when the \(\alpha \) parameter changed, the \(\beta \) parameter was re-computed to ensure the processing time mean value remained unchanged.

Table 2 Experimental factors and levels

Nine different scenarios varying the logic involved in the LLC among three levels (FIFO, open loop, and closed loop) and the variability of the job processing times by varying the \(\alpha \) factor form of the gamma distribution were chosen, as shown in Table 2. For what concerns the PID controller parameters tuning, the Ziegler–Nichols method (Ziegler and Nichols 1942), among the most used and appreciated for its simplicity, was adopted in each scenario. This choice does not exclude the use of more sophisticated PID tuning algorithms, and the authors left the possible use of other tuning methods to future research and evaluation.

Table 3 Simulation results

Table 3 shows the results of the simulation campaign. In the first and second columns, the factors that defined the different experimental scenarios are found, while the following three columns show the estimated PID parameter values. The next two columns report the value of the standard deviation \(STD\left[ e(t) \right] \) of the PID error e(t) (here identified as a performance index) and the average WIP value recorded, respectively. The average value of the error is not shown as it was maintained at zero by the proposed controller in all the considered scenarios.

Analysing the results of Table 3, we may note that the best tuning gain values for the PID depended substantially on the \(\alpha \) form factor of the processing times distribution, while they remained substantially independent from the different dispatching logic adopted. The only exception is shown in the high variability scenarios (\(\alpha = 0.75\)), where a higher \(K_D\) value is preferred. In particular, the \(K_D\) value is higher for the FIFO logic than the other dispatching logic scenarios. This can be explained by the behaviour of the derivative action that tried to quickly compensate for variations of the error signal, due to its speed of change, without waiting for the error to become significant (proportional action) or persist for some time (integral action). In fact, the Dispatcher is conceived so as to do just that to compensate for the error through a more careful choice of the next job to be admitted into the system, while the PID tries to compensate for this variability by introducing more WIP into the system. In this regard, the average WIP value needed by the system to achieve the \(TH_{TARGET}\) value in the case of \(\alpha = 0.75\) for the FIFO rule was 8, while through the use of the improved rules, it was possible to achieve the same throughput with about 12% less WIP. As variability increases, it was found that adopting improved rules at the dispatcher level allowed the system to work with even less WIP than the FIFO scenario, especially when a \(TH_{TARGET}\) close to \(r_b\) was set.

Finally, with regard to the TH control, the control architecture showed good effectiveness in the simulated scenarios, with the average error between \(TH_{TARGET}\) and TH kept at zero, while also keeping a reduced standard deviation of the actual TH value around the target. The registered standard deviation was implicitly due to the intrinsic variability in the system as a consequence of the variable processing times.

Fig. 10
figure 10

The control action response to a TH change

Next, considering the scenario with \(\alpha =1\) and with the dispatching logic set to open loop, we wanted to evaluate how the considered system responded to a \(TH_{TARGET}\) variation. In particular, we proposed a change from the previously considered value of \(TH_{TARGET}=0.6 \cdot r_b = 3.6 \, \text {[job/h]}\) to a \(TH_{TARGET}=0.8 \cdot r_b = 4.8 \, \text {[job/h]}\). The action expected to bring the system to the new \(TH_{TARGET}\) value as quickly as possible is a sharp change in WIP. In Fig. 10, it is possible to see the variations of WIP imposed by the controller after the change of \(TH_{TARGET}\) was imposed. The red line in the first chart reports the variation of \(TH_{TARGET}\) from 3.6 to 4.8, while the graph at the bottom shows the consequent change of the WIP imposed by the controller. The first control action was rapidly taken by the optimal control, projecting the change in \(TH_{TARGET}\) and quickly proposing a higher WIP value. After some minutes, the PID completed the refinement of the value, maintaining a continuous compensation for the variability of the introduced jobs. The time to reach the new steady state was evaluated to be around \(400 \, \text {[min]}\).

Fig. 11
figure 11

The control action response to a TH change

We also analysed the behaviour of the proposed control architecture when a change in the variability of the stochastic process determining station processing times was imposed, while maintaining the same \(TH_{TARGET}\). Here, we considered a shift in the production mix where the station performing times changed from a gamma distribution with \(\alpha =1\) to one with \(\alpha = 5\), generating a situation with less variability. As can be seen in Fig. 11, as a consequence of the reduction in variability, the production system initially started to over-perform, given that the current level of WIP was related to the previous variability condition. In this particular case, the optimal control does not provide any change to the controlled system due to the fact that its modelling is here independent of process variability. Instead, the PID controller, receiving a feedback error signal, started its control adjustment action by progressively reducing the WIP in the system until the TH was brought to the target and the error zeroed. In this case, the system responded more slowly than with the \(TH_{TARGET}\) change previously simulated. The reason is that, here, the optimal control as conceived was not able to predict the TH variation on the basis of the characteristics of the jobs entering the system, so only the PID part of the controller intervened once the error was recognized. In addition, because the TH signal is delayed by a time that, on average, is the cycle time of the system, the controller responds with a systemic delay. In other words, the controller recognized the change in the entry variability after it propagated along the whole system, thus producing an effective variation of the TH. In Fig. 11, it can be seen that the system needed a time of 800 [min], twice the value observed in the case where a variation in the \(TH_{TARGET}\) was imposed, to find the new stable condition.

In general, the control system proved to be effective in maintaining the system TH at the requested \(TH_{TARGET}\) even when there were changes in the entry variability (i.e., non-controllable variations coming from the market). Thank to this, the production system is brought by the control actions to always work in its best possible condition, with the requested throughput \(TH_{TARGET}\) at the minimum possible WIP, translating to the minimum possible cycle time or, in other words, with the maximum possible responsiveness.

5 Conclusion

The ability to effectively allocate production resources is critical for maintaining competitiveness in modern market scenarios characterized by customized and dynamic demand. The technologies introduced in Industry 4.0 enable data exchange among production system entities, allowing the implementation of new approaches to production management and control. As stated in the introduction, the semi-heterarchical architecture was chosen as one of the most promising for the Industry 4.0 context among the various possible MPC architectures.

This paper proposed a first throughput control algorithm to be implemented in the HLC of the Grassi et al. (2020c)’s semi-heterarchical architecture. This control consists of a cascade algorithm comprising first an optimal control regulator and a PID controller that are able to perform a second control action, with the aim of providing feedback about the achieved throughput. The results showed that the combined control actions made it possible to have a continuous adjustment of the WIP for the controlled production system, maintaining it at the minimum WIP required to achieve the requested TH, with a nearly zero error.

This work can be considered a first step toward the development of the MPC semi-heterarchical architecture, which differs significantly from the traditional centralized scheduling and inventory production control systems currently used by practitioners. This architecture moves us closer to the long-awaited decentralization of Industry 4.0. Because of the promising results of this study, future research may concentrate on more complex production systems, such as the job-shop system. It would be especially advisable to begin with the development of analytical models capable of predicting the performance of such a system, as well as the ability to forecast the effects involved by changes in processing time variability.