Design of autopilot control system on unmanned surface vehicle type monohull LSS-01 using model reference adaptive control-state feedback in waypoint control

For unmanned surface vehicle to run automatically, algorithms of the autopilot system and waypoint navigation are needed. The autopilot system is an unmanned surface vehicle control towards the waypoint. One example of a navigation algorithm is the desired waypoint, it requires control of the ship's steering angle, namely thrust and turning angle. Unmanned surface vehicle can encounter external interference while advancing, such as waves, wind, and ocean currents. It is desirable, therefore, to unmanned surface vehicle to be able of adapting these conditions. One way to overcome this interference is to design adaptive controllers such as the Model Reference Adaptive Control (MRAC) - state feedback to regulate the behavior of unmanned surface vehicle plants. In this respect a reference to the desired model is required for the MRAC-state feedback controller. Using this method, it is expected that unmanned surface vehicle can move accurately from the expected waypoint. The MRAC-state feedback controller can produce an angle response of unmanned surface vehicle and speed on the surge axis according to the desired design criteria. From the simulation carried out the adaptive gain that is suitable for LSS01 unmanned surface vehicle is 0.0001. The results of simulation on the ship headed waypoint cross-track show RMS error when uninterrupted is 0.0846 and when given a disturbance is 0.2969.


Introduction
An unmanned surface vehicle is a ship that can move without a captain on the ship. The ship can run manually with remote control, or the ship can go semi-automatically under operator monitoring [1]. The potential for undersea water investigations in Indonesia requires special attention both in terms of exploration and guarding of unmanned surface vehicle (USV), which are very useful to assist human activities. This in particular is to assist the military activities in monitoring waters in Indonesia [2,3].
There are various forms of USV, sizes, configurations, and characteristics. Historically USV was initially made very simple and it was initially autonomously controlled, more and more were produced and used. At present, USV has been used to carry out intelligence monitoring, reconnaissance and attack missions. Many have reported that USV has succeeded with a high degree of accuracy in carrying out intelligence missions, monitoring, reconnaissance, and attacks using rockets, missiles, and bombs. USV itself is preferred for missions that are too tedious and dangerous or high risk for manned vessels [3].
For an unmanned surface vehicle to move, a propulsion device or drive device is needed. One type of propulsion is a fix pitch propeller using a BLDC and rudder type electric motor as steering gear. The application of the autopilot system on USV monohull can make it a reliable vehicle and can operate automatically according to programs that have been planted in it so that it can be used for several special needs. The existence of USV is expected to contribute more in dealing with issues of defense, supervision, rescue, or attack missions. In order an unmanned surface vehicle can drive automatically, devices and navigation algorithms are needed. One example of a navigation algorithm is designated as waypoint [4]. Waypoint is a point or coordinates in physical space which will be aimed at by a moving object. The direction or route of an object, i.e. USV in this case, to move towards the waypoint can be calculated by combining the vehicle positions and waypoint coordinates.
To control unmanned surface vehicle to the desired waypoint, control of the ship's steering angle is required. Unmanned surface vehicle can encounter external disturbances when advancing at sea such as waves, wind, and ocean currents. The control needed when unmanned ships run without disturbances is certainly different from when it is under disturbances. But it is desirable that unmanned surface vehicle can adapt to both conditions. One way to overcome this disorder is to design adaptive controllers such as the Model Reference Adaptive Control (MRAC) -state feedback [5]. MRAC is a reference modelbased adaptive control system [6]. Where to regulate plant behavior, the desired reference model is needed. The MRAC-state feedback controller will adjust the plant response as close as possible to the response of the desired model.

Overview
The LSS01 type is the name of the monohull USV owned by the Laboratory of Systems and Cybernetics at the Department of Electrical Engineering -ITS, Surabaya -Indonesia. It uses thruster as a propulsion and rudder as the steering device. The thruster machine is used to give a thrust to the USV and the steering device is used to set the direction of the USV for maneuvering.

Mathematical Model
Mathematical models of unmanned surface vehicle are obtained from physical analysis of kinematics and dynamics that look for the relationship between position and speed as well as the relationship between the style and moments of model style. The mathematical model of USV was obtained by following the 6-dof model of unmanned surface vehicles [7]. However, the model was adjusted to the following assumptions: 1. Roll, pitch, dan heave movements are ignored. 2. The vessel has the homogenous mass distribution on xz-plane.
3. The center of gravity and center of buoyancy placed vertically on the z-axis. Based on those assumptions, then the mathematical model of USV-LSS01 could be declared in 3dof (surge, sway, and yaw) as follows: is a sum of the rigid body system inertia matrix and the added mass matrix is defined as follow, and ( ) each is the linear damping matrix and the nonlinear damping matrix are defined as follows, Input force of for the vessel's system consists only two components which are input forces in the direction of surge and yaw. Force vector of input is defined as follow, External disturbances (current, wave, and wind) forces and moments vector, , defined as follows, where is vessel's heading angle and 2 is the wind speed. The wave slope ( ) for the wave component, i is defined as.
( ) = 2 sin ( + ) where is the wave amplitude, is the wavelength, is the encounter frequency and is a random phase corresponding to the wave component . The USV model has 3-dof which are determined by two sets of control surface, namely surge for x-axis translation velocity and yaw for -axis angular velocity. The estimated parameters for the vessel are summarized in Table 1.
The mathematical model of unmanned vessel is derived from the kinematics and the dynamics physical analysis which looking for the relation between velocity and position as well as the relation between force and force moment. The mathematical model was expressed in the state space equation (14).
where state variables are defined as follows. In order to find the system parameters, the model of temporary disturbances is ignored. The matrix form is separated into the equation that is on one x, y, and axis. Polynomial forms for estimation are compiled in equation (17).
Furthermore, by substituting the model of equation (16) into equation (17) above, the new form of the state space equation is found as follows,  Table 2, which is USV body parameters [8].

USV Autopilot System Design
The system design for validating the autopilot controller and system design for waypoint control is shown in Figure 1. The validation of the controller is done by testing the manoeuver on the system design to determine whether the plant response after obtaining the control signal comply with the desired performance criteria. At first, the unmanned ship was driven straight with constant thrust torque then after a while the ship was deflected in a certain direction. The thrust torque of unmanned surface vehicle is given constant value. The waypoint point that the ship aims to pass through is defined before the simulation is executed. When simulating, if the waypoint navigation states that there is a waypoint that must be targeted, then the navigation waypoint will send a signal ψR as a reference for the desired ship's heading. If the length of the ship's vector to the waypoint point is smaller than the specified tolerance limit, then the navigation waypoint will take the next

Designing Feedback Linearization Decoupler
The linearization process is done by making a variable equation other than input and a new variable which is a control signal. Here the input from the dynamics equation of the ship is on the thruster, and the rudder, each of which is responsible for the surge and yaw movements. A state feedback will be made so that the system becomes a separate SISO (single input single output) [9]: With the example as follows, In the example above there is a non-linear component that should be made into a linear and decoupled equation. Then the equation is driven to zero so that the surge speed is only affected by ur, thus it becomes the following: In the above example there is a non-linear component that should be transformed into a linear equation and decoupled it so that yaw speed is only affected by . Then the equation is driven to be zero and gives the following:

Designing MRAC-State Feedback
After conducting a line design using the Feedback Linearization Decoupler method, the MRAC controller is then designed to ensure that the response output can follow the desired reference model. The function of the MRAC controller can also meet stability requirement when the vessel is outside the interference in the form of water current, wind, and waves [10,11].
To attain a fast response, the reference model used has a sufficient time constant according to the requirements of a crewless ship system, which is 1 second and has the form of 1 st -order transfer function as follow. The choice of a reference model with a time constant of 0.5 seconds is based on this, so that the system response can follow the reference model that has been given. Input for for State Feedback Linearization block is the output of MRAC for surge speed and yaw speed. Following the MRAC-state feedback simulink diagram that was created, with the value of adaptation rate of 0.0001 the system output response is expected to quickly follow the given reference to the reference system model. The corresponding design specification for USV surge speed regulation is listed in Table 3. Whereas the design specifications for USV heading angle setting is presented in Table 4.   Figure 2 shows the waypoint points that will be passed by unmanned surface vehicle. The waypoints have been set within the radius of tolerance to be addressed. The waypoint navigation will change from one waypoint point to the next waypoint. If there is no more waypoints to be addressed, the simulation will automatically stop.

Experiment Results and Analysis
At this stage, several tests are carried out. In the beginning it is an open-loop testing system. This test is carried out by giving a step input to the unmanned ship model and the response that appears are observed. The second test is for unmanned ship plant testing with 3-dof and will be accumulated utilizing MatLab Simulink. The next test is a shipless controller plant, which is then testing maneuvering using MRACstate feedback and finally, the translation control waypoint testing is performed.

Open Loop Response
At first, the unmanned surface vehicle plant is given a throttle percentage of 30%, and a thrust force of 5.788 N. The rudder is made straight for the first 80 seconds, then turned 0.1 radians for 80 seconds until the simulation time reaches 200 seconds. Figure 3 shows the movement of the unmanned surface vehicle position from the starting point (0,0) in a straight line then forms a elliptic path after advancing some 170 m.  The obtained surge translation speed response reaches the value of the settling time criterion ± 5% from 2.215 m/s at 22.3365 seconds with the time constant at 7.455 seconds, as shown in Figure 4. Then 80 seconds and further there is a decrease in translational speed at the direction of the surge because the rudder steering is no longer straight. The curve shows stability at 2.2215 m/s. This is how to fix the surge force towards the yaw axis and towards the surge axis. It is also obtained the speed of yaw reaching the value of completion time criteria ± 5% from 0.23 rad/s at 90.35 seconds with the constant time at 83.45 seconds or 3.45 degrees.

Testing MRAC-State Feedback on Surge Axis
The test is done by giving a step test signal in the form of a constant value at the surge speed parameter of 3 and on the yaw heading of -0.1 rad. Each simulation uses different gain adaptations and is carried out for 200 seconds of simulation time. The scenario arranged for the maneuver test is the throttle percentage of 30%, and the thrust force of 5.788 N and the set point heading is 0.0 for 0 seconds to 80 seconds and then 0.1 for the rest of the simulation time. The rudder steering angle is also limited to 30 degrees or 0.52333 radians to prevent the rudder's steering spinning with an angle greater than 90 degrees. This may cause unmanned surface vehicle to lose thrust in the direction of the surge axis motion or may cause the unmanned surface vehicle to rotate rapidly in place, and may even moving backward. as illustrated in Figure 5.
In the simulation 1 adaptive gain, K is set at 1 and the simulation results show the unmanned ship speed response in the form of a 2 nd -order system. The system experiences oscillation and overshoot. The system has oscillations at 6.78 seconds at 4.36 m/s and slowed down to a steady-state. Thus the response from simulation 1 is still far from the reference model that has a 0.5 seconds constant time. Before a steady-state, there is an oscillation on the system because the gain is too large, as exhibited in Figure 5.  10 response without oscillation and overshoot. The system oscillated at 6.027 seconds and showing a value of 3.375 m/s and experienced a slowdown to the steady-state condition. That way the response from simulation 2 is considered still far from the desired reference model.
In the simulation 3, it is tried to increase the adaptive gain of K by 0.0001. The simulation results show the response of unmanned ship surge speed in the form of a 1 st -order system response without overshoot and without oscillation showing. This happen at the elapsing time of 3.00 m/s seconds to 2.99 s after a surge speed setpoint change occurs. That way the response from simulation 3 is considered similar to the reference model that has a 0.5 seconds constant time.
From the three simulation results that have been carried out, it can be seen that the adaptive gain parameter in the simulation 3 has a response that approaches the character of the reference model without overshoot and oscillation. Therefore, the adaptive gain parameters in simulation 3 are considered to meet the desired controller design specifications and will be taken as an MRAC-State feedback controller model for speed response on the surge axis of unmanned vessels.

Testing Yaw-Plant with MRAC-State Feedback
In the simulation 1 adaptive gain, K is set at 10 and the simulation results show the response angle of the unmanned ship in the form of a 2 nd -order system but the system response still exhibit oscillations and overshoot. The system has oscillation at 2.5 seconds and showing value 0.1946 seconds from the response angle heading. That way the response from simulation 1 is considered still far from the reference model that has a 0.5 second constant time. Before a steady-state, there is oscillation in the system because the gain is too large, as illustrated in Figure 6.
In the simulation 2, it is tried to reduce the adaptive gain by 5. Simulation results show the response of the unmanned ship yaw angle in the form of 1 st -order system response, but the system response still experiences overshoot and oscillation. The system has oscillations at 2.1 seconds and showing value 0.1147 seconds from the heading angle response. But if compared with the simulation 1, the simulation 2 is better. This indicate the response from simulation 2 is almost close to the reference model of 0.5 seconds constant time but still out of the system adaptation process.  In the simulation 3, it is tried to increase the adaptive gain of K by 0.0001. The simulation results show that the unmanned ship's yaw speed response is a 1 st -order system response without overshoot and oscillation and does not lead to an infinite system. Ship yaw angle heading response is 0.1 seconds and has a steady-state at 3.8 seconds after a change in yaw setpoint heading. This means the response from simulation 3 is similar to the reference model that has a 0.5 seconds constant time.
From the three simulation results that have been obtained, it can be seen that the adaptive gain parameter in the simulation 3 has a response that approaches the character of the reference model without overshoot and oscillation, and the system does not lead to infinite values. Therefore, the adaptive gain parameter in simulation 3 is considered to meet the desired controller design specifications and will be taken as an MRAC-state feedback controller model for the ship's yaw-plant response on the unmanned vessel's yaw axis. Figure 7 shows the simulation results of the unmanned surface vehicle waypoint control position simulation using the MRAC-state feedback controller. Figure 8 shows the response angle of the unmanned surface vehicle with a waypoint navigation.   Figures 7 and 8, it can be seen that the results of unmanned surface vehicle using MRAC-state feedback through waypoints tend to be faster in adapting, and angular signals do not oscillate so that when ordered to pass the specified waypoints do not produce winding movements. Cross-track error position of the unmanned surface vehicle to the line connecting the waypoint points is shown in Figure  9. From the results of the calculation on RMS it is obtained the cross-track error RMS from MRACstate feedback is 0.1738 degrees.

Testing Waypoint Navigation with Interference
The testing of waypoint navigation for USV is conducted under external interferences due to wind, current and wave as outlined in Table 5. In Figure 10 it can be seen that the results of unmanned surface vehicle that is controlled by MRAC-state feedback can move through the predetermined waypoints, but still experiences a winding at the beginning. This is because the resulting steering angle response tends to oscillate at the beginning of the ship without the crew being run and unable to adapt the condition.
After running a longer time, the unmanned vehicle which is controlled by using MRAC-state feedback produce greater turns in comparison to the unmanned vehicle which is not under interference, as exhibited in Figure 11. Cross-track error position of the unmanned vehicle connecting the waypoints is shown in Figure 12. From the RMS calculation results, the RMS cross-track error from MRAC-state feedback is found to be 0.2969 degrees.