Short-term wind speed forecasting method based on complex value acceleration algorithm
By using complex acceleration Levenberg-Marquardt algorithm to train complex forward neural networks in wind speed prediction, the problems of slow convergence speed and high computational complexity of optimization algorithms in the prior art are solved, and efficient wind speed prediction is achieved.
Patent Information
- Application Number
- CN202210648269.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-09
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-06-09
AI Technical Summary
In the prior art, the first-order optimization algorithm converges slowly in wind speed prediction, which is easy to fall into local optimality, resulting in poor prediction performance. The second-order algorithm is difficult to widely use in actual scenarios due to its high computational complexity.
A short-term wind speed prediction method based on complex value acceleration algorithm is adopted, and a complex value forward neural network is constructed, and a complex value acceleration Levenberg-Marquardt algorithm is used for training, introducing error thresholds and adaptive window lengths to reduce the computational complexity and accelerate the training process.
It effectively reduces the computational cost of training, accelerates the training speed, improves the accuracy and efficiency of wind speed prediction, and avoids local optimal problems.
Smart Images

Figure CN115081590B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a short-term wind speed prediction method based on a complex value acceleration algorithm. Background Art
[0002] Wind modeling and prediction are considered prerequisites for efficient operation of wind turbines (WTs) and optimal allocation of energy from wind farms (WFs). The power generated by WTs is difficult to predict due to the constant fluctuations in wind speed and direction. Various field measurements have shown that wind direction has less influence on WT power output compared to wind speed, since each turbine is usually facing the wind during operation. However, the effect of wind direction on power output is more prominent at milder wind speeds, since they usually come from more directions. Although wind speed and direction have been shown to affect turbine power simultaneously, only the velocity component is usually considered in practical applications, resulting in errors in both wind dynamics and wind power prediction. This demonstrates the necessity of expressing the wind signal as a vector field defined by factors such as wind speed and direction, and the fact that it is not only advantageous but also natural to introduce complex numbers to handle such wind speed and direction data.
[0003] At present, many real-valued artificial neural network methods have been used to predict wind speed and have achieved good results. In recent years, many real-valued algorithms have been extended to the complex domain. These algorithms have performed outstandingly in dealing with problems with strong complex dependencies. There are two main methods for wind speed prediction: the physical model prediction method based on weather forecast data and the statistical method for predicting wind speed based on historical data. The physical model is represented by the numerical weather prediction model (NWP), which uses real-time meteorological conditions for prediction. However, due to the complexity of the numerical meteorological model and the low frequency of weather forecast updates, , It is not suitable for short-term wind speed forecasting. Due to the randomness and volatility of short-term wind speed data, the autocorrelation and non-stationarity of wind speed series data make it impossible for a single statistical method model to accurately learn the law of change, resulting in problems such as low prediction accuracy and the predicted value significantly lagging behind the true value. In this way, even if the model indicator effect is very good, it cannot be used.
[0004] The statistical method of predicting wind speed based on historical data builds a nonlinear mapping relationship between data by learning the rules of historical wind speed data, and then realizes time series prediction. Common methods include artificial neural network (ANN), support vector machines (SVM), Kalman filter, extreme learning machine (ELM), etc.
[0005] As a simple and effective modeling method with excellent nonlinear mapping and approximation capabilities, artificial neural networks have been widely used in wind speed prediction and related applications in recent years. However, when using the first-order algorithm to train the wind speed prediction model, the gradient information is used to minimize the loss function. The most widely used method is the gradient descent (GD), which calculates the gradients of each layer of the network through back propagation and introduces the step size as the final weight change. However, the first-order optimization algorithm converges slowly and is prone to fall into local optimality, resulting in the inability to further reduce the loss function value when training the network, making it difficult for wind speed prediction to achieve the expected performance.
[0006] In order to solve this shortcoming of the first-order optimization algorithm, the second-order algorithm is used to train artificial neural networks, such as Newton's method, Levenberg-Marquardt algorithm (LM), etc. These second-order algorithms use second-order derivative information to update parameters. However, these commonly used second-order optimization algorithms usually need to calculate the Hessian matrix during backpropagation, resulting in a very high overall complexity of the algorithm, which also limits its application in various scenarios. In fact, the Hessian matrix can be approximated by the Jacobian matrix, which is called the quasi-Hessian matrix. There are two ways to calculate the Hessian through the Jacobian matrix. First, the rows of the first matrix are multiplied by the columns of the second matrix, so that scalars can be obtained; second, when the columns of the first matrix are multiplied by the rows of the second matrix, the result is part of the quasi-Hessian matrix. Therefore, the second method allows the construction process of the quasi-Hessian matrix to start faster without storing the entire Jacobian matrix of all modes and all outputs, which reduces the demand in memory. However, the number of multiplications and additions required by these two methods is exactly the same, but the execution order is different. The number of required calculations cannot be reduced, and the problem of high computational complexity and gradient vanishing still exists. In order to avoid gradient vanishing, existing technologies introduce methods such as natural gradient, perturbation gradient, and weight compression. However, for problems with high complexity, the calculation and storage in memory are often reduced by changing the order of operations or matrix decomposition, which still cannot fundamentally solve the problem of high computational complexity. Summary of the invention
[0007] To this end, the technical problem to be solved by the present invention is to overcome the deficiencies in the prior art and provide a short-term wind speed prediction method based on a complex value acceleration algorithm, which can speed up the training speed and reduce the training loss to obtain effective wind speed prediction results.
[0008] In order to solve the above technical problems, the present invention provides a short-term wind speed prediction method based on a complex value acceleration algorithm, comprising the following steps:
[0009] S1: Obtain sample data including wind speed and wind direction, preprocess the sample data to obtain a data set, and divide the data set into a training set and a test set;
[0010] S2: Construct and initialize the error threshold e 0 and a complex-valued feedforward neural network model with adaptive window length N;
[0011] S3: Use the complex-valued accelerated LM algorithm to train the initialized complex-valued forward neural network to obtain a trained complex-valued forward neural network;
[0012] S4: Input the test set into the trained complex-valued neural network to obtain the prediction result.
[0013] Preferably, the preprocessing of the sample data to obtain the data set is specifically as follows:
[0014] The sample data is averaged every time T to obtain the original data set, and the pth, p+1th to p+i-1th data of the original data set are used as the input of the pth sample of the complex-valued forward neural network, and the p+ith data is used as the expected output when training the numerical forward neural network, and the input Z of the pth sample of the complex-valued forward neural network is obtained. p ,z p+1 ,...,z p+i-1 ] T , p∈[1,...,P], P is the number of input samples of the complex-valued feedforward neural network.
[0015] Preferably, the structure of the complex-valued feedforward neural network is:
[0016] The number of input neurons in the complex-valued feedforward neural network is L, the number of hidden layer neurons is M, and the number of output neurons is O, l∈[1,...,L], m∈[1,...,M], o∈[1,...,O]; the parameter vector θ=[θ 1 ,θ 2 ,...,θ s ,...,θ S ], where S is the number of all adjustable parameters, s∈[1,...,S];
[0017] The output of the mth hidden layer neuron of a complex-valued neural network where g is a complex-valued activation function, is the input weight, Represents the input weight is a complex-valued vector of length L+1, w m0 is the bias of the mth hidden layer neuron, w m1,...,w mL is the connection weight between the mth hidden layer neuron and the input neuron;
[0018] according to Get the hidden layer output matrix of the complex-valued neural network
[0019] Preferably, the output Y of the complex-valued feedforward neural network is:
[0020]
[0021] where g is a complex-valued activation function, is the hidden layer output vector corresponding to the pth sample, where is the output value of the p-th sample in the m-th hidden layer; is the weight vector corresponding to the oth output neuron, where v o0 represents the neuron bias corresponding to the oth output neuron, v om Represents the connection weight between the mth hidden layer neuron and the oth output neuron.
[0022] Preferably, the objective function E of the complex-valued feedforward neural network is:
[0023]
[0024] Where, e=[e 1 ,e 2 ,...,e o ,...,e O ] is the error vector, e o =[y 1o -d 1o ,...,y po -d po ,...,y Po -d Po ] T , d po represents the expected output corresponding to the pth sample at the oth output neuron, y po represents the actual output corresponding to the p-th sample at the o-th output neuron; e po It represents the error value corresponding to the p-th sample at the o-th output neuron, () H Represents the conjugate transpose of a matrix or vector, () * Represents the conjugate of a matrix or vector.
[0025] Preferably, the complex Hessian matrix H of the complex-valued feedforward neural network is:
[0026]
[0027] in,
[0028]
[0029] Preferably, the quasi-Hessian matrix Q of the complex-valued accelerated LM algorithm is G H G, G H The weight of G The update formula is:
[0030]
[0031] Among them, μ is the combination coefficient, is a composite Jacobian matrix, where
[0032] Preferably, the complex-valued accelerated LM algorithm is used to train the initialized complex-valued feedforward neural network to obtain a trained complex-valued feedforward neural network, specifically:
[0033] S3-1: Construct G at each iteration H Before G, the error vector e is sorted in descending order to generate a sequence e of length S list , calculate the Jacobian matrix J θ and
[0034] S3-2: When |e po |>e 0 And e po ∈e list When G H The submatrix q of G p o and the gradient vector gradient term g po , q po Superimposed on G H G, g po Overlay to where || represents the modulus of the complex-valued error;
[0035] S3-3: Determine whether , where E(t) refers to the objective function E at the t-th iteration, where E(t-1) refers to the objective function E at the t-1-th iteration, and β is the preset attenuation threshold; if satisfied, the adaptive window length N is reduced; if not satisfied, the adaptive window length N is expanded;
[0036] S3-4: Determine whether N is within the interval [pro×P×O, P×O], where pro represents the lower bound coefficient of the adaptive window length N; if so, use the complex-valued LM algorithm to update all parameters of the complex-valued feedforward neural network; if not, when N>P×O, set N to P×O, and when N<pro×P×O, set N to pro×P×O, and use the complex-valued LM algorithm to update all parameters of the complex-valued feedforward neural network;
[0037] S3-5: Determine whether the iteration end condition is met. If so, stop training to obtain a trained complex-valued feedforward neural network; if not, execute S3-1.
[0038] Preferably, the G H Submatrix of G The gradient vector gradient term Among them J θ,po =[J θ,po1 ,J θ,po2 ,...,J θ,pos ,...,J θ,poS ],
[0039] Preferably, the adaptive window length N is reduced by: setting N=N / ch, where ch is a reduction coefficient;
[0040] The expansion process of the adaptive window length N is specifically as follows: let N=N×ch.
[0041] The above technical solution of the present invention has the following advantages compared with the prior art:
[0042] The present invention introduces an error threshold and an adaptive window length, and uses a complex-valued accelerated LM algorithm to train a complex-valued forward neural network, thereby effectively reducing the computational cost in the early, middle and late stages of training, accelerating the training speed, and effectively reducing the computational complexity while ensuring the short-term wind speed prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein
[0044] Figure 1 is a system block diagram of the present invention;
[0045] Figure 2 is a flow chart of training a complex-valued feedforward neural network in the present invention;
[0046] Figure 3is a comparison diagram of the wind speed and wind direction predicted by the present invention in an embodiment of the present invention and the actual wind speed and wind direction in polar coordinates;
[0047] Figure 4 is a comparison chart of the training results using CGD, CLM and the present invention and the actual wind speed in an embodiment of the present invention;
[0048] Figure 5 yes Figure 4 A partial enlargement of the wind speed range of 0.55-0.8 and the time slice of 350-650;
[0049] Figure 6 is a comparison diagram of the training results using CGD, CLM and the present invention and the actual wind direction in the embodiment of the present invention;
[0050] Figure 7 yes Figure 6 A local enlarged view of the wind direction with phase between -2 and -0.6 and time slice between 200 and 360. DETAILED DESCRIPTION
[0051] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0052] Reference Figure 1 As shown, the present invention discloses a short-term wind speed prediction method based on a complex value acceleration algorithm, comprising the following steps:
[0053] S1: Obtain sample data including wind speed and wind direction, preprocess the sample data to obtain a data set, and divide the data set into a training set and a test set. Specifically: average the sample data every time T to obtain the original data set, use the pth, p+1th to p+i-1th data of the original data set as the input of the pth sample of the complex-valued forward neural network, and the p+ith data as the expected output when training the numerical forward neural network, and obtain the input Z of the pth sample of the complex-valued forward neural network = [z p ,z p+1 ,...,z p+i-1 ] T , p∈[1,...,P], P is the number of input samples of the complex-valued forward neural network. i is a constant. In this embodiment, i is 3. The expected output is a complex number consisting of wind speed and wind direction. Z=[z p ,z p+1 ,...,z p+i-1 ] T , p∈[1,...,P] is the data set obtained after preprocessing the sample data, and the processed data set is divided into a training set and a test set.
[0054] The input of the complex-valued forward neural network is a complex sequence represented by wind speed and wind direction. In this embodiment, the real-world wind speed data of Washington collected by the Iowa Department of Transportation of the United States is used. The data is the wind speed data and wind direction data every minute from February 1, 2010 to February 8, 2010. After the original data is prepared, the data is averaged every hour to obtain a sample set. In this experiment, three consecutive samples (i.e., the pth, p+1, and p+2 samples) are used as the input of the complex-valued forward neural network, and the next sample (i.e., the pth+3 sample) value is used as the expected output of the training, and finally 9000 wind speed samples are selected. The data is represented as complex values according to wind speed and wind direction, and 7000 samples are used as the training set, p=1,2,...6997, and 2000 samples are used as the test set.
[0055] S2: Construct and initialize the error threshold e 0 The complex-valued forward neural network with adaptive window length N is initialized with the connection weights between neurons, the bias of neurons, and the error threshold e 0 And adaptive window length N.
[0056] According to the wind speed prediction problem, the number of input neurons of the complex-valued forward neural network is L, the number of hidden layer neurons is M, and the number of output neurons is O, l∈[1,...,L], m∈[1,...,M], o∈[1,...,O]; the parameter vector θ=[θ 1 ,θ 2 ,...,θ s ,...,θ S ], where S is the number of all adjustable parameters, s∈[1,...,S]; the output of the mth hidden layer neuron of the complex-valued neural network where g is a complex-valued activation function, is the input weight, Represents the input weight is a complex-valued vector of length L+1, w m0 is the bias of the mth hidden layer neuron, w m1 ,...,w mL is the connection weight between the mth hidden layer neuron and the input neuron; according to Get the hidden layer output matrix of the complex-valued neural network The complex-valued neural network initialized in this embodiment is a 3-6-1 three-layer complex-valued forward neural network, and the hidden layer and the output layer use the splitTanh activation function.
[0057] According to Φ, the output Y of the complex-valued forward neural network is:
[0058]
[0059] where g is a complex-valued activation function, is the hidden layer output vector corresponding to the pth sample, where is the output value of the p-th sample in the m-th hidden layer; is the weight vector corresponding to the oth output neuron, where v o0 represents the neuron bias corresponding to the oth output neuron, v om Represents the connection weight between the mth hidden layer neuron and the oth output neuron.
[0060] The objective function E of constructing a complex-valued feedforward neural network is:
[0061]
[0062] Where, e=[e 1 ,e 2 ,...,e o ,...,e O ] is the error vector, e o =[y 1o -d 1o ,...,y po -d po ,...,y Po -d Po ] T , d po represents the expected output corresponding to the pth sample at the oth output neuron, y po represents the actual output corresponding to the p-th sample at the o-th output neuron; e po It represents the error value corresponding to the p-th sample at the o-th output neuron, () H Represents the conjugate transpose of a matrix or vector, () * Represents the conjugate of a matrix or vector. The complex Hessian matrix H for constructing a complex-valued forward neural network is:
[0063]
[0064] in,
[0065]
[0066] Among them, H θθ Elements in Elements in
[0067] Elements in
[0068] Elements in
[0069] S3: Use the complex-valued accelerated LM algorithm to train the initialized complex-valued forward neural network. The training set is [z p ,z p+1 ,...,z p+i-1 ] T In this embodiment, the training set is [z p ,z p+1 ,z p+2 ] T , by introducing the error threshold e 0 The restriction of the adaptive window length N can accelerate the construction of the quasi-Hessian matrix of the complex-valued accelerated LM algorithm, thereby achieving the purpose of accelerating training and escaping local minima. A trained complex-valued forward neural network is obtained.
[0070] The quasi-Hessian matrix Q of the complex-valued accelerated LM algorithm is approximately G H G, G H The weight of G The update formula is: in, is a composite Jacobian matrix; I is the identity matrix; μ is a combination coefficient, which can avoid the situation where the quasi-Hessian matrix is not positive definite. In this embodiment, the initial value of the combination coefficient μ=0.01, μ max =1e10,μ min =1e-20. max is the complex value accelerating LM algorithm when updating weight parameters, μ min It is the lower bound of μ when the complex-valued accelerated LM algorithm updates the weight parameters; when μ is greater than μ max When μ is less than μ min When μ is set to μ min .J θ and They are the corresponding Jacobian matrices, specifically:
[0071]
[0072] When the error information is back propagated, if the error information is equal to or close to 0, the gradient value will also be close to 0, and the neural network cannot learn new knowledge at this time. Therefore, the error filtering mechanism (i.e., the error threshold e 0) can effectively reduce the number of sub-matrices required for construction and reduce the computational complexity. However, in the later stages of training, some errors will no longer decrease, and the error filtering mechanism will no longer affect the network. Therefore, another adaptive window length N restriction is introduced to effectively reduce the number of sub-matrices required in the middle and late stages of training, which can effectively avoid local minima while accelerating training.
[0073] like Figure 2 As shown, the complex-valued accelerated LM algorithm is used to train the initialized complex-valued forward neural network, and the training target value is z p+i In this embodiment, the training target value is z p+3 , we get a trained complex-valued feedforward neural network. The specific training process is:
[0074] S3-1: Introducing error threshold e 0 and adaptive window length N, construct G in each iteration H Before G, the error vector e is sorted in descending order to generate a sequence e of length S list , calculate the Jacobian matrix J θ and
[0075] S3-2: If and only if |e po |>e 0 And e po ∈e list When G H The submatrix q of G po and the gradient vector gradient term g po , q po Superimposed on G H G, g po Overlay to Where || represents the modulus of the complex value error. In the early stage of training, the error threshold e is introduced 0 In the case where the early errors are generally large, the contribution of samples with large back-propagation errors to the weights is given priority, thereby improving the training speed. In this embodiment, the error threshold e 0 =0.005.
[0076] The G H Submatrix of G The gradient vector gradient term Among them J θ,po =[J θ,po1 , J θ,po2 , ..., J θ,pos , ..., J θ,poS ],
[0077] definition at this time definition at this time According to the above analysis, the sub-matrices of the transformed quasi-Hessian matrix are independent of each other and can be freely superimposed. And all the sub-matrices q po They are all symmetrical. Using this feature, we only need to calculate the upper (or lower) triangular elements of these sub-matrices, which reduces the amount of calculation.
[0078] S3-3: Determine whether , where E(t) refers to the objective function E at the t-th iteration, where E(t-1) refers to the objective function E at the t-1-th iteration, and β is a preset attenuation threshold, and in this embodiment, β=0.01; if satisfied, the adaptive window length N is reduced; if not satisfied, the adaptive window length N is expanded. The reduction of the adaptive window length N is specifically as follows: let N=N / ch, where ch is a reduction coefficient, and in this embodiment, ch=1.1. The expansion of the adaptive window length N is specifically as follows: let N=N×ch.
[0079] The reduction of the adaptive window length N is determined by the change in the loss function E(t). When the change is small, it means that the network training does not need the original amount of error. Therefore, the adaptive window length is reduced and less error is used to construct the quasi-Hessian matrix Q. The number of errors that need to be considered is adaptively reduced according to the change in the training loss, thereby improving the training speed.
[0080] S3-4: Determine whether N is within the interval [pro×P×O, P×O], where pro represents the lower bound coefficient of the adaptive window length N, and in this embodiment, pro=0.6; if satisfied, use the complex-valued LM algorithm to update all parameters of the complex-valued forward neural network; if not satisfied, determine whether N exceeds the interval: when N>P×O, set N to P×O, when N<pro×P×O, set N to pro×P×O, and use the complex-valued LM algorithm to update all parameters of the complex-valued forward neural network. Once N is greater than the upper bound, the array index will be out of bounds. When N is less than the lower bound, the number of sub-matrices used is too small, which will affect the final effect, so use N to update the interval.
[0081] S3-5: Determine whether the iteration end condition is met. In this embodiment, the iteration end condition is that the number of calculations of the objective function E reaches the preset maximum number of evaluations, or the change in the objective function E between two iterations is less than the preset expected loss. If it is met, stop training and obtain a trained complex-valued forward neural network, that is, a trained wind speed prediction model; if it is not met, execute S3-1.
[0082] S4: Test set In this embodiment, the test set is Input the trained complex-valued neural network to get the prediction result The prediction result in this embodiment is
[0083] Since the general complex-valued LM algorithm needs to calculate the Jacobian matrix once to calculate the quasi-Hessian matrix during each iteration, a large amount of storage and computing consumption is required in this process; at the same time, as the number of iterations increases, not every error will affect the update of the weights. Therefore, the present invention proposes a method of using complex-valued error screening and limited storage for the LM algorithm to train the complex-valued neural network. Because the Hessian matrix can be regarded as obtained from the Jacobian matrix, the error is filtered by introducing an error threshold to ensure that the network can feedback effective error information as much as possible. At the same time, an adaptive window length is introduced, and a limited number of gradient vectors are used to construct an approximate Hessian matrix, which limits the construction scale of the approximate Hessian matrix, thereby reducing the number of sub-matrices of the Hessian matrix that need to be calculated in the early, middle and late stages of training, speeding up the training speed of the complex-valued second-order algorithm and reducing the training loss. In addition, using the trained complex-valued forward neural network in the present invention to predict wind speed can achieve satisfactory prediction results.
[0084] Beneficial effects of the present invention:
[0085] 1. Introducing an error threshold into the traditional LM algorithm, when the error is generally large in the early stage of training, giving priority to the contribution of samples with large back-propagation errors to the weights, effectively reducing the training error.
[0086] 2. When calculating the approximate Hessian matrix, you only need to save a row vector of the composite Jacobian matrix to calculate the corresponding sub-approximate Hessian matrix; at the same time, the sub-approximate Hessian matrices are superimposed to obtain the approximate Hessian matrix. Because the matrix is symmetric, the amount of calculation can be reduced by half. The number of sub-matrices and gradient vectors that need to be superimposed is reduced, thereby reducing the number of calculations of the composite Jacobian sub-matrix during training and reducing training time.
[0087] 3. By adding an adaptive window length during the training process, the number of errors that need to be considered can be adaptively reduced according to the change in training loss, thereby improving the training speed.
[0088] 4. Introducing error threshold and adaptive window length into the traditional LM algorithm, the improved complex value accelerated LM algorithm is applied to wind speed prediction. On the basis of accelerated training, a lower training error can be obtained, making the wind speed prediction results closer to the actual data.
[0089] In order to further illustrate the beneficial effects of the present invention, the training and wind speed prediction results of the present invention (Accelerate Complex-valued Levenberg-Marquardt, ACLM) are compared with those of the CGD method (Complex-valuedGradient Descent) and the CLM method (Complex-valued Levenberg-Marquardt) in this embodiment. Among them, since CGD converges slowly as a first-order algorithm, the number of iterations is set to 200 times, and the number of iterations of the CLM algorithm and the ACLM of the present invention are both set to 20 times. The training results are shown in Table 1:
[0090] CGD CLM ACLM Average number of sub-matrices \ 7000 4825.9 Average training error 0.0128 0.0031 0.0022 Training time 1.7422s 6.3492s 2.7751s
[0091] Table 1 Comparison of training results of CGD, CLM and the present invention
[0092] It can be seen from Table 1 that the present invention not only reduces the number of submatrices to be calculated and speeds up the training process, but also reduces the final training error.
[0093] Figure 3 It is a comparison chart of the wind speed and direction predicted by the present invention and the actual wind speed and direction in polar coordinates. Figure 3 The '*' indicates the actual wind speed and direction distribution, and the '+' indicates the wind speed and direction distribution predicted by the present invention. Figure 3 It can be seen that the predicted data of the present invention is basically close to the actual wind speed data.
[0094] Figure 4 is a comparison chart of the training results using CGD, CLM and the present invention and the actual wind speed in the embodiment of the present invention, Figure 5 yes Figure 4 A partial enlargement of the wind speed range of 0.55-0.8 and the time slice of 350-650; Figure 6 is a comparison diagram of the training results using CGD, CLM and the present invention and the actual wind direction in the embodiment of the present invention, Figure 7 yes Figure 6 A partial enlarged view of the wind direction phase between -2 and -0.6 and the time slice between 200 and 360. Figures 4 to 6 It can be seen that the prediction accuracy of the second-order algorithm is improved compared with the first-order algorithm and is closer to the actual wind speed data; at the same time, combined with Table 1, it can be seen that the present invention can effectively reduce the computational complexity while the accuracy is not lower than the CLM performance.
[0095] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0096] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0097] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0099] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A short-term wind speed prediction method based on a complex value acceleration algorithm, characterized in that: The following steps are involved: S1: Obtain sample data including wind speed and wind direction, preprocess the sample data to obtain a data set, and divide the data set into a training set and a test set; S2: construct and initialize a complex-valued forward neural network model including an error threshold e0 and an adaptive window length N; S3: Use the complex-valued accelerated LM algorithm to train the initialized complex-valued forward neural network to obtain a trained complex-valued forward neural network; S4: Input the test set into the trained complex-valued neural network to obtain the prediction result; The structure of the complex-valued feedforward neural network is: The number of input neurons in the complex-valued forward neural network is L, the number of hidden layer neurons is M, and the number of output neurons is O, l∈[1,...,L], m∈[1,...,M], o∈[1,...,O]; the parameter vector θ=[θ1,θ2,...,θ s ,...,θ S ], where S is the number of all adjustable parameters, s∈[1,...,S]; The output of the mth hidden layer neuron of a complex-valued neural network where g is a complex-valued activation function, is the input weight, Represents the input weight is a complex-valued vector of length L+1, w m0 is the bias of the mth hidden layer neuron, w m1 ,...,w mL is the connection weight between the mth hidden layer neuron and the input neuron, Z = [z p ,z p+1 ,...,z p+i-1 ] T , Z is the input of the pth sample of the complex-valued feedforward neural network, p∈[1,...,P], P is the number of input samples of the complex-valued feedforward neural network; according to Get the hidden layer output matrix of the complex-valued neural network The output Y of the complex-valued feedforward neural network is: where g is a complex-valued activation function, is the hidden layer output vector corresponding to the pth sample, where is the output value of the p-th sample in the m-th hidden layer; is the weight vector corresponding to the oth output neuron, where v o0 represents the neuron bias corresponding to the oth output neuron, v om represents the connection weight between the mth hidden layer neuron and the oth output neuron; The objective function E of the complex-valued feedforward neural network is: Where, e=[e 1 ,e 2 ,...,e o ,...,e O ] is the error vector, e o =[y 1o -d 1o ,...,y po -d po ,...,y Po -d Po ] T , d po represents the expected output corresponding to the pth sample at the oth output neuron, y po represents the actual output corresponding to the p-th sample at the o-th output neuron; e po It represents the error value corresponding to the p-th sample at the o-th output neuron, () H Represents the conjugate transpose of a matrix or vector, () * represents the conjugate of a matrix or vector; the quasi-Hessian matrix Q of the complex value accelerated LM algorithm is G H G, G H The weight of G The update formula is: Among them, μ is the combination coefficient, is a composite Jacobian matrix, where 2. The short-term wind speed prediction method based on complex value acceleration algorithm according to claim 1 is characterized in that: The preprocessing of sample data to obtain a data set is specifically as follows: The sample data is averaged every time T to obtain the original data set, and the pth, p+1th to p+i-1th data of the original data set are used as the input of the pth sample of the complex-valued forward neural network, and the p+ith data is used as the expected output when training the numerical forward neural network, and the input Z of the pth sample of the complex-valued forward neural network is obtained. p ,z p+1 ,...,z p+i-1 ] T , p∈[1,...,P], P is the number of input samples of the complex-valued feedforward neural network.
3. The short-term wind speed prediction method based on complex value acceleration algorithm according to claim 1 is characterized in that: The complex Hessian matrix H of the complex-valued feedforward neural network is: in, 4. The short-term wind speed prediction method based on complex value acceleration algorithm according to claim 1 is characterized in that: Use the complex-valued accelerated LM algorithm to train the initialized complex-valued feedforward neural network to obtain a trained complex-valued feedforward neural network, specifically: S3-1: Construct G at each iteration H Before G, the error vector e is sorted in descending order to generate a sequence e of length S list , calculate the Jacobian matrix J θ and S3-2: When |e po |>e0 and e po ∈e list When G H The submatrix q of G po and the gradient vector gradient term g po , q po Superimposed on G H G, g po Overlay to where || represents the modulus of the complex-valued error; S3-3: Determine whether , where E(t) refers to the objective function E at the t-th iteration, where E(t-1) refers to the objective function E at the t-1-th iteration, and β is the preset attenuation threshold; if satisfied, the adaptive window length N is reduced; if not satisfied, the adaptive window length N is expanded; S3-4: Determine whether N is within the interval [pro×P×O, P×O], where pro represents the lower bound coefficient of the adaptive window length N; if so, use the complex-valued LM algorithm to update all parameters of the complex-valued feedforward neural network; if not, when N>P×O, set N to P×O, and when N<pro×P×O, set N to pro×P×O, and use the complex-valued LM algorithm to update all parameters of the complex-valued feedforward neural network; S3-5: Determine whether the iteration end condition is met. If so, stop training to obtain a trained complex-valued feedforward neural network; if not, execute S3-1.
5. The short-term wind speed prediction method based on complex value acceleration algorithm according to claim 4 is characterized in that: The G H Submatrix of G The gradient vector gradient term Among them J θ,po =[J θ,po1 ,J θ,po2 ,...,J θ,pos ,...,J θ,poS ], 6. The short-term wind speed prediction method based on complex value acceleration algorithm according to claim 4 is characterized in that: The adaptive window length N is reduced by: setting N=N / ch, where ch is a reduction coefficient; The expansion process of the adaptive window length N is specifically as follows: let N=N×ch.
Citation Information
Patent Citations
Second-order hybrid construction method and system of complex-valued forward neural network
CN111950711A
Wind speed prediction method based on complex numerical value forward neural network
CN113158582A