Next Article in Journal
Experimental Determination of a Mixture Composed of Camisea Natural Gas and CO2 Laminar Burning Velocity
Next Article in Special Issue
Evaluation of an Infinite-Level Inverter Operation Powered by a DC–DC Converter in Open and Closed Loop
Previous Article in Journal
Summer Energy Use and Comfort Analysis in Rural Chinese Dwellings: A Case Study of Low-Income Older Populations in Shandong
Previous Article in Special Issue
Electricity Bill Savings from Reduced Household Energy Consumption in Apartment Complexes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research on Voltage Prediction Using LSTM Neural Networks and Dynamic Voltage Restorers Based on Novel Sliding Mode Variable Structure Control

1
College of Electrical and Information Engineering, Beihua University, Jilin 132021, China
2
Beijing Shougang Mining Investment Co., Ltd., Beijing 100041, China
*
Author to whom correspondence should be addressed.
Energies 2024, 17(22), 5528; https://doi.org/10.3390/en17225528
Submission received: 27 September 2024 / Revised: 25 October 2024 / Accepted: 29 October 2024 / Published: 5 November 2024
(This article belongs to the Special Issue Energy, Electrical and Power Engineering: 3rd Edition)

Abstract

:
To address the issue of uncertainty in the occurrence time of voltage sags in power grids, which affects power quality, a voltage state prediction method based on LSTM neural networks is proposed for predicting voltage states. For the problem of quickly and accurately compensating for voltage sags, a DVR system based on a new approach law of sliding mode variable structure control is proposed, which significantly reduces chattering, improves response speed, and enhances the robustness of the system. The stability of the system is proven based on Lyapunov stability theory. Simulation experiments are conducted to analyze the voltage state prediction effect based on the LSTM neural network and the compensation effect of the novel reaching law of sliding mode variable structure control under different levels of voltage sag, validating the effectiveness and correctness of the proposed solution.

1. Introduction

With the advancement of technology and the development of society, there is an increasing demand for electrical energy across various sectors, accompanied by a higher expectation for the quality of electrical power from consumers [1,2]. Electrical power quality encompasses phenomena such as surges, flickers, harmonics, and voltage sags (also known as voltage dips), among which voltage sags occur the most frequently [3,4,5]. Dynamic voltage restorers (DVRs) have the capability to compensate for both the magnitude and phase of voltage sags, making them the most economically effective power equipment for addressing voltage sag issues [6,7,8,9]. Furthermore, with the increasing utilization of large-scale grid-connected wind power generation, the low-voltage ride-through capability of wind power generation has received more attention, and DVRs, as voltage compensation devices, have found widespread application in this field as well [10,11].
Currently, research on dynamic voltage restorers (DVRs) primarily focuses on voltage detection algorithms, topology structures, control algorithms, and so forth [12,13,14,15,16]. The compensation performance of DVR systems mainly depends on their control systems [17,18]. Among the various control strategies studied, prevalent ones include feedforward control, feedback control, dual feedforward combined with feedback control, H-infinity control [19,20,21,22], fuzzy control, artificial neural network control, and other methods [23,24]. Each of these control methods has its own advantages and disadvantages concerning steady-state error, dynamic response, robustness, adaptability to changes in control and hardware, and practicality.
In [1], a detailed overview of power quality analysis and control technologies for the smart grid is provided, emphasizing the potential of new technologies in addressing power quality challenges. It is shown in [2] that the use of custom power devices can significantly reduce voltage sags and momentary interruptions, thereby improving overall power quality. Similarly, the implementation of a dynamic voltage restorer (DVR) in an off-grid hybrid renewable energy system enhances both power quality and system stability, as demonstrated in [3]. The role of custom power devices in mitigating power quality issues within distributed generation systems is explored in [4], highlighting their importance in improving system reliability and stability. Moreover, the application of a battery-based DVR in grid-integrated PV systems has been shown to effectively reduce voltage fluctuations and harmonics, improving voltage quality, as discussed in [5].
In the context of wind turbine systems, [6] presents the design of parallel powertrains, which are shown to enhance system availability and reliability, particularly in high-demand environments. The zero active power tracking technique, explored in [7], significantly enhances the performance of DVRs by improving their voltage sag compensation capabilities. Further, the integration of an isolated H-bridge DC-DC converter into a transformerless DVR system, as outlined in [8], results in substantial improvements in power quality by mitigating voltage disturbances. A comprehensive review of DVR topologies, power converters, and control methods is provided in [9], summarizing their applications and contributions to enhancing power quality.
The fault ride-through capability of grid-connected PV systems can be improved using DVRs, as demonstrated in [10], where system stability under fault conditions is significantly enhanced. Similarly, in [11], the integration of battery and superconducting magnetic energy storage (SMES) with DVRs substantially improves the voltage sag performance of grid-connected hybrid PV–wind power systems. A conventional three-wire DVR is shown in [12] to effectively attenuate zero-sequence voltage, further improving power quality. In [13], the power quality of grid-connected photovoltaic systems under partial shading conditions is addressed using a Trans-z-source inverter. A linearly decoupled control method for DVRs without energy storage is proposed in [14], which improves power quality while simplifying the control system design.
Reviews of DVR technology, such as the one in [15], trace its development and applications, suggesting future research directions for enhancing power quality. The high-frequency link cycloconverter-based DVR proposed in [16] is effective in mitigating voltage sags and improving power quality. The fault ride-through capability of grid-connected systems using a Third-Harmonic Injection Pulse Width Modulation (THIPWM)-fired Five-Level Diode Clamped Multilevel Inverter (DCMLI)-based Doubly Fed Induction Generator (DFIG) is enhanced through the use of DVRs, as explored in [17]. In [18], a robust control design using quantitative feedback theory is proposed for multi-functional DVRs, improving both power quality and system robustness.
Further advancements in DVR control systems are discussed in [19], where high-performance stationary-frame controllers are compared, revealing significant enhancements in voltage recovery capabilities. Similarly, the use of flying capacitor multilevel converters operated by repetitive control in DVR applications, as discussed in [20], leads to notable improvements in voltage quality. The integration of fuzzy neural and neuro-fuzzy controllers in DVR systems, as explored in [21,22], results in significant improvements in power quality, particularly when dealing with nonlinear loads.
Sliding mode control is introduced in [23] for its effectiveness in improving the robustness and disturbance rejection capabilities of electromechanical systems. In [24], a three-phase DVR utilizing sliding mode control and an adaptive notch filter is shown to protect sensitive loads and enhance power quality. Furthermore, the study in [25] proposes time-varying and constant switching frequency-based sliding mode control methods for transformerless DVRs employing half-bridge voltage source inverters (VSIs), significantly improving voltage control performance.
The model predictive control of packed U cells in transformerless single-phase DVRs, as presented in [26], proves effective in compensating for voltage sags. A series-side three-phase decoupling unified power quality controller is proposed in [27], which significantly reduces voltage and current fluctuations, thus improving power quality. A data-driven approach for predicting voltage sag residual voltage, detailed in [28], shows high accuracy and feasibility using real grid data from East China. Additionally, a method for identifying voltage sag causes, utilizing bidirectional Long Short-Term Memory (LSTM) and the attention mechanism, is presented in [29], focusing on accurate cause identification.
Real-time methods for predicting voltage sag probability are explored in [28], where high prediction accuracy is achieved using new voltage sag characteristics and actual measurement data. In [30], sliding mode control technology is applied to improve the accuracy of rotor speed and position estimation in high-performance permanent magnet synchronous motor (PMSM) applications, enhancing system robustness and adaptability. Finally, in [31], an improved non-singular fast terminal sliding mode controller combined with a sliding mode disturbance observer is used for load disturbance compensation, significantly improving dynamic response and disturbance rejection capabilities while reducing chattering.
Rapidly identifying voltage sags and providing timely compensation is of significant importance. LSTM (Long Short-Term Memory) networks, with their memory characteristics, are better suited to learning the features of time series data. This enhances the model’s ability to process temporal data and improves recognition accuracy. The sliding mode control (SMC) strategy is recognized as an effective nonlinear control strategy, characterized by rapid response, insensitivity to parameter variations and disturbances, and simplicity in physical implementation [21]. However, traditional SMC control strategies suffer from serious chattering phenomena. Although the SMC method proposed in [22] exhibits good performance, replacing the sign function with a hysteresis function cannot completely eliminate chattering, which consequently leads to a time-varying switching frequency. Another method proposed in [23] is based on the variable boundary layer approach, but the selection of the boundary layer is not based on equation analysis. However, inaccurate boundary layer selection may result in steady-state errors [25].
In response to the aforementioned issues, this paper proposes a dynamic voltage restorer based on LSTM neural networks for voltage prediction and novel sliding mode variable structure control. Additionally, a novel reaching law is designed, which significantly enhances the system’s response speed and reduces chattering.

2. Topology Structure and Operating Principle of DVR System

The DVR mainly consists of a voltage detection module, energy storage device, inverter unit, control section, filter, series transformer, etc. [9]. The system structure is shown in Figure 1.
The operational principle of the dynamic voltage restorer (DVR) involves the energy provision from the energy storage unit. The control section utilizes the detected characteristics of voltage sags to compute the required compensatory voltage difference. It then generates control signals to trigger the conduction of the inverter, thereby producing corresponding compensatory voltage. This voltage is appropriately filtered through an LC filtering circuit to remove high-order harmonics generated by the inverter section, forming compensatory voltage that meets the requirements. Subsequently, this compensatory voltage is serially connected to the distribution network via a secondary loop with a boosting transformer. This process enables the overlay of the voltage on the distribution network side with the compensatory voltage, ensuring that the load receives qualified voltage and guaranteeing the reliability of load power consumption.
When no voltage sag is detected, the switching device of the dynamic voltage restorer (DVR) remains open. During this time, the DVR operates in bypass standby mode. The detection module continuously monitors the amplitude and phase variations in the voltage at the power supply side of the distribution network. Upon detecting a voltage sag in the distribution network, the bypass switch is swiftly closed, initiating the compensation process of the DVR. At this point, the DVR is serially connected to the distribution network, and the control unit calculates the required compensatory voltage signal based on the detection signal. It then drives the inverter to generate compensatory waveforms, ensuring stable voltage at the load side and avoiding equipment shutdowns caused by voltage sags.
The following equations can clearly express the working principle of the DVR, where the grid voltage is denoted as u s , the voltage at the load side of the system is denoted as u load , and the compensating voltage is denoted as u dvr . When the grid voltage drops by u , if there is no DVR, the load voltage is as follows:
u load = u s u
When the DVR is connected to the system, the load voltage is
u load = u s u + u dvr ,
Setting the compensating voltage u dvr = u allows for voltage compensation to be achieved.

3. Mathematical Model of DVR

The main circuit of the DVR employs a fully controlled SPWM (Sinusoidal Pulse Width Modulation) inverter configuration. Each phase is connected to the grid via an isolation transformer in series. The basic circuit structure of the three-phase, three-wire DVR is depicted in Figure 2.
In this figure, u s A , u s B , and u s C represent the grid-side voltages; u i A , u i B ,   u i C denote the voltages output by the voltage source inverter; u c A , u c B , and u c C signify the compensating voltages after passing through the LC output filter of the voltage source inverter; i LA , i LB , and i LC and i CA and i CB represent the inductor currents and capacitor currents, respectively; and L f and C f denote the filtering inductance and filtering capacitance. According to the defined voltage and current directions in Figure 2, and by converting leakage impedance and losses to the secondary side of the transformer, neglecting excitation current and system inductance, the system mathematical model of the DVR can be established based on Kirchhoff’s law:
L f d i L k t d t = u i k t u C k t i L k t R C f d u C k t d t = i L k t i C k t ,
In Equation (1), k = 1, 2, 3 represents the three phases.
Considering the lack of independence among the three-phase variables in a symmetrical three-phase system, which is not conducive to the design of control systems, Equation (1) is transformed into the classical Park transformation to convert it into the synchronous rotating d-q coordinate system. The mathematical model is as follows [29]:
d u C d d t = ω u cq + 1 C f i L d 1 C f i C d d u C q d t = ω u cd + 1 C f i L q 1 C f i C q d i L d d t = ω i L q + 1 L f u i d 1 L f u C d 1 L f i L d R d i L q d t = ω i L d + 1 L f u i q 1 L f u C q 1 L f i L q R ,
u C d and u C q are the d-q axis components of the compensating voltage after passing through the LC output filter of the voltage source inverter. u i d and u i q are the d-q axis components of the voltage output by the voltage source inverter. i L d , i L q , i C d , and i C q are the d-q axis components of the inductor currents and capacitor currents, respectively. ω is the angular velocity of the grid voltage.

4. Voltage Sag Prediction Based on LSTM Neural Network Model

LSTM (Long Short-Term Memory) is a specialized type of recurrent neural network (RNN) designed to capture long-term dependencies in sequential data, making it particularly well suited for tasks such as time series analysis. Unlike traditional RNNs, which often struggle to retain important information over longer sequences due to issues like vanishing gradients, LSTM introduces a gating mechanism that enables it to selectively retain, update, or discard information as needed. This mechanism includes three types of gates: the forget gate, input gate, and output gate. These gates allow LSTM to control the flow of information, ensuring that critical historical data are retained while irrelevant or redundant information is discarded.
The forget gate decides which parts of the previous memory to retain, while the input gate determines what new information should be stored. The output gate controls the amount of information that will be passed on as the current output. By regulating the interaction between these gates, LSTM models can adapt quickly to changing trends and maintain long-term dependencies, even in the presence of significant fluctuations in the data.
This makes LSTM particularly effective in tasks like predicting voltage trends in power grids, where sudden changes and long-term patterns are both crucial. Through multiple iterations and by minimizing errors during training, LSTM models can provide highly accurate predictions based on time-varying data. Figure 3 shows the flowchart of the LSTM prediction neural network designed in this paper for forecasting voltage sag.
In this study, based on the voltage sag data of the 10 kV A-phase voltage that occurred in a certain region of mainland China on 25 May 2024, at 14:36, we constructed and trained a Long Short-Term Memory (LSTM) network model to predict the voltage state. The detailed logic and methodology of this process are as follows:
First, during the data preprocessing stage, the voltage data were collected, cleaned, and normalized. This step is crucial before training the model, ensuring the stability and efficiency of the data during the training process. We extracted the time and voltage columns from the dataset and normalized the voltage data to a specific range.
Next, we created the time series data by structuring the normalized voltage data into input and output sequences. This step involved pairing each data point in the voltage series with its subsequent data point, forming the time series data necessary for training the LSTM network.
In the model construction phase, we designed an LSTM network architecture consisting of an input layer, an LSTM layer, and a fully connected layer. The input layer receives the normalized voltage data, the LSTM layer captures the long-term dependencies in the time series data, and the fully connected layer generates the final prediction results.
For model compilation, we selected the Adam optimizer and the Mean Squared Error (MSE) loss function. The Adam optimizer is an adaptive learning rate optimization algorithm suitable for handling sparse gradients, while the MSE loss function measures the error between the predicted values and the actual values.
During the model training phase, we trained the LSTM network using the training dataset. By setting parameters such as the maximum number of epochs, gradient threshold, and learning rate, we gradually optimized the model parameters to minimize the loss function. We employed a learning rate schedule that reduces the learning rate periodically to ensure better convergence towards the optimal solution in the later stages of training.
After training the model, we used it to make predictions. In the prediction phase, the time series data were input into the model to generate the corresponding predicted voltage values. To facilitate comparison, we denormalized the prediction results, restoring them to the original range of the voltage data.
Finally, we plotted a comparison between the actual and predicted voltage values to visually demonstrate the model’s prediction performance. The comparison plot shows that the LSTM model can accurately fit the voltage data, validating its effectiveness in time series data prediction.
Through the aforementioned steps, we successfully constructed and validated an LSTM-based voltage data prediction model, providing an effective method for analyzing and predicting time series data.
In this study, a Long Short-Term Memory (LSTM) network model was constructed and trained to achieve high-precision predictions of voltage data. The evaluation metrics show that the Mean Absolute Error (MAE) is 0.1030, and the coefficient of determination (R2) is 0.9956. These results indicate that the model has a low prediction error and a very high degree of fit.
As shown in Figure 4, the predicted curve closely matches the actual curve, further validating the model’s effectiveness and stability. This demonstrates that the LSTM model can accurately predict voltage data and fully meets the prediction requirements. In summary, the constructed LSTM model performs exceptionally well in time series data prediction, indicating its broad application potential.

5. DQ Voltage Sag Detection Algorithm Based on Three-Phase Instantaneous Reactive Power Theory

By applying the instantaneous reactive power theory to a three-phase system, the three-phase voltage can be transformed as follows.
u d u q = C u a u b u c ,
C is the transformation matrix, specifically expressed as follows.
C = 2 3 sin ( ω t ) sin ( ω t 2 3 π ) sin ( ω t + 2 3 π ) cos ( ω t ) cos ( ω t 2 3 π ) cos ( ω t + 2 3 π ) ,
Since the voltage in the distribution network can be understood as the superposition of the fundamental voltage and harmonic voltages at various frequencies, the three-phase voltages a, b, and c can be expressed as follows:
u a = 2 U sin ( ω t + θ ) + i = 2 n 2 U i sin ( i ω t + θ i ) u b = 2 U sin ( ω t + θ 2 3 π ) + i = 2 n 2 U i sin ( i ω t + θ i 2 3 π ) u c = 2 U sin ( ω t + θ + 2 3 π ) + i = 2 n 2 U i sin ( i ω t + θ i + 2 3 π ) ,
U is the root mean square (RMS) value of the fundamental voltage, and U i is the RMS value of the harmonic voltage.
After transforming Equations (3–19), the following equation is obtained:
u d = U sin θ + i = 2 n U i sin ( i ω t + θ i ) u q = U cos θ + i = 2 n U i cos ( i ω t + θ i ) ,
The amplitude and phase information of the fundamental component can be obtained from u d and u q in the above equation. First, after applying a low-pass filter to filter out the higher harmonic components, u ¯ d and u ¯ q are obtained, with values U sin θ and U cos θ , respectively. Therefore,
u = u ¯ d 2 + u ¯ q 2 ,
θ = arctan u ¯ q u ¯ d ,
u is the RMS value of the voltage sag, and θ is the phase angle.
After being transformed using the C matrix, the three-phase AC current and voltage vectors are converted into DC vectors. The transformation principle is illustrated in Figure 5 as follows:
Firstly, u d and u q are obtained by sampling the grid-side voltage, followed by Clarke and Park transformations. The harmonic components are filtered out using a low-pass filter (LPF) to obtain the DC components u ¯ d and u ¯ q . By applying the inverse coordinate transformation, the three-phase fundamental voltage can be derived. Then, by subtracting the reference voltages U ar , U br , and U cr , the compensation voltage required by the DVR can be obtained.

5.1. Voltage Sag Simulation Experiment and Analysis

From 0 to 0.1 s, no voltage sag occurs, and the voltage peak value is 311 V. From 0.1 to 0.2 s, the grid voltage drops by 20%, and from 0.2 to 0.3 s, the grid voltage returns to normal.
When the grid voltage sags by 20%, the grid voltage peak value is u i p = 220 × 2 × 0.8 248.901 V , and the compensation voltage is u c p = u N p u i p = 220 × 2 248.901 = 62.23 V . The simulated experimental waveform is shown in Figure 6.
As seen in Figure 6, the comparison between the expected compensation voltage of 62.23 V and the detected output value of 62.2 V shows a difference of 0.03 V, which is 0.048% of the expected value. The dq transformation voltage sag detection method, based on instantaneous reactive power theory, effectively detects voltage sags and provides the correct compensation voltage, offering an accurate compensation voltage reference value.

5.2. Voltage Swell Simulation Experiment and Analysis

From 0 to 0.1 s, no voltage swell occurs, and the peak value is 311 V. From 0.1 to 0.2 s, the grid voltage swells by 20%, and from 0.2 to 0.3 s, the grid voltage returns to its normal value.
When the grid voltage swells by 20%, the peak grid voltage is u i p = 220 × 2 × 1.2 373.34 V , and the compensation voltage is u c p = u N p u i p = 220 × 2 373.34 = 62.21 V . The three-phase compensation voltage is shown in Figure 7.
As seen in Figure 7, when a 20% voltage swell occurs, the expected compensation voltage is 62.21 V, while the detected output value is 62.22 V, resulting in a difference of 0.01 V, which is 0.016% of the expected value. The dq transformation voltage detection method, based on instantaneous reactive power theory, can effectively detect voltage swell and provide the correct compensation voltage, offering an accurate compensation voltage reference value.

6. Analysis of DVR Control System Design

This paper addresses the challenges posed by traditional PI controllers in optimizing controller parameters and system performance for inherently nonlinear, multivariable, and strongly coupled DVR systems, especially in the presence of significant nonlinear load disturbances. To overcome these challenges, sliding mode control is introduced into the voltage outer loop, and a novel reaching law is designed to expedite system response time and reduce oscillations.
Consider the following controlled object:
x t = f x , t + b u t ,
where f x , t and b are both known, and b > 0 .
The sliding mode function is given by the following:
s t = c e t + e t ,
where c > 0 and satisfies the Hurwitz condition.
The tracking error is as follows:
e t = x d t x t e t = x d t x t ,
where x d ( t ) represents the ideal position signal.
Then,
s t = c e t + e t = c x d t x t + x d t x t = c x d t x t + x d t + f x , t b u t   
An exponential reaching law s 1 , a constant velocity reaching law s 2 , and an improved new reaching law s 3 are used as follows:
s 1 = ε sgn s 1 k s 1   ε > 0 , k > 0 ,
s 2 = ε sgn s 1   ε > 0 ,
s 3 = ε s 3 α sgn ( s 3 1 ) sgn ( s 3 ) k s 3 s 3 α sgn ( s 3 1 ) ε > 0 , k > 0 ,   0 < α < 1 .
The novel approach law adapts to system state changes by altering the shape of the sliding mode surface, thereby reducing chattering. The exponential approaching term ensures that the system state converges to the sliding mode surface within a finite time, improving rapidity. The absolute value and sign function terms effectively suppress disturbances and uncertainties in the system, enhancing robustness.
Therefore, the classical sliding mode convergence law is
u 1 t = 1 b ε sgn s 1 + k s 1 + c x d x + x d + f x , t .
The sliding mode controller based on the uniform convergence law is as follows:
u 2 t = 1 b ε sgn s 2 + k s 2 + c x d x + x d + f x , t .
The sliding mode controller based on the novel exponential convergence law proposed in this paper is
  u 3 t = 1 b ( ε s 3 α sgn ( s 3 1 ) sgn ( s 3 ) + k s 3 s 3 α sgn ( s 3 1 ) + c ( x d x ) + x d + f ( x , t ) ) .
Taking the command signal as x d ( t ) = sin ( t ) , with the initial state of the controlled object as [−0.15 0.15], the controllers given by Equations (18–20) are employed, where c = 15 ,   ε = 5 ,   k = 10 ,   α = 0.2 , respectively. The simulation results are shown in Figure 8.

6.1. Dynamic Voltage Restorer Control System

The DVR output voltage error is defined as follows:
u 2 t = 1 b ε sgn s 2 + k s 2 + c x d x + x d + f x , t ,
where u d * and u q * are the reference values of compensation voltage in the d-q coordinate system, and u c d and u c q are the actual output values of compensation voltage from the DVR.
Then, the dynamic equation of the output voltage error is given by the following:
e d = ω u cq 1 C i L d + 1 C i C d e q = ω u cd 1 C i L q + 1 C i C q ,
We take the sliding surface as the proportional–integral form of the output voltage error, i.e., the integral sliding surface:
s d = e d + k d e d d t e d 0 s q = e q + k q e q d t e q 0 ,
The purpose of adding the constant terms e d ( 0 ) and e q ( 0 ) is to ensure that the sliding surface also satisfies the sliding condition under the initial conditions of the system so that the sliding surface is only in the sliding phase and does not yet reach the reaching phase, thereby improving the system’s response speed and ensuring robustness.
Then, the expression for the derivative of the sliding surface is as follows:
s d = ω u cq 1 C f i L d + 1 C f i C d + k d e d s q = ω u cd 1 C f i L q + 1 C f i C q + k q e q ,
The convergence law is as follows:
s d = ε d s d α d sgn ( s d 1 ) sgn ( s d ) k d s d s d α d sgn ( s d 1 ) s q = ε q s q α q sgn ( s q 1 ) sgn ( s q ) k q s q s q α q sgn ( s q 1 ) ,
Combining Equations (24) and (25), the inner loop current reference value can be obtained as follows:
i L d * = C f ( ω u c q + 1 C f i C d + k d e d + ε d s d α d sgn ( s d 1 ) sgn ( s d ) + k d s d s d α d sgn ( s d 1 ) ) i L q * = C f ( ω u c d + 1 C f i C q + k q e q + ε q s q α q sgn ( s q 1 ) sgn ( s q ) + k q s q s q α q sgn ( s q 1 ) ) ,
Once the reference values for the inner loop currents are obtained, the dual-loop control of the DVR system can be constructed. The voltage outer loop adopts sliding mode control, while the current inner loop adopts PI control. A control block diagram of the system is shown in Figure 9:

6.2. Stability Proof

Define the Lyapunov function as follows:
V = 1 2 s d 2 + 1 2 s q 2 .
Then,
V = s d s d + s q s d ,
V = s d ε d s d α d sgn ( s d 1 ) sgn ( s d ) k d s d 2 s d α d sgn ( s d 1 ) s q ε q s q α q sgn ( s q 1 ) sgn ( s q ) k q s q 2 s q α q sgn ( s q 1 ) .
Because ε > 0 , ε d > 0 , ε q > 0 ; s d · s g n S d > 0 ; s q · s g n ( s q ) > 0 . Because all parameters are positive,
V < 0 .
Thus, it is proven that the designed controller is stable in the sense of Lyapunov.

7. Simulation Experiment Study

7.1. System Modeling

To further validate the effectiveness and feasibility of the proposed DVR based on sliding mode control, simulation modeling is conducted in the Matlab Simulink system. In the simulation model, the grid voltage is set to 380 V with a frequency of 50 Hz, and the DVR series transformer turn ratio is 1. The parameters of the LC filter are set as follows: inductance L f = 0.52   mH ; resistance R f = 0.025   Ω ; and capacitance C f   = 120   µ F .

7.2. Voltage Sag Compensation Analysis

In the simulation, initially, the grid voltage remains normal from 0 to 0.06 s, with a peak phase voltage of 311 V, and the DVR is in bypass mode without participating in voltage compensation. From 0.06 to 0.16 s, a symmetrc three-phase voltage sag occurs, causing the grid voltage to drop to 80%. At this point, the DVR enters compensation mode, and at 0.16 s, the grid voltage returns to normal, and the DVR exits compensation mode. The proposed method (SMC1) is compared with traditional PI control, classical sliding mode control based on the convergence law, and sliding mode control with the uniform convergence law (SMC3). The waveforms of the grid voltage, compensation voltage, and load voltage are shown in Figure 10.
Taking phase A voltage as an example, when the voltage drops to 80%, the load voltage of the DVR under different control methods is shown in Figure 11:
Based on PI control, the DVR can restore the load voltage to normal within 0.001 s, but oscillations are present with an overshoot of 6.7%. The adjustment speed is slow, and there is a large steady-state error. On the other hand, sliding mode control immediately outputs the limited value of the controller at the beginning, resulting in the maximum output without overshoot and a faster dynamic response. The DVR based on SMC2 control can restore the load voltage to normal within 0.0004 s, while the DVR based on SMC3 control can achieve the same within 0.001 s. The DVR based on the novel convergence law of SMC1 control can restore the load voltage to normal within 0.0003 s, indicating better rapidity.
Figure 12 and Figure 13 respectively represent the waveform of the load voltage d-axis component and the root mean square (RMS) value of the load voltage during voltage sag. From Figure 9, it can be observed that the load voltage d-axis component of the DVR based on the novel convergence law can quickly recover to normal during voltage sag. As shown in Figure 10, for the DVR based on PI control, the RMS value of the load voltage undergoes significant changes during voltage transients, whereas for the DVR based on the novel exponential convergence law, the RMS value of the load voltage remains relatively constant. The Fourier harmonic analysis results of the compensated load voltage under different controllers are shown in Figure 12:
From Figure 14, the total harmonic distortion (THD) of the compensated load voltage for the DVR with the novel exponential convergence law controller is 0.80%. For the DVR with the classical reaching law controller, the THD of the load voltage during voltage sag is 2.14%. For the DVR with the uniform convergence law controller, the THD of the load voltage is 2.60%. Finally, for the DVR with the PI controller, the THD of the load voltage is 2.45%.
From Table 1, it can be observed that the response time of SMC1 control based on the novel method is 1.333 times faster than that of SMC2 control and 3.333 times faster than that of SMC3 control and PI control.

8. Conclusions

LSTM is a type of neural network, and like any other neural network, it requires a large number of data points for proper training. To further improve prediction accuracy, increasing the data volume is necessary. Despite this, LSTM is highly effective in handling long-term and short-term dependencies in time series data, such as power grid voltage. It adapts well to sudden trend changes, has a low prediction error, and exhibits high fitting accuracy. This makes it particularly suitable for predicting fluctuating voltage trends and meeting the requirements for power grid voltage forecasting, thereby minimizing the impact of sudden voltage drops on industrial production.
Additionally, the novel reaching law dynamically adjusts the shape of the sliding surface based on changes in the system state, reducing chattering. The exponential approach term ensures that the system state converges to the sliding surface within a finite time, enhancing the response speed. The absolute value and sign function terms effectively suppress disturbances and uncertainties in the system, improving robustness. The dynamic voltage restorer based on the novel reaching law of sliding mode variable structure control accelerates the system response speed, reduces oscillations, and demonstrates strong robustness. It can adapt to various levels of voltage sags and surges, efficiently compensating for the load-side voltage to the desired setpoint.
However, while LSTM and sliding mode control offer significant advantages, they also have limitations. LSTM models struggle to train effectively on small datasets, and the reaching law in sliding mode control may not fully suppress all disturbances under extreme conditions. Therefore, despite their strengths in many applications, it is important to consider factors such as data volume, system complexity, and environmental disturbances when applying these methods in real-world scenarios.

Author Contributions

Methodology, J.X., J.B., L.Z. and X.M.; conceptualization, J.X., J.B. and X.M.; resources, L.Z.; data curation, J.M.; writing—review and editing, X.M. and J.X.; project administration, J.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Department of Science and Technology of Jilin Province. The grant number is 20210204116YY.

Data Availability Statement

The data presented in this study are available upon request.

Conflicts of Interest

The authors declare no conflicts of interest. Jingran Ma did not receive any funding or financial support from the company for this work. Authors contributions are based solely on research conducted during their academic studies.

References

  1. Luo, A.; Xu, Q.; Ma, F.; Chen, Y. Overview of power quality analysis and control technology for the smart grid. J. Mod. Power Syst. Clean Energy 2016, 4, 1–9. [Google Scholar] [CrossRef]
  2. Ghosh, A.; Ledwich, G. Power Quality Enhancement Using Custom Power Devices; Springer Science & Business Media: Berlin, Germany, 2012. [Google Scholar]
  3. Hassanein, W.S.; Ahmed, M.M.; Osama, M.; Ashmawy, M.G.; Mosaad, M.I. Performance improvement of off-gridhybrid renewable energy system using dynamic voltage restorer. Alex. Eng. J. 2020, 59, 1567–1581. [Google Scholar] [CrossRef]
  4. Hossain, E.; Tür, M.R.; Padmanaban, S.; Ay, S.; Khan, I. Analysis and mitigation of power quality issues in distributed generation systems using custom power devices. IEEE Access 2018, 6, 16816–16833. [Google Scholar] [CrossRef]
  5. Molla, E.M.; Kuo, C.C. Voltage Quality Enhancement of Grid-Integrated PV System Using Battery-Based Dynamic Voltage Restorer. Energies 2020, 13, 5742. [Google Scholar] [CrossRef]
  6. McDonald, A.; Jimmy, G. Parallel wind turbine powertrains and their design for high availability. IEEE Trans. Sustain. Energy 2017, 8, 880–890. [Google Scholar] [CrossRef]
  7. Danbumrungtrakul, M.; Saengsuwan, T.; Srithorn, P. Evaluation of DVR capability enhancement-zero active power tracking technique. IEEE Access 2017, 5, 10285–10295. [Google Scholar] [CrossRef]
  8. Savrun, M.M.; Köroğlu, T.; Tan, A.; Cuma, M.U.; Bayindir, K.Ç.; Tümay, M. Isolated H-bridge DC–DC converter integrated transformerless DVR for power quality improvement. IET Power Electron. 2020, 13, 920–926. [Google Scholar] [CrossRef]
  9. Moghassemi, A.; Padmanaban, S. Dynamic voltage restorer (DVR): A comprehensive review of topologies, power converters, control methods, and modified configurations. Energies 2020, 13, 4152. [Google Scholar] [CrossRef]
  10. AbuHussein, A.; Sadi, M.A.H. Fault Ride-Through Capability Improvement of Grid Connected PV System Using Dynamic Voltage Restorer. Electr. Power Compon. Syst. 2020, 48, 1296–1307. [Google Scholar] [CrossRef]
  11. Molla, E.M.; Kuo, C. Voltage Sag Enhancement of Grid Connected Hybrid PV-Wind Power System Using Battery and SMES Based Dynamic Voltage Restorer. IEEE Access 2020, 8, 130003. [Google Scholar] [CrossRef]
  12. Neto, R.; Landera, Y.; Neves, F.; de Souza, H.; Cavalcanti, M.; Azevedo, G. Attenuation of Zero Sequence Voltage Using a Conventional Three-Wire Dynamic Voltage Restorer. Energies 2021, 14, 1247. [Google Scholar] [CrossRef]
  13. Moghassemi, A.; Hosseini, M.; Olamaei, J. Power quality improvement of grid-connected photovoltaic systems using Trans-z-source inverter under partial shading condition. Iran. J. Sci. Technol.-Trans. Electr. Eng. 2020, 44, 1429–1447. [Google Scholar] [CrossRef]
  14. Merchan-Villalba, L.R.; Lozano-Garcia, J.M.; Avina-Cervantes, J.G.; Estrada-Garcia, H.J.; Pizano-Martinez, A.; Carreno-Meneses, C.A. Linearly Decoupled Control of a Dynamic Voltage Restorer without Energy Storage. Mathematics 2020, 8, 1794. [Google Scholar] [CrossRef]
  15. Remya, V.K.; Parthiban, P.; Ansal, V.; Babu, B.C. Dynamic voltage restorer (DVR)—A review. J. Green Eng. 2018, 8, 519–572. [Google Scholar] [CrossRef]
  16. Sree, H.; Mohan, N. High-frequency-link cycloconverter-based DVR for voltage sag mitigation. In Proceedings of the Conference Record of the 2000 Twenty-Fourth International Power Modulator Symposium, Norfolk, VA, USA, 26–29 June 2000; pp. 97–100. [Google Scholar]
  17. Hossam-Eldin, A.A.; Abdallah, E.N.; Elgamal, M.S.; AboRas, K.M. Fault ride-through of grid-connected THIPWM fired DCMLI based DFIG using parallel switched feedback-controlled DVR. IET Gener. Trans. Dis. 2020, 14, 945–954. [Google Scholar] [CrossRef]
  18. Khodabakhshian, A.; Mahdianpoor, M.; Hooshmand, R.A. Robust control design for multi-functional DVR implementation in distribution systems using quantitative feedback theory. Electr. Power Syst. Res. 2013, 97, 116–125. [Google Scholar] [CrossRef]
  19. Li, Y.W.; Blaabjerg, F.; Vilathgamuwa, D.M.; Loh, P.C. Design and comparison of high performance stationary-frame controllers for DVR implementation. IEEE Trans. Power Electron. 2007, 22, 602–612. [Google Scholar] [CrossRef]
  20. Roncero-Sanchez, P.; Acha, E. Dynamic voltage restorer based on flying capacitor multilevel converters operated by repetitive control. IEEE Trans. Power Deliv. 2009, 24, 951–960. [Google Scholar] [CrossRef]
  21. Shukir, S.S. Fuzzy Neural Optimized Fuzzy Logic Controller Based Dynamic Voltage Restorer for Power Quality Improvement with Non-linear Loads. Int. J. Eng. 2021, 5, 21–32. [Google Scholar] [CrossRef]
  22. Kumar, P.; Arya, S.R.; Mistry, K.D. Optimized neural network and adaptive neuro-fuzzy controlled dynamic voltage restorer for power quality performance. Int. J. Emerg. Electr. Power Syst. 2021, 22, 383–399. [Google Scholar] [CrossRef]
  23. Utkin, V.I.; Guldner, J.; Shi, J. Sliding Mode Control in Electromechanical Systems; CRC Press: London, UK, 1999. [Google Scholar]
  24. Biricik, S.; Komurcugil, H.; Tuyen, N.D.; Basu, M. Protection of sensitive loads using sliding mode controlled three-phase DVR with adaptive notch filter. IEEE Trans. Ind. Electron. 2019, 66, 5465–5475. [Google Scholar] [CrossRef]
  25. Komurcugil, H.; Biricik, S. Time-varying and constant switching frequency-based sliding-mode control methods for transformerless DVR employing half-bridge VSI. IEEE Trans. Ind. Electron. 2017, 64, 2570–2579. [Google Scholar] [CrossRef]
  26. Trabelsi, M.; Komurcugil, H.; Refaat, S.S.; Abu-Rub, H. Model predictive control of packed U cells based transformerless single-phase dynamic voltage restorer. In Proceedings of the 2018 IEEE International Conference on Industrial Technology (ICIT), Lyon, France, 20–22 February 2018; pp. 1926–1931. [Google Scholar]
  27. Wang, H.; Liu, J.; Mei, G. A series side three-phase decoupling unified power quality controller. J. Electrotech. 2016, 31, 215–220. [Google Scholar]
  28. Liu, S.; Tang, Y.; Wang, Y.; Wu, Y.; Zhang, Y. A Residual Voltage Data-Driven Prediction Method for Voltage Sag Based on Data Fusion. Symmetry 2022, 14, 1272. [Google Scholar] [CrossRef]
  29. Tang, Y.; Zhang, Y. Method of Voltage Sag Causes Based on Bidirectional LSTM and Attention Mechanism. J. Electr. Eng. Technol. 2022, 15, 1115–1125. [Google Scholar]
  30. Zhang, L.; Tao, R.; Bai, J.; Zeng, D. An improved sliding mode model reference adaptive system observer for PMSM applications. Expert Syst. Appl. 2024, 250, 123907. [Google Scholar] [CrossRef]
  31. Zhang, L.; Tao, R.; Zhang, Z.-X.; Chien, Y.-R.; Bai, J. PMSM non-singular fast terminal sliding mode control with disturbance compensation. Inf. Sci. 2023, 642, 119040. [Google Scholar] [CrossRef]
Figure 1. Structural diagram of DVR system.
Figure 1. Structural diagram of DVR system.
Energies 17 05528 g001
Figure 2. Topological structural diagram of DVR circuit.
Figure 2. Topological structural diagram of DVR circuit.
Energies 17 05528 g002
Figure 3. Prediction of voltage sags based on LSTM neural network.
Figure 3. Prediction of voltage sags based on LSTM neural network.
Energies 17 05528 g003
Figure 4. Prediction of voltage sags based on LSTM neural network.
Figure 4. Prediction of voltage sags based on LSTM neural network.
Energies 17 05528 g004
Figure 5. Three-phase dq transformation detection principle diagram.
Figure 5. Three-phase dq transformation detection principle diagram.
Energies 17 05528 g005
Figure 6. Voltage waveform of 20% voltage sag compensation.
Figure 6. Voltage waveform of 20% voltage sag compensation.
Energies 17 05528 g006
Figure 7. Diagram of 20% voltage swell compensation voltage waveform.
Figure 7. Diagram of 20% voltage swell compensation voltage waveform.
Energies 17 05528 g007
Figure 8. Comparison of tracking control performance with different convergence laws.
Figure 8. Comparison of tracking control performance with different convergence laws.
Energies 17 05528 g008aEnergies 17 05528 g008b
Figure 9. Comparison of tracking control performance with different convergence laws.
Figure 9. Comparison of tracking control performance with different convergence laws.
Energies 17 05528 g009
Figure 10. Voltage waveform of DVR with sliding mode control based on novel exponential convergence law: (a) grid voltage; (b) compensation voltage of novel convergence law (SMC1); (c) load voltage of DVR based on novel convergence law; (d) amplified compensation during voltage sag of phase A.
Figure 10. Voltage waveform of DVR with sliding mode control based on novel exponential convergence law: (a) grid voltage; (b) compensation voltage of novel convergence law (SMC1); (c) load voltage of DVR based on novel convergence law; (d) amplified compensation during voltage sag of phase A.
Energies 17 05528 g010
Figure 11. Comparison of tracking control performance with different convergence laws.
Figure 11. Comparison of tracking control performance with different convergence laws.
Energies 17 05528 g011
Figure 12. Waveform of load voltage d-axis component.
Figure 12. Waveform of load voltage d-axis component.
Energies 17 05528 g012
Figure 13. RMS value of load voltage.
Figure 13. RMS value of load voltage.
Energies 17 05528 g013
Figure 14. FFT analysis of load voltage for DVR: (a) FFT analysis of load voltage for DVR based on novel convergence law; (b) FFT analysis of load voltage for DVR based on exponential convergence law; (c) FFT analysis of load voltage for DVR based on uniform convergence law; (d) FFT analysis of load voltage for DVR based on PI control.
Figure 14. FFT analysis of load voltage for DVR: (a) FFT analysis of load voltage for DVR based on novel convergence law; (b) FFT analysis of load voltage for DVR based on exponential convergence law; (c) FFT analysis of load voltage for DVR based on uniform convergence law; (d) FFT analysis of load voltage for DVR based on PI control.
Energies 17 05528 g014aEnergies 17 05528 g014b
Table 1. Table of comparative results.
Table 1. Table of comparative results.
ResultsOvershoot (%)Total Harmonic Distortion (%)Response Time (s)Root Mean Square Curve of Load Voltage
Novel SMC100.80.0003Smooth
Classical convergence law SMC202.140.0004Relatively smooth
Uniform convergence law SMC302.600.001Moderately smooth
PI6.72.450.001Not smooth
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xue, J.; Ma, J.; Ma, X.; Zhang, L.; Bai, J. Research on Voltage Prediction Using LSTM Neural Networks and Dynamic Voltage Restorers Based on Novel Sliding Mode Variable Structure Control. Energies 2024, 17, 5528. https://doi.org/10.3390/en17225528

AMA Style

Xue J, Ma J, Ma X, Zhang L, Bai J. Research on Voltage Prediction Using LSTM Neural Networks and Dynamic Voltage Restorers Based on Novel Sliding Mode Variable Structure Control. Energies. 2024; 17(22):5528. https://doi.org/10.3390/en17225528

Chicago/Turabian Style

Xue, Jian, Jingran Ma, Xingyi Ma, Lei Zhang, and Jing Bai. 2024. "Research on Voltage Prediction Using LSTM Neural Networks and Dynamic Voltage Restorers Based on Novel Sliding Mode Variable Structure Control" Energies 17, no. 22: 5528. https://doi.org/10.3390/en17225528

APA Style

Xue, J., Ma, J., Ma, X., Zhang, L., & Bai, J. (2024). Research on Voltage Prediction Using LSTM Neural Networks and Dynamic Voltage Restorers Based on Novel Sliding Mode Variable Structure Control. Energies, 17(22), 5528. https://doi.org/10.3390/en17225528

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop