Summary of the invention
Technical problem underlying to be solved by this invention is to provide a kind of mains by harmonics current signal tracking and controlling method, main
To be compensated smith prediction device by π to form with PI controller parameter being optimized by PSO-BP neutral net.π compensates smith
Prediction device makes during system delay from the closed loop internal conversion controlled to outside, thus reduces the shadow controlling delay on system
Ring.
In order to solve above-mentioned technical problem, the invention provides a kind of mains by harmonics current signal tracking and controlling method,
Including following sequential steps:
1) by harmonic current i in electrical networkhThrough 1/G0It is changed into harmonic voltage signal Uh;Described G0Input for inverter
Electric current icWith output voltage UcBetween transmission function;
2) with described harmonic voltage signal UhFor controlling target, by described harmonic voltage signal UhImproved Smith is pre-
Estimate device and inverter;The Smith predictor of described improvement includes that the PI being optimized parameter by PSO-BP neutral net controls
Device and a π compensate Smith predictor;And meet following relational expression:
Wherein, UeFor harmonic voltage signal UhWith inverter output voltage UcDifference;It is respectively PSO-
Inverter transmission function after transmission function, the identification of the PI controller of BP Neural Network Optimization;D is amount of transition;U is PI control
Device output voltage signal;
Thus the output voltage U of inverter can be obtainedcWith harmonic voltage signal UhTransmission function between the two is:
The described algorithm flow by the PI controller of PSO-BP Neural Network Optimization is as follows:
1) according to the carrying out practically state of the Active Power Filter-APF of pouring-in mixing, in conjunction with neutral net input, output
Sample set, sets up the forecast model of neutral net, and connection weights all of between neuron become real number vector with threshold coding
Represent the individual particles in population;
2) initial position of particle, speed, inertia coeffeicent w, Studying factors c are initialized1、c2With c '1、c′2, it is stipulated that maximum
Iterations;
3) according to input, output sample, the forwards algorithms of BP network is utilized
Δ u (t)=kp(ue(t)-ue(t-1))+kiue(t)
And particle cluster algorithm optimizing error function
Calculate each particle fitness function value, and using the desired positions of each particle as its history optimum position,
Start iteration;
Wherein, parameter k in the most corresponding PI controller of output nodep、ki;
4) 4 iterative formulas of PSO-BP algorithm are utilized
Δwij(t)=(w-1) (wij(t)-wij(t-1))+r′1c′1(wij(b)-wij(t))+r′2c22(wij(B)-wij
(t))
Δwli(t)=(w-1) (wli(t)-wli(t-1))+r1c1(wli(b)-wli(t))+r2c2(wli(B)-wli(t))
In formula, w is inertia coeffeicent, r1、r2With r '1、r′2For the random number of 0-1, b is that particle itself is found the most at present
The node of excellent solution, is referred to as individual extreme point, and B is the node of the optimal solution that whole population is found at present, referred to as global extremum point;
Sgn (x) is sign function, and β is Learning Step;
Speed and position to particle are updated, and search out particle optimum position.
When inspection meets the error requirements that termination condition, current location or maximum iteration time reach predetermined, then stop repeatedly
Generation, the final weights of output nerve network and threshold value, i.e. parameter k of PI controllerp、ki;
Inverter transmission function after identificationExpression formula is as follows:
The transmission function of the PI controller of described PSO-BP Neural Network OptimizationExpression formula is as follows:
Wherein, kpFor controller gain, TiFor controller time of integration.
Thus obtain:
The optimal culminating paint equation of second order with ITAE as criterion is
Wherein, wnFor the frequency of undamped oscillation, ξ is damping ratio;Selected wnEngineering method be according to required closed loop
T transit time of responser, have:
The mathematic(al) representation between parameter in the transmission function of inverter and PI controller can be obtained, for:
Compared to prior art, technical scheme possesses following beneficial effect:
A kind of based on compensation of delay the mains by harmonics current signal tracking and controlling method that the present invention provides, is mainly mended by π
Repay smith prediction device to form with PI controller parameter being optimized by PSO-BP neutral net.π compensates smith prediction device
Make during system delay from the closed loop internal conversion controlled to outside, thus reduce the impact controlling delay on system.Pass through
PSO-BP algorithm is optimized process to PI controller parameter.By ITAE criterion set up smith prediction device and PI control parameter it
Between mathematic(al) representation, thus the method for relation and Neural Network Optimization obtains the optimized parameter of two kinds of controllers.Finally to this
The method that literary composition proposes has carried out simulating, verifying, and simulation result shows that context of methods has more preferable dynamic response compared with traditional method
Characteristic and higher stable state compensation precision.
Detailed description of the invention
Below in conjunction with drawings and Examples, the present invention is described in further detail.
IHAPF structure is as it is shown in figure 1, mainly by reactive-load compensation capacitor, first-harmonic resonance branch road, voltage source inverter, no
Controlled rectification circuits etc. form.
The harmonic wave one phase equivalent circuit of IHAPF as shown in Figure 2, load is counted as harmonic current source ih, uc、icIt is respectively
The output voltage of inverter and input current, isFor harmonic current in electrical network.
In order to the harmonic current in Fig. 2 is filtered, can be by the output electric current i in invertercControl is:
ic=-ih (1)
Then have
is=0 (2)
Traditional current control method is as it is shown on figure 3, wherein G0For icWith ucBetween transmission function, controller use pass
The PI control method of system is controlled.
By Fig. 2, transmit function G0It is represented by:
Convolution (1), (2), (3) can obtain:
uc=-uh (4)
Wherein uhHarmonic current i for loadhThrough transmission function 1/G0The voltage signal harmonic voltage letter of output
Number.
Due to transmission function G0Exponent number is higher, and in POLE PLACEMENT USING, ratio is relatively difficult to achieve.Therefore herein in conjunction with (4) formula by harmonic wave
Voltage signal is as controlling target, and have impact on current follow-up control, then in view of there is time delay phenomenon in IHAPF system
Actual voltage signal tracing control block diagram is as shown in Figure 4.
In Fig. 4, uc、-uhBetween transmission function be:
In formula, γ is the control time delay of IHAPF system, GcS () is transmission function, GpS () is the transmission of voltage source inverter
Function.Be can be seen that by formula (5) and contain time delay item in equation, the stability of system can be made by this time delay item with control performance
Become impact.
Therefore, the present embodiment can produce impact for time delay to the control of IHAPF system, it is proposed that a kind of based on improvement
Smith predictor current compensation scheme.Control block diagram is as it is shown in figure 5, the Smith predictor improved is mainly neural by PSO-BP
PI controller and a π that parameter is optimized by network compensate Smith predictor composition.
Following relational expression can be obtained by Fig. 5:
Comprehensively (6) formula, can simplify:
Can be obtained fom the above equation:
Thus the output voltage u of inverter can be obtainedcWith reference voltage signal uhTransmission function between the two is:
As can be seen from the above equation, in the characteristic equation of closed loop system, neither comprise e-γsThe most do not comprise e-πs, illustrate that this is
System can effectively eliminate the harmful effect that delay on system causes.And have e at above formula molecular moiety-πs, show ucCompare uhDelayed
π, thus, opposite polarity equal in magnitude with the voltage signal of harmonic wave, serve the control effect of formula (4).
PSO-BP neutral net essence is through improving the population function of search of particle cluster algorithm to BP neutral net
Weights configure with threshold value so that it is reach optimum.
This algorithm has adaptive learning, Serial Distribution Processing and the feature such as stronger robustness and fault-tolerance, and has
There are more preferable convergence rate and generalization ability, prevent it to be absorbed in local optimum, optimize PI controller parameter than traditional method
Having and preferably control effect, therefore, herein according to the carrying out practically state of IHAPF, the input layer selecting neutral net is 3
Node, hidden layer is 5 nodes, and output layer is 2 nodes.
The input layer input of network is:
3 nodes of input layer correspond respectively to the instruction harmonic voltage u in IHAPE systemh, inverter actual output voltage
ucAnd difference u between the twoe, x(1)T () is input layer sample set, t is the frequency of training of network, also referred to as learning gain, under
It literary composition is also this implication.
The input of network hidden layer and being output as
WhereinFor the connection weights of input layer to hidden layer, net(2)T () is that hidden layer inputs sample set, O(2)(t) be
Hidden layer output sample set, f (x) is excitation function, and the Sigmoid function of employing Symmetrical is:
In like manner, the input of network output layer and being output as:
WhereinFor the connection weights of hidden layer to output layer, net(3)T () is that output layer inputs sample set, O(3)(t) be
Output exports sample set layer by layer, and g (x) is excitation function, and the Sigmoid function of employing non-negative is:
Parameter k in formula, in the most corresponding PI controller of output nodep、ki;
The control of PI controller is output as
Δ u (t)=kp(ue(t)-ue(t-1))+kiue(t) (16)
Wherein ue=-uh-uc。
Particle cluster algorithm optimizing error function is
Herein on the basis of traditional BP algorithm, introduce particle cluster algorithm and network weight adjustment is improved,
Make PI controller parameter k eventuallyp、kiDetermination optimized.Input layer is to hidden layer and hidden layer to the network weight of output layer
The correction of value is respectively as follows:
Δwij(t)=(w-1) (wij(t)-wij(t-1))+r′1c′1(wij(b)-wij(t))+r′2c′2(wij(B)-wij
(t)) (18)
Δwli(t)=(w-1) (wli(t)-wli(t-1))+r1c1(wli(b)-wli(t))+r2c2(wli(B)-wli(t)) (19)
In formula, w is inertia coeffeicent, c1、c2With c '1、c′2For group cognition coefficient, also referred to as Studying factors, r1、r2And r
′1、r′2For the random number of 0-1, b is the node of the optimal solution that particle itself is found at present, is referred to as individual extreme point, and B is whole
The node of the optimal solution that population is found at present, referred to as global extremum point.
Traditional BP algorithm uses error back propagation to adjust connection weights, is modified according to gradient descent method, at this
Convolution (18), (19) on the basis of algorithm, i.e. obtain PSO-BP modified weight algorithm:
WhereinSgn (x) is sign function, and β is Learning Step.
Whereinβ is Learning Step.
The algorithm flow of modified model PSO-BP Neural Network Optimization PI controller is as follows:
Carrying out practically state according to IHAPF, in conjunction with neutral net input, output sample set, sets up the pre-of neutral net
Survey model, connection weights all of between neuron are become with threshold coding the individual particles in real number vector representation population.
Initialize the initial position of particle, speed, inertia coeffeicent w, Studying factors c1、c2With c '1、c′2, it is stipulated that maximum is repeatedly
Generation number etc..
According to input, output sample, utilize forwards algorithms (16) and the particle cluster algorithm optimizing error function of BP network
(17) calculate each particle fitness function value, and using the desired positions of each particle as its history optimum position, start
Iteration.
Utilize 4 iterative formulas (18) of PSO-BP algorithm, (19), (20), (21) formula that speed and the position of particle are entered
Row updates, and searches out particle optimum position.
When inspection meets the error requirements that termination condition, current location or maximum iteration time reach predetermined, then stop repeatedly
Generation, the final weights of output nerve network and threshold value, i.e. parameter k of PI controllerp、ki, otherwise go to 3 execution.
It is unknowable that π compensates smith prediction device parameter, utilizes ITAE criterion to set up π herein and compensates smith prediction device ginseng
Relational expression between number and PI controller parameter, thus realize effective identification of parameter.
Expression formula is obtained after voltage source inverter is modeled:
In formula, kinvFor transmitting the process gain constant of function, TinvFor inertia constant.
Because of the time delay of IHAPF, the transmission function of controlled device is:
Herein by improve PSO-BP neural net method optimization process PI controller parameter, obtain improved after PI
Controller transfer function, expression formula is as follows:
Wherein, kpFor controller gain, TiFor controller time of integration.
It is updated in formula (9) to obtain by formula (23), (24):
The optimal culminating paint equation of second order with ITAE as criterion is
Wherein, wnFor the frequency of undamped oscillation, ξ is damping ratio.Wherein select wnEngineering method [11] be according to being wanted
T transit time of the closed loop response askedr, have:
The number between parameter can be obtained in the transmission function of inverter and PI controller by contrast (25) and (26)
Learn expression formula, for:
The design parameter size of voltage source inverter can be obtained by formula (28), (29), thus realize smith prediction device
The identification of model.
In order to verify the effectiveness of institute's extracting method herein, methods herein it is applied in IHAPF system and is imitated
True analysis, and carried algorithm and traditional PI algorithm herein are carried out simulation comparison, simulation parameter is: supply voltage is AC380V/
50HZ;
Equivalent inductance Ls=1mH;Inject electric capacity CF=100 μ F;The inductance L of first-harmonic branch road1=40mH, electric capacity C1=249 μ
F, quality factor q=50;Output inductor L0=0.5mH, output filter capacitor C0=24.1 μ F, equivalent resistance R0=0.09
Ω.Parameter in PSO-BP algorithm is: weighter factor w=0.4, c=0.03, L=0.03, c1=c2=2, c '1=c '2=
1.4。
Current simulations waveform under distinct methods is used for load, as can be seen from the figure when 1s when Fig. 6-7 changes
Load changes, and under traditional PI control method, electric current could slowly tend towards stability through 3.5 time cycles.And use
Only need 1.5 time cycle current waveforms just can tend towards stability under methods herein.
In order to prove the effectiveness of carried algorithm herein further, carry out Related Experimental Study.Fig. 8-9 is for using herein
Algorithm is to the current waveform figure before and after current compensation, and the waveform after administering as seen from the figure has had before comparing improvement and carries the most greatly
Height, waveform is nearly close to sinusoidal wave form.
The above, the only present invention preferably detailed description of the invention, but protection scope of the present invention is not limited thereto,
Any those familiar with the art in the technical scope that the invention discloses, the change that can readily occur in or replacement,
All should contain within protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims
It is as the criterion.