Journal of Fuzzy Systems and Control, Vol. 4, No 1, 2026 |
Intelligent Control for 2D-Crane System
Trung-Son Huynh 1, Dang-Khoa Dinh 2, *, Trong-Bang Tran 3, Huu-Loc Dang 4, Dinh-Nguyen-Phuc Le 5, Hung-Thinh Bui 6, Hoang-Lam Le 7, Thanh-Binh Nguyen 8, Van-Hiep Nguyen 9, Le-Nhat-Minh Nguyen 10, Thien-Quoc Dang 11,
Ngoc-Hung Nguyen 12, Thi-Ngoc-Thao Nguyen 13, Huynh-Duc Pham 14, Xuan-Tien Nguyen 15, Van-Dong-Hai Nguyen 16
1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 Ho Chi Minh City University of Technology and Engineering (HCM-UTE),
Ho Chi Minh City (HCMC), Vietnam
3 Department of Mechanical Engineering, Konkuk University, Seoul, Republic of Korea
Email: 1 22151288@student.hcmute.edu.vn, 2 222151232@student.hcmute.edu.vn, 3 bang1111@konkuk.ac.kr,
4 21145637@student.hcmute.edu.vn, 5 22142197@student.hcmute.edu.vn, 6 22151041@student.hcmute.edu.vn,
7 lamlh@hcmute.edu.vn, 8 binhnt@hcmute.edu.vn, 9 hiepnv@hcmute.edu.vn, 10 22161154@student.hcmute.edu.vn,
11 21161013@student.hcmute.edu.vn, 12 hungnn@hcmute.edu.vn, 13 thaontn@hcmute.edu.vn,
14 22161117@student.hcmute.edu.vn, 15 22142234@student.hcmute.edu.vn, 16 hainvd@hcmute.edu.vn
*Corresponding Author
Abstract—This paper presents an Intelligent Learning-based Control approach for a 2D Crane System, aiming to evaluate the learning capability of various intelligent techniques based on a baseline Fuzzy Logic Controller (FLC). The initial fuzzy controller is designed for position and sway control, while Genetic Algorithm (GA), Artificial Neural Network (ANN), and Adaptive Neuro-Fuzzy Inference System (ANFIS) are employed in simulation to retrain and enhance its performance. Comparative results show that intelligent learning methods can significantly improve system response, reduce overshoot, and increase robustness compared to the original fuzzy controller. Moreover, an experimental setup using the baseline FLC is implemented to verify the practical effectiveness of the fuzzy control approach on a real 2D crane system. The findings highlight the potential of intelligent learning techniques for future real-time implementation.
Keywords—2D Crane System; Fuzzy Logic Control; Genetic Algorithm; Neural Network; Adaptive Neuro-Fuzzy Inference System
The two-dimensional (2D) gantry (overhead) crane is a fundamental industrial system widely used for automated lifting and transport in manufacturing plants, warehouses, and seaports [1]. It provides fast horizontal motion and vertical load handling, but the suspended payload often oscillates like a pendulum during acceleration or deceleration. The 2D crane is typically modeled as a trolley moving on a fixed horizontal rail with a payload attached through a rigid, massless cable. Because the system is underactuated and exhibits nonlinear coupling between trolley motion and payload swing [2], Controlling both position and oscillation simultaneously remains a challenging nonlinear control problem.
Conventional control methods, such as PID or LQR, perform well only near a nominal operating point but degrade when the payload mass or trajectory changes [3]. Specifically, standard PID controllers often exhibit significant overshoot and prolonged settling times, failing to suppress residual sway due to their fixed-gain nature effectively [4], [5]. To compensate for these drawbacks and improve adaptability and robustness, intelligent control strategies have been introduced. In this work, a fuzzy logic controller is adopted as the main control approach, owing to its rule-based reasoning and ability to handle nonlinearities without an explicit mathematical model [6], [7]. The fuzzy controller adjusts trolley motion commands to suppress payload sway while ensuring accurate position tracking. It serves as both the baseline for comparison and the controller implemented experimentally on a laboratory-scale gantry crane.
To further explore performance improvement, three optimization and learning techniques are investigated in simulation as separate extensions of the fuzzy baseline. First, GA is used to optimize the fuzzy controller’s parameters, including membership functions and rule weights, to achieve faster response and reduced overshoot [8], [9]. GA operates offline as a tuning mechanism, enhancing fuzzy performance through parameter search rather than altering its structural design.
Second, an ANN is developed to learn the fuzzy controller’s input–output mapping. The ANN-based controller is simulated to evaluate its ability to approximate and generalize the fuzzy control behavior under varying payload masses and nonlinear disturbances [10], [11].
Third, ANFIS is implemented to combine fuzzy inference with neural learning, allowing data-driven adjustment of fuzzy rules and membership parameters. The ANFIS model is tested in simulation to determine whether its adaptive learning mechanism can further improve transient and steady-state performance compared with the static fuzzy controller [12]-[14].
Among these approaches, only the fuzzy controller is experimentally validated on the physical gantry crane, confirming its practical effectiveness in suppressing payload swing and ensuring precise trolley positioning. The GA-, ANN-, and ANFIS-based controllers are evaluated through simulation to analyze their optimization and learning benefits relative to the fuzzy baseline. This study thus provides a systematic comparison of intelligent control techniques for 2D gantry cranes and highlights how data-driven and evolutionary methods can enhance classical fuzzy control performance.
The two-dimensional (2D) gantry crane system investigated in this study is classified as a single-input multiple-output (SIMO) and under-actuated mechanical system, with one control input and two output responses [15]. The control input is the driving force (
), generated by the motor to move the trolley horizontally [16]. The system outputs to be controlled are the load position (
) and the pendulum angle (
), representing the trolley displacement and the swing of the suspended payload, respectively.
The crane model consists of a trolley with mass (
) and a payload with mass (m2). The system can be conceptually represented as shown in Fig. 1, where the applied force (
) drives the trolley, while the payload oscillates as a pendulum attached to it. The objective of the controller is to ensure accurate trolley positioning while minimizing the payload swing angle during motion [17]-[19]. Parameters are listed in Table 1.
Parameter/ | Description | Value | Unit |
| Total vehicle mass | 1.68 | kg |
| Payload Mass | 0.1 | kg |
| Cable length connecting the vehicle and the load | 0.2 | m |
| Acceleration | 9.81 | m/(s2) |
| Vehicle friction coefficient | 0.63 | N/(m/s) |
| Motor resistance | 2.7 |
|
| Motor reactance | 1.4×10-3 | H |
| Back-EMF constant | 5.3×10-3 | V.rad/s |
| Torque constant | 5.3×10-3 | Nm/A |
| Rotor moment of inertia | 0.049×10-4 | kg.m2 |
| Viscous friction coefficient | 5×10-4 | Nm/(rad/s) |
| Motor friction torque | 7.8×10-3 | Nm |
| Torque load | - | Nm |
| Motor angular speed | - | rad/s |
| Motor torque | - | Nm |
| Engine Rotation Angle | - | rad |
| Gear Ratio | 40/25 | - |
Thus, the system's dynamic equations are formulated with Euler – Lagrange as follows:
| (1) |
By employing the Euler-Lagrange formulation, the equations of motion governing the system are derived as presented in (2) and (3):
| (2) |
| (3) |
For the dynamic analysis and controller design of the 2D crane system, the actuator, a direct current (DC) motor, is modeled by the electro-mechanical diagram shown in
Fig. 2, with its characteristic physical parameters detailed in Table 2.
Parameter/ Variable | Unit | Describe |
|
| motor resistance |
| H | reactance coefficient |
| V.s/rad | counter-electric constant |
| N.m/A | moment constant |
| kg.m2 | moment of inertia of the rotor |
| Nm/(rad/s) | viscous coefficient of friction |
| Nm | frictional torque in the engine |
| Nm | drag torque |
| rad/s | motor shaft speed |
| Nm | internal torque |
| rad | motor shaft angle |
R | pulley radius | |
| transmission ratio of the engine |
The derived equations of motion can be rewritten in the standard matrix form as follows:
| (4) |
With:
| (5) |
| (6) |
| (7) |
| (8) |
Applying Cramer's rule to the full dynamic system (4), using the component matrices (5)-(8), to solve for the generalized accelerations.
and
results in the following state-space form in (9), (10):
| (9) |
| (10) |
The Basic Fuzzy Logic Controller (FLC) structure consists of three principal components that process signals sequentially, as illustrated in the block diagram. The first component is the Fuzzification Unit, which converts the crisp feedback value received from the plant's output into linguistic variables represented by fuzzy sets. This fuzzy information is then passed to the Fuzzy Inference Engine (FIE), the most critical element of the controller. The FIE includes the Control Rule Base (often derived from expert knowledge and experience) and the Inference Mechanism (such as Mamdani or Sugeno) to map the input fuzzy sets to the output fuzzy sets. Finally, the Defuzzification Unit translates the inferred fuzzy variables from the rule base output back into a single crisp value, which serves as the control signal for the system. Furthermore, auxiliary Preprocessing and Post-processing blocks are often integrated into the overall controller structure to facilitate better input scaling and easier fine-tuning of the fuzzification and defuzzification stages, respectively. This theoretical framework is visually represented in Fig. 3.
The design of the Fuzzy Proportional-Derivative (Fuzzy PD) Controller follows a systematic seven-step procedure. Initially, the operational ranges for the input variables (Error, E, and Change of Error, DE) and the output variable (Control Signal, U) are determined. These physical variables are then scaled to a normalized universe of discourse, typically [-1, 1], using normalization factors. Subsequently, linguistic variables are defined and quantified into fuzzy sets via appropriate membership functions. The core of the design involves constructing the Fuzzy Rule Base, utilizing principles of continuity and symmetry. Finally, the controller mandates the selection of a specific Fuzzy Inference Method (e.g., MAX-MIN) and a Defuzzification Method (e.g., Centroid) to yield a crisp control signal. The entire system is then subject to iterative fine-tuning of the normalization factors and membership functions to achieve the desired control performance. The complete architecture resulting from this design process is illustrated in Fig. 4.
The Artificial Neuron, the fundamental unit of any neural network, is fundamentally defined by three key components: input weights, an activation function, and a threshold (or bias). The activation function, which determines the neuron's output, can be chosen from various standard forms, including the step function, signum function, linear function, saturated ramp function, or unipolar sigmoid function.
Neural Networks can be broadly classified based on their structural configuration. Classification by layer structure differentiates between a Single-Layer Network, which consists of only one processing layer of neurons, and a Multi-Layer Network, which comprises multiple layers for complex feature extraction. Furthermore, classification by signal flow dynamics distinguishes Feedforward Networks (FFN), where signals propagate exclusively in one direction from input to output without loops, and Recurrent Networks (RNN), which are characterized by feedback loops that enable temporal memory and sequence processing. These structural configurations are illustrated in Fig. 5.
The Adaptive Neuro-Fuzzy Inference System (ANFIS) represents a hybrid computational model that synergistically combines the learning and optimization capabilities of Artificial Neural Networks with the interpretability of Fuzzy Inference Systems via characteristic "if-then" rules. Structurally, ANFIS adopts a five-layer feedforward architecture, mirroring the steps of a TSK-type fuzzy model: Layer 1 (Fuzzification Layer) uses membership functions (
) to determine the degree of membership for input variables (
); Layer 2 (Product Layer) calculates the firing strength (
) of each rule by multiplying the input membership degrees; Layer 3 (Normalized Layer) normalizes these firing strengths (
); Layer 4 (Defuzzification Layer) computes the local output (
) via a linear function based on the input variables; and Layer 5 (Output Layer) aggregates these outputs to form the final crisp result (
). The training process employs a hybrid algorithm, combining the back-propagation algorithm for tuning the membership function parameters and the least-squares method for optimizing the linear weights, granting ANFIS high performance in approximating nonlinear functions and time-series forecasting.
GA is a stochastic search method rooted in the principles of natural evolution and genetics, aiming to find optimal solutions. The evolutionary process generates new individuals through crossover (recombination) from parent generations, with mutation also playing an essential, albeit less probable, role. GA, along with other evolutionary algorithms, mimics three core natural evolutionary processes: natural selection, reproduction (crossover), and mutation. The execution typically begins with a randomly generated chromosome population. Each chromosome is evaluated based on its performance (fitness), and selection pressure ensures that high-performing individuals are more likely to reproduce. The flowchart of the Genetic Algorithm is presented in Fig. 6.
GA's performance is governed by several critical initialization parameters: Maximum Generations (max_generation), which dictates the stopping criterion based on iteration count; Maximum Stall Generations (max_generation), used to stop the process if the population converges prematurely; and the Epsilon Threshold (epsilon), which defines an acceptable solution quality based on the objective function
. Other essential parameters include the Population Size (pop_size), the Parameter Range (range), defining the bounds for the six parameters (
to
), which explicitly represent the scaling and adjustment parameters of the Fuzzy Controller's preprocessing and post-processing units. Decimal Position (dec), the Significant Digits (sig), and the two primary probabilistic controls: Crossover Probability (cross_prob) and Mutation Probability (mutate_prob).
The 2D crane system continuously measures state variables, position (
), and angle (
), via an Encoder. The central STM32 microcontroller processes these inputs. Upon meeting the set-point criteria, the Intelligent Control module, often implemented as a Fuzzy-Adaptive Controller to handle system parameter deficiencies in real-time, calculates the optimal signal. This is transmitted as a PWM Pulse Signal to the L298 driver, which amplifies the current to drive the DC motor, ensuring precise anti-sway positioning and load stabilization. The 2D crane system is shown in Fig. 7.
This study presents the design of a Sugeno Fuzzy Controller for a 2D crane system. The controller utilizes two input variables: Position Error (E) and Change in Position Error (
E), with the output variable being the Control Signal (U), which acts on the trolley position. To represent the physical values of the input and output variables, a set of five linguistic variables was established for the inputs and outputs, as annotated in Table 3.
Symbol | Describe |
NB` | Negative Big |
NS | Negative Small |
ZE | Zero |
PS | Positive Small |
PB | Positive Big |
The Membership Functions (MFs) are crucial for mapping crisp inputs/outputs to fuzzy sets. The overall input structure is shown in Fig. 8. The MFs are designed symmetrically and are detailed as follows Fig. 9 illustrates the MFs for the first input, Position Error (E), Fig. 10 illustrates the MFs for the second input, Rate of Change of Position Error (
E), and Fig. 11 illustrates the MFs associated with the Control Signal Output (
). The MF structure for the Position and Angle variables is considered equivalent, allowing the focus of the detailed description to be on the position control aspect.
The group uses the output according to Sugeno fuzzy rule; the values shown in the figure are NB (-1), NM (-0.67), NS (-0.33), ZE (0), PS (0.33), PM (0.67), and PB (1), respectively Fig. 11. Based on these defined values, the complete control law for the crane position is detailed in Table 4.
The system uses the state feedback principle, where the state variables that need to be controlled are fed back and compared with the input value. The error signal is fed into two fuzzy sets that control the crane position and pendulum angle. This entire control architecture is illustrated by the GCS system diagram in Simulink in Fig. 12, while its detailed internal configuration is presented in Fig. 13.
The values
and
are values that are refined and adjusted through testing and evaluation, selecting pre-processing and post-processing parameters
that bring the best system quality. We choose according to Table 5.
STT | e | de/dt | u |
1 | NB | NB | NB |
2 | NB | NS | NB |
3 | NB | ZE | NM |
4 | NB | PS | NS |
5 | NB | PB | ZE |
6 | NS | NB | NB |
7 | NS | NS | NM |
8 | NS | ZE | NS |
9 | NS | PS | ZE |
10 | NS | PB | PS |
11 | ZE | NB | NM |
12 | ZE | NS | NS |
13 | ZE | ZE | ZE |
14 | ZE | PS | PS |
15 | ZE | PB | PM |
16 | PS | NB | NS |
17 | PS | NS | ZE |
18 | PS | ZE | PS |
19 | PS | PS | PM |
20 | PS | PB | PB |
21 | PB | NB | ZE |
22 | PB | NS | PS |
23 | PB | ZE | PM |
24 | PB | PS | PB |
25 | PB | PB | PB |
To validate the performance and stability of the designed Sugeno fuzzy controller (with the rule base presented in Table 5), this research analyzes the 2D crane system's response via its key state variables (Fig. 14). The trolley position response demonstrates superior control performance: the overshoot is minimal (less than 5%), the settling time is rapid (approximately 3 seconds), and the steady-state error is completely eliminated. Regarding the anti-sway capability, Fig. 15 illustrates that the pendulum angle is rapidly stabilized to its equilibrium (0 degrees) within approximately 4 seconds. It exhibits no steady-state error and no residual oscillation, affirming the controller's superior stabilization capability despite a significant amplitude during the transient phase, and also quickly converges to zero. Synthesizing these results, the Sugeno fuzzy controller has demonstrated its capability to simultaneously achieve both control objectives: moving the trolley to the desired position rapidly and accurately, and effectively damping the pendulum oscillation. This confirms the high stability and performance of the proposed algorithm.
Pre-treatment | Value | post- processing | Value |
K1 | 1 | K3 | 87 |
K2 | 0.7 | K6 | 109 |
K4 | 0.3 | ||
K5 | 0.2 |
Although the Fuzzy Logic Controller (FLC) has demonstrated effectiveness in handling complex nonlinear systems like the 2D crane, its performance heavily relies on expert experience for precise design of Membership Functions (MFs) and the Rule Base; to overcome this limitation, this study adopts the Neuro-Fuzzy approach, utilizing the learning and adaptation capabilities of an Artificial Neural Network (ANN) to tune and optimize the initial fuzzy controller, a combination which inherits the linguistic interpretability of fuzzy logic and the adaptability of neural networks through data learning. To implement the learning process of the initial fuzzy controller, a Feedforward Neural Network has been constructed to simulate and learn the knowledge contained in the controller's rule base Fig. 12. The training data for the neural network is explicitly generated and extracted from the input-output mapping behavior of the two Fuzzy Inference Systems (FIS) within the Simulink model shown in Fig. 16, and the training process is performed according to the network's learning principles; the neural network architecture used Fig. 17 is designed in a basic three-layer model: an Input Layer, a Hidden Layer, and an Output Layer. Specifically, the Input Layer consists of 2 perceptrons, corresponding to the two input variables of the fuzzy controller: Position Error (E) and Rate of Change of Error (
); the Hidden Layer consists of 40 perceptrons, utilizing the Hyperbolic Tangent Sigmoid (tansig) Activation Function to introduce the necessary nonlinearity for learning complex relationships; and the Output Layer consists of 1 perceptron, utilizing the Linear Activation Function (purelin), allowing the network to output a continuous control value (
) for the trolley; the network is trained using the Resilient Propagation (trainrp) algorithm with a fixed number of 10,000 epochs, after training, the neural network will serve as an optimized surrogate controller, ready for integration into the system model for performance evaluation. The program uses a supervised learning method, with the collection of input and output data samples of two fuzzy sets.
The architecture of the proposed neural network consists of three layers: an input layer with 2 neurons, a hidden layer comprising 40 neurons, and an output layer with a single neuron. This structural configuration is illustrated in Fig. 18 and Fig. 19.
To evaluate the learning quality of the neural network, its response was benchmarked against the original Sugeno fuzzy controller across the key state variables of the 2D crane system. Specifically, Fig. 20 (Position Response) demonstrates that the response curve of the Trained Neural Block tightly tracks the behavior of the Fuzzy Controller. Consequently, the neural model successfully inherits the superior performance characteristics of the baseline system, achieving a minimal overshoot of less than 5%, a rapid settling time of approximately 3 seconds, and zero steady-state error.
It is worth noting that while the neural network exhibits slight optimization characteristics, the quantitative improvement is negligible. This phenomenon is attributed to the fact that the original Sugeno fuzzy controller was already highly optimized, leaving little room for significant enhancement. Similarly, the comparison in Fig. 21 (Pendulum Angle Response) confirms high consistency, where the neuro-controller replicates the effective anti-sway capability, stabilizing the pendulum to its zero equilibrium within approximately 4 seconds with no residual oscillation. Thus, the results confirm that the neural model functions as a high-fidelity emulator, effectively preserving the high stability and precision of the designed fuzzy controller without degrading its performance.
A deeper analysis of the controller behaviors reveals distinct trade-offs inherent to each learning approach. Firstly, the ANN controller closely mirrors the Fuzzy Logic Controller's performance without surpassing it. This occurs because the ANN was trained via supervised learning using data generated by the FLC. Thus, the network functions solely as a high-precision approximator of the FLC, limited by the 'teacher's' capabilities and unable to autonomously derive a superior control strategy.
To optimize the initial Fuzzy Logic Controller (FLC) and address its dependency on expert experience, this study employs the Adaptive Neuro-Fuzzy Inference System (ANFIS) architecture. ANFIS utilizes a hybrid learning algorithm to automatically tune and optimize the internal parameters of the Sugeno controller, including the Membership Functions (MFs) and the output coefficients. The training data set for the ANFIS is shown in Fig. 16. Subsequently, the trained ANFIS model, which acts as the resulting controller, is depicted in Fig. 22, consisting of input-output (I/O) pairs from both fuzzy inference blocks (position x and theta
). To ensure the physical feasibility and safety of the system, the final control signal is strictly limited within the range of [-0.2, 0.2]. The ANFIS training process is executed on this constrained dataset to produce an adaptive controller that not only learns the original fuzzy logic but also ensures stability and physical safety during operation. Specifically, the training data and progression are explicitly detailed for each block: Fig. 23 presents the positional angle learning data, and the subsequent process of learning the position blocks is illustrated in Fig, 24 Similarly, the theta angle learning data is shown in Fig. 25, while the process of learning the theta blocks is depicted in Fig. 26.
The proposed system is implemented using an Adaptive Network-based Fuzzy Inference System (ANFIS) architecture, structurally comprising three primary layers: the input, rule, and output layers. In this configuration, each fuzzy inference module corresponds to an ANFIS structure featuring two inputs, where each input variable is fuzzified using 14 Gaussian membership functions (gaussmf), while the single output is approximated via a linear combination of the consequent fuzzy rules. The training process employs the intrinsic hybrid learning algorithm, integrating the least squares estimator with the gradient descent method, and is executed over a duration of 50 epochs.
A comparative analysis between the ANFIS controller and the Neural network was conducted to evaluate the effectiveness of the adaptive learning optimization. In terms of trolley movement, the Position Response indicates that the ANFIS controller achieves superior agility compared to the Neural model. Specifically, the adaptive system reaches the desired setpoint approximately 0.5 seconds earlier, demonstrating a significant improvement in rise time and transient tracking speed.
A comparative analysis between the ANFIS controller and the Neural network was conducted to evaluate the effectiveness of the adaptive learning optimization. In terms of trolley movement, the Position Response Fig. 27 indicates that the ANFIS controller achieves superior agility compared to the Neural model. Specifically, the adaptive system reaches the desired setpoint approximately 0.5 seconds earlier than the Neural controller, demonstrating a significant improvement in rise time and transient tracking speed.
However, this aggressive dynamic response introduces a performance trade-off observable in the Pendulum Angle Response Fig. 28. While the ANFIS controller successfully maintains stability with a settling time comparable to the Neural system, its initial peak overshoot is nearly double the amplitude exhibited by the Neural controller. This behavior suggests that, unlike the Neural model, which functions primarily as a faithful emulator of the Fuzzy logic, the ANFIS architecture operates as an aggressive optimizer. It effectively prioritizes faster positional convergence, accepting a higher initial sway amplitude while ensuring the load still rapidly stabilizes to the zero equilibrium without residual oscillation.
The ANFIS controller demonstrates a clear trade-off between speed and stability. The ANFIS training process focuses on minimizing the tracking error (RMSE), which tunes the membership functions to react more aggressively to error signals. While this successfully sharpens the transient response and reduces rise time, the resulting high-gain behavior leads to increased overshoot as the system struggles to dissipate the kinetic energy quickly enough near the setpoint. This highlights that while ANFIS improves dynamic tracking, it does so at the cost of a slightly degraded damping ratio compared to standalone FLC.
GA is employed to optimize the scaling factors in the pre-processing and post-processing stages of the fuzzy controller to enhance the control performance of the 2D crane system. The optimization variables, such as the input error and derivative scaling factors, and the output gain coefficients, are encoded as chromosomes. The GA parameters, including the number of generations, population size, crossover rate, mutation rate, elitism rate, as well as the search bounds and termination conditions, are determined from the MATLAB simulations (illustrated in Fig. 29). The fitness function combines key performance criteria such as settling time, overshoot, and steady-state error to evaluate each individual. Through the evolutionary processes of selection, crossover, and mutation, the GA converges toward the optimal set of fuzzy controller parameters that significantly improve system stability and dynamic response.
Simulation results indicate that the Genetic Algorithm successfully optimized the pre-processing and post-processing parameters of the fuzzy controller. The crane position shown in Fig. 30 reaches steady state in approximately 5 s, with a steady-state error close to zero and an overshoot of about 7%. The pendulum angle in Fig. 31 stabilizes after roughly 6 s; larger oscillations are observed at the setpoint transition because the crane must move rapidly to the new reference. System performance could be further improved by allowing GA to explore wider search bounds and by increasing the number of generations. This study was limited to 50 generations; however, the obtained results already largely satisfy the design requirements.
The quality index function
is equal to the sum of the squares of the crane position error and the square of the deviation angle error. After about 43 generations, as shown in Fig. 32. The value of
decreased from 18.45 to 17.4254, which shows that the crane position error and the deviation angle error have been reduced, and GA works well, as shown in Table 6.
Pre-treatment |
|
|
|
|
|
| |||||
Value | 0.975 | 0.5310 | 99.722 | 0.102 | 0.098 | 135.598 | |||||
Below is the hardware model of the Crane 2D system used for experimentation. The components of the actual system are divided into seven parts, as shown in Fig. 33 which include:
Following the simulation phase, the controller was implemented on the physical model to verify its stability. While hybrid intelligent control schemes such as ANFIS, Neural Networks, or Genetic Algorithms were considered, the experimental validation in this study focuses exclusively on the proposed Fuzzy Logic Controller (FLC). The empirical results demonstrated that the FLC provides sufficient robustness and stabilization capabilities for the physical model. Implementing more complex hybrid algorithms would impose significant computational overhead and implementation complexity, yielding only marginal improvements in performance compared to the standalone FLC. Therefore, to prioritize real-time efficiency and practical implementation, this paper limits the experimental scope to the Fuzzy Logic approach.
The control algorithms were implemented within the MATLAB/Simulink R2016a environment. The simulation was configured using a fixed-step solver with a sampling time of 0.001 s. To bridge the simulation with the physical hardware, the Waijung Blocksetwas utilized. Waijung is a rapid control prototyping toolkit designed for the efficient deployment of embedded systems directly from Simulink. Specifically, Waijung 1 supports the STM32 microcontroller family, optimizing performance for the STM32F0 and STM32F4 series, and provides comprehensive libraries to facilitate seamless hardware interfacing and connectivity.
Experimental results obtained from this setup are presented in Fig. 35 to Fig. 40, which illustrates the actual crane position, actual pendulum angle, and the actual control signal, respectively. Subsequently, to further evaluate the controllability of the Fuzzy controller, we modified the pre-processing and post-processing steps based on the three cases defined in Table 7.
STT | Position control | Angle control | ||||
Pre- | Post- | Pre- | Post- | |||
1 | 4 | 0.15 | 50 | 2 | 0.15 | 80 |
2 | 6 | 0.2 | 50 | 1.8 | 0.2 | 80 |
3 | 8 | 0.1 | 60 | 1.8 | 0.3 | 70 |
This variation aimed to analyze the influence of pre- and post-processing parameters on control capability, specifically focusing on the system's ability to achieve anti-sway performance and precise positioning under different operating conditions.
Based on Fig. 35 and Fig. 36 we can see that the pendulum position is relatively close to the set value, the setting error is still large, and at the same time, many oscillations appear. For the pendulum deflection angle, the system responds quite quickly; however, the pendulum appears to have a slight oscillation amplitude (-1 to 1 degree) around the equilibrium position. This oscillation phenomenon appears due to the influence of the potentiometer sensor, because initially the group calculated the pendulum angle at the equilibrium position to deviate from the value of 0 by about -0.5 degrees.
Based on Fig. 37 and Fig. 38, we see that the oscillations of the position and deflection angle of the pendulum begin to decrease. However, the dynamic amplitude of the pendulum position is somewhat larger. On the other hand, the pendulum in case 2 has a larger initial deflection and angle, but the overshoot is much lower than in case 1.
Based on Fig. 39 and Fig. 40 We can see that the pendulum position has been adjusted around the desired position, and the response time is also significantly faster than the two cases above. The amplitude of oscillation is also significantly reduced. For the pendulum deflection angle, the amplitude of oscillation is also significantly reduced compared to the two cases above.
In experimental verifications conducted by Wahyudi [20], The limitations of the PID controller were clearly exposed under real-world conditions. Their hardware results show that while PID could control the trolley position, it failed to effectively suppress the payload sway, resulting in prolonged residual oscillations. Furthermore, the PID controller relies on robustness; its performance degraded significantly when system parameters, such as cable length, were varied. In contrast, the Fuzzy Logic approach demonstrates superior damping capabilities and maintains stability across different operating points, highlighting the necessity of intelligent control for physical crane systems.
This paper proposed a Fuzzy Control, optimized via ANFIS and GA, to address the stabilization of a crane system. Both simulation and experimental results confirmed that the proposed controller maintains system stability effectively. Specifically, MATLAB simulations demonstrated precise positioning and effective anti-sway control within the target settling time. Furthermore, experimental validation on a physical model across three distinct operating cases corroborated the FLC's practical effectiveness. However, it is acknowledged that optimal performance is constrained by sensor noise, leading to minor oscillations in specific high-stress scenarios.
To address these limitations, future research will focus on several key directions. First, we aim to bridge the gap between simulation and practice by implementing the computationally intensive ANFIS and GA-optimized controllers directly on real-time embedded hardware. Second, the robustness of the system will be rigorously tested under varying payload masses and changing cable lengths to simulate diverse load conditions. Finally, the scalability of the proposed control scheme will be assessed on industrial-scale crane systems to verify its applicability in practical logistics and heavy-duty environments.
This research was funded by Ho Chi Minh City University of Technology and Engineering, Vietnam, under grant No. SV2026-224. We want to give thanks to Ms. Eng. Thi-Thanh-Hoang Le (HCM-UTE) for her supervision of this project. We, authors, are grateful for those supports. Link of video is: https://www.youtube.com/watch?v=QT_quyjp9mU.
Trung-Son Huynh, Intelligent Control for 2D-Crane System