• Nie Znaleziono Wyników

Repository - Scientific Journals of the Maritime University of Szczecin - Optimizing the parameters of the...

N/A
N/A
Protected

Academic year: 2021

Share "Repository - Scientific Journals of the Maritime University of Szczecin - Optimizing the parameters of the..."

Copied!
5
0
0

Pełen tekst

(1)

Maritime University of Szczecin

Akademia Morska w Szczecinie

2010, 20(92) pp. 87–91 2010, 20(92) s. 87–91

Optimizing the parameters of the simplified hydrodynamic

model using genetic algorithms for the prediction marine

systems use

Optymalizacja parametrów uproszczonego modelu

hydrodynamicznego za pomocą algorytmów genetycznych

na potrzeby morskich systemów predykcyjnych

Krzysztof Marcjan, Lucjan Gucma

Maritime University of Szczecin, Faculty of Navigation, Institute of Marine Traffic Engineering Akademia Morska w Szczecinie, Wydział Nawigacyjny, Instytut Inżynierii Ruchu Morskiego 70-500 Szczcin, ul. Wały Chrobrego 1–2

Key words: hydrodynamic model, genetic algorithm, prediction marine systems Abstract

The paper presents investigations concerning the implementation of a prediction system based on hydrodynamic model, capable to find parameters of the simplified hydrodynamic Nomoto model (1st – order).

Optimization of Nomoto model parameters is based on extrapolation of the position, using genetic algorithm and Newton's method.

Słowa kluczowe: model hydrodynamiczny, algorytm genetyczny, morskie systemy predykcyjne Abstrakt

W artykule przedstawiono badania nad wykonaniem systemu predykcji opartym na modelu hydrodynamicz-nym, zdolnym do znalezienia parametrów uproszczonego modelu hydrodynamicznego Nomoto pierwszego rzędu. Optymalizacja parametrów modelu Nomoto odbywa się na podstawie ekstrapolacji pozycji za pomocą algorytmu genetycznego oraz metody Newtona.

Introduction

Creating a prediction system is designed to provide the most accurate information for navigator on the future trajectory of motion of the vessel, depending on the manoeuvre performed [1]. The term manoeuvre prediction means to anticipate the position, course and speed of the vessel within a time determined by the navigator. Predictive models designating future trajectory of motion of the ship, having his past positions are the extra-polation models. The need to anticipate changes in the position of the vessel in real time prevents us from use of sophisticated hydrodynamic models. For this reason, to carry out future position extra-polation, simplified Nomoto model (1st – order) was

used and the prediction of the position using genetic algorithms was performed.

The aim of this study was to build a prediction system based on hydrodynamic model, able to determine the parameters of the first order Nomoto model. Linear Nomoto model consists of 2 va-riables determining which genetic algorithm was used. Optimization of these variables is made by comparing the path performed by detailed multi-coefficient hydrodynamic model [1] and the positions obtained by a simplified linear model of Nomoto.

The genetic algorithm is to minimize the error sum of the differences in positions between the coordinates of the actual trajectory and optimized.

     

m n n n n n y' y x' x 1 2 2 ( ) ) ( min (1)

(2)

where: xn – position of the master model along the

X axis, yn – the location of the master model along

the Y axis, x'n – predicted position along the X axis,

y'n – predicted position along the Y axis.

Fig. 1. Changes in the position of the vessel master and the prediction (the coordinate system adopted in the work) Rys. 1. Różnice trajektorii statku rzeczywiste i przewidywane (układ współrzędnych przyjętych w pracy)

Due to limitations of the linear model, when performing the master route only the small deflection of the rudder in both directions and contain a range of ± 5were used.

Prediction model based on genetic

optimization and simplified hydrodynamic model

Linear Models of the vessel motion

The linear models of the ship motion are models, which largely simplify the phenomena of this movement. They assume that the progressive speed of the vessel is constant and refer only to small rudder displacements. The linear prediction is based on determining the future position of the vessel based on knowledge of initial position, course and speed of the ship.

In order to extrapolate the future position of the vessel a linear Nomoto model (1st – order) was

used. Model equation is as follows:

    K t t    d d d d 2 2 (2) where:  – time constant [s],  – ships course [Rad], t – time [s], K – rudder gain factor [s–1],  – rudder deflection [Rad].

Model tuning is done by two factors: K – rudder gain factor,  – time constant.

The time constant affects the delay in achieving the target angular velocity. K-factor is responsible

for the speed of yawing, and thus a fixed circulation diameter.

Calculation algorithm

The function evaluating algorithm summarizes the exemplary position of the vessel with the posi-tion obtained during the optimizaposi-tion of Nomoto model coefficients. The algorithm of the program begins the relationship of the forward speed Vp and

course , as it is shown in the figure 2.

Fig. 2. Ship’s movement between time periods tn and tn+1 [2] Rys. 2. Pojedyncze przesunięcie statku miedzy okresami czasu

tn a tn+1 [2]

Using the formula shown in figure 2 it is possi-ble to determine the speed along the X axis, as the difference of the shift dx after the time dt:

 sin d d p V t x  (3)

The change in position at the moment tn+1 is

ac-companied by a change of course ( )

1 d n t  : ) d sin( d d ) ( ) ( 1 1     n n t p t V t x   (4)

Using the result from the exit of the formula (2) Nomoto first degree, you can get the formula for changing the angular speed at the time tn+1:

t K n n n t t t d ) ( ) ( ) ( 1         (5)

After substituting the change in angular velocity (5) in design (3) the following equation is received:

                    sin d d ) d d ) ( ) ( 1 V K t t t x n n t tn p t      (6) X Y (xn, yn) (xn+1, yn+1) Vp dy dt dx dt (x0, y0) (x'1, y'1) (x1, y1) (x2, y2) (xm, ym) (x'2, y'2) (x'm, y'm) Y X

(3)

where: 2 1 2 1 2 1 ) ( ) ( ) (         n n n n n n p t t y y x x V (7)

Replacing the progressive speed of the relation-ship between shifts along both axes and time, final design is received, which uses the evaluation func-tion of the genetic algorithm.

Application of genetic algorithm

The genetic algorithm searches the space of al-ternative solutions to the tasks for the best result. The problem defines the environment in which there is a population of individuals. Each individual presents a solution which is represented by genetic algorithm as a binary string.

The application performed a single solution representing the values of two coefficients opti-mized by Nomoto model (1st – order). Every

indi-vidual is composed of 36 bits, 36 bits can thus be written as 2  18 bit, and continue as 2  (218 – 1). Number of bits corresponds to the field of both values, that is K,   [–131.072, 131.071]. For ac-cepted number of combinations of all solutions there are approximately 7  1010 different pairs.

In order to search for the best solutions in a wide field of genetic parameters, to avoid premature convergence of the algorithm the genetic parame-ters were chosen so that, when highly evaluated, but not yet the best solutions are found, they do not dominate the population. The best solutions were calculated when the initial population of individuals was 100–200, with 1000–5000 iterations. The time needed to obtain highly evaluated parameters of the model unables Nomoto optimization in real time.

Hybridization of genetic algorithm

The insensitivity of genetic algorithms for information specific to a task is the source of their wide use – they produce good results without taking account of detailed knowledge about the problem. On the other hand, ignoring available knowledge about the task, genetic algorithms fall unfavourably compared to competitive methods that make use of this information.

The hybridization of genetic algorithm is a way to combine a thorough knowledge of the specific mechanisms of genetic algorithm. It gives the pos-sibility to use a “global vision” of the convergence of genetic algorithm technology [3]. In the application there was used a Newton optimization method – a local search. It aims to improve the final efficiency of genetic search process, both in terms

of assessing the value of optimized coefficients, as well as to shorten the time to find them. The genetic algorithm finds a “hill”, and the technique of local search is acting as a climber, climbing on the “mountain top”. In the application five best solutions identified in the search process of genetic engineering have undergone a local optimization, which was tasked with selecting higher evaluated values located in the vicinity of these solutions.

Newton optimization method

The Newton’s method is a numerical algorithm designed to find the minimum of a given objective function. This method assumes that the test func-tion is continuous and twice differentiable, and that in the study area is strictly convex. The Newton’s method algorithm starts from selecting the starting point x0  D. At this point direction of search

dk  D is calculated. The determination of the

seek-ing direction with a minimum of information is obtained through the second order differential. Test results

The experiment aimed at juxtaposition of two optimization methods and presentation of the Nomoto model coefficients calculation. Evaluation of model parameters is based on calculation of the difference between the position of the ship – the reference based on an accurate hydrodynamic model of the ship and the positions calculated using the Nomoto model. For both optimization methods in table 1 the average position error and the sum of position errors for the entire journey are presented. The analyzed trajectories consist of 200 and 300 positions (corresponding to sections of time respectively 220 and 330 seconds), changing with the rudder deflection within ± 5°.

Presented in table 1 bands trajectories are in the range from 0 to 400 positions and they partially overlap, so it is possible to observe how the values of the coefficients K and are changing to fit with the optimized route section:

a) The differences of both values for a system based on genetic algorithm are large. The average rudder gain factor is Kav = 0.092, and

deviation is 14%. The average value of the time constant is av = 25.188, and deviation is 23%.

b) A system in which the optimization of the coefficients was made by using genetic algorithm and the method of Newton optimi-zation. The average rudder gain factor is Kav = 0.072, and the value of deviation is 11%

Kav. The average value of the time constant is av = 16.2, and deviation is 23%.

(4)

The average position accuracy obtained using the genetic algorithm is about 20 m during the pe-riod of time 220 seconds and about 43 m during 330 seconds. The average accuracy of the position for the genetic algorithm method with Newton's method is about 7 m at time 220 seconds and about 9.5 m within 330 seconds. In figures 3 and 4 are shown routes designated by the two methods com-pared with the reference route, for the section 220 seconds and 330 seconds.

Fig. 3. Comparision of reference trajectory and trajectory optimized for 2 methods for 200 positions: a) the trajectory optimized using both genetic algorithm and the Newton me-thod; b) the reference trajectory and trajectory optimized using genetic algorithm

Rys. 3. Porównanie trajektorii wzorcowej i optymalizowanej dla dwóch metod optymalizacji dla 200 pozycji: a) przy pomo-cy algorytmu genetycznego i metody Newtona dla przykła-dowego manewru; b) za pomocą algorytmu genetycznego

Fig. 4. Comparision of reference trajectory and trajectory optimized for 2 methods for 300 positions: a) the trajectory optimized using both genetic algorithm and the Newton me-thod; b) the reference trajectory and trajectory optimized using genetic algorithm

Rys. 4. Porównanie trajektorii wzorcowej i optymalizowanej dla dwóch metod optymalizacji dla 300 pozycji: a) przy pomo-cy algorytmu genetycznego i metody Newtona dla przykła-dowego manewru; b) za pomocą algorytmu genetycznego

Conclusion

The application of genetic algorithm to optimize the Nomoto model (1st – order) parameters, enables

for high accuracy prediction of the vessel positions on the tested sections of precise hydrodynamic model trajectory. The genetic algorithm uses its operators to ensure the widest possible search area of the solutions, since there is no premature convergence. Representation of binary solution

Table 1. The values of the evaluation factors identified by the genetic algorithm and the combination of genetic algorithm with the function of local optimization

Tabela 1. Wartości oceny współczynników wyłonionych przez algorytm genetyczny oraz połączenie algorytmu genetycznego z funk-cją optymalizacji lokalnej

The test interval trajectory [number of

positions]

Genetic algorithm Genetic algorithm and Newton

K  Sum of position errors [m] Mean position error [m] K  Sum of position errors [m] tion error [m] Mean

posi-0–200 0.107 30.636 4238.03 21.19 0.069 17.358 1137.15 5.69 0–300 0.101 30.817 13231.30 44.10 0.066 15.761 2342.47 7.81 200–400 0.078 19.030 3754.12 18.80 0.069 18.404 1642.13 8.21 100–400 0.082 20.267 12648.70 42.16 0.085 13.271 3294.36 10.98 a) b) a) b)

(5)

requires continuous exchange from binary system to decimal in order to assess the individual pairs of solutions, and this is very costly in time. The genetic algorithm was used to find highly-rated values of parameters in a wide area of solutions. Then vicinities of those values were searched to find local the highest evaluated solutions by the Newton method. A combination of both methods gave very good results, both for evaluation of solutions and the time needed to find them.

The system which can optimize the parameters of the simplified hydrodynamic model using gene-tic algorithms and the Newton method in the future may be used for such purposes as:

– supplementing the traffic of ships derived from AIS;

– predict partial sequences of positions, for a large number of vessels in the narrow passageways,

TSS, approaches to the port where the safe pas-sages are being verified;

– to determination of coefficients of advanced hydrodynamic models.

References

1. GUCMA L.: Modelowanie czynników ryzyka zderzenia jed-nostek pływających z konstrukcjami portowymi i pełno-morskimi. AM Szczecin, Szczecin 2005.

2. MARCJAN K.: Optymalizacja parametrów współczynników modelu hydrodynamicznego statku w czasie rzeczywistym na potrzeby systemów predykcyjnych. AM Szczecin, Szczecin 2009.

3. GOLDBERG D.E.: Algorytmy genetyczne i ich zastosowa-nia. WNT, Warszawa 1998.

4. GUCMA L.: Predykcja w systemie map elektronicznych ja-ko czynnik bezpieczeństwa manewru. WSM Szczecin, Szczecin 1999.

5. MICHALEWICZ Z.: Genetic Algorithms + Data Structures = Evolution Programs (3ed). Springer Verlag, Berlin–Heil-delberg 1996.

Cytaty

Powiązane dokumenty

Czynnikiem stymulującym napływ kapitału zagranicznego do Polski w postaci bezpośrednich inwestycji jest także zaakceptowanie przez stronę polską zasady traktowania

podstawowe cele zastosowania tej metody to: minimalizowanie czasu przebiegu procesów informacyjnych oraz czasów realizacji poszczególnych zadaƒ, które nie wp∏ywajà na

Przeglądając wyniki analizy, szczególnie dotyczące analizy usłonecznienia (rys. 11.3), można stwierdzić, że gęsta zabudowa miejska ogranicza dostęp do światła

Europeizacja może być rozumiana jako integracja w węższym znaczeniu, może być jednak również ujmowana niezależnie od integracji europejskiej, jako szerszy proces obejmujący

Zakres działania jednostki organizacyjnej związany bezpośrednio z gospodarowaniem nieruchomościami komunalnymi 1 opracowywanie zasad przejmowania mienia od innych gmin, ich

&]ĕVWRZRUJDQL]DFMDFKNWyUHPDMćZGURŧRQćQRUPĕ,62Z\VWĕ SXMHSRWU]HEDMHMGDOV]HJRGRVNRQDOHQLD-HVWRQRPRŧOLZHG]LĕNLVWRVRZDQLX

Cechy œrodowiska miejskiego, jego heterogenicznoœæ, zasoby, jego funkcje jako œrodowiska ¿ycia, a tak¿e przestrzeni spotkañ i dialogu, determinuj¹ kierunki rozwoju kultury,

– w badaniach nad portfelami projektów pojawia się inny rodzaj opisu, istotna jest identyfikacja składowych sieci, czyli węzłów i relacji: projekt w portfelu jest