Offshore wind power plant reactive voltage regulation method based on deep learning
By applying deep learning LSTM neural network and hybrid optimization algorithm in offshore wind farms, dynamically adjusting the reactive voltage, solving the control accuracy and response speed problems of traditional methods under complex operating conditions, and achieving more efficient reactive voltage management.
Patent Information
- Application Number
- CN202411662258.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-11
AI Technical Summary
Due to the influence of natural factors such as wind speed and wind direction, the reactive power changes frequently. Traditional reactive voltage control methods are difficult to meet the needs of their complex working conditions, and there are problems such as low control accuracy, slow response speed and poor adaptability.
The LSTM neural network technology based on deep learning is used to construct a reactive voltage model of offshore wind farms, and train it by collecting historical operating data, obtaining operating data in real time for prediction, and dynamically adjusting the reactive voltage with mixed optimization algorithm.
It improves the accuracy and response speed of reactive voltage regulation, enhances the adaptability and flexibility of the system, can better deal with wind speed changes and wind turbine power fluctuations, and ensures stable operation of the power grid.
Smart Images

Figure CN119602291A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wind farm voltage control, and specifically relates to a reactive voltage regulation method for an offshore wind farm based on deep learning. Background Art
[0002] Offshore wind farms have the advantages of abundant wind energy resources and do not occupy land resources, but they also face many challenges. Their output power is affected by natural factors such as wind speed and wind direction, and has strong intermittent and volatile characteristics, resulting in frequent changes in reactive power. Therefore, wind farms must have a certain reactive support capability and coordinate the reactive power output of each reactive compensation device through control algorithms to support the voltage at the grid connection point. With the continuous expansion of the installed capacity and scale of offshore wind farms, the problem of reactive configuration has gradually become prominent. At the same time, offshore wind farms are connected to land power grids through long-distance submarine cables. The cable capacitance effect generates a large amount of reactive power, and the line resistance and reactance cause large reactive power losses and voltage drops. The operation of offshore wind farms is significantly affected by weather, wind speed, wind direction and marine environment, showing strong uncertainty and volatility. Traditional static modeling methods are difficult to fully reflect their real-time operating status. Traditional reactive voltage control methods are difficult to meet the needs of complex working conditions, and have problems such as low control accuracy, slow response speed and poor adaptability. For example, control strategies based on rules or simple models cannot effectively cope with the variable operating conditions of offshore wind farms, and it is difficult to achieve precise regulation of reactive voltage. Summary of the invention
[0003] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a reactive voltage regulation method for offshore wind farms based on deep learning.
[0004] The purpose of the present invention can be achieved by the following technical solutions:
[0005] On the one hand, the present invention provides a method for reactive voltage regulation of an offshore wind farm based on deep learning, comprising the following steps:
[0006] Step S1: Collect historical operation data of the offshore wind farm, and perform data cleaning and preprocessing on it;
[0007] Step S2: construct an LSTM neural network model;
[0008] Step S3: Use the preprocessed historical operation data of the offshore wind farm to train the LSTM neural network model and adjust the weights and biases in the network;
[0009] Step S4: acquiring the operating data of the offshore wind farm in real time, including wind speed, wind direction, power output of wind turbines, and substation voltage;
[0010] Step S5: input the real-time acquired operation data into the trained LSTM neural network model to obtain the predicted values of reactive power demand and bus voltage amplitude at the grid connection point;
[0011] Step S6: According to the reactive power demand and the predicted value of the bus voltage amplitude at the grid connection point, combined with the operation constraints and control objective function of the wind farm, a hybrid optimization algorithm is used to dynamically adjust the reactive voltage.
[0012] Furthermore, the historical operation data includes: real-time power output of the wind turbine generator set, wind speed, wind direction, electrical parameters of the submarine cable and voltage of the offshore substation. The real-time power output of the wind turbine generator set includes active power and reactive power.
[0013] Further, the preprocessing comprises the following steps:
[0014] Remove invalid data and outliers from historical operating data of offshore wind farms;
[0015] Interpolate or estimate missing values in the data;
[0016] Standardize and normalize the data;
[0017] The processed data is divided into training set, validation set and test set according to the preset ratio.
[0018] Furthermore, the LSTM neural network includes an input layer, multiple LSTM units, a hidden layer and an output layer connected in sequence.
[0019] Furthermore, the LSTM unit includes a forget gate, an input gate, a candidate unit state and an output gate, wherein the forget gate output formula is:
[0020] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0021] X t =[v t ,θ t ,P t ,Q t ,W t ,V sub,t ]
[0022] Among them, f t is the output of the forget gate, which determines the influence of the memory information of the previous moment on the current state, σ is the sigmoid activation function, and W f is the weight matrix of the forget gate, b f is the bias term, ht-1 is the hidden state at the previous moment, x t is the input at the current moment, v t is the wind speed at the current moment, θ t is the wind direction at the current moment, P t is the active power of the wind turbine at the current moment, Q t is the reactive power of the wind turbine at the current moment, W t is the reactive power compensation device output at the current moment, V sub,t is the grid connection point voltage of the wind farm at the current moment;
[0023] The input gate output formula is:
[0024] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0025]
[0026] Among them, i t is the output of the input gate, which controls the impact of the current input on the unit state. is the candidate unit state, representing the potential memory at the current moment, W i , W C are the weight matrices of the input gate and candidate unit states, respectively, and b i , b C are the bias terms of the input gate and the candidate unit state respectively, and tanh is the hyperbolic tangent function;
[0027] The candidate unit states are:
[0028]
[0029] Among them, C t is the cell state at the current moment, representing the long-term memory of the LSTM cell, C t-1 is the unit state at the previous moment;
[0030] The output gate output formula is:
[0031] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0032] h t =o t tanh(C t )
[0033] Among them, t is the output of the output gate, which controls the influence of the current unit state on the final output. t is the hidden state at the current moment, which is passed to the next LSTM unit as the output of LSTM. o is the weight matrix of the output gate, b o is the bias term of the output gate.
[0034] Furthermore, the step S3 includes the following steps:
[0035] Use the training set to train the network through the back propagation algorithm, and adjust the weights and bias of the LSTM neural network model to minimize the loss function between the predicted output and the actual reactive voltage value;
[0036] Use the validation set to monitor the performance of the LSTM neural network model, regularly evaluate the validation set performance indicators, and adjust the training parameters or optimize the network structure according to the changes in the validation set performance indicators;
[0037] L2 regularization is used to penalize model parameters;
[0038] The test set is used to evaluate the generalization ability of the model.
[0039] Furthermore, the loss function is:
[0040]
[0041] Among them, RMSE is the loss value of LSTM neural network model training. is the predicted value output by the model, y i is the actual value, n is the number of samples in the training set;
[0042] Furthermore, the operation constraints include voltage stability constraints, reactive power balance constraints, and maximum power output constraints;
[0043] The voltage stability constraint is:
[0044] V min ≤V t ≤V max
[0045] Among them, V min 、V max are the minimum and maximum bus voltages at the grid connection point, V t is the bus voltage of the grid connection point at the current moment;
[0046] The reactive power balance constraint is:
[0047]
[0048] Among them, Q gen,iis the reactive power output of the i-th wind turbine, Q dem is the reactive power demand of the power grid, Q total is the total reactive power of the wind farm;
[0049] The maximum power output constraint is:
[0050] P t ≤P max
[0051] Among them, P t is the active power output of the wind farm at the current moment, P max is the maximum active power output of the wind farm.
[0052] Furthermore, the control objective function is:
[0053] f target =λ1·(Q pred -Q dem ) 2 +λ2·(V bus -V ref ) 2
[0054] Among them, f target Objective function value, Q pred 、V bus are the predicted reactive power demand and the bus voltage amplitude at the grid connection point, Q dem is the reactive power demand of the power grid, V ref is the reference voltage, λ1 and λ2 are the weight coefficients of the objective function respectively.
[0055] Furthermore, the hybrid optimization algorithm includes a particle swarm optimization algorithm and a local gradient descent method;
[0056] The use of a hybrid optimization algorithm to dynamically adjust reactive voltage includes:
[0057] The particle swarm optimization algorithm is used to obtain a preliminary reactive voltage regulation scheme set based on the reactive power demand and the predicted value of the bus voltage amplitude at the grid connection point, combined with the operation constraints and control objective function of the wind farm;
[0058] The local gradient descent method is used to screen the preliminary reactive voltage regulation scheme set according to the operation constraints and control objective function of the wind farm, and the final reactive voltage regulation scheme is obtained. The reactive voltage is dynamically adjusted according to the final reactive voltage regulation scheme.
[0059] Compared with the prior art, the present invention has the following advantages:
[0060] (1) The present invention aims at the problem of voltage support and reactive power compensation in offshore wind farms, and provides a method for regulating reactive voltage in offshore wind farms by using deep learning of neural networks. The method partially replaces the traditional static modeling technology with deep learning LSTM neural network technology, so that the constructed reactive voltage model of offshore wind farms has stronger timeliness and accuracy. In terms of the ability to process time series data, LSTM neural networks are good at processing data with time series characteristics, and can learn long-term dependencies in the operation data of offshore wind farms. For example, by analyzing historical wind speed, power and reactive voltage data, the trend of reactive voltage changes in the future can be predicted, and control measures can be taken in advance. In terms of modeling nonlinear relationships, there are complex nonlinear relationships between various factors and reactive voltage in offshore wind farms. The nonlinear activation function and special gating structure of LSTM enable it to effectively capture these nonlinear characteristics and accurately model the dynamic change process of reactive voltage. In terms of adapting to dynamic changes, LSTM can continuously update the internal state according to the new input data, track the changes in the operating state of offshore wind farms in real time, adapt to dynamic situations such as wind speed fluctuations and equipment status changes, and adjust the control strategy in time to ensure stable control of reactive voltage.
[0061] (2) By utilizing the time series data modeling capability of the LSTM neural network, the present invention can accurately capture the time series characteristics and dynamic changes of the wind farm, thereby accurately predicting and regulating the reactive power and voltage of the offshore wind farm. Compared with the traditional reactive power and voltage regulation method, the LSTM neural network can better cope with factors such as wind speed changes and wind turbine power fluctuations, and significantly improve the accuracy of reactive power and voltage regulation.
[0062] (3) The present invention can timely respond to grid load changes and wind farm power fluctuations by acquiring wind farm operation data in real time and using a hybrid algorithm to dynamically adjust reactive voltage, thereby ensuring stable grid operation. This dynamic adjustment mechanism based on deep learning and optimization algorithms ensures that the system can respond instantly, improving the system's adaptability and flexibility.
[0063] (4) The present invention uses LSTM neural network to learn and predict wind farm data. It can optimize the operation strategy of wind farms through training of historical data, reduce the need for manual intervention, reduce human errors, and improve the automation and intelligence level of wind farm operation. By predicting future reactive power and voltage requirements, scheduling plans can be formulated in advance to improve the operating efficiency of wind farms.
[0064] (5) The present invention incorporates the operating constraints of the wind farm (such as voltage stability, reactive power balance, etc.) into the optimization algorithm, so that reactive voltage regulation not only takes into account the real-time power demand, but also takes into account the stability and constraints of the system, and can achieve optimal reactive voltage regulation under multiple constraints.
[0065] (6) The present invention combines the deep learning characteristics of LSTM neural networks, which can effectively deal with noise and uncertainty in data, and has strong robustness and reliability in the face of abnormal situations such as sensor failure, communication interference or data loss. Through the adaptive training of the model, the system's processing capabilities for various complex scenarios can be gradually improved.
[0066] (7) Through accurate reactive power prediction and regulation, the present invention can effectively reduce reactive power waste, improve the energy utilization efficiency of wind farms, and thus improve the overall power generation efficiency. Under the premise of ensuring voltage stability and grid security, the output power of wind farms can be effectively regulated, so that wind power resources can be used more efficiently. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 is a flow chart of the method of the present invention;
[0068] Figure 2 The figure is a flowchart of the method of the present invention. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0070] Embodiment 1:
[0071] This embodiment provides a method for regulating reactive power and voltage in an offshore wind farm based on deep learning. Figure 1 As shown, the following steps are included:
[0072] Step S1: Collect historical operation data of the offshore wind farm, and perform data cleaning and preprocessing on it;
[0073] Among them, the historical operation data include: the real-time power output of the wind turbine, wind speed, wind direction, electrical parameters of the submarine cable and the voltage of the offshore substation. The real-time power output of the wind turbine includes active power and reactive power.
[0074] The preprocessing includes the following steps:
[0075] Remove invalid data and outliers from historical operating data of offshore wind farms;
[0076] Interpolate or estimate missing values in the data;
[0077] Standardize and normalize the data;
[0078] The processed data is divided into training set, validation set and test set according to the preset ratio.
[0079] Step S2: construct an LSTM neural network model;
[0080] The LSTM neural network includes an input layer, multiple LSTM units, a hidden layer, and an output layer connected in sequence. The LSTM unit includes a forget gate, an input gate, a candidate unit state, and an output gate, where the forget gate output formula is:
[0081] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0082] X t =[v t ,θ t ,P t ,Q t ,W t ,V sub,t ]
[0083] Among them, f t is the output of the forget gate, which determines the influence of the memory information of the previous moment on the current state, σ is the sigmoid activation function, and W f is the weight matrix of the forget gate, b f is the bias term, h t-1 is the hidden state at the previous moment, x t is the input at the current moment, v t is the wind speed at the current moment, θ t is the wind direction at the current moment, P t is the active power of the wind turbine at the current moment, Q t is the reactive power of the wind turbine at the current moment, W t is the reactive power compensation device output at the current moment, V sub,t is the grid connection point voltage of the wind farm at the current moment;
[0084] The input gate output formula is:
[0085] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0086]
[0087] Among them, i tis the output of the input gate, which controls the impact of the current input on the unit state. is the candidate unit state, representing the potential memory at the current moment, W i , W C are the weight matrices of the input gate and candidate unit states, respectively, and b i , b C are the bias terms of the input gate and the candidate unit state respectively, and tanh is the hyperbolic tangent function;
[0088] The candidate unit states are:
[0089]
[0090] Among them, C t is the cell state at the current moment, representing the long-term memory of the LSTM cell, C t-1 is the unit state at the previous moment;
[0091] The output gate output formula is:
[0092] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0093] h t =o t tanh(C t )
[0094] Among them, t is the output of the output gate, which controls the influence of the current unit state on the final output. t is the hidden state at the current moment, which is passed to the next LSTM unit as the output of LSTM. o is the weight matrix of the output gate, b o is the bias term of the output gate.
[0095] Step S3: Use the preprocessed historical operation data of the offshore wind farm to train the LSTM neural network model and adjust the weights and biases in the network;
[0096] Wherein, step S3 comprises the following steps:
[0097] Use the training set to train the network through the back propagation algorithm, and adjust the weights and bias of the LSTM neural network model to minimize the loss function between the predicted output and the actual reactive voltage value;
[0098] Use the validation set to monitor the performance of the LSTM neural network model, regularly evaluate the validation set performance indicators, and adjust the training parameters or optimize the network structure according to the changes in the validation set performance indicators;
[0099] L2 regularization is used to penalize model parameters;
[0100] The test set is used to evaluate the generalization ability of the model.
[0101] The loss function is:
[0102]
[0103] Among them, RMSE is the loss value of LSTM neural network model training. is the predicted value output by the model, y i is the actual value, n is the number of samples in the training set;
[0104] Operation constraints include voltage stability constraints, reactive power balance constraints, and maximum power output constraints;
[0105] The voltage stability constraint is:
[0106] V min ≤V t ≤V max
[0107] Among them, V min 、V max are the minimum and maximum bus voltages at the grid connection point, V t is the bus voltage of the grid connection point at the current moment;
[0108] The reactive power balance constraint is:
[0109]
[0110] Among them, Q gen,i is the reactive power output of the i-th wind turbine, Q dem is the reactive power demand of the power grid, Q total is the total reactive power of the wind farm;
[0111] The maximum power output constraint is:
[0112] P t ≤P max
[0113] Among them, P t is the active power output of the wind farm at the current moment, P max is the maximum active power output of the wind farm.
[0114] The control objective function is:
[0115] f target =λ1·(Q pred -Q dem )2 +λ2·(V bus -V ref ) 2
[0116] Among them, f target Objective function value, Q pred 、V bus are the predicted reactive power demand and the bus voltage amplitude at the grid connection point, Q dem is the reactive power demand of the power grid, V ref is the reference voltage, λ1 and λ2 are the weight coefficients of the objective function respectively.
[0117] Step S4: acquiring the operating data of the offshore wind farm in real time, including wind speed, wind direction, power output of wind turbines, and substation voltage;
[0118] Step S5: input the real-time acquired operation data into the trained LSTM neural network model to obtain the predicted values of reactive power demand and bus voltage amplitude at the grid connection point;
[0119] Step S6: According to the reactive power demand and the predicted value of the bus voltage amplitude at the grid connection point, combined with the operation constraints and control objective function of the wind farm, a hybrid optimization algorithm is used to dynamically adjust the reactive voltage. The hybrid optimization algorithm includes a particle swarm optimization algorithm and a local gradient descent method. The hybrid optimization algorithm is used to dynamically adjust the reactive voltage, including:
[0120] The particle swarm optimization algorithm is used to obtain a preliminary reactive voltage regulation scheme set based on the reactive power demand and the predicted value of the bus voltage amplitude at the grid connection point, combined with the operation constraints and control objective function of the wind farm;
[0121] The local gradient descent method is used to screen the preliminary reactive voltage regulation scheme set according to the operation constraints and control objective function of the wind farm, and the final reactive voltage regulation scheme is obtained. The reactive voltage is dynamically adjusted according to the final reactive voltage regulation scheme.
[0122] Embodiment 2:
[0123] The purpose of this embodiment is to provide a method for reactive voltage regulation in offshore wind farms based on deep learning of neural networks in order to overcome the defects of the above-mentioned prior art. This embodiment will combine the most cutting-edge deep learning neural network LSTM technology to achieve fine and dynamic modeling through data-physical fusion, thereby achieving more accurate and reliable reactive voltage regulation. The characteristic is that the deep learning LSTM neural network technology partially replaces the traditional static modeling technology, so that the constructed offshore wind farm reactive voltage model has stronger timeliness and accuracy. The LSTM neural network is a special recurrent neural network (RNN) that aims to solve the problem of gradient vanishing or explosion of traditional RNN when processing long sequence data, so as to better learn long-term dependencies. LSTM introduces a gating mechanism, including a forget gate, an input gate, and an output gate (LSTM cell unit structure is as follows Figure 1 ). The forget gate determines which information in the cell state at the previous moment needs to be forgotten; the input gate determines which new information can be stored in the cell state; the output gate controls which information in the cell state can be used as the output at the current moment. Through these gating mechanisms, LSTM can selectively retain and update information, effectively capture long-term dependencies in sequence data, and is suitable for processing data with time series characteristics, such as voltage, reactive power and other time-varying information in power grid operation data.
[0124] A deep learning approach for reactive power and voltage regulation in offshore wind farms is presented. The approach can be divided into three main stages: data processing, neural network selection, and surrogate model voltage calculation (performed online). Therefore, first, the historical SCADA data are processed to construct a suitable training dataset. Then, the obtained training dataset is used in the neural network selection process, where multiple neural networks with different hyperparameters are trained, where the subscript u corresponds to the u-th neural network in the set U (set of trained neural networks). Through all these neural networks, the most suitable neural network for the reactive power and voltage relationship of the studied offshore wind farm is determined, namely, NN u* At the end of this process, NN u* We are ready to do the voltage calculation. The input and output of the whole method are shown below.
[0125]
[0126] Where V is voltage, P is active power, Q is reactive power, W is weight, and subscript u corresponds to the uth neural network in set U (the set of trained neural networks). is a function that represents the complex mapping relationship within the neural network. It accepts the active power and reactive power of the node as input and the parameters of the neural network. By adjusting these parameters, the neural network attempts to learn the intrinsic relationship between input power and output voltage, thereby predicting or fitting the voltage. However, due to the limited modeling ability of the neural network or the complexity of the data, there may be a certain error in the prediction result, which represents this approximate error. In other words, the actual voltage is equal to the estimated value calculated by the neural network based on the input and parameters plus the error term This formula is the core of neural network training and application, by continuously optimizing parameters To reduce the error To improve the accuracy of voltage calculations. After determining the most suitable neural network, when faced with a hypothetical scenario (defined by P and Q), this formula can be used to calculate the voltage in that scenario.
[0127] The input is SCADA historical measurement data, including wind speed, wind direction, real-time power output of wind turbines (which can be decomposed into active and reactive power), reactive compensation equipment output (such as SVG), wind farm grid connection point voltage, etc. The output is a neural network that performs reactive voltage calculations in real time. Voltage and reactive power prediction value instructions for offshore wind power systems. Data partitioning: Divide the preprocessed training data set into K subsets (such as K = 5 or 10, etc.). Divide the training set and validation set: Divide the preprocessed data into training set, validation set and test set according to a certain ratio.
[0128] LSTM neural network construction and training. Define loss function and optimizer: Select a suitable loss function, such as mean square error (MSE), to measure the difference between the output of the neural network and the actual value. Select a suitable optimizer, such as Adam optimizer, to update the weights and biases of the neural network. Cross-training and evaluation: For each possible hyperparameter combination, perform K training and evaluations. Each time, select a subset as the validation set, and the remaining K-1 subsets as the training set. Use the training set to train the NN, and calculate the root mean square error (RMSE) on the validation set. Through multiple different partitions and training, the average RMSE of each hyperparameter combination on different validation sets is obtained, which is used as an indicator to evaluate the performance of the hyperparameter combination. Select the optimal hyperparameter combination: From the average RMSE of all hyperparameter combinations, select the lowest combination as the optimal hyperparameter combination. This combination is considered to enable the NN to achieve the best performance on the wind farm data. Training the neural network: First, determine the hyperparameters and NN features determined by the nature of the problem, and then define the remaining hyperparameters (such as the number of hidden layer neurons, activation function, learning rate, L2 regularization factor, batch size, and number of training rounds) through the K-fold cross-validation process. Use the training set to train the neural network, and minimize the value of the loss function by continuously adjusting the parameters of the neural network. During the training process, methods such as Kfold cross-validation can be used to evaluate and select the best hyperparameter combination, including the number of neurons, learning rate, regularization factor, etc. Final NN training: Use the selected optimal hyperparameter combination to train 10 NNs from scratch. This step is designed to take into account the randomness in the training process, and obtain multiple NNs with similar parameter settings but slightly different performance through multiple training. Final neural network performance evaluation and selection: Among the 10 trained NNs, calculate the RMSE of each NN on the training set, and select the NN with the lowest training RMSE as the final NN for voltage calculation and evaluation. This NN will be used to handle voltage calculation tasks under different power scenarios in the online stage, providing basic support for accurate calculation of reactive voltage.
[0129] In the agent model approach, the neural network (NN) is trained to enable it to accurately capture the potential relationship between the historical reactive power data of the wind farm and the voltage at the grid connection point, thereby achieving accurate calculation of the voltage. The structure and training process of the neural network are defined by external configuration variables called hyperparameters (such as the number of neurons, learning rate, number of training rounds, etc.). Once a given neural network NN is i When trained, specific weights and biases are generated The following are the detailed steps for training a neural network:
[0130] 1. Data collection and preprocessing
[0131] Data collection: Collect data such as wind speed, wind direction, wind turbine output power, reactive power of reactive compensation equipment status, voltage at wind farm grid connection point, etc. The collection frequency is set according to the actual situation, such as once every 3-10 minutes.
[0132] Data preprocessing: Remove invalid and infeasible instances, and check whether there are invalid or infeasible values in the data, such as the voltage value of a node at a certain time instance is missing or 0, or the active and reactive power values are abnormal. If such problems exist, remove the data of all nodes at that time instance, because these data may interfere with NN's learning of normal relationships. Processing low-variability node data: Identify and process node data with extremely low demand and small changes, such as setting a threshold, and treating nodes that meet the threshold as nodes whose relationships are not fully reflected, and remove them from the training data set. This is done because the data of such nodes lacks sufficient diversity, which may cause NN to be unable to accurately capture the relationship with other nodes and the power grid, thereby affecting the accuracy of voltage calculation. However, when there is sufficient data in the future, you can consider updating the NN to include these nodes.
[0133] Data cleaning: Set a reasonable data threshold range to identify and remove abnormal data points caused by sensor failure, communication interference, etc. For example, if the wind speed data exceeds the normal wind speed range (such as 0-50m / s) and is too different from the surrounding sensor data, it is determined to be abnormal data and corrected or deleted. Use data interpolation methods (such as linear interpolation and spline interpolation) to fill in missing data to ensure data continuity.
[0134] Normalization or per-unit processing: Normalize or per-unit the cleaned raw data to unify the data of different dimensions into the same numerical range. For example, normalize the power data based on the rated power of the wind farm, and normalize the voltage data based on the rated voltage, so as to facilitate the subsequent neural network processing.
[0135] According to the physical principles and influencing factors of reactive voltage in offshore wind farms, the initial input feature set is determined, including wind speed, wind direction, historical values of wind turbine output power (such as the average value of the previous 5-15 minutes), reactive compensation equipment status, historical values of voltage at the wind farm grid connection point (such as the values of the previous 1-2 moments), etc. These features are closely related to the reactive voltage control target, such as wind speed and wind direction affect the output power of wind turbines, and thus affect the reactive power demand; reactive compensation equipment determines the reactive regulation capacity; historical values of voltage at the wind farm grid connection point can reflect its changing trend.
[0136] 2. LSTM neural network construction and training
[0137] First, determine the hyperparameters and neural network characteristics determined by the nature of the problem (these are fixed for all neural networks trained at this stage), including parameters such as output activation function, scaler, loss function, optimizer, and regularization. Then define the remaining hyperparameters that need to be adjusted through the K-fold cross-validation process, such as the number of hidden layer neurons, activation function, learning rate, L2 regularization factor, batch size, and number of training rounds, and set a reasonable search space. For example, the number of hidden layers mainly considers single-layer NN to balance computational efficiency and accuracy, the number of nodes in the input layer and output layer is determined according to the dimension of the input data, namely active power (P), reactive power (Q), and output voltage (V), the activation function may be selected from common functions (such as sigmoid, tanh, ReLU, etc.), and the learning rate may be in a smaller range (such as (1◇10 -5 ) to (1◇10 -3 )) is used for search, the batch size is determined by the amount of data and computing resources (such as the number of samples corresponding to 12 hours, etc.), and the number of training rounds is set according to experience and expectations of the training effect (such as thousands of times).
[0138] The number of network layers and neurons is determined according to the complexity of the offshore wind farm operation data and computing power. For large and complex wind farms, 3-4 layers of networks and more neurons (such as 128-512) may be required to learn complex patterns; small wind farms can appropriately reduce the number of layers and neurons. For example, a large wind farm with hundreds of wind turbines can build a 3-layer LSTM network with 256 neurons per layer; while a small wind farm with dozens of wind turbines can use a 2-layer LSTM network with 64 neurons per layer.
[0139] The learning rate is selected based on data stability and model convergence speed. When the data is stable, a smaller learning rate (such as 0.001-0.01) is used to ensure stable convergence; when the working conditions change drastically, the learning rate is appropriately increased (such as 0.01-0.1), and an adaptive learning rate algorithm (such as the Adam algorithm) is used to automatically adjust according to the gradient change. For example, during the period of stable wind speed, the learning rate is set to 0.005; when the wind speed changes suddenly, the learning rate can be increased to 0.05 and dynamically adjusted by the Adam algorithm.
[0140] The time step is determined based on the reactive voltage change cycle characteristics and the data sampling frequency. If the reactive voltage is related to the daily cycle of wind speed and the sampling frequency is once every 5 minutes, the time step can be selected as 288 (24 hours * 60 minutes / 5 minutes); it can also be selected by determining the main frequency components through spectrum analysis. For example, the spectrum analysis found that the main frequency of reactive voltage change corresponds to a 3-hour cycle and the sampling frequency is once every 6 minutes, so the time step is 30 (3 hours * 60 minutes / 6 minutes).
[0141] The batch size is determined based on memory limitations and model training stability. When memory is sufficient, a larger value (such as 128-256) can improve training efficiency, but too large a value may lead to slow convergence; when memory is limited, a smaller value (such as 32-64) can be selected and combined with an optimization algorithm to ensure stable training. For example, on a server with 16GB of memory, a batch size of 128 can be selected; on an edge computing device with 4GB of memory, the batch size is set to 32.
[0142] The number of iterations is determined based on the convergence of the model on the training set and validation set. Observe the validation set loss function value and stop training when it no longer decreases significantly (e.g., the change is less than 0.001) for multiple consecutive rounds. At the same time, use the early stopping method to terminate early when the validation set performance no longer improves or even decreases. For example, during training, if the validation set loss function value changes by less than 0.001 for 10 consecutive rounds or the performance begins to decrease, stop training.
[0143] Training network: Divide the historical operation data into training set, validation set and test set in proportion (such as 70%-80% for training set, 10%-15% for validation set, and 10%-15% for test set). Use the training set to train the network through the back propagation algorithm, and adjust the weights and biases to minimize the error between the predicted output and the actual reactive voltage value. Use a suitable loss function (such as mean square error MSE, mean absolute error MAE or root mean square error RMSE) to measure the prediction error. Loss function selection: For reactive voltage prediction tasks, mean square error (MSE) or mean absolute error (MAE) can be selected as the loss function. MSE penalizes larger errors more heavily, which can prompt the model to predict voltage values more accurately; MAE is relatively less sensitive to errors and more robust. For example, in the case of high voltage accuracy requirements, MSE may be more appropriate; if there are many outliers in the data and the model is expected to be more stable, MAE can be used as an option. During the training process, use the validation set to monitor performance to prevent overfitting, regularly evaluate the validation set performance indicators (such as loss function value, accuracy, goodness of fit, etc.), and adjust the training parameters or optimize the network structure according to the changes. Use regularization methods to prevent overfitting: Use L1 or L2 regularization to penalize model parameters to prevent the model from being too complex. L2 regularization (weight decay) is more commonly used in practical applications. By adding regularization terms to the loss function, the parameters are limited to be too large to prevent the model from overfitting the training data. Finally, use the test set to evaluate the generalization ability of the model.
[0144] 3. Reactive voltage control strategy generation and execution
[0145] Input data and prediction: Input the input feature data collected in real time and preprocessed into the trained LSTM neural network. The LSTM neural network predicts the voltage and reactive power demand forecast values of the wind farm grid connection point in the future (such as the next 10-30 minutes, with an interval of 5-10 minutes). The particle swarm optimization algorithm is used to obtain the preliminary reactive voltage regulation scheme set based on the reactive power demand and the predicted values of the grid connection point bus voltage amplitude, combined with the operation constraints and control objective function of the wind farm; the local gradient descent method is used to screen the preliminary reactive voltage regulation scheme set according to the operation constraints and control objective function of the wind farm, and the final reactive voltage regulation scheme is obtained, and the reactive voltage is dynamically adjusted according to the final reactive voltage regulation scheme.
[0146] Regularly update the neural network to adapt to network changes: Since wind farm equipment may change, such as reconfiguration, reinforcement, etc., these changes will affect the relationship between nodes and the network. Therefore, it is necessary to retrain the NN regularly (such as every quarter or every semester) using the latest historical data to ensure that it can adapt to changes in the network and maintain accurate voltage calculation capabilities.
[0147] The formula for the neural network output column vector is as follows. For a neural network NNi with |H| hidden layers, this formula explains how the lth column vector in the output matrix V (i.e., the voltage of node l) is calculated.
[0148]
[0149] In the formula, Indicates that given the input matrix P|Q and the neural network parameters In the case of , the voltage calculation result of node l. is the activation function of the output layer, which is usually a linear function in regression problems, but the activation function of the hidden layer introduces nonlinearity. is the weight connecting the uth neuron in the last hidden layer (the |H|th layer) to the lth neuron in the output layer, is the bias of the lth neuron in the output layer. Perform weighted summation And add the deviation Then the output layer activation function The transformation of , we get the voltage value of node l. This formula shows in detail the process of the neural network calculating the voltage of a single node from input to output.
[0150] The LSTM neural network fitting relationship formula includes: defining the LSTM layer calculation, setting h t is the hidden state at time t, c t is the cell state, x t =[P t,Q t ]∈R 1×(2C) is the input at time t (combining active and reactive power), then j t ,c t =LSTM(x t ,j t-1 ,c t-1 ,W LSTM ), where W LSTM are the parameters of LSTM (including weights and biases). The hidden state is converted into a voltage prediction value through a fully connected layer. Let W out is the output layer weight, b out is the output layer bias, then the predicted voltage The final formula is in Calculated by the above LSTM and output layer.
[0151] Neural network training error function formula (mean square error), this formula is used to train the LSTM neural network NNi error function, the goal is to adjust the weight and bias parameters to minimize this error.
[0152]
[0153] Where V t is the actual voltage value at time t, which comes from the actual offshore wind farm measurement data. It is the LSTM neural network NNi at time t according to the input active power P t and reactive power Q t (Combined into P|Q t ) and the current parameters The calculated predicted voltage value. The error between the actual voltage and the predicted voltage is calculated and squared to emphasize the effect of larger errors (because the squared error is larger) and to ensure that the error is always positive for subsequent mathematical processing. t∈T It means that the errors at all times t (from 1 to |T|) are summed to get the total error. Finally, the error is calculated by dividing by |T| to avoid unfair error comparison caused by different data sizes. By minimizing this average mean square error, a set of optimal parameters can be found. This makes the neural network's prediction of voltage as close to the actual value as possible, thereby improving the accuracy of the neural network model.
[0154] K-fold cross validation is a common technique for evaluating the performance of machine learning models. For each cross validation, K subsets are selected as the training set D train , used to train the model; the remaining subset is used as the validation set D val , used to evaluate the performance of the model on unseen data. For example, in the first cross-validation, the first subset is used as the validation set, and the remaining K-1 subsets are used as training sets; in the second cross-validation, the second subset is used as the validation set, and the remaining subsets are used as training sets, and so on, for a total of K different training-validation combinations.
[0155]
[0156] The LSTM neural network model includes: Figure 2 As shown in the figure, the capital letter C represents a cell unit in a time state, and the arrow represents vector transmission; the yellow rectangular box represents the neural network layer, the function in it is the activation function, σ is the sigmoid function, and tanh is the hyperbolic tangent function; represents the vector addition operation, Represents vector multiplication operation. Taking the state at time t as an example, it can be seen from the figure that the input of each cell unit is the current input vector x t And the output h of the cell at the previous moment t-1 At the same time, the cell state c at the previous moment t-1 It also participates in the calculation of each gate. The signal i of the input gate t After being transformed by the nonlinear function, it is superimposed with the memory cell state processed by the forget gate to form a new memory cell state c t Finally, the memory cell state c t The output h of the LSTM unit is formed by the operation of nonlinear functions and the dynamic control of the output gate. t The calculation formula between the variables is as follows:
[0157] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0158] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0159]
[0160]
[0161] o t =σ(W o [h t-1 ,x t ]+b o )
[0162]
[0163] In the formula, represents the Hadamard product (element product), x t ∈R d is the input vector, f t ∈R h is the activation vector of the forget gate, i t ∈R h is the activation vector of the output gate, i t ∈R h is the output vector, also known as the hidden state vector, i t ∈R h is the cell state vector, [] represents vector connection, W∈R h×d is the weight matrix for operations between various vectors, the superscripts d and h represent the number of input features and hidden units, respectively, and b is the bias vector.
[0164] LSTM regularization includes: L1 regularization (Lasso regularization) adds the L1 norm (sum of absolute values) of the weight vector as a penalty term in the loss function, that is,
[0165]
[0166]
[0167] in, is the predicted value output by the model, y i is the actual value, n is the number of samples in the training set;
[0168] Where L0 is the original loss function (such as mean square error, etc.), λ is the regularization coefficient, and w i is the weight of the model. L1 regularization tends to make the weights sparse, that is, to force some unimportant weights to become 0, thereby reducing the complexity of the model and reducing the risk of overfitting. L2 regularization (ridge regularization) is to add a penalty term of the L2 norm (square root of the sum of squares) of the weight vector to the loss function. L2 regularization will make the weight value smaller but will not make it 0. It prevents the model from being too complex and avoids overfitting by limiting the size of the weight. When building an LSTM neural network, the regularization term is added to the loss function, and then trained using an optimization algorithm (such as stochastic gradient descent and its variants).
[0169] Operation constraints include voltage stability constraints, reactive power balance constraints, and maximum power output constraints;
[0170] The voltage stability constraint is:
[0171] V min ≤V t ≤V max
[0172] Among them, V min 、V max are the minimum and maximum bus voltages at the grid connection point, V t is the bus voltage of the grid connection point at the current moment;
[0173] The reactive power balance constraint is:
[0174]
[0175] Among them, Q gen,i is the reactive power output of the i-th wind turbine, Q dem is the reactive power demand of the power grid, Q total is the total reactive power of the wind farm;
[0176] The maximum power output constraint is:
[0177] P t ≤P max
[0178] Among them, P t is the active power output of the wind farm at the current moment, P max is the maximum active power output of the wind farm.
[0179] Embodiment 3:
[0180] Large offshore wind farm applications
[0181] 1. A large offshore wind farm has hundreds of wind turbines, which are connected to the offshore substation through multiple high-voltage submarine cables and then connected to the land power grid.
[0182] Data collection and preprocessing: High-precision sensors and monitoring devices are evenly distributed throughout the wind farm to collect data such as wind speed, wind direction, wind turbine output power, reactive compensation equipment status, and wind farm grid connection point voltage. The collection frequency is once every 5 minutes. Clean the data, set a strict threshold range, use advanced adaptive filtering algorithms to remove noise, use cubic spline interpolation to supplement missing data, and perform normalization based on rated power and voltage. Determine the initial input features, including wind speed, wind direction, average wind turbine output power in the previous 15 minutes, reactive compensation equipment output value, and wind farm grid connection point voltage at the previous two moments.
[0183] LSTM neural network construction and training: A single-layer LSTM network with 256 neurons was constructed. The neural network hyperparameters and settings are shown in Table 1. The historical three-year data was divided into 75%, 12.5%, and 12.5%, and the training was stopped after 5000 iterations. The test set evaluation showed that the average error of the predicted voltage amplitude was within 0.3%.
[0184] Table 1: Neural network hyperparameters and settings
[0185]
[0186] The construction and training of neural networks are divided into the following steps: importing data and preprocessing; defining the model structure; training the model based on the data; and testing the trained model.
[0187] Reactive voltage control strategy generation and execution: feature data is input in real time, and the neural network directly outputs the predicted reactive power demand and the bus voltage amplitude at the grid connection point. The particle swarm optimization algorithm is used to obtain the preliminary reactive voltage regulation scheme set based on the predicted values of reactive power demand and the bus voltage amplitude at the grid connection point, combined with the operation constraints and control objective functions of the wind farm; the local gradient descent method is used to screen the preliminary reactive voltage regulation scheme set according to the operation constraints and control objective functions of the wind farm, and the final reactive voltage regulation scheme is obtained. The reactive voltage is dynamically adjusted according to the final reactive voltage regulation scheme. After a period of operation, the voltage qualification rate of the wind farm grid connection point increased from 92% to 96.5%, the voltage fluctuation decreased, and the switching operation of the reactive compensation equipment became more reasonable, which improved the wind farm's operating efficiency, stability and reactive support capacity for the power grid.
[0188] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0189] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A reactive voltage regulation method for offshore wind farms based on deep learning, characterized in that: The following steps are involved: Step S1: Collect historical operation data of the offshore wind farm, and perform data cleaning and preprocessing on it; Step S2: construct an LSTM neural network model; Step S3: Use the preprocessed historical operation data of the offshore wind farm to train the LSTM neural network model and adjust the weights and biases in the network; Step S4: acquiring the operating data of the offshore wind farm in real time, including wind speed, wind direction, power output of wind turbines, and substation voltage; Step S5: input the real-time acquired operation data into the trained LSTM neural network model to obtain the predicted values of reactive power demand and bus voltage amplitude at the grid connection point; Step S6: According to the reactive power demand and the predicted value of the bus voltage amplitude at the grid connection point, combined with the operation constraints and control objective function of the wind farm, a hybrid optimization algorithm is used to dynamically adjust the reactive voltage.
2. The method for reactive voltage regulation of an offshore wind farm based on deep learning according to claim 1, characterized in that: The historical operation data include: real-time power output of wind turbines, wind speed, wind direction, voltage at wind farm grid connection points, and output of reactive power compensation equipment. The real-time power output of wind turbines includes active power and reactive power.
3. The method for reactive voltage regulation of an offshore wind farm based on deep learning according to claim 1, characterized in that: The pre-processing comprises the following steps: Remove invalid data and outliers from historical operating data of offshore wind farms; Interpolate or estimate missing values in the data; Standardize and normalize the data; The processed data is divided into training set, validation set and test set according to the preset ratio.
4. The method for reactive voltage regulation of an offshore wind farm based on deep learning according to claim 1, characterized in that: The LSTM neural network includes an input layer, a plurality of LSTM units, a hidden layer and an output layer connected in sequence.
5. The method for reactive voltage regulation of an offshore wind farm based on deep learning according to claim 4, characterized in that: The LSTM unit includes a forget gate, an input gate, a candidate unit state and an output gate, wherein the forget gate output formula is: f t =σ(W f ·[h t-1 ,x t ]+b f ) X t =[v t ,θ t ,P t ,Q t ,W t ,V sub,t ] Among them, f t is the output of the forget gate, which determines the influence of the memory information of the previous moment on the current state, σ is the sigmoid activation function, and W f is the weight matrix of the forget gate, b f is the bias term, h t-1 is the hidden state of the previous moment, x t is the input at the current moment, v t is the wind speed at the current moment, θ t is the wind direction at the current moment, P t is the active power of the wind turbine at the current moment, Q t is the reactive power of the wind turbine at the current moment, W t is the reactive power compensation device output at the current moment, V sub,t is the grid connection point voltage of the wind farm at the current moment; The input gate output formula is: i t =σ(W i ·[h t-1 ,x t ]+b i ) Among them, i t is the output of the input gate, which controls the impact of the current input on the unit state. is the candidate unit state, representing the potential memory at the current moment, W i , W C are the weight matrices of the input gate and candidate unit states, respectively, and b i , b C are the bias terms of the input gate and the candidate unit state respectively, and tanh is the hyperbolic tangent function; The candidate unit states are: Among them, C t is the cell state at the current moment, representing the long-term memory of the LSTM cell, C t-1 is the unit state at the previous moment; The output gate output formula is: the t =σ(W o ·[h t-1 ,x t ]+b o ) h t =o t ·tanh(C t ) Among them, t is the output of the output gate, which controls the influence of the current unit state on the final output. t is the hidden state at the current moment, which is passed to the next LSTM unit as the output of LSTM. o is the weight matrix of the output gate, b o is the bias term of the output gate.
6. The method for reactive voltage regulation of an offshore wind farm based on deep learning according to claim 1, characterized in that: The step S3 comprises the following steps: Use the training set to train the network through the back propagation algorithm, and adjust the weights and bias of the LSTM neural network model to minimize the loss function between the predicted output and the actual reactive voltage value; Use the validation set to monitor the performance of the LSTM neural network model, regularly evaluate the validation set performance indicators, and adjust the training parameters or optimize the network structure according to the changes in the validation set performance indicators; L2 regularization is used to penalize model parameters; The test set is used to evaluate the generalization ability of the model.
7. The method for reactive voltage regulation of an offshore wind farm based on deep learning according to claim 6, characterized in that: The loss function is: Among them, RMSE is the loss value of LSTM neural network model training. is the predicted value output by the model, y i is the actual value, and n is the number of samples in the training set.
8. The method for reactive voltage regulation of an offshore wind farm based on deep learning according to claim 6, characterized in that: The operation constraints include voltage stability constraints, reactive power balance constraints, and maximum power output constraints; The voltage stability constraint is: In mim ≤V t ≤V max Among them, V min 、V max are the minimum and maximum bus voltages at the grid connection point, V t is the bus voltage of the grid connection point at the current moment; The reactive power balance constraint is: Among them, Q g en,i is the reactive power output of the ith wind turbine, Qdem is the reactive power demand of the grid, and Qtotal is the total reactive power of the wind farm; The maximum power output constraint is: P t ≤P max Among them, P t is the active power output of the wind farm at the current moment, P max is the maximum active power output of the wind farm.
9. The method for reactive voltage regulation of an offshore wind farm based on deep learning according to claim 1, characterized in that: The control objective function is: f target =λ1·(Q pred -Q dem ) 2 +λ2·(V bus -V ref ) 2 Among them, f target Objective function value, Q pred 、V bus are the predicted reactive power demand and the bus voltage amplitude at the grid connection point, Q dem is the reactive power demand of the power grid, V ref is the reference voltage, λ1 and λ2 are the weight coefficients of the objective function respectively.
10. The method for reactive voltage regulation of an offshore wind farm based on deep learning according to claim 1, characterized in that: The hybrid optimization algorithm includes a particle swarm optimization algorithm and a local gradient descent method; The use of a hybrid optimization algorithm to dynamically adjust reactive voltage includes: The particle swarm optimization algorithm is used to obtain a preliminary reactive voltage regulation scheme set based on the reactive power demand and the predicted value of the bus voltage amplitude at the grid connection point, combined with the operation constraints and control objective function of the wind farm; The local gradient descent method is used to screen the preliminary reactive voltage regulation scheme set according to the operation constraints and control objective function of the wind farm, and the final reactive voltage regulation scheme is obtained. The reactive voltage is dynamically adjusted according to the final reactive voltage regulation scheme.
Citation Information
Cited By
Wind power plant regulation and control method and system based on neural network, electronic equipment and storage medium
CN121124107A
Offshore wind power plant deep reinforcement learning reactive power optimization method considering equipment fatigue loss and application of offshore wind power plant deep reinforcement learning reactive power optimization method
CN122026415A