How to Apply Fuzzy MISO PID in the Industry? An Empirical Study Case on Simulation of Crane Relocating Containers

: The proportional-integral-derivative (PID) algorithm automatically adjusts the control output based on the difference between a set point and a measured process variable. The classical approach is broadly used in the majority of control systems. However, in complex problems, this approach is not efﬁcient, especially when the exact mathematical formula is difﬁcult to specify. Besides, it was already proven that highly nonlinear situations are also signiﬁcantly limiting the usage of the PID algorithm, in contrast to the fuzzy algorithms, which often work correctly under such conditions. In the case of multidimensional objects, where many independently operating PID algorithms are currently used, it is worth considering the use of one fuzzy algorithm with many-input single-output (MISO) or many-input many-output (MIMO) structure. In this work, a MISO type chip is investigated in the study case on simulation of crane relocating container with the external distribution. It is an example of control objects that due to badly conditioned dynamic features (strong non-linearities) require the operator’s intervention in manual or semi-automatic mode. The possibility of fuzzy algorithm synthesis is analyzed with two linguistic variable inputs (distance from − 100 to 500 mm and angle from − 45 ◦ to 45 ◦ ). The output signal is the speed which is modelled as a linguistic power variable (in the domain from − 100% to 100%). Based on 36 fuzzy rules, we present the main contribution, the control system with external disturbance, to show the effectiveness of the identiﬁed fuzzy PID approach with different gain values. The fuzzy control system and PID control are implemented and compared concerning the time taken for the container to reach the set point. The results show that fuzzy MISO PID is more effective than the classical one because fuzzy set theory helps to deal with the environmental uncertainty. The container’s angle deviations are taken into consideration, as mitigating them and simultaneously maintaining the fastest speed possible is an essential factor of this challenge.


Introduction
Proportional-integral-derivative (PID) controllers are widely used in many industrial applications and control systems. Majority of manufacturing industries rely on the PID controllers' concept, control algorithm does not require the knowledge of the dynamics of the control object in the form of a mathematical model, but the expert knowledge of the method of controlling the object in the way of linguistic rules. From a practical point of view, this translates into the necessity to implement the module of fuzzification, inference, and defuzzification. It should be noted that while at the level of qualitative synthesis, i.e., creation of a rule base, designing a fuzzy algorithm is relatively easy, at the quantitative level, i.e., selection of the type, number and distribution of the affiliation function (selection of parameters) in the fuzzification and defuzzification blocks, the process of fuzzy algorithm synthesis is a tedious one and requires verification by trial and error. To sum up, it can be concluded that the use of the fuzzy algorithm, which is only supposed to replace the linear PID algorithm [46] to protect the control system against the necessity of tuning when changing the working point is unprofitable due to the workload [47] that has to be incurred during the fuzzy algorithm synthesis. Moreover, the solution obtained will only be suboptimal. In the case of multidimensional objects (MISO, MIMO), where many independently operating PID algorithms are currently used, it is worth considering the use of one fuzzy algorithm with MISO or MIMO structure. Also, in the case of control objects that due to badly conditioned dynamic features (strong non-linearities) require operator intervention in manual or semi-automatic mode, the possibility of fuzzy algorithm synthesis can be analyzed. The probable opportunity for a wider use of fuzzy algorithms in industrial practice is now strongly developed techniques: • Self-organising fuzzy controller [48]; • Fuzzy logic controller using genetic algorithms [49]; • Adaptive fuzzy controllers [50]; • Neuro-fuzzy controllers [51]; • Quadratic D-stable fuzzy controllers [52].
In this paper, the challenge of control with a degree of non-linearity and complexity by unpredictable external factors will be addressed. The container crane is widely used to transfer heavy loads from and to container ships in quay terminals [21]. The container crane transports the loads to the desired position as quickly and as accurately as possible without colliding with any other equipment. In recent years, with the rapid increase of world trade as well as the need for larger container ships, shipping companies have resorted to an increase of the vessel size [53]. It is essential to be able to load and unload even in adverse weather conditions such as strong winds. This rapid change naturally induces undesirable stability of the container, which could cause damage to the load and other types of accidents, also reducing the performance of the operation [54]. Therefore, the comparison of classical MISO PID controller and the fuzzy controller will be made on the case of a crane relocating containers. The identification of the fuzzy controller will be presented by determining the rule base in this given problem.
This work presents a successful investigation, not only by showing a comparison between two types of control but also by demonstrating the process of implementing such a fuzzy controller. Problems with highly nonlinear factors and prone to uncertainties and classical PID control approach is not sufficient. Hence, in this paper, both the PID control and the fuzzy control are addressed, analyzing the comparison between the results and performance of the controls on the case study of the simulation of a real-world scenario of relocating containers using T-shaped crane. The work's contribution is also a presentation of a simple and effective way to create a fuzzy controller without any sophisticated mathematical knowledge, with the use of dedicated computer applications. It is an important factor for transforming the theoretical knowledge for practical applications in public scope.
The rest of the paper is organized as follows-in the next section, the PID algorithm's main formulas are outlined. In the third section, the Fuzzy Set Theory preliminaries are shortly presented. The case study is explained in a more detailed form in Section 4. Finally, in Section 5, a series of experiments are undertaken, and the results presented. The conclusions are emphasized, and future directions for possible extensions are suggested in Section 6.

Pid Control
A proportional-integral-derivative controller (PID controller. or three-term controller) is a control loop feedback mechanism widely used in industrial control systems and a variety of other applications requiring continuously modulated control. A PID controller continuously calculates an error value as the difference between the desired setpoint (SP) and a measured process variable (PV) and applies a correction based on proportional, integral, and derivative terms (denoted P, I, and D respectively), hence the name. In practical terms, it automatically applies an accurate and responsive correction to a control function.
In industrial practice, the classic PID algorithm is still the primary solution used to control analogue processes, and objects [55]. It is available as a function in most programmable controllers, e.g., Siemens, GE, Allan Bradley, Beckhoff, B&R et al. [56]. The essence of the success of the PID algorithm is connected with the simplicity of implementation, tuning, and low effort of computing power [55,57], necessary to perform it even with limited resources of the operating system. In [13], Parkinson and Smith claim that the PID algorithm will continue to be the fundamental solution used in industrial practice. The PID algorithm [55] in the feedback control system provides resistance to non-stationarity, non-linearity, and randomness of interference. Larger changes in the dynamics of the object (as a result of a change in the working point, e.g., a change in static amplification or the values of time constants, especially those that will be non-linear) can cause a significant deterioration of the control quality. In working conditions, there is then a need to re-tune the PID algorithm [57].
The three pillars of the PID algorithm include: The overall control function (1) is expressed as follows: where K p , K i , K d all non-negative, denote the coefficients for the proportional, integral, and derivative terms respectively. Figure 1 presents PID control flow chart. However, the implementation of the PID algorithm in controllers requires a different approach. The integral and derivative part cannot be calculated analytically. Hence numerous operations have to be introduced. The integral part can be expressed as a sum, described in (2) and the derivative part can be expressed as a difference in a specified amount of time, described in (3). Hence, the modified PID algorithm is shown in (4)

Fuzzy Logic-Preliminaries
In order to fully understand how fuzzy controller works, one has to understand the basics of the fuzzy logic and Mamdani fuzzy model.
The fuzzy set theory was developed by Lofti Zadeh, who introduced the idea of fuzzy sets in his paper in 1965 [58]. The growing importance of the Fuzzy Set Theory in model creation in numerous scientific fields has proven to be an effective way to approach and solve multi-criteria decision problems [59][60][61][62][63]. The necessary concepts of the Fuzzy Set Theory are described as follows [64,65]: The fuzzy set and the membership function-the characteristic function µ A of a crisp set A ⊆ X assigns a value of either 0 or 1 to each member of X, as well as the crisp sets only allow a full membership (µ A (x) = 1) or no membership at all (µ A (x) = 0). This function can be generalized to a function µÃ so that the value assigned to the element of the universal set X falls within a specified range, i.e., µÃ : X → [0, 1]. The assigned value indicates the degree of membership of the element in the set A. The function µÃ is called a membership function and the setÃ = (x, µÃ(x)), where x ∈ X, defined by µÃ(x) for each x ∈ X is called a fuzzy set [66].
The triangular fuzzy number (TFN)-a fuzzy setÃ, defined on the universal set of real numbers , is told to be a triangular fuzzy numberÃ(a, m, b) if its membership function has the following form (5): and the following characteristics (6) and (7): The support of a TFN-the support of a TFNÃ is defined as a crisp subset of theÃ set in which all elements have a non-zero membership value in theÃ set (8): The core of a TFN-the core of a TFNÃ is a singleton (one-element fuzzy set) with the membership value equal to 1 (9): The fuzzy rule-the single fuzzy rule can be based on the Modus Ponens tautology [67]. The reasoning process uses the IF − THEN, OR and AND logical connectives.
The rule base-the rule base consists of logical rules determining the causal relationships existing in the system between the input and output fuzzy sets. It is a list of rules, which is a specific type of knowledge base. [67].
The T-norm operator (product)-the T-norm operator is a T function modelling the AND intersection operation of two or more fuzzy numbers, e.g.,Ã andB. In this paper, only the ordinary product of real numbers is used as the T-norm operator [68] (10): The fuzzy control system-it is a system where logic involved can deal with concepts that cannot be expressed as the 1 (true) or 0 (false) but rather as partially true. Therefore, the solution to the problem can be presented in terms that human operators can understand, so that their knowledge can be used in the design of the controller. The simplified flow chart of the fuzzy control system is presented in Figure 2. In this paper, the Mamdani fuzzy inference is used, which is a natural method to create a control system by synthesizing a set of linguistic control rules obtained from experienced human operators [69,70]. In a Mamdani system, the output of each rule is a fuzzy set. This approach has many advantages, being: Well-suited to human input; • A more interpretable rule base; • Have widespread acceptance; The output of each rule is a fuzzy set derived from the output membership function and the implication method of the fuzzy inference system (FIS). These output fuzzy sets are combined into a single fuzzy set using the aggregation method of the FIS. Then, to compute a final crisp output value, the combined output fuzzy set is defuzzified using one of the methods described in defuzzification methods.

Empirical Study Case
The case investigated is the case of a crane moving containers (or other weights) on its rope. The crane lifts the weight and moves it to the setpoint (desired location). In a real-life scenario, while transporting the container on its rope, the movement naturally creates a container's angle deviations, and uncertain external disturbances may occur. The possibility of fuzzy algorithm synthesis is analyzed with two linguistic variable inputs (distance from −100 to 500 mm and angle from −45 • to 45 • ). The output signal is the speed which is modelled as a linguistic power variable (in the domain from −100% to 100%). This paper investigates the simulation of such a crane with emphasis on minimizing the angle deviations-crucial for the proper functioning in a real-life scenario. Two situations are investigated-one with a container controlled by a PID algorithm and the other one controlled by a fuzzy system with the external distribution. In the identified system, the following two input variables have to be determined-distance to the container's destination and the container's angle. One output variable is determined-the power supplied to the crane's motor. In order to correctly identify the linguistic variables, the knowledge of the operator is needed, who identifies the linguistic values according to his experience. The linguistic variables for input distance were identified as:   The triangular and trapezoidal fuzzy numbers for the input angle are presented in the Figure 4. Finally, the following linguistic variables for output speed, which is defined as percent of used power, were identified as: The triangular fuzzy numbers are presented in the Figure 5. Based on the input and output variables, 36 rules were identified for this fuzzy model. All of the rules are presented in Figure 6. All of the rules are to be read in the following manner, e.g., IF Distance Far AND IF Angle Medium THEN SPEED (in this case power supplied to motor) Medium. Using Mamndani's inference model, we get an inference from the rule database. In this case, note that each case activates a maximum of 4 rules (the rest of them giving result equal zero). The Figure 7 presents the surface of the nonlinear fuzzy control system.

Results and Discussion
The first series of experiments were done in scenarios with external disturbances. Figure 8 presents the feedback loop system flow chart for this case. In real life, such a container is prone to multiple factors, such as wind or irregularities, in the functioning of the engine. In the investigated case, the container's angle was artificially deviated by the hand, making the disturbances even greater and stronger. The results for both fuzzy and PID control are shown in the following manner-the graphs of distance, angle and power respectively against distance are shown for each case. In Figure 9 the results for the case of fuzzy control are presented, with a small disturbance at the beginning of the container's movement. After the start, the container deviated; however, the fuzzy control quickly started to adjust the power and direction. Hence the angle deviation was minimized. The interesting part should be emphasized, where the container moved backwards (visible by a peak in the distance graph in Figure 9), this was done automatically by the fuzzy control thanks to the fuzzy rule base-in this case, the angle deviation was so great and distance to a destination far, that the container had to mitigate the angle, thus moving in the opposite direction and stabilizing itself.
In the next experiment, presented in Figure 10 is made when constant and persistent disturbances occur. It is visible that when the angle has deviated in the same direction as the destination point, the container is accelerated in the same direction, in order to reduce the angle. The higher the disturbance, and hence the angle, the greater the acceleration.  The second part of the experiments was undertaken with the PID controlling the container's movement. At first, a scenario was investigated in which the PID control had a relatively small gain. As it is seen in the Figure 11, the container reached the destination much slower than the fuzzy control, and simultaneously it exhibited slight deviations despite the very low power supplied to the control. With a greater gain, and hence shorter time taken to reach the destination, the PID control contributes to even greater container's angle deviations, as is visible in the Figure 12.
As we can see, the fuzzy system performs better than the classic PID controller. However, the problem is to make an aggregated assessment and determine the degree of superiority. Less complexity of system identification with the fuzzy set theory is in favour of implementing this type of systems. Additionally, it should be noted that no aggregated measure could be used to make a multi-criteria evaluation of our study case solution. Therefore, we would like to present an extension of the subsequent studies with the construction of a conceptual framework, whose task would be to compare the total effectiveness of solutions using MISO or MIMO chips.

Conclusions
This paper addresses the challenge of control with a high degree of non-linearity and complexity by unpredictable external factors. We have shown the comparison of classical MISO PID controller and fuzzy version, which were being made on the case of a crane relocating containers. Taking into consideration external factors, such as wind, disturbances or angle deviations as a whole, a specially designed system is needed. In such complex cases, the exact mathematical formula for the control system is difficult to obtain. Hence other solutions ought to be investigated. The classical approach, the PID control, is not an adequate algorithm. Although reaching the set point in a short time, the angle deviations are too high, whereas the only case when the angle deviations are acceptable is when the container moves too slowly. When external disturbances occur, the PID control does not take them into account. On the other side, the fuzzy control system, taking into consideration both distance left to set point and the angle and its direction, does the successful work in minimizing the angle deviation and simultaneously maintaining quite high speeds in reaching the destination. The fuzzy control system performed better than the PID control system in an uncertain, nonlinear scenario. For further research, other types of controls could be used and compared. Additionally, the PID control tuning could be examined in greater detail. Also, the comparison between PID and fuzzy control could be investigated in different challenges. This will make it easy to compare solutions designed for complex systems, as it is currently impossible to make such a comparison with a single measure.
During the research, some additional areas of improvement of the proposed approach and future work directions were identified. It would be interesting to take into account the opportunity for the use of fuzzy algorithms in industrial practice by extending the proposed approach by using a fuzzy logic controller with genetic algorithms, self-organizing fuzzy controller, adaptive fuzzy controllers, neuro-fuzzy controllers, and adaptive neuro-fuzzy inference system (ANFIS). Afterwards, extensive comparative studies of the presented procedure with other fuzzy approaches mentioned above should be investigated.