Optimal Location and Sizing of Conglomerate DG- FACTS using an Artificial Neural Network and Heuristic Probability Distribution Methodology for Modern Power System Operations

In existing power system networks, the positioning and sizing of multi-DG is critical at the optimum locations for effective energy management. Initially optimal power flow is assessed using the NR method (without DG) in which performance parameters such as real power loss, accuracy, selectivity and MSE are obtained, but in an undesirable manner. To meet load demand; multi-DGs are placed and their optimal locations are assessed by the proposed heuristic probability distribution methodology and an ANN because existing techniques provides poor performance parameters for selecting the location and sizing of DGs. The optimal positions of multi-DGs are estimated in terms of performance parameters including real power loss of transmission network, accuracy, selectivity and MSE, while the performance parameters obtained with the ANN are better than the heuristic pdf. Then, the sizing of multi-DGs is evaluated in relation to active and reactive power. It is found that that sizes of multi-DGs are smaller with ANN than with heuristic pdf. It is preferable to connect the buses having lowest real power losses with the smallest multi-DGs. The performance analysis is tested in the standard IEEE 9- bus and IEEE 57- bus systems on Simulink. To improve the distortion level in real and reactive power, multi-FACTS namely TCSC, TSC and STATCOM are used. The switching of TCSC and TSC is done by SPWM while STATCOM switching is controlled with ANFIS. The locations of multi-FACTS devices are chosen for buses having larger distortion and the sizing of multi-FACTS devices is also optimally decided. The application of multi-FACTS devices helps to improve power quality and fulfill load demand with minimal size in order to make the system economical.


Introduction
Optimal deployment and sizing of different distributed generators (DGs) in power system networks have to derive the full possible benefits, given the context of natural, economic and technological aspects which remains a challenging task for both infrastructure and consumers. DG penetration involves a major change for conventional electricity schemes [1]; it affects voltage stability [2] as well as energy losses [3,4] while adjusting power flow in the extant power system infrastructure. The degree to which DGs minimize failure of power systems operation and boost voltage profile are dependent on their sizing and position [5]. Optimisation methods can be used in the deregulated power industry to make the best DG allocation [6]. In [7,8]; the optimal positions of DG are calculated in the delivery network. The optimum size of a small integrated power plant incorporating green and/or traditional energy technology is calculated in [9] to reduce the cost of electricity for the network, while in [10][11][12], the studies merged placement and scale of the DG into one optimization problem. The key factors involved in the optimisation challenge consists of investing price, running costs, network topology, expense of real and reactive energy, heat and energy requirements and profile of voltage inclusive of network losses. Implementation of smart intelligent computational optimisation approaches can find the optimal solution for such issues. The optimal placement and scale with a single DG unit is calculated in [13][14][15], while several studies are reported where the optimum positions and sizes of several DG units are estimated by soft computational techniques such as GA,PSO etc. [16][17][18]. Realizing the full potential of transmitting power lines when there are crowded networks, requires costly and time consuming efforts.These are such as building new lines or installing FACTS systems which provide alternative solutions as they increase the performance of existing networks by redispatching line flow patterns in a way that does not reach the thermal limitations. Thus they meet the contractual specifications between grids [19].The advantages of such systems within transmission network are highly dependent upon their configuration, scale, number and position [20]. For allocation, there are two options; (a) Singular FACTS system allocation (b) Numerous FACTS system allocation. In the first category; a single system form will be positioned at a number of optimal selected locations. The FACTS selection method then continues to determine the best locations including values for the system chosen like TCSC [21], STATCOM [22], UPFC [23] and SVC [24]. Implementing a combination of different forms of FACTS systems allows the advantages to be considered for every single type. In the corresponding research; two or three forms of FACTS systems like TCSC, SVC, and TCVR etc. are incorporated in synchrony to obtain the benefits using a soft computational method such as a GA or bacterial swarm algorithm [25,26].
The credibility of the proposed method is compared with existing methods on different power system networks. The optimal positioning of multi-DG with existing techniques are the methods like network reconfiguration [3], law adjustment factor [8], tabu search [9], mesh connected system [15], frequency domain analysis [35], pattern recognition approval [36], decision tree regression [37] & many more as shown in [4, 5, 7, 10-14, 17, 18, 20, 21, 24-33]. The estimated THD value is in the range 15-18%, the estimated accuracy and selectivity are in the range 11-17%, and the estimated MSE is in the range 13-19%. The methods used in [35][36][37] will be taken as an example in Sect. 3 for performance comparison with the proposed technique.
In [43], a deterministic method is used to find the optimal sizing and location of DGs in two different locations considering both cost and complexity. Similarly [44] addressed levied cost and net present cost in estimating optimal location and sizing. The real power loss estimation is not uptothe mark for selecting the location of DGs [44]. Different techniques like wind curtailment indexed OPF, voltage profile analysis based on OPF, Fischer-Burmeister algorithm, multi-period ACOPF, sensitivity analysis, multi-period OPF, clustering and sensitivity analysis, analytical approaches based on a 2/3 rule, on differentiation of power losses, with fuzzy logic, based on reliability indices and based on sensitivity factor are presented in [41,42]. All such techniques deal with a huge amount of data along with complex mathematics for deciding the optimal location and sizing of DGs. Furthermore, these techniques do not provide proper results in terms of THD, MSE and accuracy. Our proposed approach addresses such deficiencies while the reduction and improvised value of all such parameters with simpler mathematics is also a novelty of the proposed scheme. We also note that by doing overall performance comparison with existing techniques, there is a considerable scope for improvement in optimal DG location determining parameters such as real power losses, THD, accuracy, selectivity and MSE for enhanced power system operations.To improve performance, probability heuristic pdf and ANN are proposed for determining the sizing and location of DGs with improved THD, accuracy, selectivity and MSE. Initially, the mathematical heuristic probability distribution method is designed for determining the optimal location and sizing of multiple DGs ( two in this study) on standard IEEE 9-bus and IEEE test 57bus system. The performance parameters for deciding the optimal location are the real power losses, accuracy, selectivity, THD and MSE. A similar kind of performance analysis for optimal multi-DG location is analysed with ANN using a feed forward method based back propagation delay for both standard systems.
Once the positions of multi-DGs are decided, DG sizing in terms of real and reactive power is assessed for the distribution network. It is found that the ANN gives better results over heuristic pdf in both IEEE standard system for deciding the optimal location of multi-DGs, lower real power losses, improved accuracy and selectivity, lower THD and lower optimal real & reactive power of multi-DGs. Placing & sizing of multi FACTS are then decided in the transmission network. The criteria for placing the multi-FACTS devices are decided on the basis of buses having higher THD so that power quality can be improved. Three types of multi-FACTS devices are used: TCSC, TSC and STATCOM. The minimization of THD is achieved by switching the TCSC and TSC using SPWM while switching of STATCOM devices is done through ANFIS. After placing the multi-FACTS at appropriate positions, then their sizing is estimated in terms of real and reactive power by considering its respective switching method. This paper is organized as follows.: Sect. 2 consists of problem statement, while Sect. 3 describes the structure of the standard IEEE 9 and IEEE 57-bus systems, Sect. 4 discussed the optimal location and sizing of multi-DGs, while the optimal location and sizing of multi-FACTS devices are discussed in Sect. 5, Sect. 6 presents the results and Sect. 7 draws the conclusion.

Problem statement
In order to meet load demand, DGs are placed at various locations in the IEEE 9-bus & 57-bus systems to determine the optimal locations. A heuristic approach and ANN methodology are proposed to find the real power losses of the system. Multi-DGs are connected at those buses such that the real power losses are minimized and their sizing is evaluated by the proposed two approaches. The expressive function to find the optimal position and sizing of multi-DGs is: where J is the complex power for loss minimization and S i is the complex power at a particular bus. The detailed information on these terms will be discussed in Sect. 3.
• The placing of multi-FACTS is being decided by THD values. Buses having higher THD values will be preferred for placing the different devices. Three FACTS devices are placed i.e. TCSC, TCR, STAT-COM and then their optimal sizing is resolved by ANFIS.

Structure of IEEE standard bus systems
The optimal location of multi-DGs are realized on IEEE 9-bus and 57-bus systems whose structures are shown in this section.

Structure of standard IEEE tested 9 bus system
The effectiveness of the proposed scheme using a conventional approach is tested intially on the standard IEEE test 9-bus system [35][36][37]. It consists of 9 lines, 9 buses, 3 generators and 3 loads at bus no. 5, 7 and 9 as shown in Fig. 1. The internal line parameters of the system are given in Table 1.
Optimal power flow analysis is performed on the IEEE 9-bus system using the Newton Raphson (NR) method which is a traditional method for load flow analysis [34].
(1) J = f (S loss, accuracy, THD, selectivity, MSE, S i ) The performance parameters such as real power loss, accuracy, THD, MSE and selectivity obtained using the NR method are shown in Table 2 for a system without DG. It has high real power loss & poor accuracy, poor selectivity, high MSE due to load requirement not being fulfilled effectively.
The proposed heuristic pdf is applied to the IEEE 9-bus system to improve the performance parameters which are shown in Table 3. It can be seen that performance parameters obtained with heuristic pdf are better than those with the NR method and show lower real power loss,improved accuracy and selectivity, improved  THD and MSE. Similar results are also obtained in the IEEE 57-bus sytsem for heuristic pdf over NR The design aspect of obtaining the performance parameters using heuristic pdf is discussed in Sect. 4. The comparative results as dicussed further are sufficient to show the superiority of the proposed heuristic pdf method over the others.

Structure of IEEE 57 bus system
The layout of the modified IEEE 57-bus system is shown in Fig. 2 Table 4 and the performance analysis is shown in Table 5.
After considering the internal parameters of the IEEE 57-bus system [40], a multi-objective function has to be decided which is a function of real power loss, accuracy, sensitivity, THD and MSE for deciding the location and sizing of multi-DGs under heuristic probability distribution method. The design aspects and performance parameter are discussed in Sect. 4.1.1. By considering these aspects, the real power loss estimation is shown in Table 4 and performance parametric analysis is. carried out as shown in Table 5. It can be seen from Table 6 that the heuristic pdf methodology for IEEE-9 bus system gives better results than the existing methods such as the frequency domain [35], pattern recognisition approaches [36] and decision tree regression approaches [37]. A few samples of the IEEE 57-bus system have been taken for the performance parameter comparison with existing techniques [38][39][40] as shown in Table 7. It can be seen that the  proposed heuristic pdf technique gives better results than existing ones.

Optimal location and sizing of multi-DG
After deciding the structure and internal parameters of the modified IEEE 9-bus system, optimal location and sizing of multi-DGs are decided considering that different DG's have to be connected to meet the load demand. In this section, strategies for optimal location and sizing (2 DGs in this paper) will be discussed.

Optimal location of multi-DG
Initially, the main target is to place multi-DGs at particular buses to fulfil the load demand. Since load demand is fixed for all buses, selection of buses for DG placing are assessed in terms of minimum real power loss, improved accuracy and selectivity,lower THD and MSE. The selection of DG's location is analysed by heuristic pdf and ANN.

Heuristic probability distribution method (pdf)
The location of DGs decided by the heuristic probability distribution method given as: where C 1 is the accuracy of real power measurement given as P i P i which is usually in range of 0.02-0.04. whereas C 2 is the accuracy of reactive power measurement given as Q i Q i which is usually in range of 0.03-0.05. Power flow errors at bus 'i' are given as: where P i and Q i are the respective real and reactive power flow between 2 buses given as: where conductance (G ij ) and susceptance (B ij ) are given as: The accuracy, selectivity, MSE and THD are defined as: Performance parameter evaluation using heuristic pdf The optimal performance parameter for posi- tioning the multi-DGs is the total real power loss in the transmission lines. The optimal placing of DG is preferred where minimal real power lossof thewhole transmission line network measured from Eq. (10) is achieved while meeting the load requirement. In addition to real power loss other parameters, e.g.accuracy, selectivity, MSE and THD are also measured from Eq. (16), (17), (18) and (19). The lower values of these additional parameters also affect the positioning of multi-DGs as the multi-objective function comprises real power loss, accuracy, selectivity, MSE and THD.The performance of IEEE 9-bus and IEEE 57-bus system are evaluated using the heuristic pdf method. There is significant scope for the improvement of results. This will be analysed using ANN in the next section.

Artificial neural network (ANN)
This section also uses the IEEE 9-bus and IEEE 57bus systems for placing the DGs. ANN is used to train the weights in the relevant mathematical expressions, where the weights are the controller being continuously trained with the help of feed forward method using back propagation. The design of the ANN is done by further extending Eq. (10) by taking log on both side as: Equation (20) can be further arranged as:    The popular expansion of logarithmic series is given as: where The structure of ANN is shown in Fig. 3 from Eq. (24). Figure 3 is the open loop structure for determining the optimal location of DGs. In this case; a proper solution is not obtained while the parameters used in this structure are shown in Table 8.
The design of ANN is extended using a feed forward method based on back propagation delay for better output as shown in Fig. 4. To elaborate the mathematics of the feed forward mechanism of the ANN using back propagation delay, it is clear from Fig. 4 that the output of ANN is compared with the reference value of output to give an error which is analysed through the feed forward method using back propagation delay.
The mechanism of estimating the error is done by using steepest descent algorithm given as: whereas i = 1,2 and 3 and η = 0.8.
From the steepest descent algorithm, the error is given as: After using the feed forward method, weights are also upgraded. These further modify the output. The processes of upgrading the weight are shown as: The rate of changes of error with weights are shown as:  Substituting Eq.  Table 11 while (W) old are the previous values of the weights.
The process of attaining the performance parameters for the proposed and existing methods is explained in the flowchart in Fig. 5

Performance
parameter evaluation using ANN After applying ANN for estimating the different parameters of the IEEE 9-bus system, it is seen that real power loss, accuracy, MSE, selectivity and THD have been improved in comparison to the heuristic pdf method. The comparison between ANN and heuristic method is shown in Table 9. The best value of MSE for bus 8 is 9 × 10 -10 . This is obtained after testing, training and validation of the ANN system at 25 epochs where epoch refers to a kind of iterative value. It can be seen that output is converging faster towards the regression line. Performance parameters of the IEEE 9-bus system with ANN are better than heuristic pdf in terms of lower real power loss, accuracy, THD. Real power loss is a minimum in buses 8 and 9 and consequently the two DG's are preferably placed at buses 8 and 9 so the load requirement can be met while these buses also have minimum MSE and THD. The comparative performances among ANN, heuristic pdf for the IEEE 9-bus system and NR method (without DG) in terms of multi-objective parameters such as real power loss, THD, accuracy, selectivity are shown in Table 2 and 9 in determining the optimal location of multi-DGs. The performance parameters show better results with placement of multi-DGs under ANN than with heuristic pdf.
In a similar way, the best location of placing the multi-DGs in the IEEE 57-bus system can befound using heuristic pdf discussed in Sect. 4.1.1 and ANN in Sect. 4.1.2.
The parametric analysis for estimating the best location of multi-DGs in the IEEE 57-bus system using both methods is shown in Table 10. The upgraded values of the weights are depicted in Table 11. The performance parameters have improved with ANN over the heuristic pdf method. The real power loss has been greatly reduced with ANN which shows its effectiveness over heuristic pdf. Buses 13 and 15 are the best places to locate the two DG's because this leads to minimum real power loss and other improved parameters in comparison to other buses. This can be seen from Table 8 by considering only a few selected samples of the IEEE 57-bus system because of space considerations though realisation and performance analysis for all the parameters have been assessed at all buses.

Optimal sizing of multi-DG
The optimal sizing of DGs is the next objective after selecting the optimal locations. The sizes of DG are expressed in terms of real and reactive power while the expression for estimating the real and reactive power is obtained from Eq. (10) under heuristic pdf and Eq. (20) under ANN by minimizing the real power loss in per unit term. The comparative performance in terms of DG size under both techniquesfor the IEEE 9-bus system is shown in Table 12.
It can be concluded from Table 12 that sizes of multiple DG's are minimum when placed at buses 8 and 9. From the above discussion, it can be concluded that buses 8 and 9 are the best locationsfor the multiple DGs.The concise information for DG sizes at buses 8 and 9 is shown in Table 13.
In the similar way sizing of DG's is decided for the IEEE 57-bus system using Eq. (10) and (20). The testing for the performance analysis is assessed at all the buses which is shown in Table 14.
From Table 14, it can be seen that buses. 13 and 15 have the minimum demands of real and reactive power and thus sizes of the DG's can be kept minimum at those locations. Thus, buses 13 and 15 are the best sites for placing the DG's in the IEEE 57-bus system in terms of sizing and location.
We note that a few buses have higher THD which give rise to power quality issues. To improve power quality and minimise the THD, FACTS devices are positioned at transmission locations of the IEEE 9-bus and IEEE 57-bus systems. The location& sizing of multi FACTS devices are discussed in the next section.

Positioning and sizing of multi FACTS device
The positioning and sizing of multi FACTS devices in the IEEE-9 bus and 57-bus system have to be assessed in a transmission network if the power quality performance parameters are to be improved. The three different types of FACTS devices are considered, i.e., TCSC, TSC and STATCOM. The devices can improve the power quality at selected buses having a high THD value. TCSC is a series type FACTS device while TSC and STATCOM are shunt types. Four nearby terminals of buses are required to connect these three FACTS devices. As per the requirements from Table 7, buses 4-5-6 and 7 are selected for the TCSC, TSC and STATCOM for the IEEE 9-bus system. From Table 8, buses 9, 10, 12 and 16 have the worst THD in the IEEE 57-bus system. Thus they are selected for allocation of the devices.

Optimal location and sizing of TCSC
TCSC is a thyristor-controlled series compensator and preferably is connected to the transmission network nearby buses 5 and 6 for the IEEE 9-bus system, as shown in Fig. 6. Similarly, TCSC is preferred to be connected to the transmission networks between bus 9 and 10 for the IEEE 57-bus system. The structure of the TCSC shows the connection of anti-parallel thyristors with an inductor and the complete combination in parallel with a capacitor. The inductor and capacitor combined act as filter to remove the harmonics. The switching of the anti-parallel thyristor is doneusing theSPWM technique as shown in Fig. 7. This switching process predominantly minimises the harmonics. The process of controlling the thyristor is the same for both IEEE systems. The performance comparison of THD and real power flow between buses 5 and 6 is shown in Tables 15 and 16, respectively. From Fig. 7, the real power (P 56 ) and reactive power (Q 56 ) flow from buses 5 to 6 is measured, andcompared  Table 9 Performance parameter with IEEE-9 bus system for different location of DG using ANN and heuristic pdf with its reference value in SPWM. Thecompared results of active power passed through the PI controller to generate firing angle (α) while the compared results of reactive power is passed through PI controller to a generate modulation index (m): The PI parameters are decided by trial and error, and are given as K p1 = 2.9, K i1 = 9.65, K p2 = 13.65, K i2 = 17.21.
The comparative graphical analysis of real power flow between buses 5 and 6 with and without TCSC is shown in Figs. 8 and 9, respectively. It can be seen that the harmonics level/THD in the real power flow has (36)     been improved with the TCSC. The detailed analysis of THD improvement is shown in Table 17. With the same mathematical analysis, comparisons of real and reactive power between buses 5 and 6 with and without the TCSC are shown in Table 18. It is seen there that power flow between buses 5 and 6 with TCSC is reducedcompared to the heuristic pdf and ANN (without TCSC). A similar performance analysis is carried out for the IEEE 57-bus system using switching of TCSC based on Eq. (36) and (37). The TCSC is connected between buses 9 and 10.
The power quality improvement (in terms of THD) for the real power between buses 9 and 10 with and without the TCSC is shown in Table 17. THD has been improved with the TCSC between these buses. However, power flow between buses 9 and 10withthe TCSC is lower in comparison than the heuristic pdf and ANN (without TCSC) which is shown in Table 18. The real power flows without and with TCSC are shown in Figs. 10 and 11, respectively.
The size of the TCSC is also optimally minimized while satisfying its requirement for reducing the harmonics. A smaller size of FACTS device also makes the systemmore economical.

Optimal location and sizing of TSC
The TSC is thyristor switched capacitor which is of a shunt type. TSC is preferably connected to bus 4 of the IEEE 9-bus system because of the high value of the THD at the bus. The TSC contains two anti-parallel thyristors with a capacitor as shown in Fig. 12.
The capacitor can act as a filter to remove the harmonics. Further, switching of the anti-parallel thyristor is done using the SPWM technique. It minimises the harmonics as shown in Fig. 13.
From Fig. 13, the real power (P 4 ) and reactive power (Q 4 ) flow towards bus 4 of IEEE 9-bus system is measured, and compared with its reference value in SPWM. The results passed through PI controllersto produce the firing angle (α) and modulation index (m) as: Similarly, the PI parameters are decided by trial and error, and are taken as K p3 = 5.97, K i3 = 12.67, K p4 = 15.71, K i4 = 18.91.
The comparative graph of real power at bus 4 with and without the TSC is shown in Figs. 14 and 15, respectively. The harmonics level/THD in real power flow has been improved with the involvement of the TSC. The detailed analysis of THD improvement is shown in Table 19.
It has already beenshown that the THD is lower with ANN then the heuristic pdf without TSC. The useof the (38)   TSCfurther helps to reduce the THD level comparedto without TSC.With the same mathematical analysis, comparison of real and reactive power at bus 4 with and without TSC is shown in Table 20. Power flow at bus 4 due to TSC is reducedcompared with the heuristic pdf and ANN (without TSC). The placing of the TSC in the IEEE 57-bus system has also been assessed and it is preferable to connect it at bus 12. The effect of connecting the TSC therein improving the THD real power flow at the bus is shown in Tables 21 and 22 respectively. Similarly, the TSC size is optimally minimized while satisfying it's requirement to reduceharmonics.

Optimal location and sizing of STATCOM
The STATCOM is a static compensator which is also a shunt FACTS device. It is preferable to connect it at bus 7 of the IEEE 9-bus system because of high THD. The structure of the STATCOM is shown in Fig. 16.
The structure shows the connection of anti-parallel thyristor with the capacitor. The capacitor sometimes acts as a source to ignite the anti-parallel converters. The process of switching the thyristor is shown in Fig. 17.
To improve the power quality performance, the STATCOM is controlled using ANFIS in which weights of the system are trained by employing a fuzzy logic controller. In this paper; the STATCOM is connected to the bus with the highest harmonic distortion.
From Fig. 17 the measured real power and reactive power is compared with respective reference values and the errors are passed through PID controllersto generate outputs E1 and E2 as: The parameters of the PID controller are. K p5 = 7.98, K i5 = 11.99, K d5 = 6.87, Kp 6 = 35.14, K i6 = 38.65, Kd 6 = 35.91.
From Fig. 17 it is clear that the inputs to ANFIS are E 1 and E 2 and the output is the overlap angle α.  Considering the particular converter topology, the generated voltage of the STATCOM V o is given as: The real power and reactive power exchanges between the STATCOM and bus 7 can be inferredfrom Eq. (13) and (14). Thus, change in the α of the converter output voltage Vo will result in the change of measured real and reactive power from bus 7. The closed loop system of the ANFIS structure is shown in Fig. 18.
As can be seen, from the inputs E1 and E2, the samplings are done from A1, A2, A3 and A4 to generate the outputs μ1, μ2, μ3 and μ4, which further gives weights W1 and W2.  The samples are triangular in nature, and the selection of weights from samples is shown in Fig. 19. The empirical mathematical relationship between weights and samples are given as: The outputs of the weights are shown in weighted average value form because it is in the middle of the sample as shown in Fig. 20.
Since all samples are taken in triangular form, the mathematical representation of sample output (μ) is given as: The sample outputs are chosen to be triangular in shape in order to have precise results with good accuracy.
In Table 23, the mapping between inputs and output is shown with inputs W1 and W2, and the output is α. The mapping between inputs and output is applied in order to train the weights in the closed loop structure. Again, the steepest descent algorithm is used to check the error sampling from Fig. 19. Once the output is obtained, a feed-forward method using back propagation delay is applied. Training the weights using ANFIS, starts with the first weight W1.
The error due to first weight W1 is E1 which is shown as: The upgraded weight is given as: P 7 is the real power flow at bus 7 and is dependent on α as: Substituting Eq. (49) into Eq. (47) and differentiating it, yield: For the second weight W2, training is by using the steepest descent algorithm for which error E2 is given as: Q 7 is the reactive power flow at bus 7 given as: (52) Q 7 = k 2 cos(α)Sin(α)  Substituting Eq. (52) into Eq. (51) and differentiating it, yields: The old and new values of weights cannot be absolute values because they are trained through a fuzzy logic controller and thus, they are fuzzy variables which show in membership form in Table 23. These uncertain variables are trained in closed loop as shown earlier in Fig. 18.
After designing the ANFIS for switching the STAT-COM, real power flow at bus 7 of IEEE 9-bus system is shown in Fig. 21. For comparison, real power at bus 7 with and without the STATCOM is shown in Fig. 22. It is evident that harmonics level or THD in real power flow has been improved with the involvement of the STAT-COM. The detailed analysis of THD improvement is shown in Table 24. Table 25 further compares realand reactive power at bus 7 with and without the STATCOM with the heuristic pdf and ANN. As shown, the power flow at bus 7 due to the STATCOM is lowerthan the heuristic pdf and ANN (without STATCOM).
The placing of the STATCOM in the IEEE 57-bus system has also been assessed and it is preferable to connect    the STATCOM are optimally minimized while satisfying the requirements for reducing the harmonics.

Results and discussion
Location and sizing of multi-DGs using an ANN and the heuristic pdf method are studied and two DGs are connected to the respective IEEE 9-bus and IEEE 57-bus systems to also minimize losses as well improving accuracy, selectivity, THD and MSE. The following parts are analysed in the system: • Initially the optimal power flow is assessed with the IEEE 9 bus system using the NR method and poor quality of performance parameters, e.g., THD, MSE, accuracy, selectivity and real power loss, are attained as shown in Table 2 due to a load requirement that is not met. Similar results for performance parameters have also been obtained with existing methods. • The multi-DGs are placed in the standard IEEE 9-bus and 57-bus systems in which compara-tive performance analysis for optimal location of multi-DGs is assessed in terms of multi-objective parameters such as line real power loss, accuracy, selectivity, THD and MSE. It is seen that performance parameters are improved with the ANN when compared to the heuristic pdf for deciding the optimum solution for multi-DGs in the IEEE 9-bus system discussed in Table 9. It is also seen that after determining of buses 8 and 9 as the best optimal positions for the two DG's; optimal sizing for multi-DGs has been determined among all buses and the optimum solution comes out to be at buses 8 and 9 in terms of minimum real and reactive power. It is found that determination of DG sizes is more satisfactory under an ANN than with a heuristic pdf as illustrated in Table 6. A similar type of behaviour is obtained for the IEEE 57-bus system in Table 7 in which buses 13 and 15 are selected for allocation of multi-DGs and the optimal minimum sizes in terms of real and reactive power are observed with buses 13 and 15.The  real and reactive power has distortions and thus multi-FACTS are located. Here, three FACTS devices are used, namely, TCSC, TSC, and STAT-COM, and their positioning on the IEEE-9 and IEEE 57-bus systems are assessed as they are connected to the buses that have the worst THD performance. Thus, a transmission network nearby to buses 4,5,6, and 7 are found to be the most suitable for locating the multi-FACTS devices in the IEEE 9-bus system. The TCSC is connected to between buses 5 and 6, the TSC is connected to bus 4 and the STATCOM is connected to bus 7. In order to improve the THD, switching of the TCSC and TSC is done using SPWM while switching of the STAT-COM is done using ANFIS. The worst THD levels at buses 4,5,6, and 7 have improved by using multi-FACTS devices as shown in Tables 15, 19, and 24. The requirement of real and reactive power at a particular bus where FACTS devices are connected reduces effectively in comparison with when there are no FACTS devices connected on the same bus as analysed through Tables 16, 20 and 25. Similarly, for the IEEE 57-bus system, buses 9,10,12, and 16 are found to be suitable for locating the multi-FACTS devices. Hence the TCSC is connected between buses 9 and 10, the TSC is connected at bus 12 and the STATCOM is connected at bus 16. The THD levels at the relevant buses have been improved by using multi-FACTS devices as shown in Tables 17, 21

Conclusion
This paper presents the optimal location and sizing of multi-DGs (two DGs) in the IEEE 9-bus and IEEE 57-bus system with the heuristic pdf and ANN method which are used because fixed load demand is not fulfilled satisfactorily with the NR method (without-DG) while giving poor performance parameters. Accordingly, associated distributed bus locations are examined for analysis of the impact of multi-DGs optimum positioning and sizing. The optimal location of multi-DG's is measured in terms of multi-objective parameters such as line power loss, accuracy, selectivity, THD and MSE while sizing of DG is measured in terms of real & reactive power. It is evident that the deployment of the ANN leads to better quality parameter such as line real power loss, accuracy, THD, MSE and selectivity compared to the heuristic pdf method and other existing methods. Determination of multi-DG sizing is resolved quite satisfactorily under the ANN with lower real and reactive power than the heuristic pdf. Further positioning of multi-FACTS devices including the TCSC,TSC and STAT-COM in the transmission network of the IEEE-9 and IEEE 57-bus system is being decided on the basis of high THD associated with particular buses. It is found that connection of multi-FACTS devices to transmission line near to respective determined buses improves the THD in comparison to without these devices. The application of intelligent techniques like SPWM and ANFIS for controlling the converters also helps to obtain the minimal optimal size of multi-FACTS while improving the power quality in the most economic manner.