Research on Multi-Energy Integrated Ship Energy Management System Based on Hierarchical Control Collaborative Optimization Strategy

: The propulsion systems of hybrid electric ship output and load demand have substantial volatility and uncertainty, so a hierarchical collaborative control energy management scheme of the ship propulsion system is proposed in this paper. In a layer of control scheme, the traditional perturbation algorithm is improved. Increasing the oscillation detection mechanism and establishing the dynamic disturbance step length realizes the real-time stability of maximum power point tracking control. In the second-layer control scheme, the power sensitivity factor and voltage and current double closed-loop controller is introduced. By designing a two-layer coordinated control strategy based on the dynamic droop coefﬁcient, the problem of voltage and frequency deviation caused by load switching is solved. In the third-layer control scheme, due to the need of the optimal scheduling function, the multi-objective particle swarm optimization algorithm was improved through three aspects: introducing the mutation factor, improving the speed formula, and re-initializing the strategy. Compared with other algorithms, this algorithm proves its validity in day-ahead optimal scheduling strategy. The superiority of the hierarchical collaborative optimization control schemes proposed was veriﬁed, in which power loss was reduced by 39.3%, the overall tracking time was prolonged by 15.4%, and the environmental cost of the diesel generator was reduced by 8.4%. The control strategy solves the problems of the steady-state oscillation stage and deviation from the tracking direction, which can effectively suppress voltage and frequency ﬂuctuations.


Introduction
Ship electric propulsion systems have grown significantly over the last century, but at present advanced new energy ship propulsion technologies require lower pollutant emissions from ships [1]. Clean energy (fuel cells, photovoltaic power generation, wind power generation), advanced control technology, and power energy management technology are being introduced into ship power systems [2][3][4]. As these technologies develop and change, future marine power systems are expected to include generator sets and other alternative power sources with different characteristics. Therefore, electric propulsion systems will become multi-energy complementary, and new hybrid-energy ship propulsion systems will be built to meet the new demands [5][6][7].
Mixing the two types of energy storage systems, Fang, S., et al., proposed a two-step multi-objective optimization method for optimizing the management of all-electric ships, striving to minimize the total operating cost [8]. In order to optimize the operating cost of diesel generators and energy storage systems, Anvari, M., et al., extended the principles of optimal planning and economic dispatch problems to shipboard systems in order to realize the coordinated power supply of diesel generators and energy storage systems [9]. Mistress, G., et al., focused on the parameter identification method of the onboard battery storage system electrical model, which solves the energy storage system degradation problem [10]. Lee, K., et al. realized green ship and low-carbon operation by showing the experimental results of a prototype green ship and achieved the demanding output on the load side with the minimum cost and less volatility [11]. In order to minimize fuel consumption and verify the feasibility of its scheme through simulation, Accetta et al. proposed an energy management system for the electrical system of yachts [12], but most of the existing research focuses on optimizing energy storage. Energy systems and controllers ignore the overall scheduling of power system energy. In addition, previous work has rarely noted that for the hybrid propulsion systems of photovoltaic power generation systems, wind turbines, and diesel generators. It is necessary to carry out the maximum power point tracking control of wind and photovoltaic power generation systems and the system connection of distributed power sources.
Hybrid electric ships are generally designed to improve energy utilization: Brizuela-Mendoza, J.A., et al. [13] analyzed in detail the efficiency of a ship's DC hybrid power system, constructed an optimization strategy aiming at improving energy efficiency, and provided the optimal on-load operating point of the generator set. Zhu, L., et al. [14] proposed an energy management strategy based on fuzzy logic for a hybrid ship that uses fuel cells, batteries, and supercapacitors as energy sources, aiming to optimize the power distribution among generating units and optimize the performance and fuel economy of the hybrid system.
Fully electric ships in the military field, equipped with sophisticated electronic instruments, require high power quality and fault handling capabilities: Feng, X., et al. [15] proposed a multi-agent system coordination controller for the Marine MVAC power system, which can balance load and power generation in real-time while meeting system operation constraints while considering load priority and reducing the influence of pulse load on power quality by coordinating pulse load and propulsion load. Seenumani, G., et al. [16] proposed a hierarchical control method to meet the real-time requirements, aiming at the power failure problem of all-electric ships for military applications. The top-level controller realized the suboptimal power decomposition of batteries and online power supply to meet the system power demand, while the local controller regulated the power command of each independent power supply. Nelson, M., et al. [17] proposed the use of graph theory to provide complete autonomous control for the power system when the power system fails or the ship task changes.
There are also some energy management strategies for specific needs: Mensah, E., et al. [18] built a model for the design of energy management systems for simulation and including system reconfiguration and load shedding functions, allowing the simulation and analysis of power systems with discrete events. Hou, J., et al. [19] evaluated the interaction of multiple power sources in the ship electric propulsion system with a hybrid energy storage system on the basis of model analysis and revealed the important role of systemlevel energy management strategy. Kanellos, F. D., et al. [20] proposed an optimization method of load-side management and power generation planning, in which the load-side management is realized by adjusting the power consumption of the propulsion motor and the dynamic programming algorithm is used to solve the optimization problem according to the constraints of ship operation and environment, so as to ensure the operation mode with minimum cost. López, A. R., et al. [21] proposed the adoption of load-shedding technology based on expert system rules in order to control the voltage level of the ship power grid, and the application was verified in a ship power grid. Paran, S., et al. [22] proposed the energy management of ship DC power system based on model predictive control to ensure reasonable load-sharing among generators while maintaining a stable DC bus voltage.
There have been several identified optimization methods for hybrid schemes, such as the use of artificial intelligence, as the appropriate way to enhance the optimization process.
Hatata, A. Y., et al. [23] used clonal selection techniques to optimize hybrid solar and wind power schemes with batteries to utilize their outputs with minimal cost and small volatility. Hadidian, M. J., et al. [24] used an intelligent pollination algorithm to optimize the power output of a hybrid system (solar/wind/hydrogen) so as to minimize the total operating cost. Sanajaoba Singh, S., et al. [25] analyzed and studied the effectiveness of cuckoo search using a hybrid solar/wind/battery scheme design problem in remote areas of India. De la Cruz, J., et al. [26] used a well-known heuristic algorithm based on simulated annealing to optimize independent wind power and photovoltaic systems. In another paper, the influence of using predicted load information on the performance of small independent hybrid power was studied [27]. Maleki, A., et al. [28] optimized the size of the battery pack, the area of the PV system, and the fuel consumption of the diesel generator in the hybrid system to minimize the cycle operation cost of the system and used a heuristic algorithm based on tabu search. These hybrid methods provide a new way for microgrid optimization and show certain advantages and application prospects.
In the master-slave control, one of the distributed power supply (or energy storage unit) controllers is selected as the master controller, and the others are used as the slave controllers. In this mode, the distributed power supply of the main control unit needs to track the change of charge, which requires its power output to be controlled within a certain range, and it can also respond quickly to charge fluctuation. In peer-to-peer control, all distributed power controllers are in the same position [29]. Therefore, when the power required by the load changes, the distributed power supply can make the microgrid return to a stable state by properly adjusting its voltage and frequency, but its control results have certain deviations.
According to the existing research literature, the strategies of paralleling multiple distributed power sources are generally divided into master-slave control and peer-to-peer control. The master-slave control method is simple and easy to implement, mainly relying on high-speed communication units, but the communication cost is high and the system redundancy is poor. The peer-to-peer control in the form of point-to-point, such as droop control, does not require high-bandwidth communication and is easy to implement using the "plug and play" of micro-sources, which meets the needs of the distributed system. Therefore, droop control can be used as an ideal load voltage and frequency control method for the ship propulsion system. There is a conflict between current sharing and voltage regulation due to the virtual impedance introduced by droop control. Additionally, there are problems with the steady-state oscillation phase and deviation from tracking direction. In order to solve the above contradictions, a hierarchical control collaborative optimization strategy for propulsion systems with multiple distributed power sources is proposed.

Typical System Structure
The typical system structure of a ship propulsion system consists of the wind turbine, photovoltaic power generation system, diesel generator set, energy storage system, load, electric energy conversion device, and energy management system. A typical system structure diagram of a hybrid ship is shown in Figure 1. In the following sections, the working principle and mathematical model of the leading equipment in the system will be presented.

Diesel Engine and Speed-Governing System Model
The diesel engine converts the released chemical energy into thermal energy by burning diesel oil and then converts the thermal energy into the mechanical energy of the rotating shaft to provide the motive power for the synchronous generator, forming a closedloop speed to ensure the stability of the generator speed [30]. The block diagram of the system structure is shown in Figure 2. According to the external characteristic curve of the diesel engine (torque-speed characteristic curve), when the diesel engine is in a standard and operation state, the resistance torque is balanced with the output torque of the diesel engine. The load power driven by the diesel engine changes, the fuel injection quantity of the diesel engine will change, and the output torque will also change until a new equilibrium state is reached.
According to D'Alembert's principle, the equation of motion of the unit is: where K represents the damping coefficient, which is related to the damping winding; g ω is the angular velocity of the diesel engine; p is the number of pole pairs of the synchronous generator; d M and c M represent, respectively, the output torque and resistance torque of the diesel engine. When the load carried by the diesel engine decreases, the rotor speed increases. Therefore, in order to keep the speed change of the diesel engine within a reasonable

Diesel Engine and Speed-Governing System Model
The diesel engine converts the released chemical energy into thermal energy by burning diesel oil and then converts the thermal energy into the mechanical energy of the rotating shaft to provide the motive power for the synchronous generator, forming a closedloop speed to ensure the stability of the generator speed [30]. The block diagram of the system structure is shown in Figure 2.

Diesel Engine and Speed-Governing System Model
The diesel engine converts the released chemical energy into thermal energy by burning diesel oil and then converts the thermal energy into the mechanical energy of the rotating shaft to provide the motive power for the synchronous generator, forming a closedloop speed to ensure the stability of the generator speed [30]. The block diagram of the system structure is shown in Figure 2. According to the external characteristic curve of the diesel engine (torque-speed characteristic curve), when the diesel engine is in a standard and operation state, the resistance torque is balanced with the output torque of the diesel engine. The load power driven by the diesel engine changes, the fuel injection quantity of the diesel engine will change, and the output torque will also change until a new equilibrium state is reached.
According to D'Alembert's principle, the equation of motion of the unit is: where K represents the damping coefficient, which is related to the damping winding; g ω is the angular velocity of the diesel engine; p is the number of pole pairs of the synchronous generator; d M and c M represent, respectively, the output torque and resistance torque of the diesel engine. When the load carried by the diesel engine decreases, the rotor speed increases. Therefore, in order to keep the speed change of the diesel engine within a reasonable According to the external characteristic curve of the diesel engine (torque-speed characteristic curve), when the diesel engine is in a standard and operation state, the resistance torque is balanced with the output torque of the diesel engine. The load power driven by the diesel engine changes, the fuel injection quantity of the diesel engine will change, and the output torque will also change until a new equilibrium state is reached.
According to D'Alembert's principle, the equation of motion of the unit is: where K represents the damping coefficient, which is related to the damping winding; ω g is the angular velocity of the diesel engine; p is the number of pole pairs of the synchronous generator; M d and M c represent, respectively, the output torque and resistance torque of the diesel engine. When the load carried by the diesel engine decreases, the rotor speed increases. Therefore, in order to keep the speed change of the diesel engine within a reasonable range, a speed control link should be installed on the diesel generator to ensure that the speed of the diesel engine does not fluctuate considerably. The diesel engine speed adjustment system is shown in Figure 3. range, a speed control link should be installed on the diesel generator to ensure that the speed of the diesel engine does not fluctuate considerably. The diesel engine speed adjustment system is shown in Figure 3. When the load increases, the speed of the diesel engine will decrease. Then by comparing with the given speed, the speed feedback unit obtains a speed difference signal and acts on the speed control unit, transmits the control amount to the actuator, and finally injects the oil pump increases the amount of fuel injected, so that the speed of the diesel engine rises to the rated speed. The model of the diesel engine speed control system in Power Systems Computer Aided Design (PSCAD software) is shown in Figure 4.

Synchronous Generator and Excitation System Model
Driven by the diesel engine, the synchronous generator rotates and converts the mechanical energy on the rotating shaft into electrical energy and outputs a three-phase alternating current through the stator [31]. The generator excitation system changes the reactive power output by adjusting the excitation current, thereby changing the output voltage to ensure the stability of the generator output voltage.
When the synchronous generator is mathematically modeled, the rotating dq0 coordinate system is adopted through Park transformation, which can simplify the model and reduce the amount of calculation. The transformation from the abc coordinate system to the dq0 coordinate system is realized through the Park transformation, which can be written as a matrix: The potential equation of the dq0 system after Park transformation is:  When the load increases, the speed of the diesel engine will decrease. Then by comparing with the given speed, the speed feedback unit obtains a speed difference signal and acts on the speed control unit, transmits the control amount to the actuator, and finally injects the oil pump increases the amount of fuel injected, so that the speed of the diesel engine rises to the rated speed. The model of the diesel engine speed control system in Power Systems Computer Aided Design (PSCAD software) is shown in Figure 4. range, a speed control link should be installed on the diesel generator to ensure that the speed of the diesel engine does not fluctuate considerably. The diesel engine speed adjustment system is shown in Figure 3. When the load increases, the speed of the diesel engine will decrease. Then by comparing with the given speed, the speed feedback unit obtains a speed difference signal and acts on the speed control unit, transmits the control amount to the actuator, and finally injects the oil pump increases the amount of fuel injected, so that the speed of the diesel engine rises to the rated speed. The model of the diesel engine speed control system in Power Systems Computer Aided Design (PSCAD software) is shown in Figure 4.

Synchronous Generator and Excitation System Model
Driven by the diesel engine, the synchronous generator rotates and converts the mechanical energy on the rotating shaft into electrical energy and outputs a three-phase alternating current through the stator [31]. The generator excitation system changes the reactive power output by adjusting the excitation current, thereby changing the output voltage to ensure the stability of the generator output voltage.
When the synchronous generator is mathematically modeled, the rotating dq0 coordinate system is adopted through Park transformation, which can simplify the model and reduce the amount of calculation. The transformation from the abc coordinate system to the dq0 coordinate system is realized through the Park transformation, which can be written as a matrix: The potential equation of the dq0 system after Park transformation is:

Synchronous Generator and Excitation System Model
Driven by the diesel engine, the synchronous generator rotates and converts the mechanical energy on the rotating shaft into electrical energy and outputs a three-phase alternating current through the stator [31]. The generator excitation system changes the reactive power output by adjusting the excitation current, thereby changing the output voltage to ensure the stability of the generator output voltage.
When the synchronous generator is mathematically modeled, the rotating dq0 coordinate system is adopted through Park transformation, which can simplify the model and reduce the amount of calculation. The transformation from the abc coordinate system to the dq0 coordinate system is realized through the Park transformation, which can be written as a matrix: The potential equation of the dq0 system after Park transformation is: The flux linkage equation of the dq0 system after Parker transformation is: The synchronous generator excitation system model adopts the AC1A excitation model recommended by IEEE preset in PSCAD, which further stabilizes the output voltage of the synchronous generator by adjusting the magnitude of the excitation current. The model of the synchronous generator and excitation system in PSCAD is shown in Figure 5.
The flux linkage equation of the dq0 system after Parker transformation is: The synchronous generator excitation system model adopts the AC1A excitation model recommended by IEEE preset in PSCAD, which further stabilizes the output voltage of the synchronous generator by adjusting the magnitude of the excitation current. The model of the synchronous generator and excitation system in PSCAD is shown in Figure 5.

Photovoltaic Power Generation System Model
The photovoltaic cell is the core device of photovoltaic power generation. Its primary function is to convert the light energy of solar radiation into electrical energy through the photovoltaic effect. Since the single-diode model is relatively simple and can be applied to higher irradiance conditions, it can better simulate the actual loss and charge diffusion effect inside the photovoltaic cell, so this paper chooses the single-diode model, and its equivalent circuit is shown in Figure 6.

Photovoltaic Power Generation System Model
The photovoltaic cell is the core device of photovoltaic power generation. Its primary function is to convert the light energy of solar radiation into electrical energy through the photovoltaic effect. Since the single-diode model is relatively simple and can be applied to higher irradiance conditions, it can better simulate the actual loss and charge diffusion effect inside the photovoltaic cell, so this paper chooses the single-diode model, and its equivalent circuit is shown in Figure 6. analysis of the circuit diagram, the output current characteristics of the photovoltaic cell can be obtained, and the following formula can express its mathematical function: Figure 6. Equivalent circuit diagram of single diode model.
where I L is the constant current source that produces the photogenerated current and I D represents the current passing through the diode. A mathematical model of photovoltaic cells is established under standard irradiance R re f = 1 kW/m 2 and ambient temperature conditions T re f = 25 • C. Through the above brief analysis of the circuit diagram, the output current characteristics of the photovoltaic cell can be obtained, and the following formula can express its mathematical function: where α represents the temperature coefficient, I m and U m represent the current and voltage corresponding to the maximum power output, U represents the voltage to the photovoltaic array, U oc represents the open circuit voltage, and T m represents the temperature of the photovoltaic array, and the formula is calculated as follows: where T a is the ambient temperature, t is the temperature of the photovoltaic array, and R is the actual solar irradiance. Therefore, the following formula can specifically describe the output power of the photovoltaic array: The I-V characteristic curve and the P-V characteristic curve under ambient temperature and irradiance can be obtained by fitting them with the above formula, as shown in Figure 7. The I -V characteristic curve and the P -V characteristic curve under ambient temperature and irradiance can be obtained by fitting them with the above formula, as shown in Figure 7. The model of the photovoltaic power generation system in PSCAD is shown in Figure  8:  The model of the photovoltaic power generation system in PSCAD is shown in Figure  8:

Doubly-Fed Wind Power Generation System Model
The doubly-fed wind power generation system comprises wind turbines, shafting modules, doubly-fed wind turbines, and back-to-back double PWM converters. The external wind drives the wind turbine and converts the wind energy into mechanical energy. After the wind turbine rotor passes through the shafting module, the rotational speed is converted to a rotational speed suitable for the doubly-fed generator. The conversion of mechanical energy to electrical energy is realized in the doubly-fed generator [32,33]. The doubly-fed generator generally uses a three-phase wound asynchronous motor. The power system and the stator winding are directly connected, and the rotor winding is connected to the power system through the back-to-back double PWM converter. The schematic diagram of the doubly-fed wind power generation system is shown in Figure  9.

Doubly-Fed Wind Power Generation System Model
The doubly-fed wind power generation system comprises wind turbines, shafting modules, doubly-fed wind turbines, and back-to-back double PWM converters. The external wind drives the wind turbine and converts the wind energy into mechanical energy. After the wind turbine rotor passes through the shafting module, the rotational speed is converted to a rotational speed suitable for the doubly-fed generator. The conversion of mechanical energy to electrical energy is realized in the doubly-fed generator [32,33]. The doubly-fed generator generally uses a three-phase wound asynchronous motor. The power system and the stator winding are directly connected, and the rotor winding is connected to the power system through the back-to-back double PWM converter. The schematic diagram of the doubly-fed wind power generation system is shown in Figure 9.
where β is the pitch angle of the blade and λ is the tip speed ratio, which can be expressed as: where T ω is the rotational speed, R is the radius of the rotor, and 0 V is the wind speed.
The maximum power point tracking control of wind turbines means that under different wind speed conditions, P C can always be kept at the maximum value by controlling the speed of wind turbines. The mechanical power m P captured by the wind turbine can be expressed as: According to Bates's theory, the calculation formula of the wind energy utilization coefficient C p (β, λ) is as follows: where β is the pitch angle of the blade and λ is the tip speed ratio, which can be expressed as: where ω T is the rotational speed, R is the radius of the rotor, and V 0 is the wind speed. The maximum power point tracking control of wind turbines means that under different wind speed conditions, C P can always be kept at the maximum value by controlling the speed of wind turbines. The mechanical power P m captured by the wind turbine can be expressed as: where ρ is the air density and S sweeps the area of the rotor. The model of the doubly-fed wind power generation system in PSCAD is shown in Figure 10.
can be expressed as: where ρ is the air density and S sweeps the area of the rotor. The model of the doublyfed wind power generation system in PSCAD is shown in Figure 10.

Mathematical Model of Energy Storage System
At present, the lithium-ion battery is the most widely used power battery, so a lithiumion battery is selected as the energy storage system in the ship propulsion system in the research process [34,35]. The equivalent modeling of the lithium battery and the functions of its voltage and capacity in the charging and discharging process are as follows.
When discharging: When charging: and where V BT is the lithium battery voltage (V); E 0 is the constant voltage source voltage (V); K is the polarization resistance proportional constant; Q is the battery capacity (Ah); Q t is the lithium battery charge/discharge capacity (Ah); I * is the Filtered current (A); R is the internal resistance of lithium battery (Ω); A is the amplitude coefficient of the exponential region; B is the time the inverse proportion of the exponential region; ε is the charge-discharge efficiency; and SOC(t) is the state of charge of the lithium battery. The simulation model of the energy storage system in PSCAD is shown in Figure 11.

Mathematical Model of Energy Storage System
At present, the lithium-ion battery is the most widely used power battery, so a lithium-ion battery is selected as the energy storage system in the ship propulsion system in the research process [34,35]. The equivalent modeling of the lithium battery and the functions of its voltage and capacity in the charging and discharging process are as follows.
When discharging: When charging: and where BT V is the lithium battery voltage (V); 0 E is the constant voltage source voltage (V); K is the polarization resistance proportional constant; Q is the battery capacity (Ah); t Q is the lithium battery charge/discharge capacity (Ah); * I is the Filtered current (A); R is the internal resistance of lithium battery ( Ω ); A is the amplitude coefficient of the exponential region; B is the time the inverse proportion of the exponential region; ε is the charge-discharge efficiency; and is the state of charge of the lithium battery. The simulation model of the energy storage system in PSCAD is shown in Figure 11.

Hierarchical Control Scheme
As the core of the ship propulsion system, the energy management system is not only responsible for the management of the generation and scheduling of the entire ship's electrical energy but also needs to manage the operation status of the propulsion system. To ensure that the ship propulsion system can provide continuous, stable, and economic

Hierarchical Control Scheme
As the core of the ship propulsion system, the energy management system is not only responsible for the management of the generation and scheduling of the entire ship's electrical energy but also needs to manage the operation status of the propulsion system. To ensure that the ship propulsion system can provide continuous, stable, and economic power support during operation [36][37][38][39]. Based on the above functional requirements, this paper designs the overall scheme of the layered control of the ship propulsion system, as shown in Figure 12. This hierarchical control structure defines three primary control levels, componentlevel control, device-level control, and system-level control, and communication lines connect them. Among them, the first-level control mainly focuses on controlling a single unit (load, distributed power supply), and the second-level and third-level controls, respectively, focus on coordinated and stable control and the improvement of power quality. The adjustment speed needs to be faster and more responsive to meet the fast dynamic characteristics of the system.

Maximum Power Point Tracking Control Strategy for Ship Propulsion Systems
The traditional disturbance observation method has two main problems: steady-state oscillation and deviation from the tracking trajectory [40]. If the system wants to achieve the fast and stable tracking of the maximum power point, it needs to achieve the following: (1) MPPT must be able to automatically locate the maximum power point; (2) the tracking must be dynamic, and the operating point must be continuously adjusted according to the measured irradiance and temperature conditions. Based on the above two viewpoints, this paper designs a P&O algorithm based on dynamic perturbation step size, which improves the tracking efficiency of the P&O algorithm by reducing steady-state oscillation and adding perturbation steps [41,42]. The improved algorithm adds two features: (1) The algorithm includes a built-in oscillation detection mechanism to ensure the consistent detection of oscillations and changes the size of the disturbance accordingly to achieve adaptive performance. (2) The algorithm establishes a dynamic disturbance step long to ensure that the working point not deviate from its tracking trajectory.
The initial operating voltage MPP V is set to 65% OC V , and OC V is the open-circuit voltage of the photovoltaic array. P Δ and V Δ represent the amount of slope change. The value is the sign of the two quantities multiplied and normalized, as shown in Table 1.  This hierarchical control structure defines three primary control levels, componentlevel control, device-level control, and system-level control, and communication lines connect them. Among them, the first-level control mainly focuses on controlling a single unit (load, distributed power supply), and the second-level and third-level controls, respectively, focus on coordinated and stable control and the improvement of power quality. The adjustment speed needs to be faster and more responsive to meet the fast dynamic characteristics of the system.

Maximum Power Point Tracking Control Strategy for Ship Propulsion Systems
The traditional disturbance observation method has two main problems: steady-state oscillation and deviation from the tracking trajectory [40]. If the system wants to achieve the fast and stable tracking of the maximum power point, it needs to achieve the following: (1) MPPT must be able to automatically locate the maximum power point; (2) the tracking must be dynamic, and the operating point must be continuously adjusted according to the measured irradiance and temperature conditions. Based on the above two viewpoints, this paper designs a P&O algorithm based on dynamic perturbation step size, which improves the tracking efficiency of the P&O algorithm by reducing steady-state oscillation and adding perturbation steps [41,42]. The improved algorithm adds two features: (1) The algorithm includes a built-in oscillation detection mechanism to ensure the consistent detection of oscillations and changes the size of the disturbance accordingly to achieve adaptive performance. (2) The algorithm establishes a dynamic disturbance step long to ensure that the working point not deviate from its tracking trajectory.
The initial operating voltage V MPP is set to 65% V OC , and V OC is the open-circuit voltage of the photovoltaic array. ∆P and ∆V represent the amount of slope change. The value is the sign of the two quantities multiplied and normalized, as shown in Table 1.
The oscillation detection mechanism detects oscillations by recording three consecutive slope values. When the sign of the disturbance voltage is the same as the sign of the power variation, the value of the slope is +1. Otherwise, it is −1. From this, the following oscillation state detection formula can be obtained: ∑ slope = 3, no converge to steady state oscillation 1, Convergence to Steady-State Oscillation (20) Dynamic perturbation step adjustment strategy: The initial perturbation size is set to 2% of V OC , and when the operating point converges to near the maximum power point, the perturbation size is reduced by 0.5% of V OC in each iteration step. The perturbation step size is continuously reduced until it reaches 0.5% of V OC . This tiny oscillation allows the algorithm to consume almost zero power while simultaneously making it immune to the circuit's radiation and noise.
Under normal conditions, the maximum irradiance variation can reach up to 0.027 KW/m 2 /s. To enhance the algorithm robustness, this paper choose T 1 and T 2 to be 0.001 s and 0.05 s, and any change in irradiance between 1.0 W/m 2 /s and 50 W/m 2 /s is considered a gradual change. When the perturbation step size changes, if a value greater than 50 W/m 2 /s is detected, it is considered a rapid step change and the perturbation step size is increased to 2%. The algorithm flowchart is shown in Figure 13. When the perturbation step size changes, if a value greater than 50 W/m 2 /s is detected, it is considered a rapid step change and the perturbation step size is increased to 2%. The algorithm flowchart is shown in Figure 13. The algorithm adopts dynamic perturbation step size to reduce the oscillation and introduces boundary conditions to prevent it from deviating from the maximum power point. The performance of the P&O algorithm is improved by eliminating steady-state oscillation and preventing the algorithm from deviating from the maximum power point trajectory.

Design of Two-Layer Coordinated Control Strategy Based on Dynamic Droop Controller
A dynamic droop controller is designed to aim at the problem of voltage and frequency deviation caused by one-layer control and switching loads. This control strategy can quickly adjust the fixed droop coefficient, realize the adaptive change of the droop coefficient, and introduce power at the same time. The sensitivity factor improves the system dynamic performance. A voltage and current double closed-loop controller is designed to further improve immunity and power quality of the inverter and reduce the influence of random disturbances on the voltage and frequency of the ship propulsion system [43][44][45]. The schematic diagram of the droop controller is shown in Figure 14. The algorithm adopts dynamic perturbation step size to reduce the oscillation and introduces boundary conditions to prevent it from deviating from the maximum power point. The performance of the P&O algorithm is improved by eliminating steady-state oscillation and preventing the algorithm from deviating from the maximum power point trajectory.

Design of Two-Layer Coordinated Control Strategy Based on Dynamic Droop Controller
A dynamic droop controller is designed to aim at the problem of voltage and frequency deviation caused by one-layer control and switching loads. This control strategy can quickly adjust the fixed droop coefficient, realize the adaptive change of the droop coefficient, and introduce power at the same time. The sensitivity factor improves the system dynamic performance. A voltage and current double closed-loop controller is designed to further improve immunity and power quality of the inverter and reduce the influence of random disturbances on the voltage and frequency of the ship propulsion system [43][44][45]. The schematic diagram of the droop controller is shown in Figure 14. and * u is the SPWM modulation signal.
Droop control plays an essential role in the entire inverter control system. When the propulsion system inverter adopts traditional droop control, the droop coefficient is fixed. Fluctuations are likely to occur in the propulsion system at the moment of load switching on the system-connected side, resulting in the distributed circulating current occurring between the power supplies. This paper adopts a real-time dynamic change control method of the droop coefficient, which can effectively suppress the circulation phenomenon. Through this method, the droop coefficient and power are combined to form a new droop coefficient term with dynamic adjustment ability, suppressing the circulation phenomenon and enhancing frequency and voltage stability. Designing the power sensitivity factor can reduce the transient impact caused by power fluctuations during system load switching. The formula of this dynamic droop control strategy is:   where i oabc and U oabc represent the three-phase current and voltage output by the inverter; P and Q are the actual active and reactive power of the inverter; P 0 and Q 0 are the reference active and reactive power of the control system; m, n is the droop coefficients of active and reactive conditions; ω and U represent the given actual voltage frequency and voltage; ω 0 and U 0 represent the given reference frequency and voltage; and u * is the SPWM modulation signal.
Droop control plays an essential role in the entire inverter control system. When the propulsion system inverter adopts traditional droop control, the droop coefficient is fixed. Fluctuations are likely to occur in the propulsion system at the moment of load switching on the system-connected side, resulting in the distributed circulating current occurring between the power supplies. This paper adopts a real-time dynamic change control method of the droop coefficient, which can effectively suppress the circulation phenomenon. Through this method, the droop coefficient and power are combined to form a new droop coefficient term with dynamic adjustment ability, suppressing the circulation phenomenon and enhancing frequency and voltage stability. Designing the power sensitivity factor can reduce the transient impact caused by power fluctuations during system load switching. The formula of this dynamic droop control strategy is: where k f 1 and k f 2 represent the dynamic droop coefficient during active power regulation, k U1 and k U2 represent the dynamic droop factor during reactive power regulation, and η f and η U are sensitivity factors. Using the minimum and maximum values of voltage and frequency to solve the dynamic droop coefficient formula is as follows: where f max and f min are the maximum and minimum frequencies due to the instantaneous change of the load with values of 50.5 Hz and 49.5 Hz; P max and Q max are the maximum active power and reactive power values of the system overload, which are 5 kW and 2 kW; and v d_max and v d_min are the maximum and minimum values of the d-axis voltage component, which are 150 V and 145 V.

Research on Day-Ahead Optimal Dispatching Strategy of Ship Power System
In this part, based on the third-layer control of the ship power system, the relevant research of the optimization scheduling method is carried out. In order to give full play to the advantages of renewable energy, a multi-objective optimization model of the power system under the cooperative work of multiple power generation systems is established.

Mathematical Model of Day-Ahead Optimal Scheduling Problem in Power System
The day-ahead optimal scheduling of the power system is to predict the output power of the wind and photovoltaic power generation system, which, based on the wind and solar data of the next day, formulate the load power usage curve according to the load usage and schedule the renewable energy reasonably.
The following formula can describe the mathematical model of the day-ahead optimal scheduling problem. These include the operating costs F L , F B , F R of diesel power generation systems, energy storage systems, and renewable power generation systems, and the overall benefit F L of the ship load.
Diesel power generation system: Without considering the influence of external factors, such as vibration and friction, it is assumed that the diesel generator operate in a stable state. Therefore, its fuel cost can be described by the following mathematical formula: (24) where p f is the fuel price and v f is the total fuel consumption. On the other hand, in the wind-solar diesel-storage ship power system, only diesel generators emit pollutants, and the following mathematical formula can describe its environmental cost: where n = 4 represents four air pollution sources, SO 2 , CO 2 , CO, and NO X ; E is the total output power of diesel generators per day (kWh); ε j is the emission coefficient of pollution source (g/kWh); V F,j represents the penalty amount for the pollution source (CNY/kWh), and its specific parameters are shown in Appendices A and B. Energy storage system: For the ship power system, the charging and discharging function of the energy storage system is essential, so the cost of the energy storage unit must be calculated. The following mathematical formula can describe its running cost: (26) where n B = 4 is the number of lithium-ion battery packs; u B,j (t) is 1 or 0 to indicate two states of operation and shutdown; C B is the operating cost coefficient (CNY/kW); and P B,j (t) is the lithium-ion battery pack output power. Renewable energy power generation system: The core power generation sector in the ship power system is the renewable energy power generation system, and its operating cost can be described by the following mathematical formula: f pv P pv,n (t) (27) where f wt and f pv are the operating cost coefficients of wind and photovoltaic power generation systems; n wt and n pv are the numbers of wind and photovoltaic power generation units; and P wt,m (t) and P pv,n (t) are the output power of wind and photovoltaic power generation systems at the moment.
Overall benefit of load: The overall benefit of the load refers to the sum of the benefits obtained from the sale of electricity through marine loads, and its mathematical description is as follows: (28) where F L is the income value; n L is the number of loads; f L,sale is the electricity price; and P L,k (t) is the power of the load.

Restrictions:
The constraints are set according to the power generation characteristics of the distributed power generation. In order to obtain more accurate optimization results, the system must meet the following constraints.
Power balancing constraints: Energy storage power constraints: Energy storage electric constraints: Diesel generator operating power constraints: Renewable energy operating constraints:

Research on Day-Ahead Optimization Scheduling Method Based on Improved PSO
In this section, a particle swarm optimization algorithm based on mutation particles is designed to solve the multi-objective function problem [46][47][48].
Introduce mutation factor: improve the particle swarm optimization algorithm in each generation to evolve a population, which can be expressed as X i,G , where i = 1, 2, 3 . . . , NP and NP is the population size. After initialization, padding is randomly generated within the search domain. The algorithm mixes the set information of some top-ranked vec-tors with the new mutation particles generated by mutation and generates the following mutation vectors: where m represents the number of top-ranked vectors and w k represents the weight of the k selected vectors X k,G . The weights for each selected vector are calculated as follows: Improvement of the speed formula: In order to improve the search performance of the algorithm, the method of improving the speed formula in sections is adopted in the algorithm. To make better use of the mutated particles in IPSO, the velocity update formula should be changed to: where λ is the adjustment function: where η is a random coefficient between 0 and 1, g is the number of iterations, and g max is the maximum number of iterations. Re-initialization strategy: Since the current IPSO suffers from premature and stagnant problems, there will be premature convergence when the population falls into a local optimum. A re-initialization strategy is designed to deal with premature convergence and stagnation. Both of the above cases can be detected by the following formula: where f (U i ) is the test vector function, f (X i ) is the target vector function, and stg is an indicator used to monitor whether the current population reaches a stagnation state in a particular generation.

Simulation and Verification of MPPT Control Strategy Based on Improved Disturbance Observation Method
In order to verify the feasibility and effectiveness of the algorithm, a mathematical model of the related system is built in this paper, in which the maximum output power of the wind and photovoltaic power generation systems are 200 kW and 120 kW and the wind speed drive simulates the input wind speed. The MPPT module is used to achieve the maximum wind mechanical power tracking.

1.
Simulation of photovoltaic power generation system: The irradiance change curve shown in Figure 15a is used as the test input signal, and the simulation duration is set to 400 s to verify the effectiveness of the control strategy in dealing with the gradual and sudden change of irradiance. the wind and photovoltaic power generation systems are 200 kW and 120 kW and the wind speed drive simulates the input wind speed. The MPPT module is used to achieve the maximum wind mechanical power tracking.
1. Simulation of photovoltaic power generation system: The irradiance change curve shown in Figure 15a is used as the test input signal, and the simulation duration is set to 400 s to verify the effectiveness of the control strategy in dealing with the gradual and sudden change of irradiance.  Table 2. It can be seen more intuitively that the tracking time of the improved P&O algorithm is increased by 15.4% compared with the traditional P&O algorithm, and the power loss is reduced by 39.3%. Therefore, the improved P&O algorithm can effectively reduce power loss to achieve the full tracking of the maximum power point, which will improve the efficiency of renewable energy generation.

Wind Power System Simulation
Based on the improved P&O algorithm to verify the performance of the system in dealing with sudden changes in wind speed and in steady state, two main working conditions are set to detect in the simulation verification; step signal detection is working condition one and steady output signal is working condition two. The simulation time is set to 4 s, and the initial wind speed is set to 8 m/s. Entering the step signal detection part at 1 s, the wind speed suddenly changes from 8 m/s to 12 m/s, and then enters the steadystate output part of working condition two.
At the beginning of the simulation, the wind turbine is in the state of starting. Since the wind speed has not stabilized, the power will fluctuate in a small range, but it is still The two curves in the figure are the output power curves of the traditional and improved P&O algorithms, and the voltage disturbance is fixed at 2% of V OC . From the overall simulation results, the improved algorithm only consumes 6.3 s in approaching the maximum power point at the beginning, the oscillation amplitude is relatively small, and the trajectory can be tracked well.
The tracking effects of the two algorithms are shown in Table 2. It can be seen more intuitively that the tracking time of the improved P&O algorithm is increased by 15.4% compared with the traditional P&O algorithm, and the power loss is reduced by 39.3%. Therefore, the improved P&O algorithm can effectively reduce power loss to achieve the full tracking of the maximum power point, which will improve the efficiency of renewable energy generation.

Wind Power System Simulation
Based on the improved P&O algorithm to verify the performance of the system in dealing with sudden changes in wind speed and in steady state, two main working conditions are set to detect in the simulation verification; step signal detection is working condition one and steady output signal is working condition two. The simulation time is set to 4 s, and the initial wind speed is set to 8 m/s. Entering the step signal detection part at 1 s, the wind speed suddenly changes from 8 m/s to 12 m/s, and then enters the steady-state output part of working condition two.
At the beginning of the simulation, the wind turbine is in the state of starting. Since the wind speed has not stabilized, the power will fluctuate in a small range, but it is still within the controllable range. At 1 s, the system enters the step signal detection stage of working condition one, the wind speed suddenly increases from 8 m/s to 12 m/s, the output power fluctuates slightly, and the output power remains stable at 180 kW. Then enter the steady state stage of working condition two, and the output power curve does not fluctuate. Figure 16b is the simulation diagram of the wind energy utilization coefficient curve. The transient fluctuation occurs at the time of 1 s. After the dynamic adjustment of the algorithm, it quickly recovers and stabilizes, and finally stabilizes at a maximum value of about 0. 48. working condition one, the wind speed suddenly increases from 8 m/s to 12 m/s, the output power fluctuates slightly, and the output power remains stable at 180 kW. Then enter the steady state stage of working condition two, and the output power curve does not fluctuate.
Figure16b is the simulation diagram of the wind energy utilization coefficient curve. The transient fluctuation occurs at the time of 1 s. After the dynamic adjustment of the algorithm, it quickly recovers and stabilizes, and finally stabilizes at a maximum value of about 0.48.

Simulation Verification of Control Strategy Based on the Dynamic Droop Controller
In the system-connected mode of distributed power generation, the process of adding and cutting off the load of the propulsion system is simulated. The simulation time is set to 4 s, and the initial value of the load power is set to 10 kW. The load power suddenly changes from 10 kW to 70 kW in 2 s and then drops back to 10 kW in 3 s, and the systemconnected side voltage, current waveform, and frequency fluctuation are detected.
It can be seen from the figure that the output voltage and current are standard sinusoidal waveforms. The system enters a stable state at about 0.2 s, the current amplitude increases to about 16.5 A after a sudden load is applied at 2 s, and the current waveform stabilizes around 16.5 A in 2~3 s; Figure 17b shows the voltage curve of the system-connected side, which is maintained at around 300 V after the system is stable, and the voltage waveform not change significantly after the load suddenly changes; Figure 17c displays the frequency change curve when the system is running, where the system frequency can be maintained at around 50 Hz and the load switching process can be realized smoothly and quickly.

Simulation Verification of Control Strategy Based on the Dynamic Droop Controller
In the system-connected mode of distributed power generation, the process of adding and cutting off the load of the propulsion system is simulated. The simulation time is set to 4 s, and the initial value of the load power is set to 10 kW. The load power suddenly changes from 10 kW to 70 kW in 2 s and then drops back to 10 kW in 3 s, and the system-connected side voltage, current waveform, and frequency fluctuation are detected.
It can be seen from the figure that the output voltage and current are standard sinusoidal waveforms. The system enters a stable state at about 0.2 s, the current amplitude increases to about 16.5 A after a sudden load is applied at 2 s, and the current waveform stabilizes around 16.5 A in 2~3 s; Figure 17b shows the voltage curve of the system-connected side, which is maintained at around 300 V after the system is stable, and the voltage waveform not change significantly after the load suddenly changes; Figure 17c displays the frequency change curve when the system is running, where the system frequency can be maintained at around 50 Hz and the load switching process can be realized smoothly and quickly. working condition one, the wind speed suddenly increases from 8 m/s to 12 m/s, the output power fluctuates slightly, and the output power remains stable at 180 kW. Then enter the steady state stage of working condition two, and the output power curve does not fluctuate.

Simulation Verification of Control Strategy Based on the Dynamic Droop Controller
In the system-connected mode of distributed power generation, the process of adding and cutting off the load of the propulsion system is simulated. The simulation time is set to 4 s, and the initial value of the load power is set to 10 kW. The load power suddenly changes from 10 kW to 70 kW in 2 s and then drops back to 10 kW in 3 s, and the systemconnected side voltage, current waveform, and frequency fluctuation are detected.
It can be seen from the figure that the output voltage and current are standard sinusoidal waveforms. The system enters a stable state at about 0.2 s, the current amplitude increases to about 16.5 A after a sudden load is applied at 2 s, and the current waveform stabilizes around 16.5 A in 2~3 s; Figure 17b shows the voltage curve of the system-connected side, which is maintained at around 300 V after the system is stable, and the voltage waveform not change significantly after the load suddenly changes; Figure 17c displays the frequency change curve when the system is running, where the system frequency can be maintained at around 50 Hz and the load switching process can be realized smoothly and quickly.

Simulation Verification of Control Strategy Based on the Dynamic Droop Controller
In the system-connected mode of distributed power generation, the process of adding and cutting off the load of the propulsion system is simulated. The simulation time is set to 4 s, and the initial value of the load power is set to 10 kW. The load power suddenly changes from 10 kW to 70 kW in 2 s and then drops back to 10 kW in 3 s, and the system-connected side voltage, current waveform, and frequency fluctuation are detected.
It can be seen from the figure that the output voltage and current are standard sinusoidal waveforms. The system enters a stable state at about 0.2 s, the current amplitude increases to about 16.5 A after a sudden load is applied at 2 s, and the current waveform stabilizes around 16.5 A in 2~3 s; Figure 17b shows the voltage curve of the system-connected side, which is maintained at around 300 V after the system is stable, and the voltage waveform not change significantly after the load suddenly changes; Figure 17c displays the frequency change curve when the system is running, where the system frequency can be maintained at around 50 Hz and the load switching process can be realized smoothly and quickly.
working condition one, the wind speed suddenly increases from 8 m/s to 12 m/s, the out-put power fluctuates slightly, and the output power remains stable at 180 kW. Then enter the steady state stage of working condition two, and the output power curve does not fluctuate.
Figure16b is the simulation diagram of the wind energy utilization coefficient curve. The transient fluctuation occurs at the time of 1 s. After the dynamic adjustment of the algorithm, it quickly recovers and stabilizes, and finally stabilizes at a maximum value of about 0.48.

Simulation Verification of Control Strategy Based on the Dynamic Droop Controller
In the system-connected mode of distributed power generation, the process of adding and cutting off the load of the propulsion system is simulated. The simulation time is set to 4 s, and the initial value of the load power is set to 10 kW. The load power suddenly changes from 10 kW to 70 kW in 2 s and then drops back to 10 kW in 3 s, and the systemconnected side voltage, current waveform, and frequency fluctuation are detected.
It can be seen from the figure that the output voltage and current are standard sinusoidal waveforms. The system enters a stable state at about 0.2 s, the current amplitude increases to about 16.5 A after a sudden load is applied at 2 s, and the current waveform stabilizes around 16.5 A in 2~3 s; Figure 17b shows the voltage curve of the system-connected side, which is maintained at around 300 V after the system is stable, and the voltage waveform not change significantly after the load suddenly changes; Figure 17c displays the frequency change curve when the system is running, where the system frequency can be maintained at around 50 Hz and the load switching process can be realized smoothly and quickly. It can be seen from the simulation results that the designed two-layer coordinated control strategy of the propulsion system, which is based on the dynamic droop coefficient, has a significant effect on eliminating the voltage and frequency deviation. The system has the characteristics of rapid dynamic response and strong stability.  It can be seen from the simulation results that the designed two-layer coordinated control strategy of the propulsion system, which is based on the dynamic droop coefficient, has a significant effect on eliminating the voltage and frequency deviation. The system has the characteristics of rapid dynamic response and strong stability.

Simulation Verification of Day-Ahead Optimal Scheduling Control Strategy
Through the wind and solar forecast data and the electricity consumption of the shipload, the forecast curve of the day-ahead load power and the output power of the renewable energy is given, as shown in Figure 18. It can be seen from the simulation results that the designed two-layer coordinated control strategy of the propulsion system, which is based on the dynamic droop coefficient, has a significant effect on eliminating the voltage and frequency deviation. The system has the characteristics of rapid dynamic response and strong stability.

Simulation Verification of Day-Ahead Optimal Scheduling Control Strategy
Through the wind and solar forecast data and the electricity consumption of the shipload, the forecast curve of the day-ahead load power and the output power of the renewable energy is given, as shown in Figure 18. The day-ahead load power and renewable energy output power are input into system, and the day-ahead optimal dispatch curve and the energy storage system SOC curve can be obtained through the control calculation of each layer, as shown in Figure 19. It can be seen that the diesel generator set is basically maintained near the minimum operating power, which effectively reduces the pollutants produced by diesel generator sets. The day-ahead load power and renewable energy output power are input into system, and the day-ahead optimal dispatch curve and the energy storage system SOC curve can be obtained through the control calculation of each layer, as shown in Figure 19. It can be seen that the diesel generator set is basically maintained near the minimum operating power, which effectively reduces the pollutants produced by diesel generator sets.
(c) It can be seen from the simulation results that the designed two-layer coordinated control strategy of the propulsion system, which is based on the dynamic droop coefficient, has a significant effect on eliminating the voltage and frequency deviation. The system has the characteristics of rapid dynamic response and strong stability.

Simulation Verification of Day-Ahead Optimal Scheduling Control Strategy
Through the wind and solar forecast data and the electricity consumption of the shipload, the forecast curve of the day-ahead load power and the output power of the renewable energy is given, as shown in Figure 18. The day-ahead load power and renewable energy output power are input into system, and the day-ahead optimal dispatch curve and the energy storage system SOC curve can be obtained through the control calculation of each layer, as shown in Figure 19. It can be seen that the diesel generator set is basically maintained near the minimum operating power, which effectively reduces the pollutants produced by diesel generator sets. During the period from 0:00 to 5:00, since the light intensity is zero, renewable energy is supplied by the wind power generation part, and through the charge and discharge control of the energy storage system, the output power of the diesel unit is maintained at the minimum operating power of about 100 kW. From 6:00 to 11:00, the first peak period of electricity consumption is ushered in. The load power increases, and the output power of the diesel generator needs to be started to make up for the remaining power required by the load. From 12:00 to 16:00, since the light intensity reaches the highest value, the total output power of renewable energy reaches the maximum. From 17:00 to 21:00, the second peak period of electricity consumption is ushered in. The load power of the ship power system increases. Due to the reduction of the light intensity to zero, the total output power of renewable energy begins to decrease. After 21:00, as the power required by the ship power system load decreases, SOC returns to around 50% and the SOC value remains within the optimal range.
In order to verify the economy of the IPSO algorithm proposed in the optimal scheduling problem in this paper, the day-ahead optimal scheduling strategy of traditional logic is used as a comparison with the strategy proposed in this paper. In the fixed logic day ahead optimal scheduling strategy, the energy storage unit only charges and discharges according to the predetermined fixed time period (selects the charging and discharging periods according to the wind and solar load day ahead prediction results to ensure the life of energy storage) and uses the diesel generator set as the main power source for distributed discharge to track the ship load data and the total charging and discharging power of the energy storage system. The economic cost is shown in Table 3. The above economic operation cost formula is used to calculate the economic costs of the two methods. Since renewable energy always maintains the maximum power output and no load is in the state of power loss, the renewable energy operation cost and load income of the two strategies are consistent. Through calculation, it can be concluded that compared with the fixed logic strategy, the diesel generator fuel cost of the proposed strategy is reduced by 8.4%, the energy storage cost is reduced by 30%, and the total cost is saved by 8.2%. It not only saves energy but also reduces the pollution to the environment, which proves the superiority of the optimization algorithm proposed in this paper.
Traditional PSO, GA, and DE algorithms are used as comparison algorithms for a performance comparison test to prove the superiority of the proposed IPSO algorithm. The dimension of the standard test function is D = 30. For all test functions and algorithms, the initial value of the algorithm is set as follows: population size NP = 100; the maximum number of iterations g max = 30; threshold stg max = 20; and the maximum number of fitness calculations FE max = 3 × 10 5 and the convergence error ε = 10 −5 is set as the termination condition of the algorithm. The simulation results are shown in Figure 20.
In addition to the function speed of IPSO algorithm is slightly slower than DE algorithm except for (a) f 1 function, compared with the other three algorithms, the convergence speed is faster. Among them, when solving function (a) f 1 , (c) f 3 , PSO and GA algorithms have not converged to the allowable error range of ε = 10 −5 when the maximum computation times of 10,000 D are reached, and the same situation also occurs when solving function (d) f 4 for PSO algorithm. Both DE and IPSO algorithms achieve global optimal solutions on (a) f 1 , (b) f 2 functions. In addition, the GA algorithm achieves global optimal solutions on (b) f 2 functions, but its performance in other functions is not as good as the IPSO algorithm. Although the convergence speed of the DE algorithm is faster than that of the IPSO algorithm on (a) f 1 function, the convergence speed of the DE algorithm is not as fast as that of the IPSO algorithm on other functions, so it can be seen that the overall quality of its solution is not as good as that of the IPSO algorithm.
The above figure show the convergence curve of the tested algorithm. Under different test functions, the IPSO algorithm (the solid red line in the figure) is more competitive than the other three algorithms regarding solution quality and convergence speed. The search speed has also been improved while ensuring the accuracy of solution. is not as fast as that of the IPSO algorithm on other functions, so it can be seen that the overall quality of its solution is not as good as that of the IPSO algorithm. The above figure show the convergence curve of the tested algorithm. Under different test functions, the IPSO algorithm (the solid red line in the figure) is more competitive than the other three algorithms regarding solution quality and convergence speed. The search speed has also been improved while ensuring the accuracy of solution.

Conclusion and Discussion
The energy management strategy of a ship propulsion system based on hierarchical control is studied, including research on the MPPT control strategy for renewable energy and the two-layer coordinated control strategy for distributed power system-connected inverters. The following primary research results were obtained:

•
The overall scheme of the layered control system of the ship propulsion system is designed, and a detailed and complete mathematical model is established. An overall

Conclusion and Discussion
The energy management strategy of a ship propulsion system based on hierarchical control is studied, including research on the MPPT control strategy for renewable energy and the two-layer coordinated control strategy for distributed power system-connected inverters. The following primary research results were obtained:

•
The overall scheme of the layered control system of the ship propulsion system is designed, and a detailed and complete mathematical model is established. An overall simulation model of the ship propulsion system is built, which meets the needs of subsequent related research and simulation tests. • A P&O algorithm based on dynamic perturbation step size is designed, including oscillation detection mechanism, dynamic perturbation step adjustment strategy, and voltage boundary setting. Through the comparison example simulation test with the traditional algorithm, the results show that the power loss of the MPPT control strategy using the P&O algorithm with a dynamic disturbance step size is reduced by 39.3%, and the overall tracking time is prolonged by 15.4%. • A three-layer coordinated control strategy of the propulsion system based on the dynamic droop coefficient is designed, which dynamically adjusts the fixed droop coefficient. Realizing the adaptive change of the droop coefficient solves the problem of voltage and frequency deviation. In order to improve the system performance, the power sensitivity factor is designed simultaneously; moreover, a voltage and current double closed-loop controller are further designed to improve the inverter noise immunity and power quality. The simulation results show that the proposed control strategy can effectively suppress the voltage and frequency fluctuations and improve the system-connected security and power quality of the system-connected side. • A PSO algorithm based on mutation particles is designed, and the collection information of some top-ranked vectors is mixed in the generated mutation vector; furthermore, the method of the segmental improvement speed formula is adopted in order to improve the accuracy and search speed. Through the standard function performance test with other intelligent optimization algorithms, the results show that the improved algorithm has a faster convergence speed and higher accuracy in solving the load optimization problem. The total running cost of the algorithm is reduced 8.4%, and the total cost was reduced by 8.2%.
In addition, the ship energy management system designed in this paper can give distributed power supply output results through the predicted data. However, there is no relevant operating software and interface display. Despite the lack of visualizationrelated research, the equipment involved is assumed to be in good operating condition. The built simulation model focuses more on the overall design of the control strategy, ignoring the actual multi-interference situation. Therefore, follow-up work should mainly focus on the above aspects for further study in order to improve the practicability of the simulation model.