Network-forming inverter control method based on sliding mode control and perceptron and related device

By adopting a grid-type inverter control method based on sliding mode control and a sensor, the control process is simplified, the dynamic response speed and robustness are improved, and the problems of slow dynamic response and severe parameter coupling in the existing technology are solved, thus achieving efficient power quality improvement.

CN122137253APending Publication Date: 2026-06-02FOSHAN XIANHU LAB

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FOSHAN XIANHU LAB
Filing Date
2026-02-12
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing VSG control technology based on dual PI loop cascade has problems such as slow dynamic response speed, severe coupling of PI controller parameters, and complex decoupling design of rotating coordinate system, making it difficult to fully realize the fast response potential of power devices.

Method used

A grid-type inverter control method based on sliding mode control and a sensor is adopted. The state feedback parameters are determined by a virtual synchronous generator, and the voltage compensation parameters are generated by combining the sliding mode control algorithm and the sensor. The power command is directly mapped to the modulation signal, which simplifies the control process and improves the dynamic response speed and robustness.

Benefits of technology

It achieves direct mapping from power command to modulation signal, improves the dynamic response speed and steady-state accuracy of grid-connected inverters under all operating conditions, reduces steady-state error, can suppress specific subharmonics, and improve grid-connected power quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137253A_ABST
    Figure CN122137253A_ABST
Patent Text Reader

Abstract

This application relates to the field of power electronic converter and microgrid control technology, and particularly to a control method and related equipment for grid-connected inverters based on sliding mode control and a sensing machine. The method includes: responding to a received power command, determining first state feedback parameters based on a virtual synchronous generator; determining second state feedback parameters based on detected electrical variables on the AC and DC sides; constructing an input feature vector using the power command, the first state feedback parameters, and the second state feedback parameters; inputting the input feature vector into a trained sensing machine to obtain voltage compensation parameters; determining a modulation voltage value based on a sliding mode control algorithm, according to the first state feedback parameters, the second state feedback parameters, and the voltage compensation parameters; and mapping the modulation voltage value to a modulation signal. The method provided in this application is used to control inverters and can significantly improve the inverter's dynamic response speed, robustness, and steady-state accuracy under all operating conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power electronic converter and microgrid control technology, and in particular to grid-type inverter control methods and related equipment based on sliding mode control and sensing machines. Background Technology

[0002] Grid-based inverters are used in renewable energy power plants such as photovoltaic power plants and wind power plants. Grid-based inverters enable the output of renewable energy power plants to be consistent with or highly coordinated with the grid in terms of voltage frequency, phase and amplitude.

[0003] Virtual synchronous generators can simulate the rotor inertia and primary frequency / voltage regulation characteristics of synchronous generators. When grid-connected inverters are connected to the grid, the electromagnetic torque generated by power exchange enables the inverter output to be in the same frequency and phase as the grid.

[0004] The existing VSG control technology based on dual PI loop cascade has the following main drawbacks: 1. To ensure the stability of the inner loop, the bandwidth of the current loop needs to be much higher than that of the voltage loop. This results in the overall dynamic response speed of the system being constrained by the slower voltage outer loop, making it difficult to fully utilize the fast response potential of power devices.

[0005] 2. Two sets of PI controller parameters need to be designed and tuned independently. The parameters are heavily coupled, the debugging work is cumbersome, and it is difficult to coordinate the two objectives of voltage regulation and current tracking from the perspective of global optimization.

[0006] 3. The inner current loop usually requires the introduction of complex rotating coordinate system decoupling terms, the effectiveness of which depends on the accuracy of the system parameters. Summary of the Invention

[0007] The main objective of this application is to propose a grid-type inverter control method and related equipment based on sliding mode control and a sensor, which can realize direct and fast mapping from the power / voltage command of the virtual synchronous generator to the inverter modulation signal, significantly improving the dynamic response speed, robustness, and steady-state accuracy of the grid-type inverter under all operating conditions.

[0008] To achieve the above objectives, this application proposes a control method for a grid-connected inverter based on sliding mode control and a sensing machine, applied to a grid-connected inverter used to invert the DC-side input to the AC-side output; the method includes the following steps: In response to the received power command, a first state feedback parameter is determined based on the virtual synchronous generator; the first state feedback parameter is used to describe the three-phase potential of the AC side. The second state feedback parameter is determined based on the detected electrical variable values ​​on the AC side and the DC side; the second state feedback parameter is used to describe the changes in electrical variables on the DC side and the AC side. An input feature vector is constructed using the power command, the first state feedback parameter, and the second state feedback parameter. The input feature vector is then input into the trained perceptron to obtain voltage compensation parameters. Based on the sliding mode control algorithm, the target modulation voltage value is determined according to the first state feedback parameter, the second state feedback parameter, and the voltage compensation parameter, and the target modulation voltage value is mapped to a modulation signal; the modulation signal is used to control the power switching of the inverter.

[0009] In some implementations, the first state feedback parameters include the d-axis potential and the q-axis potential; The step of determining the first state feedback parameters based on the virtual synchronous generator in response to the received power command includes: The power command is input into the virtual synchronous generator to obtain the virtual rotor phase angle and the virtual internal potential amplitude. The three-phase virtual internal potential is determined based on the virtual rotor phase angle and the virtual internal potential amplitude. The three-phase virtual internal potentials are transformed to the d-axis and q-axis of a synchronous rotating coordinate system to obtain the d-axis potential and the q-axis potential.

[0010] In some implementations, the second state feedback parameters include the voltage and current on the DC side and AC side in the dq coordinate system; The determination of the second state feedback parameter based on the detected electrical variables on the AC side and the DC side includes: Obtain the current value on the DC side, the voltage value on the AC side, and the current value on the AC side; The voltage value on the AC side is transformed to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis grid-connected voltage and the q-axis grid-connected voltage. The current value on the AC side is transformed to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis grid-connected current and the q-axis grid-connected current. The current value on the DC side is transformed to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis inverter current and q-axis inverter current.

[0011] In some implementations, determining the target modulation voltage value based on the sliding mode control algorithm, according to the first state feedback parameter, the second state feedback parameter, and the voltage compensation parameter, includes: The sliding variable is determined based on the first state feedback parameter, the second state feedback parameter, and the preset composite sliding surface. The sliding variable is used to describe the error between the desired output on the DC side and the desired input on the AC side. The composite sliding surface is constructed based on the voltage error, the current error, and their integrals. The target modulation voltage value is determined based on the sliding variable, the preset superspiral control law, and the voltage compensation parameters.

[0012] In some implementations, determining the target modulation voltage value based on the sliding variable, the preset superhelical control law, and the voltage compensation parameters includes: The desired modulation voltage value is determined based on the sliding variable and the superhelical control law; The target modulation voltage value is determined based on the algebraic sum of the desired modulation voltage value and the voltage compensation parameters.

[0013] In some embodiments, determining the target modulation voltage value based on the sliding variable, the preset superhelical control law, and the voltage compensation parameters further includes: The total disturbance term in the composite sliding surface is corrected by the voltage compensation parameter, and the sliding variable is corrected based on the total disturbance term; The target modulation voltage value is determined based on the sliding variable.

[0014] In some implementations, the perceptron is trained through the following steps: Dynamic data of the grid-connected inverter system are collected to form training samples; the training samples include power commands, first state feedback parameters, and second state feedback parameters. For each training sample at each sampling time, the optimal compensation amount is found through Bayesian optimization to form the training sample pair required for supervised learning; The perceptron is trained using the training samples until the parameters converge.

[0015] To achieve the above objectives, embodiments of this application also provide a grid-type inverter control device based on sliding mode control and a sensing machine, the device comprising: The electrical parameter acquisition module is used to determine the first state feedback parameters based on the virtual synchronous generator in response to the received power command. The state variable acquisition module is used to determine the second state feedback parameter based on the electrical variable detection values ​​of the AC side and the DC side; The STA-MLP control module is used to construct an input feature vector through the power command, the first state feedback parameter and the second state feedback parameter, input the input feature vector into the trained perceptron to obtain voltage compensation parameters, and determine the target modulation voltage value based on the sliding mode control algorithm, according to the first state feedback parameter, the second state feedback parameter and the voltage compensation parameter. An inverter drive module is used to map the target modulation voltage value into a modulation signal.

[0016] To achieve the above objectives, embodiments of this application also provide a computer-readable storage medium, including a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the methods described in embodiments of this application.

[0017] To achieve the above objectives, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in this application.

[0018] The embodiments of this application include at least the following beneficial effects: This application provides a control method, device, storage medium, and program product for a grid-connected inverter based on sliding mode control and a sensing machine. This scheme determines first state feedback parameters based on a virtual synchronous generator in response to a received power command; determines second state feedback parameters based on the detected electrical variables on the AC and DC sides; constructs an input feature vector using the power command, first state feedback parameters, and second state feedback parameters; inputs the input feature vector into a trained sensing machine to obtain voltage compensation parameters; and determines a target modulation voltage value based on the sliding mode control algorithm, according to the first state feedback parameters, second state feedback parameters, and voltage compensation parameters, and maps the target modulation voltage value to a modulation signal. This method achieves a direct mapping from power command to modulation signal, exhibiting smaller overshoot and shorter recovery time compared to traditional dual-PI control architectures when dealing with sudden changes in operating conditions. This method makes decisions based on all measurable states, coordinating control objectives from a global system perspective, achieving integrated optimization, and eliminating the need for complex dual-loop parameter tuning and rotating coordinate system decoupling design. This method introduces a sensor to detect changes in operating conditions, generates compensation parameters to correct the final output target modulation voltage value, further reduces steady-state error, and can suppress specific subharmonics, thereby improving the grid-connected power quality. Attached Figure Description

[0019] Figure 1 This is an optional flowchart of the grid-type inverter control method provided in the embodiments of this application; Figure 2 This is a flowchart illustrating step 101 in the method shown in the embodiment of this application; Figure 3 This is a flowchart illustrating step 102 in the method shown in the embodiment of this application; Figure 4 This is a flowchart illustrating step 103 in the method shown in the embodiment of this application; Figure 5 This is a flowchart illustrating step 104 in the method shown in the embodiment of this application; Figure 6 This is another flowchart illustrating step 104 in the method shown in the embodiment of this application; Figure 7 This is a schematic diagram of the training process of the perceptron in the method shown in the embodiment of this application; Figure 8 This is a logic structure diagram of the grid-type inverter control device shown in the embodiment of this application; Figure 9 This is a schematic diagram of the circuit structure of the grid-type inverter and the power grid shown in the embodiments of this application; Figure 10 This is a data flow diagram of the method shown in the embodiments of this application; Figure 11 This is a schematic diagram of the data flow of the electrical parameter acquisition module shown in an embodiment of this application; Figure 12 This is a logical structure diagram of the unified STA-MLP control module shown in the embodiments of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0021] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0022] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0023] Unless otherwise defined, 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 application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0024] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0025] 1) A grid-connected inverter is a power electronic converter that can simulate a real synchronous generator to actively build and support the voltage and frequency of the AC grid, and convert DC power into AC output.

[0026] 2) Virtual Synchronous Generator (VSG) is a control strategy used to simulate the external characteristics and dynamic behavior of traditional synchronous generators. Its control principle is to embed the electromechanical transient equations of the synchronous generator into the inverter control loop so that the inverter can reproduce the output of the synchronous generator.

[0027] In related technologies, VSG-based grid-connected inverter control typically employs a dual-PI-loop cascaded control architecture. In this architecture, the outer loop, acting as a voltage / power loop, outputs a reference voltage based on the power command. This reference voltage, after PI regulation, generates the reference command for the inner current loop. The inner loop tracks the reference command from the outer loop, and after PI regulation and feedforward decoupling calculations, outputs the inverter's modulated voltage.

[0028] Inverters with a dual PI loop cascaded control architecture have the following disadvantages: 1) The bandwidth of the current loop needs to be much higher than that of the voltage loop, which causes the overall dynamic response speed of the system to be constrained by the slower voltage outer loop, making it difficult to fully realize the fast response potential of power devices.

[0029] 2) The parameters of the two sets of PI controllers, the outer loop and the inner loop, are severely coupled, making the debugging work cumbersome and the optimal solution to the two objectives of voltage regulation and current tracking need to be found.

[0030] 3) The inner current loop usually requires the introduction of complex rotating coordinate system decoupling terms, the effect of which depends on the accuracy of the system parameters.

[0031] In view of this, embodiments of this application provide a control method and related equipment for a grid-connected inverter based on sliding mode control and a perceptron. The method uses parameters output by a virtual synchronous generator and actually detected parameters as inputs to the control algorithm. A target modulation voltage value is calculated based on a superspiral sliding mode control algorithm. A trained perceptron compensates for the target modulation voltage value output by the superspiral sliding mode control algorithm, and the compensated target modulation voltage value is used as the port voltage value output by the inverter. This scheme enables direct mapping from the power / voltage command of the virtual synchronous generator to the inverter modulation signal, significantly improving the dynamic response speed, robustness, and steady-state accuracy of the grid-connected inverter under all operating conditions.

[0032] The method provided in this application is applied to substations of new energy power plants such as photovoltaic and wind power plants. The method is used to control the inverter in the substation to convert the DC power source of the new energy power plant into AC power, which is then output to the power grid or used to build an independent microgrid.

[0033] The grid-type inverter control method based on sliding mode control and a sensor provided in this application relates to the field of information technology. This grid-type inverter control method based on sliding mode control and a sensor can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the grid-type inverter control method based on sliding mode control and a sensor, but is not limited to the above forms.

[0034] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0035] Figure 1 This is an optional flowchart of the grid-type inverter control method provided in the embodiments of this application.

[0036] See Figure 1 , Figure 1 The method may include, but is not limited to, steps 101 to 103.

[0037] Step 101: In response to the received power command, determine the first state feedback parameters based on the virtual synchronous generator; Step 102: Determine the second state feedback parameter based on the detected electrical variables of the AC side and the DC side; Step 103: Construct an input feature vector using the power command, the first state feedback parameter, and the second state feedback parameter, and input the input feature vector into the trained perceptron to obtain voltage compensation parameters.

[0038] Step 104: Based on the sliding mode control algorithm, determine the target modulation voltage value according to the first state feedback parameter, the second state feedback parameter and the voltage compensation parameter, and map the target modulation voltage value into a modulation signal.

[0039] It should be noted that the virtual synchronous generator outputs a first state feedback parameter through the input power command, and the virtual synchronous generator is used to simulate the dynamic characteristics of the AC side power grid.

[0040] The first state feedback parameter is used to describe the three-phase potential of the AC side; The second state feedback parameter is determined by detecting the state variables on the AC side and the inverter side, including voltage and current values. The second state feedback parameter is used to describe the changes in electrical variables on the inverter side and the AC side.

[0041] The sliding mode control algorithm outputs the target modulation voltage value through the input first state feedback parameter, second state feedback parameter, and voltage compensation parameter.

[0042] The modulation signal is used to control the power switch of the inverter, converting the DC input into the AC output.

[0043] The method described in this application has the following beneficial effects: (1) This method realizes direct mapping from power command to modulation signal, and has smaller overshoot and shorter recovery time when dealing with sudden operating conditions compared with the traditional dual PI control architecture; (2) This method makes decisions based on all measurable states, can coordinate control objectives from the global perspective of the system, achieve integrated optimization, and eliminates the complex design of dual-loop parameter tuning and rotating coordinate system decoupling.

[0044] (3) This method introduces a sensor to sense changes in operating conditions, generates compensation parameters to correct the target modulation voltage value of the final output, further reduces steady-state error, and can suppress specific subharmonics, thereby improving the grid-connected power quality.

[0045] Figure 2 This is a flowchart illustrating step 101 of the method shown in the embodiment of this application.

[0046] In some embodiments, the first state feedback parameters include the d-axis potential and the q-axis potential.

[0047] See Figure 2 Step 101 includes, but is not limited to: Step 201: Input the power command into the virtual synchronous generator to obtain the virtual rotor phase angle and the virtual internal potential amplitude; Step 202: Determine the three-phase virtual internal potential based on the virtual rotor phase angle and the virtual internal potential amplitude; Step 203: Perform coordinate transformation on the three-phase virtual internal potential to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis potential and the q-axis potential.

[0048] In this embodiment, the core function of the virtual synchronous generator is to convert the power command into the voltage waveform command that the inverter needs to track. By simulating the rotor motion equation and excitation regulation equation of the synchronous generator, the virtual phase angle and virtual internal potential amplitude that reflect the inertia and damping characteristics are calculated, and then the three-phase virtual potential is synthesized. Finally, through coordinate transformation, the d-axis potential and q-axis potential that can be directly used for inner loop control are generated.

[0049] The virtual synchronous generator achieves a precise and physically meaningful mapping from "power command" to "voltage command," which is key to endowing the inverter with the external characteristics of a synchronous generator.

[0050] Figure 3 This is a flowchart illustrating step 102 in the method shown in the embodiment of this application.

[0051] See Figure 3 In some embodiments, the second state feedback parameters include the voltage and current on the DC side and AC side in the dq coordinate system; Step 103 includes, but is not limited to: Step 301: Obtain the current value on the DC side, the voltage value on the AC side, and the current value on the AC side; Step 302: Perform coordinate transformation on the voltage value on the AC side to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis grid-connected voltage and the q-axis grid-connected voltage; Step 303: Perform coordinate transformation on the current value of the AC side to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis grid-connected current and the q-axis grid-connected current; Step 304: Perform coordinate transformation on the DC side current value to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis inverter current and q-axis inverter current.

[0052] In this embodiment, the voltage and current on the AC side and the current on the DC side are measured, and the dq-axis components corresponding to each detected value are obtained through coordinate transformation. These dq-axis components are then used as inputs to the sliding mode control algorithm and the sensor in subsequent steps.

[0053] Figure 4 This is a flowchart illustrating step 103 in the method shown in the embodiment of this application.

[0054] See Figure 4 In some embodiments, step 103 includes, but is not limited to: Step 401: Determine the sliding variable based on the first state feedback parameter, the second state feedback parameter, and the preset composite sliding surface. The sliding variable is used to describe the error between the desired output on the DC side and the desired input on the AC side. The composite sliding surface is constructed based on the voltage error, the current error, and their integrals. Step 402: Determine the target modulation voltage value based on the sliding variable, the preset superspiral control law, and the voltage compensation parameters. The superspiral control law employs a combination of continuous integral compensation terms and nonlinear power feedback terms.

[0055] The embodiments of this application design a super-helical sliding mode control method based on continuous second-order sliding mode, which aims to overcome the high-frequency chattering problem caused by discontinuous switching functions in traditional sliding mode control, while maintaining the system's strong robustness to parameter perturbations and external disturbances.

[0056] Figure 5 This is a flowchart illustrating step 104 of the method shown in the embodiment of this application.

[0057] See Figure 5 In some embodiments, determining the target modulation voltage value based on the sliding variable, the preset superhelical control law, and the voltage compensation parameters includes: Step 501: Determine the desired modulation voltage value based on the sliding variable and the superspiral control law; Step 502: Determine the target modulation voltage value based on the algebraic sum of the desired modulation voltage value and the voltage compensation parameters.

[0058] In this embodiment, the final output is the direct algebraic sum of the outputs of the two perceptrons and the sliding mode control algorithm.

[0059] Figure 6 This is another flowchart illustrating step 104 of the method shown in the embodiment of this application.

[0060] See Figure 6 In some embodiments, determining the target modulation voltage value based on the sliding variable, the preset superhelical control law, and the voltage compensation parameters further includes: Step 601: Correct the total disturbance term in the composite sliding surface using the voltage compensation parameter, and correct the sliding variable based on the total disturbance term; Step 602: Determine the target modulation voltage value based on the sliding variable.

[0061] In this embodiment, based on the well-designed composite sliding surface, the output voltage compensation parameter of the sensor is equivalently regarded as the total dynamic disturbance term of the composite sliding surface. Active feedforward compensation. The voltage compensation parameters of the sensor compensate for the total disturbance term of the composite sliding surface, enabling the sliding mode control algorithm to operate under milder conditions, thereby allowing for the use of a smaller control gain and further improving dynamic performance.

[0062] Figure 7 This is a schematic diagram of the training process of the perceptron in the method shown in the embodiments of this application.

[0063] See Figure 7 In some embodiments, the perceptron is trained through the following steps: Step 701: Collect dynamic data of the grid-connected inverter system to form training samples; the training samples include power commands, first state feedback parameters and second state feedback parameters. Step 702: For the training samples at each sampling time, find the optimal compensation amount through Bayesian optimization to form the training sample pairs required for supervised learning; Step 703: Train the perceptron using the training samples until the parameters converge.

[0064] Among them, the following are considered: Sensor load disturbances: step switching of resistive, inductive, and capacitive loads, covering the range of 0%-150% of rated load; Nonlinear loads: connection and disconnection of three-phase uncontrolled rectifier bridges with RC loads; Grid disturbances: grid voltage amplitude drops (e.g., 30%), phase jumps, and background harmonics (e.g., 3rd, 5th, and 7th orders) injection; Parameter perturbations: random variation of LCL filter parameters within their tolerance range (e.g., ±20%) during simulation; Operating point variations: and A step change.

[0065] In this embodiment, after collecting a sufficient number of sample pairs, a perceptron is constructed using a deep learning framework. The dataset is divided into a training set, a validation set, and a test set. The network parameters of the perceptron are updated using the backpropagation algorithm until the loss of the perceptron on the validation set converges. The training data includes various abnormal operating conditions. The perceptron calculates the loss of the predicted voltage compensation parameters using sample pairs and performs backpropagation, enabling the perceptron to learn the voltage compensation parameters required under different abnormal operating conditions.

[0066] Please see Figure 8 This application also provides a grid-type inverter control device based on sliding mode control and a sensor, the device comprising: The electrical parameter acquisition module is used to determine the first state feedback parameters based on the virtual synchronous generator in response to the received power command. The state variable acquisition module is used to determine the second state feedback parameter based on the electrical variable detection values ​​of the AC side and the DC side; The STA-MLP control module is used to construct an input feature vector through the power command, the first state feedback parameter and the second state feedback parameter, input the input feature vector into the trained perceptron to obtain voltage compensation parameters, and determine the target modulation voltage value based on the sliding mode control algorithm according to the first state feedback parameter, the second state feedback parameter and the voltage compensation parameter. An inverter drive module is used to map the target modulation voltage value into a modulation signal.

[0067] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0068] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0069] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0070] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0071] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0072] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0073] The following is a detailed description and explanation of the solutions in the embodiments of the present invention, using specific application examples: In this embodiment of the application, a grid-type inverter control method based on sliding mode control and a sensor is provided. The method is applied to the inverter controller, which outputs a PWM signal according to the power command to control the power switch of the inverter, converting the DC side input into the AC side output. The AC side output is synchronized with the phase and amplitude of the public power grid.

[0074] Figure 9 This is a schematic diagram of the circuit structure of the grid-type inverter and the power grid shown in the embodiments of this application.

[0075] See Figure 9The inverter has a DC input side and an AC output side. The grid-type inverter is equipped with 6 power switches, with the source connected to the DC side, the drain connected to the AC side, and the control terminal connected to the controller. The controller executes the grid-type inverter control method provided in the embodiments of this application and outputs a PWM signal.

[0076] Figure 10 This is a schematic diagram illustrating a method of receiving a power command input and outputting a PWM signal, as shown in an embodiment of this application.

[0077] See Figure 10 This application provides a unified STA-MLP controller that integrates superhelical sliding mode control and a multilayer sensor. The controller calculates the output phase angle using the VSG control algorithm. and virtual electromotive force After calculation of the composite potential and coordinate transformation Received and (First state feedback parameters), acquire DC side voltage and current side voltage The signals on the dq axes were obtained after coordinate transformation. , , , , , (Second state feedback parameters).

[0078] The controller outputs and After coordinate transformation The reference voltage generation signal is then obtained. As a voltage command for PWM modulation, the PWM modulation outputs 6 PWM1~PWM6 signals, which are respectively applied to the 6 IGBT power switches of the grid-type inverter.

[0079] (1) Electrical parameter acquisition module The electrical parameter acquisition module is the core instruction generation unit of the VSG control algorithm. It is used to convert the active / reactive power commands from the upper layer into voltage waveform commands that the inverter needs to track. The electrical parameter acquisition module achieves a precise and physically meaningful mapping from "power commands" to "voltage commands," which is key to endowing the inverter with synchronous generator external characteristics.

[0080] See Figure 11 , Figure 11 This illustrates the data processing procedure of the electrical parameter acquisition module, which calculates the virtual phase angle reflecting inertial and damping characteristics by simulating the rotor motion equation and excitation regulation equation of a synchronous generator. With virtual internal potential amplitude This leads to the synthesis of a three-phase virtual potential ( And finally, through coordinate transformation, a dq-axis reference voltage that can be directly used for inner loop control is generated. and ).

[0081] The following is the specific calculation process of the electrical parameter acquisition module.

[0082] (1.1) Virtual phase angle and virtual potential

[0083] Virtual synchronous generators use control algorithms to enable inverters to simulate the static and dynamic characteristics of synchronous generators. The core of this technology is to simulate the rotor motion equations and excitation regulation characteristics of synchronous generators.

[0084] The active frequency control of VSG includes a virtual speed governor and rotor motion characteristic components, and its rotor motion equation is expressed as: ,

[0085] in, The VSG outputs the angular frequency; As the reference angular frequency, ; For virtual mechanical power, For virtual electromagnetic power, The damping coefficient is... The inertia coefficient, The virtual phase angle output by VSG.

[0086] The virtual speed controller has a primary frequency regulation function, expressed as: ,

[0087] in, This is the active power reference. This is the active power droop coefficient.

[0088] The reactive voltage control of VSG is expressed as follows: ,

[0089] in, This refers to the AC side voltage amplitude. This is the no-load voltage. AC side voltage, This is the voltage reference value. The reactive power output of the VSG. This is a reference value for reactive power. This is the reactive power droop factor. This is the voltage regulation coefficient.

[0090] (1.2) Virtual potential vector Virtual potential of reactive power Virtual phase angle with active power loop By combining these methods, the output virtual potential vector can be obtained. : (4) (1.3) VSG output voltage and ; pass VSG output voltage is obtained by transformation and (First state feedback parameters), the calculation process is as follows: (5) Equations (1) to (5) above represent the data processing procedures performed by the electrical parameter acquisition module.

[0091] (2) Unified STA-MLP control module See Figure 12 , Figure 12 The logical structure diagram of the unified STA-MLP control module is shown. This application provides a unified STA-MLP control module, which consists of a superspiral sliding mode control module (STA) and a multilayer perceptron (MLP) in parallel architecture. The STA utilizes its inherent robustness to provide stable and fast reference control quantities, ensuring global system stability. The MLP acts as a real-time performance optimizer, adaptively generating refined compensation quantities online by sensing the dynamic characteristics of the system. The outputs of the STA and MLP are directly synthesized to achieve global optimization of robustness and dynamic performance across the entire operating range.

[0092] The following is the calculation process in the unified STA-MLP control module.

[0093] (2.1) The input is a composite error signal, defined as follows: Voltage tracking error and : (6) Current-related error and : (7) Current amplitude : (8) in, This is the reference current value corresponding to the AC signal measured on the d-axis. This is the reference current value corresponding to the signal measured on the q-axis.

[0094] and The calculation formula is: (9) Wherein, G(s) is a first-order low-pass filter used to describe the desired dynamic relationship between voltage and current.

[0095] (2.2) Superspiral Sliding Mode Control Module (STA) This invention provides a design method for a super-spiral sliding mode control system based on continuous second-order sliding mode, which aims to overcome the high-frequency chattering problem caused by discontinuous switching functions in traditional sliding mode control, while maintaining the system's strong robustness to parameter perturbations and external disturbances.

[0096] For example, the calculation process of the superspiral sliding mode control module includes: 2.2.1 Design of a composite sliding surface considering voltage tracking and current dynamics: (10) (11) in, It is a diagonal positive definite weight matrix used to balance the requirements of voltage tracking accuracy, current dynamic response and elimination of steady-state error. When the system state is driven to the sliding surface (i.e. S=0), it can ensure that the voltage and current errors asymptotically converge to zero.

[0097] 2.2.2 Differentiating the sliding surface S, we obtain its dynamic equation: (12) 2.2.3 Substituting the input signal from 2.1 into equation (12), the dynamic equation for the output current is: (13) The dynamic equation for the filter capacitor voltage is: (14) The dynamic equation for the AC current is: (15) 2.2.4 Substituting the error definition and deriving the result, we can summarize as follows: (16) in, For the first state feedback parameters and the second state feedback parameters, Given the known dynamics of a system with known nominal model components, including coupling, filtering, and resistive losses, etc. For the control gain matrix, , This is the total disturbance term.

[0098] 2.2.5 Superspiral Control Law The superhelical control law employs a superhelical algorithm that includes continuous integral compensation terms and nonlinear power feedback terms, forming the control law of the sliding mode controller (STSMC), namely: (17) (18) in, and The stability gain determines the speed at which the system approaches the sliding surface. and The torsional gain determines the convergence of the system origin; For inclusion The control gain coefficient, For inclusion The control gain coefficient, For inclusion and The function, For inclusion and The function.

[0099] (2.3) Perceptron The perceptron acts as a "performance optimizer," responsible for intelligently fine-tuning the output of the STA based on real-time operating conditions to optimize dynamic and steady-state performance.

[0100] 2.3.1 Perceptron Network Structure 2.3.1.1 Define the input layer as follows: Input 1: Sliding surface width: ; Input 2: Define the rate of change of the sliding surface: ; Input 3: Active power P.

[0101] Input 4: Reactive power Q; Input 5: Current amplitude

[0102] The sliding surface amplitude reflects the distance the system state deviates from the ideal sliding surface, directly measuring the degree of system imbalance. The sliding surface rate of change reflects the drastic nature of system state changes; a larger value indicates a stronger disturbance or that the system is in a rapid dynamic process. The power information of P and Q clarifies the current load level of the system and is key operating information determining the optimal dynamic characteristics of the controller. Current amplitude... Provides additional information about filter current stress and nonlinearity.

[0103] For example, the input feature vector of the perceptron is: (19) 2.3.1.2 The hidden layer uses the ReLU activation function; 2.3.1.3 The output layer uses the Tanh activation function to restrict the output to the range (-1, 1), defined as having two dimensions: Output 1: d-axis compensation voltage

[0104] Output 2: q-axis compensation voltage

[0105] For example, the mathematical representation of the output layer is as follows: (20) in, The preset scaling factor, This refers to either the d-axis compensation voltage or the q-axis compensation voltage. This is the output of the hidden layer.

[0106] 2.3.2 The mathematical definition of MLP is: ,(twenty one) in, It is the input feature vector, and it is the weight matrix and bias vector connecting the input layer and the hidden layer; The activation function for the hidden layer. It is the output vector of the hidden layer. It is the weight matrix connecting the hidden layer and the output layer. It is the bias vector connecting the hidden layer and the output layer. It is the activation function of the output layer, which compresses the output value to the range of (-1, 1) and directly uses it as the normalization adjustment amount for the gain. Defined as: ,(twenty two) 2.3.3 Training and Deployment of MLP 2.3.3.1 Training Data Generation: In high-fidelity simulation platforms such as MATLAB / Simulink, a high-precision model of a complete grid-connected inverter system, including the unified STA-MLP controller proposed in this invention (with initial MLP weights randomly initialized or set to zero), is built. A wide variety of training conditions are set, and for each sampling time... Record feature vectors Simultaneously, the internal state of the controller and the system response at this moment are recorded to form training data.

[0107] Specifically, the training conditions include: Load disturbance: Step switching of resistive, inductive, and capacitive loads, covering a range of 0%-150% of rated load; Nonlinear loads: Connection and disconnection of RC loads in a three-phase uncontrolled rectifier bridge; Power grid disturbances: voltage amplitude drops (e.g., 30%), phase jumps, and background harmonic injection (e.g., 3rd, 5th, and 7th harmonics); Parameter perturbation: In the simulation, the LCL filter parameters are randomly varied within their tolerance range (e.g., ±20%). Runpoint changes: and A step change.

[0108] 2.3.3.2, Mentor Signal Generation: For each sampling time Find an optimal compensation amount through Bayesian optimization. To optimize the overall performance of the system in the short term, this invention employs a method based on local online optimization. In the simulation, when the time reaches time... When this happens, freeze the current system state; Define a short time window for the future Performance metrics within 2-5 fundamental cycles, such as time multiplied by the integral of absolute error.

[0109] The performance metric is defined as follows: ,(twenty three) Using the compensation variable Umlp of the MLP as the decision variable, efficient optimization algorithms (such as Bayesian optimization and gradient descent) are used to perform a fast "simulation-optimization" loop in the simulation environment to find the performance index that can be optimized. The performance index of minimizing the optimal compensation amount.

[0110] This process matches an "optimal action" to each "state," forming the sample pairs required for supervised learning.

[0111] For example, the sample pair is: .

[0112] 2.3.3.3 Offline Training: After collecting a sufficient number of sample pairs, a perceptron is built using deep learning frameworks (such as PyTorch and TensorFlow). The training data is divided into training, validation, and test sets. The loss function is the mean squared error (MSE). The optimizer is the Adam optimizer for batch training. The network parameters are updated through the backpropagation algorithm until the loss of the model on the validation set converges.

[0113] For example, the mathematical representation of the loss function is as follows: ,(twenty four) in, The output of the perceptron, This is the sample pair number.

[0114] (2.4) Collaborative working mechanism between STA module and MLP module The collaborative operation of STA and MLP provided in this application embodiment is achieved through a design that separates stability and performance.

[0115] The first cooperation method: the final output modulation voltage value of the control module is equal to the algebraic sum of the outputs of MLP and STA.

[0116] The second collaborative method: The output of the MLP is regarded as the total disturbance term in the dynamics of the sliding surface. The active feedforward compensation is mathematically represented as: (25) (26) In the second cooperative approach, the MLP controls the equivalent disturbance. Approaching 0 allows the STA module to operate under milder conditions, thus enabling the use of smaller control gain and further improving dynamic performance.

[0117] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0118] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0119] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0120] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0121] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0122] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0123] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0124] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0125] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0126] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0127] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A control method for a grid-type inverter based on sliding mode control and a sensing machine, characterized in that, The method is applied to a grid-connected inverter, which inverts the DC input to the AC output; the method includes the following steps: In response to the received power command, a first state feedback parameter is determined based on the virtual synchronous generator; the first state feedback parameter is used to describe the three-phase potential of the AC side. The second state feedback parameter is determined based on the detected electrical variable values ​​on the AC side and the DC side; the second state feedback parameter is used to describe the changes in electrical variables on the DC side and the AC side. An input feature vector is constructed using the power command, the first state feedback parameter, and the second state feedback parameter. The input feature vector is then input into the trained perceptron to obtain voltage compensation parameters. Based on the sliding mode control algorithm, the target modulation voltage value is determined according to the first state feedback parameter, the second state feedback parameter, and the voltage compensation parameter, and the target modulation voltage value is mapped to a modulation signal; the modulation signal is used to control the power switching of the inverter.

2. The method as described in claim 1, characterized in that, The first state feedback parameters include the d-axis potential and the q-axis potential; The step of determining the first state feedback parameters based on the virtual synchronous generator in response to the received power command includes: The power command is input into the virtual synchronous generator to obtain the virtual rotor phase angle and the virtual internal potential amplitude. The three-phase virtual internal potential is determined based on the virtual rotor phase angle and the virtual internal potential amplitude. The three-phase virtual internal potentials are transformed to the d-axis and q-axis of a synchronous rotating coordinate system to obtain the d-axis potential and the q-axis potential.

3. The method as described in claim 1, characterized in that, The second state feedback parameters include the voltage and current on the DC side and AC side in the dq coordinate system; The determination of the second state feedback parameter based on the detected electrical variables on the AC side and the DC side includes: Obtain the current value on the DC side, the voltage value on the AC side, and the current value on the AC side; The voltage value on the AC side is transformed to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis grid-connected voltage and the q-axis grid-connected voltage. The current value on the AC side is transformed to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis grid-connected current and the q-axis grid-connected current. The current value on the DC side is transformed to the d-axis and q-axis of the synchronous rotating coordinate system to obtain the d-axis inverter current and q-axis inverter current.

4. The method as described in claim 1, characterized in that, The sliding mode control algorithm determines the target modulation voltage value based on the first state feedback parameter, the second state feedback parameter, and the voltage compensation parameter, including: The sliding variable is determined based on the first state feedback parameter, the second state feedback parameter, and the preset composite sliding surface. The sliding variable is used to describe the error between the desired output on the DC side and the desired input on the AC side. The composite sliding surface is constructed based on the voltage error, the current error, and their integrals. The target modulation voltage value is determined based on the sliding variable, the preset superspiral control law, and the voltage compensation parameters.

5. The method as described in claim 4, characterized in that, The step of determining the target modulation voltage value based on the sliding variable, the preset superhelical control law, and the voltage compensation parameters includes: The desired modulation voltage value is determined based on the sliding variable and the superhelical control law; The target modulation voltage value is determined based on the algebraic sum of the desired modulation voltage value and the voltage compensation parameters.

6. The method as described in claim 4, characterized in that, The step of determining the target modulation voltage value based on the sliding variable, the preset superhelical control law, and the voltage compensation parameters includes: The total disturbance term in the composite sliding surface is corrected by the voltage compensation parameter, and the sliding variable is corrected based on the total disturbance term; The target modulation voltage value is determined based on the sliding variable.

7. The method as described in claim 1, characterized in that, The perceptron is trained through the following steps: Dynamic data of the grid-connected inverter system are collected to form training samples; the training samples include power commands, first state feedback parameters, and second state feedback parameters. For each training sample at each sampling time, the optimal compensation amount is found through Bayesian optimization to form the training sample pair required for supervised learning; The perceptron is trained using the training samples until the parameters converge.

8. A grid-type inverter control device based on sliding mode control and a sensing machine, characterized in that, The device includes: The electrical parameter acquisition module is used to determine the first state feedback parameters based on the virtual synchronous generator in response to the received power command. The state variable acquisition module is used to determine the second state feedback parameter based on the electrical variable detection values ​​of the AC side and the DC side; The STA-MLP control module is used to construct an input feature vector through the power command, the first state feedback parameter and the second state feedback parameter, input the input feature vector into the trained perceptron to obtain voltage compensation parameters, and determine the target modulation voltage value based on the sliding mode control algorithm, according to the first state feedback parameter, the second state feedback parameter and the voltage compensation parameter. An inverter drive module is used to map the target modulation voltage value into a modulation signal.

9. A computer-readable storage medium, characterized in that, It includes a processor and a memory, the memory storing a computer program that, when executed by the processor, implements the method of any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.