{'fraction_non_alphanumeric': 0.028623675175399314, 'fraction_numerical': 0.003134796238244514, 'mean_word_length': 4.974804905239687, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Intelligent Product and Mechatronic Software Components Facilitating Mass Customization in Collaborative Manufacturing Systems

The intention of this research is to propose a uniform architecture for control software design of collaborative manufacturing systems. It introduces software components known as Modular, Intelligent, and Real-time Agents (MIRAs) that represent both products (C-MIRA) and mechatronic components (O-MIRAs) in a production system. C-MIRAs are in constant interaction with customers and operators through human machine interfaces (HMIs), and are responsible for transforming products from concepts up to full realization of them. It is demonstrated that desired services of a number of machines and mechatronic components can be dynamically allocated to a C-MIRA using a fully decentralized scheduling and operation control. This architecture also envisages the machines’ control to be composed of a set of modular software components, with standardized interfaces. This makes them intuitive and easy to install, to create the desired behavior for collaborative manufacturing systems. A simplified food production case study, whose control is synthesized using the proposed approach, is chosen as an illustrative example for the proposed methodology.


Introduction
Mass customization is exceedingly beneficial for both customers and manufacturers, as on the one hand, customers can personalize products according to their preferences. On the other hand, manufacturers can enhance their customer satisfaction, and worry less about relying on marketing predictions and dealing with a large amount of stock. Up to the present day, manufacturing factories have been using fixed production lines; as a result, any change in the plant layout poses significant costs and efforts for adoption of the existing production system into the desired condition. Therefore, with the current need for individual product customization, the achievement of the ability to rapidly design, control and reconfigure manufacturing systems is inevitable, and manufacturing enterprises are continuously striving to address this need by implementing collaborative manufacturing systems.

Research Background
In the past two decades various research approaches have promoted the notion of production through collaboration among main role players in manufacturing industries such as a wide range of devices, resources, machines and robots. In this section, a number of recent practices are mentioned.
Merdan et al. [1], look at the possibility of matching a Machine Agent (MA) to each physical component and applying it in a production line where, for instance, each conveyor, diverter and pallet is represented by an agent and transportation of a product will be achieved through collaboration of the agents. Gouyon et al. [2] proposed a product-driven approach in which product plays a pivotal role in manufacturing rationale. This method is mainly based on the collaboration between product controllers and resource controllers, through exchanging requests (by product controllers) and reports (by resource controllers). Simao et al. present a holonic control solution in which causal knowledge is embedded as individual rules in Rule holons. They receive facts from Resource holons and decide on the appropriate actions to be taken. This method also resembles the product-driven approach, in that the Rule holons are in charge of regulating the collaboration between Product holons and Resource holons [3].
A comprehensive review of the previous implementations of collaborative manufacturing systems, along with some of the future challenges ahead of their implementation is provided in [4][5][6][7]. Although these methods have overcome many of the industrial concerns such as decentralization of control as well as increasing intelligence and flexibility that are essential for mass customization, due to the inherent complexity of such systems their industrial applications are still very limited.

The IEC 61499 Standard Facilitating Distributed Control of Production Systems
The IEC 61499 is an open standard for design of distributed control systems [8]. This architecture allows encapsulating intelligence into structured and modularized control logic blocks known as Function Blocks (FB) and distributing them into various control devices. The IEC 61499 FB software architecture is used as an implementation platform for this research and the key features of the proposed approach are: reusability, compatibility and autonomy of modular software components, which require limited dependence on human intervention. The results of this research add design flexibility to collaborative manufacturing systems while minimizing their costs and efforts.

IMC Concept
The IMC architecture was originally proposed in [9] and then formally defined in [10] to facilitate developing modular and reusable control software for industrial automation systems. The concept of IMC is to encapsulate hardware and software models of mechatronic devices into a single-design artefact. Similar to FB concept, an IMC can be viewed as a black box that is only accessible by its interface [11]. Simple IMCs can be hierarchically composed to form more complex ones. The final automation system is thereby a network of collaborating IMCs. By generalizing the IMC approach, the bottom-up control synthesis of machines, and at a higher level, production systems, becomes conceivable.

MIRA Design Approach
MIRA follows the concepts of IMCs along with Intelligent Product Software components (IPSC) and elaborates on three expected characteristics from them, namely Modularity, Intelligence and Real-Time behaviour in a collaborative network. It certainly inherits some of its features from current approaches. However, it enhances the simplicity of the control system design, and makes the solution more engineer/operator friendly. This design approach is applicable to a wide range of production systems, regardless of their size: from a small automated shop which receives its orders directly from customers, to large manufacturing systems, where all the information, regarding production rules and equipment, is provided from the enterprise level. The MIRA approach for control software design of customized production system has been described in [12,13] ,and in this paper the collaboration aspect of MIRAs is elaborated. MIRA considers a trio of main role players in a collaborative manufacturing system: Human, Operator (O) and Client (C) MIRA, and particular tasks are allocated to each of them. MIRAs can either participate individually or as a group in a manufacturing system. Figure 1 shows an example of a bottom-up approach that is applied in a simple food production system.

Human
Humans can provide a deeper knowledge of the problem domain that is not already captured by the agents. They adapt the system if problem specifications alter over time [14]. Humans can also play a supervisory role, and, whenever needed, overrule MIRAs' decisions, as they are given a higher priority. In addition to the above roles, a human can act as an operator/technician supporting the system with different activities (i.e. collaboration, maintenance, supplying raw material, and so on).

O-MIRA
O-MIRA represents a machine/robot in a manufacturing system and consists of one or a group of IMCs in a bottom-up approach. An O-MIRA includes sensors, actuators, software components, controllers and power sources. The layout of a manufacturing plant follows the physical structure of its constituent O-MIRAs. Each O-MIRA it is able to be rapidly plugged into an existing manufacturing system. However, it is vital for every two or more cooperating O-MIRAs to ensure that both their physical and software components are compatible with each other. The compatibility check between two O-MIRAs can be either done manually or determined through their communication and decision-making. O-MIRAs receive tasks from Client MIRAs (described below) and in return, inform them about their availability and task fulfilment. An O-MIRA may be capable of serving several C-MIRAs simultaneously and also can respond to their requests differently based on its operation capacity. For instance, a machine may be available to handle a few C-MIRA requests and send a "Ready" message to them, but as it reaches its operation capacity, it may temporarily reject other requests.
A task that is received by an O-MIRA is normally deconstructed into numerous subtasks and is performed through collaboration with the constituent IMCs. An O-MIRA is also responsible for maintaining human safety according to its predefined vendor specifications. If an O-MIRA is considered hazardous, then sensors to detect human presence, and procedures on safety maintenance, must be provided.

C-MIRA
C-MIRA is an intelligent product software component that has a thorough knowledge of a product including: raw materials; cost; due date; order quantity; recipe (manufacturing process); machinery that is capable of producing its components, and so forth. C-MIRA receives an order from a customer interface and breaks it down into a sequence of operations. Then it requests those operations from O-MIRAs. When a C-MIRA receives information about the available O-MIRAs, if there is more than one O-MIRA capable of performing a task, then the C-MIRA selects one among others, based on different criteria which are either directly identified by customers or have been received from the enterprise level. Some of the criteria by which O-MIRAs can be distinguished and the manufacturing process can be optimised include: operation cost; transportation distance; operation performance, and bottleneck avoidance. In cases where there are multiple criteria that must be considered for determining the optimum O-MIRAs, then multi-variable optimization techniques as described in [15] can be applied by a C-MIRA to precisely determine the best solution. After the production is completed, C-MIRA sends a completion report to the customer interface.
Direct communication between C and O-MIRAs is a convenient solution for relatively small manufacturing systems. However, in larger applications, O-MIRAs with similar functionalities can be grouped together and managed by a Coordinator O-MIRAs to minimize the number of interactions among MIRAs. Coordinators can receive requests from C-MIRAs instead of individual O-MIRAs, and manage operations among them.

Knowledge Representation of MIRAs
The way MIRAs' knowledge is shaped for manufacturing is similar to IMCs and is based on the STEP method [12] as illustrated in Figure 2. Sc is provided to a C-MIRA by product designers who define a detailed specification of the production by an orderly set of operations (or recipe) that a product has to undergo to be produced [2]. Tc consists of the knowledge that specifies which task (order) is to be managed by an O-MIRA. Tc is provided to C-MIRA by the enterprise level or through a customer interface. Ec includes the information that C-MIRAs receive from O-MIRAs regarding their capabilities, availabilities and locations to be able to navigate the physical product through several production stations. Furthermore, a C-MIRA has to negotiate with other C-MIRAs to sort out order priorities. For instance, if a production strategy is on a first-come, first-served basis, the second C-MIRA has to communicate (i.e. through a Block-Permit approach) with the first O-MIRA to be able to access resources for production.
So is an integration of the characteristics and functionalities of the IMCs that construct an O-MIRA. To is provided by a C-MIRA and identifies which task an O-MIRA has to perform for an order. Next, the O-MIRAs' constituent IMCs will break it down into detailed tasks to be accomplished in a distributed way. For example, if a "placing work piece" task is assigned to a pick-and-place robot, it creates a set of detailed tasks (for example, extend/retract cylinder and turn vacuum on/off) to be performed by its horizontal and vertical cylinders and vacuum unit. For a Transport O-MIRA, To will be the source and destination of the product at each stage, and the constituent conveyors will collaborate to transport the product. During the manufacturing process, if an interruption occurs because of machinery failure, a C-MIRA will allocate the task to the next available O-MIRA. If no alternative O-MIRA is available, the C-MIRA will halt the operation to avoid product waste. Eo includes: O-MIRAs' location; raw materials status; safety (e.g. whether a human is present); the other MIRAs it is collaborating with, and so forth. Some of this information (such as positions) has to be provided manually by the process control engineer because they are specific to a manufacturing environment; others will be gathered through negotiation with other O-MIRAs.

A Case Study
To demonstrate MIRAs' collaboration in a manufacturing environment, a simplified case study of an automated and customized Ice Cream Production System (ICPS) is selected for implementation at a laboratory scale, using available equipment in the Industrial Informatics lab at the University of Auckland. The list of raw materials used to make customised ICs includes: -Two IC flavours: vanilla and chocolate IC cups (IC makers and cup fillers are not included in the case study); -IC lid; -White cream; -Two sprinkle colours, and -Six types of IC sauces represented by six colours.

Ice Cream Controller (C-MIRA)
A variety of toppings enables customers to choose their desired IC among various combinations. Customers' choices range from the simplest (and the cheapest) IC, which consists of an IC cup, to the most expensive IC, which includes three toppings (that is, cream and a choice of sauce and sprinkle). A customer order is received through a graphic user interface and is fed into a C-MIRA as an IC production controller. A C-MIRA acts as an intelligent product, in the sense that it contains a thorough representation of the IC recipe. It negotiates with the available devices that perform the required production operations. This negotiation will result in the creation of specific solution/s (routings and sequences) for the production of each IC order, based on various production conditions, such as particular order requirements, the availability of certain devices, and their locations (Figure 3).

Mechatronic Devices (O-MIRAs)
O-MIRAs intermittently advertise their operation status via a Boolean variable "Ready" (true when it is ready, false when it is not ready), to the C-MIRA, operator interface and the O-MIRAs with which they are collaborating.
There are two types of devices: Stationary and Portable. Stationary devices, which are assumed to be permanently available in the production process, include: -Two sprinkle dispensers; -A rotary sauce dispenser; -A cream dispenser; -A rotary table, and -A group of conveyors for transportation (C), comprising four bi-directional conveyors (C1-C4) and two one-way conveyors (C5 and C6). There are six positions on the conveyors (identified with blue squares P1-P6 in Figure 6 a) that have optical sensors, allowing them to be used in any order as entry or exit connection points for the other portable devices that are depicted in Figure 6 including: -A storing station : to store ready ICs to be delivered to customers (last production stage); -A pick-and-place device to place lids on IC cups; -Two semi-rotary loaders with stack magazines, each of which supplies an IC flavour. In this case study it is assumed that these two IC loaders have priority over the dual IC loader in supplying IC. If they are unavailable (that is, either. faulty or out of IC cups), the C-MIRA will send a request to the handling station, and -A handling station that has a pick-and-place robot, along with two sliders, to supply both IC flavours.

Transport System
Conveyors allow IC cups, as raw materials for this production system, to be transferred from one station to another to receive the desired IC dressings, and finally to guide them to the storing station. Although each conveyor operates independently, communication between them is necessary to direct the IC to the right station. Each conveyor is equipped with one or more photo eye sensors (PS) to identify the presence of ICs at particular locations. It is assumed that the travel time for ICs between every two adjacent photo eye sensors is measured in advance by the control engineer and provided to the conveyor O-MIRA. In addition, some conveyors are equipped with diverters (D) to pass ICs to their attached conveyor.
Apart from the inherent flexibility of choice that is provided to customers in selecting ICs on the production side, the intended reconfigurability of the system allows the five portable devices to be freely located in any order around the fixed conveyor network and be connected to any of the entry/exit points. The through beam (photo eye) sensors mounted underneath the connection points allows the transport system to detect a portable device that is connected to its connection point. Providing the source and destination locations of an IC to the Transport O-MIRA enables it to calculate the travel time between two stations through possible routes and chose the fastest (and the shortest) path.

Customer and Operator HMIs
The customer interface gives customers multiple options to customize the IC to their preference. The customer has the choice to select between two flavours and a number of dressings ( Figure 5). This information is then sent to the C-MIRA and based on that, the O-MIRAs will operate. The operator interface displays all the related production information to the operator. All HMI FBs are executed on a virtual PLC on a PC. Similar to other controllers, a virtual PLC communicates with other controllers through standard TCP/IP communication.

Control Design of O-MIRAs
In this case study, C-MIRAs are served on a first-come, first-served basis; however, in general, C-MIRAs may compete for resources based on their predefined priorities. In this approach, as is expected in agent-based manufacturing systems, each mechatronic component has only a minimal understanding of the whole system operations. For instance, an IC loader has no information about how many topping dispensers are available at the plant, or a conveyor does not know about the toppings that the IC may receive. The type of object (e.g. an IC or a metal work piece) that a conveyor is carrying is not important, so long as that object does not violate its predefined self-perception (the capability of carrying objects up to a certain size and weight). Therefore, decision making is systematically distributed across all IC production devices,' and each of the devices will behave autonomously. Figure 6 shows a configuration of an ICPS and an example of how C-and O-MIRAs exchange messages in order to make a vanilla IC with cream topping. First, the user places their order through the user HMI, and all O-MIRAs inform the C-MIRA of their positions and readiness for operation. Next, C-MIRA sends a set of separate requests to O-MIRAs according to its recipe, and receives their report (through Merger FBs) after each task's completion. Meanwhile the adjacent O-MIRAs, whose concurrent operation is not allowed, exchange Block-Permit messages to avoid conflict. For example, once an IC loader is placing an IC on a conveyor, it blocks the conveyor operation to avoid it being used by other C-MIRAs. Similarly once the cream dispenser is operating, the rotary table must not rotate. Finally once the last O-MIRA (storing station) has accomplished its task and reported to the C-MIRA, the C-MIRA will report on the IC production to the user interface.
As it is illustrated in Figure 6 b, the total time taken for production of the IC order can be calculated as: TTot= OM where TTot= Total production time of an IC order t(i)OM= Operation time of an O-MIRA n= Number of O-MIRAs in the production including transport system i= 1, 2… n Therefore, the total production time for the IC with cream topping will be: t ( PT) t= t (VL) + t (CD) + t (LL) + t (SS) + t (TS) + t (RT) where Total Transport Time: t (TS) = t (TS1) + t (TS2) + t (TS3) Total Rotary Table Operation  In general, communication among O-MIRAs results in increasing the throughput of the system. For, instance, while the first IC is receiving cream topping at the cream station, the second IC can be loaded on the C4 conveyor and transferred to the turntable. However, handling multiple IC orders simultaneously introduces the risk of collision. This situation is avoided by the conveyor system, through a permit-block communication technique between O-MIRAs. To this end, the conveyor controllers (as well as other devices) periodically advertise their availability (with a Ready or Not Ready message), and, based on their availability, issue permit-block messages among themselves to prevent others from overloading them. Through this method, each device will only handle one IC (or other objects) at a time.
Apart from O-MIRAs' autonomous behaviour, their other characteristic is that devices with similar components and functionalities will have identical control modules. For instance, the two single IC loaders use two instances of an identical FB, regardless of being placed in different locations within the production system. Conveyors are another example of the use of modular and identical software components.
The ICs can be observed and tracked by 14 photo eye sensors at various positions on the transport system. Distributed scheduling among conveyors is similar to the methodology reported in [13] for scheduling in modular automated machines. At first, the cylinder which contains the source node will start the scheduling procedure by searching for destination node. If destination node also exists in the same conveyor, then completion task will be sent to other conveyors and depending on the position of destination node with respect to the source node, the conveyor may chose forward (FW) or Backward (BW) movement to transfer an IC. However, if the destination node is located in other conveyors, the conveyor which has the source node firstly assumes its direction to be FW and based on that, sends requests (one at a time) to the output nodes along the way. The output node can be the conveyor which is connected to the end of this conveyor, or the one which is attached to its middle nodes and receive IC by diverter's actuations. Such algorithm will be followed by the consequent conveyors until the destination becomes reachable and then the "Scheduling Success" message will be broadcasted from the last conveyor which contains the destination node to the previous conveyor and cascaded to the first conveyor. If FW assumption for the first conveyor does not lead to a successful transportation path, the conveyor will again assume its movement direction to be BW and asks upstream output nodes to find a path to destination node. This procedure will enable the conveyors to find a solution to transfer an IC between two of the eight locations identified on the conveyors (i.e. positions 1-6). After the scheduling process is completed and the required actuators (conveyors and diverters) for IC transportation are identified, the conveyors involved in operation will become unavailable to other C-MIRA's and each conveyor will enable its actuators for operation. When the photo eye sensor at the destination node detects the IC, the operation is complete and conveyors will be ready for the next transportation task.

Control Hardware and Software Design Tool
The control hardware utilized for control of the production system consists of 12 Adam PLCs from Advantech Company. The PLCs control every conveyor, portable and stationary device used in the ICPS (Figure 7). The whole software, including control and visualization, is implemented in IDC Builder environment by NxtControl company as one of the compliant tools to the IEC 61499 standard [16]. The entire control software was distributed and deployed to various hardware configurations, and in each case, the production system had identical performance.

Fault Tolerance
One of the notable benefits of the collaborative decision making when using MIRA is that it eliminates any unnecessary critical point and the system can cope with faults without human intervention. If an O-MIRA is unavailable, the C-MIRA will send a request to the next available O-MIRA.
The ICPS implementation was tested under the following fault scenarios: -The vanilla IC loader was unplugged (representing a fault condition) and became unavailable, while the dual loader station (VC) received the command from the IC-Order FB and took charge of loading an IC. -The cream dispenser was unplugged. Since there was no counterpart for that in the ICPS, the operation did not proceed, to avoid wasting IC. -Conveyor 3 was unplugged (representing a fault condition) while the IC was supposed to be transferred from the position 5to the position No.2. The rerouted transportation path is illustrated in Figure 8. Among the three examined fault scenarios, in the first and the third cases, because the ICPS had other production alternatives, was able to successfully maintain its operation and produce the desired ICs.

Discussion
Before the design and implementation of ICPS, the same machinery had been used in a similar production application and for the control software development; the IEC 61499 FBs had been used. However, because of code's centralized nature, it was not feasible to reconfigure the production layout and add more components to it. Considering the shortcomings of the previous development, the ICPS control design was undertaken, based on the MIRA approach, which allowed reuse of devices in ICPS and thorough reconfiguration of the system. The new collaborative approach resulted in a significant reduction in control development time when compared with the previous implementation and the achievements will be more meaningful, bearing in mind that this method eliminates further development time in future expansions.

Conclusions
Future manufacturing will not just be concerned with satisfying a customer's straightforward requirements, but rather making their more ambitious aspirations come true. As an extension of the IMC design concept, MIRA was introduced at the manufacturing level, which represented intelligent products and machine controllers that can cooperate with one another without human intervention to achieve mass customization in manufacturing systems. Furthermore, MIRA architecture was studied and evaluated on a simulated food production case study in a laboratory environment.