Energy efficiency optimization of ships based on particle swarm optimization

. In response to the severe energy-saving and emission-reduction situation, it is of great practical significance to reduce the fuel consumption of ships’ main engines and carbon dioxide emissions, and to realize the energy-saving and emission reduction of ships. In this study, We use the particle swarm optimization algorithm to optimize and analyze the energy consumption of ships based on the energy consumption data of ships during navigation, and test the energy efficiency of ships through the ship energy efficiency operation index. The results of the present study show that in order to reduce the energy consumption of ships and ultimately achieve the purpose of energy saving and emission reduction, it is theoretically feasible to use particle swarm optimization algorithm to optimize the speed of ships.


Introduction
In the initial strategy of the International Maritime Organization (IMO), the goal of gradually reducing greenhouse gas emissions from international shipping was reached by the end of this century. However, the use of fossil fuels cannot meet the goals set out in the initial strategy of the International Maritime Organization. In order to achieve the goal of zero-carbon ships and promote innovation in sustainable technologies and alternative fuels, low-carbon shipping needs more comprehensive and in-depth research. IMO statistics show that maritime transport accounts for 90% of the total global trade, and while bringing high production value, maritime transport is also the most unfavorable mode of transportation for the marine environment. On July 15, 2011, IMO added a new ship energy efficiency regulation within the framework of the MARPOL Convention, and put forward limits and management requirements for the energy efficiency design index (EEDI) of newly built ships and the energy efficiency operation index (EEOI) of ships in service [1]. EEOI measures the energy efficiency of existing ships in operation by the ratio of total CO2 emissions to cargo turnover during actual voyages. In order to achieve this goal, scientific researchers improve the energy efficiency of ships through technical measures such as hull line optimization, lightweight design, energy-saving attachment design, high-efficiency diesel engine technology, and high-performance hull paint. Ship management personnel improve ship energy efficiency through operational management measures such as improved voyage planning, weather navigation, speed optimization, best trim, best ballast, hull maintenance, and propulsion system maintenance [2]. In view of the management and control of ship energy efficiency is one of the necessary measures to improve the marine economy and reduce CO 2 emissions. At the same time, in the process of ship operation, the problems of CO 2 emissions, sulfur emissions, nitrogen oxide emissions, chlorofluorocarbon emissions and other aspects are becoming more and more serious, Environmental problems caused by ship transportation have also attracted more and more attention around the world. It is particularly important to improve ship energy efficiency, improve fuel efficiency, and reduce pollutant emissions [3].

EEOI formula analysis
According to EEOI Guidelines for Voluntary Application of Ships, ship energy efficiency operating index can be calculated as [4]: The average ship energy efficiency operating index of multiple segments can be calculated as: where C Fj is the CO 2 emission factor, which is the quality of CO 2 emitted by consuming 1g of fuel. Where FC ij is the total fuel consumption of the ship, and m cargo is the cargo capacity, and D is the voyage distance of the ship, and i is the number of flight segments, and j is the fuel type. According to the above calculation formula of ship energy efficiency, it can be known that when the cargo capacity and the navigation distance are constant, the less fuel the ship consumes, the lower the EEOI value, which indicates the higher the ship's energy efficiency level.

CO2 emission factor
The actual measurement of CO 2 emissions from ships has low operability and poor accuracy. However, the fuel consumption of ships is easy to obtain. Generally, the corresponding relationship between fuel consumption and CO 2 emissions is found to calculate CO 2 emissions, which is an international practice. Two CO 2 emission detection schemes, Tire1 and Tire2, are proposed in IPCC GHG Inventory and Good Practice Guide for global greenhouse gas emission detection.

Statistical interval of oil consumption
Obtained by the EEOI definition formula, a single voyage is used as a single interval for statistical calculation of fuel consumption. According to the Guidelines for the Voluntary Application of EEOI in Ships, oil consumption refers to the sum of all fuel oil consumed by a ship in the course of port and navigation, including the fuel consumed by the ship's main engine, auxiliary engine and boiler. The ship's berthing process includes loading and unloading at the port. Therefore, although no cargo turnover is generated, the fuel consumption at the port must also be included in the statistics. The unloading time of this voyage is the start time of the next voyage [5]. Therefore, when calculating the EEOI, the start time is usually the time when the loading and unloading task of the cargo on the previous voyage is completed.

Particle swarm optimization algorithm
The basic concept of particle swarm optimization(PSO) algorithm originated from the research of bird swarm foraging behavior. Search for the individual closest to the food in the flock [6]. The PSO algorithm is inspired by this kind of biological population behavior characteristics and used to solve optimization problems. Use a kind of particle to simulate the above-mentioned individual bird. Each particle can be regarded as a search individual in the N-dimensional search space. The current position of the particle is a candidate solution of the corresponding optimization problem. The flight process of the particle is the searching process of the individual.
The particle velocity can be dynamically adjusted according to the historical optimal position of the particle and the historical optimal position of the population. PA particle has only two properties: speed, which represents how fast it is moving, and position, which represents the direction it is moving. The optimal solution searched individually for each particle is called the individual extremum, and the optimal individual extremum in the particle swarm is the current global optimal solution. Keep iterating, updating speed and location. Finally, the optimal solution satisfying the termination condition is obtained [7]. The algorithm flow is as follows: 1. Initialization First of all, the maximum number of iterations, the number of independent variables of the objective function, and the maximum velocity of the particles are set. The position information is used as the entire search space, and the speed and position are randomly initialized in the speed range and search space. Set the particle swarm size as M, and each particle randomly initializes a flying speed.

Individual extremum and global optimal solution
The fitness function is defined, and the individual extreme value is the optimal solution found for each particle. From these optimal solutions, a global value is found, which is called the global optimal solution. Update with historical global optimum comparison. 3. Update speed and position formulas where w is called the inertia factor, and C 1 and C 2 are called the acceleration constants, which usually C 1 = C 2 =2. Where random(0,1) represents a random number on the interval, and P id represents the d-th dimension of the individual extreme value of the i-th variable, and P gd represents the first dimension of the global optimal solution. 4. Termination conditions Reach the set number of iterations or the difference between algebras to meet the minimum limit.

Ship fuel consumption statistics
As an important means of cargo transport in China, the energy consumption of ships can not be ignored. It is of great significance to control, manage and evaluate the energy consumption of ships.
(1) Calculation method of Marine ships The fuel consumption of the ship's voyage can be calculated according to Equation (8).
Q=Q z +Q f +Q g (8) where Q is the fuel consumption of ship voyage, Q z is the fuel consumption of ship's main engine, Q f is the fuel consumption of generator set, Q g is the fuel consumption of the boiler.
(2) Calculation method of inland ships The fuel consumption of the ship in operation can be calculated according to Equation (9). Q=Q 1 t+Q 2 A+Q f (9) where Q is the fuel consumption on voyage, Q 1 is the basic fuel consumption per hour, t is the standard voyage time, Q 2 is the unit turnover additional fuel consumption, A is the actual conversion turnover of voyage, Q f is the fuel consumption for auxiliary production. According to the research direction of this study, Marine ship calculation method will be used to calculate the fuel consumption of ship voyage. In view of the difficulty of data acquisition at present, only the fuel consumption of ship's main engine will be considered in this study.

Route segment
By referring to the literature [8], an international route from Dalian to Kuala Lumpur, Malaysia is taken as the research object, and the relevant research on speed optimization is carried out in this study. The entire voyage is divided into 12 segments, namely L 1 , L 2 ...L 12 . The mileage information of each segment is listed in detail according to table 1. In addition, the entire voyage of the research subject ship is 3019.345 nm, and the voyage time of the ship is 296 h.

Objective function establishment
The ultimate goal of ship energy efficiency optimization is to achieve the least total fuel consumption when the ship completes a given voyage. Therefore, the fuel consumption of the entire voyage can be used as the objective function of the particle swarm optimization algorithm.
where W represents fuel consumption for the entire voyage, and f i represents the relationship function between diesel engine fuel consumption and ship speed in each flight segment. According to the modeling process of diesel engine fuel consumption model in Literature [9], the fuel consumption of ships in each voyage can be calculated according to Equation(11).
(11) where W i represents the fuel consumption within each segment, g ei and p ei respectively are the diesel engine fuel consumption rate and output power of each segment. Where t i is the voyage time of each segment, which can be obtained by dividing the voyage L i of each voyage segment by the ship speed V si according to Equation (12).
The trajectory segment of each segment has been given in Table 1. According to the parameters of the relationship between the speed of the ship and the speed of the ship in the reference literature [10], combined with the energy consumption of the ship in this voyage, the corresponding relationship between the speed of the diesel engine and the speed of the ship can be calculated as follows (taking segment 1 as an example) : (13) Therefore, The fuel consumption of the ship in each voyage is calculated.
The relationship between the fuel consumption of the ship in the L 1 segment and the speed in the segment as Equation (14). For other flight segments, the calculation method is similar to this, so this study will not go into details. By calculating the fuel consumption of each flight segment, the objective function for the particle swarm optimization algorithm can be calculated.

Solving process
According to the above objective function, the particle swarm optimization algorithm is used to optimize it.
(1) Initialize the particle population and give the initial velocity and position to each particle. And initialize the learning factor C 1 and C 2 , the maximum number of iterations, particle swarm size and other parameters.
(2) Calculate the fitness value of the particle, which is determined by the objective function. After the algorithm is initialized and updated, the constraint conditions of the two objective functions can be satisfied by limiting the control variable to the specified value range.
(3) Compare the fitness of the particles. The optimal position of the individual particles is updated according to the dominance relationship, and the global optimal position of the particles is randomly selected from it. (4) Update the particle speed and position according to the particle update formula until the global optimal solution is found or the maximum number of iterations is satisfied. The specific flow chart of the solution is shown in Figure  1.

Running results
During the operation of the algorithm, the initial population number is set to 50, the space dimension is 1, the maximum number of iterations is 100, the inertia weight is 0.8, and the self-learning factor and the group learning factor are 2. The result of the operation is shown in Figure 2.  The algorithm ran 10 times, the calculation results are consistent, and the algorithm has good stability. The convergence curve of a certain running program obtained randomly is shown in Figure 2, which shows that the optimized value of the objective function has converged. It can be seen from Figure 3 that the optimal solution is 1.23×108. According to the results of optimized energy consumption, calculate the ship energy efficiency operation index, evaluate and analyze the current ship energy efficiency, and finally realize the optimization of ship energy efficiency through speed control, engine speed or power control.

Conclusion
In today's era of vigorously advocating energy saving and emission reduction, green and low-carbon life, the study of ship energy consumption has important practical significance. In this study, we studied the realization and solution of the particle swarm optimization algorithm on the ship energy consumption optimization problem, which based on the relevant energy consumption data of ship navigation in the existing literature. Through the analysis of ship energy consumption optimization results, it can be concluded that in order to reduce ship energy consumption, it is feasible to use particle swarm optimization algorithm to optimize ship speed theoretically. And according to the results of algorithm optimization, the fuel consumption of the entire voyage is gradually reduced under the condition that the sailing time of the ship is not timeout.