Ship power grid fault reconstruction method, terminal equipment and medium
The ship power grid fault reconstruction model is constructed through the deep reinforcement learning method, and the Dueling DQN model generation strategy is used to solve the problem of rapid recovery of the ship power system under fault conditions and achieve efficient load power supply and grid recovery.
Patent Information
- Application Number
- CN202410649175.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-23
AI Technical Summary
It is difficult for the ship's power system to quickly recover to a stable and reliable state in the event of a fault, resulting in reduced navigation capabilities and reliability. The calculations of the existing technology are complex and it is difficult to find the optimal solution.
A fault reconstruction method based on deep reinforcement learning is used to build a ship power grid model, define the state space, action space and reward function, use the Dueling DQN model to generate a fault reconstruction strategy, and achieve the recovery of the operating topology with the minimum number of switches by training the model.
Under multi-energy system faults, the optimal operating topology is achieved with the minimum number of switches, ensuring the reliability of power supply for loads of different priorities, with fewer switching actions and faster convergence speed.
Smart Images

Figure CN118611040A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric power systems, and in particular to a method, terminal equipment and medium for reconfiguring a ship power grid failure. Background Art
[0002] One of the challenges facing the multi-energy driven ship power system is how to ensure the survivability of the ship in the event of a fault. Compared with the onshore power system, the ship power system does not have strong grid support, which is equivalent to an isolated microgrid, and the power system is more fragile. If a ship microgrid fails, the change in the local state of the system will be quickly fed back to the entire ship power system, and may cause a chain failure, which will seriously threaten its safety. In this way, the navigation ability and reliability of the ship will be greatly reduced. Therefore, in order to improve the reliability and vitality of the ship power system, it is required that the power system can respond quickly when a fault occurs, restore the ship power system from a fault state to a stable and reliable operating state, and realize the self-recovery of the ship power system. One of the important means to achieve this process is fault reconstruction technology, that is, when a fault occurs in the ship power system, the power system operation topology is changed through a tie switch or a section switch to maintain the reliability of power supply to different loads. Therefore, the fault reconstruction method has also become one of the important tasks in the field of modern ship automation research.
[0003] Fault reconstruction of ship power systems is a multi-objective non-convex optimization problem, and the objective function is to maximize the amount of power outage load recovery, minimize the operating network loss, and the number of switch operations. Domestic and foreign researchers have carried out a lot of research, which can be summarized into three categories based on the solution methods: mathematical optimization methods, heuristic methods, and reinforcement learning methods. However, mathematical optimization methods usually require solving complex mathematical models, which leads to high computational complexity. Especially for large-scale power grid systems, the calculation time may be very long and it is easy to fall into local optimal solutions. Heuristic methods are usually based on empirical rules or simple search strategies, and may not be able to find the optimal solution, but can only get a good approximate solution. In addition, the performance of heuristic methods is highly dependent on the design of heuristic rules and parameter settings, and may not be able to adapt to different types of power grid structures. Summary of the invention
[0004] In order to solve the above problems, the present invention proposes a ship power grid fault reconstruction method, terminal equipment and medium.
[0005] The specific plan is as follows:
[0006] A method for reconfiguring a ship power grid fault, comprising the following steps:
[0007] Construct ship power grid model;
[0008] A ship power grid fault reconstruction model based on deep reinforcement learning is constructed, and the state space, action space and reward function are defined; the state space includes: node voltage, branch current, switch state, total output power of the power supply and fault line; the action space includes the switch state of each line; the reward function is related to whether the power flow calculation is successful. When the power flow calculation is successful, the reward function consists of maximum load power supply, minimum network loss operation, minimum number of switches and voltage limit penalty;
[0009] After the model is trained based on the fault data of the ship's power system, the trained model is used to reconstruct the ship's power system after a grid failure occurs.
[0010] Furthermore, the loss function during model training uses mean square error.
[0011] Furthermore, in the fault reconstruction model based on deep reinforcement learning, the Dueling DQN model is used to realize the generation of fault reconstruction strategy.
[0012] Furthermore, the reward function is expressed as:
[0013]
[0014] r1=λ1∑P g1x +λ2∑P g2y +λ3∑P g3z
[0015] r2=(-1)×∑i ij 2 r ij
[0016]
[0017]
[0018] r5=K3C
[0019] Among them, r represents the total reward function; r1 represents the maximum load power supply; r2 represents the minimum network loss operation; r3 represents the minimum number of switches; r4 represents the voltage limit penalty; r5 represents whether the power flow calculation is successful; C represents whether the power flow calculation is successful. When the power flow calculation is successful, C = 0, otherwise C = 1; K1, K2, and K3 are all negative constants; P g1x represents the active load of the xth class-one load; P g2y represents the active load of the yth second-class load; P g3z represents the active load of the zth three-category load; λ1, λ2, λ3 represent the weights of the first-category load, the second-category load, and the third-category load, respectively; i ij represents the current flowing through branch ij; rij represents the resistance of branch ij; L represents the branch set; i and j represent the nodes at both ends of the branch; SL l R Indicates the state of the lth switch after reconstruction; SL l P Indicates the status of the lth switch after failure and before failure reconstruction; l is the sequence number of the switch; u min and u max They represent the lower and upper limits of the node safety voltage respectively; u j Represents the node voltage.
[0020] Furthermore, λ1=20, λ2=7, λ3=1.
[0021] Further, u min =0.9u,u max =1.06u, u represents the reference voltage.
[0022] Furthermore, two or three switch actions are selected during reconstruction.
[0023] A ship power grid fault reconstruction terminal device comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method in an embodiment of the present invention when executing the computer program.
[0024] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above in an embodiment of the present invention are implemented.
[0025] The present invention adopts the above technical solution, which can achieve the optimal operating topology with the least number of switches under multi-energy system failures and multi-line failures, ensuring the power supply reliability of loads with different priorities. At the same time, compared with other methods, the method adopted by the present invention has fewer switching actions and faster convergence speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 The figure shows a schematic diagram of the topological structure of the ship power grid in the first embodiment of the present invention.
[0027] Figure 2 FIG. 4 is a schematic diagram of an algorithm model based on Dueling DQN in this embodiment.
[0028] Figure 3 Shown is a schematic diagram of the reconstruction result of scenario one in this embodiment.
[0029] Figure 4 Shown is a node voltage distribution diagram in the reconstruction result of scenario one in this embodiment.
[0030] Figure 5 The figure is a schematic diagram of the reconstruction result of scenario 2 in this embodiment.
[0031] Figure 6 The diagram shows the node voltage distribution in the reconstruction result of scenario 2 in this embodiment.
[0032] Figure 7 The figure shows a schematic diagram of the reconstruction result of scenario three in this embodiment.
[0033] Figure 8 The diagram shows the node voltage distribution in the reconstruction result of scenario three in this embodiment. DETAILED DESCRIPTION
[0034] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.
[0035] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0036] Embodiment 1:
[0037] The ship power system refers to the system used to provide power and electrical energy for various electrical equipment on the ship, including generators, transformers, switchboards, cables, etc. In modern ships, the power system is a key component for the normal operation of the ship, not only providing electrical energy for living and lighting equipment, but also providing power for propulsion systems, navigation systems, etc. Figure 1 This is the topology of a ship power grid, where the power supply consists of photovoltaics, wind turbines, energy storage batteries and diesel engines. The loads of different colors represent different levels of importance. The solid line represents the section switch, and the dotted line represents the tie switch. Some important loads are powered by multiple distribution boards. When a fault occurs, they are switched through automatic switching switches to ensure the power supply of important loads.
[0038] Ship power loads are divided into three categories according to their importance. Category I loads refer to important loads that directly affect the vitality of the ship and the safety of the crew's lives, and the normal power supply of Category I loads should be guaranteed first. Category I loads include generator systems, weapon systems, steering gear systems, etc. Category II loads refer to loads that are more important for the normal navigation of the ship, which can be unloaded or transferred to other places for power supply in certain necessary situations. Category II loads include deck equipment, sea pumps, radars, etc. Category III loads refer to non-essential loads that do not affect the normal navigation of the ship and can be unloaded immediately. Category III loads include kitchen electricity, lighting and heating, living and entertainment facilities, etc. Figure 1Different colors are used to represent the three types of loads. According to the importance of the loads, the ship power grid will give priority to restoring power to the loads with high priority during reconstruction.
[0039] The reconstruction of ship power grid faults can be regarded as a multi-objective optimization problem under multiple constraints. The most important goal of ship power grid fault reconstruction is to ensure the maximum load power supply. At the same time, the ship power grid will run for a long time under the reconstructed topology, so it also includes the minimum network loss operation, and taking into account the reliability, the number of switch operations will also be considered, but all of them need to meet the grid constraints. Therefore, the fault reconstruction problem of ship power grid is a multi-objective optimization problem under constraints. The mathematical description of its objective function and constraints is as follows.
[0040] Objective function 1: Maximum load power supply max f1
[0041]
[0042] Where P g1x , P g2y , P g3z It represents the active load of the first, second and third types of loads in the power grid; k, m and n represent the number of these three types of loads respectively; s x 、s y 、s z They represent the power supply status of different loads, 1 represents power on, and 0 represents power off; ω1, ω2, and ω3 represent the weights of these three types of loads, and the priority of the loads is set to ω1>ω2>ω3;
[0043] Objective function 2: Minimize network loss min f2
[0044]
[0045] Where i ij represents the current flowing through branch ij; represents the resistance of branch ij; L represents the branch set.
[0046] Objective function 3: minimum number of switching times min f3
[0047]
[0048] Where SL l R Indicates the state of the lth switch after reconstruction; SL l P Indicates the status of the lth switch after failure and before failure reconstruction; l is the sequence number of the switch.
[0049] Overall goal:
[0050] max f=max f1-min f2-min f3 (4)
[0051] The constraints for ship power grid reconstruction include topology constraints, system capacity constraints, voltage balance constraints, voltage drop equation constraints, active and reactive power balance constraints, etc.
[0052] Topology constraints:
[0053]
[0054] Where Y ij Indicates the input status of line ij; X j Indicates whether bus j is put into use.
[0055] System capacity constraints:
[0056]
[0057] Where P i is the active power of the online node load, P c Represents the power output of different power generation modules, P ct Indicates the total power output by the power generation module.
[0058] Voltage balance constraints:
[0059] u min <u j <u max (7)
[0060] Where u min ,u max The upper and lower limits of the node safety voltage.
[0061] Active and reactive power balance constraints:
[0062]
[0063]
[0064] Where w(j) is the parent bus set of bus j; v(j) is the sub-bus set of bus j; P ij , Q ij is the active power and reactive power of line ij; P Lj , Q Lj is the active power and reactive power of line ij; x ij is the reactance of line ij; N L Represents a collection of power supply paths.
[0065] Voltage drop equation constraint:
[0066]
[0067] Apparent power equation constraints:
[0068]
[0069] Where u i ,u j The voltage at node i and the voltage at distribution board j are respectively.
[0070] Reinforcement learning (RL) is trial-and-error learning, which can be seen as a process of trial and evaluation. In reinforcement learning, the agent learns through interaction with the environment to maximize the cumulative reward. The process usually includes the following key elements: action, state, reward, and strategy.
[0071] Action: At each time step, the agent chooses an action to affect the environment.
[0072] State: The state of the environment reflects the interaction between the agent and the environment. The agent's decision is usually based on the current state.
[0073] Reward: At each time step, the environment will feedback a reward, which represents the agent's evaluation of its behavior. The goal is to maximize the cumulative reward by choosing actions.
[0074] Policy: A policy defines the mapping from states to actions and guides the agent on how to make decisions.
[0075] The mathematical description of reinforcement learning problems can be expressed by Markov decision process (MDP), which is a decision model based on Markov process (MP). MP can be expressed by formula (12). MDP consists of state set S, behavior set A, state transition probability matrix P, compensation function R, and discount factor γ, as shown in formula (13).
[0076] P(S t |S1,S2,…,S t-1 )=P(S t |S t-1 ) (12)
[0077] MDP=(S,A,P,R,γ) (13)
[0078] Given any state s∈S and action a∈A in MDP, it will transfer to the next state s′ according to a certain probability (state transition probability) and obtain the expected value R of the next reward. The state transition probability formula is shown in formula (14). The expected value of reward r is the expected value of compensation obtained by the compensation function when executing action a in state s, as shown in formula (15). The discount factor is a value between 0 and 1, which is used to determine the degree of reflection of past behavior. The purpose is to discount future rewards when calculating expected returns, so that the agent pays more attention to immediate rewards and recent rewards.
[0079] P(s′|s,a)=P(S t+1 =s′|S t =s,A t =a) (14)
[0080] R(s,a,s′)=E[R t+1 |S t =s,A t =a,S t+1 =s′] (15)
[0081] In RL problems, a value function is defined to represent a given policy π θ The expected return under (a|s) and the value function is used as an indicator to evaluate the learning effect. Strategy π θ There are many kinds of (a|s). The goal of reinforcement learning is to learn the optimal strategy π θ (a|s) to enable the agent to obtain the maximum cumulative reward in the interaction with the environment. The objective function J(θ) of reinforcement learning is defined as follows:
[0082]
[0083] Wherein the trajectory τ represents the interaction process between the agent and the environment, and G(τ) represents the total report of this trajectory.
[0084] The value function consists of two parts: the state value function and the state-action value function. π (s) represents the expected total reward from executing the strategy starting from state s, which is used to measure the long-term value of following a strategy in a specific state and help the agent evaluate the quality of the current state, as shown in formula (17). State-action value function (Q-value function) Q π (s, a) represents the expected total reward of executing action a and executing the strategy in state s. It is used to measure the long-term value of taking an action in a specific state and help the agent make the best action selection, as shown in formula (18).
[0085]
[0086]
[0087] The learning process of Q-Learning is that the agent updates the Q value by exploring the environment (taking actions, observing the resulting state and rewards). The Q value update formula is as follows:
[0088] Q(s,a)←Q(s,a)+lr[r+γmax a′ Q(s′,a′)-Q(s,a)] (19)
[0089] Where Q(s,a) is the Q value of taking action a in the current state s. lr is the learning rate, which determines how fast new information overwrites old information. r is the reward obtained immediately after taking action a. max a′ Q(s′,a′) is the maximum Q value of all possible actions for the next state s′.
[0090] Deep Q Network (DQN) is an algorithm that combines deep learning (DL) and Q-Learning. DQN uses a deep neural network to approximate the Q-value function, while introducing an experience replay mechanism to store the agent's past experience. In order to further improve the stability of learning, DQN uses two networks: an online network to select actions and update Q values, and a target network to calculate the Q target value.
[0091] The difference between the Dueling DQN and DQN is that the network structure is changed. DQN directly outputs the Q value, but Dueling DQN does not directly output the Q value. Instead, it divides the operation into two paths, one for estimating the state value V(s) and the other for estimating the advantage function A(s,a) of each action. Then add V(s) and A(s,a) together to get the Q value.
[0092] In Dueling DQN, the Q network is modeled as:
[0093] Q η,α,β (s,a)=V η,α (s)+A η,β (s,a) (20) where η is the network parameter shared by the state value function and the advantage function, α is the parameter of the state value function, and β is the parameter of the advantage function. In this case, the neural network does not directly calculate the Q value, but the last few layers of the neural network output V(s) and A(s,a) respectively, and then sum them to get the Q value.
[0094] For formula (20), there is a problem that the V and A values are not unique, because when the V value is added with an arbitrary constant B and then the A value is subtracted from the arbitrary constant B, the Q value remains unchanged, which will lead to instability in training. In order to ensure the stability of training, a constraint term is introduced in this embodiment, as shown in the following formula.
[0095]
[0096] Here, |A| represents the number of actions that can be selected.
[0097] Dueling DQN can more effectively learn states that are similar in value to taking a specific action. This can usually lead to faster learning speed and higher performance in practical applications, and improve the evaluation quality of the strategy. Therefore, the Dueling DQN model is used in this embodiment to realize the generation of the reconstruction strategy.
[0098] The ship power grid as the environment provides the agent with the state space S of the ship power grid at every moment. The agent makes decisions based on the strategy to form a switching action A applied to the environment. The environment changes state according to the switching action and feeds back the instant reward R to the agent until the agent finds the optimal strategy.
[0099] State space: Node voltage and branch current are the key to reflecting voltage quality and line load capacity. Ship power grid topology, power output, and fault line are the key to fault reconstruction. Therefore, these variables are selected to construct the state space S.
[0100] S=[V,I,S w ,P c ,F] (22) where V, I, S w , P c , F represent the node voltage, branch current, switch status, total output power of the power supply and fault line respectively.
[0101] Action space: The actions of different line circuit breakers considered in the ship power grid reconstruction process. The switch state has only two states: closed and open. This action space is represented by A S To express it, as shown in the following formula.
[0102] A S =[S1,S2,…,S n ] (23) Where A S =[S1,S2,…,S n] represents the switch state of different branch circuit breakers, which is a 0 / 1 variable, 0 means disconnected, and 1 means closed. In this embodiment, all switches are closed by default before reconstruction, including the tie switch, and then reconstruction is performed in this state. When fault reconstruction is performed in this state, the number of action switches will generally not exceed three to complete the reconstruction process (this number of switch actions is not the number of switch actions, because it may include the tie switch action number, or it may not include it). Therefore, in this embodiment, two or three switch actions are selected for each reconstruction. The advantage of doing this is that it can greatly reduce the action space and speed up the training process.
[0103] Reward function: The setting of the reward function should fully consider the reconstructed goals and constraints. The environment will change according to the actions recommended by the agent and feedback the reward value to the agent. If the action taken by the agent can meet the goal and is within the constraints, it will be given a positive reward, otherwise it will be given a negative reward (penalty). The reward function is set as follows.
[0104] Maximum load power supply:
[0105] r1=20∑P g1x +7∑P g2y +∑P g3z (twenty four)
[0106] Where P g1x , P g2y , P g3z They represent three types of online loads respectively, and the weighted sum of the three types of online loads is the reward value r1.
[0107] Minimum network loss operation:
[0108] r2=(-1)×∑i ij 2 r ij (25)
[0109] Where ∑i ij 2 r ij It represents the sum of all line losses. r2 is used as a negative reward.
[0110] Minimum switching times:
[0111]
[0112] Where SL l R Indicates the state of the lth switch after reconstruction; SL l P represents the state of the lth switch before and after fault reconstruction, K1 is a negative constant, and r3 is a negative reward.
[0113] Voltage over-limit penalty:
[0114]
[0115] In the formula, K2 is a negative constant, r4 represents the node voltage balance constraint, and the change of the node voltage cannot be greater than 1.06 times the reference voltage nor less than 0.9 times the reference voltage to maintain the stability of the power quality.
[0116] r5=K3C (28)
[0117] In the formula, K3 is a negative constant, and r5 indicates whether the power flow calculation is successful, that is, whether the basic constraints are met, such as active power and reactive power balance constraints, transmission capacity constraints, etc. If the power flow calculation is successful, C = 0, otherwise C = 1.
[0118] The overall reward function is described as follows. Under the premise that the power flow calculation is successfully solved, the reward function is the sum of the four components. If r = r5, it means that the power flow solution is unsuccessful, and a penalty is given directly.
[0119]
[0120] Based on Dueling DQN algorithm model Figure 2 The specific steps are as follows:
[0121] Step 1: Construct a ship power grid model and a ship power grid fault reconstruction model based on deep reinforcement learning respectively, and define the state space, action space and reward function.
[0122] Step 2: Build Dueling DQN network (grid fault reconstruction agent), including evaluation Q network and target Q network. The Q network includes a shared feature extraction layer and two independent paths, one for estimating state value and the other for calculating the advantage value of each action. And initialize the network parameters.
[0123] Step 3: Obtain the initial state s0 of the ship power grid, including switch status, power output and fault line, etc.
[0124] Step 4: The agent outputs the Q values of different actions based on the current state and strategy, and selects the action with the highest reward value according to the greedy strategy.
[0125] Step 5: The environment changes according to the agent’s actions and returns a new state s1 and reward r, which are stored in the experience replay pool.
[0126] Step 6: Draw a batch of samples from the experience replay pool, use the mean square error (MSE) to calculate the loss function, and use the loss function to perform gradient descent updates on the parameters of the evaluation Q network. The calculation of the loss function is shown in the following formula.
[0127]
[0128] Step 7: After a certain number of training steps (replace), copy the parameters of the evaluation Q network to the target Q network and update the parameters of the target network.
[0129] Step 8: Evaluate the learning progress of the agent by monitoring the reward value, and adjust the hyperparameterized learning process such as exploration rate ε, discount factor, and learning rate according to the learning progress.
[0130] Step 9: Determine whether the training termination condition is met. If so, save the trained model. If not, return to step 3.
[0131] Step 10: Use the test set to verify the performance of the agent to ensure that it can make correct grid fault reconstruction decisions.
[0132] In each training round of fault reconstruction, the agent recommends the best action based on the current state, then calculates the power flow based on the current state of the power grid, calculates the reward value and feeds it back to the agent, and updates the power grid state. After that, the executed action, the reward obtained, and the new state are stored as an experience in the experience replay pool. During the training process, a batch of experiences are randomly extracted from the experience replay pool to train the network. Through repeated iterations, the preset termination condition is reached.
[0133] Experimental verification and result analysis
[0134] In order to verify the feasibility of the model, the deep learning Tensorflow framework and PyTorch framework are used for experimental verification in this embodiment. Figure 1 The ship power grid shown in Figure 1. The fault reconstruction network model built using Python language includes three hidden layers, the number of neurons is 128-256-128, and the activation function is leakyrelu. The input of the network model is the switch status of different line breakers, the fault line and the output power of each power supply. The output of the intelligent agent is the action switch combination, that is, the line number that needs to be disconnected. The hyperparameter settings of the network model are shown in Table 1.
[0135] Table 1
[0136]
[0137] In order to test the performance of the power grid fault reconstruction agent under multiple line faults, this embodiment selects the following three scenarios for testing. The descriptions of these three scenarios are as follows:
[0138] Scenario 1: The fault occurs on line [8, 13, 16, 26].
[0139] Scenario 2: The fault occurs on lines [9, 12, 16, 19, 23, 31], and voltage exceeding the limit is not considered.
[0140] Scenario 3: Based on Scenario 2, the grid voltage is further restricted to no less than 0.9pu.
[0141] The reconstruction result of scenario 1 is as follows Figure 3 As shown in the figure, the fault line is represented by a red five-pointed star. From the figure, it can be seen that some of the tie switches are turned off from the open state, and the tie switches 36 and 38 remain open. At this time, all loads are in the power supply state, the number of power-off loads is 0, and the number of switch operations is 4, completing the reconstruction target. The node voltage distribution of the scenario is as follows Figure 4 As shown, it can be seen that the node voltage is stable within a safe level.
[0142] The fault reconstruction result of scenario 2 is as follows: Figure 5 As shown in the figure, it can be seen that the contact switches 33-37 are turned from the open state to the closed state, and the contact switch 38 remains open. The power-off load is the three-type load numbered 32. The power-off reason is that the only line it is connected to fails. The three-type load is not important and therefore has no backup line, so the power outage occurs. No other loads have lost power. The number of switch actions is 5, and the reconstruction task is completed. The node voltage distribution in scenario 2 is as follows Figure 6 As shown in the figure, it can be seen that there are nodes with voltages lower than the minimum standard voltage, and the system voltage is unstable.
[0143] The fault reconstruction result of scenario 3 is as follows: Figure 7 As shown in the figure, it can be seen that the contact switches 33-37 are turned off from the open state, and the contact switch 38 remains open. At this time, there are four power-off loads. Compared with scenario 2, loads 20, 21, and 22 are cut off by the reconstruction model because there are nodes with node voltages lower than the minimum standard voltage in scenario 2. Therefore, in order to maintain the stability of the system voltage, under the premise of the reconstruction target, loads 20, 21, and 22, which belong to the three types of non-essential loads, are cut off. The node voltage distribution in scenario 3 is as follows Figure 8 As shown, it can be seen that the node voltages are within the limit and the system voltage is stable.
[0144] The reconstruction results under the three scenarios are summarized in Table 2:
[0145] Table 2
[0146]
[0147] Embodiment 2:
[0148] The present invention also provides a ship power grid fault reconstruction terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned method embodiment of embodiment 1 of the present invention when executing the computer program.
[0149] Further, as an executable solution, the ship power grid fault reconstruction terminal device can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The ship power grid fault reconstruction terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the composition structure of the above-mentioned ship power grid fault reconstruction terminal device is only an example of the ship power grid fault reconstruction terminal device, and does not constitute a limitation on the ship power grid fault reconstruction terminal device. It may include more or less components than the above, or combine certain components, or different components. For example, the ship power grid fault reconstruction terminal device may also include input and output devices, network access devices, buses, etc., and the embodiments of the present invention do not limit this.
[0150] Further, as an executable solution, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the ship power grid fault reconstruction terminal device, and uses various interfaces and lines to connect various parts of the entire ship power grid fault reconstruction terminal device.
[0151] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the ship power grid fault reconstruction terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and an application required for at least one function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0152] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.
[0153] If the module / unit integrated in the ship power grid fault reconstruction terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc.
[0154] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A method for reconfiguring a ship power grid fault, characterized in that: The following steps are involved: Construct ship power grid model; A ship power grid fault reconstruction model based on deep reinforcement learning is constructed, and the state space, action space and reward function are defined; the state space includes: node voltage, branch current, switch state, total output power of the power supply and fault line; the action space includes the switch state of each line; the reward function is related to whether the power flow calculation is successful. When the power flow calculation is successful, the reward function consists of maximum load power supply, minimum network loss operation, minimum number of switches and voltage limit penalty; After the model is trained based on the fault data of the ship's power system, the trained model is used to reconstruct the ship's power system after a grid failure occurs.
2. The method for reconfiguring a ship power grid fault according to claim 1, characterized in that: The loss function used during model training is mean square error.
3. The method for reconfiguring a ship power grid fault according to claim 1, characterized in that: In the fault reconstruction model based on deep reinforcement learning, the Dueling DQN model is used to realize the generation of fault reconstruction strategy.
4. The method for reconfiguring a ship power grid fault according to claim 1, characterized in that: The reward function is expressed as: r1=λ1ΣP g1x +λ2∑P g2y +λ3∑P g3z r2=(-1)×∑i ij 2 r ij r5=K3C Among them, r represents the total reward function; r1 represents the maximum load power supply; r2 represents the minimum network loss operation; r3 represents the minimum number of switches; r4 represents the voltage limit penalty; r5 represents whether the power flow calculation is successful; C represents whether the power flow calculation is successful. When the power flow calculation is successful, C = 0, otherwise C = 1; K1, K2, and K3 are all negative constants; P g1x represents the active load of the xth class-one load; P g2y represents the active load of the yth second-class load; P g3z represents the active load of the zth three-category load; λ1, λ2, λ3 represent the weights of the first-category load, the second-category load, and the third-category load, respectively; i ij represents the current flowing through branch ij; r ij represents the resistance of branch ij; L represents the branch set; i and j represent the nodes at both ends of the branch; SL l R Indicates the state of the lth switch after reconstruction; SL l P Indicates the status of the lth switch after failure and before failure reconstruction; l is the sequence number of the switch; u min and u max They represent the lower and upper limits of the node safety voltage respectively; u j Represents the node voltage.
5. The method for reconfiguring a ship power grid fault according to claim 4, characterized in that: λ1=20, λ2=7, λ3=1.
6. The ship power grid fault reconstruction method according to claim 4, characterized in that: u min =0.9u,u max =1.06u, u represents the reference voltage.
7. The method for reconfiguring a ship power grid fault according to claim 1, characterized in that: Select two or three switch actions when refactoring.
8. A ship power grid fault reconstruction terminal device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Post-disaster power distribution network dynamic first-aid repair method and system
CN113627733A
Novel ship regional power grid fault reconstruction and visualization method
CN115275953A
Systems and Method on Deriving Real-time Coordinated Voltage Control Strategies Using Deep Reinforcement Learning
US20200327411A1
Cited By
Multi-mode operation demand-oriented electric propulsion ship power dispatching optimization method
CN120601551A
