A control method for an inverter
By establishing a mathematical model under the synchronous rotation coordinate system in the inverter, and using the control law of feedback control terms, feedforward compensation control terms and model reference adaptive control terms, the problem of low control accuracy of the inverter is solved, and high-precision and low-cost control effects are achieved.
Patent Information
- Application Number
- CN202410999411.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2044-07-24
AI Technical Summary
Existing inverter control methods require the use of load current sensors or observers, resulting in high cost and low control accuracy.
Establish a mathematical model of the inverter under the synchronous rotation coordinate system, and reduce the dependence on the load current sensor and improve the control accuracy through the feedback control term, the feedforward compensation control term and the model reference adaptive control term.
On the premise of reducing control costs, fast transient response, low total harmonic distortion and robustness to parameter uncertainty are achieved, improving control accuracy.
Smart Images

Figure CN118889882B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of inverter control, and in particular to a method for controlling an inverter. Background Art
[0002] In recent years, the demand for grid-connected inverters in various applications such as distributed generation systems (DGS), uninterruptible power supplies (UPS), and energy storage systems (ESS) has increased rapidly, and they have been widely used.
[0003] Existing inverter control methods require the use of load current sensors or observers for state feedback control, which is costly and has low control accuracy due to observation errors and delays in current sensors and observers. Summary of the Invention
[0004] The present invention provides a control method for an inverter, which can improve control accuracy while reducing control costs.
[0005] An embodiment of the present invention provides a control method for an inverter, comprising: establishing a mathematical model of the inverter in a synchronous rotating coordinate system, and determining an output voltage error based on the mathematical model; establishing a reference model for the output voltage error; and establishing a control law including a feedback control term, a feedforward compensation control term, and a model reference adaptive control term based on a first-order derivative of the output voltage error, an output of the reference model, an error variable, and a capacitor voltage and an inductor current of the inverter, so as to decay the error variable to zero; wherein the output voltage error is the difference between an actual output voltage value of the inverter and a voltage reference value, and the error variable is the difference between the output voltage error and the output of the reference model.
[0006] Optionally, the steps of establishing a mathematical model of the inverter in a synchronous rotating coordinate system and determining the output voltage error amount according to the mathematical model include:
[0007] The mathematical model of the inverter in the synchronous rotating coordinate system established according to Kirchhoff's voltage theorem and Kirchhoff's current theorem is:
[0008]
[0009] Based on v de =v Cd -v dr , v qe =v Cd -v qr , convert formula (1.1) into:
[0010]
[0011] Based on x1=v de , x3=v qe , Convert formula (1.2) to:
[0012]
[0013] Define the d-axis voltage error dynamic disturbance d d and the q-axis voltage error dynamic disturbance d q The formula is as follows:
[0014]
[0015] According to formula (1.3) and formula (1.4), the second-order derivative of the output voltage error is as follows:
[0016]
[0017] Where, k1=1 / C, k2=1 / L, C is the output capacitance, L is the output inductance, ω is the angular frequency of the inverter output voltage, i Ld is the inductor current of the d-axis in the synchronous rotating coordinate system, i Lq is the inductor current of the q axis in the synchronous rotating coordinate system, i od is the load current of the d-axis in the synchronous rotating coordinate system, i oq is the load current of the q axis in the synchronous rotating coordinate system, v id is the d-axis control input, v iq is the q-axis control input, v Cd is the d-axis capacitor voltage, v Cq is the q-axis capacitor voltage, for i Ld The first derivative of for i Lq The first derivative of v dr Indicates the d-axis voltage reference value, v qr Indicates the q-axis voltage reference value, v de Indicates the d-axis output voltage error, v qe represents the q-axis output voltage error; x1 represents the d-axis output voltage error, x2 represents the first-order derivative of the d-axis output voltage error, x3 represents the q-axis output voltage error, and x4 represents the first-order derivative of the q-axis output voltage error. Represents the first-order derivative of the d-axis output voltage error, Represents the second-order derivative of the d-axis output voltage error, Represents the first-order derivative of the q-axis output voltage error, Indicates the second-order derivative of the q-axis output voltage error.
[0018] Optionally, the step of establishing a reference model of the output voltage error includes: defining the following second-order system:
[0019]
[0020] According to formula (1.7), the exponential decay form of the reference model is as follows:
[0021]
[0022] based on and Convert formula (1.8) to:
[0023]
[0024] Among them, λ dq =[λ d ,λ q ] T ,λ dq is the control parameter gain, V dqm =[v dm ,v qm ] T , V dqm is the reference model output, v dm represents the output of the reference model d axis, v qm represents the reference model q-axis output, Indicates v dm The first derivative of Indicates v qm The first derivative of Indicates v dm The second derivative of Indicates v qm The second derivative of d is the d-axis control parameter gain, λ q is the q-axis control parameter gain; v dm (t) represents the exponential function of the output of the reference model d axis, v qm (t) represents the exponential function of the output of the reference model d axis, v dm (0) represents the initial value of the d-axis output of the reference model, v qm (0) The initial value of the reference model q-axis output, represents the initial value of the first-order derivative of the d-axis output of the reference model, represents the initial value of the first-order derivative of the d-axis output of the reference model, and t represents time.
[0025] Optionally, λ d =λ q=10 4 , v dm (0) = v qm (0)=10.
[0026] Optionally, the step of establishing a control law including a feedback control term, a feedforward compensation control term, and a model reference adaptive control term based on a first-order derivative of the output voltage error, an output of a reference model, an error variable, a capacitor voltage, and an inductor current of the inverter so as to decay the error variable to zero includes:
[0027] Define the error variable E dq =[e d ,e q ] T for:
[0028]
[0029] According to formula (1.10), the error variable E is obtained dq The second-order derivative of is as follows:
[0030]
[0031] According to formula (1.11), the following control law is established:
[0032]
[0033] in,
[0034]
[0035] e d represents the d-axis error variable, e q represents the q-axis error variable, v de Indicates the d-axis output voltage error, v qe Indicates the q-axis output voltage error, v dm represents the output of the reference model d axis, v qm represents the q-axis output of the reference model; Indicates e d The second derivative of Indicates e q The second-order derivative, k1 = 1 / C, k2 = 1 / L, C is the output capacitance, L is the output inductance, v id is the d-axis control input, v iq is the q-axis control input, Indicates v dm The first derivative of Indicates v qm The first derivative of d is the d-axis control parameter gain, λ qis the q-axis control parameter gain, d d is the d-axis voltage error dynamic disturbance d d , d q is the q-axis voltage error dynamic disturbance; K dq =[K d ,K q ] T is the feedback coefficient, -K d σ d and -K q σ q is the feedback control term, v Cd and v Cq is the feedforward compensation control term, and is the model reference adaptive control item; Φ d and Φ q is the adaptive gain matrix, Represents the first-order derivative of the d-axis output voltage error, Represents the first-order derivative of the q-axis output voltage error, i Ld is the inductor current of the d-axis in the synchronous rotating coordinate system, i Lq is the inductor current of the q axis in the synchronous rotating coordinate system, Indicates e d The first derivative of Indicates e q The first derivative of .
[0036] Optionally, the inverter control method further includes: using a bacterial foraging optimization algorithm to solve an optimal adaptive gain matrix.
[0037] Optionally, the steps of using the bacterial foraging optimization algorithm to solve the optimal adaptive gain matrix include: constructing a bacterial community based on the adaptive gain matrix; setting the absolute value integral of the error variable over a period of time as the fitness function; performing chemotaxis according to the fitness function; performing reproduction operations according to the total fitness of the individual; performing adaptive migration operations of the bacterial community; determining whether the dynamic performance reaches a preset value or whether the number of iterations reaches a maximum set value; if the dynamic performance reaches the preset value or the number of iterations reaches the maximum set value, selecting the individual position with the maximum fitness as the optimal adaptive gain matrix.
[0038] Optionally, the d-axis output voltage error and the q-axis output voltage error are discretized to obtain a first-order derivative of the d-axis output voltage error and a first-order derivative of the q-axis output voltage error.
[0039] Optionally, the feedback coefficient K is adjusted using the proportional differential method. dq =[K d ,K q ] T Perform tuning.
[0040] Optionally, the inverter is an LC voltage type inverter.
[0041] The technical solution of the embodiment of the present invention establishes a control law including a feedback control term, a feedforward compensation control term, and a model reference adaptive control term based on the first-order derivative of the output voltage error, the output of the reference model, the error variable, the capacitor voltage, and the inductor current of the inverter, so as to decay the error variable to zero. The feedback control term stabilizes the system error in the steady state, and the designed MRAC control term ensures the rapid response of the system. The addition of the feedforward compensation control term further ensures that the output voltage error can quickly and accurately track the reference model. In addition, because the proposed control law can achieve fast transient response, low total harmonic distortion, and robustness to parameter uncertainty under various load conditions without the use of a load current sensor or observer, it improves control accuracy while reducing control costs.
[0042] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 is a structural diagram of an inverter system provided by an embodiment of the present invention;
[0045] Figure 2 is a flow chart of a method for controlling an inverter provided by an embodiment of the present invention;
[0046] Figure 3 This is a flow chart of solving the optimal adaptive gain matrix using a bacterial foraging optimization algorithm provided by an embodiment of the present invention;
[0047] Figure 4 This is a block diagram of a voltage controller based on model reference adaptation provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0049] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0050] In order to solve the problems of the prior art, an embodiment of the present application provides a control method for an inverter. The following first introduces an inverter system to which the control method provided by the embodiment of the present application can be applied. Figure 1 FIG. 1 is a structural diagram of an inverter system provided by an embodiment of the present invention. Figure 1 As shown, the inverter system includes an inverter and a filter circuit. Specifically, the inverter is connected to the public grid in parallel through three resistors and three output inductors L. C is the output voltage of the inverter, that is, the voltage on the output capacitor C connected to the output end of the inverter, referred to as the capacitor voltage, and the DC side input power supply voltage is U dc .
[0051] Figure 2 This is a flow chart of a method for controlling an inverter provided by an embodiment of the present invention. Figure 1 As shown, the control method of the embodiment of the present invention is applicable to a voltage-controlled inverter. The control method can be executed by a voltage controller of the inverter. The voltage controller can be implemented in software and / or hardware and can be integrated into the control system of the inverter.
[0052] Combine Figure 1 and Figure 2 , the control method of the inverter includes:
[0053] S201: Establish a mathematical model of the inverter in a synchronous rotating coordinate system, and determine an output voltage error according to the mathematical model.
[0054] Specifically, the inverter can be a three-phase LC type inverter. The mathematical model of the inverter refers to the mathematical description of the inverter established using Kirchhoff's voltage and current laws in a three-phase stationary coordinate system based on its topological structure. The control method of the inverter is based on coordinate transformation. The coordinate transformation can be transformed from a three-phase stationary coordinate system to a two-phase stationary vertical coordinate system, and then from a two-phase stationary vertical coordinate system to a two-phase synchronous rotating coordinate system (i.e., a dq coordinate system). In other words, the mathematical model of the inverter in a synchronous rotating coordinate system can be established based on circuit theorem and state space method.
[0055] The output voltage error is the difference between the actual output voltage value of the inverter and the voltage reference value.
[0056] S202: Establish a reference model for output voltage error.
[0057] In Model Reference Adaptive Control (MRAC), a "reference model" is an ideal, pre-designed system model that describes the desired dynamic behavior of the control system under ideal conditions. The reference model is typically a linear, time-invariant system with a known transfer function or state-space model designed to meet specific performance criteria, such as stability, fast response, and robustness to disturbances. The goal of an MRAC system is to make the output of the actual physical system as close as possible to the output of the reference model. In other words, the output of the inverter should be as close as possible to the output of the reference model.
[0058] S203. Establish a control law including a feedback control term, a feedforward compensation control term, and a model reference adaptive control term based on the first-order derivative of the output voltage error, the output of the reference model, the error variable, the capacitor voltage, and the inductor current of the inverter, so as to decay the error variable to 0.
[0059] The output voltage error is the difference between the actual output voltage value of the inverter and the voltage reference value, and the error variable is the difference between the output voltage error and the output of the reference model.
[0060] Feedback control adjusts the system input based on the error variable and its first-order derivative to reduce the output voltage error. For example, proportional control is used as a feedback control term. Feedforward compensation control compensates for known disturbances or changes in the reference model. Model reference adaptive control adjusts voltage controller parameters to accommodate differences between the actual system and the reference model.
[0061] The technical solution of the embodiment of the present invention establishes a control law including a feedback control term, a feedforward compensation control term, and a model reference adaptive control term based on the first-order derivative of the output voltage error, the output of the reference model, the error variable, the capacitor voltage, and the inductor current of the inverter, so as to decay the error variable to zero. The feedback control term stabilizes the system error in the steady state, and the designed MRAC control term ensures the rapid response of the system. The addition of the feedforward compensation control term further ensures that the output voltage error can quickly and accurately track the reference model. In addition, because the proposed control law can achieve fast transient response, low total harmonic distortion, and robustness to parameter uncertainty under various load conditions without the use of a load current sensor or observer, it improves control accuracy while reducing control costs.
[0062] In some embodiments, the steps of establishing a mathematical model of the inverter in a synchronously rotating coordinate system and determining the output voltage error according to the mathematical model include:
[0063] The mathematical model of the inverter in the synchronous rotating coordinate system established according to Kirchhoff's voltage theorem and Kirchhoff's current theorem is:
[0064]
[0065] Based on v de =v Cd -v dr , v qe =v Cd -v qr , convert formula (1.1) into:
[0066]
[0067] Based on x1=v de , x3=v qe , Formula (1.2) is expressed as the first-order derivative of the state variable as follows:
[0068]
[0069] Define the d-axis voltage error dynamic disturbance d d and the q-axis voltage error dynamic disturbance d q The formula is as follows:
[0070]
[0071] According to formula (1.3) and formula (1.4), the second-order derivative of the output voltage error is as follows:
[0072]
[0073] Where, k1=1 / C, k2=1 / L, C is the output capacitance, L is the output inductance, ω is the angular frequency of the inverter output voltage, i Ld is the inductor current of the d-axis in the synchronous rotating coordinate system, i Lq is the inductor current of the q axis in the synchronous rotating coordinate system, i od is the load current of the d-axis in the synchronous rotating coordinate system, i oq is the load current of the q axis in the synchronous rotating coordinate system, v id is the d-axis control input, v iq is the q-axis control input, v Cd is the d-axis capacitor voltage, v Cq is the q-axis capacitor voltage, for i Ld The first derivative of for i Lq The first derivative of v dr Indicates the d-axis voltage reference value, v qr Indicates the q-axis voltage reference value, v de Indicates the d-axis output voltage error, v qe Indicates the q-axis output voltage error. x1 indicates the d-axis output voltage error, x2 indicates the first-order derivative of the d-axis output voltage error, x3 indicates the q-axis output voltage error, and x4 indicates the first-order derivative of the q-axis output voltage error. Represents the first-order derivative of the d-axis output voltage error, Represents the second-order derivative of the d-axis output voltage error, Represents the first-order derivative of the q-axis output voltage error, Indicates the second-order derivative of the q-axis output voltage error.
[0074] Optionally, the step of establishing a reference model of the output voltage error includes: defining the following second-order system:
[0075]
[0076] According to formula (1.7), the exponential decay form of the reference model is as follows:
[0077]
[0078] based on and Convert formula (1.8) to:
[0079]
[0080] Among them, λ dq =[λ d ,λq ] T ,λ dq is the control parameter gain, V dqm =[v dm ,v qm ] T , V dqm is the reference model output, v dm represents the output of the reference model d axis, v qm represents the reference model q-axis output, Indicates v dm The first derivative of Indicates v qm The first derivative of Indicates v dm The second derivative of Indicates v qm The second derivative of d is the d-axis control parameter gain, λ q is the q-axis control parameter gain; v dm (t) represents the exponential function of the output of the reference model d axis, v qm (t) represents the exponential function of the output of the reference model d axis, v dm (0) represents the initial value of the d-axis output of the reference model, v qm (0) The initial value of the reference model q-axis output, represents the initial value of the first-order derivative of the d-axis output of the reference model, represents the initial value of the first-order derivative of the d-axis output of the reference model, and t represents time.
[0081] The error convergence rate is determined by the control parameter gain λ dq Definition, the exponential decay of the output error is determined by the output of the reference voltage model V dqm Definition. Select the control parameter gain λ dq =[λ d ,λ q ] T and the initial value v dm (0) and v qm (0). Since the error variable needs to decay to 0 quickly, the control parameter gain should be selected to a larger value, for example, λ d =λ q =10 4 Then, the initial value v dm (0) and v qm (0) is set to a smaller value, such as v dm (0) = v qm (0)=10, a voltage controller with faster dynamic response is designed.
[0082] Optionally, the step of establishing a control law including a feedback control term, a feedforward compensation control term, and a model reference adaptive control term based on a first-order derivative of the output voltage error, an output of a reference model, an error variable, a capacitor voltage, and an inductor current of the inverter so as to decay the error variable to zero includes:
[0083] Define the error variable E dq =[e d -e q ] T for:
[0084]
[0085] According to formula (1.10), the error variable E is obtained dq The second-order derivative of is as follows:
[0086]
[0087] According to formula (1.11), the following control law is established:
[0088]
[0089] in,
[0090]
[0091] Among them, e d represents the d-axis error variable, e q represents the q-axis error variable, v de Indicates the d-axis output voltage error, v qe Indicates the q-axis output voltage error, v dm represents the output of the reference model d axis, v qm Represents the reference model q-axis output. Indicates e d The second derivative of Indicates e q The second-order derivative, k1 = 1 / C, k2 = 1 / L, C is the output capacitance, L is the output inductance, v id is the d-axis control input, v iq is the q-axis control input, Indicates v dm The first derivative of Indicates v qm The first derivative of d is the d-axis control parameter gain, λ q is the q-axis control parameter gain, d d is the d-axis voltage error dynamic disturbance d d , d qK is the dynamic disturbance of the q-axis voltage error. dq =[K d ,K q ] T is the feedback coefficient, -K d σ d and -K q σ q is the feedback control term, v Cd and v Cq is the feedforward compensation control term, and is the model reference adaptive control term. Φ d and Φ q is the adaptive gain matrix, Represents the first-order derivative of the d-axis output voltage error, Represents the first-order derivative of the q-axis output voltage error, i Ld is the inductor current of the d-axis in the synchronous rotating coordinate system, i Lq is the inductor current of the q axis in the synchronous rotating coordinate system, Indicates e d The first derivative of Indicates e q The first derivative of .
[0092] The feedback coefficient K is adjusted using the parameter adjustment rule of the proportional differential method. dq =[K d ,K q ] T Perform tuning. To avoid excessive rise and settling times, set the feedback coefficient to a larger value. For example, set Kd = Kq = 200, then gradually reduce the feedback coefficient Kdq. If acceptable dynamic performance is achieved, proceed to the next step; otherwise, return to re-tuning.
[0093] Generally speaking, if the adaptive gain is large, the adaptive speed is slow and the transient tracking error is large. Therefore, the method for adjusting the adaptive gain is as follows: first use a larger adaptive gain to make the controlled output converge, and then slowly reduce the adaptive gain to improve dynamic and steady-state performance.
[0094] Optionally, the inverter control method further includes: using a bacterial foraging optimization algorithm to solve an optimal adaptive gain matrix. Figure 3 This is a flow chart of solving the optimal adaptive gain matrix using a bacterial foraging optimization algorithm provided by an embodiment of the present invention. Figure 3 As shown, the steps of using the bacterial foraging optimization algorithm to solve the optimal adaptive gain matrix include:
[0095] S301, constructing a bacterial community according to an adaptive gain matrix.
[0096] Specifically, the adaptive gain matrix Φ d and Φ q It is a fifth-order diagonal matrix, and the initial adaptive gain matrix can be randomly selected according to the control performance.
[0097] S302: Set the absolute value integral of the error variable within a period of time as a fitness function.
[0098] Assume that S bacterial individuals perform movement operations in the interval [min, max] and initialize the colony position P:
[0099] P=max+rand(max,min); (1.16)
[0100] Where: rand∈random(0,1), max and min represent the maximum and minimum values of the initial position of bacteria, respectively, which are determined according to the optimization range of the adaptive gain.
[0101] The main operations performed by bacterial individuals are chemotaxis, reproduction and migration. Let the position of bacterium i be θ i =(x1,x2,…,xn), xn represents the n-th dimension of the position, n represents the position dimension, and the position of bacteria i corresponds to the adaptive gain matrix Φ d and Φ q The elements in , namely:
[0102] θ i =(φ d1 ,φ d2 ,φ d3 ,φ d4 ,φ d5 ,φ q1 ,φ q2 ,φ q3 ,φ q4 ,φ q5 ); (1.17)
[0103] Among them, the adaptive gain matrix Φ d =diag(φ d1 ,φ d2 ,φ d3 ,φ d4 ,φ d5 ), adaptive gain matrix Φ q =diag(φ q1 ,φ q2 ,φ q3 ,φ q4 ,φ q5 ). φ d1 ,φ d2 ,φ d3 ,φ d4 ,φ d5is the adaptive gain matrix Φ d Elements in φ q1 ,φ q2 ,φ q3 ,φ q4 ,φ q5 is the adaptive gain matrix Φ q Elements in .
[0104] The position of bacteria i after the jth chemotaxis from the initial colony position P is:
[0105]
[0106] Where: C(i) and Δ(i) are the chemotactic step length and direction vector of i, respectively. represents the position of bacteria i after the jth chemotaxis, represents the position of bacteria i after the j+1th chemotaxis, Δ T (i) represents the transpose of Δ(i).
[0107] The error variable e within a period of time T after the adaptive gain corresponding to a certain bacterial position is disturbed is calculated. d and e q The absolute value integral of is set as the fitness function of bacteria:
[0108]
[0109] S303: Perform chemotaxis according to the fitness function.
[0110] The aggregation behavior of bacteria i is described as:
[0111]
[0112] Where: and They represent the attraction and repulsion of the bacterial colony, respectively, and are calculated as follows:
[0113]
[0114] Where: d attract and w attract are the longitudinal and transverse components of gravity respectively.
[0115]
[0116] Where: h repellant and w repellant are the longitudinal and transverse components of the repulsive force, x m is the m-th dimension component of the individual, is the m-th dimension component of bacteria i.
[0117] The fitness of an individual can be written as:
[0118] J(θ i )=J e (θ i )+J ar (θ i ); (1.23)
[0119] Among them, J e (θ i ) represents the fitness function of bacteria i, J ar (θ i ) represents the aggregation behavior function of bacteria i.
[0120] S304. Perform reproduction operations based on the total fitness of the individuals.
[0121] Individual i iteration i fin The total fitness after the second time is:
[0122]
[0123] S305, bacterial flora adaptive migration operation.
[0124] According to the descending order of fitness, bacteria with higher fitness are selected for reproduction, thus generating new bacterial colony locations. Bacteria with higher fitness are retained for reproduction. In addition, since the bacterial living environment may change, the movement boundary may also change, necessitating migration. The Bacterial Foraging Optimization (BFO) algorithm has a certain migration probability of a single bacterium, Pm, which is not conducive to the accumulation of bacteria in dominant positions. Here, an improved migration probability algorithm is proposed, whose adaptive migration probability is Pmig(i):
[0125]
[0126] Where: is the highest bacterial fitness, is the fitness of the current bacteria. Through this improved algorithm, bacteria with smaller total fitness are more likely to migrate, thereby increasing the convergence speed and optimization ability of the algorithm.
[0127] S306: Determine whether the dynamic performance reaches a preset value or whether the number of iterations reaches a maximum set value.
[0128] After controlling each bacterial reproduction and migration operation, the next generation of chemotaxis operations is continued until the desired dynamic performance is achieved or the maximum set number of iterations is reached. At this point, the individual position with the maximum fitness can be selected as the optimal adaptive gain matrix. Therefore, if it is determined that the dynamic performance has reached the preset value or the number of iterations has reached the maximum set value, step S307 is executed; if it is determined that the dynamic performance has not reached the preset value or the number of iterations has not reached the maximum set value, the process returns to step S303.
[0129] S307: Select the individual position with the maximum fitness as the optimal adaptive gain matrix.
[0130] The adaptive gain matrix of the conventional MRAC method is obtained through manual trial and error, which is a cumbersome process and cannot determine the optimal value. The embodiment of the present invention obtains the optimal adaptive gain matrix through the BFO algorithm, avoiding the cumbersome process and uncertainty of manual trial and error.
[0131] The proposed model reference adaptive control term requires the first-order derivative of the d-axis output voltage error and the first-order derivative of the q-axis output voltage error, namely and In practice, these derivatives can be calculated directly from the load voltage, but due to high-frequency noise, it is difficult to accurately obtain the derivatives through direct calculation. Therefore, the d-axis output voltage error and the q-axis output voltage error can be discretized to obtain the first-order derivative of the d-axis output voltage error and the first-order derivative of the q-axis output voltage error:
[0132]
[0133] in, is the calculated value of the first-order derivative of the d-axis output voltage error at the current moment, is the calculated value of the first-order derivative of the q-axis output voltage error at the current moment, is the calculated value of the first-order derivative of the d-axis output voltage error at the previous moment, is the calculated value of the first-order derivative of the q-axis output voltage error at the previous moment, T s is the sampling time, C d and C q is the filter constant to limit the sensitivity of this simplified discretization method to noise. Therefore, the time derivative information of the load voltage in the control law can be simply calculated. d >0, C q Far less than 1.
[0134] Figure 4 FIG is a block diagram of a voltage controller based on model reference adaptation provided by an embodiment of the present invention. Figure 4As shown, the voltage controller stabilizes the system error in steady-state through feedback control, while the designed MRAC control term ensures fast system response. Furthermore, the MRAC-based control method does not require any LC parameters or load current sensors or observers to ensure that the output error quickly converges to the exponential trajectory defined by the reference model. A capacitor voltage feedforward compensation term is added to the control input based on the actual mathematical model, further ensuring that the voltage error quickly and accurately tracks the reference model.
[0135] Among them, the voltage reference value V dqr =[v dr ,v qr ] T , output voltage error V dqe =[v de ,v qe ] T , reference model output V dqm =[v dm ,v qm ] T , capacitor voltage V Cdq =[v Cd ,v Cq ] T , the first-order derivative of the output voltage error Inductor current I Ldq =[I Ld ,I Lq ] T , error variable E dq =[e d ,e q ] T .
[0136] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for controlling an inverter, characterized in that: include: Establishing a mathematical model of the inverter in a synchronous rotating coordinate system, and determining an output voltage error amount based on the mathematical model; Establish a reference model of output voltage error; A control law including a feedback control term, a feedforward compensation control term, and a model reference adaptive control term is established based on a first-order derivative of the output voltage error, an output of the reference model, an error variable, a capacitor voltage, and an inductor current of the inverter, so as to decay the error variable to zero; wherein the output voltage error is a difference between an actual output voltage value of the inverter and a voltage reference value, and the error variable is a difference between the output voltage error and an output of the reference model; The step of establishing a control law including a feedback control term, a feedforward compensation control term, and a model reference adaptive control term based on the first-order derivative of the output voltage error, the output of the reference model, the error variable, the capacitor voltage, and the inductor current of the inverter so as to decay the error variable to zero comprises: Define the error variable E dq =[e d ,e q ] T for: According to formula (1.10), the error variable E is obtained dq The second-order derivative of is as follows: According to formula (1.11), the following control law is established: in, e d represents the d-axis error variable, e q represents the q-axis error variable, v de Indicates the d-axis output voltage error, v qe Indicates the q-axis output voltage error, v dm represents the output of the reference model d axis, v qm represents the q-axis output of the reference model; Indicates e d The second derivative of Indicates e q The second-order derivative, k1 = 1 / C, k2 = 1 / L, C is the output capacitance, L is the output inductance, v id is the d-axis control input, v iq is the q-axis control input, Indicates v dm The first derivative of Indicates v qm The first derivative of d is the d-axis control parameter gain, λ q is the q-axis control parameter gain, d d is the dynamic disturbance of the d-axis voltage error, d q is the q-axis voltage error dynamic disturbance; K dq =[K d ,K q ] T is the feedback coefficient, -K d σ d and -K q σ q is the feedback control term, v Cd and v Cq are the d-axis capacitor voltage and the q-axis capacitor voltage, respectively. and is the model reference adaptive control term; Φ d and Φ q is the adaptive gain matrix, Represents the first-order derivative of the d-axis output voltage error, Represents the first-order derivative of the q-axis output voltage error, i Ld is the inductor current of the d-axis in the synchronous rotating coordinate system, i Lq is the inductor current of the q axis in the synchronous rotating coordinate system, Indicates e d The first derivative of Indicates e q The first derivative of h d and h q are the state vectors of the d-axis and q-axis respectively, σ d and σ q are the error dynamic variables of the d-axis and q-axis respectively, and are the update rates of the d-axis and q-axis adaptive parameter vectors, respectively.
2. The inverter control method according to claim 1, characterized in that: The step of establishing a mathematical model of the inverter in a synchronous rotating coordinate system and determining the output voltage error according to the mathematical model includes: The mathematical model of the inverter in the synchronous rotating coordinate system established according to Kirchhoff's voltage theorem and Kirchhoff's current theorem is: Based on v de =v Cd -v dr , v qe =v Cd -v qr , convert formula (1.1) into: Based on x1=v de , x3=v qe , Convert formula (1.2) to: Define the d-axis voltage error dynamic disturbance d d and the q-axis voltage error dynamic disturbance d q The formula is as follows: According to formula (1.3) and formula (1.4), the second-order derivative of the output voltage error is as follows: Where, k1=1 / C, k2=1 / L, C is the output capacitance, L is the output inductance, ω is the angular frequency of the inverter output voltage, i Ld is the inductor current of the d-axis in the synchronous rotating coordinate system, i Lq is the inductor current of the q axis in the synchronous rotating coordinate system, i od is the load current of the d-axis in the synchronous rotating coordinate system, i oq is the load current of the q axis in the synchronous rotating coordinate system, v id is the d-axis control input, v iq is the q-axis control input, v Cd is the d-axis capacitor voltage, v Cq is the q-axis capacitor voltage, for i Ld The first derivative of for i Lq The first derivative of v dr Indicates the d-axis voltage reference value, v qr Indicates the q-axis voltage reference value, v de Indicates the d-axis output voltage error, v qe represents the q-axis output voltage error, x1 represents the d-axis output voltage error, x2 represents the first-order derivative of the d-axis output voltage error, x3 represents the q-axis output voltage error, and x4 represents the first-order derivative of the q-axis output voltage error. Represents the first-order derivative of the d-axis output voltage error, Represents the second-order derivative of the d-axis output voltage error, Represents the first-order derivative of the q-axis output voltage error, Represents the second-order derivative of the q-axis output voltage error, v Cd The first derivative of v Cq The first derivative of is the first-order derivative of the d-axis output voltage error, is the first-order derivative of the q-axis output voltage error.
3. The inverter control method according to claim 1, wherein: The step of establishing a reference model of the output voltage error comprises: Define the following second-order system: According to formula (1.7), the exponential decay form of the reference model is as follows: based on and Convert formula (1.8) to: Among them, λ dq =[λ d ,λ q ] T ,λ dq is the control parameter gain, V dqm =[v dm ,v qm ] T , V dqm is the reference model output, v dm represents the output of the reference model d axis, v dm represents the output of the reference model d axis, v qm represents the reference model q-axis output, Indicates v dm The first derivative of Indicates v qm The first derivative of Indicates v dm The second derivative of Indicates v qm The second derivative of d is the d-axis control parameter gain, λ q is the q-axis control parameter gain; v dm (t) represents the exponential function of the output of the reference model d axis, v qm (t) represents the exponential function of the output of the reference model d axis, v dm (0) represents the initial value of the d-axis output of the reference model, v qm (0) The initial value of the reference model q-axis output, represents the initial value of the first-order derivative of the d-axis output of the reference model, represents the initial value of the first-order derivative of the d-axis output of the reference model, and t represents time.
4. The inverter control method according to claim 3, characterized in that: l d =λ q =10 4 ,v dm (0)=v qm (0) = 10.
5. The inverter control method according to claim 1, wherein: The inverter control method further includes: The bacterial foraging optimization algorithm is used to solve the optimal adaptive gain matrix.
6. The inverter control method according to claim 5, characterized in that: The step of using the bacterial foraging optimization algorithm to solve the optimal adaptive gain matrix includes: constructing a bacterial community according to the adaptive gain matrix; The absolute value integral of the error variable over a period of time is set as a fitness function; performing chemotaxis according to the fitness function; Perform reproduction operations based on the total fitness of individuals; Adaptive migration of bacterial flora; Determine whether the dynamic performance reaches a preset value or whether the number of iterations reaches a maximum set value; If the dynamic performance reaches a preset value or the number of iterations reaches a maximum set value, the individual position with the maximum fitness is selected as the optimal adaptive gain matrix.
7. The inverter control method according to claim 1, characterized in that: The d-axis output voltage error and the q-axis output voltage error are discretized to obtain a first-order derivative of the d-axis output voltage error and a first-order derivative of the q-axis output voltage error.
8. The inverter control method according to claim 1, characterized in that: The feedback coefficient K is adjusted using the parameter adjustment rule of the proportional differential method. dq =[K d ,K q ] T Perform tuning.
9. The inverter control method according to claim 1, characterized in that: The inverter is an LC voltage type inverter.