A ship power grid fault reconstruction method, a terminal device and a medium
By employing a fault reconstruction method based on deep reinforcement learning and utilizing the Dueling DQN model to optimize the fault reconstruction of the ship's power grid, the problem of rapid recovery of the ship's power system to stable operation under fault conditions is solved, achieving high-efficiency load power supply reliability and minimal switching operations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2026-03-03
AI Technical Summary
Existing technologies struggle to quickly and effectively restore ships to a stable and reliable operating state in the event of power system failures. They suffer from high computational complexity and are prone to getting trapped in local optima. Furthermore, heuristic methods rely on empirical rules for performance and cannot adapt to different power grid structures.
A fault reconstruction method based on deep reinforcement learning is adopted. The state space, action space and reward function are constructed using the Dueling DQN model. Fault reconstruction is achieved by training the model. The objective functions include maximum load power supply, minimum network loss operation and minimum number of switching operations. Deep neural networks are used for fast decision-making.
The optimal operating topology achieves the fewest switching operations under multi-energy system failures, ensuring power supply reliability for loads of different priorities, with fewer switching operations and faster convergence speed.
Smart Images

Figure CN118611040B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power systems, and more particularly to a method for reconfiguring ship power grid faults, terminal equipment, and medium. Background Technology
[0002] One challenge facing multi-energy-powered ship electrical systems is ensuring the ship's survivability in the event of a fault. Compared to land-based electrical systems, ship electrical systems lack a robust power grid, resembling isolated microgrids, making them more vulnerable. If a ship's microgrid fails, the resulting changes in its local state can rapidly feed back into the entire ship's electrical system, potentially triggering a cascading failure and severely threatening its safety. This would significantly reduce the ship's navigation capability and reliability. Therefore, to improve the reliability and survivability of ship electrical systems, it is essential that the system reacts quickly to faults, restoring it from a faulty state to a stable and reliable operating state, achieving self-recovery. One crucial means of achieving this is fault reconfiguration technology, which involves altering the power system's topology through tie switches or sectionalizing switches when a fault occurs, maintaining the reliability of power supply to different loads. Therefore, fault reconfiguration methods have become a vital task in modern ship automation research.
[0003] Shipboard power system fault reconfiguration is a multi-objective non-convex optimization problem. The objective functions include maximizing the amount of power outage load restored, minimizing network losses, and minimizing the number of switching operations. Extensive research has been conducted both domestically and internationally, and the solution methods can be broadly categorized into three types: mathematical optimization methods, heuristic methods, and reinforcement learning methods. However, mathematical optimization methods typically require solving complex mathematical models, leading to high computational complexity, especially for large-scale power grid systems, where computation time can be very long and the system is prone to getting trapped in local optima. Heuristic methods are usually based on empirical rules or simple search strategies, which may not find the optimal solution but only a good approximation. Furthermore, the performance of heuristic methods is highly dependent on the design and parameter settings of the heuristic rules, and may not be adaptable to different types of power grid structures. Summary of the Invention
[0004] To address the aforementioned issues, this invention proposes a shipboard power grid fault reconfiguration method, terminal equipment, and medium.
[0005] The specific plan is as follows:
[0006] A method for reconfiguring a ship's electrical grid fault includes the following steps:
[0007] Construct a shipboard electrical grid model;
[0008] A ship power grid fault reconfiguration 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 power output and faulty line. The action space includes the switch state of each line. The reward function is related to the success of power flow calculation. When the power flow calculation is successful, the reward function consists of maximum load supply, minimum network loss operation, minimum number of switches and voltage over-limit penalty.
[0009] After training the model based on fault data of the ship's power system, the model is used to reconstruct the ship's power system after a power grid fault occurs.
[0010] Furthermore, the loss function used during model training is the mean squared error.
[0011] Furthermore, in the fault reconstruction model based on deep reinforcement learning, the Dueling DQN model is used to generate fault reconstruction strategies.
[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] Where 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 switching operations; r4 represents the voltage over-limit penalty; r5 represents whether the power flow calculation was successful; C represents the success indicator of the power flow calculation, C=0 when the power flow calculation is successful, and C=1 otherwise; K1, K2, and K3 are all negative constants; P g1x P represents the active load of the xth type I load; g2y P represents the active load of the y-th Class II load; g3z Let represent the active load of the z-th type 3 load; λ1, λ2, and λ3 represent the weights of type 1, type 2, and type 3 loads, respectively; i ij This represents the current flowing through branch ij; rij L 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 l-th switch after reconstruction; SL l P This indicates the state of the l-th switch before the fault and before fault reconfiguration; l represents the switch number; u min and u max These represent the lower and upper limits of the node's safe voltage, respectively; u j This represents the node voltage.
[0020] Furthermore, λ1 = 20, λ2 = 7, and λ3 = 1.
[0021] Furthermore, u min =0.9u,u max =1.06u, where u represents the reference voltage.
[0022] Furthermore, during reconstruction, two or three switch actions can be selected.
[0023] A shipboard power grid fault reconfiguration terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method described in the embodiments of the present invention.
[0024] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described above in the embodiments of the present invention.
[0025] The present invention adopts the above technical solution, which can achieve the optimal operating topology with the fewest number of switching operations under multi-energy system faults and multi-line faults, 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 operations and faster convergence speed. Attached Figure Description
[0026] Figure 1 The diagram shown is a schematic diagram of the topology of the ship's power grid in Embodiment 1 of the present invention.
[0027] Figure 2 The diagram shown is a schematic of the algorithm model based on Dueling DQN in this embodiment.
[0028] Figure 3 The diagram shown is a schematic representation of the reconstruction result of scenario one in this embodiment.
[0029] Figure 4 The diagram shown is a node voltage distribution map in the reconstruction result of scenario one in this embodiment.
[0030] Figure 5 The diagram shown is a schematic representation of the reconstruction result of scenario two in this embodiment.
[0031] Figure 6 The diagram shown is a node voltage distribution map in the reconstruction result of scenario two in this embodiment.
[0032] Figure 7 The diagram shown is a schematic representation of the reconstruction result of scenario three in this embodiment.
[0033] Figure 8 The diagram shown is a node voltage distribution map in the reconstruction result of scenario three in this embodiment. Detailed Implementation
[0034] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, primarily 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 drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention.
[0035] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0036] Example 1:
[0037] A ship's electrical system refers to the system that provides power and electrical energy to various electrical equipment on board a ship, including generators, transformers, switchboards, and cables. In modern ships, the electrical system is a key component for normal operation, providing power not only for living and lighting equipment but also for propulsion and navigation systems. Figure 1 This is the topology of a ship's power grid. The power supply consists of photovoltaics, wind turbines, energy storage batteries, and diesel engines. Different colored loads represent different levels of importance. Solid lines represent sectionalizing switches, and dashed lines represent tie switches. Some critical loads are powered by multiple distribution boards. In the event of a fault, automatic transfer switches are used to switch over to ensure power supply to critical loads.
[0038] Ship electrical loads are classified into three categories based on their importance. Category I loads are critical loads that directly affect the ship's survivability and the safety of the crew; their normal power supply should be guaranteed first. Category I loads include generator systems, weapon systems, and steering gear systems. Category II loads are loads that are relatively important for the ship's normal navigation and can be unloaded or transferred to other locations when necessary. Category II loads include deck machinery, sea pumps, and radar. Category III loads are non-essential loads that do not affect the ship's normal navigation and can be unloaded immediately. Category III loads include kitchen power, lighting and heating, and living and recreational facilities. Figure 1The system uses different colors to represent three types of loads. Based on the importance of the loads, the ship's power grid will prioritize restoring power to the highest priority loads during reconfiguration.
[0039] Shipboard power grid fault reconfiguration can be viewed as a multi-objective optimization problem under multiple constraints. The most important objective of shipboard power grid fault reconfiguration is to ensure maximum load power supply. Since the shipboard power grid will operate for a considerable period under the reconfigured topology, minimum network loss operation is also required. Furthermore, reliability is considered, as is the number of switching operations, all while satisfying the power grid constraints. Therefore, the shipboard power grid fault reconfiguration problem is a multi-objective optimization problem under constraints. Its objective function and constraints are mathematically described below.
[0040] Objective function 1: Maximum load power supply (max f1)
[0041]
[0042] In the formula P g1x P g2y P g3z This represents the active load of Class I, Class II, and Class III loads in the power grid; k, m, and n represent the quantity of these three types of loads, respectively; s x s y s z These represent the power supply status of different loads, with 1 indicating power on and 0 indicating power off; ω1, ω2, and ω3 represent the weights of these three types of loads, with the load priority set as ω1 > ω2 > ω3.
[0043] Objective function 2: Minimize network loss min f2
[0044]
[0045] In the formula 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 operations (min f3)
[0047]
[0048] In the formula SL l R Indicates the state of the l-th switch after reconstruction; SL l P This indicates the state of the l-th switch before it is faulty and before fault reconstruction; l represents the switch number.
[0049] Overall goal:
[0050] max f=max f1-min f2-min f3 (4)
[0051] The constraints for shipboard power grid reconfiguration include topological constraints, system capacity constraints, voltage balance constraints, voltage drop equation constraints, and active and reactive power balance constraints.
[0052] Topological constraints:
[0053]
[0054] In the formula Y ij This indicates the operational status of line ij; X j This indicates whether bus j is in use.
[0055] System capacity constraints:
[0056]
[0057] In the formula P i P represents the active power of the online node load. c P represents the output power of different power generation modules. ct This indicates the total output power of the power generation module.
[0058] Voltage balance constraint:
[0059] u min <u j <u max (7)
[0060] In the formula u min u max These are the upper and lower limits of the node's safe voltage.
[0061] Active and reactive power balance constraints:
[0062]
[0063]
[0064] In the formula, w(j) is the set of parent lines of bus j; v(j) is the set of child lines of bus j; P ij Q ij These are the active and reactive power of line ij; P Lj Q Lj These are the active and reactive power of line ij; x ij N is the reactance of line ij; L This represents the set of power supply paths.
[0065] Voltage drop equation constraint:
[0066]
[0067] Apparent power equality constraint:
[0068]
[0069] In the formula u i u j The voltages at point i and distribution board j are respectively given.
[0070] Reinforcement learning (RL) is a trial-and-error learning process that can be viewed as a process of trying and evaluating. In reinforcement learning, an agent learns by interacting with its environment to maximize cumulative rewards. This process typically includes the following key elements: action, state, reward, and policy.
[0071] Action: At each time step, the agent selects an action to influence the environment.
[0072] State: The state of the environment reflects the interaction between the agent and the environment. The agent's decisions are usually based on the current state.
[0073] Reward: At each time step, the environment provides a reward, representing the agent's evaluation of its behavior. The goal is to maximize the accumulated reward by selecting actions.
[0074] Policy: A policy defines the mapping from states to actions, guiding how an agent makes decisions.
[0075] The mathematical description of reinforcement learning problems can be represented by Markov Decision Process (MDP), which is a decision model based on Markov Process (MP). MP can be represented by Equation (12). MDP consists of a state set S, a behavior set A, a state transition probability matrix P, a compensation function R, and a discount factor γ, as shown in Equation (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] In MDP, given any state s∈S and action a∈A, the agent will transition to the next state s′ according to a certain probability (state transition probability) and obtain the expected value R of the next reward. The formula for the state transition probability is shown in Equation (14). The expected reward r is the compensation expected value obtained by the compensation function when performing action a in state s, as shown in Equation (15). The discount factor is a value between 0 and 1, used to determine the degree of reflection on past behavior. Its purpose is to discount future rewards when calculating expected rewards, making the agent pay more attention to immediate 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) is used, and the value function is used as an indicator to evaluate the learning effect. Policy π θ There are many types of (a|s), and the goal of reinforcement learning is to learn the optimal policy π. θ To maximize the cumulative reward of the agent through interaction with the environment, the objective function J(θ) of reinforcement learning is defined as follows:
[0082]
[0083] In the formula, 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. The state-value function V... π (s) represents the expected total reward obtained by executing the policy starting from state s. It measures the long-term value of following a certain policy in a specific state and helps the agent evaluate the quality of the current state, as shown in equation (17). State-action value function (Q-value function) Q π (s,a) represents the expected total reward obtained by performing action a and executing the policy in state s. It is used to measure the long-term value of taking an action in a specific state and to help the agent make the optimal action choice, as shown in equation (18).
[0085]
[0086]
[0087] Q-Learning is a learning process in which an agent updates its Q-value by exploring the environment (taking actions, observing the resulting state, and receiving rewards). The formula for updating the Q-value is as follows:
[0088] Q(s,a)←Q(s,a)+lr[r+γmax a′ Q(s′,a′)-Q(s,a)] (19)
[0089] In the formula, Q(s,a) is the Q-value of taking action a in the current state s. lr is the learning rate, which determines how quickly 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 in the next state s′.
[0090] Deep Q-Network (DQN) is an algorithm that combines deep learning (DL) and Q-learning. DQN uses deep neural networks to approximate the Q-value function, while introducing an experience replay mechanism to store the agent's past experience. 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 compute the Q-target value.
[0091] The Dueling Deep Q-Network (DQN) differs from DQN in that it alters the network structure. While DQN directly outputs the Q-value, Dueling DQN does not. Instead, it splits the computation into two paths: one for estimating the state value V(s), and the other for estimating the advantage function A(s,a) for each action. The Q-value is then obtained by summing V(s) and A(s,a).
[0092] In Dueling DQN, the Q-network is modeled as follows:
[0093] Q η,α,β (s,a)=V η,α (s)+A η,β In equation (20), η 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 instead obtains the Q value by summing the outputs of V(s) and A(s,a) from the last few layers of the neural network.
[0094] Equation (20) suffers from the problem that the values of V and A are not unique in the modeling process. This is because when an arbitrary constant B is added to the value of V and then the arbitrary constant B is subtracted from the value of A, the value of Q remains unchanged, which can lead to training instability. To ensure the stability of training, this embodiment introduces a constraint term, as shown in the following equation.
[0095]
[0096] In the formula, |A| represents the number of actions that can be selected.
[0097] Dueling DQN can more effectively learn states with similar value for taking a specific action. In practical applications, this typically leads to faster learning speeds, higher performance, and improved policy evaluation quality. Therefore, this embodiment uses the Dueling DQN model to generate the reconstructed policy.
[0098] The ship's electrical network, as the environment, provides the agent with the state space S of the ship's electrical network at every moment. The agent makes a decision based on the policy and forms a switching action A, which is applied to the environment. The environment undergoes a state transition based on the switching action and feeds back an immediate reward R to the agent until the agent finds the optimal policy.
[0099] State space: Node voltage and branch current are key to reflecting voltage quality and line load capacity. Ship power grid topology, power output, and faulty lines are key to fault reconfiguration. Therefore, these variables are selected to construct the state space S.
[0100] S = [V, I, S] w ,P c In formula (22), V, I, and S are... w P c F represents node voltage, branch current, switch status, total output power of the power supply, and faulty line, respectively.
[0101] Action space: The action space of different circuit breaker switches considered during the ship's power grid reconfiguration process. The switch has only two states: closed and open. This action space is represented by A. S Let be represented as shown in the following formula.
[0102] A S =[S1,S2,…,S n In formula (23), A S =[S1,S2,…,S nThe symbol ] represents the switching state of different branch circuit breakers and is a 0 / 1 variable, where 0 indicates open and 1 indicates closed. In this embodiment, all switches, including tie switches, are closed by default before refactoring, and refactoring is performed in this state. When performing fault refactoring in this state, the number of activated switches usually does not exceed three to complete the refactoring process (this number of switch actions is not the total number of switch actions, as it may or may not include tie switch actions). Therefore, in this embodiment, two or three switch actions are selected for each refactoring. The advantage of this is that it significantly reduces the action space and accelerates the training process.
[0103] Reward Function: The reward function should be set to fully consider the reconstruction goal and constraints. The environment will change based on the agent's recommended actions and provide a reward value to the agent. If the agent's action satisfies both the goal and the constraints, a positive reward is given; otherwise, a negative reward (penalty) is given. 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] In the formula P g1x P g2y P g3z These represent three types of online loads. The weighted sum of these 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] In the formula ∑i ij 2 r ij This represents the sum of all line losses. r2 is used as a negative bonus.
[0110] Minimum number of switches:
[0111]
[0112] In the formula SL l R Indicates the state of the l-th switch after reconstruction; SL l P This represents the state of the l-th switch before and after fault reconstruction, where K1 is a negative constant. r3 serves as the negative reward.
[0113] Voltage over-limit penalty:
[0114]
[0115] In the formula, K2 is a negative constant, and r4 represents the node voltage balance constraint. The change in node voltage cannot be greater than 1.06 times the reference voltage or less than 0.9 times the reference voltage in order to maintain the stability of power quality.
[0116] r5=K3C (28)
[0117] In the formula, K3 is a negative constant, and r5 represents whether the power flow calculation was successful, that is, whether the basic constraints are met, such as active and reactive power balance constraints, transmission capacity constraints, etc. If the power flow calculation is successful, then C = 0; otherwise, C = 1.
[0118] The overall reward function is described below. Assuming the power flow calculation is successful, the reward function is the sum of the four components. If r = r5, it indicates that the power flow calculation was unsuccessful, and a penalty is applied directly.
[0119]
[0120] Based on the Dueling DQN algorithm model, such as Figure 2 As shown, 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, and define the state space, action space and reward function.
[0122] Step 2: Construct the Dueling DQN network (Power Grid Fault Reconfiguration Agent), including an evaluation Q-network and a target Q-network. The Q-network includes a shared feature extraction layer and two independent paths: one for estimating state values and the other for calculating the advantage value for each action. Initialize the network parameters.
[0123] Step 3: Obtain the initial state s0 of the ship's electrical network, including switch status, power output, and faulty lines.
[0124] Step 4: The agent outputs the Q-values of different actions based on the current state and policy, and selects the action with the highest reward value according to the greedy policy.
[0125] Step 5: The environment changes according to the agent's actions and returns a new state s1 and reward r, which are then stored in the experience replay pool.
[0126] Step 6: Draw a batch of samples from the experience replay pool, calculate the loss function using the mean-squared error (MSE), and use the loss function to update the parameters of the evaluation Q-network using gradient descent. 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 agent's learning progress by monitoring the reward value, and adjust the hyperparameterized learning process such as the exploration rate ε, discount factor, and learning rate according to the learning progress.
[0130] Step 9: Determine if the training termination condition has been met. If the condition is met, save the trained model. If not, return to Step 3.
[0131] Step 10: Use a test set to verify the agent's performance and ensure that it can make the correct grid fault reconfiguration decisions.
[0132] In each training round of fault reconstruction, the agent recommends the optimal action based on the current state, then performs power flow calculation based on the current state of the power grid, calculates the reward value and feeds it back to the agent, while simultaneously updating the power grid state. Afterward, the executed action, the obtained reward, and the new state are stored as an experience in the experience replay pool. Furthermore, during training, a batch of experiences is randomly drawn from the experience replay pool for network training. This process is repeated iteratively until a preset termination condition is reached.
[0133] Experimental verification and result analysis
[0134] To verify the feasibility of this model, this embodiment uses the deep learning frameworks TensorFlow and PyTorch for experimental verification. The pandapower toolkit is used to build... Figure 1 The ship's electrical network is shown. The fault reconstruction network model built using Python includes three hidden layers with 128-256-128 neurons and the LeakyReLU activation function. The network model's inputs are the switching states of different circuit breakers, the faulty line, and the output power of each power source. The agent's output is the action switch combination, i.e., 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] To test the performance of the power grid fault reconfiguration agent under multi-line fault conditions, this embodiment selects the following three scenarios for testing, which are described below:
[0138] Scenario 1: The fault occurs on line [8, 13, 16, 26].
[0139] Scenario 2: The fault occurs on line [9, 12, 16, 19, 23, 31], without considering voltage over-limit.
[0140] Scenario 3: Based on Scenario 2, further restrict the grid voltage to no less than 0.9 pu.
[0141] The reconstruction result of Scenario 1 is as follows Figure 3 As shown, the faulty line is represented by a red pentagram. The diagram shows that some tie switches changed from the open state to the closed state, while tie switches 36 and 38 remained open. At this time, all loads were powered, the number of power-out loads was 0, and the number of switch actions was 4, achieving the reconfiguration goal. The node voltage distribution in the following scenario is as follows: Figure 4 As shown, the node voltage remains stable within a safe level.
[0142] The fault reconstruction result of Scenario 2 is as follows Figure 5 As shown in the diagram, tie switches 33-37 changed from the open state to the closed state, while tie switch 38 remained open. The load that lost power was load number 32, a Class III load. The cause of the power loss was a fault in the only line connected to it. Since Class III loads are considered unimportant, they do not have backup lines, hence the power loss. No other loads experienced power loss. The number of switch actions was 5, completing the reconfiguration task. The node voltage distribution in Scenario 2 is as follows. Figure 6 As shown in the figure, there are nodes with voltages below the minimum standard voltage, indicating that the system voltage is unstable.
[0143] The fault reconstruction results of Scenario 3 are as follows: Figure 7 As shown in the diagram, tie switches 33-37 change from the open state to the closed state, while tie switch 38 remains open. At this time, there are four power-loss loads. Compared to Scenario 2, loads 20, 21, and 22 are disconnected by the reconfiguration model because in Scenario 2, there are nodes with voltages below the minimum standard voltage. Therefore, to maintain system voltage stability, under the premise of the reconfiguration objective, loads 20, 21, and 22, which belong to category three non-essential loads, are disconnected. The node voltage distribution in Scenario 3 is as follows: Figure 8 As shown, the node voltages did not exceed their limits, and the system voltage was stable.
[0144] The reconstruction results for the three scenarios are summarized in Table 2:
[0145] Table 2
[0146]
[0147] Example 2:
[0148] The present invention also provides a shipboard power grid fault reconfiguration terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the method embodiment described above in Embodiment 1 of the present invention.
[0149] Furthermore, as an executable solution, the shipboard power grid fault reconfiguration terminal device can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The shipboard power grid fault reconfiguration terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above-described composition of the shipboard power grid fault reconfiguration terminal device is merely an example and does not constitute a limitation on the device. It may include more or fewer components than described above, or combine certain components, or use different components. For example, the shipboard power grid fault reconfiguration terminal device may also include input / output devices, network access devices, buses, etc., and this embodiment of the invention does not limit this.
[0150] Furthermore, as an executable solution, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices. The general-purpose processor can be a microprocessor or any conventional processor. This processor serves as the control center of the ship's power grid fault reconfiguration terminal equipment, connecting various parts of the equipment via various interfaces and lines.
[0151] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the ship's power grid fault reconfiguration terminal equipment by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0152] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in the embodiments of the present invention.
[0153] If the modules / units integrated in the shipboard power grid fault reconfiguration terminal equipment are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium, etc.
[0154] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. A method for reconfiguring a ship's electrical grid fault, characterized in that, Includes the following steps: Construct a shipboard electrical grid model; A ship power grid fault reconfiguration 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 power output and faulty line. The action space includes the switch state of each line. The reward function is related to the success of power flow calculation. When the power flow calculation is successful, the reward function consists of maximum load supply, minimum network loss operation, minimum number of switches and voltage over-limit penalty. After training the model based on fault data of the ship's power system, the model is used to reconstruct the ship's power system after a power grid fault occurs. In the fault reconstruction model based on deep reinforcement learning, the Dueling DQN model is used to generate fault reconstruction strategies. The reward function is expressed as: Where r represents the total reward function; Indicates the maximum load power supply; Indicates operation with minimal network loss; Indicates the minimum number of switching operations; This indicates a penalty for exceeding voltage limits; Indicates whether the power flow calculation was successful; C represents the success or failure indicator of the power flow calculation. ,on the contrary ; , , Both are negative constants; This represents the active load of the xth type of load; This represents the active load of the y-th type II load; This represents the active load of the z-th type III load; , , These represent the weights of Category I, Category II, and Category III loads, respectively. Indicates flow through a branch The current; Indicates a branch The resistance; Represents a set of branches; i and j represent the nodes at the two ends of a branch; Indicates the reconstructed first... l The state of each switch; Indicates the fault already present and the fault before refactoring. l The state of each switch; l represents the switch number; and These represent the lower and upper limits of the node's safe voltage, respectively. This represents the node voltage.
2. The shipboard power grid fault reconfiguration method according to claim 1, characterized in that: The loss function used during model training is mean squared error.
3. The shipboard power grid fault reconfiguration method according to claim 1, characterized in that: =20, =7, =1。 4. The shipboard power grid fault reconfiguration method according to claim 1, characterized in that: =0.9 , =1.06 , This represents the reference voltage.
5. The shipboard power grid fault reconfiguration method according to claim 1, characterized in that: Select two or three switch actions during reconstruction.
6. A shipboard power grid fault reconfiguration terminal device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the method as described in any one of claims 1 to 5.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.
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