A ship light storage diesel electric power system capacity optimization configuration method based on whole group optimization algorithm

By optimizing the capacity configuration of the ship's photovoltaic-storage-diesel power system using a holistic swarm optimization algorithm, the problem of balancing economy, reliability, and environmental protection in existing methods is solved, achieving cost minimization and system stability improvement throughout the entire life cycle.

CN121150153BActive Publication Date: 2026-06-12DALIAN MARITIME UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DALIAN MARITIME UNIVERSITY
Filing Date
2025-09-29
Publication Date
2026-06-12

Smart Images

  • Figure CN121150153B_ABST
    Figure CN121150153B_ABST
Patent Text Reader

Abstract

The application provides a ship photovoltaic-thermal-diesel power system capacity optimization configuration method based on a whole group optimization algorithm, and comprises the following steps: establishing a mathematical model of the ship photovoltaic-thermal-diesel power system, including a photovoltaic array output model, an energy storage battery model and a diesel generator model; constructing an objective function and constraint conditions of the whole group optimization algorithm; combining the objective function and the constraint conditions, and using the whole group optimization algorithm to optimize and solve the established mathematical model to obtain a capacity optimization configuration result of the ship photovoltaic-thermal-diesel power system. The application takes the minimum annual total cost in the whole life cycle of the ship photovoltaic-thermal-diesel power system as an optimization target, mainly considers annual initial investment cost, annual operation and maintenance cost, annual equipment replacement cost, annual fuel cost and annual environmental protection conversion cost, can fully utilize photovoltaic, energy storage and diesel generator resources in the ship photovoltaic-thermal-diesel power system, optimizes power system capacity configuration, and provides a basis for ship photovoltaic-thermal-diesel power system project construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ship power system optimization configuration technology, and more particularly to a method for optimizing the capacity configuration of ship photovoltaic-storage-diesel power systems based on a global swarm optimization algorithm. Background Technology

[0002] With the growth of global energy demand and increasing environmental awareness, ship power systems are developing towards greater efficiency and environmental friendliness. The shipborne photovoltaic-storage-diesel power system is a hybrid power system combining photovoltaic power generation, energy storage technology, and diesel generators. It aims to fully utilize renewable energy, reduce dependence on traditional fossil fuels, and lower operating costs and environmental pollution. This system achieves stable and economical power supply through the rational configuration of photovoltaic arrays, energy storage batteries, and diesel generator capacities.

[0003] Currently, the design and optimization of ship power systems mainly rely on traditional optimization methods, such as linear programming and dynamic programming. While these methods demonstrate efficiency in handling simple power system configuration problems, they often have limitations when dealing with complex hybrid power systems. In recent years, with the development of intelligent optimization algorithms, some swarm intelligence-based optimization algorithms, such as genetic algorithms and particle swarm optimization, have begun to be applied to the optimal configuration of ship power systems. These algorithms, by simulating the collective behavior of groups in nature, can effectively search for the global optimum, improving the efficiency and accuracy of optimization.

[0004] However, existing optimization methods still face several challenges when applied to marine photovoltaic-storage-diesel power systems. First, traditional optimization methods struggle to simultaneously consider the system's economics, reliability, and environmental friendliness, potentially leading to deficiencies in certain aspects of the optimization results. Second, while existing intelligent optimization algorithms can handle complex optimization problems, they are prone to getting trapped in local optima when faced with multi-objective, multi-constraint optimization problems like those in marine photovoltaic-storage-diesel power systems, making it difficult to find the global optimum. Furthermore, existing methods often neglect the system's lifecycle cost during the optimization process, potentially rendering the optimization results economically unfeasible in practical applications. Therefore, developing an optimization configuration method that comprehensively considers the system's lifecycle cost, economics, reliability, and environmental friendliness is of great significance for the development of marine photovoltaic-storage-diesel power systems. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method for optimizing the capacity configuration of a shipboard photovoltaic-storage-diesel power system based on a swarm optimization algorithm. This invention establishes a system model, sets optimization objectives and constraints, and utilizes a swarm optimization algorithm to find the optimal solution, thereby minimizing the average annual total cost of the shipboard photovoltaic-storage-diesel power system throughout its entire lifecycle, while ensuring system reliability and environmental friendliness.

[0006] The technical means employed in this invention are as follows:

[0007] A method for optimizing the capacity configuration of a shipboard photovoltaic-storage-diesel power system based on a global swarm optimization algorithm includes:

[0008] S1. Establish a mathematical model for the ship's photovoltaic-storage-diesel power system, including a photovoltaic array output model, an energy storage battery model, and a diesel generator model.

[0009] S2. Construct the objective function for the global swarm optimization algorithm;

[0010] S3. Set constraints, including system power balance constraints, equipment physical operation constraints, system operation strategy constraints, and soft constraints on reliability and economy;

[0011] S4. Combining the objective function and constraints, the global swarm optimization algorithm is used to optimize the mathematical model and obtain the capacity optimization configuration results of the ship's photovoltaic-storage-diesel power system.

[0012] Furthermore, in step S1:

[0013] The parameters considered in establishing a photovoltaic array output model include: sunlight, temperature, photovoltaic panel investment cost, maintenance cost, service life, and replacement cost per unit;

[0014] The parameters to be considered when establishing an energy storage battery model include: unit battery capacity, maximum charge and discharge power, charge and discharge efficiency, upper and lower limits of state of charge, battery investment cost, maintenance cost, and replacement cost per unit.

[0015] The parameters considered when establishing a diesel generator model include: rated power of the diesel generator, investment cost, maintenance cost, service life, replacement cost per unit, and diesel fuel cost.

[0016] Further, in step S2, the objective function of the overall swarm optimization algorithm is constructed based on the average annual initial investment cost, annual operation and maintenance cost, average annual equipment replacement cost, annual fuel cost, and annual environmental protection depreciation cost. The formula is as follows:

[0017]

[0018] in, This represents the average annual initial investment cost. Annual operating and maintenance costs, The average annual equipment replacement cost, Annual fuel cost, Annual environmental protection cost calculation and All of these are penalties.

[0019] Furthermore, the average annual initial investment cost The calculation formula is as follows:

[0020]

[0021] in, For the number of photovoltaic panels, The number of diesel generators, The number of batteries, The investment cost per photovoltaic panel, The investment cost of a single diesel generator. The investment cost per battery unit. Let be the recycling coefficient function of the photovoltaic panel. For the recovery coefficient function of the diesel generator, Let be the recycling coefficient function of the battery. The lifespan of photovoltaic panels. This refers to the service life of the diesel generator. This refers to the lifespan of the battery.

[0022] Furthermore, the annual fuel cost The calculation formula is as follows:

[0023]

[0024] in, For the number of hours throughout the year, For diesel prices, and This is the coefficient for the fuel consumption curve. for The actual output power of the diesel generator at any given time. This refers to the rated power of a single diesel generator.

[0025] Furthermore, the setting of system power balance constraints includes:

[0026] At any time The power generation, energy storage charging and discharging power, load power, curtailed power, and power shortage power in a ship's photovoltaic-storage-diesel power system must meet the following balance relationship:

[0027]

[0028] in, Contribute to the overall photovoltaic power generation For the actual output of the diesel generator, For energy storage discharge power, For energy storage charging power, For abandoned light power, For load power, This indicates a power shortage.

[0029] Furthermore, the setting of constraints, including setting physical operation constraints for the equipment, includes:

[0030] Set the upper and lower limits of the state of charge (SOC) constraints for the energy storage battery as follows:

[0031]

[0032] Set the maximum charge and discharge power constraint for the energy storage battery as follows:

[0033]

[0034]

[0035] Set output constraints for the diesel generator; when the diesel generator is running, the actual output of the diesel generator... satisfy:

[0036] .

[0037] Furthermore, the setting of system operation strategy constraints includes:

[0038] Set power supply priority strategy constraints. When the system experiences a power shortage, the power sources will be called in the following priority order: photovoltaic output, energy storage battery discharge, and diesel generator output. Power shortage will only occur when there is still a shortage after all power sources have reached their maximum output.

[0039] Set energy consumption priority strategy constraints. When the system has excess power, energy is consumed in the following priority order: energy storage battery charging. Only when the energy storage battery has excess power after reaching the charging power limit or the SOC limit will there be wasted power.

[0040] Set diesel engine start-stop logic constraints. When the diesel generator was running in the previous moment, the current scheduling strategy prioritizes keeping it running to avoid frequent start-stops.

[0041] Furthermore, the setting of constraints includes setting soft constraints on reliability and economy, which are achieved by setting penalty terms in the objective function, including:

[0042] Set a soft constraint on energy waste rate, and expect the energy waste rate of the final configuration scheme to be... Not higher than the preset threshold;

[0043] Set a soft constraint on the power outage rate, and expect the power outage rate of the final configuration scheme to be [value missing]. Not higher than the preset threshold.

[0044] Furthermore, in step S4, the established mathematical model is optimized and solved using a global swarm optimization algorithm, including:

[0045] S41. Initialization: Settings include n Initial population of individuals X Each individual This represents a set of capacity configuration schemes;

[0046] S42. Fitness assessment and coefficient calculation, the calculation process is as follows:

[0047] Calculate each individual Corresponding objective function value As its fitness;

[0048] Calculate the root mean square of all fitness values. The formula for calculating the root mean square is:

[0049] ,

[0050] Based on each fitness value and root mean square Differences Calculate the normalized direction of movement coefficient The calculation formula is:

[0051] ;

[0052] S43, Location Update: Update each individual Get a new position :

[0053]

[0054] in, For constant parameters, Given random values, sum them up and iterate through all individuals. ;

[0055] S44. Selection and adaptive mutation based on adaptive simulated annealing, the process is as follows:

[0056] Calculate the fitness value of the new location. If its fitness value is better than the old one If the current position is correct, the new position is accepted; otherwise, the position is determined based on the current iteration temperature. and fitness change Calculate the probability of acceptance And use this probability to decide whether to accept a worse new position;

[0057] The mutation rate is dynamically adjusted based on the current iteration number. and variable asynchronous length and with probability Apply a size of to the individual position Random perturbations;

[0058] S45. Termination condition judgment: Determine whether the maximum number of iterations has been reached. If not, return to step S42 to continue iterating. If so, output the best individual currently recorded as the capacity optimization configuration result.

[0059] Compared with the prior art, the present invention has the following advantages:

[0060] 1. The present invention provides a capacity optimization configuration method for a ship photovoltaic-storage-diesel power system based on a global swarm optimization algorithm. With the goal of minimizing the average annual total cost over the entire life cycle, it comprehensively considers cost factors such as initial investment, operation and maintenance, equipment replacement, and fuel consumption. Through the precise optimization of the global swarm optimization algorithm, the cost-optimal capacity configuration scheme is found, which effectively reduces the long-term operating cost of the ship photovoltaic-storage-diesel power system.

[0061] 2. This invention provides a method for optimizing the capacity configuration of a ship's photovoltaic-storage-diesel power system based on a global swarm optimization algorithm. During the optimization process, constraints such as power system power balance, energy storage charging / discharging depth, and lifespan are fully considered, ensuring stable system operation under various operating conditions. Simultaneously, through reasonable capacity configuration, the system's power supply reliability and anti-interference capability are improved, reducing the risk of power outages due to equipment failure or insufficient energy supply, thus enhancing the reliability of the ship's power system.

[0062] 3. The present invention provides a method for optimizing the capacity configuration of a ship photovoltaic-storage-diesel power system based on a global swarm optimization algorithm. This method incorporates the annual environmental protection cost into the optimization objective, encourages the system to make more use of clean energy (such as photovoltaic energy), and reduces dependence on fossil fuels such as diesel. This reduces pollutant emissions during ship operation, plays a positive role in promoting environmental protection, and improves the environmental friendliness of the ship photovoltaic-storage-diesel power system.

[0063] 4. The present invention provides a capacity optimization configuration method for a ship photovoltaic-storage-diesel power system based on a global swarm optimization algorithm. It comprehensively considers the characteristics of resources such as photovoltaics, energy storage and diesel generators. Through the intelligent optimization of the global swarm optimization algorithm, it realizes the optimal configuration and collaborative work among various resources, gives full play to the advantages of each resource, improves the resource utilization efficiency of the entire power system, and avoids resource waste.

[0064] 5. This invention provides a capacity optimization configuration method for marine photovoltaic-storage-diesel power systems based on a global swarm optimization algorithm. This method is applicable to different types of marine photovoltaic-storage-diesel power systems and has strong adaptability. Whether the vessel is large or small, operating under high or low loads, this method can find the most suitable capacity configuration scheme to meet the actual needs of different vessels.

[0065] Based on the above reasons, this invention can be widely applied in fields such as the optimization and configuration of ship power systems. Attached Figure Description

[0066] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1 This is a flowchart of the method of the present invention.

[0068] Figure 2 A graph showing the total cost as a function of the number of iterations, provided for an embodiment of the present invention. Detailed Implementation

[0069] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0070] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the present invention or its application or use. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0071] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0072] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of the invention. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0073] In the description of this invention, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is generally based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this invention and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this invention. The directional terms "inner" and "outer" refer to the inner and outer contours relative to the outline of each component itself.

[0074] For ease of description, spatial relative terms such as "above," "over," "on the upper surface of," "above," etc., are used herein to describe the spatial positional relationship of a device or feature as shown in the figures to other devices or features. It should be understood that spatial relative terms are intended to encompass different orientations in use or operation besides the orientation of the device as described in the figures. For example, if the device in the figures is inverted, a device described as "above" or "above" other devices or structures would subsequently be positioned as "below" or "under" other devices or structures. Thus, the exemplary term "above" can include both "above" and "below." The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatial relative descriptions used herein will be interpreted accordingly.

[0075] Furthermore, it should be noted that the use of terms such as "first" and "second" to define components is merely for the purpose of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore should not be construed as limiting the scope of protection of this invention.

[0076] like Figure 1As shown, this invention provides a method for optimizing the capacity configuration of a shipboard photovoltaic-storage-diesel power system based on a global swarm optimization algorithm, comprising:

[0077] S1. Establish a mathematical model for the ship's photovoltaic-storage-diesel power system, including a photovoltaic array output model, an energy storage battery model, and a diesel generator model.

[0078] S2. Construct the objective function for the global swarm optimization algorithm;

[0079] S3. Set constraints, including system power balance constraints, equipment physical operation constraints, system operation strategy constraints, and soft constraints on reliability and economy;

[0080] S4. Combining the objective function and constraints, the global swarm optimization algorithm is used to optimize the mathematical model and obtain the capacity optimization configuration results of the ship's photovoltaic-storage-diesel power system.

[0081] In a specific implementation, as a preferred embodiment of the present invention, in step S1:

[0082] The parameters considered in establishing a photovoltaic array output model include: sunlight, temperature, photovoltaic panel investment cost, maintenance cost, service life, and replacement cost per unit;

[0083] The parameters to be considered when establishing an energy storage battery model include: unit battery capacity, maximum charge and discharge power, charge and discharge efficiency, upper and lower limits of state of charge, battery investment cost, maintenance cost, and replacement cost per unit.

[0084] The parameters considered when establishing a diesel generator model include: rated power of the diesel generator, investment cost, maintenance cost, service life, replacement cost per unit, and diesel fuel cost.

[0085] In a specific implementation, as a preferred embodiment of the present invention, step S2 involves constructing the objective function of the overall group optimization algorithm based on the average annual initial investment cost, annual operation and maintenance cost, average annual equipment replacement cost, annual fuel cost, and annual environmental protection depreciation cost. The formula is as follows:

[0086]

[0087] in, This represents the average annual initial investment cost. Annual operating and maintenance costs, The average annual equipment replacement cost, Annual fuel cost, Annual environmental protection cost calculation and All of these are penalties.

[0088] In specific implementation, as a preferred embodiment of the present invention, the average annual initial investment cost The calculation formula is as follows:

[0089]

[0090] in, For the number of photovoltaic panels, The number of diesel generators, The number of batteries, The investment cost per photovoltaic panel, The investment cost of a single diesel generator. The investment cost per battery unit. Let be the recycling coefficient function of the photovoltaic panel. For the recovery coefficient function of the diesel generator, Let be the recycling coefficient function of the battery. The lifespan of photovoltaic panels. This refers to the service life of the diesel generator. This refers to the lifespan of the battery.

[0091] In specific implementation, as a preferred embodiment of the present invention, the annual fuel cost The calculation formula is as follows:

[0092]

[0093] in, For the number of hours throughout the year, For diesel prices, and This is the coefficient for the fuel consumption curve. for The actual output power of the diesel generator at any given time. This refers to the rated power of a single diesel generator.

[0094] In a specific implementation, as a preferred embodiment of the present invention, the setting of system power balance constraints includes:

[0095] At any time The power generation, energy storage charging and discharging power, load power, curtailed power, and power shortage power in a ship's photovoltaic-storage-diesel power system must meet the following balance relationship:

[0096]

[0097] in, Contribute to the overall photovoltaic power generation For the actual output of the diesel generator, For energy storage discharge power, For energy storage charging power, For abandoned light power, For load power, This indicates a power shortage.

[0098] In a specific implementation, as a preferred embodiment of the present invention, the setting of constraints, including setting physical operation constraints of the equipment, includes:

[0099] Set upper and lower limits for the state of charge (SOC) of the energy storage battery as follows:

[0100]

[0101] Set the maximum charge and discharge power constraint for the energy storage battery as follows:

[0102]

[0103]

[0104] Set output constraints for the diesel generator; when the diesel generator is running, the actual output of the diesel generator... satisfy:

[0105] .

[0106] In a specific implementation, as a preferred embodiment of the present invention, the setting of system operation strategy constraints includes:

[0107] Set power supply priority strategy constraints. When the system experiences a power shortage, the power sources will be called in the following priority order: photovoltaic output, energy storage battery discharge, and diesel generator output. Power shortage will only occur when there is still a shortage after all power sources have reached their maximum output.

[0108] Set energy consumption priority strategy constraints. When the system has excess power, energy is consumed in the following priority order: energy storage battery charging. Only when the energy storage battery has excess power after reaching the charging power limit or the SOC limit will there be wasted power.

[0109] Set diesel engine start-stop logic constraints. When the diesel generator was running in the previous moment, the current scheduling strategy prioritizes keeping it running to avoid frequent start-stops.

[0110] In a specific implementation, as a preferred embodiment of the present invention, the setting of constraints includes setting soft constraints on reliability and economy, which is achieved by setting a penalty term in the objective function, including:

[0111] Set a soft constraint on energy waste rate, and expect the energy waste rate of the final configuration scheme to be... Not exceeding the preset threshold of 0.2;

[0112] Set a soft constraint on the power outage rate, and expect the power outage rate of the final configuration scheme to be [value missing]. It should not exceed the preset threshold of 0.1.

[0113] In a specific implementation, as a preferred embodiment of the present invention, step S4 involves using a global swarm optimization algorithm to find the optimal solution for the established mathematical model, including:

[0114] S41. Initialization: Settings include n Initial population of individuals X Each individual This represents a set of capacity configuration schemes;

[0115] S42. Fitness assessment and coefficient calculation, the calculation process is as follows:

[0116] Calculate each individual Corresponding objective function value As its fitness;

[0117] Calculate the root mean square of all fitness values. The formula for calculating the root mean square is:

[0118] ,

[0119] Based on each fitness value and root mean square Differences Calculate the normalized direction of movement coefficient The calculation formula is:

[0120] ;

[0121] S43, Location Update: Update each individual Get a new position :

[0122]

[0123] in, For constant parameters, Given random values, sum them up and iterate through all individuals. ;

[0124] S44. Selection and adaptive mutation based on adaptive simulated annealing, the process is as follows:

[0125] Calculate the fitness value of the new location. If its fitness value is better than the old one If the current position is correct, the new position is accepted; otherwise, the position is determined based on the current iteration temperature. and fitness change Calculate the probability of acceptance And use this probability to decide whether to accept a worse new position;

[0126] The mutation rate is dynamically adjusted based on the current iteration number. and variable asynchronous length and with probability Apply a size of to the individual position Random perturbations;

[0127] S45. Termination condition judgment: Determine whether the maximum number of iterations has been reached. If not, return to step S42 to continue iterating. If so, output the best individual currently recorded as the capacity optimization configuration result.

[0128] In this embodiment, as Figure 2 The graph shown illustrates the total cost as a function of the number of iterations. The horizontal axis represents the number of iterations, and the vertical axis represents the total cost. As the number of iterations increases, the total cost gradually decreases and tends to stabilize. This indicates that the swarm optimization algorithm can effectively find a better capacity configuration scheme during the iteration process, continuously reducing the total cost of the ship's solar-storage-diesel power system. The downward trend of the curve reflects the optimization process of the algorithm, ultimately reaching a relatively stable minimum cost value after a certain number of iterations, indicating that the algorithm has successfully found an optimal capacity configuration scheme.

[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for optimizing the capacity configuration of a ship's photovoltaic-battery-diesel hybrid power system based on a whole group optimization algorithm, characterized in that, include: S1. Establish a mathematical model for the ship's photovoltaic-storage-diesel power system, including a photovoltaic array output model, an energy storage battery model, and a diesel generator model. S2. Based on the average annual initial investment cost, annual operation and maintenance cost, average annual equipment replacement cost, annual fuel cost, and annual environmental protection depreciation cost, construct the objective function of the overall group optimization algorithm, as shown in the following formula: in, This represents the average annual initial investment cost. Annual operating and maintenance costs, The average annual equipment replacement cost, Annual fuel cost, Annual environmental protection cost calculation and All of these are penalties; The average annual initial investment cost The calculation formula is as follows: in, For the number of photovoltaic panels, The number of diesel generators, For the number of batteries, The investment cost per photovoltaic panel, The investment cost of a single diesel generator. The investment cost per battery unit. Let be the recycling coefficient function of the photovoltaic panel. For the recovery coefficient function of the diesel generator, Let be the recycling coefficient function of the battery. The lifespan of photovoltaic panels. This refers to the service life of the diesel generator. This refers to the service life of the battery. Annual fuel cost The calculation formula is as follows: in, For the number of hours throughout the year, For diesel prices, and This is the coefficient for the fuel consumption curve. for The actual output power of the diesel generator at any given time. This refers to the rated power of a single diesel generator. S3. Set constraints, including system power balance constraints, equipment physical operation constraints, system operation strategy constraints, and soft constraints on reliability and economy; S4. Combining the objective function and constraints, the global swarm optimization algorithm is used to optimize the mathematical model and obtain the capacity optimization configuration results of the ship's photovoltaic-storage-diesel power system.

2. The method for capacity optimization configuration of a shipborne photovoltaic-storage-diesel power system based on a global swarm optimization algorithm according to claim 1, characterized in that, In step S1: The parameters considered in establishing a photovoltaic array output model include: sunlight, temperature, photovoltaic panel investment cost, maintenance cost, service life, and replacement cost per unit; The parameters to be considered when establishing an energy storage battery model include: unit battery capacity, maximum charge and discharge power, charge and discharge efficiency, upper and lower limits of state of charge, battery investment cost, maintenance cost, and replacement cost per unit. The parameters considered when establishing a diesel generator model include: rated power of the diesel generator, investment cost, maintenance cost, service life, replacement cost per unit, and diesel fuel cost.

3. The method for capacity optimization configuration of a shipborne photovoltaic-storage-diesel power system based on a global swarm optimization algorithm according to claim 1, characterized in that, The set constraints include setting system power balance constraints, including: At any time The power generation, energy storage charging and discharging power, load power, curtailed power, and power shortage power in a ship's photovoltaic-storage-diesel power system must meet the following balance relationship: in, Contribute to the overall photovoltaic power generation For the actual output of the diesel generator, For energy storage discharge power, For energy storage charging power, For abandoned light power, For load power, This indicates a power shortage.

4. The method for capacity optimization configuration of a shipborne photovoltaic-storage-diesel power system based on a global swarm optimization algorithm according to claim 1, characterized in that, The set constraints include setting physical operation constraints for the equipment, including: Set the upper and lower limits of the state of charge (SOC) constraints for the energy storage battery as follows: Set the maximum charge and discharge power constraint for the energy storage battery as follows: Set output constraints for the diesel generator; when the diesel generator is running, the actual output of the diesel generator... satisfy: 。 5. The method for capacity optimization configuration of a shipborne photovoltaic-storage-diesel power system based on a global swarm optimization algorithm according to claim 1, characterized in that, The constraints set include system operation strategy constraints, including: Set power supply priority strategy constraints. When the system experiences a power shortage, the power sources will be called in the following priority order: photovoltaic output, energy storage battery discharge, and diesel generator output. Power shortage will only occur when there is still a shortage after all power sources have reached their maximum output. Set energy consumption priority strategy constraints. When the system has excess power, energy is consumed in the following priority order: energy storage battery charging. Only when the energy storage battery has excess power after reaching the charging power limit or the SOC limit will there be wasted power. Set diesel engine start-stop logic constraints. When the diesel generator was running in the previous moment, the current scheduling strategy prioritizes keeping it running to avoid frequent start-stops.

6. The method for capacity optimization configuration of a shipborne photovoltaic-storage-diesel power system based on a global swarm optimization algorithm according to claim 1, characterized in that, The aforementioned constraint conditions include setting soft constraints on reliability and economy, which are achieved by setting penalty terms in the objective function, including: Set a soft constraint on energy waste rate, and expect the energy waste rate of the final configuration scheme to be... Not higher than the preset threshold; Set a soft constraint on the power outage rate, and expect the power outage rate of the final configuration scheme to be [value missing]. Not higher than the preset threshold.

7. The method for capacity optimization configuration of a shipborne photovoltaic-storage-diesel power system based on a global swarm optimization algorithm according to claim 1, characterized in that, In step S4, the established mathematical model is optimized and solved using a global swarm optimization algorithm, including: S41. Initialization: Settings include n Initial population of individuals X Each individual This represents a set of capacity configuration schemes; S42. Fitness assessment and coefficient calculation, the calculation process is as follows: Calculate each individual Corresponding objective function value As its fitness; Calculate the root mean square of all fitness values. The formula for calculating the root mean square is: , Based on each fitness value and root mean square Differences Calculate the normalized direction of movement coefficient The calculation formula is: ; S43, Location Update: Update each individual Get a new position : in, For constant parameters, Given random values, sum them up and iterate through all individuals. ; S44. Selection and adaptive mutation based on adaptive simulated annealing, the process is as follows: Calculate the fitness value of the new location. If its fitness value is better than the old one If the current position is correct, the new position is accepted; otherwise, the position is determined based on the current iteration temperature. and fitness change Calculate the probability of acceptance And use this probability to decide whether to accept a worse new position; The mutation rate is dynamically adjusted based on the current iteration number. and variable asynchronous length and with probability Apply a size of to the individual position Random perturbations; S45. Termination condition judgment: Determine whether the maximum number of iterations has been reached. If not, return to step S42 to continue iterating. If so, output the best individual currently recorded as the capacity optimization configuration result.