[go: up one dir, main page]

CN118228599A - Real-time simulation optimization method and device for power system and electronic equipment - Google Patents

Real-time simulation optimization method and device for power system and electronic equipment Download PDF

Info

Publication number
CN118228599A
CN118228599A CN202410423622.9A CN202410423622A CN118228599A CN 118228599 A CN118228599 A CN 118228599A CN 202410423622 A CN202410423622 A CN 202410423622A CN 118228599 A CN118228599 A CN 118228599A
Authority
CN
China
Prior art keywords
time
simulation
real
power system
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410423622.9A
Other languages
Chinese (zh)
Inventor
郭海平
郭琦
卢远宏
郭天宇
张�杰
胡斌江
洪泽祺
黄立滨
涂亮
罗辉
张竞月
胡玉峰
赵艳军
邓丽君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CSG Electric Power Research Institute
China Southern Power Grid Co Ltd
Original Assignee
CSG Electric Power Research Institute
China Southern Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CSG Electric Power Research Institute, China Southern Power Grid Co Ltd filed Critical CSG Electric Power Research Institute
Priority to CN202410423622.9A priority Critical patent/CN118228599A/en
Publication of CN118228599A publication Critical patent/CN118228599A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/04Constraint-based CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/06Multi-objective optimisation, e.g. Pareto optimisation using simulated annealing [SA], ant colony algorithms or genetic algorithms [GA]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The application provides a real-time simulation optimization method and device for a power system and electronic equipment. The method comprises the following steps: acquiring real-time power data, and determining characteristic data according to the real-time power data; analyzing the characteristic data through a long-short-term memory neural network optimization model to obtain a first simulation result and obtain a prediction duration; performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result and obtaining simulation duration, wherein the second simulation result is a value of a parameter representing an operation state obtained by simulating the power system; and comparing the predicted time length with the simulation time length, and simulating the power system by adopting a simulation mode corresponding to the small one of the predicted time length and the simulation time length so as to monitor the power system in real time. The simulation method and the simulation device solve the problem of low efficiency of the simulation method of the power system in the prior art.

Description

Real-time simulation optimization method and device for power system and electronic equipment
Technical Field
The application relates to the technical field of power system monitoring, in particular to a real-time simulation optimization method of a power system, a real-time simulation optimization device of the power system, a computer readable storage medium and electronic equipment.
Background
The traditional power system simulation method is mainly based on physical and mathematical models, such as tidal current analysis, short circuit calculation and the like. These methods perform well in terms of accuracy, but may be less efficient in handling complex systems. Some existing schemes use machine learning techniques, such as support vector machines, random forests, etc., to make predictions of power demand, wind energy, etc. These methods may be superior to traditional methods in accuracy, but may not be suitable for real-time simulation. Therefore, in the prior art, the simulation method of the power system mainly has the following technical problems: (1) efficiency problem: traditional power system simulation methods are mainly based on physical and mathematical models, and although accurate, may be inefficient in handling complex and large-scale systems. (2) real-time problem: while some existing machine learning based power system prediction methods may be superior to traditional methods in terms of accuracy, they may not be suitable for real-time simulation because training and prediction may take a longer time. (3) complexity problem of hybrid simulation and optimization scheme: the solution combining the traditional simulation method and the modern optimization algorithm may perform well in terms of accuracy and efficiency, but may be complex to implement, requiring a large amount of adjustment and optimization. (4) problem of lack of adaptive capability: the existing simulation method may lack self-adaptive capability to dynamic changes of the power system, and is difficult to cope with rapid changing loads, fluctuation of renewable energy sources and the like.
Therefore, a high-efficiency accurate real-time simulation method of the power system is needed to simulate the real-time condition of the power system to the greatest extent, and timely monitor and adjust the operation of the power system.
Disclosure of Invention
The application mainly aims to provide a real-time simulation optimizing method of a power system, a real-time simulation optimizing device of the power system, a computer readable storage medium and electronic equipment, so as to at least solve the problem of low efficiency of the simulation method of the power system in the prior art.
In order to achieve the above object, according to one aspect of the present application, there is provided a real-time simulation optimization method of an electric power system, comprising: acquiring real-time power data, and determining characteristic data according to the real-time power data, wherein the real-time power data at least comprises real-time voltage of a power system, the characteristic data is used for representing characteristics of the real-time power data, and the format of the characteristic data is a format suitable for machine learning; analyzing the characteristic data through a long-short-time memory neural network optimization model to obtain a first simulation result and obtain a predicted time length, wherein the long-short-time memory neural network optimization model is a model obtained by optimizing a long-short-time memory neural network, and the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-time memory neural network optimization model; performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result, and obtaining simulation duration, wherein the second simulation result is a value of a parameter representing the running state obtained by simulating the power system; and comparing the predicted time length with the simulation time length, and simulating the power system by adopting a simulation mode corresponding to the small one of the predicted time length and the simulation time length to monitor the power system in real time, wherein the simulation result is one of the first simulation result or the second simulation result.
Optionally, after acquiring the real-time power data, before determining the feature data from the real-time power data, the method further comprises: generating the real-time power data to a target array, determining the neighborhood of each target data in the target array, and acquiring the data in the neighborhood to obtain a temporary sequence; and determining the median of the temporary sequence, and replacing the target data with the median to obtain the real-time power data after preprocessing.
Optionally, before analyzing the feature data through the long-short-term memory neural network optimization model to obtain the first simulation result, the method further includes: acquiring historical real-time power data and a corresponding historical prediction result, and training an initial long-short-time memory neural network through the historical real-time power data and the historical prediction result to obtain the long-short-time memory neural network; and optimizing the long-short-time memory neural network through an Adam optimizer to obtain the long-short-time memory neural network optimization model.
Optionally, performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result, including: acquiring system parameters and a target topological structure of the power system, and modeling according to the system parameters and the target topological structure to obtain a simulation model of the power system, wherein the system parameters are parameters representing the structure of the power system; and inputting the real-time power data into the simulation model, so that the simulation model calculates the real-time power data to obtain the second simulation result.
Optionally, after obtaining the second simulation result, the method further includes: acquiring optimization target parameters, and establishing an optimization target function according to the optimization target parameters; and obtaining a plurality of constraint conditions, and optimizing the second simulation result by adopting a particle swarm optimization algorithm according to the optimization objective function and the constraint conditions.
Optionally, after simulating the power system by adopting a simulation mode that the predicted duration corresponds to one of the simulation durations so as to monitor the power system in real time, the method further includes: acquiring a real-time simulation optimization result, and determining whether the running state of the power system is safe or not according to the real-time simulation optimization result; and adjusting system parameters of the power system to adjust the power system to a safe state under the condition that the running state is not safe.
Optionally, acquiring a real-time simulation optimization result, determining whether the operation state of the power system is safe according to the real-time simulation optimization result, including: determining that the running state is unsafe under the condition that the value of the parameter representing the running state of the real-time simulation optimizing result is larger than or equal to a preset threshold value; and under the condition that the value of the parameter representing the running state of the real-time simulation optimizing result is smaller than the preset threshold value, determining that the running state is safe.
According to another aspect of the present application, there is provided a real-time simulation optimizing apparatus of an electric power system, including: the first determining unit is used for acquiring real-time power data and determining characteristic data according to the real-time power data, wherein the real-time power data at least comprises real-time voltage of a power system, the characteristic data are used for representing characteristics of the real-time power data, and the format of the characteristic data is suitable for machine learning; the first acquisition unit is used for analyzing the characteristic data through a long-short-time memory neural network optimization model to obtain a first simulation result and acquiring a prediction duration, wherein the long-short-time memory neural network optimization model is a model obtained by optimizing a long-short-time memory neural network, and the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-time memory neural network optimization model; the second acquisition unit is used for carrying out real-time simulation on the power system based on the real-time power data to obtain a second simulation result and acquiring simulation duration, wherein the second simulation result is a value of a parameter representing the running state obtained by simulating the power system; and the second determining unit is used for comparing the predicted time length with the simulation time length, and simulating the power system by adopting a simulation mode corresponding to one of the predicted time length and the simulation time length so as to monitor the power system in real time, wherein the simulation result is one of the first simulation result or the second simulation result.
According to still another aspect of the present application, there is provided a computer readable storage medium, where the computer readable storage medium includes a stored program, and when the program runs, the device where the computer readable storage medium is controlled to execute any one of the real-time simulation optimization methods of the power system.
According to still another aspect of the present application, there is provided an electronic apparatus including: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising a real-time simulation optimization method for performing any of the power systems.
By applying the technical scheme, the real-time power data are acquired, the characteristic data are determined according to the real-time power data, then the characteristic data are analyzed through the long-short memory neural network optimization model, a first simulation result is obtained, the prediction duration is acquired, the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short memory neural network optimization model, the power system is simulated in real time based on the real-time power data, a second simulation result is obtained, the simulation duration is acquired, and the second simulation result is a value of the parameter representing the running state, which is obtained through simulating the power system; comparing the predicted time length with the simulation time length, adopting the small one of the predicted time length and the simulation time length to simulate the power system in real time, and monitoring the running state of the power system in time. Compared with the prior art, the simulation of the power system is carried out by adopting the traditional model, the efficiency is low, the real-time performance is low, and the running condition of the power system cannot be monitored timely. Therefore, the problem of low efficiency of the simulation method of the power system in the prior art can be solved, and the effect of improving the simulation efficiency is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
Fig. 1 shows a hardware block diagram of a mobile terminal for executing a real-time simulation optimization method of a power system according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a real-time simulation optimization method of an electric power system according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a real-time simulation optimization method of a specific power system according to an embodiment of the present application;
Fig. 4 shows a block diagram of a real-time simulation optimizing apparatus for an electric power system according to an embodiment of the present application.
Wherein the above figures include the following reference numerals:
102. a processor; 104. a memory; 106. a transmission device; 108. and an input/output device.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of description, the following will describe some terms or terminology involved in the embodiments of the present application:
Simulation of a power system: is a key link in the power engineering and is used for simulating the running state and performance of the power system. Traditional simulation methods rely primarily on physical and mathematical models, but as the complexity of the power system increases, these methods may have limitations in terms of accuracy and efficiency.
Deep learning: is a machine learning technology based on an artificial neural network. In recent years, deep learning has made breakthrough progress in many fields including image recognition, natural language processing, and the like. In power systems, deep learning is also beginning to be used for tasks such as prediction, monitoring, and optimization.
Real-time simulation technology: is a technique capable of performing simulation at the same speed as the real time. In power systems, real-time simulation may be used for fault detection, system monitoring, etc.
Optimization algorithm: such as particle swarm optimization, genetic algorithms, etc., are widely used for scheduling, optimization, and control of power systems. These algorithms can find the optimal solution that satisfies certain constraints.
As described in the background art, in the prior art, the simulation of the power system has the problems of low efficiency, poor real-time performance, lack of self-adaptive capacity, higher complexity and the like, so that the running state of the power system cannot be monitored in time.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a real-time simulation optimization method of a power system according to an embodiment of the present application. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a real-time simulation optimization method of a power system in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a method for real-time simulation optimization of a power system operating on a mobile terminal, a computer terminal, or a similar computing device is provided, and it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different from that illustrated herein.
Fig. 2 is a flowchart of a real-time simulation optimization method of a power system according to an embodiment of the present application. As shown in fig. 2, the method comprises the steps of:
step S201, acquiring real-time power data, and determining feature data according to the real-time power data, wherein the real-time power data at least comprises real-time voltage of a power system, the feature data is used for representing features of the real-time power data, and the format of the feature data is a format suitable for machine learning;
Specifically, the embodiment adopts the neural network to simulate the power system, firstly, real-time power data of the power system needs to be acquired, the real-time power data can be acquired from each sensor and equipment of the power system, such as real-time voltage, real-time current and the like of each power equipment in the power system, and then, characteristics are extracted from the real-time power data, that is, characteristics, such as voltage amplitude, current waveform and the like, relevant to the simulation of the power system are selected.
Step S202, analyzing the characteristic data through a long-short-time memory neural network optimization model to obtain a first simulation result and a predicted time length, wherein the long-short-time memory neural network optimization model is obtained by optimizing a long-short-time memory neural network, and the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-time memory neural network optimization model;
Specifically, the acquired real-time power data is one or more sets of power data arranged in a time sequence, and the neural network model selects a long-short-term memory neural network model (LSTM) to capture characteristics of the time-series power data. LSTM is a special type of Recurrent Neural Network (RNN) specifically designed to process and predict long-term dependencies in time series data. The key to LSTM is its internal structure, which contains several unique gate control units to regulate the flow of information, enabling the network to learn when to "remember" or "forget" certain information. LSTM includes forget gate, input gate layer, candidate layer, cell state, output gate layer, new hidden state layer. The feature data, i.e., the input, is a sequence and the output, i.e., the first simulation result, is a sequence, which may be a sequence of hidden states, or may be further used for predicting, classifying, or otherwise outputting tasks, after which the duration of the entire LSTM simulation, i.e., the predicted duration, is obtained.
Step S203, performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result, and obtaining a simulation duration, wherein the second simulation result is a value of a parameter representing the running state obtained by simulating the power system;
Specifically, the real-time power data is simulated by a traditional simulation model, and the obtained result is a second simulation result. The first simulation result and the second simulation result are results obtained by simulating the same batch of real-time power data through the LSTM neural network and the traditional simulation model respectively, namely, the results obtained through different simulation modes. The simulation results may be of the form: for example, when a new energy grid-connected test is performed, whether the high-low voltage ride through of the new energy passes or not needs to be considered, the new energy output power adjustment time, the power size and the like, and at the moment, the simulation result can be whether the high-low voltage ride through of the new energy passes or not, the new energy output power adjustment time, the power size and the like; for example, when the safety and stability calculation check is performed, whether the calculation system is stable or not is input, that is, whether the initial state and the possible state of the system are stable or not is output, that is, whether the simulation result is stable or not. The simulation time of the traditional simulation model is the simulation time.
And step S204, comparing the predicted time length with the simulation time length, and simulating the power system by adopting a simulation mode corresponding to the small one of the predicted time length and the simulation time length to monitor the power system in real time, wherein the simulation result is one of the first simulation result or the second simulation result.
Specifically, the predicted duration and the simulation duration are compared, the two durations are compared, the time consumption of different simulation methods is generally different for different power system structures and data, and the power system is simulated in real time by adopting a simulation method with smaller duration for different power systems so as to monitor the running state of the power system, so that the simulation with high simulation efficiency can be adopted to achieve the effect of timely monitoring the running state of the power system. As for the simulation accuracy in the two modes, after multiple training, the neural network method and the traditional simulation method can achieve approximate accuracy, and the simulation accuracy is not described in detail.
According to the embodiment, real-time power data are obtained, feature data are determined according to the real-time power data, then the feature data are analyzed through a long-short-term memory neural network optimization model, a first simulation result is obtained, prediction duration is obtained, the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-term memory neural network optimization model, the power system is simulated in real time based on the real-time power data, a second simulation result is obtained, simulation duration is obtained, and the second simulation result is a value of the parameter representing the running state, which is obtained through simulating the power system; comparing the predicted time length with the simulation time length, adopting the small one of the predicted time length and the simulation time length to simulate the power system in real time, and monitoring the running state of the power system in time. Compared with the prior art, the simulation of the power system is carried out by adopting the traditional model, the efficiency is low, the real-time performance is low, and the running condition of the power system cannot be monitored timely. Therefore, the problem of low efficiency of the simulation method of the power system in the prior art can be solved, and the effect of improving the simulation efficiency is achieved.
In a specific implementation process, after the real-time power data is acquired, the step S201 further includes the following steps before determining the feature data according to the real-time power data: generating the real-time power data to a target array, determining the neighborhood of each target data in the target array, and acquiring the data in the neighborhood to obtain a temporary sequence; and determining the median of the temporary sequence, and replacing the target data with the median to obtain the real-time power data after preprocessing. According to the method, the real-time power data is subjected to data cleaning through the steps, so that noise and abnormal values can be eliminated, and the quality of the real-time power data is ensured.
In particular, the data cleaning is performed by using a median filter, and the median filter can be operated by a formula, especially when processing one-dimensional data (such as time series). Let x [ i ] be the original data sequence and y [ i ] be the filtered data sequence. For each data point i, the operation of the median filter can be expressed in terms of the following steps and formulas: selecting a neighborhood: for each data point x [ i ], a neighborhood is selected. This neighborhood can be denoted as [ i-N, i+N ], where N is the neighborhood radius. Extracting neighborhood data: all data points within the neighborhood are extracted to form a temporary sequence. This sequence may be expressed as { x [ i-N ], x [ i-N+1],..x [ i ],..x [ i+N-1], x [ i+N ] }. Calculating the median: the median of this temporary sequence is calculated. If the length of the temporary sequence is odd, the median is the median; if even, the average of the two middle numbers. Let this median be m. Replacement data points: the value of the original data point x [ i ] is replaced with the median m, i.e., y [ i ] =m. Expressed in mathematical notation, this can be written as: y [ i ] =media ([ x [ i-N ], x [ i ], x [ i+n ]) where the media function represents the median of calculating a set of numbers.
In order to ensure accuracy of the model, in some optional embodiments, before the step S202 of analyzing the feature data by the long-short-term memory neural network optimization model to obtain the first simulation result, the method further includes the following steps: acquiring historical real-time power data and a corresponding historical prediction result, and training an initial long-short-time memory neural network through the historical real-time power data and the historical prediction result to obtain the long-short-time memory neural network; and optimizing the long-short-time memory neural network through an Adam optimizer to obtain the long-short-time memory neural network optimization model. According to the method, the initial long-short-time memory neural network is trained through the steps to obtain the long-short-time memory neural network, and the long-short-time memory neural network is further optimized to obtain the long-short-time memory neural network optimization model, so that the model can be further optimized, and the accuracy of the model is guaranteed.
In the specific implementation process, the historical real-time power data and the corresponding historical prediction result are used as a training data set, the training data set is divided into a training set, a verification set and a test set, an initial long-short-time memory neural network is input, the long-short-time memory neural network is obtained through training, an Adam optimizer is used for training, and super-parameters are adjusted to optimize model performance. When the Adam optimizer is used for training the deep learning model, the process can be simplified as follows: initializing: before starting training, we set the initial parameters of the model. The learning process comprises the following steps: the model is learned by the following steps: input data is received and predicted. The gap (loss) between the predicted result and the actual result is calculated. Model parameters are adjusted according to the loss to more accurately predict. Using Adam optimizer: this optimizer helps the model learn more effectively. It does two things: the average of the past gradients is tracked in order to more smoothly adjust the model parameters. The magnitude of the gradient change is kept estimated to adjust the learning speed, ensuring neither too fast nor too slow. Adjusting parameters: we can also adjust some settings (called "hyper-parameters"), such as learning rate, to optimize the training process. Overall, the goal of using Adam optimizers is to make model training more efficient and stable. By adjusting the model parameters and the super parameters, the best learning mode can be found, so that the model can be better learned and predicted from the data.
In some optional embodiments, the step S203 may be implemented by performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result, where the second simulation result may be implemented by: acquiring system parameters and a target topological structure of the power system, and modeling according to the system parameters and the target topological structure to obtain a simulation model of the power system, wherein the system parameters are parameters representing the structure of the power system; and inputting the real-time power data into the simulation model, so that the simulation model calculates the real-time power data to obtain the second simulation result. According to the method, the real-time simulation is carried out through the traditional simulation model through the steps, so that the simulation time can be further obtained.
Specifically, the steps of adopting the traditional simulation model to perform real-time simulation are simpler, and the method mainly comprises the following three steps: firstly modeling in real-time simulation software according to system parameters and a target topological structure, and secondly running the simulation software and hardware to perform real-time simulation calculation; and the third step is to obtain a second simulation result according to the obtained real-time simulation calculation result.
In some optional embodiments, after the second simulation result is obtained in step S203, the method further includes the following steps: obtaining optimization target parameters, and establishing an optimization target function according to the optimization target parameters; and obtaining a plurality of constraint conditions, and optimizing the second simulation result by adopting a particle swarm optimization algorithm according to the optimization objective function and the constraint conditions. According to the method, the second simulation result is optimized through the steps, so that a more accurate simulation result can be further obtained.
In a specific implementation process, particle Swarm Optimization (PSO) is used to optimize simulation results to meet specific performance and constraint conditions. Particle swarm Optimization (PSO, particle Swarm Optimization) is an Optimization algorithm based on swarm intelligence, and is suitable for various Optimization problems, including Optimization of simulation results. The following is a simplified scheme showing how PSO can be used to optimize simulation results to meet specific performance and constraints: defining an optimization target and constraint conditions; optimizing the target, namely determining the target to be optimized in the power simulation. This may be to maximize or minimize a particular performance index, such as simulation time, efficiency, etc. Constraints-rules or restrictions to be followed by an explicit optimization process, such as resource restrictions, operational restrictions, etc. Initializing a particle swarm: a population of particles is created, each particle representing a potential solution to the simulation model. The "position" of these particles represents a parameter of the solution. Each particle also has a "velocity" that determines its speed and direction of movement in the solution space. Evaluation of particles: and calculating fitness, namely evaluating each particle, and calculating the value of the optimization target according to the position of each particle. The higher the fitness means the better the particle solution. Recording the optimal solution-recording the optimal solution found so far for each particle (personal best), and the optimal solution for all particles in the whole population (global best). Updating particles: updating the speed and position by adjusting the speed and position of each particle according to the personal best solution and the global best solution. This typically involves some adjustment parameters such as learning factors and inertial weights. Adherence to constraints ensures that the updated solution still meets the constraints. The iterative process: the steps of evaluating the particles and updating the particles are repeated, and the evaluation and updating of the particles is continued until a termination condition is reached (e.g., a maximum number of iterations is reached or the solution is sufficiently close to the target value). Evaluation of the final solution: and selecting the global optimal solution as a final optimization result. And analyzing and verifying the result according to the requirement. Adjustment and optimization: adjusting parameters the performance of the algorithm can be optimized by adjusting parameters (such as particle number, learning factors, inertial weights) in the PSO algorithm. Experiment and debugging find the optimal parameter setting through multiple runs and adjustments. The key to optimizing the simulation results using PSO is to design a good fitness function to evaluate the quality of the solution and ensure that the particle update strategy can efficiently explore the solution space while satisfying all constraints. In practice, many experiments and adjustments may be required to achieve the best optimization.
In some optional embodiments, after the step S204 simulates the power system by using a simulation manner in which the predicted duration corresponds to one of the simulation durations to monitor the power system in real time, the method further includes the steps of: step S205: acquiring a real-time simulation optimization result, and determining whether the running state of the power system is safe or not according to the real-time simulation optimization result; step S206: and when the running state is determined to be unsafe, adjusting the system parameters of the electric power system so as to adjust the electric power system to a safe state. The method determines whether the operation state of the power system is safe or not through the steps, so that the operation state of the power system can be monitored.
In the specific implementation process, after the simulation method is determined, the power system is simulated in real time, a real-time simulation optimization result is obtained, and whether the running state of the power system is safe or not is determined according to the real-time simulation optimization result, for example: the real-time simulation optimization result is a voltage predicted value, whether the voltage predicted value is within a voltage preset value or not is judged, if the voltage predicted value exceeds the voltage preset value, the state of the power system is unsafe, then system parameters of the power system can be adjusted, for example, if the trend of the A city for conveying the B city is found to be smaller, parameters of a related generator are properly adjusted, whether original parameters are changed or not is analyzed, and whether new energy output is reduced or not is judged.
In order to accurately determine whether the operation state of the power system is safe, the step S205 obtains a real-time simulation optimization result, and determines whether the operation state of the power system is safe according to the real-time simulation optimization result, including: under the condition that the value of the parameter representing the running state of the real-time simulation optimizing result is larger than or equal to a preset threshold value, determining that the running state is unsafe; and under the condition that the value of the parameter representing the running state of the real-time simulation optimizing result is smaller than the preset threshold value, determining that the running state is safe. The method determines the operation state of the power system through the steps, so that the operation state of the power system can be accurately determined.
In the specific implementation process, under the normal running state, the parameters of the power system are stable within a certain threshold range, whether the running state of the power system is safe or not is judged, and whether the running state is safe or not can be further determined by judging the value of the parameters representing the running state, for example, whether the running state is larger than or equal to a preset threshold value or not is judged. In the actual application process, whether the running state of the power system is safe or not can be determined by other methods.
In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the real-time simulation optimization method of the power system of the present application will be described in detail below with reference to specific embodiments.
The embodiment relates to a specific real-time simulation optimization method of a power system, as shown in fig. 3, comprising the following steps:
Step S1: the data preprocessing module comprises data collection, data cleaning and characteristic engineering: collecting real-time power data from each sensor and equipment of a power system, including data such as voltage, current, frequency and the like, cleaning the data by using a method such as a median filter and the like, eliminating noise and abnormal values, and ensuring the quality of the data; the characteristic engineering selects characteristic data related to the simulation of the power system, such as voltage amplitude, current waveform and the like;
Step S2: in the deep learning model, training the data processed by the data preprocessing module through the deep learning model, wherein the neural network structure selected by the deep learning model is LSTM, and optimizing through an optimization algorithm Adam;
Step S3: then, carrying out real-time simulation on the real-time power data through a simulation engine, and optimizing a simulation result through a Particle Swarm Optimization (PSO);
step S4: finally, comparing the simulation time length of the LSTM and the simulation engine, and selecting one with smaller time length to simulate the power system in real time in the subsequent real-time monitoring process;
step S5: and visualizing the simulation result through a visualization and monitoring interface so as to monitor the running state of the power system in real time.
The embodiment of the application also provides a real-time simulation optimizing device of the power system, and the real-time simulation optimizing device of the power system can be used for executing the real-time simulation optimizing method for the power system. The device is used for realizing the above embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The following describes a real-time simulation optimizing device of a power system provided by the embodiment of the application.
Fig. 4 is a schematic diagram of a real-time simulation optimizing apparatus of a power system according to an embodiment of the present application. As shown in fig. 4, the apparatus includes:
a first determining unit 10, configured to obtain real-time power data, and determine feature data according to the real-time power data, where the real-time power data at least includes a real-time voltage of a power system, the feature data is used to characterize a feature of the real-time power data, and a format of the feature data is a format suitable for machine learning;
Specifically, the embodiment adopts the neural network to simulate the power system, firstly, real-time power data of the power system needs to be acquired, the real-time power data can be acquired from each sensor and equipment of the power system, such as real-time voltage, real-time current and the like of each power equipment in the power system, and then, characteristics are extracted from the real-time power data, that is, characteristics, such as voltage amplitude, current waveform and the like, relevant to the simulation of the power system are selected.
The first obtaining unit 20 is configured to analyze the feature data through a long-short-time memory neural network optimization model, obtain a first simulation result, and obtain a prediction duration, where the long-short-time memory neural network optimization model is a model obtained by optimizing a long-short-time memory neural network, and the first simulation result is a value of a parameter representing an operation state of the power system obtained through the long-short-time memory neural network optimization model;
Specifically, the acquired real-time power data is one or more sets of power data arranged in a time sequence, and the neural network model selects a long-short-term memory neural network model (LSTM) to capture characteristics of the time-series power data. LSTM is a special type of Recurrent Neural Network (RNN) specifically designed to process and predict long-term dependencies in time series data. The key to LSTM is its internal structure, which contains several unique gate control units to regulate the flow of information, enabling the network to learn when to "remember" or "forget" certain information. LSTM includes forget gate, input gate layer, candidate layer, cell state, output gate layer, new hidden state layer. The feature data, i.e., the input, is a sequence and the output, i.e., the first simulation result, is a sequence, which may be a sequence of hidden states, or may be further used for predicting, classifying, or otherwise outputting tasks, after which the duration of the entire LSTM simulation, i.e., the predicted duration, is obtained.
A second obtaining unit 30, configured to perform real-time simulation on the electric power system based on the real-time electric power data, obtain a second simulation result, and obtain a simulation duration, where the second simulation result is a value of a parameter representing the running state obtained by simulating the electric power system;
Specifically, the real-time power data is simulated by a traditional simulation model, and the obtained result is a second simulation result. The first simulation result and the second simulation result are results obtained by simulating the same batch of real-time power data through the LSTM neural network and the traditional simulation model respectively, namely, the results obtained through different simulation modes. The simulation results may be of the form: for example, when a new energy grid-connected test is performed, whether the high-low voltage ride through of the new energy passes or not needs to be considered, the new energy output power adjustment time, the power size and the like, and at the moment, the simulation result can be whether the high-low voltage ride through of the new energy passes or not, the new energy output power adjustment time, the power size and the like; for example, when the safety and stability calculation check is performed, whether the calculation system is stable or not is input, that is, whether the initial state and the possible state of the system are stable or not is output, that is, whether the simulation result is stable or not. The simulation time of the traditional simulation model is the simulation time.
And a second determining unit 40, configured to compare the predicted time length with the simulation time lengths, and simulate the power system by using a simulation mode corresponding to one of the predicted time length and the simulation time length, so as to monitor the power system in real time, where the simulation result is one of the first simulation result and the second simulation result.
Specifically, the predicted duration and the simulation duration are compared, the time consumption of different simulation devices is generally different for different power system structures and data, and the power system is simulated in real time by using the simulation device with smaller duration for different power systems so as to monitor the running state of the power system, so that the simulation with high simulation efficiency can be adopted, and the effect of timely monitoring the running state of the power system is achieved. As for the simulation accuracy of the above two modes, the neural network device and the conventional simulation device can achieve approximate accuracy after training for a plurality of times, and the simulation accuracy will not be described in detail.
According to the embodiment, real-time power data are obtained, feature data are determined according to the real-time power data, then the feature data are analyzed through a long-short-term memory neural network optimization model, a first simulation result is obtained, prediction duration is obtained, the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-term memory neural network optimization model, the power system is simulated in real time based on the real-time power data, a second simulation result is obtained, simulation duration is obtained, and the second simulation result is a value of the parameter representing the running state, which is obtained through simulating the power system; comparing the predicted time length with the simulation time length, adopting the small one of the predicted time length and the simulation time length to simulate the power system in real time, and monitoring the running state of the power system in time. Compared with the prior art, the simulation of the power system is carried out by adopting the traditional model, the efficiency is low, the real-time performance is low, and the running condition of the power system cannot be monitored timely. Therefore, the problem of low efficiency of the power system simulation device in the prior art can be solved, and the effect of improving the simulation efficiency is achieved.
In a specific implementation process, the device further comprises a third acquisition unit and a replacement unit, wherein the third acquisition unit is used for generating the real-time power data to a target array, determining the neighborhood of each target data in the target array, and acquiring the data in the neighborhood to obtain a temporary sequence; and the replacing unit is used for determining the median of the temporary sequence and replacing the target data with the median to obtain the preprocessed real-time power data. The device carries out data cleaning on the real-time power data through the steps, so that noise and abnormal values can be eliminated, and the quality of the real-time power data is ensured.
In particular, the data cleaning is performed using a median filter device, the median filter operation can be formulated, especially when processing one-dimensional data (e.g., time series). Let x [ i ] be the original data sequence and y [ i ] be the filtered data sequence. For each data point i, the operation of the median filter can be expressed in terms of the following steps and formulas: selecting a neighborhood: for each data point x [ i ], a neighborhood is selected. This neighborhood can be denoted as [ i-N, i+N ], where N is the neighborhood radius. Extracting neighborhood data: all data points within the neighborhood are extracted to form a temporary sequence. This sequence may be expressed as { x [ i-N ], x [ i-N+1],..x [ i ],..x [ i+N-1], x [ i+N ] }. Calculating the median: the median of this temporary sequence is calculated. If the length of the temporary sequence is odd, the median is the median; if even, the average of the two middle numbers. Let this median be m. Replacement data points: the value of the original data point x [ i ] is replaced with the median m, i.e., y [ i ] =m. Expressed in mathematical notation, this can be written as: y [ i ] =media ([ x [ i-N ], x [ i ], x [ i+n ]) where the media function represents the median of calculating a set of numbers.
In order to ensure accuracy of the model, in some optional embodiments, before the feature data is analyzed through a long-short-time memory neural network optimization model to obtain a first simulation result, the device further comprises a training unit and a first optimization unit, wherein the training unit is used for obtaining historical real-time power data and a corresponding historical prediction result, and training an initial long-short-time memory neural network through the historical real-time power data and the historical prediction result to obtain the long-short-time memory neural network; the first optimizing unit is used for optimizing the long-short-time memory neural network through the Adam optimizer to obtain the long-short-time memory neural network optimizing model. The device trains the initial long-short-time memory neural network through the steps to obtain the long-short-time memory neural network, and further optimizes the long-short-time memory neural network to obtain an optimized model of the long-short-time memory neural network, so that the model can be further optimized, and the accuracy of the model is ensured.
In the specific implementation process, the historical real-time power data and the corresponding historical prediction result are used as a training data set, the training data set is divided into a training set, a verification set and a test set, an initial long-short-time memory neural network is input, the long-short-time memory neural network is obtained through training, an Adam optimizer is used for training, and super-parameters are adjusted to optimize model performance. When the Adam optimizer is used for training the deep learning model, the process can be simplified as follows: initializing: before starting training, we set the initial parameters of the model. The learning process comprises the following steps: the model is learned by the following steps: input data is received and predicted. The gap (loss) between the predicted result and the actual result is calculated. Model parameters are adjusted according to the loss to more accurately predict. Using Adam optimizer: this optimizer helps the model learn more effectively. It does two things: the average of the past gradients is tracked in order to more smoothly adjust the model parameters. The magnitude of the gradient change is kept estimated to adjust the learning speed, ensuring neither too fast nor too slow. Adjusting parameters: we can also adjust some settings (called "hyper-parameters"), such as learning rate, to optimize the training process. Overall, the goal of using Adam optimizers is to make model training more efficient and stable. By adjusting the model parameters and the super parameters, the best learning mode can be found, so that the model can be better learned and predicted from the data.
In some optional embodiments, the second obtaining unit includes a modeling module and a calculating module, where the modeling module is configured to obtain a system parameter and a target topology of the power system, and perform modeling according to the system parameter and the target topology to obtain a simulation model of the power system, where the system parameter is a parameter that characterizes a structure of the power system; the calculation module is used for inputting the real-time power data into the simulation model, so that the simulation model calculates the real-time power data to obtain the second simulation result. The device carries out real-time simulation through the traditional simulation model by the steps, so that the simulation time can be further obtained.
Specifically, the steps of adopting the traditional simulation model to perform real-time simulation are simpler, and the method mainly comprises the following three steps: firstly modeling in real-time simulation software according to system parameters and a target topological structure, and secondly running the simulation software and hardware to perform real-time simulation calculation; and the third step is to obtain a second simulation result according to the obtained real-time simulation calculation result.
In some optional embodiments, after the second simulation result is obtained in step S203, the apparatus further includes a building unit and a second optimizing unit, where the building unit is configured to obtain an optimization objective parameter, and build an optimization objective function according to the optimization objective parameter; the second optimizing unit is used for obtaining a plurality of constraint conditions, and optimizing the second simulation result by adopting a particle swarm optimization algorithm according to the optimization objective function and the constraint conditions. The device optimizes the second simulation result through the steps, so that a more accurate simulation result can be further obtained.
In a specific implementation process, particle Swarm Optimization (PSO) is used to optimize simulation results to meet specific performance and constraint conditions. Particle swarm Optimization (PSO, particle Swarm Optimization) is an Optimization algorithm based on swarm intelligence, and is suitable for various Optimization problems, including Optimization of simulation results. The following is a simplified scheme showing how PSO can be used to optimize simulation results to meet specific performance and constraints: defining an optimization target and constraint conditions; optimizing the target, namely determining the target to be optimized in the power simulation. This may be to maximize or minimize a particular performance index, such as simulation time, efficiency, etc. Constraints-rules or restrictions to be followed by an explicit optimization process, such as resource restrictions, operational restrictions, etc. Initializing a particle swarm: a population of particles is created, each particle representing a potential solution to the simulation model. The "position" of these particles represents a parameter of the solution. Each particle also has a "velocity" that determines its speed and direction of movement in the solution space. Evaluation of particles: and calculating fitness, namely evaluating each particle, and calculating the value of the optimization target according to the position of each particle. The higher the fitness means the better the particle solution. Recording the optimal solution-recording the optimal solution found so far for each particle (personal best), and the optimal solution for all particles in the whole population (global best). Updating particles: updating the speed and position by adjusting the speed and position of each particle according to the personal best solution and the global best solution. This typically involves some adjustment parameters such as learning factors and inertial weights. Adherence to constraints ensures that the updated solution still meets the constraints. The iterative process: the steps of evaluating the particles and updating the particles are repeated, and the evaluation and updating of the particles is continued until a termination condition is reached (e.g., a maximum number of iterations is reached or the solution is sufficiently close to the target value). Evaluation of the final solution: and selecting the global optimal solution as a final optimization result. And analyzing and verifying the result according to the requirement. Adjustment and optimization: adjusting parameters the performance of the algorithm can be optimized by adjusting parameters (such as particle number, learning factors, inertial weights) in the PSO algorithm. Experiment and debugging find the optimal parameter setting through multiple runs and adjustments. The key to optimizing the simulation results using PSO is to design a good fitness function to evaluate the quality of the solution and ensure that the particle update strategy can efficiently explore the solution space while satisfying all constraints. In practice, many experiments and adjustments may be required to achieve the best optimization.
In some optional embodiments, the apparatus further includes a determining unit and an adjusting unit, where the determining unit is configured to obtain a real-time simulation optimization result, and determine whether an operation state of the power system is safe according to the real-time simulation optimization result; the adjusting unit is used for adjusting the system parameters of the electric power system to adjust the electric power system to a safe state under the condition that the running state is not safe. The device determines whether the operation state of the power system is safe or not through the steps, so that the operation state of the power system can be monitored.
In the specific implementation process, after the simulation device is determined, the power system is simulated in real time, a real-time simulation optimization result is obtained, and whether the running state of the power system is safe or not is determined according to the real-time simulation optimization result, for example: the real-time simulation optimization result is a voltage predicted value, whether the voltage predicted value is within a voltage preset value or not is judged, if the voltage predicted value exceeds the voltage preset value, the state of the power system is unsafe, then system parameters of the power system can be adjusted, for example, if the trend of the A city for conveying the B city is found to be smaller, parameters of a related generator are properly adjusted, whether original parameters are changed or not is analyzed, and whether new energy output is reduced or not is judged.
In order to accurately judge whether the operation state of the power system is safe or not, the determining unit comprises a first determining module and a second determining module, wherein the first determining module is used for determining that the operation state is unsafe when the value of the parameter representing the operation state of the real-time simulation optimization result is larger than or equal to a preset threshold value; the second determining module is configured to determine that the operation state is safe when the value of the parameter representing the operation state as a result of the real-time simulation optimization is smaller than the preset threshold. The device determines the operation state of the power system through the steps, so that the operation state of the power system can be accurately determined.
In the specific implementation process, under the normal running state, the parameters of the power system are stable within a certain threshold range, whether the running state of the power system is safe or not is judged, and whether the running state is safe or not can be further determined by judging the value of the parameters representing the running state, for example, whether the running state is larger than or equal to a preset threshold value or not is judged. In the actual application process, whether the running state of the power system is safe or not can be determined by other devices.
The real-time simulation optimizing device of the power system comprises a processor and a memory, wherein the first determining unit, the first acquiring unit, the second determining unit and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions. The modules are all located in the same processor; or the above modules may be located in different processors in any combination.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more, and the simulation efficiency of the power system is improved by adjusting the kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the invention provides a computer readable storage medium, which comprises a stored program, wherein the program is used for controlling equipment where the computer readable storage medium is positioned to execute the real-time simulation optimization method of the power system.
Specifically, the real-time simulation optimization method of the power system comprises the following steps:
step S201, acquiring real-time power data, and determining feature data according to the real-time power data, wherein the real-time power data at least comprises real-time voltage of a power system, the feature data is used for representing features of the real-time power data, and the format of the feature data is a format suitable for machine learning;
Specifically, the embodiment adopts the neural network to simulate the power system, firstly, real-time power data of the power system needs to be acquired, the real-time power data can be acquired from each sensor and equipment of the power system, such as real-time voltage, real-time current and the like of each power equipment in the power system, and then, characteristics are extracted from the real-time power data, that is, characteristics, such as voltage amplitude, current waveform and the like, relevant to the simulation of the power system are selected.
Step S202, analyzing the characteristic data through a long-short-time memory neural network optimization model to obtain a first simulation result and a predicted time length, wherein the long-short-time memory neural network optimization model is obtained by optimizing a long-short-time memory neural network, and the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-time memory neural network optimization model;
Specifically, the acquired real-time power data is one or more sets of power data arranged in a time sequence, and the neural network model selects a long-short-term memory neural network model (LSTM) to capture characteristics of the time-series power data. LSTM is a special type of Recurrent Neural Network (RNN) specifically designed to process and predict long-term dependencies in time series data. The key to LSTM is its internal structure, which contains several unique gate control units to regulate the flow of information, enabling the network to learn when to "remember" or "forget" certain information. LSTM includes forget gate, input gate layer, candidate layer, cell state, output gate layer, new hidden state layer. The feature data, i.e., the input, is a sequence and the output, i.e., the first simulation result, is a sequence, which may be a sequence of hidden states, or may be further used for predicting, classifying, or otherwise outputting tasks, after which the duration of the entire LSTM simulation, i.e., the predicted duration, is obtained.
Step S203, performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result, and obtaining a simulation duration, wherein the second simulation result is a value of a parameter representing the running state obtained by simulating the power system;
Specifically, the real-time power data is simulated by a traditional simulation model, and the obtained result is a second simulation result. The first simulation result and the second simulation result are results obtained by simulating the same batch of real-time power data through the LSTM neural network and the traditional simulation model respectively, namely, the results obtained through different simulation modes. The simulation results may be of the form: for example, when a new energy grid-connected test is performed, whether the high-low voltage ride through of the new energy passes or not needs to be considered, the new energy output power adjustment time, the power size and the like, and at the moment, the simulation result can be whether the high-low voltage ride through of the new energy passes or not, the new energy output power adjustment time, the power size and the like; for example, when the safety and stability calculation check is performed, whether the calculation system is stable or not is input, that is, whether the initial state and the possible state of the system are stable or not is output, that is, whether the simulation result is stable or not. The simulation time of the traditional simulation model is the simulation time.
And step S204, comparing the predicted time length with the simulation time length, and simulating the power system by adopting a simulation mode corresponding to the small one of the predicted time length and the simulation time length to monitor the power system in real time, wherein the simulation result is one of the first simulation result or the second simulation result.
Specifically, the predicted duration and the simulation duration are compared, the two durations are compared, the time consumption of different simulation methods is generally different for different power system structures and data, and the power system is simulated in real time by adopting a simulation method with smaller duration for different power systems so as to monitor the running state of the power system, so that the simulation with high simulation efficiency can be adopted to achieve the effect of timely monitoring the running state of the power system. As for the simulation accuracy in the two modes, after multiple training, the neural network method and the traditional simulation method can achieve approximate accuracy, and the simulation accuracy is not described in detail.
Optionally, after acquiring the real-time power data, before determining the feature data according to the real-time power data, the method further comprises: generating the real-time power data to a target array, determining the neighborhood of each target data in the target array, and acquiring the data in the neighborhood to obtain a temporary sequence; and determining the median of the temporary sequence, and replacing the target data with the median to obtain the real-time power data after preprocessing.
Optionally, before the feature data is analyzed through the long-short-term memory neural network optimization model to obtain the first simulation result, the method further includes: acquiring historical real-time power data and a corresponding historical prediction result, and training an initial long-short-time memory neural network through the historical real-time power data and the historical prediction result to obtain the long-short-time memory neural network; and optimizing the long-short-time memory neural network through an Adam optimizer to obtain the long-short-time memory neural network optimization model.
Optionally, performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result, including: acquiring system parameters and a target topological structure of the power system, and modeling according to the system parameters and the target topological structure to obtain a simulation model of the power system, wherein the system parameters are parameters representing the structure of the power system; and inputting the real-time power data into the simulation model, so that the simulation model calculates the real-time power data to obtain the second simulation result.
Optionally, after obtaining the second simulation result, the method further includes: obtaining optimization target parameters, and establishing an optimization target function according to the optimization target parameters; and obtaining a plurality of constraint conditions, and optimizing the second simulation result by adopting a particle swarm optimization algorithm according to the optimization objective function and the constraint conditions.
Optionally, after simulating the power system by adopting a simulation mode that the predicted duration corresponds to one of the simulation durations so as to monitor the power system in real time, the method further includes: acquiring a real-time simulation optimization result, and determining whether the running state of the power system is safe or not according to the real-time simulation optimization result; and when the running state is determined to be unsafe, adjusting the system parameters of the electric power system so as to adjust the electric power system to a safe state.
Optionally, acquiring a real-time simulation optimization result, determining whether the operation state of the power system is safe according to the real-time simulation optimization result, including: under the condition that the value of the parameter representing the running state of the real-time simulation optimizing result is larger than or equal to a preset threshold value, determining that the running state is unsafe; and under the condition that the value of the parameter representing the running state of the real-time simulation optimizing result is smaller than the preset threshold value, determining that the running state is safe.
The embodiment of the invention provides an electronic device, which comprises a processor, a memory and a program stored on the memory and capable of running on the processor, wherein the processor realizes at least the following steps when executing the program:
step S201, acquiring real-time power data, and determining feature data according to the real-time power data, wherein the real-time power data at least comprises real-time voltage of a power system, the feature data is used for representing features of the real-time power data, and the format of the feature data is a format suitable for machine learning;
Step S202, analyzing the characteristic data through a long-short-time memory neural network optimization model to obtain a first simulation result and a predicted time length, wherein the long-short-time memory neural network optimization model is obtained by optimizing a long-short-time memory neural network, and the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-time memory neural network optimization model;
Step S203, performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result, and obtaining a simulation duration, wherein the second simulation result is a value of a parameter representing the running state obtained by simulating the power system;
And step S204, comparing the predicted time length with the simulation time length, and simulating the power system by adopting a simulation mode corresponding to the small one of the predicted time length and the simulation time length to monitor the power system in real time, wherein the simulation result is one of the first simulation result or the second simulation result.
The device herein may be a server, PC, PAD, cell phone, etc.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the above method of the various embodiments of the application:
step S201, acquiring real-time power data, and determining feature data according to the real-time power data, wherein the real-time power data at least comprises real-time voltage of a power system, the feature data is used for representing features of the real-time power data, and the format of the feature data is a format suitable for machine learning;
Step S202, analyzing the characteristic data through a long-short-time memory neural network optimization model to obtain a first simulation result and a predicted time length, wherein the long-short-time memory neural network optimization model is obtained by optimizing a long-short-time memory neural network, and the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-time memory neural network optimization model;
Step S203, performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result, and obtaining a simulation duration, wherein the second simulation result is a value of a parameter representing the running state obtained by simulating the power system;
And step S204, comparing the predicted time length with the simulation time length, and simulating the power system by adopting a simulation mode corresponding to the small one of the predicted time length and the simulation time length to monitor the power system in real time, wherein the simulation result is one of the first simulation result or the second simulation result.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
1) In the real-time simulation optimization method of the power system, real-time power data is acquired, characteristic data are determined according to the real-time power data, then the characteristic data are analyzed through a long-short-term memory neural network optimization model, a first simulation result is obtained, the predicted duration is acquired, the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-term memory neural network optimization model, the power system is subjected to real-time simulation based on the real-time power data, a second simulation result is obtained, the simulation duration is acquired, and the second simulation result is a value of the parameter representing the running state, which is obtained through simulating the power system; comparing the predicted time length with the simulation time length, adopting the small one of the predicted time length and the simulation time length to simulate the power system in real time, and monitoring the running state of the power system in time. Compared with the prior art, the simulation of the power system is carried out by adopting the traditional model, the efficiency is low, the real-time performance is low, and the running condition of the power system cannot be monitored timely. Therefore, the problem of low efficiency of the simulation method of the power system in the prior art can be solved, and the effect of improving the simulation efficiency is achieved.
2) In the real-time simulation optimizing device of the power system, real-time power data is acquired, characteristic data are determined according to the real-time power data, then the characteristic data are analyzed through a long-short-term memory neural network optimizing model, a first simulation result is obtained, the predicted time length is acquired, the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-term memory neural network optimizing model, the power system is simulated in real time based on the real-time power data, a second simulation result is obtained, the simulation time length is acquired, and the second simulation result is a value of the parameter representing the running state, which is obtained through simulating the power system; comparing the predicted time length with the simulation time length, adopting the small one of the predicted time length and the simulation time length to simulate the power system in real time, and monitoring the running state of the power system in time. Compared with the prior art, the simulation of the power system is carried out by adopting the traditional model, the efficiency is low, the real-time performance is low, and the running condition of the power system cannot be monitored timely. Therefore, the problem of low efficiency of the power system simulation device in the prior art can be solved, and the effect of improving the simulation efficiency is achieved.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. The real-time simulation optimization method for the power system is characterized by comprising the following steps of:
Acquiring real-time power data, and determining characteristic data according to the real-time power data, wherein the real-time power data at least comprises real-time voltage of a power system, the characteristic data is used for representing characteristics of the real-time power data, and the format of the characteristic data is a format suitable for machine learning;
Analyzing the characteristic data through a long-short-time memory neural network optimization model to obtain a first simulation result and obtain a predicted time length, wherein the long-short-time memory neural network optimization model is a model obtained by optimizing a long-short-time memory neural network, and the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-time memory neural network optimization model;
performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result, and obtaining simulation duration, wherein the second simulation result is a value of a parameter representing the running state obtained by simulating the power system;
and comparing the predicted time length with the simulation time length, and simulating the power system by adopting a simulation mode corresponding to the small one of the predicted time length and the simulation time length to monitor the power system in real time, wherein the simulation result is one of the first simulation result or the second simulation result.
2. The real-time simulation optimizing method according to claim 1, wherein after acquiring real-time power data, before determining feature data from the real-time power data, the method further comprises:
generating the real-time power data to a target array, determining the neighborhood of each target data in the target array, and acquiring the data in the neighborhood to obtain a temporary sequence;
And determining the median of the temporary sequence, and replacing the target data with the median to obtain the real-time power data after preprocessing.
3. The real-time simulation optimizing method according to claim 1, wherein before analyzing the feature data by a long-short-term memory neural network optimizing model to obtain a first simulation result, the method further comprises:
Acquiring historical real-time power data and a corresponding historical prediction result, and training an initial long-short-time memory neural network through the historical real-time power data and the historical prediction result to obtain the long-short-time memory neural network;
And optimizing the long-short-time memory neural network through an Adam optimizer to obtain the long-short-time memory neural network optimization model.
4. The real-time simulation optimization method according to claim 1, wherein performing real-time simulation on the power system based on the real-time power data to obtain a second simulation result comprises:
Acquiring system parameters and a target topological structure of the power system, and modeling according to the system parameters and the target topological structure to obtain a simulation model of the power system, wherein the system parameters are parameters representing the structure of the power system;
and inputting the real-time power data into the simulation model, so that the simulation model calculates the real-time power data to obtain the second simulation result.
5. The real-time simulation optimizing method according to claim 1, wherein after obtaining the second simulation result, the method further comprises:
Acquiring optimization target parameters, and establishing an optimization target function according to the optimization target parameters;
and obtaining a plurality of constraint conditions, and optimizing the second simulation result by adopting a particle swarm optimization algorithm according to the optimization objective function and the constraint conditions.
6. The real-time simulation optimizing method according to claim 1, wherein after simulating the power system in a simulation manner in which the predicted time period corresponds to a small one of the simulation time periods to monitor the power system in real time, the method further comprises:
Acquiring a real-time simulation optimization result, and determining whether the running state of the power system is safe or not according to the real-time simulation optimization result;
And adjusting system parameters of the power system to adjust the power system to a safe state under the condition that the running state is not safe.
7. The real-time simulation optimizing method according to claim 6, wherein obtaining a real-time simulation optimizing result, determining whether an operation state of the power system is safe according to the real-time simulation optimizing result, comprises:
Determining that the running state is unsafe under the condition that the value of the parameter representing the running state of the real-time simulation optimizing result is larger than or equal to a preset threshold value;
And under the condition that the value of the parameter representing the running state of the real-time simulation optimizing result is smaller than the preset threshold value, determining that the running state is safe.
8. A real-time simulation optimizing device for an electric power system, comprising:
The first determining unit is used for acquiring real-time power data and determining characteristic data according to the real-time power data, wherein the real-time power data at least comprises real-time voltage of a power system, the characteristic data are used for representing characteristics of the real-time power data, and the format of the characteristic data is suitable for machine learning;
The first acquisition unit is used for analyzing the characteristic data through a long-short-time memory neural network optimization model to obtain a first simulation result and acquiring a prediction duration, wherein the long-short-time memory neural network optimization model is a model obtained by optimizing a long-short-time memory neural network, and the first simulation result is a value of a parameter representing the running state of the power system, which is obtained through the long-short-time memory neural network optimization model;
The second acquisition unit is used for carrying out real-time simulation on the power system based on the real-time power data to obtain a second simulation result and acquiring simulation duration, wherein the second simulation result is a value of a parameter representing the running state obtained by simulating the power system;
And the second determining unit is used for comparing the predicted time length with the simulation time length, and simulating the power system by adopting a simulation mode corresponding to one of the predicted time length and the simulation time length so as to monitor the power system in real time, wherein the simulation result is one of the first simulation result or the second simulation result.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when run controls a device in which the computer readable storage medium is located to perform the real-time simulation optimization method of the power system according to any one of claims 1 to 7.
10. An electronic device, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising a real-time simulation optimization method for performing the power system of any of claims 1-7.
CN202410423622.9A 2024-04-09 2024-04-09 Real-time simulation optimization method and device for power system and electronic equipment Pending CN118228599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410423622.9A CN118228599A (en) 2024-04-09 2024-04-09 Real-time simulation optimization method and device for power system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410423622.9A CN118228599A (en) 2024-04-09 2024-04-09 Real-time simulation optimization method and device for power system and electronic equipment

Publications (1)

Publication Number Publication Date
CN118228599A true CN118228599A (en) 2024-06-21

Family

ID=91500665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410423622.9A Pending CN118228599A (en) 2024-04-09 2024-04-09 Real-time simulation optimization method and device for power system and electronic equipment

Country Status (1)

Country Link
CN (1) CN118228599A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119127654A (en) * 2024-11-14 2024-12-13 长江三峡集团实业发展(北京)有限公司 A security monitoring system, method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119127654A (en) * 2024-11-14 2024-12-13 长江三峡集团实业发展(北京)有限公司 A security monitoring system, method, device, equipment and medium

Similar Documents

Publication Publication Date Title
Liu et al. Evaluating smart grid renewable energy accommodation capability with uncertain generation using deep reinforcement learning
CN112329997A (en) Power demand load prediction method and system, electronic device, and storage medium
CN108921359A (en) A kind of distribution gas density prediction technique and device
Liu et al. Telecommunication traffic prediction based on improved LSSVM
Kaplan et al. A novel method based on Weibull distribution for short-term wind speed prediction
CN113268929B (en) Short-term load interval prediction method and device
CN118228599A (en) Real-time simulation optimization method and device for power system and electronic equipment
CN118747479A (en) A digital twin object processing system and method
CN116706992A (en) Self-adaptive power prediction method, device and equipment for distributed photovoltaic cluster
CN103618315B (en) A kind of line voltage idle work optimization method based on BART algorithm and super-absorbent wall
CN115577647A (en) Power grid fault type identification method and intelligent agent construction method
CN115759317A (en) A power load control method, device, electronic equipment and storage medium
CN111179108A (en) Method and device for predicting power consumption
CN118609709A (en) Parameter inversion and optimization method for reservoir numerical simulation based on intelligent agent
CN118501946A (en) A method for predicting laboratory earthquakes based on deep convolutional neural networks
CN108009686B (en) Photovoltaic power generation power prediction method, device and system
CN113987904A (en) Method, device, equipment and storage medium for measuring and calculating repair cost of power transmission project
CN119070301B (en) Power load prediction method and device based on improved RF-SVR
CN110889396A (en) Energy internet disturbance classification method and device, electronic equipment and storage medium
CN118238677B (en) Battery management policy configuration method and device for electric automobile
Liao et al. Simulation of Load Classification and Load Forecasting Model for Energy Internet Based on Neural Network Models
Borah et al. Design and implementation of ml based temperature forecasting model for air conditioning using iot
CN114298429B (en) A distribution network action plan auxiliary decision-making method, system, device and storage medium
CN119134338B (en) Method for controlling load frequency of power system by deep reinforcement learning
CN118232333B (en) A power grid section control method and device based on deep reinforcement learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination