Background
With the heavy use of power electronic devices and nonlinear load electrical equipment, an increasingly serious harmonic pollution problem is caused. The accurate element model is the basis of the accurate harmonic analysis of the power system, and the harmonic modeling work of the synchronous motor, the transformer and the power transmission line is greatly advanced, such as a generalized d-q axis model modeling method of the permanent magnet synchronous motor based on finite elements, an active harmonic model of the transformer and the like. Harmonic modeling studies of loads have been relatively immature. In the current simulation calculation of the power system, the used load model is simple and is only a load model with a single structure, and the load model, together with the accurate generator, transmission line and transformer model, can seriously affect the analysis accuracy of the harmonic waves of the power system and become the bottleneck of improving the accuracy in the simulation calculation of the whole power system.
The main problems with current load modeling are: the model established by certain load point data is suitable for analysis of the point, but the model has certain particularity, and when the model is popularized to other load points, certain errors can be generated, and even wrong conclusions can be generated. Secondly, at present, a large amount of loads in a power grid are modeled, and no circuit theory of the system can be followed. The load is influenced by factors such as time, climate and season, the load characteristics can change along with the time, and the load presents larger time variation and randomness, so that great difficulty is brought to the modeling of the power load. And fourthly, under the condition of variable structure characteristics and variable structure loads of the power system, the load characteristics change discontinuously or even suddenly. The existing single structure load model can not accurately describe the variable structure characteristics of the power load, and the actual measurement data is very difficult to obtain.
In theory, a general harmonic load model could consist of a simple R, C, L parallel circuit with the addition of a harmonic current source. The current common method for load modeling is to identify parameters of a general model by using a time domain state estimation technology. However, this method cannot eliminate noise interference in the sampled data, and the accuracy of identifying the parameters is poor. Namely, the voltage and current waveforms obtained after data processing are used for parameter identification of the general model, and the precision still cannot meet the actual requirement.
In order to create favorable conditions for improving the harmonic analysis precision, the invention provides a method for carrying out single-phase load harmonic modeling according to voltage and current sampling data by combining a PLS algorithm and an SVM algorithm. On the basis of the PLS method, the invention eliminates the mutual influence of input quantities through space mapping and reduces the dimension of input variables. The problem of collinearity of common least square regression is solved by utilizing orthogonal characteristic projection, and the limitation of linear and nonlinear conditions of load modeling is solved. When the feature vector is selected, the interpretation and prediction effects of the input on the output are emphasized, regression useless noise is removed, and the model contains the minimum number of variables. Therefore, the load parameters are quickly identified, and a single-phase harmonic load model with good general performance and high accuracy is established.
The input variables processed by the PLS method are used as a training set for SVM regression modeling, so that the model has the best robustness and the capability of quickly and accurately identifying the load parameters.
The main idea of PLS is to find the best functional match for a set of data by minimizing the sum of the squares of the errors. The simplest method is used to obtain some unknowable truth values, and the sum of the squares of the errors is minimized. Compared with the traditional multiple linear regression model, the method is characterized in that regression modeling can be carried out under the condition that independent variables have serious multiple correlation; allowing regression modeling to be performed under the condition that the number of sample points is less than the number of variables; all the original independent variables are contained in the final model; it is easier to distinguish system information from noise (even some non-random noise).
In order to study the statistical relationship between the dependent variable and the independent variable, n sample observation points are taken, and a data table of the independent variable and the dependent variable is formed by taking X as { X ═ X1,x2,…,xp}n×pAnd Y ═ Y1,y2,…,y3}n×pProjecting independent variable and dependent variable to new space w1,w2,…,wkAnd { c }and1,c2,…,chFormation of a new component on (t)1,t2,…,th}n×hAnd { u1,u2,…,uh}n×hThese new feature vectors not only eliminate the mutual influence, but also have a greatly reduced dimension.
The main idea of SVM is two-fold: (1) constructing an optimal segmentation hyperplane in a feature space based on a structural risk minimization theory, so that a learner obtains global optimization; (2) for the linear inseparable condition, the linear inseparable sample of the low-dimensional input space is converted into the high-dimensional feature space by using the nonlinear mapping algorithm, so that the high-dimensional feature space can be linearly analyzed by adopting the linear algorithm to the nonlinear feature of the sample.
Therefore, the load model is established according to the influence of the harmonic waves on the load, the load model algorithm is improved, the precision and the universality of the load model are improved, and the method has very important significance for improving the harmonic wave analysis precision and calculating the harmonic wave load flow of the power system.
Disclosure of Invention
In order to solve the above problems, the present invention provides a general single-phase harmonic load modeling method based on partial least squares-support vector machine PLS-SVM, the method comprising:
obtaining a voltage and current trigonometric function expression by carrying out Fast Fourier Transform (FFT) on the voltage and load current recording data;
converting the voltage-current trigonometric function expression into a matrix form of Y ═ ZX + mu, and thus establishing a basic load harmonic model;
respectively carrying out standardization processing on the bus voltage matrix X and the load current matrix Y to obtain data X0And data Y0;
For the data X0And data Y0Performing at least one partial least squares regression PLS principal component extraction to obtain tmAnd umCovariance of (c) Cov (t)m,um) Maximum, resulting in training set sample data { Xm(t),Ym(t)};
Selecting kernel function to sample data { X ] of the training setm(t),Ym(t) carrying out Support Vector Machine (SVM) algorithm analysis and establishing a Lagrangian optimization objective function and a Lagrangian equation; and
and solving the constraint factor parameter alpha and the load parameter matrix Z of the Lagrange problem to establish a universal single-phase harmonic load model and quickly identify the load parameters.
Preferably, the total current flowing through the load in the universal single-phase harmonic load model is represented by a current i representing the linear load portionRCL(t) and a current i representing the nonlinear load portiong(t) two parts; wherein, the current iRCL(t) Current i including R, C and L elements respectively corresponding toR(t)、iC(t) and iL(t) the relationship between them is:
i(t)=iR(t)+iC(t)+iL(t)+ig(t)。
preferably, where i (t) can be measured using parameters R, C, L and ig(t) and deriving both sides, and then ig(t) is expressed as a Fourier series expansion form:
wherein A ishAnd BhCurrents i being harmonics, respectivelyg(t) amplitudes of cosine and sine components in the form of a fourier series;
and expanding the bus voltage and the load current into a Fourier series form:
where N is the highest harmonic order considered; u shapehAnd IhThe amplitudes of the h-th harmonic voltage and current are respectively; alpha is alphahAnd betahThe initial phases of the h-th harmonic voltage and current, respectively.
Preferably wherein in said matrix form Y ═ ZX + μ
Wherein X is a bus voltage matrix, Y is a load current matrix, Z is a load parameter matrix, and mu is a measurement noise vector.
Preferably, wherein the normalization matrix of Y is Y in the normalization process0Denotes u1Is Y0The first principal component of (a), u1=Y0c1,c1Is Y0Is a unit vector, i.e. | | c 11, |; x for normalization matrix of independent variable X0Denotes, t1Is the first principal component of X, t1 ═ X0k1,k1Is X0Is also a unit vector, i.e. | | k1||=1。
Preferably, the mth main component extraction value is:
wherein, Xm-1Is a normalized training set matrix extracted at the m-1 st time of the variable X; y ism-1Is a normalized training set matrix extracted at the m-1 th time of the variable Y; xmIs the normalized training set matrix of the mth extraction of variable X; y ismIs the normalized training set matrix extracted the m-th time of the variable Y; t is tmIs the mth principal component of X; p is a radical ofmIs the regression coefficient of matrix X; r ismAre the regression coefficients of matrix Y.
Preferably, the radial basis function RBF is selected as a kernel function of the SVM.
Preferably, wherein the Lagrangian optimization objective function is such that
Satisfies the relation y
m(t)=Zx
m(t)+μ+ξ;
Wherein, C is a penalty factor, and the value of C determines the generalization ability of the model; and xi is the fitting error.
Preferably, the lagrangian equation is finally obtained by analyzing the karo-kun-tower KKT condition:
substituting the matrix alpha into the load parameter matrix Z to establish a universal single-phase harmonic load model:
the invention has the beneficial effects that:
the invention combines PLS and SVM algorithm to construct the model of single-phase universal load under the harmonic condition, and the model is suitable for linear and nonlinear conditions and various types of loads, and has good universality and high accuracy.
Detailed Description
The exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, however, the present invention may be embodied in many different forms and is not limited to the embodiments described herein, which are provided for complete and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the accompanying drawings is not intended to be limiting of the invention. In the drawings, the same units/elements are denoted by the same reference numerals.
Unless otherwise defined, terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Further, it will be understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense.
The technical scheme adopted by the invention is a PLS-SVM-based general single-phase load harmonic modeling method, and a method for performing single-phase load harmonic modeling by using voltage and current sampling data is provided by combining a PLS algorithm and an SVM algorithm; on the basis of the PLS method, the invention eliminates the mutual influence of input quantities through space mapping, overcomes the problem of collinearity of common least square regression by utilizing orthogonal characteristic projection, and solves the limitation of linear and nonlinear conditions of load modeling. When the feature vector is selected, the interpretation and prediction effects of the input on the output are emphasized, regression useless noise is removed, and the model contains the minimum number of variables. The method can quickly identify the load parameters and establish a single-phase harmonic load model with good general performance and high accuracy.
Fig. 1 is a schematic structural diagram for establishing a general single-phase harmonic load model. R, C, L shows the lumped effect of the resistive, capacitive and inductive components of the load, respectively, and the linear load of the power load at the harmonic, and its value is the equivalent parameter of the harmonic, but not the equivalent parameter of the resistive, capacitive and inductive components at the fundamental, as shown in fig. 1; i.e. ig(t) represents a nonlinear load portion in the electric load. The non-linearity of the load is the main cause of harmonic generation, but harmonic generationThe nonlinear characteristic of the load is generated, and the harmonic waves are coupled into the system through electromagnetic induction, electrostatic induction and conduction, so that the system voltage and current are distorted, and the distortion also has an influence on the nonlinear load. The total current flowing through the load in the universal single-phase harmonic load model is represented by the current i of the linear load partRCL(t) and a current i representing the nonlinear load portiong(t) two parts; wherein, the current iRCL(t) Current i including R, C and L elements respectively corresponding toR(t)、iC(t) and iL(t) the relationship between them is:
i(t)=iR(t)+iC(t)+iL(t)+ig(t) (1)
FIG. 2 is a flow chart of a PLS-SVM based general single-phase harmonic load modeling method 200 according to an embodiment of the present invention. As shown in fig. 2, the generic single-phase harmonic load modeling method 200 in PLS-SVM starts with step 201, and in step 201, the voltage and load current recording data is subjected to fast fourier transform FFT to obtain a voltage-current trigonometric function expression. Preferably, where i (t) can be measured using parameters R, C, L and ig(t) represents:
then, the two sides are derived to obtain:
and will ig(t) is expressed as a Fourier series expansion form:
wherein A ishAnd BhCurrents i being harmonics, respectivelyg(t) amplitudes of cosine and sine components in the form of a fourier series;
and expanding the bus voltage and the load current into a Fourier series form:
where N is the highest harmonic order considered; u shapehAnd IhThe amplitudes of the h-th harmonic voltage and current are respectively; alpha is alphahAnd betahThe initial phases of the h-th harmonic voltage and current, respectively.
Preferably, the voltage-current trigonometric function expression is converted to a matrix form of Y ═ ZX + μ in step 202, thereby establishing a base load harmonic model. Preferably wherein in said matrix form Y ═ ZX + μ
Wherein X is a bus voltage matrix, Y is a load current matrix, Z is a load parameter matrix, and mu is a measurement noise vector.
Preferably, in step 203, the bus voltage matrix X and the load current matrix Y are respectively normalized to obtain data X0And data Y0. Preferably, wherein the normalization matrix of Y is Y in the normalization process0Denotes u1Is Y0The first principal component of (a), u1=Y0c1,c1Is Y0Is a unit vector, i.e. | | c 11, |; x for normalization matrix of independent variable X0Denotes, t1Is the first principal component of X, t1 ═ X0k1,k1Is X0Is also a unit vector, i.e. | | k1||=1。
Preferably, the data X is processed in step 2040And data Y0Performing at least one partial least squares regression PLS principal component extraction to obtain tmAnd umCovariance of (c) Cov (t)m,um) Maximum, resulting in training set sample data { Xm(t),Ym(t)}。
Extracting a first principal component t1And u1In order to represent the data variation information in X and Y well, Var (t) should be present according to the principle of principal component analysis1) And Var (u)1) Are all maximum values. Regression modeling, on the other hand, requires a pair of t1And u1Has the maximum interpretation ability, and t is known from typical correlation analysis1And u1The correlation should be at a maximum, i.e. r (t)1,u1) A maximum value is reached. The objective function of partial least squares regression PLS is the requirement t1And u1Covariance Cov (t)1,u1) At a maximum, i.e.
At the maximum, so there are:
wherein, theta2Is an objective function, requiring a maximum value; k is a radical of1And c1Respectively corresponding to two matrixesUnit eigenvectors of large eigenvalues. From Y0Extract u1,u1=Y0c1,||c 11. From X0Extract of (i) t1 ═ X0k1,||k 11. Due to Y0Is only a variable, so c1 is a constant. And because | | c 11, so c 11, has u1=Y0。
Obtained according to the formula (11):
since X0 and Y0 are both unit vectors, there are:
whereby X0And Y0For t1The regression relationship is as follows:
wherein p1 and r1 are regression coefficients; e1 and F1 are residual matrices. Then, the second step is carried out, E1 and F1 are used for replacing E0 and F0 respectively to continue the process, and the extraction value of the mth main component is obtained as follows:
preferably, the mth main component extraction value is:
wherein, Xm-1Is a normalized training set matrix extracted at the m-1 st time of the variable X; y ism-1Is a normalized training set matrix extracted at the m-1 th time of the variable Y; xmIs the normalized training set matrix of the mth extraction of variable X; y ismIs the normalized training set matrix extracted the m-th time of the variable Y; t is tmIs the mth principal component of X; p is a radical ofmIs the regression coefficient of matrix X; r ismAre the regression coefficients of matrix Y.
Preferably, kernel functions are selected in step 205 for the training set sample data { X }m(t),Ym(t) carrying out Support Vector Machine (SVM) algorithm analysis and establishing a Lagrangian optimization objective function and a Lagrangian equation. Preferably, the radial basis function RBF is selected as a kernel function of the SVM. The invention selects a Radial Basis Function (RBF), i.e. some kind of radially symmetric scalar Function, as the kernel Function of the SVM. The method is defined as a monotonic function of Euclidean distance between any point x in the space and converts the low-dimensional linear inseparable space into a high-dimensional space to realize linear separability. The maximum classification interval is then found in this high dimensional space.
And a Gaussian radial basis kernel function of
K(x,x')=exp(-||x-x'||2/σ2) (17)
The error is defined here as follows:
wherein, S-VI is the total apparent power of the load; sRLC=VIRLCAn apparent power of R, L, C; v, I, IRCLRespectively, the effective value of the load voltage, the effective value of the load current and the effective value of the total current flowing through R, L, C. The closer the value of ε is to 0, the more SRCLThe closer to S, the accuracyThe higher.
Therefore, assuming that the mth principal component of the sample data is extracted to obtain a training set, the mathematical model shown in equation (18) is satisfied within the precision epsilon, that is:
|Y-ZX-μ|≤ε (19)
the optimization target of formula (19) is to minimize ZTAnd better popularization capability can be obtained when the ratio is Z/2.
Preferably, wherein the Lagrangian optimization objective function is such that
ym(t)=Zxm(t)+μ+ξ。 (20)
Wherein, C is a penalty factor, and the value of C determines the generalization ability of the model; and xi is the fitting error.
Preferably, wherein the lagrangian equation is:
preferably, the constraint factor parameter α and the load parameter matrix Z of the lagrangian problem are solved in step 206 to establish a general single-phase harmonic load model and quickly identify load parameters. Preferably, by Karoker-Kuhn-Tak KKT (Karush-Kuhn-Tucker) conditions
Analyzing the Lagrange equation to obtain:
Zxm(t)+ξ=ym(t)-μ (23)
bringing formula (22) into formula (23) to eliminate Z, ξ, and defining F as an intermediate variable calculated during the elimination process, and
the optimization problem (20) is then transformed to solve the following equation:
wherein y ism=[ym(1),…,ym(N)]T
E=[1,…,1]T
μ=[μ(1),…,μ(N)]T
Solving the above function α and substituting it into equation (22) allows the load parameter matrix Z to be solved and the load parameter values to be quickly identified.
Fig. 3 is a circuit diagram of an example of a generic single-phase harmonic load modeling method based on PLS-SVM according to an embodiment of the present invention. A Matlab/Simulink schematic model as shown in fig. 3. The frequency was 60 Hz. The Voltage Source AC Voltage Source is the system Voltage with a value of
AC Voltage Source 1 is the harmonic Voltage effect in the system, with a value of
So that the system voltage is
The resistance value of the known system load is 2 omega, and the capacitance is 3 multiplied by 10
-4F, inductance 7X 10
-3H。
The load current values were found by powergui analysis to be:
i(t)=0.4656sin(ωt-133.5°)+0.2477sin(3ωt+73.4°)
and taking u (t), i (t) in the calculation example as known quantities, and identifying the load parameter values under the harmonic conditions. Through a flow chart, a harmonic load model parameter identification program of the PLS-SVM is established, and the following table 1 is obtained through identification.
TABLE 1 comparison of actual value of circuit load with identification value
The feasibility and the practicability of the algorithm can be illustrated by the result.
The invention has been described with reference to a few embodiments. However, other embodiments of the invention than the one disclosed above are equally possible within the scope of the invention, as would be apparent to a person skilled in the art from the appended patent claims.
Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a/an/the [ device, component, etc ]" are to be interpreted openly as referring to at least one instance of said device, component, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated.