A grid-connected inverter self-correction control method and system based on a full artificial neural network

CN118117639BActive Publication Date: 2026-10-27SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311870409.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2026-10-27
Estimated Expiration
2043-12-28

AI Technical Summary

Benefits of technology

本发明的该方法包括:构建ANN锁相器并离线优化其权值参数,使其具备电网电压与相位余弦之间的映射关系,为逆变并网提供相角支撑;将PWM与逆变并网系统(Invertergrid-connected system,IGCS)视为一个整体,即PWMIGCS。构建ANN参数估计器并优化其权值参数,使得ANN参数估计器可以精准拟合PWMIGCS的输入与输出,并将ANN参数估计器的隐含层输出及权值参数反馈至ANN控制器;构建ANN控制器,利用梯度下降算法与ANN参数估计器反馈的相关参数优化ANN控制器的权值参数,使其产生合理的调制波;基于生成的调制波,借助PWM产生开关信号,进行逆变并网控制。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118117639B_ABST
    Figure CN118117639B_ABST
Patent Text Reader

Abstract

The application provides a grid-connected inverter self-correction control method and system of a full artificial neural network, which comprises the following steps: collecting grid voltage and inputting the grid voltage into an ANN phase-locked loop; performing multiplication operation on the phase angle cosine value obtained by the ANN phase-locked loop and the reference current amplitude, so as to obtain a reference current; comparing the difference between the grid-connected current and the reference current, inputting the difference into an ANN controller, and generating a modulation wave under the action of the ANN controller; inputting one of the modulation waves into an ANN parameter estimator, and controlling the on-off of the inverter switch in the inverter grid-connected system after the other modulation wave is subjected to PWM; receiving the modulation wave and the grid-connected current by the ANN parameter estimator, and outputting a grid-connected current fitting value; solving the output weight value of the ANN parameter estimator in real time and feeding back the parameters, adjusting the parameters of the ANN controller on line based on the output of the ANN parameter estimator to generate a required modulation wave; and sequentially circulating the above steps, so that the grid-connected current quickly tracks the reference current and the grid connection is performed by continuously automatically adjusting the weight value of the ANN controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of inverter grid-connected control technology, and particularly relates to a self-calibration control method and system for grid-connected inverters using a fully artificial neural network. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] As a core device connecting new energy sources and the power grid, the inverter's main task is to convert direct current (DC) to alternating current (AC) to meet the needs of the power grid or other equipment. The inverter's control performance directly determines the grid connection quality and the reliability of the new energy system; therefore, efficient inverter control is crucial.

[0004] Currently, the most commonly used inverter control methods include proportional-integral control (PI control) and proportional-resonance control (PR control). PI control has received widespread attention due to its simplicity, reliability, and ease of implementation. However, this control method not only causes the output current to lag behind the reference current command, but also easily introduces steady-state amplitude and phase errors when controlling AC systems, affecting grid-connected power quality. Compared to PI control, PR control introduces infinite gain at the selected resonant frequency, exhibiting high performance in sinusoidal tracking and interference immunity. However, when the compensated frequency exceeds the system bandwidth, the harmonic compensator of PR control is limited to a few low-order harmonics. Both of these traditional control methods have inherent drawbacks: the control parameters of PI and PR controllers are fixed, and because their control parameters are fixed, they may not provide good performance under various dynamic conditions. In recent years, many scholars have proposed approximate dynamic programming (ADP) control methods based on artificial neural networks (ANNs) by leveraging their nonlinear fitting capabilities. These methods utilize the gain value of pulse width modulation (PWM) to form a closed loop between the ANN and the inverter system, making the grid-connected current approximate the reference current and producing ideal inverter control performance. However, the ADP control method is complex and requires extensive analysis, and it is highly dependent on the parameters of the controlled system.

[0005] Besides the controller, the phase-locked loop (PLL) also plays a crucial role. The phase angle output by the PLL serves as the input variable for subsequent control, and its accuracy directly determines the quality of power grid connection. While traditional PLLs can meet the requirements, they are prone to inherent defects such as phase oscillation and phase error. Phase angle prediction methods based on deep neural networks simply replace the PLL in the inverter system. The PI and PR controllers have fixed control parameters, meaning that existing inverter grid-connected control methods cannot avoid the cumbersome processes of manual parameter tuning and complex analysis of system principles to achieve closed-loop control. This results in complex grid-connected inverter control operations and poor dynamic performance. Summary of the Invention

[0006] To overcome the shortcomings of the prior art, this invention provides a self-calibrating control method for grid-connected inverters based on a fully artificial neural network. This method can not only achieve stable grid connection based on the reference current, but also adapt to various circuit parameter changes such as DC source and filter, exhibiting strong stability, robustness, and generalization.

[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: In the first aspect, a self-tuning control method for grid-connected inverters using a fully artificial neural network is disclosed, including: Step 1: Collect the grid voltage and phase angle cosine value as the input and output of the ANN phase-locked loop (PLL) and perform offline training on the PLL; Step 2: After training is completed, the grid voltage is input to the ANN phase-locked loop (PLL). The phase angle cosine value obtained from the ANN PLL output is multiplied by the reference current amplitude to obtain the reference current. Step 3: Obtain the difference between the grid-connected current and the reference current, i.e., the grid-connected current difference. Input the grid-connected current difference to the ANN controller. Under the action of the ANN controller, a modulation wave is generated. One modulation wave is input to the ANN parameter estimator, and the other modulation wave is controlled by PWM to control the on and off of the inverter switch in the inverter grid-connected system to generate the grid-connected current. Step 4: The ANN parameter estimator receives the modulated wave and the grid-connected current, and outputs the fitted value of the grid-connected current; Step 5: Solve the output weights of the ANN parameter estimator in real time and feed back the input weights, output weights and hidden layer outputs. Adjust the ANN controller parameters online based on the grid current difference and the feedback parameters of the ANN parameter estimator to generate the required modulation wave. Based on the implementation of step one, the process of steps two to five above is repeated in sequence. By continuously and automatically adjusting the weights of the ANN controller, the error is gradually reduced, so that the grid-connected current can quickly track the reference current and perform grid connection.

[0008] As a further technical solution, the inverter grid-connected system is a single-phase inverter grid-connected system or a three-phase inverter grid-connected system.

[0009] As a further technical solution, if the inverter grid-connected system is a single-phase inverter grid-connected system, then the grid voltage is a single-phase grid voltage, the modulation wave is a single-phase modulation wave, the grid-connected current is a single-phase grid-connected current, and the grid-connected current difference is a single-phase grid-connected current error. If the inverter grid-connected system is a three-phase inverter grid-connected system, then the grid voltage is a three-phase grid voltage, the modulation wave is a three-phase modulation wave, the grid-connected current is a three-phase grid-connected current, and the grid-connected current difference is the three-phase grid-connected current error.

[0010] As a further technical solution, before using the ANN phase-locked loop, ANN controller, and ANN parameter estimator, it is necessary to initialize the parameters of the ANN phase-locked loop, ANN controller, and ANN parameter estimator.

[0011] As a further technical solution, the parameters that need to be initialized for the ANN phase-locked loop and the ANN parameter estimator include the input weights and the output weights; the parameters that need to be initialized for the ANN controller include the input weights, the hidden layer weights, and the output weights. As a further technical solution, all the aforementioned property values ​​are initialized using a grid search method, i.e., using [- d, d [] is the initial search range, and the search range is gradually increased until it reaches [- D, D The search range with the minimum training root mean square error is selected for initialization.

[0012] As a further technical solution, after initializing the parameters, it is also necessary to optimize the weights of the ANN phase-locked loop, ANN controller, and ANN parameter estimator, specifically including: The input and output weights of the ANN phase-locked loop (PLL) both need to be trained offline. The input weights of the ANN parameter estimator are fixed after initialization, and only the output weights need to be optimized in real time. The weight parameters of the ANN controller only need to be initialized, and the weight parameters are updated in real time during the grid connection process.

[0013] As a further technical solution, optimizing the weights of the ANN phase-locked loop specifically includes: for P Group dataset Among them, the grid voltage U g ( k () represents the input sample, and the phase cosine value is... For output data; When the ANN phase-locked loop receives the grid voltage After inputting weights With output weights The corresponding network output is obtained; Mean squared error is used as the loss function; The gradient descent algorithm is used to train the ANN phase-locked loop offline to obtain the gradient of the loss function; Using the grid voltage as input, the network weights of the ANN phase-locked loop (PLL) are iteratively optimized to fit the cosine value of the phase angle. .

[0014] As a further technical solution, the weights of the ANN parameter estimator are optimized, specifically including: In the k At time, modulated wave The data is transmitted to the ANN parameter estimator, after passing through the input weights. With output weights , obtain network output ; Define the loss function for the ANN parameter estimator; Input weights After initialization, the values ​​remain fixed, and the least squares algorithm is used to update the output weights in real time. ; By inputting weights With the obtained output weights This allows the ANN parameter estimator to fit the PWMIGCS.

[0015] As a further technical solution, optimizing the weights of the ANN controller specifically includes: The ANN controller consists of two hidden layers, with neurons in each layer connected sequentially via input weights. Hidden layer weights With output weights Connection, when the k Group data When input is sent to the input layer of the ANN controller, the network output is obtained; Define the loss function for the ANN controller; Gradient descent algorithm was used to train the ANN controller online to obtain the gradient of each weight; Update input weights Hidden layer weights With output weights ; The network weights of the ANN controller are optimized in real time based on the updated weight formula, so that the grid-connected current tracks the reference current and meets the grid-connected requirements of the inverter.

[0016] Secondly, a self-calibrating control system for a grid-connected inverter, based entirely on an artificial neural network, is disclosed, comprising: The reference current calculation module is configured to: after the ANN phase-locked loop (PLL) offline training is completed, collect the grid voltage and input it into the ANN PLL, multiply the phase angle cosine value obtained from the ANN PLL output with the reference current amplitude to obtain the reference current; The modulation wave generation module is configured to: compare the difference between the grid-connected current and the reference current, input the difference to the ANN controller, generate a modulation wave under the action of the ANN controller, input one modulation wave to the ANN parameter estimator, and control the on / off switching of the inverter in the inverter grid-connected system after passing through PWM to generate the grid-connected current. The ANN parameter estimator receives the modulated wave and the grid-connected current, and outputs the fitted value of the grid-connected current. The output weights of the ANN parameter estimator are solved in real time, and the input weights, output weights and hidden layer outputs are fed back. The ANN controller parameters are adjusted online based on the grid current error and the feedback parameters of the ANN parameter estimator to generate the required modulation wave. The control module is configured to: sequentially cycle through the processes in the above module, gradually reduce the error by continuously and automatically adjusting the weights of the ANN controller, so that the grid-connected current can quickly track the reference current and perform grid connection.

[0017] The above one or more technical solutions have the following beneficial effects: The method of this invention includes: constructing an ANN phase-locked loop and optimizing its weight parameters offline to achieve a mapping relationship between grid voltage and phase cosine, providing phase angle support for inverter grid connection; treating the PWM and the inverter grid-connected system (IGCS) as a whole, i.e., PWMIGCS; constructing an ANN parameter estimator and optimizing its weight parameters so that the ANN parameter estimator can accurately fit the input and output of the PWMIGCS, and feeding back the hidden layer output and weight parameters of the ANN parameter estimator to the ANN controller; constructing an ANN controller, optimizing the weight parameters of the ANN controller using the gradient descent algorithm and the relevant parameters fed back from the ANN parameter estimator to generate a reasonable modulation wave; and based on the generated modulation wave, generating a switching signal using PWM to perform inverter grid connection control.

[0018] This invention implements the entire inverter control process using only an ANN as the controller. The gradient descent and least squares algorithms are used to automatically adjust the ANN weights, eliminating the need for manual adjustment and system mechanism analysis, thus greatly reducing computational complexity. It is unaffected by changes in various circuit parameters such as DC sources and filters, exhibiting strong stability, robustness, and generalization ability.

[0019] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0021] Figure 1 This is a schematic diagram of the inverter grid-connected system disclosed herein; Figure 2 This is a diagram of the ANN phase-locked network structure disclosed herein (taking a single phase as an example). Figure 3 The network structure diagram of the ANN parameter estimator disclosed herein (taking a single phase as an example); Figure 4 This is a diagram of the ANN controller network structure disclosed herein (taking a single phase as an example); Figure 5 This is a diagram of a self-calibrating control framework for a grid-connected inverter based on a fully artificial neural network (taking a single-phase inverter as an example). Detailed Implementation

[0022] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0023] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.

[0024] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0025] Example 1 This embodiment discloses a self-tuning control method for a grid-connected inverter with a fully artificial neural network, including the following steps: Initialize the network structure: This involves selecting the ANN phase-locked loop, the number of input and output nodes for the ANN parameter estimator and the ANN controller based on the dimensions of the input and output variables. In addition, the number of hidden layers and neurons in the three networks are designed based on human experience.

[0026] Initialize network weights: This involves using a grid search method to initialize the weight parameters of the ANN phase-locked loop, ANN parameter estimator, and ANN controller.

[0027] Initialize algorithm parameters: This involves initializing the learning rate of the gradient descent algorithm using a grid search method.

[0028] The optimization weighting method involves using the least squares algorithm to optimize the output weights of the ANN parameter estimator and the gradient descent algorithm to optimize the weight parameters of the ANN phase-locked loop and the ANN controller.

[0029] Artificial Neural Network Inverter Control: After offline training of the ANN phase-locked loop (PLL), a reference current is obtained by comparing the output phase of the ANN PLL with the amplitude of the reference current. The difference between the reference current and the grid-connected current is used as the input to the ANN controller. The modulated wave output by the ANN controller is used for inverter control via PWM to obtain the grid-connected current. The modulated wave and the grid-connected current are used as inputs to the ANN parameter estimator to fit the PWMIGCS. The hidden layer output of the ANN parameter estimator and all mean parameters are fed back to the ANN controller. Finally, the gradient descent algorithm is used to update all mean parameters of the ANN controller to generate a reasonable modulated wave for inverter control.

[0030] More detailed steps include: Step 1: Initialize network structure and weights Step 1.1: Initialize the network structure In ANN phase-locked loops, ANN parameter estimators, and ANN controllers, the ANN network structure consists of an input layer, hidden layers, and an output layer. The number of nodes in the input and output layers should be consistent with the dimensions of the input and output variables, respectively. The size of the hidden layers can be designed based on the complexity of the fitting task and human experience.

[0031] As one or more implementation methods, in a single-phase inverter grid-connected system, the input and output variables of the ANN phase-locked loop (PLL) are the grid voltage and the phase angle cosine value, respectively. Based on experience, the number of neurons in a single hidden layer is selected as 10, so the structure of the ANN PLL is 1-10-1. The input variables of the ANN parameter estimator are the modulation wave and the grid-connected current, and the output variable is the grid-connected current fitting value. Based on experience, the number of neurons in a single hidden layer is selected as 5, so the structure of the ANN parameter estimator is 1-5-1. The input and output variables of the ANN controller are the grid-connected current error and the modulation wave, respectively. Based on experience, the number of neurons in both hidden layers is selected as 10, so the structure of the ANN controller is 1-10-10-1.

[0032] In another embodiment, in a three-phase inverter grid-connected system, the input and output variables of the ANN phase-locked loop (PLL) are the three-phase grid voltage and the phase angle cosine value, respectively. Based on experience, the number of neurons in a single hidden layer is selected as 10, so the structure of the ANN PLL is 3-10-1. The input variables of the ANN parameter estimator are the three-phase modulation wave and the three-phase grid-connected current, and the output variable is the fitted value of the three-phase grid-connected current. Based on experience, the number of neurons in a single hidden layer is selected as 5, so the structure of the ANN parameter estimator is 3-5-3. The input and output variables of the ANN controller are the three-phase grid-connected current error and the three-phase modulation wave, respectively. Based on experience, the number of neurons in both hidden layers is selected as 10, so the structure of the ANN controller is 3-10-10-3.

[0033] Step 1.2: Initialize parameters ANN phase-locked loops and ANN parameter estimators only contain input weights and output weights; while the weight parameters of an ANN controller include input weights, hidden layer weights, and output weights. All of the above weights are initialized using a grid search method, i.e., with [- d , d [] is the initial search range, and the search range is increased tenfold each time until it reaches [- D , D ], select the training root mean square error ( RMSE Initialize using the smallest search range. d , D All are positive real numbers, and d < D .

[0034] For example, starting with a search range of [-0.01, 0.01], the search range is increased tenfold each time until it reaches [-10, 10]. Then, the training parameters are selected. RMSE Initialize with the smallest search range.

[0035] Since the outputs of the ANN phase-locked loop, the ANN parameter estimator, and the ANN controller have positive and negative values, the tanh function is used as the activation function in this implementation example.

[0036] Regarding algorithm parameters, the least squares algorithm uses an equation-solving approach to directly obtain the optimal output weights from the ANN parameter estimator, without requiring any parameters to be set. In the gradient descent algorithm, only the learning rate needs to be set: it is selected using a grid search method, i.e., based on... The step size is in [ M 1, M Run the program within the search range of [2] and select training. RMSE The minimum learning rate is taken as the optimal learning rate. M 1, M 2 are all positive decimals, and M 1<M 2 <1 .

[0037] For example, the program is run with a step size of 0.005 within the search range of [0.005, 0.1], selecting the training... RMSE The minimum learning rate is taken as the optimal learning rate.

[0038] Step 2: Optimize weights After the weight parameters of the ANN phase-locked loop (PLL) are initialized, they need to be trained offline using a gradient descent algorithm with the help of a dataset to establish a mapping relationship between grid voltage and phase cosine, providing phase angle support for inverter grid connection. During the inverter grid connection process, the weight parameters of the ANN PLL are no longer updated.

[0039] In the entire control system, the optimization methods for the weight parameters of the three modules differ. The weight parameters of the ANN phase-locked loop (PLL) require offline training. In contrast, the input weights of the ANN parameter estimator remain fixed after initialization, requiring only real-time optimization of the output weights. Furthermore, the weight parameters of the ANN controller only need initialization, with all weight parameters updated in real-time during grid connection.

[0040] This invention takes single-phase inverter control as an example. The number of input and output nodes of the ANN phase-locked loop, ANN parameter estimator and ANN controller described below are all 1.

[0041] Step 2.1: Optimize the weights of the ANN phase-locked loop An ANN phase-locked loop consists of an input layer, a hidden layer, and an output layer, as follows: Figure 2 As shown. For P Group dataset P is the number of data sets, which is determined by the number of sample sets collected. It is the angular frequency of the grid voltage, where g is the subscript indicating the grid side; t is the time constant, where the grid voltage... U g ( k () represents the input sample, and the phase cosine value is... For output data. When the ANN phase-locked loop receives the grid voltage... After inputting weights With output weights The corresponding network output can be obtained. as follows:

[0042] in, For the first k The hidden layer outputs at any time. is the hyperbolic tangent activation function for neurons.

[0043] Mean squared error is used as the loss function:

[0044] The ANN phase-locked loop is trained offline using the gradient descent algorithm. The gradient of the loss function is:

[0045] For any initial weight and Update it using gradient descent:

[0046] in, The learning rate is used for the weights. Taking the grid voltage as input, the network weights of the ANN phase-locked loop (PLL) are iteratively optimized to enable the PLL to accurately fit the phase angle cosine value. .

[0047] Step 2.2: Optimize the weights of the ANN parameter estimator The input weights of the ANN parameter estimator remain unchanged after initialization. During the inverter grid connection process, the modulated wave and grid current are used as inputs, and the least squares algorithm is used to optimize only the output weights, so that the ANN parameter estimator can accurately fit the input and output of PWMIGCS.

[0048] Because the fitting task is simple, ANN parameter estimators also use a single hidden layer, such as... Figure 3 As shown. In the first k At time, modulated wave The data is transmitted to the ANN parameter estimator, after passing through the input weights. With output weights The network output can be obtained. as follows:

[0049] in, For the first k The hidden layer outputs at any given time.

[0050] Similarly, the loss function for the ANN parameter estimator is defined as follows:

[0051] in, For the first k Grid-connected current at all times.

[0052] Input weights After initialization, the values ​​remain fixed, and the least squares algorithm is used to update the output weights in real time. That is, when the first derivative of formula (10) is zero, Minimum:

[0053] After simplifying the above derivative equation, we get:

[0054] By inputting weights The output weights obtained from formula (12) This enables the ANN parameter estimator to quickly and accurately fit PWMIGCS.

[0055] Step 2.3: Optimize ANN controller weights During inverter control, the input weights and output weights of the ANN parameter estimator, along with the hidden layer output, are fed back to the ANN controller. After initialization, the ANN controller uses the grid-connected current error as input during inverter control. Leveraging the relevant parameters fed back from the ANN parameter estimator, the gradient descent algorithm is used to optimize the weight parameters, resulting in a reasonable modulation wave.

[0056] Unlike the two modules mentioned above, the ANN controller includes two hidden layers, with neurons in each layer connected sequentially via input weights. Hidden layer weights With output weights Connections, such as Figure 4 As shown. When the first k Group data When input is sent to the input layer of the ANN controller, the network output can be obtained. as follows:

[0057] in, and These are the outputs of the first hidden layer and the second hidden layer, respectively.

[0058] The loss function of the ANN controller is defined as follows:

[0059] in, For the first k Reference current at all times.

[0060] Gradient descent was used to train the ANN controller online, and the gradient of each weight is:

[0061] in, At a specific learning rate Next, update the three weights:

[0062] The network weights of the ANN controller are optimized in real time using formulas (20)-(22) to reduce the grid-connected current. Tracking reference current This meets the requirements for inverter grid connection.

[0063] Step 3: Fully Artificial Neural Network Grid-Connected Inverter Control The block diagram of the self-calibration control of the grid-connected inverter based on a fully artificial neural network proposed in this invention is as follows: Figure 5 As shown. After all initialization processes are completed, the ANN phase-locked loop is trained offline using the dataset. After obtaining the loss function using formulas (1), (2), and (3), the gradient descent algorithm shown in formulas (4), (5), (6), and (7) is used to update the weights of the ANN phase-locked loop.

[0064] After the ANN phase-locked loop (PLL) training is complete, the inverter control process officially begins: First, the grid voltage is collected. U g And input it into the ANN phase-locked loop, and get the phase angle cosine value cos( ωt ) and reference current amplitude Perform multiplication to obtain the reference current. Secondly, compare the grid-connected current. With reference current The difference e A modulated wave is generated under the action of the ANN controller. ; again, modulate the wave After passing through PWM, the inverter switch is turned on and off to obtain the grid-connected current. Finally, the ANN parameter estimator fits PWMIGCS, that is, after obtaining the loss function according to formulas (8), (9), and (10), the output weights of the ANN parameter estimator are solved in real time using the least squares algorithm shown in formula (12) and the parameters are fed back. , , The ANN controller parameters are adjusted online according to formulas (20), (21), and (22) to generate a suitable modulation wave. The above process is repeated continuously, and the error is gradually reduced by constantly adjusting the weights of the ANN controller. e , so that the grid-connected current Fast tracking of reference current To achieve stable grid connection.

[0065] This invention employs an ANN as the controller throughout the entire inverter control process, comprising an ANN phase-locked loop (PLL), an ANN parameter estimator, and an ANN controller. This control method borrows from the self-tuning control principle, utilizing the ANN parameter estimator to fit the controlled system. Closed-loop control can be achieved based on grid-connected current error without requiring analysis of the system's underlying principles. The proposed inverter control method is applicable to both single-phase and three-phase inverter grid-connected control; the only difference is the need to adjust the number of input and output nodes for each ANN module according to the variable dimensions. The number of input and output nodes for the ANN PLL, ANN parameter estimator, and ANN controller are determined based on the dimensions of the input and output variables, while the number of hidden layers and neurons is selected based on experience. The ANN PLL, ANN parameter estimator, and ANN controller all use mean squared error as the loss function. During the training phase, weight optimization is achieved using the loss function and machine learning algorithms.

[0066] This invention can not only achieve stable grid connection based on reference current, but also adapt to various circuit parameter changes such as DC source and filter, and has strong stability, strong robustness and strong generalization.

[0067] Example 2 The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described method.

[0068] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.

[0069] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the above method.

[0070] Example 4 The purpose of this embodiment is to provide a self-calibrating control system for a grid-connected inverter with a fully artificial neural network, including the following steps: The network structure initialization module selects the ANN phase-locked loop (PLL) based on the dimensions of the input and output variables. The number of input and output nodes for the ANN parameter estimator and ANN controller are also determined. Furthermore, the number of hidden layers and neurons in the three networks are designed based on human experience.

[0071] The network weight initialization module uses a grid search method to initialize the weight parameters of the ANN phase-locked loop, ANN parameter estimator, and ANN controller.

[0072] The algorithm parameter initialization module uses a grid search method to initialize the learning rate of the gradient descent algorithm.

[0073] The weight optimization module uses the least squares algorithm to optimize the output weights of the ANN parameter estimator and the gradient descent algorithm to optimize the weight parameters of the ANN phase-locked loop and the ANN controller.

[0074] The artificial neural network inverter control module performs offline training on the ANN phase-locked loop (PLL). It obtains the reference current by comparing the output phase of the ANN PLL with the reference current amplitude. The difference between the reference current and the grid-connected current is used as the input to the ANN controller. The modulated wave output by the ANN controller is then used for inverter control via PWM to obtain the grid-connected current. The modulated wave and the grid-connected current are used as inputs to the ANN parameter estimator to fit the PWMIGCS algorithm. The hidden layer output of the ANN parameter estimator and all mean squared parameters are fed back to the ANN controller. Finally, the gradient descent algorithm is used to update all mean squared parameters of the ANN controller.

[0075] In another implementation example, the artificial neural network inverter control module can be expressed as including: a reference current calculation module, configured to: after the ANN phase-locked loop (ANN) is trained offline, collect the grid voltage and input it into the ANN phase-locked loop, multiply the phase angle cosine value obtained from the ANN phase-locked loop output with the reference current amplitude to obtain the reference current; The modulation wave generation module is configured to: compare the difference between the grid-connected current and the reference current, input the difference to the ANN controller, generate a modulation wave under the action of the ANN controller, input one modulation wave to the ANN parameter estimator, and control the on / off switching of the inverter in the inverter grid-connected system after passing through PWM to generate the grid-connected current. The ANN parameter estimator receives the modulated wave and the grid-connected current, and outputs the fitted value of the grid-connected current. The output weights of the ANN parameter estimator are solved in real time, and the input weights, output weights and hidden layer outputs are fed back. The ANN controller parameters are adjusted online based on the grid current error and the feedback parameters of the ANN parameter estimator to generate the required modulation wave. The control module is configured to: sequentially cycle through the processes in the above module, gradually reduce the error by continuously and automatically adjusting the weights of the ANN controller, so that the grid-connected current can quickly track the reference current and perform grid connection.

[0076] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0077] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.

[0078] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A self-tuning control method for grid-connected inverters using a fully artificial neural network, characterized in that, include: Step 1: Collect the grid voltage and phase angle cosine value as the input and output of the ANN phase-locked loop (PLL) and perform offline training on the PLL; Step 2: After training is completed, the grid voltage is input to the ANN phase-locked loop (PLL). The phase angle cosine value obtained from the ANN PLL output is multiplied by the reference current amplitude to obtain the reference current. Step 3: Obtain the difference between the grid-connected current and the reference current, i.e., the grid-connected current difference. Input the grid-connected current difference to the ANN controller. Under the action of the ANN controller, a modulation wave is generated. One modulation wave is input to the ANN parameter estimator, and the other modulation wave is controlled by PWM to control the on and off of the inverter switch in the inverter grid-connected system to generate the grid-connected current. Step 4: The ANN parameter estimator receives the modulated wave and the grid-connected current, and outputs the fitted value of the grid-connected current; Step 5: Solve the output weights of the ANN parameter estimator in real time and feed back the input weights, output weights and hidden layer output. Adjust the ANN controller parameters online based on the grid current error and the feedback parameters of the ANN parameter estimator to generate the required modulation wave. Based on the implementation of step one, the process of steps two to five above is repeated in sequence. By continuously and automatically adjusting the weights of the ANN controller, the error is gradually reduced, so that the grid-connected current can quickly track the reference current and perform grid connection.

2. The self-calibration control method for grid-connected inverters using a fully artificial neural network as described in claim 1, characterized in that, The inverter grid-connected system is a single-phase inverter grid-connected system or a three-phase inverter grid-connected system; If the inverter grid-connected system is a single-phase inverter grid-connected system, then the grid voltage is a single-phase grid voltage, the modulation wave is a single-phase modulation wave, the grid-connected current is a single-phase grid-connected current, and the grid-connected current difference is the single-phase grid-connected current error; or If the inverter grid-connected system is a three-phase inverter grid-connected system, then the grid voltage is a three-phase grid voltage, the modulation wave is a three-phase modulation wave, the grid-connected current is a three-phase grid-connected current, and the grid-connected current difference is the three-phase grid-connected current error.

3. The self-calibration control method for grid-connected inverters using a fully artificial neural network as described in claim 1, characterized in that, Before using the ANN phase-locked loop, ANN controller, and ANN parameter estimator, it is necessary to initialize the parameters of the ANN phase-locked loop, ANN controller, and ANN parameter estimator. Furthermore, the parameters that need to be initialized for the ANN phase-locked loop and the ANN parameter estimator include the input weights and the output weights; the parameters that need to be initialized for the ANN controller include the input weights, the hidden layer weights, and the output weights. Furthermore, all the aforementioned property values ​​are initialized using a grid search method, i.e., with [- d, d [] is the initial search range, and the search range is gradually increased until it reaches [- D, D The search range with the minimum training root mean square error is selected for initialization.

4. The self-calibration control method for grid-connected inverters using a fully artificial neural network as described in claim 3, characterized in that... After initializing the parameters, the weights of the ANN phase-locked loop, ANN controller, and ANN parameter estimator also need to be optimized, specifically including: The weight parameters of the ANN phase-locked loop (PLL) need to be trained offline. The input weights of the ANN parameter estimator are fixed after initialization, and only the output weights need to be optimized in real time. The weight parameters of the ANN controller only need to be initialized, and the weight parameters are updated in real time during the grid connection process.

5. The self-calibration control method for grid-connected inverters using a fully artificial neural network as described in claim 4, characterized in that, Optimizing the weights of an ANN phase-locked loop specifically includes: for P Group dataset Among them, the grid voltage U g ( k () represents the input sample, and the phase cosine value is... For output data; When the ANN phase-locked loop receives the grid voltage After inputting weights With output weights The corresponding network output is obtained; Mean squared error is used as the loss function; The gradient descent algorithm is used to train the ANN phase-locked loop offline to obtain the gradient of the loss function; Using the grid voltage as input, the network weights of the ANN phase-locked loop (PLL) are iteratively optimized to fit the cosine value of the phase angle. .

6. The self-calibration control method for grid-connected inverters using a fully artificial neural network as described in claim 4, characterized in that, Optimizing the weights of the ANN parameter estimator specifically includes: In the k At time, modulated wave With grid-connected current The data is transmitted to the ANN parameter estimator, after passing through the input weights. With output weights , obtain network output ; Define the loss function for the ANN parameter estimator; Input weights After initialization, the values ​​remain fixed, and the least squares algorithm is used to update the output weights in real time. ; By inputting weights With the obtained output weights This allows the ANN parameter estimator to fit the PWMIGCS; The PWM and the inverter grid-connected system IGCS are considered as a whole, namely PWMIGCS.

7. The self-calibration control method for grid-connected inverters using a fully artificial neural network as described in claim 4, characterized in that, Optimize the weights of the ANN controller, specifically including: The ANN controller consists of two hidden layers, with neurons in each layer connected sequentially via input weights. Hidden layer weights With output weights Connection, when the k Group data When input is sent to the input layer of the ANN controller, the network output is obtained; Define the loss function for the ANN controller; Gradient descent algorithm was used to train the ANN controller online to obtain the gradient of each weight; Update input weights Hidden layer weights With output weights ; The network weights of the ANN controller are optimized in real time based on the updated weight formula, so that the grid-connected current tracks the reference current and meets the grid-connected requirements of the inverter.

8. A self-calibrating control system for a grid-connected inverter based entirely on artificial neural networks, characterized in that, include: The reference current calculation module is configured to: after the ANN phase-locked loop (PLL) offline training is completed, collect the grid voltage and input it into the ANN PLL, multiply the phase angle cosine value obtained from the ANN PLL output with the reference current amplitude to obtain the reference current; The modulation wave generation module is configured to: compare the difference between the grid-connected current and the reference current, input the difference to the ANN controller, generate a modulation wave under the action of the ANN controller, input one modulation wave to the ANN parameter estimator, and control the on / off switching of the inverter in the inverter grid-connected system after passing through PWM to generate the grid-connected current. The ANN parameter estimator receives the modulated wave and the grid-connected current, and outputs the fitted value of the grid-connected current. The output weights of the ANN parameter estimator are solved in real time, and the input weights, output weights and hidden layer outputs are fed back. The ANN controller parameters are adjusted online based on the grid current error and the feedback parameters of the ANN parameter estimator to generate the required modulation wave. The control module is configured to: sequentially cycle through the processes in the above module, gradually reduce the error by continuously and automatically adjusting the weights of the ANN controller, so that the grid-connected current can quickly track the reference current and perform grid connection.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it performs the steps of the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Inverter grid-connected control method and system based on full-artificial neural network

    CN116565960A

  • Vector control of grid-connected power electronic converter using artificial neural networks

    US20140362617A1