Event-based PID control in a flexible manufacturing process

In the flexible manufacturing environment some processes that until now did not need a close loop control need to be controlled so that the precision of the task permits the continuing of the manufacturing. As the processes are optimized and the manufacturing consists of multiple parallel processes, there is a need of assuring that a product is at a certain location at a certain time. In the control of a task, usually, the output of the system is measured in a timely manner at a certain sampling time. This is usually not possible in the manufacturing processes as a product position is given based on events, by sensors placed at certain locations. Certain event-based PID controllers were proposed and implemented in other control areas but in this controllers the event triggering is given by the error passing a certain level. This kind of controller cannot be implemented given the necessity of high frequency measurement of product position. In this paper we propose an PID event-base controller that uses as triggering event the activation of one of the manufacturing process sensors by the product. As the sensors are placed only in key positions the number of activations is limited. Based on these sensors the PID controller determines the necessary control signals between the key locations.


I. INTRODUCTION
Even if is the most researched type of control, time triggered control of manufacturing processes cannot always be used in some instances, based on the type of process. In the event-based processes, most of the time, an open loop predefined command is sent to the actuator on an event-based rule. This kind of control cannot cope with the variability of a flexible manufacturing process optimal operating [1]. In the optimization process and line balancing the processing and transportation durations are considered known and constant across the process duration. In the flexible manufacturing processes these durations aren't always constant. To maintain some constant durations between some events (e.g. entering and exiting a workstation) the transportation speeds can be modified to control the arriving of a product on time [2].
In the literature most of the control of the positioning of a product on a manufacturing process is made in a timetriggered manner based on a sampling period. The control law is computed and updated every time this sampling period is reached [3]. This field is widely investigated even in the cases of measurement losses that introduces some asynchronistic behavior. However fewer studies cover cases of event-based sampling, with a sampling time event-triggered, for example the arriving of a product to a certain point. Most event-based control research focus on the passing over a certain error threshold as an event-trigger and updating the control values based on the event [4].
This event-based types of control have as the main objective the reduction of the control values updates and as a result the reduction of the computational power and data transmission, especially in low power devices [5]. Trough the monitoring of measurement variation at the sensor, the number of signals sent to the actuator decreases so that the command values modifies only when needed [6]. But for the monitoring of the measured values at the sensors and the error threshold that triggers the event an intelligent sensor or the allocation of controller computing power is needed for certain processes [7].
In the manufacturing environment the events that need to trigger the control laws are usually binary sensors that signal the arriving of the measured process at a certain point. This kind of signals that indicates a discrete event of a continuous process cannot be used to verify the error as a triggering event [8]. From this point of view the triggering event that activates the modification of the command value needs to be the presence of process at the level of a certain binary sensor (e.g. the presence of a part at a certain point in a work-station).
For this kind of event-based control a certain eventtriggered algorithm for the activation of the controller is necessary [9]. The activation of the controller will be in some regards similar with the literature error level event triggering, as the command values are modified only when the controller is active. But from the perspective of the number of activations of the controller the differences will be significant, as in the manufacturing process the product location it verifies in a small number of points. This paper is organized as follows: in Section 2 the timetriggered PID control will be presented as a reference base and detail the event-based PID control with the error variation as the event-trigger. The Section 3 will present the flexible manufacturing process considered for controlling. In Section 4 will present the algorithm of the event-triggering control proposed Section 5 will analyze the algorithm in certain cases and Section 6 will present the conclusions.

II. PID CONTROL
To better compare the proposed work with the existent controllers in this section the time-based PID controller and the event-based PID controller first proposed in [10] are recalled.

A. Time-Based PID Controller
In the PID control theory the S-domain controller is given by the equation: As the name suggests the controller can be divided in his three parts: proportional, integral and derivative, , , U p i d UU , the parameters of which are modified to improve the controller performances. The setpoint weighting is applied, for a more flexible structure, to p U and d U . The three components of the PID can be represented as: To avoid possible problems with the high frequency noise in the measurement a low-pass filter can be added on the derivative term, changing the derivative form to with N the filter gain.
Beside the filtering of the measurement noise in the output of the controller a saturation parameter can be set to better represent a real process, as the command to an actuator can be limited: Combined to this saturation of the command value an anti-windup method must be used in most of the cases to eliminate possible control delays based on the integrator factor. Most of the time the clamping method is used, disengaging the integrator element for the duration of the command value being outside the saturation limits.
Based on the frequency domain form of the PID and discrete-time version of the controller can be obtained by mapping the s-plane to the z-plane, resulting in the time with k t k h = representing an instant moment in the sampling, with h the constant sampling period. Similar with the continuous time controller the proportional part is similar for the discrete time ( ) ( ) with the discrete time form of For the integral and derivative parts of the controller several solutions can be applied. A solution is represented by the backward difference approximation method based on the first-order Taylor series expansion. This expansion is based on 1 1 z s h − − = and gives as a result Or for the time domain These approximations will be more accurate as the h sampling period is smaller

B. Event-Based PID Controller
The first event-based PID controller proposal was made for the first time by Arzen [10] and improved in other publications. This controller consists of two parts: an event detection and the activation of the controller based on the event.
The event detector with time triggering is used is used in detecting the crossing of a certain level. This event detector runs with a sampling period h similar with the time-based PID. The event detector sends a request to the second part containing the controller when an event is detected. In the cases presented in the literature the event-triggering is represented by the absolute error value crossing a certain level e set by the user. This results in the condition: When the event takes place the PID event-based controller will calculate and update the control signal based on the request received from the event detector. Between the events detected the control signal is kept constant as the length of the sampling time k h is dfined by two successive events. For both the derivative and integrative part the backward difference method approximation method is applied resulting:  h from equation (9).
Given the event-triggering condition (10), where an event is recorded only when the error passes a certain level, the sampling interval can become very large as the output signal can have small variations over a long period of time. To compensate for the perturbations a large sampling time can introduce, in [5] where proposed improvements over the algorithm. These compensations apply to the integral and derivative parts. A "forgetting" factor of the sampling interval is presented that after a long period of steady output value the value of the parameter k h is reduced so that it doesn't affect the control signal in a very significant manner. This approach is similar to the anti-windup mechanism present in the control theories that compensate the error introduced by the saturation.
In the integral term an exponential function is used so that the sampling interval impact is decreased as the time of the steady-state increases, resulting in Using these modifications, an PID with exponential forgetting factor is obtained, of which the integrative and derivative values are:

III. FLEXIBLE MANUFACTURING PRODUCTION
The processes in which the event-based control is used the most are represented by the manufacturing processes, and especially the flexible manufacturing processes. If in the classical manufacturing process we mostly have a time or event dependency, in the flexible manufacturing process is encountered a combination of time and event dependencies. These dependencies on time and events are needed primarily for the optimization of the process. In the optimization of the process the operations and transport durations need to have a constant duration, so that a product can arrive at a predetermined time at a workstation. To obtain the constant durations needed a control algorithm must be implemented.
A. Flexible manufacturing system hardware The flexible manufacturing system considered ( Fig.1) is composed of 7 workstations each controlled by a PLC (Fig.2), making the individual control easier. Each workstation is responsible for the assembly of a part of the product in a predetermined order. To better use the existent workstations a SCARA transportation system was implemented so that the product path through the workstations can differ based on the product configuration. Beside the flexible manufacturing in-line the manufacturing system is equipped with a in-cell manufacturing where the entire product is assembled in a single station (Station 3) equipped with a robotic arm. This results in a two parallel manufacturing processes that intersect in the quality control (QC) area.
For an optimal production the products on the two parallel flows must arrive on a predetermined manner at the intersection point. To ensure the following of the arriving of products at certain point at certain times a control algorithm is necessary. In ensuring that the necessary assembly and transport durations are obtained, a better control method, different from the open loop sequential algorithms control, must be implemented. For this the implementation of a PID was considered. Given that the PID control is a used and very researched type of control ensures an easy adaptation.
In the manufacturing process the most encountered process is the process of transportation, predominantly on conveyors. On these conveyors a product is not monitored in a continuous manner. The position of the product is known on an event-base. The product will be detected by sensors placed in certain interest zones. In most cases the sensors are placed at entry and leaving of the workstation and at the processing/assembly area. These sensors can detect two points on the tray of the product given the possibility do detect the product in more positions.
In controlling the transportation in a workstation, it can be separated in two transportation control situations, the transport from the entry in the workstation to the assembly area and the transport from the assembly area to the leaving of the workstation. In the first control situation the speed of the conveyor can vary based on the delays introduced by the previous workstation.
In the second transportation control situation the speed of the conveyor varies based on the variability of the assembly duration. Given that the conveyors work at an optimal speed for energy consumption and maintenance the transportation speed can be increased to a certain point. If the speed increase cannot compensate the assembly delay, a certain delay will be transmitted to the next workstation. As the position of the product can be measured only in some points the computing of the PID controller will be made only when the product is present at one of the positions. This is made possible by the fact that the sensors are monitored at a high frequency sampling time. As one of the sensors is activated the position of the product is updated and the algorithm that calculates the control value using the PID algorithm is activated updating the control value.
Given the fact that all the actuators and motors have a limited operating zone, the control value given by the PID is passed through a saturation process. In the saturation process the control value is compared with certain upper and lower limits and if the PID control value is over these limits the control value will take the limit value.
IV. EVENT-BASED PID CONVEYOR CONTROL To ensure the conveyor control an event-based PID controller was implemented, starting from the literature work. Similar to the literature the activation of the PID controller and the calculation of the necessary conveyor speed will be based on an event-trigger. But in comparation with the examples in the literature the event trigger will not be based on the variation of the error outside a predefined limit, will be based on the arriving and activation of one of the three sensors by the product.
Given the number of sensors a small number of event-triggers will be recorded compared with the error limit event-triggers presented in literature. Also, as shown in literature, the sampling time can be verified and used as a trigger if it crosses a maximum pre-defined level, but is not always a necessity.
The resulting controller algorithm is: Based on this transfer function a number of simulations and measurements were made to compare the evolution and performances of the two types of controllers. Based on the results it can be observed that the evolution of the event-based PID is close to the continuous modeling of the system for a small transitory duration, given the control signal saturation (Fig.5 for both continuous and event-based PID the control signal is similar for a large part of the simulation period ( Fig.6.a), also in Figure 6.b can be seen the event-triggering signal representing the moments at which the product is present at one of the sensors and the PID controller is activated and the control signal updated. The tested parameters are determining an overshoot value of 0.74% that giving the control signal saturation gives an error of 0.74% in the continuous format and almost zero in the event-based control. The setpoint in the tests is represented at one of the desired positions of the product on the conveyor. range. If in the error level triggering controller, the reference can take any value on a known range and ensure a level of error, in this case to ensure a reasonable error level the reference can take only discrete values given by the used positions on the conveyor. If the value of the reference is outside these discrete values, the error will be given by the distance between the reference and the next sensor position. But as in the manufacturing process the targeted reference is the same as the sensor position this method can be used to update the control signal. Given the saturation of the control signal that determine that the conveyor can go in only one direction some degree of stability is ensured. If the reference is placed between the positions of two sensors, or close to one of the sensors, the controller will position the part at the next sensor from the reference and stop the control signal. If the system permitted the conveyor to go back and forth the system will become unstable as the controller will try to position the product on the reference moving the product between the two sensors in an infinite loop.

VI. CONCLUSIONS
Event-based control of a process represents a particular case of control as in certain moments the controlled parameter cannot be measured. Is in most cased demanded by the process structure as the parameter value is needed only at certain values or the addition of new sensors is not possible.
In the case of the manufacturing process the proposed PID event-based control adds certain benefits. Based on the PID parameters certain behaviors of the controller can be obtained. Given the saturation of the control signal in the manufacturing processes, for a fast transitory duration, the proposed controller behaves similar to the continuous time PID, but as the transitory duration increases the differences are more visible. The stability of the controller is given primarily by the special saturation of the manufacturing process, as the conveyors usually travel in one direction. Based on this saturation the product stops ones it arrives to a certain sensor. Also, a shortcoming of the controller is given by the fact that the reference of the controller must take values from a discrete interval given by the key position in the manufacturing process.
Further research would imply more testing of the simulated result on the physical device. Also, the possibility of integration of a digital twin in the event-based control by measuring the necessary parameters in the digital twin and compare certain points with the physical system and adjust the control based on the obtained errors.