Fields of Manuscript

Journal of the Korean Society of Marine Engineering - Vol. 39 , No. 5

[ Original Paper ]
Journal of the Korean Society of Marine Engineering - Vol. 39, No. 5, pp. 577-585
Abbreviation: Journal of the Korean Society of Marine Engineering
ISSN: 2234-7925 (Print) 2234-8352 (Online)
Print publication date Jun 2015
Received 26 May 2015 Revised 12 Jun 2015 Accepted 19 Jun 2015
DOI: https://doi.org/10.5916/jkosme.2015.39.5.577

Implementation of an Auto-Steering System for Recreational Marine Crafts Using Android Platform and NMEA Network
Mohammadamin Beirami1 ; Hee Yong Lee2 ; Yung-Ho Yu
1Division of Control Engineering, Graduate School of Korea Maritime and Ocean University, Tel: 051-410-4923 (beirami@kmou.ac.kr)
2Chief of R&D center, KUMHO Marine Tech. company, Tel: 051-410-4345 (adam@kumhomarine.com)

Correspondence to : Division of Information Technology Engineering, Korea Maritime and Ocean University, 727, Taejong-ro, Yeongdo-gu, Busan 606-791, Korea, E-mail: yungyu@kmou.ac.kr, Tel: 051-410-4345


Copyright © The Korean Society of Marine Engineering
This is an Open Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/3.0), which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.
Funding Information ▼

Abstract

This paper deals with development of an autopilot system for leisure yacht based on NMEA 2000 network and android platform. The developed system can operate both for manual steering and automatic navigation mode. In automatic steering mode, after manipulation of commands which are NMEA 0183 sentences by android platform, the developed system translates and sends the packets through NMEA 2000 network. Then the controller which is connected to NMEA 2000 network receives the commands and controls the boat’s rudder system automatically. The automatic steering mode is achieved by cooperation of two controllers; one for controlling the rudder system, and the other for controlling the vessel’s heading. To control the vessel’s rudder and heading angle two PID controllers are developed with an adjustable dead-band gain. Also, in order to eliminate the steady-state error occurred by applying dead-band, an integral controller which specifically supervises the system’s behavior inside the dead-band area is developed. In this paper, at the first stage, simulations are accomplished using computer in order to examine the feasibility of the proposed based on simulation results. In the next step, the system on a real hydraulic steering model is implemented and at the end the performance examination by implementing it on a real boat and doing test navigation is executed.


Keywords: Autopilot system for leisure yacht, Rudder control, Ship heading control, PID control with dead-band

1. Introduction

Auto steering operation refers to controlling the vessel’s movement automatically without pilot’s involvement, and is being accomplished by controlling the rudder angle based on the vessel’s heading angle. Referring to the statistics [1], each year the demand to possess recreational marine crafts is dramatically increasing, which has made this industry to be a stable, profitable and attractive market considered by governments worldwide. According to this, South Korea, as world’s second largest merchant ship developer country [2] has decided to enter to this market and help Korean small and medium-size businesses compete with companies around the globe. In recent years, the dramatic improvements in technology have had profound impacts on maritime industry which has resulted in development of intelligent systems for vessels. As the use of tablets and smartphones has become rife, more companies are interested in introducing their product converged with this new technology. For sure Android operating system, which is the most popular operating system on smartphones [3], is being considered as a tool for developers to implement their ideas. In our proposed method, the mariner can navigate the leisure vessel using tablet, smartphone, PDA or any other types of embedded systems which have android operating system installed. Also in this paper, besides having auto-steering application on the android system, several navigational applications such as ECDIS, AIS and Radar can be installed on the same platform which results in cut back on expenses by not buying separate monitoring systems. In large vessels, the rudder controller is a continuous system

while in small boats including leisure crafts, it is an on/off controller due to the power saving purpose. The rudder system in a ship is usually based on hydraulic systems. The idea of auto-steering is that the controller receives the desired heading angle and forces the hydraulic actuators to perform in a way which the desired track being fulfilled and keep the vessel on the course [4][5]. Since the controllers’ performance depends on sea environment, the vessel may have different responses under different circumstances. In order to prove the stability of the proposed controllers under such circumstances, an accomplishment of simulations and tests of the whole system in computer is of great importance. In the paper at first, the whole idea is implemented and tested in Simulink/Matlab software. In the second stage a similar hydraulic rudder system is designed, connected to a NMEA 2000 network with a heading sensor and examined by the proposed method on it. Third, the designed system is installed on a leisure boat and the effectiveness of our proposed method is proved. At last, the results of onboard test is discussed.


2. NMEA Network

NMEA 2000 is a plug and play means of communication between the electrical instruments in a vessel. Today, almost all the pleasure vessels worldwide are using this network as a way to connect vessels’ instruments together. In this study, we have used both NMEA 0183 and NMEA 2000 network. As shown in Figure 1, the Android platform sends and receives the data in NMEA 0183 format and NMEA 2000 stack board translates them into NMEA 2000 format.


Figure 1: 
Data exchange between Android and NMEA network

2.1 NMEA 0183

NMEA 0183 is a combined electrical and data specification, which through specific sentence formats makes it possible for marine electronic instruments to exchange data between each other [7]. In NMEA 0183, only printable ASCII characters are allowed and all settings and orders should be expressed by this format. Figure 2 shows an example of a NMEA 0183 sentence. It should be noted that the length of sentences varies based on different types of packets.


Figure 2: 
NMEA 0183 sentence example for GPS sentence

The sentences used in this study are as follows:

HTC: Heading Track Control (HTC) is the order to the heading controller unit to set values, and control the heading of the vessel.

HTD: Heading Track Control Data (HTD) is the response from heading controller unit containing information about values, modes and current status of the system.

THS: True Heading and Status (THS) provides information about actual vessel heading in degrees.

ROR: Rudder Order Status (ROR) is the order to the rudder controller to control the rudder system of the vessel.

RSA: Rudder Sensor Angle Sentence (RSA) indicates the rudder angle, measured by rudder angle sensor.

2.2 NMEA 2000

NMEA 2000 is a Plug and Play Communication which is being used to connect electronic instruments (Sensors, Displays, etc.) to each other within vessels. The NMEA 2000 packets are being transmitted through Controller Area Network (CAN Bus). The NMEA 2000 messages are followed by a header file, which specify the device which data should be transmitted to, the priority field and PGN number. The PGN number indicates the characteristics of the destination device and the protocol in which the transmitted data should be interpreted. Table 1 is the list and description of the PGN numbers used in this study.

Table 1 
Used PGN numbers in this study
PGN Name PGN Number Categor y Detail
Rudder 127245 Steering Rudder order command in direction or angle with current rudder angle reading
Heading/Track Control 127237 Steering Sends commands to, and receives data from, heading control systems. Allows for navigational (remote) control of a heading control system and direct rudder control.
Vessel Heading 127250 Steering Heading sensor value with a flag for True or Magnetic. If the sensor value is Magnetic, the deviation field can be used to produce a Magnetic heading, and the variation field can be used to correct the Magnetic heading to produce a True heading.


3. Overall schema of the system

Figure 3 illustrates the idea of whole auto-steering system. The orders will be collected from Android platform in NMEA 0183 format and will be translated to NMEA 2000 PGN numbers by NMEA 2000 Stack board.


Figure 3: 
Auto-steering system configuration

The characteristics of each instruments and steps which should be taken in order to perform an auto-steering scenario has briefed as follows:

  • 1. Heading Track control commands (HTC) are being produced by Android device in NMEA 0183 sentence format and sent to NMEA 2000 Stack board by serial communication.
  • 2. NMEA 2000 Stack board translates the NMEA 0183 Command to appropriate PGN number and sends the PGN packet through NMEA 2000 network.
  • 3. The heading commands are being delivered to the heading controller unit by NMEA 2000 Network with PGN 127237.
  • 4. The heading controller receives information from heading sensor unit with PGN 127250 and makes rudder angle commands.
  • 5. The NMEA 2000 stack board also receives PGN 127250 and interprets them to THS sentences for android system.
  • 6. The rudder controller receives rudder commands from heading controller and urges the hydraulic unit to fulfill the orders.
  • 7. NMEA 2000 Stack board receives reported data from heading controller and interprets them to NMEA 0183 HTD data to be sent to android platform through serial communication.
  • 8. Rudder angle sensor is connected to the rudder controller and rudder angle is converted by ADC and being reported to NMEA 2000 Network with PGN 127245.
  • 9. NMEA 2000 Stack board receives the rudder angle sensor reports from NMEA 2000 network, and interprets them to NMEA 0183 RSA Sentences.
  • 10. In manual mode, the orders should be sent directly to the rudder controller by android platform. In that case heading controller is bypassed. Therefore, the android platform sends ROR sentences to the NMEA 2000 stack board and that unit translates them to PGN 127245 for NMEA 2000 network.
  • 11. The rudder controller receives PGN 127245 commands and urges the hydraulic unit to fulfill the orders.

4. Rudder System in Small Boat

Basically, Rudder is a vertical blade located at the vessel’s stern and is the main part responsible to control yaw movement (Heading angle) of that vessel [6]. Nowadays the movement of this part is accomplished by a hydraulic actuator connected to the rudder.

For this reason, as mentioned earlier, in order to test the effectiveness of our method, besides computer simulation we developed a hydraulic steering model as it is being shown in Figure 4.


Figure 4: 
Designed vessel hydraulic steering model

Most of the hydraulic cylinders used for vessel steering system are double-acting cylinders. In hydraulic system when orders come to the unit, the pump streams the oil from reservoir to the control valve section. Based on the directional orders from rudder controller to the hydraulic controller unit and because in small boat the hydraulic unit is an on/off system, the right or left side solenoid unit will be energized, and spool inside control valve directs the oil flow to the cylinder. Qiu, et al. [11] described a hydraulic system from mathematical point of view. In that paper it has been stated that the whole steering system can be represented as a third order transfer function for velocity control:

Gvs=ΩSUS=KTs+1+s2+2ςωns+ωn2(1) 

and a fourth order transfer function for position control

Gps=ϕsUs=KsTs+1+s2+2ςωns+ωn2(2) 

where Ω is the rudder angular velocity, φ is the rudder angle, U is input signal, T is time constant for the steering linkage subsystem, ς is damping ratio for the valve subsystem, ωn is natural frequency for the valve subsystem and K is overall gain. The aforementioned equations for further simplification can be written as a first-order equation for velocity control and a second-order system for position control as follows:

Gvs=ΩsUs=KTs+1(3) 
Gps=ϕsUS=KsTs+1(4) 

As said before, in small pleasure boat, hydraulic system is on/off by rudder controller, so when the system is off and turns on again, there is a delay time to start set up and pumping again which means each time there will be a delay time which should be considered. In this case the Equation (3) can be rewritten by:

Gvs=ΩsUs=e-τrsKTs+1(5) 

where τr is the time delay for the rudder system.


5. Vessel Dynamics

Basically, a vessel has 6 degrees of freedom (6 DOF), including three translational motions (surge, sway and heave) and the other three rotational motions (roll, pitch and yaw) [8][9]. Figure 5 shows the 6 degrees of freedom in a vessel motion.


Figure 5: 
Vessel’s degree of freedom

As Tzeng et al. described the Nomoto model [4], in vessel’s maneuvering problem, only the horizontal motion is considered, which results in considering only surge, sway and heave movements. Therefore we have

X=mu̇-rv(6) 
Y=mv̇+rv(7) 
N=Izṙ(8) 

Where X,Y and N are surge, sway and yaw motions, m is the mass of the ship, Iz is the moment of inertia to the Z axis, u, v and r are the surge, sway and yaw speed, and u̇,v̇,ṙ are surge, sway and yaw acceleration. In considering only the steering motion, surge motion is separated from steering motion and especially, by neglecting the sway motion in Equation (7) and (8) and by taking the Laplace Transform of yaw and surge with considering a constant speed, a second order system is modeled as

rsδs=K1+T3s1+T1s1+T2s(9) 

After further simplifying the equation, a 1st order system is obtained with a time delay due to the process time inside the system which should be considered.

rsδs=e-τhsK1+Ts(10) 

Where τh is the time delay of vessel’s heading.


6. Control Unit

Usually, the heading and rudder controller on vessels are PID controllers due to their simplicity and reliability [5]. In this case in our study also we have used PID controllers with deadband zone. Using the dead-band is to increase error tolerance of the controllers which results in overcoming with chattering phenomena both in rudder actuation system and whole ship in presence of minor errors.

6.1 PID controller

Proportional-integrative-derivative Controller (PID) is a commonly used feedback controller which is popular because of its simplicity in design and robustness in performance. In PID control which is sometimes being called a three-term control, three separate constants are working together to minimize the error between desired commands and the actual system response.

In digital control, algebraically, digital PID control algorithm can be implemented using equation below:

uk=uk-1+K1+TTI+TDTek-1+2TDTek-1+TDTek-2(11) 

where K is the proportional gain, TI is the reset time , TD is the rate time and T is sampling time.

6.2 Controlling inside dead-band Zone

The dead-band or dead-zone is a block which generates zero output within a specific area.


Figure 6: 
Dead-band zone

As mentioned previously, the aim of using dead-band is to decrease the sensitivity of the controllers and avoid chattering phenomena which may occur due to the minor errors between desired orders to the controller and the system’s response. Thus by using dead-band block, the controller will consider a specified range as no error and it will take no action. In spite of advantages which can be achieved by applying the dead-band block, steady state error is the main disadvantage. In autosteering mode, and in long term travel by vessel, due to the steady state error inside the controller, the vessel may change its rout and the controllers consider it as no error.


Figure 7: 
The ship changes its rout due to steady state error

Thus, in order to prevent such problems, a separate controller must be implemented as a supervisory control to control the Vessel’s rudder and heading’s behavior in the deadband Zone. Supervisory controller or Ramadge-Wonham framework is a method in which the behavior of the system is being restricted by a controller. In this work, we implemented a separate integral controller to do the job. This idea has been shown in Figure 8.


Figure 8: 
PID controller with supervisory controller in DB

6.3 Controlling in Manual Steering Mode

In this mode the vessel’s control is performed by mariner’s involvement. In another word, the rudder angle command is ordered by the mariner and rudder control unit operates to fulfill the tasks. From control aspects of view, the idea could be illustrated as Figure 9.


Figure 9: 
Block diagram of manual steering mode

6.4 Controlling in Automatic Steering Mode.

In this mode, the heading controller and rudder controller cooperate together to fulfill the heading orders. The heading degree commands are specified by the mariner. The heading controller unit receives the heading commands and based on the current heading angle, manipulates rudder angle commands automatically to decrease the error between desired heading angle and current heading angle. Heading sensor and rudder degree sensor also send their information to the controllers to indicate the current rudder and heading position. This idea has been represented in Figure 10.


Figure 10: 
Block diagram of automatic steering mode


7. Computer Simulation and Experiment
7.1 Computer Simulation

As mentioned earlier in order to design a suitable controller for our work, we have simulated mathematical model of our system which we described previously, in Matlab/Simulink software. In this chapter we will discuss about the system’s response under different circumstances.

Figure 11 shows the computer simulation block diagram for rudder control in manual steering mode. Figure 12, illustrates the responses of the rudder in manual mode, where only the rudder actuator is being controlled.


Figure 11: 
Computer simulation for manual steering mode


Figure 12: 
Rudder response in manual mode

As seen in Figure 12, the gray boundary indicates the deadband zone, where the error must be disregarded. Therefore, the system response in presence of dead-band block and without supervisory controller inside dead-band is experiencing a huge steady-state error. On the other hand, if we apply an integral controller as a supervisory controller inside dead-band, the system response would be same as the stretch line in Figure 12.

Figure 13 depicts the computer simulation in automatic steering mode, or heading control where the integral supervisory controller is added inside dead-band. In automaticsteering mode, the rudder system’s response is shown in Figure 14. Figure 15 also shows the heading behavior under different conditions. Figure 15 shows that the heading behavior in presence of dead-band zone with integral supervisory controller is similar to its behavior in absence of the dead-band zone, however in absence of dead-band zone, in order to have this performance, the rudder fluctuates severely as shown by red line in Figure 14. When there is no dead-band in heading controller, if there is even a little error, the controller tries to overcome with that error , however most of the time the system response will not be error-free. In this case, chattering occurs to make heading to be error-free. To solve this problem, the dead-band was added which the blue line in Figure 14 is the rudder response after applying dead-band block. As it could be seen, steady-state error is still a big problem which could be solved by an integral supervisory controller. The green line in Figure 14 is the response of the rudder when an integral controller is applied inside the dead-band. This response results the heading behavior as shown by green line in Figure 15.


Figure 13: 
Computer simulation for Automatic steering mode


Figure 14: 
Rudder response in automatic-steering mode


Figure 15: 
Heading behavior in automatic-steering mode

From system responses, it could be concluded that the satisfactory method would be having a dead-band block for both heading and rudder controller with an integral supervisory controller inside the dead-band zone.

7.2 Experiment

As described before, in this study we also developed a hydraulic rudder actuation system to take a HIL (Hardware in Loop) test the whole system and check the possible problems before installing it on a real boat. The designed rudder model was previously shown in Figure 4. We designed a real NMEA 2000 network and connected our model to that as shown in Figure 16.We also implemented our control algorithm on an embedded system (Figure 17) and designed NMEA 2000 Stack board (Figure 18) to translate NMEA 0183 to NMEA 2000 and Vice versa. Also for manipulating rudder commands or heading commands, we designed software (Figure 19) on computer, which simulates the responsibilities of an android platform. After operation and witnessing the data flow in the system, we implemented our system on a real pleasure boat.


Figure 16: 
Rudder model connected to NMEA 2000


Figure 17: 
Controller on an embedded system


Figure 18: 
NMEA 2000 stack board


Figure 19: 
Android software simulator

We examined the effectiveness of the proposed method on a real pleasure boat in Busan Haeundae Marina area in Korea. The testing was performed in a calm sea state condition. A set of data was measured, displayed and stored both by Android and ECDIS systems for further performance inspections.

Figure 20 illustrates the boat and installed instruments which used in the test navigation day.


Figure 20: 
Testing day boat, instruments and condition

Figure 21 shows the rout traveled by the pleasure boat by control of auto steering system. The yellow bold line is the planned rout by ECDIS and the inner red line is the tracked rout.


Figure 21: 
Traveled rout by the vessel

In Figure 22, the heading command and tracked heading has been shown where the performance of the system shows a satisfactory response.


Figure 22: 
Android platform


8. Conclusion

In order to connect the android platform to the network, we proposed and developed that the android system generate NMEA 0183 sentences and by a translator (NMEA 2000 Stack board) to exchange data between Android platform and NMEA 2000 network. In order to bring the idea to the reality and examine the real performance of the system, before installing it on a real vessel, we developed a model of our work on a hydraulic steering system model and also to test the effectiveness of the proposed controller, we did computer simulation. The proposed controllers were two PID controllers, which one of them is controlling the rudder position and another is controlling the heading angle of that vessel. After computer simulation of the controller, we concluded that in an environment such as water ways, in order to eliminate the fluctuations in rudder system, the error tolerance of the controllers must be increased. To do so, we decided to implement a dead-band block inside the controllers. Nevertheless, the PID controller with dead-band block was not a complete solution, as it had a huge steady state error inside. Thus, the final decision for the controller was 2 PID controllers, each with a dead-band zone and supervisory integral controllers which control the system’s behavior inside the dead-band and reject errors as much as possible. Due to the power saving issues, it was decided that the rudder controller to be an on/off controller. After successful results in computer simulation, we implemented the proposed controller on an embedded system and we did testing on a steering system model described in earlier chapters and after the test on real steering model was successful, the system was installed on a real pleasure boat. The navigation data also were gathered during the test navigation. By comparing sent orders with data collected during the navigation, we concluded that the designed Autosteering system is working properly both in manual and automatic steering modes and it is able to be commercialized.


Acknowledgments

This paper is written based on the project titled “development of an intelligent autopilot system based on NMEA 2000, capable of protecting small fishing and leisure vessels from collision and standing”, supported by ministry of science, ICT and future planning of republic of Korea. The companies dealt with this project were Kumho Marine Technology, Korea Maritime and Ocean University R&D foundation and Korea Marine Equipment Research Institute (KOMERI).


References
1. National Marine Manufacturers Association, “Top 20 Markets by FAS Value”, Pleasure Boat International Resource Guide, A Reference for U.S. Exporters Journal, p5, (2014).
2. Barry Rogliano Group, “Shipbuilding in South Korea”, 2015 Annual Review - Shipping and Shipbuilding Markets Journal, p18, (2015).
3. I. Ludden, Tech Crunch Website Crunch, Accessed 23, February, 2014. http://techcrunch.com/2014/02/23/kantarsmartphone-sales-android/.
4. C. Y. Tzeng, S. D. Lee, Y. L. Ho, and W. L. Lin, “Autopilot design for Track-keeping and Berthing of small boat”, Proceedings of the IEEE International Conference on Systems, Man and Cybernetics, 1, p669-674, (2006).
5. R. Fraga, and L. Sheng, “Non-linear and intelligent controllers for the ship rudder control”, Proceedings of the IEEE Electronics, Communications and Photonics Conference, p1-5, (2011).
6. D. Gerr, Boat Mechanical Systems Handbook: How to Design, Install, and Recognize Proper Systems in Boats, McGraw Hill companies, (2009).
7. Magellan satellite access technology, “ Data Transmission Protocol Specification for Magellan Products-Version 2.11”, Online: http://www.gpsinformation.org/mag-proto-2-11.pdf, Acessed March 19, 2003.
8. T. Perez, Ship Motion Control: Course Keeping and Roll Stabilisation Using Rudder and Fins, Springer Books, (2005).
9. J. E. Woo, and J. H. Kim, “A study on translational motion control in integrated control system for ship steering motion”, Journal of the Korean Society of Marine Engineering, 39(1), p32-44, (2015).
10. H. Qiu, Q. Zhang, J. F. Reid, and D. Wu, Modeling and Simulation of an Electrohudraulic Steering System, Paper number: 993076, ASAE/CSAE-SCGR Annual International Meeting, Toronto, (1999).
11. G. F. Franklin, J. D. Powell, and M. L. Workman, Digital Control and Dynamic Systems, 3rd Edition, World Student Series, (1997).