A ship thrust distribution method based on multi-strategy improved whale algorithm
Through multi-strategy improvements of whale algorithms and thruster constrained equation splitting technologies, the problems of complex calculation and slow convergence of traditional ship thrust distribution methods are solved, and the thrust distribution results with high precision and low energy consumption are achieved, meeting the actual engineering needs.
Patent Information
- Application Number
- CN202410270539.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-11
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-03-11
AI Technical Summary
The traditional ship thrust distribution method has complex calculations and weak flexibility, and is prone to falling into local extreme points. The group intelligence algorithm converges slowly when dealing with equation constraints, making it difficult to meet the actual needs of the engineering.
Using multi-strategy to improve the whale algorithm, through the improvement of individual variable selection, population initialization and update methods, thruster constraint equation splitting, normalized space blocks, Latin hypercube optimization and "elite" screening methods are introduced, combining change steps Long "class gradient method" is optimized to improve the robustness and speed of the algorithm.
It realizes high accuracy and low energy consumption of thrust distribution results, quickly obtains reliable global optimal solutions, and improves dynamic positioning accuracy and fast convergence of the algorithm.
Smart Images

Figure CN118153200B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of thrust distribution for dynamic positioning ships, and in particular to a ship thrust distribution method based on a multi-strategy improved whale algorithm. Background Art
[0002] The ship dynamic positioning system is a high-tech marine engineering equipment with strong technical monopoly. my country started late in the technical research in this area, and many core technologies are monopolized by overseas companies. At present, the dynamic positioning system has been widely used in dredgers, shuttle tankers, deep-sea drilling platforms, etc. The propulsion system is a core link of the ship dynamic positioning system. The thrust distribution problem is a complex nonlinear optimization problem with multiple indicators and multiple constraints. The traditional thrust distribution method has the problems of relatively complex calculation, weak flexibility, and easy to fall into local extreme points. The swarm intelligence algorithm does not depend on the cost function and constraint form of the object problem, making it easier to deal with nonlinear optimization problems with multiple indicators and multiple constraints. However, the swarm intelligence algorithm has difficulty in dealing with the equational constraints in the thrust distribution mathematical model. In addition, according to the actual needs of the project, the problem of fast and reliable convergence of the algorithm must be solved.
[0003] After searching relevant patent documents, it was found that the publication number is CN105911867B, and the name is "Ship thrust distribution method based on NSGA-II algorithm"; the publication number is CN106773722B, and the name is "A thrust distribution method for a ship dynamic positioning system based on an artificial fish school algorithm"; they select thrust and angle as individual variables, and introduce a slack variable S to solve the equation constraint problem, which makes the search space range wider, resulting in a slower convergence speed of the algorithm and the risk of falling into a local extreme point. This patent adopts a multi-strategy improved whale algorithm to optimize and solve the thrust distribution, solve the equation constraint problem, improve the robustness and speed of the algorithm, and make the thrust distribution optimization result high in accuracy and low in energy consumption. Summary of the invention
[0004] The purpose of the present invention is to provide a ship thrust distribution method based on a multi-strategy improved whale algorithm. The whale algorithm adopted in the present invention has few parameters, simple operation and strong global optimization ability. Since the original whale algorithm is difficult to meet the actual engineering needs of thrust distribution, the individual variable selection, population initialization and population update methods are improved in many aspects, so that a reliable global optimal solution can be quickly obtained, the dynamic positioning accuracy can be improved and the energy consumption can be reduced.
[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is specifically: a ship thrust distribution method based on a multi-strategy improved whale algorithm, comprising the following steps:
[0006] Step 1, initialize various ship parameters: propeller position parameters, propeller initial state value, propeller thrust and its maximum and minimum values of change rate, propeller angle and its maximum and minimum values of change rate, propeller power and thrust relationship coefficient;
[0007] Step 2: Construct the thruster constraint equation based on independent variables and dependent variables. The basic idea is to split the structural matrix B(α) (α is the current azimuth angle of the thruster) of the constraint terms in the thrust distribution mathematical model into two matrices, where any 3×3 matrix B(α dv )(It is necessary to ensure that the matrix is full rank), and the remaining elements form another matrix B(α iv ), all variables are composed of thrust and angle changes, among which B(α dv ) The corresponding thrust is the dependent variable, and the angle change and the residual thrust are the independent variables;
[0008] Step 3: Initialize the parameters of the improved whale optimization algorithm: population size N, maximum number of iterations t max , using normalized space blocks, Latin hypercube optimization method and "elite" screening method to obtain the initial population, the initial population's optimal individual fitness value and its position;
[0009] Step 4: Use the improved whale optimization algorithm to update individual variables. The specific implementation steps are as follows:
[0010] Step 4.1: Select the individual variables to be updated and calculate the parameters P, C, a, P S and the value of A, where P is a random number between 0 and 1, P S is the adaptive threshold, A=a(2r1-1), C=2r2, Where r1 and r2 are random numbers between 0 and 1, and t is the number of iterations;
[0011] Step 4.2: Determine whether P is greater than P S , otherwise, execute step 4.3. If yes, execute the spiral bubble capture prey strategy. The specific implementation strategy is as follows:
[0012]
[0013] Among them, X(t+1), X(t) and X best (t) are the next moment position, current position and current optimal position of the individual variable, respectively. p Indicates the distance between the current whale position and the optimal whale position, b s represents the helix shape factor, l r is a random number between -1 and 1;
[0014] Step 4.3: Determine whether A is less than 1. If so, execute step 4.4. Otherwise, execute the prey search strategy. The specific implementation method is as follows:
[0015] X(t+1)=X rand (t)-AD, D = |CX rand (t)-X(t)|,X rand (t) is a random individual variable;
[0016] Step 4.4: Execute the strategy of surrounding the prey. The specific implementation method is as follows:
[0017] X(t+1)=X best (t)-AD, D = |CX best (t)-X(t)|;
[0018] Step 4.5: Determine whether all individual variables have been updated. If yes, execute step 4.6; otherwise, execute step 4.1.
[0019] Step 4.6: Use Latin hypercube optimization and variable step-size “quasi-gradient method” to optimize and update the optimal individual variables. The basic idea of this strategy is: use Latin hypercube optimization to generate a certain number of highly dispersed vectors in the search space, and perform multi-directional search along these vectors to obtain the optimal evolutionary direction. Then continue to search and evolve along this direction until the evolution stops or reaches the set number of evolutions. Update the search step-size coefficient and repeat the above multi-directional optimization multi-step search method until the evolution end condition is met.
[0020] Step 5: Determine whether the maximum number of iterations has been reached. If yes, execute step 6; otherwise, execute step 4.
[0021] Step 6: Output the thrust distribution result, update the ship state parameters, and jump to step 3 to perform the thrust distribution calculation for the next cycle.
[0022] Preferably, in step 2, the specific implementation method of constructing the thruster constraint equation based on the independent variable and the dependent variable is as follows:
[0023] The thruster constraint equation is:
[0024] B(α p +Δα)T=τ, and
[0025] Among them, α p +Δα=α,α p is the azimuth angle at the previous moment, Δα is the azimuth angle change, T is the thrust vector, τ is the desired force and torque, B(α pi +Δα i ) is the i-th column vector of B(α), (l xi , lyi ) is the hull coordinate of the i-th propeller, and the three columns that can satisfy the full rank are i1, i2, i3 are column numbers, and the corresponding three thrusters have thrusts respectively. The remaining columns of B(α) form the matrix B(α iv ), the corresponding thrust of the propeller is T iv , then the thruster constraint equation based on the independent variable and the dependent variable is: dv =B -1 (α dv )(τ-B(α iv )T iv ), select independent variables Δα and T iv To improve the individual variables of the whale algorithm, the dependent variable T dv It is calculated according to the thruster constraint equation, and the individual variables are normalized to [0,1]. In the cost function calculation process, the denormalization method is used to restore it to the original value and then perform the corresponding calculation operation.
[0026] Preferably, in step 3, the specific implementation method for obtaining the initial population is:
[0027] Assume that the individual dimension of the population is K, the upper limit of all individual dimensional variables is 1, the lower limit is 0, and the value of each dimensional variable is evenly divided into m segments. Then the value range of the i-th segment is The space blocks are formed by the segmented combination of all dimensional variables, which can form b = m K If there are a balanced space block, the specific steps for initializing the population are as follows:
[0028] Step 3.1: Divide the normalized search space into b spatial blocks evenly by segment combination;
[0029] Step 3.2: Generate a large number of populations in each spatial block. First, use the Latin hypercube optimization method to generate n vectors X with K dimensions in the range [0,1] g , then X g Mapped to the block space, mapped to the individual variable X of the j-th space block j The numerical calculation method for the lth dimension is:
[0030] i l is the variable segment number of the lth dimension of the jth spatial block;
[0031] Step 3.3: Calculate the fitness value of the individual variables in each spatial block respectively, and select the initialization population through two methods. One method is to select the "elite" population as part of the initialization population according to a certain proportion of all individuals in each spatial block. The other method is to select the remaining initial population according to the optimal principle among all the remaining individuals.
[0032] Preferably, in step 4, the adaptive threshold P S The specific calculation method is:
[0033] P S =P SL +P SH , where P SL =0.3+0.2a, the value of this term makes the algorithm focus on global optimization in the early stage of iteration and local optimization in the later stage of iteration. The information entropy introduced by the term value measures the strength of the spatial dispersion of individual variables and mainly affects the optimization method in the early stage of iteration. If the dispersion is weak, the global optimization will be strengthened, and vice versa, the local optimization will be strengthened. i It refers to the number of individual variables in the i-th spatial block. K1>0 is used to adjust the intensity of the dispersion effect, and 0.5≤K2≤1 is the threshold of the dispersion effect.
[0034] Preferably, in step 4, the specific implementation method of using the Latin hypercube optimization method and the variable step size "quasi-gradient method" to optimize and update the optimal individual variables is:
[0035] Step 4.6.1. Initialize parameters, including the number of search directions M and the maximum number of iterations of the optimal direction multi-step search method M. d , optimize the maximum number of attempts M n The current and previous optimal individual positions are X best and wait;
[0036] Step 4.6.2: Use the Latin hypercube optimization method to generate M highly dispersed vectors X in the search space [0,1] S , through X S =X S -0.5X S Processed into a bidirectional vector;
[0037] Step 4.6.3. Calculate X best Update the value along M directions, where the update method for the i-th direction, 1≤i≤M, is as follows: s1 is the step size coefficient, ε c To prevent s1 from being a minimum value of 0, C0 is a constant used to adjust the step size coefficient. d is the current iteration number, l c is the decay coefficient, and the individual variable is updated to X besti =X best +ΔX besti , calculate the updated fitness values of individual variables in M directions respectively, select the optimal fitness value and record the optimal update direction as ΔX best ,renew Determine whether the optimal individual variable is optimized, if so, update X best And execute step 4.6.4, otherwise execute step 4.6.5;
[0038] Step 4.6.4: Continue to find the optimal individual X along the optimal direction best Optimize, update method is X nbest =X best +C s1 ΔX best C s1 is the optimal direction step coefficient, calculate X nbest The fitness value is determined to determine whether it is optimized. Otherwise, execute step 4.6.5. If yes, then X best =X nbest , to determine whether the maximum number of iterations M of the multi-step search method for the optimal direction in the equidistant space has been reached d , otherwise return to step 4.6.4, if yes, execute step 4.6.5;
[0039] Step 4.6.5: Has the maximum number of attempts M been reached? n , otherwise return to step 4.6.2, if yes, execute step 4.6.6;
[0040] Step 4.6.6: After the optimization of the best individual is completed, the optimization result is output.
[0041] Compared with the prior art, the beneficial effects of the present invention are as follows: the thrust allocation method proposed in the present invention reduces the dimension and range of the search space by adopting the independent variables in the thruster constraint equation as individual variables, thereby improving the robustness and rapid convergence of the algorithm; the population is initialized by normalizing the space block, Latin hypercube optimization method and "elite" screening method, increasing the initial population dispersion and the number of "elite" individuals, thereby improving the global optimization ability and optimization efficiency of the algorithm; the adaptive threshold P is introduced S , so that individual variables can more reasonably choose the update mode to improve the global and local optimization capabilities of the algorithm; using the Latin hypercube optimization method and the variable step size "quasi-gradient method" for population update can quickly obtain a good optimization direction and achieve a reliable solution with fewer iterations. Therefore, the thrust allocation method of the present invention can obtain a reliable solution for thrust allocation more quickly than the prior art, and improve the thrust allocation accuracy and reduce energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0043] Figure 1 It is a schematic diagram of the process of the present invention.
[0044] Figure 2 It is a longitudinal force output curve diagram in the present invention.
[0045] Figure 3 It is a lateral force output curve diagram in the present invention.
[0046] Figure 4 It is a curve diagram of the resultant torque output in the present invention.
[0047] Figure 5 It is the absolute deviation and curve graph in the present invention.
[0048] Figure 6 It is a curve diagram of propeller power consumption in the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.
[0050] Example 1
[0051] See also Figures 1 to 6 , Table 2, The technical solution provided by this embodiment is, a ship thrust distribution method based on a multi-strategy improved whale algorithm, comprising the following steps:
[0052] Step 1. Initialize various ship parameters: propeller position parameters, propeller initial state values, propeller thrust and its maximum and minimum change rate, propeller angle and its maximum and minimum change rate, propeller power and thrust relationship coefficient. Some parameters are shown in Table 1 below:
[0053] Table 1 Some parameters of the thruster
[0054]
[0055] Step 2: Construct the thruster constraint equation based on independent variables and dependent variables. The specific formula is:
[0056]
[0057] Select Δα1 and Δα2 as independent variables, T1, T2 and T3 as dependent variables, and use normalization method to take values of [0,1] for individual variables. Use anti-normalization method to restore to original values for calculation in cost function.
[0058] Step 3: Initialize the parameters of the improved whale optimization algorithm: the population size is 40, the maximum number of iterations is 10, the initial population's optimal individual fitness value and its position, and the use of normalized space blocks, Latin hypercube optimization method, and "elite" screening method to obtain the initial population. The specific implementation method is:
[0059] The individual dimension of the population is 2 and the individual variables are between 0 and 1 after normalization. The values of each dimension variable are evenly divided into 3 segments. The value range of the i-th segment is A total of 9 balanced space blocks are formed, and the specific implementation steps for initializing the population are as follows:
[0060] Step 3.1: Divide the normalized search space into 9 spatial blocks evenly through segment combination;
[0061] Step 3.2: Generate a large number of populations in each spatial block. First, use the Latin hypercube optimization method to generate 20 2-dimensional vectors X in the range [0,1] g , then X g Mapped to the block space, mapped to the individual variable X of the j-th space block j The numerical calculation method for the lth dimension is:
[0062] i l is the variable segment number of the lth dimension of the jth spatial block;
[0063] Step 3.3: Calculate the fitness value of the individual variables in each spatial block. First, select 4 "elite" individuals in each spatial block to select a total of 36 individuals as the initial population. The remaining 4 initial populations are selected from all the remaining individuals according to the "elite" method.
[0064] Step 4: Use the improved whale optimization algorithm to update individual variables. The specific implementation steps are as follows:
[0065] Step 4.1: Select the individual variables to be updated and calculate the parameters P, C, a, P S and the value of A, where P is a random number between 0 and 1, A = a(2r1-1), C = 2r2, Where r1 and r2 are random numbers between 0 and 1, t is the number of iterations, is the adaptive threshold;
[0066] Step 4.2: Determine whether P is greater than P S , otherwise, execute step 4.3. If yes, execute the spiral bubble capture prey strategy. The specific implementation strategy is as follows:
[0067]
[0068] Among them, X(t+1), X(t) and X best (t) are the next moment position, current position and current optimal position of the individual variable, respectively. p Indicates the distance between the current position and the optimal position, l r is a random number between -1 and 1;
[0069] Step 4.3: Determine whether A is less than 1. If so, execute step 4.4. Otherwise, execute the prey search strategy. The specific implementation method is as follows:
[0070] X(t+1)=X rand (t)-AD, D = |CX rand (t)-X(t)|,X rand (t) is a random individual variable;
[0071] Step 4.4: Execute the strategy of surrounding the prey. The specific implementation method is as follows:
[0072] X(t+1)=X best (t)-AD, D = |CX best (t)-X(t)|;
[0073] Step 4.5: Determine whether all individual variables have been updated. If yes, execute step 4.6; otherwise, execute step 4.1.
[0074] Step 4.6: Use Latin hypercube optimization method and variable step size “quasi-gradient method” to optimize and update the optimal individual variables. The specific implementation steps are as follows:
[0075] Step 4.6.1, initialization parameters, including 16 search directions, the maximum number of iterations of the optimal direction multi-step search method is 8 times, the maximum number of attempts of extreme optimization is 8 times, and the current and previous optimal individual positions are X best and wait;
[0076] Step 4.6.2: Use the Latin hypercube optimization method to generate 16 highly dispersed vectors X in the search space [0,1] S , through X S =X S -0.5X S Processed into a bidirectional vector;
[0077] Step 4.6.3. Calculate X best Update the values along 16 directions, where the update method for the i-th direction (1≤i≤16) is as follows: Individual variables are updated to X besti =X best +ΔX besti , calculate the updated fitness values of individual variables in M directions respectively, select the optimal fitness value and record the optimal update direction as ΔX best ,renew Determine whether the optimal individual variable is optimized, if so, update X best And execute step 4.6.4, otherwise execute step 4.6.5;
[0078] Step 4.6.4: Continue to find the optimal individual X along the optimal direction best Optimize, update method is X nbest =X best +0.9ΔX best , calculate X nbest The fitness value is determined to determine whether it is optimized. Otherwise, execute step 4.6.5. If yes, then X best =X nbest , determine whether the maximum number of iterations of the multi-step search method for the optimal direction in the equidistant space is 8, otherwise return to step 4.6.4, if yes, execute step 4.6.5;
[0079] Step 4.6.5: Check whether the maximum number of attempts (8) has been reached. If not, return to step 4.6.2. If yes, execute step 4.6.6.
[0080] Step 4.6.6: The optimization of the best individual is completed and the optimization result is output;
[0081] Step 5: Determine whether the maximum number of iterations has been reached. If yes, execute step 6; otherwise, execute step 4.
[0082] Step 6: Output the thrust distribution result, update the ship state parameters, and jump to step 3 to perform the thrust distribution calculation for the next cycle.
[0083] Table 2 Comparison of thrust allocation results of different whale algorithms
[0084]
[0085] In Table 2, thrust and azimuth are selected as individual variables in the WOA1 whale optimization algorithm, and individual variables in the WOA2 whale optimization algorithm are selected according to the method of this patent. The individual variable update method adopts the original whale algorithm. MSWOA is the implementation method of this patent. The number in the brackets after the algorithm name is the maximum number of iterations. All cost functions are set the same. To test the robustness of the algorithm, each optimization algorithm is run 20 times in succession. It can be seen from the data in the table that the algorithm robustness, allocation accuracy and energy consumption are the worst when thrust and azimuth are selected as individual variables. There is a non-convergence situation, and more runs are needed to improve the optimization effect. The WOA2 optimization results show that the original whale algorithm needs more runs to improve the robustness of the algorithm, and the algorithm needs to be improved to further improve the optimization efficiency of the algorithm. From the MSWOA optimization results, it can be seen that the patent method of this embodiment has a fast convergence speed, high algorithm robustness, high thrust allocation accuracy and low energy consumption.
[0086] Depend on Figures 2 to 6 The output results of the algorithm in this embodiment are compared with the common SQP algorithm. From the waveform in the figure, it can be seen that both algorithms in this embodiment obtain feasible thrust distribution solutions. Figures 2 to 5It can be seen that the accuracy of the algorithm of this embodiment is higher than that of the SQP algorithm (the total deviation of the SQP algorithm is 23.73, and the total deviation of the MSWOA algorithm is 11.59). In the initial stage, due to the physical constraints of the thruster itself, it takes a certain amount of time for the output to track the expected value, and the algorithm of this embodiment has a faster tracking speed. Except for the initial stage, the algorithm of this embodiment realizes high-precision indiscriminate tracking. The SQP algorithm has a certain degree of deviation, especially when the signal jumps in the 101st sampling cycle (at this time, it does not exceed the physical constraints of the thruster itself), it cannot quickly track the expected value and produces a large deviation. In summary, it can be seen that the algorithm of this embodiment has stronger adaptability and can obtain higher-precision output results under different working conditions. The SQP algorithm is more likely to produce a certain degree of deviation when dealing with complex working conditions. Figure 6 It can be seen that the total energy consumption of this embodiment is lower, which is 15.088kW (the total power consumed by the SQP algorithm is 15.924kW), and although the output thrust is small in the initial stage, resulting in low power consumption of the SQP algorithm, it also leads to a large output deviation. In summary, the thrust allocation method proposed in this embodiment can improve the thrust allocation accuracy and reduce energy consumption. In addition, the thrust allocation algorithm of this embodiment can modify each index coefficient according to actual needs to adapt to the thrust allocation optimization of different working conditions.
[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A ship thrust distribution method based on a multi-strategy improved whale algorithm, characterized in that: The steps include: Step 1, initialize various ship parameters: propeller position parameters, propeller initial state value, propeller thrust and its maximum and minimum values of change rate, propeller angle and its maximum and minimum values of change rate, propeller power and thrust relationship coefficient; Step 2: Construct the propeller constraint equation based on independent variables and dependent variables, split the structural matrix B(α) of the constraint terms in the thrust distribution mathematical model into two matrices, α is the current azimuth angle of the propeller, and any one of the 3×3 matrices B(ɑ dv ), the remaining elements form another matrix B(α iv ), all variables are composed of thrust and angle changes, among which B(α dv ) The corresponding thrust is the dependent variable, and the angle change and the residual thrust are the independent variables; In step 2, the thruster constraint equation based on the independent variables and the dependent variables is constructed as follows: The thruster constraint equation is: B(a p +Δα)T=τ,and Among them, α p +Δα=α,α p is the azimuth angle at the previous moment, Δα is the azimuth angle change, T is the thrust vector, τ is the desired force and torque, B(α pi +Δα i ) is the i-th column vector of B(α), (l xi , l yi ) is the hull coordinate of the i-th propeller, and the three columns that satisfy the full rank are i1, i2, i3 are column numbers, and the corresponding three thrusters have thrusts respectively. The remaining columns of B(α) form the matrix B(α iv ), the corresponding thrust of the propeller is T iv , then the thruster constraint equation based on the independent variable and the dependent variable is: dv =B -1 (α dv )(τ-B(α iv )T iv ), select independent variables Δα and T iv To improve the individual variables of the whale algorithm, the dependent variable T dv It is calculated according to the thruster constraint equation, and the individual variables are normalized to [0, 1]. In the cost function calculation process, the denormalization method is used to restore it to the original value and then perform the corresponding calculation operation; Step 3: Initialize the parameters of the improved whale optimization algorithm: population size N, maximum number of iterations t max , using normalized space blocks, Latin hypercube optimization method and "elite" screening method to obtain the initial population, the initial population's optimal individual fitness value and its position; In step 3, the method for obtaining the initial population is: Assume that the individual dimension of the population is K, the upper limit of all individual dimensional variables is 1, the lower limit is 0, and the value of each dimensional variable is evenly divided into m segments. Then the value range of the i-th segment is The space blocks are formed by the segmented combination of all dimensional variables, which can form b = m K If there are a balanced space block, the steps to initialize the population are as follows: Step 3.1: Divide the normalized search space into b spatial blocks evenly by segment combination; Step 3.2: Generate a large number of populations in each spatial block. First, use the Latin hypercube optimization method to generate n vectors X with a K-dimensional range of [0, 1] g , then X g Mapped to the spatial block, mapped to the individual variable X of the jth spatial block j The numerical calculation method for the lth dimension is: 1≤l≤K,1≤j≤b,1≤i l ≤m,i l is the variable segment number of the lth dimension of the jth spatial block; Step 3.3: Calculate the fitness value of the individual variables in each spatial block respectively, and select the initialization population in two ways. One way is to select the "elite" population as part of the initialization population according to a certain proportion of all individuals in each spatial block, and the other way is to select the remaining initial population according to the optimal principle among all the remaining individuals; Step 4: Use the improved whale optimization algorithm to update individual variables; Step 5: Determine whether the maximum number of iterations has been reached. If yes, execute step 6; otherwise, execute step 4. Step 6: Output the thrust distribution result, update the ship state parameters, and jump to step 3 to perform the thrust distribution calculation for the next cycle.
2. According to claim 1, a ship thrust distribution method based on a multi-strategy improved whale algorithm is characterized by: The step 4 includes the following steps: Step 4.1, select an individual variable to be updated and calculate the parameters P, C, a, P S and the value of A, where P is a random number between 0 and 1, P S is the adaptive threshold, A=a(2r1-1), C=2r2, Where r1 and r2 are random numbers between 0 and 1, and t is the number of iterations; Step 4.2: Determine whether P is greater than P S , otherwise, execute step 4.
3. If yes, execute the spiral bubble capture prey strategy. The implementation strategy is as follows: D p =|X best (t)-X(t)|, Among them, X(t+1), X(t) and X best (t) are the next moment position, current position and current optimal position of the individual variable, respectively. p Indicates the distance between the current whale position and the optimal whale position, b s represents the helix shape factor, l r is a random number between -1 and 1; Step 4.3: Determine whether A is less than 1. If so, execute step 4.
4. Otherwise, execute the prey search strategy as follows: X(t+1)=X rand (t)-AD, D = |CX rand (t)-X(t)|,X rand (t) is a random individual variable; Step 4.4: Execute the strategy of surrounding the prey as follows: X(t+1)=X best (t)-AD,D=|CX best (t)-X(t)|; Step 4.5: Determine whether all individual variables have been updated. If yes, execute step 4.6; otherwise, execute step 4.
1. Step 4.6: Use Latin hypercube optimization method and variable step size "quasi-gradient method" to optimize and update the optimal individual variables.
3. The ship thrust distribution method based on the multi-strategy improved whale algorithm according to claim 2 is characterized by: In step 4, the adaptive threshold P S The specific calculation method is: P S =P SL +P SH , where P SL =0.3+0.2a,P SL The algorithm focuses on global optimization in the early iteration and local optimization in the later iteration. P SH The information entropy is introduced to measure the spatial dispersion of individual variables and mainly affects the optimization method in the early stage of iteration. If the dispersion is weak, the global optimization will be strengthened, and vice versa, the local optimization will be strengthened. i It refers to the number of individual variables in the i-th spatial block. K1>0 is used to adjust the intensity of the dispersion effect, and 0.5≤K2≤1 is the threshold of the dispersion effect.
4. The ship thrust distribution method based on the multi-strategy improved whale algorithm according to claim 1 is characterized by: In step 4, the method of optimizing and updating the optimal individual variables using the Latin hypercube optimization method and the variable step size "quasi-gradient method" is: Step 4.6.
1. Initialize parameters, including the number of search directions M and the maximum number of iterations of the optimal direction multi-step search method M. d , optimize the maximum number of attempts M n The current and previous optimal individual positions are X best and Step 4.6.2: Use the Latin hypercube optimization method to generate M highly dispersed vectors X in the search space [0, 1] S , through X S =X S -0.5X S Processed into a bidirectional vector; Step 4.6.
3. Calculate X best Update the value along M directions, where the update method for the i-th direction, 1≤i≤M, is as follows: s1 is the step size coefficient, ε c To prevent s1 from being a minimum value of 0, C0 is a constant used to adjust the step size coefficient. d is the current iteration number, l c is the decay coefficient, and the individual variable is updated to X besti =X best +ΔX besti , based on the update values of the M directions obtained in the above manner, calculate the update fitness value of the individual variable, select the optimal fitness value and record the optimal update direction as ΔX best ,renew Determine whether the optimal individual variable is optimized, if so, update X best And execute step 4.6.4, otherwise execute step 4.6.5; Step 4.6.4: Continue to find the optimal individual X along the optimal direction best Optimize, update method is X nbest =X best +C s1 ΔX best C s1 is the optimal direction step coefficient, calculate X nbest The fitness value is determined to determine whether it is optimized. Otherwise, execute step 4.6.
5. If yes, then X best =X nbest , to determine whether the maximum number of iterations M of the multi-step search method for the optimal direction in the equidistant space has been reached d , otherwise return to step 4.6.4, if yes, execute step 4.6.5; Step 4.6.5: Has the maximum number of attempts M been reached? n , otherwise return to step 4.6.2, if yes, execute step 4.6.6; Step 4.6.6: After the optimization of the best individual is completed, the optimization result is output.
Citation Information
Patent Citations
Ship Thrust Allocation Method Based on NSGA-II Algorithm
CN105911867B
A thrust allocation method for ship dynamic positioning system based on artificial fish swarm algorithm
CN106773722B
Thrust distribution method for rotatable multi-propeller ship
CN110794682A
Array element failure correction method based on improved whale optimization algorithm
CN111695233A
Fault-tolerant control method for underwater robot propulsion system faults
CN116224964A
