The content of the invention
The technical problems to be solved by the invention are to provide one kind can make PID controller parameter adjust to setting the goal
The micro-capacitance sensor alternating current-direct current section transverter pid parameter optimization method based on grey wolf algorithm of lower optimal value.
The technical solution adopted in the present invention is:A kind of micro-capacitance sensor alternating current-direct current section transverter PID based on grey wolf algorithm
Parameter optimization method, comprises the following steps:
1) number of wolf, maximum iteration, required problem dimension and pid parameter variable-value model in setting wolf pack
Enclose, initialization wolf pack position;
2) counting how many times, the corresponding model objective function value of adjusting in every wolf position of calculating, i.e., micro- electricity are iterated
The target function value of net alternating current-direct current section transverter PID control effect;
3) according to model objective function value of adjusting, wolf pack is divided into α, β, δ, ω, wherein, α wolves are that PID effects are optimal
Wolf, β wolves are the wolf of PID effect suboptimums, and δ wolves are the excellent wolf of PID effects the 3rd, and ω wolves are remaining wolf;
4) the corresponding testing model target function value in α wolves position, i.e. micro-capacitance sensor alternating current-direct current section transverter is calculated to increase
The target function value of the PID control effect after scrambling is dynamic;
5) whether testing model PID control effect is judged continuous V times without improvement, if so, then stopping iteration, performs step
8) step 6, otherwise, is performed), described V is more than or equal to 6;
6) to representing the wolf pack location updating of pid parameter;
7) judge that whether current iteration number of times reaches the maximum iteration of setting, if reaching, stops iteration, perform step
It is rapid 8), otherwise, return to step 2);
8) output α wolves position, i.e. micro-capacitance sensor alternating current-direct current section transverter global optimum pid parameter value.
Step 2) described in model of adjusting be micro-capacitance sensor alternating current-direct current section transverter, wherein, Converter DC-side is for always
Stream power supply, AC is connected to AC power supply by a LCL filtering;Control module is divided into inner ring control and outer shroud control, altogether
There are the first PID controller, the second PID controller, the 3rd PID controller and the 4th PID controller;First PID controller and
Two PID controllers constitute outer shroud control, are control AC and DC voltage, the 3rd PID controller and the 4th PID controller
Inner ring control is constituted, is the amplitude and phase angle for controlling wave filter output capacitance voltage;DC voltage and alternating voltage respectively through
First PID controller and the second PID controller obtain capacitance voltage angle reference signal and the reference of capacitance voltage amplitude signal;Survey
Make the difference and be input to the 3rd PID controller and the 4th PID control with reference signal after the capacitance voltage for measuring is fourier transformed
Device;The output of the 3rd PID controller and the 4th PID controller is output as modulated signal after coordinate transform and produces transverter triggering
Pulse is to transverter.
Step 2) described in model objective function of adjusting for ITAE+ISE, i.e. J=∫ t | e (t) |+e (t)2Dt, wherein, J is
Adjust model objective function value, e (t) is controlled quentity controlled variable deviation, and t is the time.
Step 4) described in testing model be on the basis of model of adjusting, in the output signal of the 3rd PID controller (3)
One disturbing signal of step of middle increase.
Step 4) described in testing model object function be ITAE+ISE, i.e. J=∫ t | e (t) |+e (t)2Dt, wherein, J is
Adjust model objective function value, e (t) is controlled quentity controlled variable deviation, and t is the time.
Step 6) described in renewal include:
(1) distance before each wolf updates with α, β, δ wolf respectively is asked for, specific formula is:
Dα(t)=C1Xα(t)-X(t)
Dβ(t)=C2Xβ(t)-X(t)
Dδ(t)=C3Xδ(t)-X(t)
C=diag (2r1)
Wherein, Xα(t)、Xβ(t)、XδT () is the position before α, β, δ wolf update, X (t) is the position before all wolves update,
I.e. current pid parameter value, Dα、Dβ、DδTo consider to obtain each wolf position with α, β, δ wolf place under certain randomness
The distance of position, C is random coefficient, r1It is that equally distributed stochastic variable is obeyed on 0 to 1;
(2) location updating, specific formula are carried out with the distance of α, β, δ wolf according to each wolf respectively:
X1(t+1)=Xα(t)-A1Dα(t)
X2(t+1)=Xβ(t)-A2Dβ(t)
X3(t+1)=Xδ(t)-A3Dδ(t)
A=diag (2ar2-a)
Wherein, X1、X2、X3Position after being updated according to α, β, δ wolf for each wolf, A is random coefficient, a be with
Iterations decays to 0 constant, r from 22It is that equally distributed stochastic variable is obeyed on 0 to 1, X (t+1) is wolf after updating
Position, A is random coefficient.
Micro-capacitance sensor alternating current-direct current section transverter pid parameter optimization method based on grey wolf algorithm of the invention, employs ash
Wolf algorithm carries out optimizing to pid parameter so that PID controller parameter can adjust to the optimal value under setting the goal.The present invention
Based on grey wolf algorithm, the process of simulation wolf pack predation prey realizes optimization, sets easy with simple structure, algorithm parameter, interior
Storage is small, it is easy to program, and with stronger ability of searching optimum, and verified particle cluster algorithm, the differential evolution of being better than is calculated
Method.Therefore, compared with other PID optimize, the PID controls that the present invention can be preferably in Optimize Multivariable PID Controller, especially complication system
Device parameter processed, obtains more preferable control effect.
Specific embodiment
With reference to embodiment and accompanying drawing to the micro-capacitance sensor alternating current-direct current section transverter PID based on grey wolf algorithm of the invention
Parameter optimization method is described in detail.
As shown in figure 5, the micro-capacitance sensor alternating current-direct current section transverter pid parameter optimization side based on grey wolf algorithm of the invention
Method, comprises the following steps:
1) number of wolf, maximum iteration, required problem dimension and pid parameter variable-value model in setting wolf pack
Enclose, initialization wolf pack position;
2) counting how many times, the corresponding model objective function value of adjusting in every wolf position of calculating, i.e., micro- electricity are iterated
The target function value of net alternating current-direct current section transverter PID control effect;
Micro-capacitance sensor alternating current-direct current section transverter, wherein, Converter DC-side is a dc source, and AC is by one
LCL filtering is connected to AC power supply;Control module is divided into inner ring control and outer shroud control, has the first PID controller 1, second
PID controller 2, the 3rd PID controller 3 and the 4th PID controller 4;First PID controller 1 and the second PID controller 2 are constituted
Outer shroud is controlled, and is control AC and DC voltage, and the 3rd PID controller 3 and the 4th PID controller 4 constitute inner ring control,
It is the amplitude and phase angle for controlling wave filter output capacitance voltage;DC voltage and alternating voltage are respectively through the first PID controller 1
Capacitance voltage angle reference signal is obtained with the second PID controller 2 and capacitance voltage amplitude signal is referred to;The electric capacity that measurement is obtained
Make the difference and be input to the 3rd PID controller 3 and the 4th PID controller 4 with reference signal after voltage is fourier transformed;3rd PID
The exporting of the PID controller 4 of controller 3 and the 4th be output as after coordinate transform modulated signal and produce transverter trigger pulse to changing
Stream device.
Described model objective function of adjusting is for ITAE+ISE, i.e. J=∫ t | e (t) |+e (t)2Dt, wherein, J is mould of adjusting
Type target function value, e (t) is controlled quentity controlled variable deviation, and t is the time.
ITAE increased time t as weight for departure, reduce the consideration journey for initial time relatively large deviation
Degree, increases the consideration degree for steady-state error, and the small error after being conducive to making up ISE for stabilization considers not enough lacking
Point.ISE increases the consideration degree for big deviation with the square value of deviation, is conducive to going out for the larger departure of suppression
It is existing.
3) according to model objective function value of adjusting, wolf pack is divided into α, β, δ, ω, wherein, α wolves are that PID effects are optimal
Wolf, β wolves are the wolf of PID effect suboptimums, and δ wolves are the excellent wolf of PID effects the 3rd, and ω wolves are remaining wolf;
4) the corresponding testing model target function value in α wolves position, i.e. micro-capacitance sensor alternating current-direct current section transverter is calculated to increase
The target function value of the PID control effect after scrambling is dynamic;
Described testing model is on the basis of model of adjusting, one to be increased in the output signal of the 3rd PID controller 3
The disturbing signal of individual step.
Described testing model object function is ITAE+ISE, i.e. J=∫ t | e (t) |+e (t)2Dt, wherein, J is mould of adjusting
Type target function value, e (t) is controlled quentity controlled variable deviation, and t is the time.
5) whether testing model PID control effect is judged continuous V times without improvement, if so, then stopping iteration, performs step
8) step 6, otherwise, is performed), described V is more than or equal to 6;
6) to representing the wolf pack location updating of pid parameter;Including:
(1) distance before each wolf updates with α, β, δ wolf respectively is asked for, specific formula is:
Dα(t)=C1Xα(t)-X(t)
Dβ(t)=C2Xβ(t)-X(t)
Dδ(t)=C3Xδ(t)-X(t)
C=diag (2r1)
The presence of C is from the point of view of bionics so that the distance between the grey wolf tried to achieve carries certain randomness, can be preferably
The random sexual dysfunction that simulation grey wolf is run into when near prey;
Wherein, Xα(t)、Xβ(t)、XδT () is the position before α, β, δ wolf update, X (t) is the position before all wolves update,
I.e. current pid parameter value, Dα、Dβ、DδTo consider to obtain each wolf position with α, β, δ wolf place under certain randomness
The distance of position, C is random coefficient, r1It is that equally distributed stochastic variable is obeyed on 0 to 1;
(2) location updating, specific formula are carried out with the distance of α, β, δ wolf according to each wolf respectively:
X1(t+1)=Xα(t)-A1Dα(t)
X2(t+1)=Xβ(t)-A2Dβ(t)
X3(t+1)=Xδ(t)-A3Dδ(t)
A=diag (2ar2-a)
Wherein, X1、X2、X3Position after being updated according to α, β, δ wolf for each wolf, A is random coefficient, a be with
Iterations decays to 0 constant, r from 22It is that equally distributed stochastic variable is obeyed on 0 to 1, X (t+1) is wolf after updating
Position, a be decayed to from 2 with iterations 0 constant, r2It is that equally distributed stochastic variable is obeyed on 0 to 1, A is
Random coefficient.
The span of diagonal element is [- 2,2] in A.In this because, at the algorithm initial stage, P (| 2ar2-a|>1)>0, have
Help grey wolf away from prey, that is, be more likely to global search;In the algorithm later stage, P (| 2ar2-a|>1)=0, grey wolf is contributed to lean on
Nearly prey, that is, be more likely to part and search element and convergence.
With the position of the current prey of position approximate representation of α wolves, it is considered to obtain each wolf under certain randomness
Position is with α wolves position apart from Dα, it is random plus being multiplied by one on the basis of each wolf current location afterwards
The D of coefficientα, obtaining each wolf carries out the position X after location updating according to α wolves1;
Similarly, according to said method, α wolves are changed to β, δ wolf, obtaining each wolf carries out the position after location updating according to β, δ wolf
Put X2、X3;
Finally, the position X (t+1) after each wolf updates is X1、X2、X3Arithmetic mean of instantaneous value.
7) judge that whether current iteration number of times reaches the maximum iteration of setting, if reaching, stops iteration, perform step
It is rapid 8), otherwise, return to step 2);
8) output α wolves position, i.e. micro-capacitance sensor alternating current-direct current section transverter global optimum pid parameter value.
Below as system shown in Figure 1 structure, example is given:
Example one:Control object is alternating current-direct current section transverter, and its circuit topology figure is as shown in Fig. 2 control module square frame
Figure is as shown in figure 3, control AC voltage.
For alternating current-direct current section transverter PID controller, testing model is in the base of model of adjusting to the model of adjusting of the example
Outlet side on plinth in PID3 increases an interference signal.
The inventive method is with PSO algorithms to shown in such as table 1 and Fig. 6, Fig. 7.
Table 1 provides the K that two methods are adjustedp、Ki、KdAnd the contrast of system step response performance parameter;
Table 1
Wherein, tf is the rise time, and ts is regulating time, and deviation takes ± 2%, σ % for overshoot.
As it can be seen from table 1 the method for the present invention (GWO) is compared with particle swarm optimization (PSO), the rise time is identical, surpasses
Tune amount is slightly poor, but regulating time has clear improvement, and have dropped 76.39%.
From fig. 6, it can be seen that the convergence rate of the method for the present invention is faster, and final convergence result is also superior to population;
Wherein, the method for the present invention reaches the generalization ability inspection condition of convergence after iteration 42 times, and population reaches extensive after 59 times
The ability test condition of convergence;
From Fig. 7 it is also seen that the method for the present invention optimization after waveform will far better than the waveform of particle group optimizing,
Stable state is more rapidly introduced into, dynamic property is good.
Example two:Control object chooses a five abstract rank transmission functions, and its transmission function is as follows:
The model of adjusting of the example is five abstract rank transmission function PID controllers, and testing model is in model of adjusting
On the basis of PID outlet side increase an interference signal.
The inventive method is with PSO algorithms to shown in such as table 2 and Fig. 8.
Table 2 provides the K that two methods are adjustedp、Ki、KdAnd the contrast of system step response performance parameter;
Table 2
Wherein, tf is the rise time, and ts is regulating time, and deviation takes ± 2%, σ % for overshoot.
From table 2 it can be seen that the method for the present invention (GWO) is compared with particle swarm optimization (PSO), the rise time is similar, but
Regulating time and overshoot have clear improvement, especially overshoot, have dropped 31.02%;From figure 7 it can be seen that its entirety
Step response curve it is also more outstanding.
Example three:Control object chooses a specific DC motor model, as shown in figure 4, controlling turning for direct current generator
Speed.
For direct current generator PID controller, testing model is straight on the basis of model of adjusting to the model of adjusting of the example
The load-side for flowing motor increases an interference signal.
The inventive method is with PSO algorithms to shown in such as table 3 and Fig. 9.
Table 3 provides the K that two methods are adjustedp、Ki、KdAnd the contrast of system step response performance parameter;
Table 3
Wherein, tf is the rise time, and ts is regulating time, and deviation takes ± 2%, σ % for overshoot.
From table 3 it can be seen that the method for the present invention (GWO) is compared with particle swarm optimization (PSO), the rise time is similar, but
Regulating time and overshoot make moderate progress;From figure 8, it is seen that its overall step response curve is also more outstanding.
From examples detailed above as can be seen that effect of optimization of the invention is preferable, with good generalization ability.
The advantage that example three is represented not both of the aforesaid example it is with the obvious advantage, its reason is the mould of direct current generator
Type is relatively simple, only second-order linearity model.
When naive model is processed, the traditional algorithm such as grey wolf algorithm and population does not have a clear superiority, but for
Complex model, then the advantage of grey wolf algorithm is fairly obvious, not only fast convergence rate, and final convergence result is also more outstanding.
And the application in examples detailed above is not limited to, the controller parameter optimization that can be used under other situations is especially right
There is good effect in the controller parameter optimization of complication system, with certain application prospect.