Summary of the invention
The object of the present invention is to provide a kind of grid control method and systems, to realize the micro-grid system of isolated operation
The work of safety and stability.
To achieve the above object, the present invention provides following schemes:
A kind of grid control method, the control method is based on including the mostly intelligent of master controller and multiple sub-controllers
System system, multiple sub-controllers connect one to one with multiple working cells in micro-grid system, the sub-controller
It is also connect with the master controller, the control method includes the following steps:
The status information of each working cell and the stability information of bus nodes are obtained by multiple sub-controllers;
Control is formulated using decision Tree algorithms with the stability information according to the state information by the master controller
System strategy;
Decentralized coordinated control is carried out to the working cell according to the control strategy by the sub-controller.
Optionally, the status information that each working cell is obtained by multiple sub-controllers, specifically includes:
The mixed-valued counter model for indicating the status information of the working cell is established, is shown below:
H1=(D, L, f, S, F, Init);Wherein, D={ δ1, δ2, δ3..., indicate the separate manufacturing firms of working cell
Set;The continuous state space set of L expression working cell;F=(f1(δ1), f2(δ2), f3(δ3) ...) indicate that discrete state is empty
Between lower continuous state space changing rule;S=(S1, S2, S3...) indicate between separate manufacturing firms and continuous state space
Mapping;F=(F1, F2, F3...) indicate the condition that state space shifts;
Detect the discrete state and continuous state of the working cell;
The mixed-valued counter model is set according to the discrete state of the working cell and the continuous state, obtains institute
State the status information of working cell.
Optionally, the stability information that each working cell bus nodes are obtained by multiple sub-controllers, tool
Body includes:
Detect the voltage signal of each working cell bus nodes and the power information of each distributed generation resource;
Voltage security index is determined according to the voltage signal, and system power equilibrium-like is determined according to the power information
State.
Optionally, described that decision tree is used with the stability information according to the state information by the master controller
Algorithmization control strategy, specifically includes:
Decision tree is constructed using CART sorting algorithm;
Decision tree training sample is obtained, using the training sample training decision tree;
Control strategy is formulated using the decision tree after the training with the stability information according to the state information.
Optionally, described that decision tree is constructed using CART sorting algorithm, it specifically includes:
Optimal dividing attribute is chosen using minimum Gini index, splitting operation is executed, obtains CART decision tree;
Loss function is set up, by the best Pruning level that loss function minimum processing is found to decision tree;
By the CART decision tree pruning to the best Pruning level.
Optionally, described that decentralized coordinating is carried out to the working cell according to the control strategy by the sub-controller
Control, specifically includes:
By the sub-controller according to the control strategy, the state of the mixed-valued counter model is adjusted;
According to the mixed-valued counter model adjusted, to the operating mode of the corresponding working cell of the sub-controller
Carry out coordination switching.
Optionally, described according to the mixed-valued counter model adjusted, job note corresponding to the sub-controller
The operating mode of member carries out coordination switching, later further include:
By the sub-controller using PQ control method or V/f control method to the corresponding job note of the sub-controller
The inverter of member carries out master & slave control.
Optionally, described that decentralized coordinating is carried out to the working cell according to the control strategy by the sub-controller
Control, later further include:
Control is switched over to the working cell according to natural conditions by the sub-controller.
Optionally, described that the working cell is switched over according to natural conditions by the sub-controller by described
Control, specifically includes:
Preset the event triggering control logic under different natural conditions;
Obtain current natural conditions;
Control logic and the current natural conditions are triggered according to the event, control is switched over to the working cell
System.
A kind of micro grid control system, the micro grid control system are include master controller and multiple sub-controllers more
Multiagent system;
Multiple sub-controllers connect one to one with multiple working cells in micro-grid system;
The sub-controller is connect with the master controller, and multiple sub-controllers are used to obtain the shape of each working cell
The stability information of state information and bus nodes, and the status information and the stable information are sent to the main control
Device;
The master controller is for formulating control using decision Tree algorithms with the stability information according to the state information
System strategy, and the control strategy is sent to the sub-controller;
The sub-controller is also used to divide each working cell in micro-grid system according to the control strategy
Dissipate coordinated control.
The specific embodiment provided according to the present invention, the invention discloses following technical effects:
The invention discloses a kind of grid control method and system, the control method is applied to micro-capacitance sensor control system
System, the micro grid control system is the multi-agent system for including master controller and multiple sub-controllers;The control method,
Firstly, obtaining the status information of each working cell and the stability information of bus nodes by sub-controller;Pass through master controller
Control strategy is formulated using decision Tree algorithms according to status information and stability information;Again by sub-controller according to control strategy
Decentralized coordinated control is carried out to working cell.The present invention is based on multi-agent systems, realize main control using decision Tree algorithms
Control strategy is formulated, sub-controller carries out decentralized coordinated control to working cell according to the control strategy that master controller is formulated, protects
The power-balance and voltage stabilization for having demonstrate,proved micro-grid system realize the work of the micro-grid system safety and stability of isolated operation.
Embodiment 2
The embodiment of the present invention 2 provides an a kind of preferred embodiment of grid control method.
The status information for obtaining each working cell described in step 101 by multiple sub-controllers, specifically includes:
The mixed-valued counter model for indicating the status information of the working cell is established, is shown below:
H1=(D, L, f, S, F, Init);Wherein, D={ δ1, δ2, δ3..., indicate the separate manufacturing firms of working cell
Set;The continuous state space set of L expression working cell;F=(f1(δ1), f2(δ2), f3(δ3) ...) indicate that discrete state is empty
Between lower continuous state space changing rule;S=(S1, S2, S3...) indicate between separate manufacturing firms and continuous state space
Mapping;F=(F1, F2, F3...) indicate the condition that state space shifts;For the working cell of mixed-valued counter model
Separate manufacturing firms are then defined as logical one when some separate manufacturing firms is activated, discrete shapes other at this time
State space is defined as logical zero.This makes it possible to obtain the original states of the mixed-valued counter model of all working unit:
Photovoltaic cells: D={ δ1, δ2}=[1,0].
Wind-driven generator unit: D={ δ1, δ2, δ3}=[1,0,0]
Secondary battery unit: D={ δ1, δ2, δ3, δ4, δ5}=[1,0,0.0,0].
Load cell: D={ δ1, δ2}=[1,0].
Cell of fuel cell: D={ δ1, δ2}=[0,1].
Detect the discrete state and continuous state of the working cell;
The mixed-valued counter model is set according to the discrete state of the working cell and the continuous state, obtains institute
State the status information of working cell.
The stability information of each working cell bus nodes is obtained described in step 101 by multiple sub-controllers, is had
Body includes:
Detect the voltage signal of each working cell bus nodes and the power information of each distributed generation resource;
Voltage security index is determined according to the voltage signal, and system power equilibrium-like is determined according to the power information
State.
The step of wherein obtaining voltage security index includes: to obtain micro-capacitance sensor s by the method that wide area signal measures
The practical dynamic electric voltage value of bus, extracting contact potential series indicates are as follows: V=[Vi1, Vi2..., ViN]T, obtain the i-th node jth
The instantaneous voltage average value at moment is shown below:
The percentage that the deviation of the i-th node jth moment instantaneous voltage value and average voltage level is obtained by calculation indicates are as follows:
In formula,Instantaneous voltage value for the i-th node at the jth moment, M and N respectively indicate n-hour and M moment.
Then the voltage stability index at the i-th node jth moment is shown below:
Defining the voltage stability index at micro-capacitance sensor and the public interface of bulk power grid is U.Later, voltage security is referred to
Marking U points is 7 continuums: (0.8Uo, 0.9Uo], (0.9Uo, 0.95Uo], and (0.95Uo, 0.98Uo], (0.98Uo,
1.02Uo], (1.02Uo, 1.05Uo], (1.05Uo, 1.1Uo], (1.1Uo, 1.2Uo], wherein Uo is load voltage value.
After bus nodes voltage stability index is carried out multidomain treat-ment, each section switches in microgrid as coordination to be respectively distributed
The critical value of the operation mode of formula generator unit, at the same also can be used as data an attribute set and subsequent decision Tree algorithms
It links together, coordinates the execution of corresponding coordination control strategy.
Decision tree is used with the stability information according to the state information by the master controller described in step 102
Algorithmization control strategy, specifically includes:
Decision tree is constructed using CART sorting algorithm;It specifically includes: choosing optimal dividing attribute using minimum Gini index,
Splitting operation is executed, CART decision tree is obtained;Loss function is set up, by the way that the best of decision tree is found in the processing of its minimum
Pruning level;By the CART decision tree pruning to the best Pruning level.
Decision tree training sample is obtained, using the training sample training decision tree.
Control strategy is formulated using the decision tree after the training with the stability information according to the state information.
It is applied to master controller specifically, decision tree is calculated, in the host controller, in the working condition to micro-grid system
Feature extraction is carried out with the operating mode of relevant work unit in physical layer, feature set is established and merges to form corresponding tag set
Afterwards, algorithm is trained by training sample, generates corresponding decision-tree model.Later, decision Tree algorithms can be analyzed new
Characteristic obtains corresponding label by executing more classification problems, to trigger corresponding event, thereby determines that a certain work
Specifically coordinate switching control order under state, and issue order, controls the coordination conversion of a working cell operating mode.In fact
Apply that steps are as follows:
1. feature extraction:
On the one hand, the operating mode of battery, fuel cell, load is subjected to feature extraction as Category Attributes.It is another
Aspect, it is contemplated that the stability of micro-capacitance sensor operation is to answer the factor of overriding concern, and voltage security assessments index U and battery lotus
Electricity condition SOC plays a crucial role the stability of assessment micro-capacitance sensor, so carrying out U and SOC as connection attribute
Feature extraction.To sum up, the attribute set that feature extraction is arrived is { U, SOC, battery, fuel, load }.Wherein, for continuously belonging to
Property: voltage security index U is divided into 7 continuums by above-mentioned hierarchical policy: (0.8,0.9], (0.9,0.95], (0.95,
0.98], (0.98,1.02], (1.02,1.05], (1.05,1.1], (1.1,1.2], storage battery charge state index S OC will
10% to 90% value range is divided into 5 continuums: (10,20], (20,40], and (40,60], (60,80], (80,90],
Wherein, 10% and 90% be respectively battery minimum acceptable value SOCminWith maximum permissible value SOCmax;For Category Attributes:
Battery={ 0,1,2 }, wherein 0 indicates charge mode, and 1 indicates discharge mode, and 2 indicate stoppage in transit mode.Fuel={ 0,1 },
Wherein, the rated output mode of 0 expression fuel cell, 1 indicates stoppage in transit mode.Load={ 0,1 }, wherein 0 indicates to work normally
Mode, 1 indicates cutting load mode.
Definition tag set be y=y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12, y13, y14,
y15}.Each label is divided into two classes according to switching times: a switch labels be y1, y2, y4, y5, y7, y9, y11, y13,
Y15 }, secondary switch labels be { y3, y6, y8, y10, y12, y14 }
2. data collection and processing
For 7 grades that attribute " voltage security index U " has divided, since the corresponding grade interval of each grade is
It is more to can use data in each section for continuity section, so 7 grades are respectively defined as " VL " from low to high, " ML ", and " L ",
" Z ", " H ", " MH ", " VH " 7 attribute values.Similarly, 5 grades of attribute " SOC " can be respectively defined as " VL " from low to high,
" L ", " Z ", " H ", " VH " 5 attribute values.Complicated working condition when in view of micro-capacitance sensor isolated operation, by 2 connection attributes
" U ", " SOC " and 3 Category Attributes " battery ", " fuel " can get 264 class initial data after " load " combination.It will be even
Continuous attribute can get 1056 datas as training sample after corresponding grade interval carries out value.
3. decision Tree algorithms
Decision tree is constructed using CART sorting algorithm, i.e., binary class tree simple for structure using CART algorithm construction is calculated
Method process be constantly divide and rule since root node, recurrence, growth, until obtain satisfactory decision tree.Classification is executed to appoint
When business, CART algorithm selects to divide attribute using " gini index ".Firstly, being used to " the Geordie value " of metric data collection D purity
Is defined as:
In formula, indicate that sample set belongs to the probability of kth class, y is the number of class.
Gini (D) is smaller, then the purity of data set D is higher.
Secondly, if whether sample set D takes a certain probable value to be divided into V part, the base of attribute a according to attribute a
Buddhist nun's Index Definition are as follows:
In formula, | D | indicate the number of sample in set D, | Dv| indicate the number of v-th of part sample in sample set D.
Then, it in candidate attribute set A, selects so that the smallest attribute of gini index is as optimal dividing category after dividing
Property, i.e. a*=argminGini-index (D, a), a ∈ A.
For decision tree cut operator, beta pruning is carried out using " minimizing loss function " method.If the leaf node of decision tree
Number is | T |, t is the leaf node of tree, has N on leaf node ttA sample point, wherein the sample point of k class has NktIt is a, k=1,
2 ..., K, K are the empirical entropy on leaf node t, and a >=0 is parameter.Then loss function is defined as:
Wherein empirical entropy are as follows:
By Ca(T) value carries out minimum operation as target, and suitable decision tree can be obtained.
To sum up available CART algorithm constructs the step of classification tree:
1) optimal dividing attribute is chosen using minimal index, executes splitting operation.Continuous recurrence executes splitting operation, until
Meet and stop splitting condition, generates corresponding CART decision tree.
2) cut operator is carried out to decision tree.Set up loss function Ca(T), by the way that decision is found in the processing of its minimum
The best Pruning level of tree, thus by decision tree pruning to best Pruning level.
4. constructing decision tree
The present invention executes decision Tree algorithms using MATLAB software.Firstly, using 1056 training samples to decision tree mould
Type is trained;Best Pruning level is found by minimizing loss function later, by decision tree pruning to best Pruning level.
Generating has 89 nodes, the decision tree of 45 leaf nodes, and decision-tree model is as shown in Figure 4.In figure [x1, x2, x3, x4, x5]
Respectively correspond [U, SOC, battery, fuel, the load] in characteristic set.
The part interpretation of rules extracted from the decision-tree model of generation is as follows:
Rule 1: if x1 < 1, x3 >=0.5, x2 < 20.5, x4 < 0.5, x5 < 0.5 then return to label y1.
Rule 2: if x1 < 1, x3 < 0.5, x2 >=20.5, x2 < 51.5, x4 >=0.5, x1 < 0.905 then return to label
y6。
Rule 3: if x1 >=1, x3 < 1.5, x2 < 75.5, x3 >=0.5, x2 < 46.5 then return to label y13.
If rule 4 x1 >=1, x3 < 1.5, x2 >=75.5, x4 < 03, x5 >=0.5, x1 < 1.055 then return to label y9.
Rule 5: if x1 >=1, x3 >=0.5, x2 < 79.5, x2 >=53.5, x4 >=0.5 then returns to label y15.
Formulate control strategy according to decision tree: the control strategy is to coordinate switching control strategy, main according to decision
The tag set of tree algorithm is classified, and specific control command passes to bottom agent by upper layer agent (master controller)
(sub-controller), then the switching that each working cell carries out operating mode is controlled by sub-controller;Switching control is coordinated in the building
Strategy, particular content are as follows:
According to decision-tree model, micro-capacitance sensor is when facing different working conditions, according to the available difference of classification results
Label result.Each label corresponds to different switchover policy, and here is the corresponding coordination based on event triggering of each label
Switching control strategy, wherein Ey1~Ey15For the corresponding trigger event of each decision tree label, δijMix for each bottom working cell
The a certain separate manufacturing firms of automaton model, tFijTo execute triggering duration when a certain order, Δ t is interval time.
Y1:P (y1)=Ey1(t)δ51(1(t-to)-1(t-to-tF51)).
Y2:P (y2)=Ey2(t)[δ12(1(t-to)-1(t-to-tF12))+δ22(1(t-to)-1(t-to-tF25))+δ23(1
(t-to)-1(t-to-tF26))+δ33(1(t-to)-1(t-to-tF33))+δ42(1(t-to)-1(t-to-tF42))].
Y3:P (y3)=Ey3(t)δ41(1(t-to)-1(t-to-tF41))+Ey3(t+Δt)δ51(1(t-to-Δt)-1(t-
to-Δt-tF51)).
Y4:P (y4)=Ey4(t)δ41(1(t-to)-1(t-to-tF41)).
Y5:P (y5)=Ey5(t)δ33(1(t-to)-1(t-to-tF33)).
Y6:P (y6)=Ey6(t)δ33(1(t-to)-1(t-to-tF33))+Ey6(t+Δt)δ41(1(t-to-Δt)-1(t-
to-Δt-tF41)).
Y7:P (y7)=Ey7(t)δ31(1(t-to)-1(t-t0-tF31)).
Y8:P (y8)=Ey8(t)δ31(1(t-to)-1(t-to-tF31))+Ey8(t+Δt)δ41(1(t-to-Δt)-1(t-
to-Δt-tF41)).
Y9:P (y9)=Ey9(t)δ42(1(t-to)-1(t-to-tF42)).
Y10:P (y10)=Ey10(t)δ42(1(t-to)-1(t-to-tF42))+Ey10(t+Δt)δ52(1(t-to-Δt)-1
(t-to-Δt-tF52)).
Y11:P (y11)=Ey11(t)δ52(1(t-to)-1(t-to-tF52)).
Y12:P (y12)=Ey12(t)832(1(t-to)-1(t-to-tF32))+Ey12(t+Δt)δ42(1(t-to-Δt)-1
(t-to-Δt-tF42)).
Y13:P (y13)=Ey13(t)δ32(1(t-to)-1(t-to-tF32)).
Y14:P (y14)=Ey14(t)δ31(1(t-to)-1(t-to-tF34))+Ey14(t+Δt)δ42(1(t-to-Δt)-1
(t-to-Δt-tF42)).
Y15:P (y15)=Ey15(t)δ31(1(t-to)-1(t-to-tF34)).
According to above-mentioned coordination switching control strategy, on the one hand, total switching times of each working cell operating mode are limited
System at most twice, is reducing switching times, is conducive to the stable operation of system;On the other hand, tag set abundant represents
Control command sufficient enough, the system of improving cope with flexibility when different operating conditions.In addition, by decision Tree algorithms to micro-
The working condition of network system analyze and differentiate to event triggering situation, improves and coordinate holding for switching control order
The intelligent level of line efficiency and system.
Decentralized coordinating is carried out to the working cell according to the control strategy by the sub-controller described in step 103
Control, specifically includes: passing through the state of mixed-valued counter model under the control of the sub-controller of bottom according to control strategy
The coordination switching for migrating to realize working cell operating mode.Further, by the sub-controller according to the control plan
Slightly, the state of the mixed-valued counter model is adjusted;According to the mixed-valued counter model adjusted, to the sub-controller
The operating mode of corresponding working cell carries out coordination switching.
The work according to the mixed-valued counter model adjusted, to the corresponding working cell of the sub-controller
Mode carries out coordination switching, later further include: by the sub-controller using PQ control method or V/f control method to institute
The inverter for stating the corresponding working cell of sub-controller carries out master & slave control.
It is exactly according to electricity micro- under island mode specifically, constructing distributed dynamic control strategy according to the control strategy
The master-slave control method that net is taken, using energy-storage units model as main control unit, using V/f control algolithm;Photovoltaic cell,
Blower, fuel cell are used as from control unit, using PQ control algolithm.
For V/f control algolithm, can be divided into two links as shown in Figure 5: external power reference value forms link and inside
Power control link.In external link, by the system frequency f and reference frequency f of phaselocked loop outputrefIt compares, is adjusted by PI
Device forms active power reference signal Pref;Voltage U and reference voltage UrefIt compares, reactive power ginseng is formed by pi regulator
Examine signal Qref。PrefWith QrefRespectively with mean power PfiltWith QfiltIt is compared, obtained error is in internal power control loop
Section carries out PI control, to obtain the reference signal l of inner ring current controllerdrefWith lqref。
For PQ control algolithm, in Fig. 6, threshold voltage u instantaneous to three-phaseabcWith three-phase instantaneous value electric current iabcCarry out Parker
After transformation, dq axis component u is obtainedd、uq、id、iq, instantaneous power P is obtained by power calculationgrid、Qgrid, PgridWith QgridBy
Mean power P is obtained after low-pass filterfiltWith Qfilt, then with given reference signal PrefWith QrefIt is compared, and right
Error carries out PI control, to obtain the reference signal i of inner ring current controllerdrefWith iqref.When inverter output power with
Whens reference power is not equal, error signal is not zero, so that pi regulator carries out DAZ gene adjusting, until error signal is
Zero, controller reaches stable state namely the power of inverter output restores to reference power.
Optionally, described that decentralized coordinating is carried out to the working cell according to the control strategy by the sub-controller
Control, later further include:
Control is switched over to the working cell according to natural conditions by the sub-controller.
Optionally, described that the working cell is switched over according to natural conditions by the sub-controller by described
Control, specifically includes:
Preset the event triggering control logic under different natural conditions;Specifically, by the sub-controller according to nature
It is that natural conditions trigger switching control strategy that condition, which switches over control to the working cell, and natural conditions trigger switching control
Strategy belongs to decentralised control strategy, refers to using certain indexs as natural conditions, to control power generation by condition variation
The switching of cell operation mode.The building natural conditions trigger switching control strategy, and particular content is as follows: strong with illumination
Degree, wind speed, SOC value devise the control logic based on event triggering, i.e. natural conditions switching control as natural conditions.
When natural conditions variation, jump condition is caused to be satisfied, corresponding event is triggered, that is, when there is logical one, photovoltaic cell,
The corresponding mixed-valued counter model of blower, battery can switching working mode.
For photovoltaic cells, the control logic based on natural switching condition is as follows, wherein G (t) is that instantaneous illumination is strong
Degree, C are intensity of illumination threshold value, E1iFor the corresponding trigger event of photovoltaic cells, δ1iFor photovoltaic cells mixed-valued counter
The separate manufacturing firms of model, tF1iTriggering duration when a certain order is executed for photovoltaic cells:
Work as t=toIf G (t) >=C, I (E11)=E11(t)δ11(1(t-to)-1(t-to-tF11)).
Work as t=toIf G (t) < C, I (E12)=E12(t)δ12(1(t-to)-1(t-to-tF12)).
For fan unit, the control logic based on natural switching condition is as follows, wherein V (t) is instantaneous wind speed, VciFor
Cut wind speed, VcoFor cut-out wind speed, VrFor rated wind speed, E2iFor the corresponding trigger event of fan unit, δ2iIt is mixed for fan unit
The separate manufacturing firms of miscellaneous automaton model, tF2iTriggering duration when a certain order is executed for fan unit:
Work as t=t0If V (t) rises to Vr> V (t) >=Vci, then:
I(E21)=E21(t)δ21(1(t-to)-1(t-to-tF21))。
Work as t=t0If V (t) rises to Vco> V (t) >=Vr, then:
I(E22)=E22(t)δ21(1(t-to)-1(t-to-tF22))and
I(E23)=E23(t)δ22(1(t-to)-1(t-to-tF23))。
Work as t=t0If V (t) drops to Vr> V (t) >=Vci, then:
I(E24)=E24(t)δ23(1(t-to)-1(t-to-tF24))。
Work as t=t0If V (t) drops to Vci> V (t), then:
I(E25)=E25(t)δ22(1(t-to)-1(t-to-tF25))。
Work as t=t0If V (t) rises to V (t) >=Vco, then:
I(E26)=E26(t)δ23(1(t-to)-1(t-to-tF26))。
Work as t=t0If V (t) drops to Vr> V (t) >=Vci, then:
I(E27)=E27(t)δ21(1(t-to)-1(t-to-tF27))。
Work as t=t0If V (t) drops to Vco> V (t) >=Vr, then:
I(E28)=E28(t)δ21(1(t-to)-1(t-to-tF28))。
For secondary battery unit, the control logic based on natural switching condition is as follows, wherein SOC (t) is that battery is instantaneous
The value of state-of-charge, SOCminFor state-of-charge minimum acceptable value, SOCmaxState-of-charge maximum permissible value, E3iFor secondary battery unit
Corresponding trigger event, δ3iFor the separate manufacturing firms of secondary battery unit mixed-valued counter model, tF3iFor secondary battery unit execution
Triggering duration when a certain order:
Work as t=t0If SOC (t) drops to SOCmin>=SOC (t), then:
I(E31)=E31(t)δ32(1(t-to)-1(t-to-tF39))。
Work as t=t0If SOC (t) rises to SOCmax≤ SOC (t), then:
I(E32)=E32(t)δ33(1(t-to)-1(t-to-tF40))。
Obtain current natural conditions;
Control logic and the current natural conditions are triggered according to the event, control is switched over to the working cell
System realizes the switching that generator unit operating mode is controlled by natural conditions variation.