A ship thrust distribution method based on improved dung beetle algorithm

Through the improved dung beetle algorithm, spatial blockization and 'elite' screening method are used to initialize the population, combined with dynamic boundaries and 'gradient-like method' updates, the complexity and local extreme value problems of the traditional thrust allocation method are solved, and a stable , fast global optimal thrust distribution, improving accuracy and energy efficiency.

CN117131782BActive Publication Date: 2024-09-20BENGBU TAOBO EDUCATION CONSULTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311217515.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2024-09-20
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

The traditional ship thrust allocation method has complex calculations and is prone to falling into local extremes. Although the swarm intelligence algorithm provides a solution path, it has problems with stability, reliability and rapid convergence.

Method used

The improved dung beetle algorithm is used to initialize the population through space blockization and 'elite' screening method. Dynamic population boundaries and 'class gradient method' are introduced to update the population, optimize thrust distribution, and obtain a stable and reliable global optimal solution.

Benefits of technology

It achieves fast and stable thrust distribution results, improves positioning accuracy and energy efficiency, reduces energy consumption, and meets the real-time needs of engineering applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117131782B
    Figure CN117131782B
Patent Text Reader

Abstract

The present invention relates to the technical field of thrust distribution of dynamic positioning ships, and in particular to a method for ship thrust distribution based on an improved dung beetle algorithm, comprising: 1. initializing various ship parameters; 2. calculating the specific solution of the constraint term of the thrust distribution equation and the dynamic boundary of individual variables according to current and historical data information; 3. initializing the parameters of the improved dung beetle optimization algorithm, including population size, maximum number of iterations, obtaining the initial population by using spatial blockization and "elite" screening method, etc.; 4. updating individual variables by using the original dung beetle optimization algorithm; 5. updating individual variables by using a variable step-size "quasi-gradient method"; 6. judging whether the maximum number of iterations is reached, if yes, executing step 7, otherwise executing step 4; 7. outputting the thrust distribution result, updating the ship state parameters, and jumping to step 2 to perform the next period thrust distribution calculation. The present invention can obtain the global optimal solution of thrust distribution with fewer iterations, and improve the accuracy of ship thrust distribution.
Need to check novelty before this filing date? Find Prior Art

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 an improved dung beetle algorithm. Background Art

[0002] As a high-tech marine equipment widely used on marine engineering ships, the ship dynamic positioning system plays an important role in ocean exploration, especially in the field of deep-sea exploration. At present, the dynamic positioning system has been widely used in scientific research ships, supply ships, drilling ships, etc. The thrust distribution link plays a vital role in the dynamic positioning process. It is the link between the control system and the propulsion system. The thrust distribution of the dynamic positioning ship is a complex and highly nonlinear optimization problem. The traditional thrust distribution method is relatively complex to calculate and is prone to fall into local extreme points. The swarm intelligence algorithm does not depend on the cost function and constraint form of the object problem, so the above problems existing in the traditional thrust distribution can be solved, opening up another path for solving the thrust distribution problem. However, the swarm intelligence algorithm sacrifices time and needs to solve the problems of stability, reliability and rapid convergence. The present invention uses an improved dung beetle algorithm from a global optimization perspective, and solves thrust distribution under the premise of comprehensively considering energy consumption, mechanical wear, singularity and deviation performance indicators. The thrust distribution method initializes the population through spatial blockization and "elite" screening method, introduces dynamic population boundaries and "quasi-gradient method" to update the population, and improves the algorithm's multi-strategy, thereby obtaining a stable, reliable and fast global optimal solution, improving positioning accuracy and achieving energy conservation and emission reduction. Summary of the invention

[0003] In view of the shortcomings of the above-mentioned prior art, the present invention provides a ship thrust distribution method based on an improved dung beetle algorithm, which can quickly obtain a stable and reliable global optimal thrust distribution result, improve the thrust distribution accuracy and reduce energy consumption.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0005] A ship thrust distribution method based on an improved dung beetle algorithm comprises the following steps:

[0006] Step 1: Initialize various ship parameters: structural parameters, state parameters, thrust and angle constraints, propeller power and thrust relationship coefficients, and calculate solutions to the homogeneous linear equations with incremental equation constraints;

[0007] Among them, the expression of the incremental equality constraint homogeneous linear equation system is:

[0008]

[0009] Among them, (lxn , l yn ) is the nth propeller hull coordinate, find the solution of the above homogeneous linear equations, where the basic solution is Y1, Y2, ..., Y m , the corresponding basic solution coefficients (selected as individual variables) are r1, r2, ..., r m , ΔT xn and ΔT yn is the incremental thrust component of thruster n on the x-axis and y-axis;

[0010] Step 2: Calculate the specific solution of the constraint terms of the thrust distribution equation and the dynamic boundary of the individual variables based on the current and historical data information;

[0011] The specific solution of the equality constraint is w is the weight coefficient, Δτ c is the expected value of incremental thrust;

[0012] The definition of the dynamic boundary of individual variables is obtained by constructing an inequality constraint matrix using the elimination method;

[0013] Step 3: Initialize the parameters of the improved dung beetle optimization algorithm, including population size, maximum number of iterations, and use of spatial blockization and "elite" screening methods to obtain the initial population;

[0014] Step 4: Use the original dung beetle optimization algorithm to update individual variables. The specific implementation steps are as follows:

[0015] Step 4.1: Determine whether the current update individual is a rolling ball dung beetle. Otherwise, execute step 4.2. If yes, generate a random number δ between (0,1) br , and update the dung beetle position using the following discriminant;

[0016]

[0017] x i (t+1)=x i (t)+tan(θ)|x i (t)-x i (t-1)|δ br >C br

[0018] Among them, C br is a set constant, θ is a deflection angle between 0 and π, but when θ is equal to 0, π / 2 or π, the position is not updated. i (t) is the position of the rolling ball dung beetle i at the tth iteration, X w is the global worst position;

[0019] Step 4.2, determine whether the current updated individual is an egg ball, otherwise execute step 4.3, if yes, update the egg ball position according to the following formula;

[0020]

[0021] in, and are the upper and lower bounds of the spawning area, respectively, and B i (t) is the position of egg ball i at the tth iteration, b1 and b2 are random variables, L b and U b are the lower and upper bounds of the original optimization region, respectively, * is the current local optimal position, R = 1-t / t max , t max is the maximum number of iterations;

[0022] Step 4.3, determine whether the currently updated individual is a small dung beetle, otherwise execute step 4.4, if yes, update the position of the small dung beetle according to the following formula;

[0023]

[0024] in and are the upper and lower bounds of the foraging area, respectively, and C1 is a random variable that conforms to the normal distribution, C2 is a random number between 0 and 1, and X b is the global optimal position;

[0025] Step 4.4, update the position of the stealing dung beetle according to the following formula;

[0026] x i (t+1)=X b +S×g×(|x i (t)-X * |+|x i (t)-X b |)

[0027] Where S is a set constant, g is a one-dimensional random vector, and its dimension is equal to that of the individual variable;

[0028] Step 5: Use the variable step size "quasi-gradient method" to update individual variables. The basic idea of ​​this strategy is: select individuals that need to be deeply optimized (usually select several optimal individuals) and search along several equidistant spaces to obtain the optimal evolutionary direction, and continue to search and evolve along this direction until the evolution stops or reaches the set number of evolutions, and repeat the above equidistant space optimal direction multi-step search method until the evolution end condition is met;

[0029] Step 6: Determine whether the maximum number of iterations has been reached. If yes, execute step 7; otherwise, execute step 4.

[0030] Step 7: Output the thrust distribution result, update the ship state parameters, and jump to step 2 to perform the thrust distribution calculation for the next cycle.

[0031] Preferably, in step 2, the specific method for defining the dynamic boundary of the individual variable is as follows:

[0032] Assume T n (i) is the current thrust value of the i-th thruster, Δα b (i) is the maximum angle change per unit cycle of the i-th thruster, L Tb (i) and U Tb (i) are the minimum and maximum set limits associated with the i-th thruster, T min (i) and T max (i) are the minimum and maximum thrust values ​​of the i-th thruster, ΔT min (i) and ΔT max (i) are the minimum and maximum values ​​of thrust change per sampling period of the i-th thruster, respectively, then we can get:

[0033]

[0034]

[0035] where a L =max(ΔT min (i),T min (i)-T n (i)), b L =min(ΔT max (i),T max (i)-T n (i)) According to the general solution and special solution of the equality constraint terms and the set limit minimum and maximum values ​​related to the thruster, the following inequality constraint matrix is ​​constructed:

[0036]

[0037] Among them, K1 and K2 are dynamic boundary expansion coefficients, K n ≥0 and K P ≥0 is the offset. By applying the “elimination method” to the above inequality matrix, we can obtain the individual variables r1, r2, …, r m dynamic limits.

[0038] Preferably, in step 3, the specific implementation method of using spatial partitioning and "elite" screening method to obtain the initial population is:

[0039] Assume that the individual dimension of the population is N, and the upper and lower limits of the j-th dimension variable are and Divided by its center and Two intervals, the maximum number of space blocks can reach 2 N , let the upper and lower limits of the j-dimensional variable of the m-th spatial block be and but:

[0040]

[0041] Where μ is a set constant, is a chaotic sequence, is the i-th population individual in this spatial block. According to the pinhole imaging reverse learning method The individuals generated in the symmetric space block are

[0042]

[0043] Where n is the adjustment factor. According to the above, the generation of each space block population consists of two parts. One part is generated by using a chaotic operator alone, and the other part is generated by mapping the symmetrical space block through the pinhole imaging reverse learning method. Each space block generates a large number of populations.

[0044] Assume the number of space blocks is N b The final population size is M S Each spatial block initially selects a population probability P S , then the initial population "elite" selection strategy is: each space block retains the optimal M S P S / N b Individual variables are used as the final population individuals. According to the above criteria, a certain number of population individuals are initially selected in each block space, and the remaining initialized population individuals are selected from the remaining massive population.

[0045] Preferably, in step 5, the specific implementation method of updating individual variables by the variable step size "quasi-gradient method" is:

[0046] Suppose that the optimal particle for variable step-size gradient-like deep optimization is X b ,

[0047] Step 5.1, initialize parameters and randomly generate M directional particles X S (M / 2 particles are generated by chaotic operators, and the other M / 2 particles are generated by the pinhole imaging reverse learning method). The maximum number of iterations of the multi-step search method for the optimal direction in equidistant space is M. d ;

[0048] Step 5.2: Calculate X b Update the value along M directions, where the update method for the i-th direction (1≤i≤M) is as follows:

[0049]

[0050] Where s1 is the step size coefficient, X bi and X Si Particle X b and X S The i-th dimension variable of

[0051] X bi =X bi +ΔX bi

[0052] According to the above formula, calculate the particle X in M ​​directions respectively. b Update the fitness value, select the optimal fitness value and record the optimal update direction as ΔX best , determine whether the particle is optimized, if yes, execute step 5.3, otherwise execute step 5.5;

[0053] Step 5.3: Continue to find the optimal particle X along the optimal direction b Optimization, update method is as follows:

[0054] X b =X b +C s1 ΔX best

[0055] C s1 is the step coefficient, calculate the particle X b Adaptation value and determine whether it is optimized, if so, update particle X b The optimal solution and the optimal fitness value of the particle are updated. s1 =C s1 ×C s2 , C s2 is the variable step size factor, return to step 5.3, otherwise execute step 5.4;

[0056] Step 5.4: 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 update s1, C s1 and C s2 The value of (the three parameter update method is to reduce the current value by a certain proportion) and return to step 5.1, if yes, execute step 5.5;

[0057] Step 5.5: After the deep optimization is completed, update the individual and global optimal values.

[0058] Compared with the prior art, the present invention has the following beneficial effects:

[0059] The thrust allocation method proposed in the present invention adopts the coefficient of the particular solution of the equality constraint term as the individual variable, reduces the dimension and scope of the search space, and lays a foundation for the algorithm to obtain reliable solutions and fast convergence; in addition, the population is initialized by spatial blockization and the "elite" screening method, the initial population dispersion and the number of "elite" individuals are increased, and the optimization efficiency and convergence stability are improved; the dynamic population boundary is introduced to obtain a reasonable search space and improve the convergence speed of the algorithm; finally, the variable step size "quasi-gradient method" is used to update the population, simulate the regional traversal search, and obtain a reliable solution with a smaller number of iterations. Therefore, the thrust allocation method of the present invention can more quickly obtain stable and reliable thrust allocation results than the prior art, and at the same time can improve the thrust allocation accuracy and achieve energy conservation and emission reduction. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a schematic diagram of the process of the present invention;

[0061] Figure 2 is a longitudinal force output curve diagram of the present invention;

[0062] Figure 3 is a lateral force output curve diagram of the present invention;

[0063] Figure 4 It is the resultant torque output curve diagram of the present invention;

[0064] Figure 5 is the absolute deviation and curve graph of the present invention;

[0065] Figure 6 It is a curve diagram of propeller power consumption of the present invention. DETAILED DESCRIPTION

[0066] The following is combined with Figure 2-6 , Table 2-3 and a ship model example illustrate the technical solution of the present invention in detail:

[0067] A ship thrust distribution method based on an improved dung beetle algorithm comprises the following steps:

[0068] Step 1: Initialize various ship parameters: structural parameters, state parameters, thrust and angle constraints, propeller power and thrust relationship coefficients, calculate the solution of the incremental equation constraint homogeneous linear equation system, some parameters are as follows:

[0069] Table 1 Some parameters of the thruster

[0070]

[0071] The expression of the incremental equality constraint homogeneous linear equation system is:

[0072]

[0073] Find the solution of the above homogeneous linear equations, whose basic solution is [0,-1,0,1,0] T and [-5.7927,-1,5.7927,0,1] T , the corresponding basic solution coefficients (selected as individual variables) are r1, r2, ΔT xi and ΔT yi is the incremental thrust component of thruster i on the x-axis and y-axis;

[0074] Step 2: Calculate the specific solution of the constraint terms of the thrust distribution equation and the dynamic boundary of the individual variables based on the current and historical data information;

[0075] Among them, the special solution of the equality constraint is w=diag(3,3,3,3,0.1134),Δτ c is the expected value of incremental thrust;

[0076] The specific method for defining the dynamic boundary of individual variables is as follows:

[0077] Assume T n (i) is the current thrust value of the i-th thruster, Δα b (i) is the maximum angle change per unit cycle of the i-th thruster, L Tb (i) and U Tb (i) are the minimum and maximum set limits associated with the i-th thruster, T min (i) and T max (i) are the minimum and maximum thrust values ​​of the i-th thruster, ΔT min (i) and ΔT max (i) are the minimum and maximum values ​​of thrust change per sampling period of the i-th thruster, respectively, then we can get:

[0078]

[0079]

[0080] where a L =max(ΔT min (i),T min (i)-T n (i)), b L =min(ΔT max (i),T max (i)-T n (i)) According to the general solution and special solution of the equality constraint terms and the set limit minimum and maximum values ​​related to the thruster, the following inequality constraint matrix is ​​constructed:

[0081]

[0082] Applying the “elimination method” to the above inequality matrix can obtain the dynamic limits of individual variables r1 and r2;

[0083] Step 3: Initialize the parameters of the improved dung beetle optimization algorithm, including a population size of 40, a maximum number of iterations of 5 and 100, and the use of spatial partitioning and "elite" screening methods to obtain the initial population. The specific implementation method of using spatial partitioning and "elite" screening methods to obtain the initial population is as follows:

[0084] The individual dimension of the population is 2, and the upper and lower limits of the j-th dimension variable are and Divided by its center and There are two intervals, so the number of spatial blocks is 4. Let the upper and lower limits of the j-dimensional variable of the m-th spatial block be and but:

[0085]

[0086] Where μ is a set constant, is a chaotic sequence, is the i-th population individual in this spatial block. According to the pinhole imaging reverse learning method The individuals generated in the symmetric space block are

[0087]

[0088] Where n is the adjustment factor (the value is 1 in this example). According to the above, the generation of each space block population consists of two parts. One part is generated by using a chaotic operator alone, and the other part is generated by mapping the symmetrical space block through the pinhole imaging reverse learning method. Each space block generates a large number of populations.

[0089] There are 4 spatial blocks, and the final number of selected populations is 40. The probability of initial selection of a population in each spatial block is 0.6. The "elite" selection strategy for the initial population is: each spatial block retains the best 6 individual variables as the final population individuals, and a certain number of population individuals are initially selected in each block space according to the above criteria, and the remaining initialized population individuals are selected from the remaining massive population.

[0090] Step 4: Use the original dung beetle optimization algorithm to update individual variables. The specific implementation steps are as follows:

[0091] Step 4.1: Determine whether the current update individual is a rolling ball dung beetle. Otherwise, execute step 4.2. If yes, generate a random number δ between (0,1)br , and update the dung beetle position using the following discriminant;

[0092]

[0093] x i (t+1)=x i (t)+tan(θ)|x i (t)-x i (t-1)|δ br >0.9

[0094] Where θ is the deflection angle between 0 and π, but when θ is equal to 0, π / 2 or π, the position is not updated. i (t) is the position of the rolling ball dung beetle i at the tth iteration, X w is the global worst position;

[0095] Step 4.2, determine whether the current updated individual is an egg ball, otherwise execute step 4.3, if yes, update the egg ball position according to the following formula;

[0096]

[0097] in and are the upper and lower bounds of the spawning area, respectively, and B i (t) is the position of egg ball i at the tth iteration, b1 and b2 are random variables, L b and U b are the lower and upper bounds of the original optimization region, respectively, * is the current local optimal position, R = 1-t / t max , t max is the maximum number of iterations;

[0098] Step 4.3, determine whether the currently updated individual is a small dung beetle, otherwise execute step 4.4, if yes, update the position of the small dung beetle according to the following formula;

[0099]

[0100] in and are the upper and lower bounds of the foraging area, respectively, and C1 is a random variable that conforms to the normal distribution, C2 is a random number between 0 and 1, and X b is the global optimal position;

[0101] Step 4.4, update the position of the stealing dung beetle according to the following formula;

[0102] xi (t+1)=X b +0.5×g×(|x i (t)-X * |+|x i (t)-X b |)

[0103] Where g is a one-dimensional random vector, and its dimension is equal to that of the individual variable;

[0104] Step 5: Use the variable step-size "quasi-gradient method" to update individual variables. The basic idea of ​​this strategy is: select individuals that need to be deeply optimized (usually select several optimal individuals) and search along several equidistant spaces to obtain the optimal evolutionary direction, and continue to search and evolve along this direction until the evolution stops or reaches the set number of evolutions. Repeat the above multi-step search method for the optimal direction of the equidistant space until the evolution end condition is met; the specific implementation method of the variable step-size "quasi-gradient method" to update individual variables is:

[0105] Suppose that the optimal particle for variable step-size gradient-like deep optimization is X b ,

[0106] Step 5.1, initialize parameters and randomly generate 16 directional particles X S (8 particles are generated by chaotic operators, and the other 8 particles are generated by pinhole imaging reverse learning method). The maximum number of iterations of the optimal direction multi-step search method in equidistant space is M. d ;

[0107] Step 5.2: Calculate X b Update the values ​​along 16 directions, where the update method for the i-th direction (1≤i≤16) is as follows:

[0108]

[0109] Where s1 is the step size coefficient, X bi and X Si Particle X b and X S The i-th dimension variable of

[0110] X bi =X bi +ΔX bi

[0111] According to the above formula, calculate the particle X in M ​​directions respectively. b Update the fitness value, select the optimal fitness value and record the optimal update direction as ΔX best , determine whether the particle is optimized, if yes, execute step 5.3, otherwise execute step 5.5;

[0112] Step 5.3: Continue to find the optimal particle X along the optimal direction b Optimize and update the method as follows:

[0113] X b =X b +C s1 ΔX best

[0114] C s1 is the step coefficient, calculate the particle X b Adaptation value and determine whether it is optimized, if so, update particle X b The optimal solution and the optimal fitness value of the particle are updated. s1 =C s1 ×C s2 , C s2 is the variable step size factor, return to step 5.3, otherwise execute step 5.4;

[0115] Step 5.4: 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 update s1, C s1 and C s2 The value of (the three parameter update method is to reduce the current value by a certain proportion) and return to step 5.1, if yes, execute step 5.5;

[0116] Step 5.5: After the deep optimization is completed, update the individual and global optimal values.

[0117] Step 6: Determine whether the maximum number of iterations has been reached. If yes, execute step 7; otherwise, execute step 4.

[0118] Step 7: Output the thrust distribution result, update the ship state parameters, and jump to step 2 to perform the thrust distribution calculation for the next cycle.

[0119] Table 2 Comparison of output results when the maximum number of iterations is 5

[0120]

[0121]

[0122] Table 3 Comparison of output results when the maximum number of iterations is 100

[0123]

[0124] Result description:

[0125] The comparison algorithms in Table 2 and Table 3 are particle swarm optimization (PSO), sparrow optimization algorithm (SSA), whale optimization algorithm (WOA), Harris Hawk optimization algorithm (HHO), dung beetle optimization algorithm (DBO), and improved dung beetle optimization algorithm (IDBO) of the present invention. Figures 2 to 5 The comparison algorithm is the sequential quadratic programming (SQP) method, the cost function is set the same, the boundary value of the individual variable is set the same (except that the algorithm of the present invention adopts a dynamic boundary). To test the stability of the algorithm, each optimization algorithm is run continuously for 20 times, and the number of iterations is 5 and 100 for testing respectively. The deviation, power and time in Table 2 and Table 3 are all the sum of 100 sampling periods, and the deviation refers to the sum of the absolute deviation of the longitudinal force, the absolute deviation of the lateral force and the absolute deviation of the moment.

[0126] It can be seen from the data in Table 2 that when the number of iterations is small, the deviations in the optimization results of the other five swarm intelligent optimization algorithms except the algorithm of the present invention are relatively large and fluctuate greatly, while the deviation of the algorithm of the present invention is the smallest (the deviation is mainly caused by the physical condition constraints of the thruster when the demand jump occurs in the 80th sampling cycle) and the fluctuation is very small, indicating that the algorithm of the present invention is more stable and has higher convergence accuracy; the power data shows that the algorithm of the present invention is more energy-saving and emission-reducing; of course, the algorithm of the present invention takes the longest time, but there is no difference in the order of magnitude, and it fully meets the needs of engineering applications.

[0127] From the data in Table 3, it can be seen that when the number of iterations increases, the deviations and powers of the other five swarm intelligence optimization algorithms that have not been improved except the algorithm of the present invention all show a significant downward trend, among which the particle swarm algorithm, Harris Eagle algorithm and dung beetle algorithm have better optimization results and are not much different from the optimization results of the algorithm of the present invention, and the optimization result of the algorithm of the present invention is similar to the optimization result when the number of iterations is small, indicating that the algorithm of the present invention has obtained a reliable solution that is global optimal or close to the global optimal when the number of iterations is small, and other algorithms are relatively greatly affected by the number of iterations and require a large number of iterations to converge. Combining the analysis of the two tables, it can be seen that the algorithm of the present invention can obtain a stable and reliable global optimal solution in the shortest time.

[0128] Since the optimization results of the algorithm of the present invention are highly stable, reliable solutions can be obtained each time the algorithm is run, and the output difference is very small, Figures 2 to 6 The algorithm data of the present invention randomly selected the last running result and compared it with the SQP algorithm. From the waveform in the figure, it can be seen that the algorithm of the present invention obtains a better thrust distribution solution. The algorithm of the present invention has a smaller deviation and lower energy consumption (the total absolute error of the SQP algorithm is 145.08, and the total power consumption is 23.66kW). However, the SQP algorithm takes a shorter time of 2.271s, which is slightly better than the present invention. This is also the biggest advantage of the traditional algorithm. In addition, it can be seen from the figure that when the expected value has a large jump, the SQP algorithm needs a longer time to restore stable output and is prone to oscillating output. The swarm intelligence algorithm has a greater advantage than the traditional algorithm in dealing with this situation.

[0129] In summary, the thrust allocation method proposed in the present invention has the ability to converge quickly, and the thrust allocation results obtained are stable and reliable, which improves the thrust allocation accuracy and achieves energy conservation and emission reduction. In addition, the thrust allocation algorithm of the present invention can flexibly consider deviation, energy consumption, mechanical wear and singularity indicators, and can modify each indicator coefficient according to actual needs to optimize the thrust allocation under different working conditions. Experiments also show that the algorithm can meet the real-time requirements of engineering applications and improve various performance indicators of thrust allocation.

[0130] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A ship thrust distribution method based on an improved dung beetle algorithm, characterized in that: The steps include: Step 1: Initialize various ship parameters: structural parameters, state parameters, thrust and angle constraints, propeller power and thrust relationship coefficients, and calculate solutions to the homogeneous linear equations with incremental equation constraints; Among them, the expression of the incremental equality constraint homogeneous linear equation system is: Among them, (l xn , l yn ) is the nth propeller hull coordinate, find the solution of the above homogeneous linear equations, where the basic solution is Y1, Y2, …, Y m , the corresponding basic solution coefficients are selected as individual variables, namely r1, r2, ..., r m , ΔT xn and ΔT yn is the incremental thrust component of thruster n on the x-axis and y-axis; Step 2: Calculate the specific solution of the constraint terms of the thrust distribution equation and the dynamic boundary of the individual variables based on the current and historical data information; Among them, the special solution of the equality constraint is w is the weight coefficient, Δτ c is the expected value of incremental thrust; The definition of the dynamic boundary of individual variables is obtained by constructing an inequality constraint matrix using the elimination method; Step 3, initializing the parameters of the improved dung beetle optimization algorithm, including population size, maximum number of iterations, and using spatial partitioning and elite screening methods to obtain the initial population; Step 4: Use the original dung beetle optimization algorithm to update individual variables. The specific implementation steps are as follows: Step 4.1: Determine whether the current update individual is a rolling ball dung beetle. Otherwise, execute step 4.

2. If yes, generate a random number δ between (0,1) br , and update the dung beetle position using the following discriminant; x i (t+1)=x i (t)+tan(θ)|x i (t)-x i (t-1)|δ br C br Among them C br is a set constant, θ is a deflection angle between 0 and π, but when θ is equal to 0, π / 2 or π, the position is not updated. i (t) is the position of the rolling ball dung beetle i at the tth iteration, X w is the global worst position; Step 4.2, determine whether the current updated individual is an egg ball, otherwise execute step 4.3, if yes, update the egg ball position according to the following formula; in and are the upper and lower bounds of the spawning area, respectively, and B i (t) is the position of egg ball i at the tth iteration, b1 and b2 are random variables, L b and U b are the lower and upper bounds of the original optimization region, respectively, * is the current local optimal position, R = 1-t / t max , t max is the maximum number of iterations; Step 4.3, determine whether the currently updated individual is a small dung beetle, otherwise execute step 4.4, if yes, update the position of the small dung beetle according to the following formula; in and are the upper and lower bounds of the foraging area, respectively, and C1 is a random variable that conforms to the normal distribution, C2 is a random number between 0 and 1, and X b is the global optimal position; Step 4.4, update the position of the stealing dung beetle according to the following formula; x i (t+1)=X b +S×g×(x i (t)-X * |+x i (t)-X b ) Where S is a set constant, g is a one-dimensional random vector, and its dimension is equal to that of the individual variable; Step 5: Use the variable step size gradient method to update individual variables. The basic idea is: select individuals that need to be deeply optimized and search along several equidistant spaces to obtain the optimal evolutionary direction. Continue searching and evolving along this direction until the evolution stops or the set number of evolutions is reached. Repeat the above multi-step search method for the optimal direction in equidistant spaces until the evolution end condition is met. In step 5, the specific implementation method of updating individual variables using the variable step size gradient method is: Suppose that the optimal particle for deep optimization using variable step size gradient method is X b , Step 5.1, initialize parameters and randomly generate M directional particles X S , where M / 2 particles are generated by chaotic operators, and the other M / 2 particles are generated using the pinhole imaging reverse learning method. The maximum number of iterations of the optimal direction multi-step search method in equidistant space is M d ; Step 5.2: Calculate X b Update the value along M directions, where the update method for the i-th direction (1≤i≤M) is as follows: Where s1 is the step size coefficient, X bi and X Si Particle X b and X S The i-th dimension variable of X bi =X bi +ΔX bi According to the above formula, calculate the particle X in M ​​directions respectively. b The updated fitness value is selected, and the update direction corresponding to the optimal fitness value is recorded as the optimal update direction ΔX in M ​​directions. best , determine whether the particle is optimized, if yes, execute step 5.3, otherwise execute step 5.5; Step 5.3: Continue to find the optimal particle X along the optimal direction b Optimization, update method is as follows: X b =X b +C s1 ΔX best C s1 is the step coefficient, calculate the particle X b Adaptation value and determine whether it is optimized, if so, update particle X b The optimal solution and the optimal fitness value of the particle are updated. s1 =C s1 ×C s2 , C s2 is the variable step size factor, return to step 5.3, otherwise execute step 5.4; Step 5.4: 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 update s1, C s1 and C s2 The value of and returns to step 5.1, if it is true, execute step 5.5; Step 5.5: After the deep optimization is completed, update the individual and global optimal values; Step 6: Determine whether the maximum number of iterations has been reached. If yes, execute step 7; otherwise, execute step 4. Step 7: Output the thrust distribution result, update the ship state parameters, and jump to step 2 to perform the thrust distribution calculation for the next cycle.

2. The ship thrust distribution method based on the improved dung beetle algorithm according to claim 1, characterized in that: In step 2, the specific method for defining the dynamic boundary of individual variables is as follows: Assume T n (i) is the current thrust value of the i-th thruster, Δα b (i) is the maximum angle change per unit cycle of the i-th thruster, L Tb (i) and U Tb (i) are the minimum and maximum set limits associated with the i-th thruster, T min (i) and T max (i) are the minimum and maximum thrust values ​​of the i-th thruster, ΔT min (i) and ΔT max (i) are the minimum and maximum values ​​of thrust change per sampling period of the i-th thruster, respectively, then we can get: where a L =max(ΔT min (i),T min (i)-T n (i)), b L =min(ΔT max (i),T max (i)-T n (i)) According to the general solution and special solution of the equality constraint terms and the set limit minimum and maximum values ​​related to the thruster, the following inequality constraint matrix is ​​constructed: Among them, K1 and K2 are dynamic boundary expansion coefficients, K n ≥0 and K P ≥0 is the offset. By using the elimination method for the above inequality constraint matrix, we can obtain the individual variables r1, r2, ..., r m dynamic limits.

3. The ship thrust distribution method based on the improved dung beetle algorithm according to claim 1, characterized in that: In step 3, the specific implementation method of using spatial partitioning and elite screening method to obtain the initial population is: Assume that the individual dimension of the population is N, and the upper and lower limits of the j-th dimension variable are and Divided by its center and Two intervals, the maximum number of space blocks can reach 2 N , let the upper and lower limits of the j-dimensional variable of the m-th spatial block be and but: Where μ is a set constant, is a chaotic sequence, For the i-th population individual in this spatial block, according to the pinhole imaging reverse learning method The individuals generated in the symmetric space block are Among them, n is the adjustment factor. According to the above formula, the generation of each space block population consists of two parts. One part is generated by using a chaotic operator alone, and the other part is generated by mapping the symmetrical space block through the pinhole imaging reverse learning method. Each space block generates a large number of populations. Assume the number of space blocks is N b The final population size is M S Each spatial block initially selects a population probability P S , then the initial population "elite" selection strategy is: each space block retains the optimal M S P S / N b Individual variables are used as the final population individuals. According to the above criteria, a certain number of population individuals are initially selected in each block space, and the remaining initialized population individuals are selected from the remaining massive population.