v3i2. Sains Data Jurnal Studi Matematika dan Teknologi ISSN 2986-903X https://pub. id/sainsdata Design and Evaluation of a Ship Fin Stabilizer System Based on Mamdani and Sugeno Fuzzy Logic Using MATLAB Muhhammad Iyan Putra Pratama1*. Achmad Zain Nur2. Dian Neipa Purnamasari3 1,2,3 Departement of Electrical Engineering. University of Trunojoyo Madura. Jl. Raya Telang PO. Box 2 Kamal Bangkalan 69161. Indonesia *E-mail address: iyan. pratama@trunojoyo. DOI: 10. 52620/sainsdata. ABSTRACT This study addresses the design and evaluation of a ship fin stabilizer control system aimed at damping roll and pitch motions caused by wave-induced disturbances. The system employs an MPU6050 sensor to acquire ship inclination angle data, which are subsequently processed by a fuzzy logicAebased Two fuzzy inference methods, namely Mamdani and Sugeno, are implemented and analyzed using MATLAB as the simulation platform. The input variables consist of roll and pitch angles, while the output variables correspond to the actuation angles of the right and left fin stabilizers. The system is designed with three membership functions for each input variable and a total of nine fuzzy rules. Simulation results demonstrate that the fuzzy controller is capable of generating adaptive fin angle responses that appropriately correspond to variations in ship inclination and maintain a stable condition under equilibrium states. The findings indicate that fuzzy logic offers a flexible and effective approach for ship stabilization systems in simulation-based environments. Keywords: Ship fin stabilizer. Fuzzy logic control. Mamdani inference. Sugeno inference. Roll and pitch stabilization. MATLAB simulation. This work is licensed under a Creative Commons Attribution 4. 0 International License A 2025 Author . Introduction Ship stability is the ability of a vessel to maintain balance and remain in a safe operating condition while navigating under various sea states. This capability includes the vesselAos ability to counteract roll motion caused by ocean waves, which is one of the primary motions affecting sailing comfort and safety . Ships operating in offshore waters experience motions resulting from hydrodynamic effects, consisting of three translational motionsAisurge, sway, and heaveAiand three rotational motionsAiroll, pitch, and yawAias illustrated in Figure In ship motion analysis, the motions that predominantly receive dynamic responses from the vessel include roll and pitch motions . Figure 1. Ship movement Ship stability is influenced by various factors, such as hull geometry, vessel weight, center of gravity, and environmental conditions including wave height and ocean currents . In this study, only ship inclinations related to roll and pitch motions are considered. Therefore, a ship stabilization mechanism using fin stabilizers is required to maintain vessel stability . Sains Data Jurnal Studi Matematika dan Teknologi ISSN 2986-903X https://pub. id/sainsdata Fin stabilizers are employed to dampen and reduce roll and pitch motions caused by external disturbances, operating based on fin position control principles . Fuzzy control methods are adopted in this study due to their significant relevance in enhancing ship stability under unpredictable sea conditions . By utilizing realtime marine environmental data, fuzzy-based systems can optimize fin stabilizer operation to maintain ship In other words, fuzzy methods provide the flexibility needed to handle uncertainty in marine environments that may endanger vessel safety. The application of fuzzy control in ship stabilization systems is expected to achieve faster, more effective, and real-time system responses. The MPU6050 sensor is used to detect ship inclination . , producing roll and pitch outputs that serve as inputs to the fuzzy control system. The greater the error deviation from the set point, the larger the angular motion generated by the stepper motor to actuate the fins. MATLAB software is utilized as a powerful simulation platform to implement and analyze fuzzy logic concepts through an intuitive programming and simulation environment . Previous studies focused on passenger ships and employed the ANFIS method . In contrast, this research aims to evaluate the effectiveness of fuzzy control applied to fin stabilizers by conducting a comparative analysis titled AuComparative Analysis of Fuzzy Sugeno and Mamdani Methods in a Ship Stabilizer System Using MATLAB. Ay Previous Works A previous study entitled AuPrototype of a Ship Roll Stabilizer System Using Automatic Fin Stabilizers with the Adaptive Neuro-Fuzzy Inference System (ANFIS) MethodAy reported the use of an Arduino Mega microcontroller as the main instruction-processing unit, with inputs obtained from a gyroscope sensor, an ultrasonic sensor, and a wind sensor. These sensors were employed to detect ship inclination caused by wave motion and wind forces. Wave height was measured using an ultrasonic sensor positioned above the water surface, while wind speed was detected using an anemometer, and ship inclination was measured using a gyroscope sensor. Based on the processed sensor data, the system automatically actuated the right and left servo motors to stabilize the vessel. To achieve ship stability, the Adaptive Neuro-Fuzzy Inference System (ANFIS) method was applied, which combines fuzzy logic and artificial neural networks to enhance control performance . Another related study entitled AuImplementation of a Fin Stabilizer System on a Monohull Ship Prototype Using a PID ControllerAy developed a monohull ship prototype capable of motion with improved stability compared to a monohull vessel without fin stabilizers. The control method employed was a ProportionalAeIntegralAeDerivative (PID) controller, which demonstrated effective performance in continuously maintaining ship stability toward a roll set point of 0A. The system utilized an MPU6050 sensor, an Arduino Nano microcontroller, and MG966R servo motors, with the ship prototype measuring 70 cm y 18 cm y 15 cm . In general, fin stabilizer systems are classified into two types: passive fin stabilizers and active fin stabilizers . This study adopts an active fin stabilizer system. Active fin stabilizers are roll damping devices installed on the lower left and right sides of a shipAos hull, designed to maintain vessel balance while operating in water and functioning based on fin position control principles . These devices aim to reduce roll motion induced by ocean waves. Not all ships are equipped with fin stabilizers. however, their installation is intended to enhance passenger and crew comfort, protect onboard equipment, and improve weapon system accuracy on naval vessels, particularly fast attack crafts and patrol ships . The operation of fin stabilizers depends on ship speed and roll amplitude. At low ship speeds, fin angles must be relatively large, whereas at higher speeds, smaller fin angles are required . Similarly, larger roll amplitudes necessitate greater fin angles, while smaller roll amplitudes require reduced fin deflections. Since roll amplitude continuously varies, fin angles must adapt dynamically to these changes. Fin angle regulation based on ship speed is typically adjusted using a speed control switch on the control panel . Data on roll amplitude and period are obtained from rate gyroscopes integrated directly with the hydraulic and mechanical systems of the fin stabilizer . In this study, fin stabilizer control is implemented using stepper motors mounted on the left and right sides of the shipAos hull. Fuzzy logic was first introduced by Lotfi A. Zadeh, a mathematician and computer scientist, in the 1960s. Zadeh proposed the concept of fuzzy sets to represent approximate values rather than precise ones, enabling mathematical modeling of uncertainty . Unlike digital logic, which operates with binary values . , fuzzy logic allows degrees of membership ranging from 0 to 1. This approach enables the representation of imprecise linguistic concepts such as Aulow,Ay Aumedium,Ay and Auhigh,Ay making fuzzy logic particularly suitable for systems involving uncertainty and nonlinear behavior . , . Sains Data Jurnal Studi Matematika dan Teknologi ISSN 2986-903X https://pub. id/sainsdata Method As illustrated in Figure 3. 1, the system employs an MPU6050 sensor as the reference input . et poin. The gyroscope sensor detects ship inclination caused by wave disturbances, specifically in terms of roll and pitch The measured inclination data are transmitted to and processed by an Arduino Nano microcontroller. Based on the processed data, the Arduino Nano generates PWM signals that are sent to a stepper motor driver, which actuates the fin stabilizer system to restore ship balance. The angular data obtained from the gyroscope are also transmitted to and displayed on a web interface via a Raspberry Pi microcontroller. Figure 2. Proposed design architecture The Fuzzy Sugeno and Mamdani methods are commonly referred to as fuzzy inference or rule evaluation In the Sugeno approach, the output of the fuzzy inference process is not represented as a fuzzy set, but rather as a constant value or a linear function of the input variables. Fuzzy methods are employed in this study because they are based on relatively simple concepts, making them easy to understand and implement. addition, fuzzy logic offers high flexibility and is well suited for handling nonlinear systems and uncertainties commonly encountered in dynamic environments. Figure 3. Flowchart of proposed design The research methodology consists of several stages, as illustrated in Figure 3. The fuzzy control process begins with the acquisition of gyroscope data from the MPU6050 sensor and concludes with PWM output signals used to generate stepper motor angular motion. The detailed stages of the fuzzy method are described as follows: The gyroscope acquires angular data in real time to determine the shipAos degree of inclination. Three types of angular data are generated by the gyroscope: pitch, roll, and yaw. However, only pitch and roll data are utilized in this study, while yaw data are not considered. After the angular data are captured, they are immediately transmitted to the microcontroller for processing using the Fuzzy Mamdani and Fuzzy Sugeno methods. These methods convert ship inclination data into stepper motor angular motion required to stabilize the vessel. The input data then undergo the fuzzification process, which transforms non-fuzzy . inputs into fuzzy sets. During this stage, crisp input values are mapped into corresponding fuzzy membership functions based on the defined knowledge base. Following fuzzification, the inference process is performed. This stage combines the fuzzified input values using the predefined rule base to produce new fuzzy output values. Defuzzification is the final stage of the fuzzy logic system, in which the fuzzy outputs obtained from the inference process are converted into real-valued numerical outputs. In the final step, the results of the fuzzy processing are transformed into actuator speed commands for the DC stepper motor, enabling the ship to achieve balance at the desired inclination point. Sains Data Jurnal Studi Matematika dan Teknologi ISSN 2986-903X https://pub. id/sainsdata Result and Discussion 1 Testing Using the Mamdani Inference Method Input Variables There are two input variables used in this study: roll and pitch gyroscope angles. The complete representation of the input membership functions is shown in the figure below. Roll The roll gyroscope membership function (MF) consists of three fuzzy sets: left tilt, stable, and right tilt, covering an angular range from Oe50A to 50A. Figure 4. Membership function giro roll Pitch The pitch gyroscope membership function (MF) consists of three fuzzy sets: forward tilt, stable, and backward tilt, covering an angular range from Oe50A to 50A. Negative values indicate forward pitching motion of the vessel, while positive values represent backward pitching motion. Figure 5. Membership function giro roll Output Variables There are two output variables in the system: the right fin and the left fin. Each output variable consists of three fuzzy sets, namely downward, stable, and upward, with an operating range from 50 to 140. In this study, the stable fin position is defined at a value of 90, which represents a straight or neutral fin orientation, as measured using a protractor. Fin values below 80 indicate a downward fin direction, while values above 100 indicate an upward fin If the resulting output value lies within the transition ranges between 80 and 90 or between 90 and 100, the output is further processed using average-based inference to obtain the final fin angle. The MATLAB simulation design for the fin output variables is illustrated in Figures 6 and 7. Figure 5. Left Fin Response Figure 6. Right Fin Response Rule Generation In the development of a ship stability control system based on a Mamdani fuzzy inference model implemented on an Arduino microcontroller, the configuration of the fuzzy rules constitutes a critical component of the system. A total of nine rules are defined as the basis for the decision-making process in determining fin stabilizer The complete rule configuration is presented in Figure 4. This rule base represents the core of the system, as it enables the controller to interpret gyroscope sensor inputs and generate appropriate outputs for the right and left fin angles. Sains Data Jurnal Studi Matematika dan Teknologi ISSN 2986-903X https://pub. id/sainsdata The resulting rule base is defined as follows: If roll is left tilt and pitch is forward tilt, then the right fin angle is downward and the left fin angle is upward. If roll is left tilt and pitch is stable, then the right fin angle is downward and the left fin angle is upward. If roll is left tilt and pitch is backward tilt, then the right fin angle is downward and the left fin angle is If roll is stable and pitch is forward tilt, then the right fin angle is upward and the left fin angle is upward. If roll is stable and pitch is stable, then the right fin angle is stable and the left fin angle is stable. If roll is stable and pitch is backward tilt, then the right fin angle is downward and the left fin angle is If roll is right tilt and pitch is forward tilt, then the right fin angle is upward and the left fin angle is If roll is right tilt and pitch is stable, then the right fin angle is upward and the left fin angle is downward. If roll is right tilt and pitch is backward tilt, then the right fin angle is upward and the left fin angle is Figure 7. Generate rule Fuzzy Model Testing This section discusses the performance evaluation of the developed fuzzy model. Through a series of tests, the effectiveness of the proposed model is assessed under various operating conditions. The results of these tests provide valuable insights into the capabilities and advantages of the designed fuzzy model in controlling the ship stabilizer system. Figure 8. Output when fin 0A The MATLAB simulation results show that when the roll and pitch inclination inputs are both set to 0A, the resulting angles of fin 1 and fin 2 are each 90A, indicating a neutral and stable fin position. This condition represents the equilibrium state of the vessel, in which no corrective action is required from the fin stabilizer Further testing was conducted by applying a roll angle of 30A and a pitch angle of 90A as input conditions. The system response under these inputs is analyzed to observe the behavior of the fin angles and to evaluate the capability of the fuzzy controller in generating appropriate corrective actions to restore ship stability. Roll Angle Test at 30A The MATLAB simulation response shows that when a roll inclination of 30A and a pitch angle of 0A are applied as inputs, the resulting right fin angle is 119A, while the left fin angle reaches 61A. This output indicates asymmetric fin actuation, which is required to counteract the roll motion and restore ship stability. Sains Data Jurnal Studi Matematika dan Teknologi ISSN 2986-903X https://pub. id/sainsdata Figure 9. Output when roll 30A Roll Angle Test at 30A The MATLAB simulation results show that when a roll angle of 0A and a pitch angle of 30A are applied as input conditions, both the right and left fin angles are adjusted to 66. This symmetric fin response indicates that the fuzzy controller generates equal corrective actions on both fins to counteract pitch motion and restore ship Figure 9. Output when pitch 30A Conclusion Based on the simulation results and analysis conducted using MATLAB. MATLAB-based fuzzy simulations provide an effective framework for implementing and analyzing control systems that involve uncertainty in ship inclination conditions. By utilizing the MATLAB Fuzzy Logic Toolbox, simulation models can be developed using linguistic rule-based approaches to handle inputAeoutput relationships and optimize system performance while accounting for variations and uncertainties. In the implementation of the fin stabilizer control system using fuzzy logic, three membership functions are defined for each input variable, resulting in a total of nine fuzzy rules. References