0% found this document useful (0 votes)
10 views8 pages

Ship Control System Project Report

The project report details the development of a Ship Control System using MATLAB's Simscape, Simulink, and Machine Learning modules, focusing on modeling ship behavior and implementing a PID controller for heading control. The integration of these tools allowed for effective tuning of the controller and predictive error correction through machine learning, resulting in improved system responsiveness. The project demonstrates a comprehensive approach to marine control systems, laying the groundwork for future advancements in the field.

Uploaded by

Jagrat Phugat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views8 pages

Ship Control System Project Report

The project report details the development of a Ship Control System using MATLAB's Simscape, Simulink, and Machine Learning modules, focusing on modeling ship behavior and implementing a PID controller for heading control. The integration of these tools allowed for effective tuning of the controller and predictive error correction through machine learning, resulting in improved system responsiveness. The project demonstrates a comprehensive approach to marine control systems, laying the groundwork for future advancements in the field.

Uploaded by

Jagrat Phugat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DEPARTMENT OF MECHANICAL ENGINEERING

INDIAN INSTITUTE OF TECHNOLOGY ROPAR

RUPNAGAR-140001, INDIA
IIT Ropar

DESIGN LAB – II (ME306) PROJECT REPORT

For
SHIP CONTROL SYSTEM

Submitted by

Ganesh Gurjar (2022MEB1309)


Hardik Jain (2022MEB1311)
Harshita Lather (2022MEB1313)
Jagrat Phugat (2022MEB1315)

Group – A (Monday)

Supervised By
Dr. Srikant Sekhar Padhee
Dr. Jitendra Prasad

Second Semester, 2024-2025

1|Page
TABLE OF CONTENTS

INTRODUCTION................................................................................................................................................................................................. 3
OBJECTIVES...................................................................................................................................................................................................... 3
THEORY............................................................................................................................................................................................................ 3
MATLAB MODULES OVERVIEW..................................................................................................................................................................... 3
SHIP BEHAVIOR MODELING USING SIMSCAPE................................................................................................................................................. 4
HEADING CONTROL USING PID CONTROLLER................................................................................................................................................. 4
HEADING CONTROL USING PID CONTROLLER................................................................................................................................................. 5
PID CONTROLLER TUNING............................................................................................................................................................................... 6
MACHINE LEARNING FOR ERROR PREDICTION................................................................................................................................................. 7
SIMULATION RESULTS AND ANALYSIS.............................................................................................................................................................. 8
DISCUSSION...................................................................................................................................................................................................... 8
CONCLUSION.................................................................................................................................................................................................... 8

2|Page
1. INTRODUCTION
This report presents the development of a rudimentary Ship Control System using
MATLAB’s Simscape, Simulink, Machine Learning (ML), and Control modules. The
project aims to model ship behavior, design and tune a PID controller for heading control,
and enhance control performance through ML-based error prediction. The integration of
these MATLAB toolboxes enables a comprehensive approach from physical modeling to
intelligent control.

2. OBJECTIVES
 Learn to use MATLAB modules: Simscape, Simulink, ML, and Control.

 Develop a basic Ship Control System utilizing these modules.

 Model ship behavior characteristics using Simscape.

 Control ship heading using a PID controller.

 Autotune the PID controller for optimal performance.

 Train an ML model to predict error magnitude and reduce response time.

3. THEORY
Ship heading control involves maintaining or changing the orientation of a ship along a desired
direction despite disturbances such as water currents and wind. The dynamics of ship motion are
governed by Newton’s laws, where the rotational motion about the vertical axis (yaw) is of primary
interest in heading control systems.

The general equation used to model ship heading dynamics is:

Where:

 I is the moment of inertia of the ship about its vertical axis.


 θ is the heading angle.
 θ˙ and θ¨ represent angular velocity and angular acceleration, respectively.
 Τ_rudder is the control torque applied by the rudder.
 b is the damping coefficient representing resistance from the water.
 Τ_disturbance is the external disturbance torque.

The system behaves as a second-order dynamical system with damping and external control
input. To achieve accurate heading control, a PID (Proportional-Integral-Derivative)
7 |Page
controller is commonly used. The PID controller continuously calculates the error between
the desired heading and the current heading and adjusts the rudder torque accordingly to
minimize this error.

By integrating Simscape for physical modeling and Simulink for control simulation, a
realistic and interactive environment is created for testing the performance of the controller.
Additionally, incorporating machine learning models helps predict future errors, enabling
anticipatory corrections that enhance system stability and reduce response time.

4. MATLAB MODULES OVERVIEW

4.1 Simscape
Simscape facilitates physical modeling of multidomain systems within Simulink by connecting
components through physical connections, allowing realistic ship dynamics simulation including
rotational inertia, damping, and applied torques.
4.2 Simulink
Simulink provides a graphical environment for system modeling, control design, and simulation. It
supports integrating control algorithms with physical models, enabling simulation of ship heading
control and system response.
4.3 Control System Toolbox
This toolbox supports designing and tuning controllers such as PID. The PID Tuner tool allows
autotuning to achieve desired transient response metrics like rise time and overshoot.
4.4 Machine Learning Toolbox
MATLAB’s ML toolbox enables training regression models to predict system errors, which can
be used to improve control responses by anticipating deviations.

5. SHIP BEHAVIOR MODELING USING SIMSCAPE

The ship is modeled as a physical system incorporating rotational inertia, damping, and applied
torque to simulate heading dynamics. The Simscape model uses physical blocks representing these
dynamics, integrated into Simulink for control design and simulation.

GENERAL GOVERNING EQUATION :-

Fig-1 : General Governing Equation for Ship’s dynamics

7 |Page
Fig-2 : Block Diagram representing unturned PID response

6. HEADING CONTROL USING PID CONTROLLER

A PID controller is implemented to minimize the heading error between the desired and actual ship
heading. The controller adjusts the rudder or torque input to the ship model to maintain the desired
heading.

Fig-3 : Block Diagram representing physical dynamics including rotational inertia, damper, and applied torque

7 |Page
7. PID CONTROLLER TUNING
Using MATLAB’s PID Tuner, the PID gains (Proportional, Integral, Derivative) are autotuned to
optimize system response. The tuning process aims for minimal overshoot, fast rise time, and stable
settling.

Fig-4 : Tuning the PID to get Proportional, Integral and Derivative gains as required

Typical optimized results :-

Metric Results

Rise Time 1.15 sec

Settling Time 1.83 sec

Overshoot 1.7 %

Phase Margin 88 °

8. MACHINE LEARNING FOR ERROR PREDICTION

An ML model is trained on simulation data (torque, heading, error) to predict the magnitude of
7 |Page
heading error. This prediction is used to adjust control inputs preemptively, reducing response
time and improving control robustness.

Fig-5 : Actual v/s Predicted heading of the ship using the ML model

9. SIMULATION RESULTS AND ANALYSIS


9.1 UNTUNED PID RESPONSE :-
INITIAL SIMULATIONS WITH AN UNTUNED PID CONTROLLER SHOWED SLUGGISH RESPONSE WITH
SIGNIFICANT OVERSHOOT AND STEADY-STATE ERROR, INDICATING THE NEED FOR TUNING.

9.2 Tuned PID Response :-


After autotuning, the controller achieved a fast rise time, minimal overshoot, and stable heading
control, confirming the effectiveness of the tuning process.

9.3 ML-Enhanced Control :-


The ML model accurately predicted error trends, enabling the controller to compensate
proactively. This hybrid control approach reduced the response time and improved tracking
accuracy, as reflected in the close match between actual and predicted heading errors.

10. DISCUSSION

7 |Page
10.1 Integration Benefits :-
 Simscape allows realistic physical modeling of ship dynamics.

 Simulink facilitates control design and system simulation.

 PID autotuning automates controller optimization.

 ML integration enables adaptive control by predicting errors.

10.2 Challenges and Future Work :-


 Model fidelity depends on accurate ship parameters.

 ML model generalization requires extensive training data.

 Future enhancements could include nonlinear control strategies and hardware-in-the-


loop testing.

11. CONCLUSION

This project successfully demonstrated the development of a rudimentary Ship Control System using
MATLAB’s Simscape, Simulink, Control, and Machine Learning modules. The ship’s physical
behavior was modeled accurately, and a PID controller was designed and auto-tuned for effective
heading control. Incorporating ML for error prediction further improved system responsiveness and
robustness. This integrated approach provides a strong foundation for advanced marine control
systems and real-world applications.

7 |Page

Common questions

Powered by AI

Integrating machine learning (ML) enhances the control performance by predicting the magnitude of heading error based on simulation data. This anticipatory capability allows for proactive adjustments in control inputs, reducing response time and improving control robustness. The ML model effectively predicts error trends, enabling the PID controller to compensate proactively, which results in a hybrid control approach that closely matches actual and predicted heading errors . This increased tracking accuracy highlights the value of combining traditional control systems with machine learning .

Modeling ship heading control involves applying principles such as Newton's laws of motion, specifically addressing rotational motion about the vertical axis (yaw). The model is mathematically represented through a second-order differential equation with damping and external control input components. Key variables include the ship's moment of inertia, heading angle, angular velocity and acceleration, rudder torque, damping coefficient, and disturbance torque . These principles are implemented using Simscape for physical modeling, allowing for an accurate simulation of rotational dynamics and external influences within the system .

The integration of Simscape, Simulink, PID tuning, and machine learning creates a comprehensive framework for ship control system design. Simscape provides realistic physical modeling of ship dynamics, while Simulink facilitates control design and system simulation . PID autotuning optimizes controller parameters such as rise time and overshoot . The incorporation of machine learning enables adaptive control by predicting errors and allowing the system to respond preemptively, thus enhancing stability and reducing response time . This holistic approach combines detailed physical modeling with advanced control strategies to improve system performance significantly .

Simulation results validate the improvements by demonstrating a clear enhancement in control performance post-PID tuning and machine learning integration. Initial untuned PID responses showed sluggishness, significant overshoot, and steady-state error . Post-tuning, the system achieved a fast rise time, minimal overshoot, and stable heading control, confirming the tuning's effectiveness . Moreover, the integration of machine learning reduced response time and improved tracking accuracy, shown by the close alignment between actual and predicted heading errors .

The use of a PID controller in a ship's heading control system helps minimize the error between the desired and actual heading by adjusting the rudder torque . Tuning the PID controller, particularly through MATLAB's PID Tuner, optimizes system response by adjusting the proportional, integral, and derivative gains to achieve minimal overshoot, fast rise time, and stable settling . After tuning, the controller achieved a fast rise time, minimal overshoot, and stable heading control, which demonstrated the effectiveness of the tuning process .

The key components and functionalities of MATLAB modules used in this project include Simscape for physical modeling of multidomain systems, allowing realistic ship dynamics simulation through physical connections . Simulink provides a graphical environment for system modeling, enabling the integration of control algorithms with physical models . The Control System Toolbox is used for designing and tuning controllers such as PID, with tools like the PID Tuner allowing for autotuning to achieve desired transient response metrics . Lastly, the Machine Learning Toolbox trains regression models to predict system errors, which improves control responses by anticipating deviations .

The process of tuning a PID controller involves adjusting the proportional, integral, and derivative gains to achieve a desired system response. The purpose of this tuning is to enhance the controller's performance by minimizing overshoot, achieving a fast rise time, and ensuring stable settling of the ship's heading. MATLAB's PID Tuner tool is utilized for automatic tuning, which simplifies the process and helps find the optimal gains to meet specific performance metrics. This results in improved transient response characteristics and robust control under varying conditions .

One of the primary challenges in creating an accurate ship control system is achieving model fidelity, which depends on accurate ship parameters . Another challenge is the generalization of the ML model, which requires extensive training data to be effective across various conditions . Future work could address these issues by incorporating nonlinear control strategies and implementing hardware-in-the-loop testing, which would improve model accuracy and control system effectiveness under real-world conditions .

The general governing equation for ship dynamics provides a mathematical foundation to understand and predict the behavior of ship heading control. It incorporates factors such as the moment of inertia, damping coefficient, external disturbance torque, and control torque applied by the rudder, all of which are crucial for modeling the rotational dynamics around the ship's vertical axis (yaw). This equation helps in designing the control system by highlighting how these parameters interact to affect the ship's heading, guiding the implementation of control strategies like PID to effectively manage these variables .

The primary objectives for developing the ship control system are to learn and utilize MATLAB modules such as Simscape, Simulink, Machine Learning, and Control for a basic ship control system design. Other objectives include modeling ship behavior characteristics using Simscape, implementing a PID controller for ship heading control, autotuning the PID controller for optimal performance, and training a machine learning model to predict error magnitude and reduce response time .

You might also like