Complex-Valued Neural Network Solar Radiation Prediction Method and System Based on the ASM-CNAG Algorithm
By adopting the ASM-CNAG algorithm in complex-value neural networks, adaptively adjusting the step length and combining the multi-step quasi-Newtonian method, the problem of traditional CNAG methods requiring manual parameter adjustment is solved, and the accuracy and speed of solar radiation prediction are improved.
Patent Information
- Application Number
- CN202211606967.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2042-12-13
AI Technical Summary
Traditional CNAG methods require manual parameters adjustment when training complex neural networks, resulting in limited prediction accuracy.
The complex value neural network method based on the ASM-CNAG algorithm is adopted to adaptively adjust the step size by estimating the local smooth coefficients, and combine the multi-step quasi-Newtonian method to better estimate the second-order information of iterative points.
The problem of manual parameter adjustment is solved, the prediction accuracy and training speed of the model are improved, and the prediction accuracy is achieved.
Smart Images

Figure CN116187517B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solar radiation prediction, and particularly to a complex-valued neural network solar radiation prediction method and system based on the ASM-CNAG (Adaptive stepsize complex-valued Nesterov accelerated gradient with multistep, a complex-valued accelerated gradient algorithm combining multistep quasi-Newton method) algorithm. Background Art
[0002] As a clean and renewable energy source, solar energy has extensive application potential in the development of green energy and the reduction of environmental pollution. However, the amount of solar radiation has inherent characteristics of intermittency and uncertainty. Due to the influence of climate factors such as seasons, weather, and cloud density, the stability of solar irradiation and its applications are restricted. Therefore, solar radiation prediction has broad application prospects. For example, it plays a crucial guiding role in the design and evaluation of solar energy systems, climate research, water resource management, crop productivity estimation, etc. In addition, short-term prediction of solar radiation has important practical significance in aspects such as grid-connected scheduling of photovoltaic systems and climate research.
[0003] Since the last century, many traditional time series signal prediction methods have been used to predict solar radiation, such as wavelet transform method, exponential smoothing method, autoregressive moving average method, etc. However, these methods are difficult to adapt to rapid non-linear changes and have limited prediction accuracy. Nowadays, with the development of machine learning, some non-linear methods have also been used to predict solar radiation, such as support vector machines, multi-layer perceptrons, artificial neural networks, etc. Compared with traditional methods, machine learning methods have more powerful non-linear fitting capabilities, higher prediction accuracy, and better robustness.
[0004] Complex-valued neural networks (CVNN), as a branch of artificial neural networks, have advantages in many aspects compared with real-valued neural networks. For example, CVNN learns faster and has stronger generalization ability, etc. CVNN also has related applications in prediction problems, such as combining wind speed and wind direction for wind prediction. The methods for training CVNN can be roughly divided into two categories. The first category is the first-order algorithms represented by the gradient descent method. Such algorithms require small amounts of computation and storage for iteration, but have slow convergence speed and are easily affected by saddle points and local minimum points, thus affecting the training speed and prediction accuracy of the model. The second category of methods is the second-order algorithms represented by the Newton method. Such algorithms have fast convergence speed, but the required computational and storage costs are too high.
[0005] In the real number domain, the NAG (Nesterov accelerated gradient) algorithm, as an accelerated gradient algorithm, can effectively accelerate the convergence speed of the traditional gradient descent algorithm without consuming a large amount of computing resources like second-order algorithms. In recent years, the NAG algorithm has been extended to the complex number domain to optimize complex-valued problems, and this method is called the CNAG (complex-valued Nesterov accelerated gradient) algorithm. However, both NAG and CNAG use a fixed step size. The choice of step size is closely related to the convergence and convergence speed of the algorithm. Generally speaking, to ensure the convergence of the algorithm, the step size is taken as the reciprocal of the global smooth coefficient of the objective function. However, in practical applications, the accurate calculation of the global smooth coefficient of the objective function is also an NP (Non-deterministic Polynomial) problem. Moreover, in a fully complex-valued neural network, due to the existence of singular points in the activation function, the global smooth coefficient does not exist. Therefore, usually when using the CNAG algorithm to train a CVNN, the size of the step size can only be adjusted manually according to experimental results. Summary of the Invention
[0006] For this reason, the embodiments of the present invention provide a method and system for predicting solar radiation of a complex-valued neural network based on the ASM-CNAG algorithm, which are used to solve the problem of manual parameter adjustment required by the traditional CNAG method when training a complex-valued neural network in the prior art, and improve the prediction accuracy of the model.
[0007] To solve the above problems, the embodiments of the present invention provide a method for predicting solar radiation of a complex-valued neural network based on the ASM-CNAG algorithm, and the method includes:
[0008] S1: Preprocess the collected original solar radiation data to obtain a data set, and divide the data set into a training set and a test set;
[0009] S2: Construct a suitable complex-valued neural network model according to the size of the data set;
[0010] S3: Use the data in the training set to train the complex-valued neural network model;
[0011] S4: Input the data in the test set into the trained complex-valued neural network model to test the prediction ability of the model, and obtain a solar radiation prediction model;
[0012] S5: Use the obtained solar radiation prediction model to predict solar radiation.
[0013] Among them, using the ASM-CNAG algorithm to train the complex-valued neural network model with the data in the training set includes the following steps:
[0014] Step1: Initialize the parameters;
[0015] Step2: Calculate the leading position and complex gradient of the current iteration point, and their calculation formulas are as follows:
[0016]
[0017]
[0018] where t represents the t-th iteration, v represents the momentum direction, β represents the momentum coefficient, w represents the weight vector, is the leading position, represents the complex gradient, and J represents the loss function;
[0019] Step3: Calculate the change in the gradient and position between the previous and current iterations according to the formula in Step2, and their calculation formulas are as follows:
[0020] y t = g t+1 - g t
[0021]
[0022] where y t is the change in the gradient, and s t is the change in the position;
[0023] Step4: Calculate the multi-step quasi-Newton scale coefficient, and its calculation formula is as follows:
[0024]
[0025]
[0026] θ t = tanh(γ t )
[0027] where (·) H represents the conjugate transpose, |·| represents taking the absolute value, λ t and γ t are intermediate variables, μ t-1 is the temporary step size of the previous iteration, θ t is the multi-step quasi-Newton scale coefficient, and tanh(·) is the hyperbolic tangent function;
[0028] Step5: Calculate the step size, and its calculation formula is as follows:
[0029] ω t = y t - θ t y t-1
[0030] r t = s t - θ t s t-1
[0031]
[0032] α t = min{α max , max{α min , μ t}}
[0033] where ω t and r t are intermediate variables, μ t is the temporary step size, α t is the actual step size of this iteration, α max and α min are the upper and lower bounds of the actual step size;
[0034] Step 6: Update the momentum and weights, and their calculation formulas are as follows:
[0035] v t = βv t-1 - α t g t
[0036] w t+1 = w t + v t
[0037] where v t represents the momentum, and w t represents the weights;
[0038] Step 7: Determine whether the preset termination condition is reached. If not, return to execute Step 2; if so, proceed to the next step;
[0039] Step 8: Obtain the trained complex-valued neural network model.
[0040] Preferably, in Step S1, the method for preprocessing the collected original solar radiation data includes: data cleaning, data normalization, and data complex-valued conversion.
[0041] Preferably, the method for data cleaning is:
[0042] For the missing values in the data, use the mean of its adjacent values to complete them.
[0043] Preferably, the data normalization uses the Min - Max normalization method.
[0044] Preferably, the method for complex - valued conversion of the data is as follows:
[0045] Taking the magnitude of the real - valued data as the magnitude of the complex number and the corresponding time of the data as the phase of the complex number, its conversion formula is as follows:
[0046] S d = S d ×e (j2πd / 365)
[0047] where d represents the d - th day, S d represents the average daily solar radiation on the d - th day, and e is the natural constant.
[0048] Preferably, in step S2, the complex - valued neural network model uses a forward complex - valued neural network, and the activation function of the neurons in the hidden layer of the forward complex - valued neural network uses the tanh function.
[0049] An embodiment of the present invention provides a complex - valued neural network solar radiation prediction system based on the ASM - CNAG algorithm, and the system includes:
[0050] An embodiment of the present invention provides a complex - valued neural network solar radiation prediction method based on the ASM - CNAG algorithm, and the method includes:
[0051] A data pre - processing module, configured to pre - process the collected original solar radiation data to obtain a data set, and divide the data set into a training set and a test set;
[0052] A network model construction module, configured to construct a complex - valued neural network model according to the size of the data set;
[0053] A network model training module, configured to use the ASM - CNAG algorithm and use the data in the training set to train the complex - valued neural network model;
[0054] A network model testing module, configured to input the data in the test set into the trained complex - valued neural network model to test the prediction ability of the model, and obtain a solar radiation prediction model;
[0055] A solar radiation prediction module, configured to use the obtained solar radiation prediction model to predict solar radiation;
[0056] Among them, using the ASM - CNAG algorithm and using the data in the training set to train the complex - valued neural network model includes the following steps:
[0057] Step1: Initialize the parameters;
[0058] Step 2: Calculate the leading position and complex gradient of the current iteration point, and their calculation formulas are as follows:
[0059]
[0060]
[0061] Among them, t represents the t-th iteration, v represents the momentum direction, β represents the momentum coefficient, w represents the weight vector, is the leading position, represents the complex gradient, J represents the loss function;
[0062] Step 3: Calculate the change in gradient and position between the previous and current iterations according to the formula in Step 2, and their calculation formulas are as follows:
[0063] y t = g t+1 - g t
[0064]
[0065] Among them, y t is the change in gradient, s t is the change in position;
[0066] Step 4: Calculate the multi-step quasi-Newton scale coefficient, and its calculation formula is as follows:
[0067]
[0068]
[0069] θ t = tanh(γ t )
[0070] Among them, (·) H represents the conjugate transpose, |·| represents taking the absolute value, λ t and γ t are intermediate variables, μ t-1 is the temporary step size of the previous iteration, θ t is the multi-step quasi-Newton scale coefficient, tanh(·) is the hyperbolic tangent function;
[0071] Step 5: Calculate the step size, and its calculation formula is as follows:
[0072] ω t = y t - θ t y t-1
[0073] rt = s t -θ t s t-1
[0074]
[0075] α t = min{α max , max{α min , μ t}}
[0076] where ω t and r t are intermediate variables, μ t is the temporary step size, α t is the actual step size for this iteration, α max and α min are the upper and lower bounds of the actual step size;
[0077] Step 6: Update the momentum and weights, and their calculation formulas are as follows:
[0078] v t = βv t-1 - α t g t
[0079] w t+1 = w t + v t
[0080] where v t represents the momentum and w t represents the weights;
[0081] Step 7: Determine whether the preset termination condition is reached. If not, return to execute Step 2; if so, proceed to the next step;
[0082] Step 8: Obtain the trained complex-valued neural network model.
[0083] An embodiment of the present invention provides a network device, which includes a processor, a memory, and a bus system. The processor and the memory are connected through the bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the method described in any one of the above.
[0084] An embodiment of the present invention provides a computer storage medium. The computer storage medium stores a computer software product. The computer software product includes several instructions for causing a computer device to execute the method described in any one of the above.
[0085] As can be seen from the above technical solutions, the present invention application has the following advantages:
[0086] The embodiment of the present invention provides a complex-valued neural network solar radiation prediction method and system based on the ASM-CNAG algorithm. The present invention encodes the time information of the solar radiation sequence into the phase part of the complex-valued data, enabling the complex-valued neural network to capture the time information of the sequence, which is beneficial to improving the prediction accuracy of the model. The ASM-CNAG provided by the present invention adaptively adjusts the step size by estimating the local smooth coefficient, solving the problem that the traditional CNAG algorithm requires manual parameter tuning. The ASM-CNAG algorithm combines the multi-step quasi-Newton method to better estimate the second-order information of the iteration point, thereby accelerating the training of the complex-valued neural network and improving the prediction accuracy. After training the complex-valued neural network with the algorithm described in the present invention, solar radiation can be effectively predicted, achieving satisfactory results. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly describe the drawings required in the embodiments. By referring to the drawings, the features and advantages of the present invention will be more clearly understood. The drawings are schematic and should not be construed as limiting the present invention in any way. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. Among them:
[0088] Figure 1 It is a flowchart of a complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm provided in the embodiment.
[0089] Figure 2 It is a flowchart of the ASM-CNAG algorithm provided in the embodiment.
[0090] Figure 3 It is a comparison chart of the training loss results of each algorithm on the model in the embodiment.
[0091] Figure 4 It is a block diagram of a complex-valued neural network solar radiation prediction system based on the ASM-CNAG algorithm provided in the embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0092] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0093] As shown Figure 1 in the figure, an embodiment of the present invention provides a complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm, and the method includes:
[0094] S1: Preprocess the collected original solar radiation data to obtain a data set, and divide the data set into a training set and a test set;
[0095] S2: Construct a complex-valued neural network model according to the size of the data set;
[0096] S3: Use the ASM-CNAG algorithm to train the complex-valued neural network model with the data in the training set;
[0097] S4: Input the data in the test set into the trained complex-valued neural network model to test the prediction ability of the model, and obtain a solar radiation prediction model;
[0098] S5: Use the obtained solar radiation prediction model to predict solar radiation.
[0099] The present invention provides a complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm. The present invention preprocesses the collected original solar radiation data to obtain a data set, encodes the time information of the solar radiation sequence as the phase part of the complex-valued data, and uses a simple forward complex-valued neural network for prediction without losing time information; uses the ASM-CNAG algorithm to train the complex-valued neural network model, and adaptively adjusts the step size by estimating the local smooth coefficient, solving the problem that the complex-valued accelerated gradient algorithm requires manual parameter tuning; the ASM-CNAG algorithm combines the multi-step quasi-Newton method to better estimate the second-order information of the iteration point, thereby accelerating the training of the complex-valued neural network and improving the prediction accuracy.
[0100] Further, in step S1, it includes:
[0101] The present invention selects the daily average solar radiation amount of Mohe Meteorological Station in China from 1991 to 2010 as the data set. First, clean and normalize the data set, and then convert the data into complex numbers. The data from 1991 to 2005 is used as the training set, and the data from 2006 to 2010 is used as the test set. Taking the data of 10 consecutive days as a sample, and the data of the 11th day as the sample label;
[0102] Among them, the method for data cleaning is: for the missing values in the data, use the mean value of its adjacent values to complete; the data normalization adopts the Min-Max normalization method; the method for data complex-valued conversion is: use the magnitude of the real-valued data as the magnitude of the complex number, and use the corresponding time of the data as the phase of the complex number, and its conversion formula is as follows:
[0103] S d = S d × e (j2πd / 365)
[0104] where d represents the d-th day, S d represents the average daily solar radiation on the d-th day, and e is the natural constant,
[0105] Furthermore, in step S2, it includes:
[0106] Regarding the problem of average daily solar radiation, a forward complex-valued neural network is adopted. The activation function of the neurons in the hidden layer of this network uses the tanh function, and the loss function of the complex-valued neural network model is the mean square error loss function. The present invention constructs a 3-layer forward complex-valued neural network and sets the number of neurons in the hidden layer to 30.
[0107] Furthermore, in step S3, it includes:
[0108] The present invention proposes an adaptive step-size complex-valued accelerated gradient algorithm (ASM-CNAG) combined with the multi-step quasi-Newton method. The iterative formula of the traditional CNAG algorithm is:
[0109]
[0110] w t+1 = w t + v t
[0111] where t represents the t-th iteration, v is the momentum direction, the step size α > 0 and the momentum coefficient β < 0 are preset fixed values, w represents the weight vector, w* represents the conjugate of w, represents the complex gradient, and J represents the loss function.
[0112] The ASM-CNAG algorithm can adaptively adjust the step size α by estimating the second-order information of the iteration point. The specific process includes the following steps:
[0113] Step1: Initialize the parameters; the momentum coefficient β = -0.9, the upper limit of the step size: α max = 10, the lower limit of the step size: α min = 0.0001, the number of iterations: 200;
[0114] Step2: Calculate the leading position and the complex gradient of the current iteration point. The calculation formulas are as follows:
[0115]
[0116]
[0117] Among them, t represents the t-th iteration, v represents the momentum direction, β represents the momentum coefficient, and w represents the weight vector. is the leading position. represents the complex gradient, and J represents the loss function.
[0118] Step 3: Calculate the change amounts of the gradients and positions in the previous and current iterations according to the formula in Step 2. The calculation formula is as follows:
[0119] y t = g t+1 - g t
[0120]
[0121] Among them, y t is the change amount of the gradient, and s t is the change amount of the position.
[0122] Step 4: Calculate the multi-step quasi-Newton scale coefficient. The calculation formula is as follows:
[0123]
[0124]
[0125] θ t = tanh(γ t )
[0126] Among them, (·) H represents the conjugate transpose, |·| represents taking the absolute value, λ t and γ t are intermediate variables, μ t-1 is the temporary step size of the previous iteration, θ t is the multi-step quasi-Newton scale coefficient, and tanh(·) is the hyperbolic tangent function.
[0127] Step 5: Calculate the step size. The calculation formula is as follows:
[0128] ω t = y t - θ t y t-1
[0129] r t = s t - θ t s t-1
[0130]
[0131] α t = min{α max, max{α min , μ t}}
[0132] Among them, ω t and r t are intermediate variables, μ t is the temporary step size, α t is the actual step size of this iteration, α max and α min are the upper and lower bounds of the actual step size;
[0133] Step6: Update the momentum and weights, and their calculation formulas are as follows:
[0134] v t = βv t-1 - α t g t
[0135] w t+1 = w t + v t
[0136] Among them, v t represents the momentum, and w t represents the weights;
[0137] Step7: Determine whether the preset termination condition is reached, that is, determine whether the number of iterations is reached. If not, return to execute Step2; if so, proceed to the next step;
[0138] Step8: Obtain the trained complex-valued neural network model.
[0139] Furthermore, in Step S4, it includes:
[0140] Input the data of the test set into the trained complex-valued neural network model to test the prediction ability of the model and obtain the solar radiation prediction model.
[0141] To verify the superiority of the algorithm of the present invention, the model is trained and tested using different algorithms, and the training result comparison diagram (as Figure 3 shown) and the test result table (as shown in Table 1) are obtained.
[0142] Table 1
[0143]
[0144] Among them, CGD is the complex-valued gradient descent algorithm, CNAG is the complex-valued accelerated gradient algorithm, CBBM is the adaptive complex step size algorithm, and ASM-CNAG is the algorithm proposed in the present invention.
[0145] To evaluate the prediction accuracy of the model, three metrics are adopted in Table 1, namely Mean Absolute Error (MAE), normalized Root Mean Square Error (nRMSE), and coefficient of determination R 2 . The smaller the MAE and nRMSE are, the more accurate the prediction is. The larger the R 2 is, the more accurate the prediction is.
[0146] Judging from the training and test results, the ASM-CNAG algorithm proposed by the present invention has the fastest convergence speed and the highest prediction accuracy.
[0147] As Figure 4 shown, the present invention also provides a complex-valued neural network solar radiation prediction system based on the ASM-CNAG algorithm. The system includes:
[0148] A data preprocessing module 100, which is used to preprocess the collected original solar radiation data to obtain a data set, and divide the data set into a training set and a test set;
[0149] A network model construction module 200, which is used to construct a complex-valued neural network model according to the size of the data set;
[0150] A network model training module 300, which is used to use the ASM-CNAG algorithm to train the complex-valued neural network model with the data in the training set;
[0151] A network model testing module 400, which is used to input the data in the test set into the trained complex-valued neural network model to test the prediction ability of the model, and obtain a solar radiation prediction model;
[0152] A solar radiation prediction module 500, which is used to predict solar radiation by using the obtained solar radiation prediction model.
[0153] The above system is used to implement the complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm. To avoid redundancy, it will not be elaborated here.
[0154] Note that the above is only the preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described here. Various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.
[0155] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0156] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0157] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0158] Obviously, the above embodiments are only examples given for clear illustration and are not limitations on the implementation manners. For those of ordinary skill 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 manners here. And the obvious changes or modifications derived therefrom are still within the protection scope of the present invention.
Claims
1. A complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm, characterized in that, Including: S1: Preprocess the original solar radiation data collected to obtain a data set, and divide the data set into a training set and a test set; S2: Construct a complex-valued neural network model according to the size of the data set; S3: Use the ASM-CNAG algorithm to train the complex-valued neural network model with the data in the training set; S4: Input the data in the test set into the trained complex-valued neural network model to test the prediction ability of the model, and obtain a solar radiation prediction model; S5: Use the obtained solar radiation prediction model to predict solar radiation; Among them, using the ASM-CNAG algorithm to train the complex-valued neural network model with the data in the training set includes the following steps: Step1: Initialize the parameters; Step2: Calculate the leading position and complex gradient of the current iteration point, and its calculation formula is as follows: where t represents the t-th iteration, v represents the momentum direction, β represents the momentum coefficient, and w represents the weight vector. is the leading position, represents the complex gradient, and J represents the loss function. Step3: Calculate the change amount of the gradient and position in the previous and subsequent iterations according to the formula in Step2, and its calculation formula is as follows: y t = g t+1 - g t where y t is the change in gradient, and s t is the change in position; Step4: Calculate the multi-step quasi-Newton scale coefficient, and its calculation formula is as follows: θ t =tanh(γ t ) where, (·) H denotes conjugate transpose, |·| denotes taking the absolute value, λ t and γ t are intermediate variables, μ t-1 is the temporary step size of the previous iteration, θ t is the multi-step quasi-Newton scale coefficient, and tanh(·) is the hyperbolic tangent function; Step5: Calculate the step size, and its calculation formula is as follows: ω t = y t - θ t y t-1 r t = s t - θ t s t-1 α t = min{α max , max{α min , μ t}} Among them, ω t and r t are intermediate variables, μ t is the temporary step size, α t is the actual step size of this iteration, α max and α min are the upper and lower bounds of the actual step size; Step6: Update the momentum and weights, and its calculation formula is as follows: v t = βv t-1 - α t g t w t+1 = w t + v t Among them, v t represents momentum, and w t represents weight; Step7: Determine whether the preset termination condition is reached. If not, return to execute Step2; if so, proceed to the next step; Step8: Obtain the trained complex-valued neural network model.
2. The complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm according to claim 1, characterized in that, In step S1, the method for preprocessing the original solar radiation data collected includes: data cleaning, data normalization, and data complex-valued conversion.
3. The complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm according to claim 2, characterized in that, The method for the data cleaning is: For the missing values in the data, use the mean value of its adjacent values to complete the filling.
4. The complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm according to claim 2, characterized in that The data normalization adopts the Min-Max normalization method.
5. The complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm according to claim 2, characterized in that The method for the data complex-valued conversion is: Take the magnitude of the real-valued data as the magnitude of the complex number, and take the corresponding time of the data as the phase of the complex number, and its conversion formula is as follows: S d = S d × e (j2πd / 365) Among them, d represents the d-th day, and S d represents the average daily solar radiation on the d-th day, and e is the natural constant, 6. The complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm according to claim 1, characterized in that In step S2, the complex-valued neural network model adopts a forward complex-valued neural network, and the activation function of the neurons in the hidden layer of the forward complex-valued neural network adopts the tanh function.
7. The complex-valued neural network solar radiation prediction method based on the ASM-CNAG algorithm according to claim 1, characterized in that In step S2, the loss function of the complex-valued neural network model is the mean square error loss function.
8. A complex-valued neural network solar radiation prediction system based on the ASM-CNAG algorithm, characterized in that Including: A data preprocessing module, which is used to preprocess the original solar radiation data collected to obtain a data set, and divide the data set into a training set and a test set; A network model construction module, which is used to construct a complex-valued neural network model according to the size of the data set; A network model training module, which is used to use the ASM-CNAG algorithm to train the complex-valued neural network model with the data in the training set; A network model testing module, which is used to input the data in the test set into the trained complex-valued neural network model to test the prediction ability of the model, and obtain a solar radiation prediction model; A solar radiation prediction module, which is used to predict solar radiation with the obtained solar radiation prediction model; Among them, using the ASM-CNAG algorithm to train the complex-valued neural network model with the data in the training set includes the following steps: Step1: Initialize the parameters; Step2: Calculate the leading position and complex gradient of the current iteration point, and their calculation formulas are as follows: where \(t\) represents the \(t\)-th iteration, \(v\) represents the momentum direction, \(\beta\) represents the momentum coefficient, and \(w\) represents the weight vector. is the leading position, represents the complex gradient, and \(J\) represents the loss function. Step3: Calculate the change amounts of the gradients and positions in the previous and current iterations according to the formulas in Step2, and their calculation formulas are as follows: y t = g t+1 - g t where y t is the change in gradient, and s t is the change in position; Step4: Calculate the multi-step quasi-Newton scale coefficient, and its calculation formula is as follows: θ t = tanh(γ t ) where, (·) H denotes conjugate transpose, |·| denotes taking the absolute value, λ t and γ t are intermediate variables, μ t-1 is the temporary step size of the previous iteration, θ t is the multi-step quasi-Newton scale coefficient, and tanh(·) is the hyperbolic tangent function; Step5: Calculate the step size, and its calculation formula is as follows: ω t = y t - θ t y t-1 r t = s t - θ t s t-1 α t = min{α max , max{α min , μ t}} Among them, μ t is the temporary step size, α t is the actual step size of this iteration, α max and α min are the upper and lower bounds of the actual step size; Step6: Update the momentum and weights, and their calculation formulas are as follows: μ t = βv t-1 - α t g t w t+1 = w t + v t Among them, v t represents momentum, and w t represents weight; Step7: Determine whether the preset termination condition is reached. If not, return to execute Step2; if so, proceed to the next step; Step8: Obtain the trained complex-valued neural network model.
9. A network device, characterized in that, It includes a processor, a memory, and a bus system. The processor and the memory are connected through this bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the method described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The computer storage medium stores a computer software product. The computer software product includes several instructions for causing a computer device to execute the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Solar radiation prediction method based on depth BISLTM
CN112100911A
Pile foundation horizontal bearing capacity prediction method based on BAS-BP
CN112926117A