**7. System assembly and verification of results**

It is implemented in Simulink (Figure 15) the system diagram. If it is compared with the model used for obtaining the controller parameters in the different representative points of work, it is possible to observe that the relay block , has been eliminated, and the PID controller has been replaced for a block, which name is Neuro-PID.

The internal diagram blocks of the Neuro-PID controller, is shown in Figure 16 in the format that has been implemented in Simulink.

As it is shown in Figure 16 a PID controller is implemented where the earnings are the outputs of the artificial neural networks and which inputs are the displacement and the

**Figure 15.** System on Simulink format

14

D uK *Ti Td*

2 3 350 90 4 1 300 80 6 1 350 80 8 1 350 80

2 4 350 80 4 3 300 90 6 1 350 95 8 1 350 85

2 6 400 90 4 3 300 90 6 1 350 90 8 1 300 85

2 6 450 90 4 4 350 90 6 1 350 90 8 1 300 90

It has been designed a neural network type MLP (Multi Layer Perceptron) for scheduling of each one of the controller constants *K*, *Ti* and *Td*. They all have two inputs, which are the displacement and the velocity of the ship, and one output that is the corresponding constant. The neuronal network has an intermediate layer with 5 neurons for *K* and 6 for *Ti* and *Td*. This structure has been adopted after many tests with different numbers of neurons in the middle layer (tests were made from 4 to 9 neurons in the middle layer) for each of the neural networks. The activation functions of neurons in the middle layer are a kind of hyperbolic

Once this configuration is selected it is shown the different characteristics of the training carried out with backpropagation learning. It has been made the training of *K*, *Ti* and *Td* at 531, 705 and 686 respectively epochs, with an average error at the end of the training less than 1%. The artificial neural networks have been trained off-line, although the checking of

It is implemented in Simulink (Figure 15) the system diagram. If it is compared with the model used for obtaining the controller parameters in the different representative points of work, it is possible to observe that the relay block , has been eliminated, and the PID

The internal diagram blocks of the Neuro-PID controller, is shown in Figure 16 in the format

As it is shown in Figure 16 a PID controller is implemented where the earnings are the outputs of the artificial neural networks and which inputs are the displacement and the

tangent, except in the output layer, where one neuron is with a linear function.

8000

12000

16000

20000

**Table 3.** Controller parameters obtained for each rule

**6.3. Implementation of the neural network**

its proper operation has been performed on line.

that has been implemented in Simulink.

**7. System assembly and verification of results**

controller has been replaced for a block, which name is Neuro-PID.

**Figure 16.** Neuro-PID Block

velocity of the ship. The pins In1 and Out1 are the Neuro\_PID block pins of the figure 15, which control signal is joined directly to the servo-rudder.

By this way, the implemented controller will choose the most appropriate parameters for the area in which it is working. It should be noted that more points could be obtained to train neural networks, but it would be more expensive. Furthermore, the neural network itself follows the tendency of data, already interpolates properly between them, showing one of the advantages of its use.

To validate the model created it is resorted to its simulation with different values of the parameters, on which depend the velocity model and displacement.

It has been made different tests at multiple points of work, and in Figure 17 is shown four representative examples in which in all cases is made a steering to -5ž and once stabilized to +10ž.The answer is satisfactory and similar in all cases with the only difference in velocity due to the different velocities. It should be noted that at small velocities to get an adequate response of the steering, similar to the one of the entire range, it is necessary to saturate the

the use of artificial neural networks all these drawbacks are softened to a large extent, since

Neuro-Knowledge Model Based on a PID Controller to Automatic Steering of Ships

http://dx.doi.org/10.5772/50316

117

This methodology provides a uniform response of the system throughout the whole operating range of the ship, regardless of displacement, or the velocity, parameters of which the model depends on. If this depends on other factors, the methodology could be applied

[1] G. C. Nunes, A. A. Rodrigues Coelho, R. Rodrigues Sumar, and R. I. Goytia Mejía. A practical strategy for controlling flow oscillations in surge tanks. *Latin American applied*

[2] O. Begovich, V. M. Ruiz, G. Besancon, C. I. Aldana, and D. Georges. Predictive control with constraints of a multi-pool irrigation canal prototype. *Latin American applied*

[3] David A. Mindell. *Between Human and Machine: Feedback, Control, and Computing Before Cybernetics*. Number xiv, 439 p in Johns Hopkins studies in the history of technology.

[4] S. Bennett. Nicholas minorsky and the automatic steering of ships. *Control Systems*

[5] M.H. Moradi. New techniques for pid controller design. In *Control Applications, 2003. CCA 2003. Proceedings of 2003 IEEE Conference on*, volume 2, pages 903 – 908 vol.2, june

[6] Karl Johan Åström and Tore Hägglund. *PID Controllers: Theory, Design, and Tuning, 2nd*

[7] Y. Li, W. Feng, K.C. Tan, X.K. Zhu, X. Guan, and K.H. Ang. Pideasy(tm) and automated generation of optimal pid controllers. In *Proc. Third Asia-Pacific Conference*

[8] K. Nomoto and K. Taguchi. On the steering qualities of ships (2). *Journal of the Society of*

[9] N.H. Norrbin. On the design and analyses of the zig-zag test on bases of quasi to line frequency response. Technical Report 104-3, The Swendish State Experimental

*on Measurement and Control*, pages 29–33, Dunhuang, China, Sept 1998.

all of them are solved with the use of this aspect of artificial intelligence.

José Luis Calvo Rolle<sup>1</sup> and Héctor Quintián Pardo<sup>2</sup>

equally to them.

**Author details**

**References**

2003.

*Edition*. ISA, 1995.

1University of Coruña, Spain 2University of Salamanca, Spain

*research*, 37:195–200, 07 2007.

*research*, 37:177–185, 07 2007.

The Johns Hopkins University Press, Baltimore, 2002.

*Magazine, IEEE*, 4(4):10 –15, november 1984.

*Naval Architects of Japan*, 101:n.p., 1957.

Shipbuilding Tank (SSPA), Gothenburg, Sweden, 1963.

**Figure 17.** Model response to different operating conditions

output of the controller, fact unwanted at the time of fine-tuning, but necessary to maintain the specifications within a range of values.

After the results achieved, it is pointed a satisfactory behaviour of the implemented system, in which the desired results of uniformity are achieved in the operation, regardless of conditions, from which depends the model of the ship.

#### **8. Conclusion**

Obviously, in non-linear systems, such as the case of the steering a ship studied in this document, and also working across a wide range of operation, and that could be divided in zones with a linear behaviour, in which the control is also feasible using a type PID controller, the option of its use with the method proposed in this paper is an option to take into account.

As an alternative to the different types of autotuning PID's one of the easiest solutions is the one developed in this article. It is necessary to accentuate that it is not an easy solution to adopt, especially with continuous controllers, but with the addition of programmable control devices this labour becomes comparatively simple.

Emphasize that difficulties in the use of PID controllers working with Gain Scheduling, have the problem of taking those points which are significant, interpolation between them and also could happen that the system is stable at selected points but not between them. With the use of artificial neural networks all these drawbacks are softened to a large extent, since all of them are solved with the use of this aspect of artificial intelligence.

This methodology provides a uniform response of the system throughout the whole operating range of the ship, regardless of displacement, or the velocity, parameters of which the model depends on. If this depends on other factors, the methodology could be applied equally to them.

### **Author details**

16

**Figure 17.** Model response to different operating conditions

the specifications within a range of values.

**8. Conclusion**

conditions, from which depends the model of the ship.

devices this labour becomes comparatively simple.

output of the controller, fact unwanted at the time of fine-tuning, but necessary to maintain

After the results achieved, it is pointed a satisfactory behaviour of the implemented system, in which the desired results of uniformity are achieved in the operation, regardless of

Obviously, in non-linear systems, such as the case of the steering a ship studied in this document, and also working across a wide range of operation, and that could be divided in zones with a linear behaviour, in which the control is also feasible using a type PID controller, the option of its use with the method proposed in this paper is an option to take into account. As an alternative to the different types of autotuning PID's one of the easiest solutions is the one developed in this article. It is necessary to accentuate that it is not an easy solution to adopt, especially with continuous controllers, but with the addition of programmable control

Emphasize that difficulties in the use of PID controllers working with Gain Scheduling, have the problem of taking those points which are significant, interpolation between them and also could happen that the system is stable at selected points but not between them. With José Luis Calvo Rolle<sup>1</sup> and Héctor Quintián Pardo<sup>2</sup>

1University of Coruña, Spain 2University of Salamanca, Spain

#### **References**


[10] Bech.M.I. and L. W. Smith. Analogue simulation of ship manoeuvers. Technical Report Hy-14, Hydro and Aerodynamics Laboratory, Lyngby, Denmark.

[25] P. Cominos and N. Munro. Pid controllers: recent tuning methods and design to specification. *Control Theory and Applications, IEE Proceedings -*, 149(1):46 –53, jan 2002.

Neuro-Knowledge Model Based on a PID Controller to Automatic Steering of Ships

http://dx.doi.org/10.5772/50316

119

[26] Karl Johan Åström, H. Panagopoulos, and Tore Hägglund. Design of pid controllers

[27] Tore Hägglund and Karl Johan Åström. Revisiting the ziegler-nichols tuning rules for

[28] J. G. Ziegler and N. B. Nichols. Optimum settings for automatic controllers. *Journal of*

[29] Karl Johan Åström and Tore Hägglund. Automatic tuning of simple regulators with specifications on phase and amplitude margins. *Automatica*, 20(5):645 – 651, 1984.

based on non-convex optimization. *Automatica*, 34(5):585 – 601, 1998.

*Dynamic Systems, Measurement, and Control*, 115(2B):220–222, 1993.

pi control. *Asian Journal of Control*, 4(4):364–380, 2002.


[25] P. Cominos and N. Munro. Pid controllers: recent tuning methods and design to specification. *Control Theory and Applications, IEE Proceedings -*, 149(1):46 –53, jan 2002.

18

–84, jan. 1991.

1092, nov. 2005.

2001.

[10] Bech.M.I. and L. W. Smith. Analogue simulation of ship manoeuvers. Technical Report

[11] S.K. Bhattacharyya and M.R. Haddara. Parametric identification for nonlinear ship

[12] M. H. Casado, R. Ferreiro, and F. J. Velasco. Identification of nonlinear ship model parameters based on the turning circle test. *Journal of Ship Research*, 51(2):174–181, 2007.

[13] Karl Johan Åström and Bjorn Wittenmark. *Adaptive Control*. Addison-Wesley Longman

[14] Karl Johan Åström and Hägglund Tore. The future of pid control. *Control Engineering*

[15] Eduardo F. Camacho and Carlos A. Bordons. *Model Predictive Control in the Process*

[16] W.J. Rugh. Analytical framework for gain scheduling. *Control Systems, IEEE*, 11(1):79

[17] B. Clement and G. Duc. An interpolation method for gain-scheduling. In *Decision and Control, 2001. Proceedings of the 40th IEEE Conference on*, volume 2, pages 1310 –1315 vol.2,

[18] W.M. Lu, K. Zhou, and J.C. Doyle. Stabilization of lft systems. In *Decision and Control, 1991., Proceedings of the 30th IEEE Conference on*, pages 1239 –1244 vol.2, dec 1991.

[19] K. Hiramoto. Active gain scheduling: A collaborative control strategy between lpv plants and gain scheduling controllers. In *Control Applications, 2007. CCA 2007. IEEE*

[20] Joo-Siong Chai, Shaohua Tan, and Chang-Chieh Hang. Gain scheduling control of nonlinear plant using rbf neural network. In *Intelligent Control, 1996., Proceedings of*

[21] Jin-Tsong Jeng and Tsu-Tian Lee. A neural gain scheduling network controller for nonholonomic systems. *Systems, Man and Cybernetics, Part A: Systems and Humans, IEEE*

[22] Chian-Song Chiu, Kuang-Yow Lian, and P. Liu. Fuzzy gain scheduling for parallel parking a car-like robot. *Control Systems Technology, IEEE Transactions on*, 13(6):1084 –

[23] E. Applebaum. Fuzzy gain scheduling for flutter suppression in unmanned aerial vehicles. In *Fuzzy Information Processing Society, 2003. NAFIPS 2003. 22nd International*

[24] M. Zhuang and D.P. Atherton. Tuning pid controllers with integral performance criteria. In *Control 1991. Control '91., International Conference on*, pages 481 –486 vol.1, mar 1991.

*the 1996 IEEE International Symposium on*, pages 502 –507, sep 1996.

*Conference of the North American*, pages 323 – 328, july 2003.

Hy-14, Hydro and Aerodynamics Laboratory, Lyngby, Denmark.

maneuvering. *Journal of Ship Research*, 50(3):197–207, 2006.

Publishing Co., Inc., Boston, MA, USA, 2nd edition, 1994.

*International Conference on*, pages 385 –390, oct. 2007.

*Transactions on*, 29(6):654 –661, nov 1999.

*Practice*, 9(11):1163 – 1175, 2001. <ce:title>PID Control</ce:title>.

*Industry*. Springer-Verlag New York, Inc., Secaucus, NJ, USA, 1997.

