# A Predictive Model Using Long Short-Time Memory (LSTM) Technique for Power System Voltage Stability
## 1 Introduction  
Maintaining a continuous and reliable power supply for consumer loads hinges on the crucial task of ensuring the operational stability of the power grid. Modern power systems, as shown in Figure 1, are intricate systems that are vulnerable to a variety of factors, including time-varying loads, Renewable Energy Sources (RESs), equipment failures, and unexpected events such as natural disasters. These factors can cause significant variations in power generation and consumption, leading to instability in power systems [1]. The initial investigations developed several methodologies for evaluating the VS of the power system. The analytical method [2; 3; 4], the honey badger algorithm [5; 6] for DG allocation and size, the continuation power flow method [7], the singular value decomposition method [8], and predictive control [9] are some of these methods. In recent years, deep learning (DL) and machine learning (ML) methods have shown great potential in addressing real-world applications such as natural language processing, speech recognition, autonomous vehicles, and image and vision processing, as well as electric load and energy prediction [10]. These techniques have also been applied in electric power systems for adaptive voltage control (VVC) in microgrid integration, smart inverters, microgrid energy management, solar photovoltaic power forecasting, fault diagnosis for the active distribution grid, VS forecasting of the power system [11], and overall stability and security of power systems [10]. In [12; 13], we used deep reinforcement learning (DRL) techniques to optimize VVC in active distribution networks (DN), addressing issues such as power loss and voltage changes on the bus. In [14], we created a DRL model using a soft actor-crithe VVC of smart solar photovoltaic inverters based on droop operation. The proposed multiagent DRL method coordinates optimal VVC for solar photovoltaic inverters and static var compensators, maximizing nodal voltage in distributed networks. In [15], we used a deep Q network and a deep deterministic policy gradient method to stabilize the voltage of a 200-bus power system across various operating conditions, aiming to improve both the efficiency of training and the precision of the proposed algorithm. The problem of the frequency stability of electrical systems based on the ML and DL algorithms has garnered considerable interest [16; 17; 18; 19]. In [19], a hybrid technique was introduced that combines fuzzy logic, deep learning, and a grey wolf optimizer based on ordered position to enhance microgrid frequency stability. In [20], a K-vector nearest-neighbor algorithm was described for dynamic frequency control, accounting for changes in wind turbine speed and varying loads over time. In [21; 22; 23; 24; 25], we employed a spike neural network to tune the coefficients of a nonlinear integral backstepping controller and address frequency deviations in an autonomic microgrid caused by the intermittent nature of RESs, such as solar and wind energy. The primary aim of this network is to eliminate vanishing gradients, a common issue in regular recurrent neural networks (RNNs) that can hinder the capture of long-term dependencies within datasets. The long short-term memory (LSTM) network, with its gating mechanism, allows for selective retention or discarding of information from previous time steps, making it well-suited for modeling sequences with persistent dependencies. The remarkable precision of the LSTM classifier suggests that the sequential description of the data in this dataset plays a significant role in the prediction of the target variable. We proposed using long short-term memory (LSTM) to forecast the VS of the IEEE 33-bus approach. The LSTM model can determine the stability or instability of the power system based on historical inputs, such as load demand, generation capacity, and line parameters.