Stability assessment of forestry plant power system based on improved long short-term memory network

The stability assessment of forestry power system plays a vital role in many aspects. First of all, the stability of the power system is directly related to the production efficiency, employee safety and environmental sustainability of the factory. If the power system is unstable, it may cause power outage or power fluctuations, which will interrupt the production and turn the production line, which will lead to a reduction in production capacity and the increase in production costs. In addition, the stability of the power system is directly related to the security of employees. Sudden power failure or voltage fluctuations may cause improper equipment operation, and may even cause accidents and damage. Therefore, by evaluating the stability of the power system, potential security risks can be reduced. In addition, unstable power systems may cause waste and increase environmental burden. In order to improve the stability of the power system, this article proposes an improved LSTM (long and short memory) model of improved stability prediction. This model uses the power system to operate data, including current, voltage, frequency, and other parameters, and external factors related to weather conditions and load changes to predict the stability of the power system. Compared with traditional methods, this method performs well in predicting the failure and abnormalities of the power system, and has the ability to evaluate high accuracy and stability. Therefore, the improved LSTM model method can be regarded as a powerful tool for power system management and maintenance.


Introduction
Stability assessment of power systems in forestry plants is a critical task directly related to production efficiency, employee safety and environmental sustainability [1].In this era, electrical power systems have become the nerve center of modern factory operations, providing the power supply needed to support critical production processes such as wood processing [2], equipment operation and transportation.Therefore, the stability of the power system is crucial to the smooth operation of the plant.When we consider the stability assessment of power systems, it is not only because it is directly related to the production operations of forestry plants, but also because it has a profound impact on the entire social and economic system.As a key [3] link in resource utilization and production, the power demand of forestry factories is not only related to the interests of the factory itself, but also related to the suppliers and consumers who cooperate with the factory, as well as the livelihood and development of the entire community [4].
First, it is worth noting that the production process in forestry plants often requires large amounts of electricity.From the harvesting and transportation of logs to the processing of wood and the production of products, every step relies on the stable supply of the power system.Instability of the power system may lead to power interruptions or voltage fluctuations [5], which will directly affect the production efficiency of the factory.For example, when a power outage occurs, production lines may be shut down, resulting in reduced production capacity and increased production costs.This situation [6] will not only affect the daily operations of the factory, but may also lead to order delays and reduced customer satisfaction.Secondly, the stability of the power system is directly related to the safety of employees.In forestry factories, employees need to operate various equipment and machinery.If the power system suddenly fails or voltage fluctuates, it may cause improper operation of the equipment and even cause accidents and injuries.Employee safety is one of the top priorities for every factory, so ensuring the stability of the power system is critical to reducing potential safety risks.In addition, unstable power systems may also lead to waste of electricity and increase environmental burden.With the limited energy resources and the intensification of environmental problems, it is particularly important to effectively manage and utilize power resources.Instability in the power system can lead to energy waste, which not only increases the factory's energy costs, but also increases greenhouse gas emissions and has a negative impact on the environment.By improving the stability of the power system, this waste can be reduced and energy efficiency improved, contributing to sustainable production [7] and environmental protection.
Research on the safe and stable operation of power grids has always been the focus of power system research, but large-scale power outages in power grids [8] still occur from time to time.The traditional power grid safe and stable operation analysis method still has certain flaws.A single analysis of power angle, voltage and frequency cannot comprehensively reflect the actual power grid stability issues [9].In actual situations, these three are different.The coupling relationship [10] requires joint analysis to give a more comprehensive stability result of the power system operation.At the same time, the State Grid is establishing a ubiquitous power Internet of Things, laying the foundation for the application of artificial intelligence technologies such as big data analysis, machine learning, and deep learning in the power system.In recent years, with the deepening of research on deep learning technology in various fields, its application research in the field of transient stability assessment of power systems has gradually begun.Due to the unique advantages of deep learning in data mining, the accuracy of assessment and generalization.The capabilities are also improved compared to traditional machine learning.The power model has been established by deep learning actually establishes a functional relationship between the characteristic quantities reflecting the power system's transient stability and the power system's transient stability results, which is an implicit rule [11].Deep learning is used to analyze power grid big data.Compared with traditional methods, it does not require complex mathematical models or the establishment of energy functions that reflect system stability.At the same time, it also has the advantages of real-time analysis, online evaluation, and strong observability, so that it is gradually applied in the study of transient stability assessment of power systems.Traditional power system transient stability analysis has certain limitations.The development of the ubiquitous power Internet of Things and in-depth research on deep learning technology provide a new development route for the research on power system transient stability assessment methods.
In order to improve the stability of the power system, this study proposes an innovative method, namely a stability prediction model based on an improved long short-term memory network (LSTM).First, the research team collected a large amount of power system operating data, including key parameters such as current, voltage, frequency, as well as external factors related to weather conditions and load changes.The collection of these data is critical for accurate assessment of power system performance, as power system stability is affected by a variety of internal and external factors.Next, the researchers designed an improved LSTM model to analyze and predict the stability of the power system.Compared with traditional stability assessment methods, this improved LSTM model is better able to capture the timing characteristics and nonlinear relationships of the power system, thereby improving the accuracy and reliability of the assessment.This model can not only detect problems in the power system in a timely manner, but also predict potential failures and anomalies, providing factory managers with timely decision support.As a next step in the research, we performed a comprehensive stability assessment of the forestry plant's power system [12].By applying the improved LSTM model to real data, they compared it with traditional methods and found that the method based on the improved LSTM performed well in predicting power system faults and anomalies.Its ability to evaluate with high accuracy and stability makes it a powerful tool for power system management and maintenance.

Research status
The time domain simulation method is an important method for power system stability assessment.Its basic principle is to construct a mathematical model of the entire system based on the characteristics of power system components.Then, it uses data under stable operating conditions or power flow data as the initial solution of the model, and obtains the change curve of each variable over time by gradually solving a system of differential equations and a system of algebraic equations.The time domain simulation method is important because it can provide highly accurate evaluation results.It is often used as a reference for other transient stability assessment methods.In addition, it can also intuitively reflect the transient stability of the power system [13].Therefore, in large power systems, even if there are hundreds of generating units, thousands of lines and buses, the time domain simulation method can be applied.This advantage makes it widely used in power system engineering.There are many application software at home and abroad that use time domain simulation method to simulate and analyze power systems, including PSASP and PSD-BPA in China, and PSS/E in the United States.With the continuous deepening of research on transient stability assessment of power systems, time domain simulation methods are also constantly improving.For example, a method was proposed in to improve the solution accuracy by using the wide-area measurement information system to obtain power grid data as the initial value for the time-domain simulation method.In addition, literature simplifies the model to improve the calculation speed of the time domain simulation method.However, with the advent of the grid interconnection era and the expansion of the grid scale, traditional time domain simulation methods can no longer meet the needs of online real-time transient stability analysis of power systems in terms of model construction and calculation speed.Therefore, there is an urgent need to research new evaluation methods.
Compared with traditional methods, the transient stability assessment of power systems based on machine learning algorithms does not require the establishment of a complete mathematical model or the energy function of the system.Instead, it transforms the problem into a classification problem in a high-dimensional space [14].With the continuous improvement of computer computing power, the application of machine learning algorithms in high-dimensional space classification problems has also been accelerated.In the context of the rapid development of power grid big data, the power system transient stability assessment method based on machine learning algorithms has advantages that traditional solution methods do not have, and is considered to be one of the most promising research directions.The application of machine learning algorithms in power system transient stability assessment research is relatively late, but it is developing very quickly.Beginning in the late 1980s, Louis et al. introduced machine learning algorithms such as artificial neural networks and decision trees in the study of transient stability assessment of power systems.After that, a large number of algorithms and models were used in the research of transient stability assessment of power systems.Since the 21st century, machine learning has gradually developed from the shallow machine learning stage to the deep learning stage.In, the deep belief network (DBN) was introduced into the transient stability assessment of the power system, and the DBN network was constrained based on the characteristics of the power system, and the evaluation results achieved a high accuracy.However, its input characteristic quantities are the active power, reactive power, node voltage amplitude and phase angle of the line at a certain moment.The characteristics of these characteristic quantities changing with time during the transient process of the power system are not considered, and the transient stability characteristics cannot be fully analyzed.Extraction, impacts the accuracy of the evaluation model.The literature applies stacked autoencoders (SAE) in the transient stability assessment of power systems, and considers time characteristics in the selection of feature quantities.However, the proposed model does not have outstanding feature extraction capabilities for time series data.Literature proposed a transient stability assessment method that combines stacked denoising autoencoders and support vector machines.Although its model has achieved high assessment accuracy and certain generalization capabilities, it has limited feature quantities.There are the same problems as in literature on the input.In the literature, variational autoencoders (VAE) and convolutional neural networks (CNN) are combined for power system transient stability assessment, which reduces the impact of data noise on the assessment results, but its characteristic quantity is the rotor angle of the generator., angular velocity, rotor kinetic energy difference and a series of dynamic parameters are too complicated.To sum up, the existing real-time transient stability assessment models based on deep learning and data mining still have defects to varying degrees and need to be further improved.

Power system process analysis
The transient stability of the power system refers to the situation when the power system is subject to a major impact (such as short circuit fault, removal or connection of large-capacity loads, removal of lines or generating units, etc.) under normal operating conditions.Whether the machine can maintain synchronization and transition to a new equilibrium state or the ability to restore the original equilibrium state.This concept of stability is of extremely important significance in power system engineering.
When studying the transient stability problem, the main concern is that each generator in the system does not lose synchronization in the first or second swing mode.These oscillation modes are a natural response of the power system and involve changes in the angle of the generator rotor.When the system is impacted, the electromagnetic parameters will change drastically, but the generator has a large inertia and requires a certain amount of time to adjust its power output.This results in a power difference between electromagnetic power and mechanical power, which is an unbalanced torque.The unbalanced torque will change the rotation speed of each generator, thereby changing the relative position between them, that is, the power angle (the phase difference of the generator rotor relative to the synchronous frequency of the system) changes.These changes will affect the current and voltage in the system as well as the electromagnetic power of the generator.Therefore, the transient process of the power system involves a complex mutual coupling relationship between the electromagnetic transients and the mechanical motion transients between the generator rotor.
In order to study the transient stability of power systems, it is necessary to accurately analyze the changes in electromagnetic parameters and mechanical motion parameters.However, for general engineering problems, this precise analysis is not necessary because it is too complex.Therefore, the main goal in transient stability analysis is to determine whether the generators in the system can maintain synchronous operation under large shocks, that is, to analyze the change of the generator rotor angle (power angle) with time.
In actual engineering, in order to simplify the analysis, some assumptions are usually made, such as ignoring the non-periodic component of the stator current, the periodic component of the rotor current, the influence of system parameters changing with frequency, the rotor motion being affected by zero sequence and negative load during an asymmetric fault.The influence of sequence current and the function of the prime mover speed regulator are not considered.These assumptions can make the analysis more feasible.However, when considering more complex systems and more accurate simulations, these factors may need to be taken into account.
In short, the transient stability assessment of the power system is one of the key factors to ensure that the power system can maintain operation in the face of large impacts.It needs to comprehensively consider electromagnetic transients and mechanical motion transients to ensure the reliability and stability of the power system.stability.The simple power system wiring diagram and its equivalent circuit diagram under various operating states are shown in Figure 1.A simple single-machine infinity system is described in Figure 1.A single generator unit supplies power to the infinity remote end through double circuit lines.Its standard unit value mathematical model is shown in Equation (1).
In the formula,  is the deviation between the rotor angular speed and the synchronous speed,  is the rotor angle,   is the mechanical power, and   is the electromagnetic power.
Under normal conditions, the system reactance is shown in equation (2).
The electromagnetic power characteristics are shown in equation (3).
Under the fault state, a short-circuit fault occurs at the beginning of the transmission line of the system.At this time, the transfer reactance between the generator and the infinite system is as shown in Equation ( 4):

Feature selection
The application of the WAMS (Wide-Area Measurement System) information platform in the power system provides convenience for obtaining measured real-time data of large power grids and using them for deep learning model analysis to solve the TSA (Transient Stability Analysis) problem of the power system.The core of the WAMS platform is the PMU (Phasor Measurement Unit), which can measure the power angle of the generator and the voltage phasor at the bus node in real time, providing a rich set of alternatives for feature selection.There are many characteristic quantities in the power system, and each characteristic quantity reflects the operating status of the power system from different perspectives.Classified from the spatial level, these feature quantities can be divided into grid-side parameters and generator-side parameters.The gridside parameters include system load and line flow, while the generator-side parameters include mechanical kinetic energy, rotor angle, angular velocity, angular acceleration, etc.These parameters characterize the operating status of the generator.
Classified from the time level, power system characteristic quantities can be divided into two categories: static and dynamic.Static characteristics are mainly used to analyze the static stability of the system, including the electrical quantities that can be measured in the entire power system before the fault, such as line flow, system load, and generator output.Dynamic characteristics refer to a series of IOP Publishing doi:10.1088/1742-6596/2703/1/0120376 physical quantities that change dynamically with time after a system failure, such as generator rotor angle, angular velocity, and angular acceleration.These dynamic characteristics contain changes in system impact information and are crucial to the analysis of TSA problems.
The application of the WAMS information platform makes it easier to obtain these critical real-time data, providing important support for TSA issues in the power system.By utilizing these data, deep learning models can be built to analyze the transient stability of the power system, helping operators better monitor and manage the power system and improve system reliability and stability.Therefore, the development and application of the WAMS platform is of great significance to the power system field and is expected to provide more innovative solutions for the safe operation and optimization of power systems in the future.In the actual feature screening process, you may indeed face some challenges, and not all the above principles can be fully satisfied.In this case, combined with the methods and experience in the existing literature, a feature quantity screening method based on LSTM is proposed, in which the generator speed deviation is used as the initial feature quantity.

LSTM
Long Short-Term Memory (LSTM) is a special type of recurrent neural network (RNN) that can learn long-term dependency information.LSTM was proposed by Hochreiter & Schmidhuber (1997) and has been widely used in various deep learning tasks in recent years.
The key to LSTM is its cell state, that is, the "memory" part of the network.The cell status runs along the entire chain, with only a few small linear interactions.Information can be relatively easy to transmit here and remain unchanged.LSTM has the ability to add or delete information to the unit state, which is completed by the so -called door control unit.The door control unit is a method that allows information to pass.The output of the SIGMOID layer is a 0 to 1 number.0 represents "the amount that is not allowed", and 1 represents "all the amount can pass."LSTM has three doors to protect and control the cell state, as shown in Figure 2. The core idea of LSTM is to introduce three key gating mechanisms: forgetting gate, input gate and output gate.The forget gate determines how much information we want to retain from the previous memory, the input gate determines how much new information we want to add to the memory, and the output gate determines how much memory we want to pass on to the next step.
Specifically, LSTM works as follows: The forgetting gate performs a nonlinear transformation on the output of the previous moment through an activation function (such as a sigmoid function), then multiplies it with the weight matrix, and finally adds the result to the output of the current moment.During this process, the value in the memory unit at the previous moment will be forgotten, and only useful information will be retained.
The input gate performs a nonlinear transformation on the input at the current moment through an activation function (such as a sigmoid function), then multiplies it with the weight matrix, and finally adds the results.This result will be input to the forget gate and memory unit: Candidate memory cells, memory cells are used to save and update information, and their values are determined by the input gate, forget gate and memory unit at the previous moment.The nonlinear transformation of the memory unit is implemented by an activation function (such as the tanh function): Cell state updates are used to preserve long-term information.The cell state is the only channel in the LSTM model that transmits information over time.It controls the inflow and outflow of information through the forget gate and the input gate.Due to the introduction of cell states, the LSTM model can better preserve and transmit long-term information, solving the problem of gradient disappearance or gradient explosion encountered by the traditional RNN model when processing long sequences: The output gate performs a nonlinear transformation on the value of the memory unit, and then multiplies it with the weight matrix, and finally obtains the output at the current moment: Hidden status updates: Among them,   is the forget gate,   is the input gate,   is the update gate,   is the output gate, ℎ  is the node feature representation at time t,   is the original feature representation,   1 ,   1 ,   ,   ,   is a learnable parameter.

Experiment
This paper uses the historical load, temperature, and weather conditions of a certain city as prediction samples to predict the stability of the power system, and compares the predictions with the BP neural network and BAS-BP neural network algorithms respectively.

Experimental setup
In terms of model architecture, we chose a model structure that includes an embedding layer, an LSTM layer, a fully connected layer, and an output layer.The dimension of the embedding layer is set to 64, the number of hidden units of the LSTM layer is 2 and the learning rate is set to 0.001.The training epoch is set to 1000.Adam is used as the optimizer and cross-entropy loss is used as the loss function.
Our experimental environment is equipped with a computer with a GPU to accelerate model training and evaluation.We used the PyTorch deep learning framework to implement the LSTM model and used related libraries for data processing and visualization.

Experimental results
For the above model, we first observed its convergence during model training.Figure 3 is the convergence diagram of the traditional BP neural network, Figure 4 is the convergence diagram of the BAS-BP network, and Figure 5 is the convergence diagram of our model.It can be seen from Figure 5 that the load curve obtained by using the LSTM neural network is closer to the actual load curve.It can be seen in Figure 4 and Figure 5 that LSTM can converge to the target errors within 90 periods, while the traditional BP neural network and BAS-BP neural network cannot converge to the target error after 2000 generations of training, indicating that the LSTM neural network The network converges faster than the traditional BP neural network and BAS-BP neural network, and has higher short-term load forecasting accuracy.
This paper also verifies the effectiveness of the proposed method by comparing it with existing methods for feature extraction, such as principal component analysis (PCA), random forest algorithm (RF), and convolutional neural network (CNN).After the initial screening feature quantities are extracted by the above model, they are all input into the deep neural network with the same network structure for further learning and classification, and softmax is used for classification.The specific experimental results are shown in Table 1.From the results, it can be seen that the LSTM model has a better ability to extract feature quantities than the first three.It has advantages in both the model's accuracy and the model's missed detection rate of instability.The final comprehensive evaluation factor is also the highest of the four models.This also verifies the reliability of our model.

Summary
Research on power system stability assessment in forestry plants provides important support for the sustainable operation and development of power systems.Through the in-depth exploration of this study, we not only emphasize the critical role of power system stability in factory production efficiency, employee safety, and environmental sustainability, but also propose a new method based on an improved LSTM model to improve stability assessment.Accuracy and reliability.We verified the reliability of this method through experiments.

Figure 1
Figure 1 Simple power system diagram.

Figure 3
Figure 3 BP neural network convergence diagram.

Figure 4
Figure 4 BAS-BP neural network convergence diagram.

Figure 5
Figure 5 Convergence diagram of this article's model.

Table 1
Comparison of results from different extraction methods.