• No results found

Selectors for two objectives using tuned weights

6.4 Using machine learning for algorithm selectors

7.1.3 Selectors for two objectives using tuned weights

The method outlined in the previous section can be extended to consider multiple objectives, by weighting training examples according to all objectives considered. This can be achieved by calculating weight components for each performance measure y, and then summing the components with scalar multipliers (cy) applied to prioritise particular objectives; using:

wi,a=

y∈Y

cy(pmaxi,y − pi,y,a) (7.2)

The prioritisation of multiple objectives is an application-specific decision, which in- fluences the values of the weight component multipliers, cy, that are used when training

classifiers to be used as selectors. Determining what multiplier values to use constitutes a multi-objective optimisation problem, where the decision variables are the multipliers and the objective function comprises the performance of the algorithms selected by a selector that has been trained with data using those multipliers. Since each evaluation of a candidate set of multipliers requires a classifier to be trained and then tested, the process of finding appropriate multiplier values is suited to so-called “black-box” or “derivative-free” optimisers, such as grid search or a genetic algorithm [107], which can optimise arbitrary functions.

Out of the three objectives considered in this work, two combinations have been used for creating selectors that consider multiple objectives, namely:

1. Minimising the number of overloads whilst minimising the amount of curtailment, or: 2. Minimising the overload energy whilst minimising the amount of curtailment.

For both of these combinations, the objectives are ordered such that the first objective is prioritised over and above the second objective. In other words, the performance of the algorithms selected by one selector compared with those selected by a different selector can only be considered superior if there is a reduction in the number or energy of overloads, or, in cases where number or energy of overloads removed is the same, there is a reduction in the amount of curtailment applied.

A procedure has been developed in this work for tuning the weight multiplier, c2, associ-

ated with the second of two ordered objectives. This procedure is based on an observation made when developing a direct selector for the 33 kV meshed distribution system. During this development,RandomForest model (described in Section 7.3) was used and the selector considered the nested objectives of minimising the number of overloads whilst also minimis- ing the amount of curtailment applied, with each objective having weight multipliers of cOL

and cCT, respectively. A range of cCTvalues were used to create training data with different

weights, with a fixed value of cOL=1.0. A basic set of features (described in Section 7.4.3)

and the 10,000 system states from the “A” training split of power flow management perfor- mance data for the 33 kV distribution system (described in Section 7.5) were used to create the training data, which were used to train selectors. The selection decisions of each selector were then determined for the 17,520 test states for the 33 kV distribution system, with the performance of each selector calculated from the performance of the algorithms selected.

Figure 7.4 shows the effect of varying the weight multiplier cCTon the performance of

the selectors, with respect to the number of overloads and the amount of curtailment applied. The figure clearly shows the shift in the prioritisation of the objectives as the value of cCT

increases, with curtailment reducing at the same time as the number of overloads increases. Importantly, there is a range of cCTvalues (< 0.01) where the amount of curtailment decreases

but not at the expense of incurring additional overloads. The tuning procedure developed in this work exploits this observation that, for particular selectors, the weight multiplier of a second objective (c2) can be increased to a non-zero value, thus improving performance

against the second objective, without a performance penalty with respect to the first objective. The procedure for tuning c2is outlined in Algorithm 7.1, with an example of its operation

illustrated in Figure 7.5. In essence, the procedure searches along the c2 axis to find the

0.00

0.01

0.02

0.03

0.04

0.05

Multiplier c

CT

19950

20000

20050

20100

20150

Curtailment [MWh]

0

20

40

60

80

100

120

140

160

180

Number of overloads [count]

Fig. 7.4 Effect of varying weight multiplier cCT with cOL = 1.0 for a selector using a

RandomForest model to select between the PFM-OPF and PFSF-TMA algorithms, trained and tested on states from the 33 kV meshed distribution system

in the performance measure for the first objective, p1. Each iteration, l, of the procedure

comprises training and evaluating a selector for the c2value for that iteration (lines 3-6), and

determining the next c2value to try (lines 7-27). The first value of c2trialled is 0.0, and the

performance of the selector trained using that c2is captured with respect of the first objective

as ptarget1 (line 8). The search position is then incremented by a variable length step, △c2

(line 24), which for the first iteration is set to a minimum length of △cmin

2 . For each of the

subsequent c2values trialled, the progress of the search depends on the the performance, p1,

of the selector trained using that c2value.

If p1meets the value of ptarget1 (lines 9-15), such as for iterations 2 and 3 in Figure 7.5,

then the current c2 value is recorded as the best known position, cbest2 , and the search is

expanded by doubling the last step size, up to a maximum step length of △cmax2 . If the new

step length would take the search up to or past the search limit, climit2 , such as for iteration 6 in the figure, then the step length is reduced to △cmin2 . This prevents unnecessary iterations

trialling c2values past the search limit.

If p1does not meet ptarget1 (lines 16-22), such as for iteration 4 in Figure 7.5, the current

c2position is recorded as the search limit, climit2 , then the search is contracted by reducing the

step size, △c2, to the minimum length, △cmin2 , and by reversing the search position to one

step after the best known position, cbest

2 +△c2. If, for this second case, the step is already

at its minimum length, then no further increase of c2is possible and the search terminates.

Algorithm 7.1Procedure used to tune selector weight multiplier c2

Require: c1, △cmin2 , △cmax2 , lmax, training/test data, machine learning model type

1: Initialise c2:= 0, cbest2 := 0, climit2 := ∞, △c2:= △cmin2

2: forl := 1,lmax do

3: Create training dataset using weight multipliers c1and c2

4: Use training dataset to train algorithm selector 5: Evaluate selector using supplied test data

6: Determine value for performance measure p1

7: ifl = 1 then

8: ptarget1 := p1

9: else if p1meets ptarget1 then

10: ptarget1 := p1 11: cbest2 := c2 12: △c2:= min(2 × △c2,△cmax2 )) 13: ifc2> climit2 then 14: △c2:= △cmin2 15: end if 16: else 17: climit2 := c2 18: if△c2>△cmin2 then 19: △c2:= △cmin2 20: else 21: break 22: end if 23: end if 24: c2:= c2+△c2 25: ifc2> climit2 then 26: break 27: end if 28: end for 29: returnc2:= cbest2

0

10

20

30

40

50

60

70

Pe

rf

or

m

an

ce

p

1

Underlying p

1

trend

Search progress

0

1

2

3

4

5

6

7

8

9

10

Weight multiplier c

2

(

× 4

c

2min

)

1

2

3

4

5

6

7

Search iterations

Fig. 7.5 Example of the operation of the procedure for tuning selector weight multiplier c2

climit

2 , or the iteration limit lmax is reached. In all cases, the procedure will return cbest2 on

termination.

This selector design has a number of design choices. These are described below, along with the options investigated in this work:

1. Objectives: the method outlined above requires there to be two ordered objectives. In this work, two options are investigated for the objectives: (1) minimising the number of overloads whilst minimising the amount of curtailment, and (2) minimising the overload energy whilst minimising curtailment.

2. Algorithms: which algorithms are considered for selection. As with the other direct selectors, considering different sub-sets of the power flow management algorithms for selection can simplify the learning task and thus affect the performance of a selector. The following sets of algorithms are considered for selection for each system:

• 33 kV meshed distribution system (4 options): (1) PFM-OPF and PFSF-TMA, (2) PFM-OPF and PFSF-LP, (3) PFM-OPF, PFSF-TMA, and PFSF-LP; plus (4) the set of all algorithms (including the baseline option of not applying any algorithm).

• IEEE 14-bus system (5 options): each of the pairs of algorithms that could remove all overloads were considered, namely: (1) PFM-CSP and PFSF-Egal, (2) PFM-CSP and PFSF-TMA, (3) PFM-CSP and PFM-OPF, and (4) PFM-OPF and PFSF-Egal; along with (5) the set of all algorithms.

• IEEE 57-bus system (3 options): (1) PFM-CSP and PFM-OPF, which is the pair of algorithms that minimises the number and energy of overloads, when compared with all other algorithm pairs for that system; (2) PFM-OPF, PFM-CSP, and PFSF-Egal, which is the set of algorithms that minimises the overload energy; and (3) the set of all algorithms.

3. Tuning parameters: the values of △cmin

2 , △cmax2 , and lmax affect the search process in

Algorithm 7.1 and may affect the performance of the resulting selector, particularly as the precision at which △cmin

2 is found depends on △cmin2 . However, these parameters

are not as important as the other design choices so their values have been fixed in this work, in order to limit the scope of this work to a tractable number of design variants. The values used are: △cmin

2 =1.0 × 10−3, △cmax2 =10.0, and lmax =100.

There is an additional design choice with respect to the tuning that is not explicitly shown in Algorithm 7.1, which is how to split the available data for selector training into training and test data during the tuning process. This is required as it is good practice in machine learning to use independent data sets for any testing during a tuning process (often referred to as a validation set) and for the final evaluation of a tuned model. In this work, a 2:1 split is used for the training and validation data during tuning; additionally, once the tuning process has been used to determine a c2value for

a particular model, the model is then re-trained using all the training data available. 4. Comparison used in search: as seen in Figure 7.4, the value p1 of the performance

measure related to the first objective (the number of overloads in the figure) may not increase monotonically. Furthermore, as has been observed during the development of selectors for this work, p1 may decrease before increasing as c2 becomes larger.

Because of the potential non-monotonicity of p1, the choice of comparison used in

line 9 of Algorithm 7.1 is critical for determining how quickly the tuning process will terminate, which could result in a c2value lower than could be obtained if the search

process continued for additional steps. For this reason, two design options for the comparison are investigated in this work: (1) p1=ptarget1 , and (2) p1≤ ptarget1 .

EPM (A2) EPM (A1) EPM (B2) EPM (B1) Features Selection logic

(based on performance predictions)

Performance prediction for algorithm A, measure 1 EPMs for algorithm B Performance predictions Algorithm selection EPMs for performance measure 1 EPMs for performance measure 2 EPMs for algorithm A Different sub-sets of feature may be used Features may be used by the selection logic

Fig. 7.6 Example structure of an EPM-based algorithm selector