## 4 Problem Formulation
### Algorithm Results over 24 \(H\)
At the characteristic terminal KTS 16 0.4 kV, the standard's requirements are fully complied with, while at the characteristic terminals Terminal 12 and Terminal 31, the APFs could not reduce the values of all harmonics above the prescribed limits. Although the harmonic values were reduced, it is noticeable that the values of the 9 th, 15 th, 19 th, and 21 st harmonics are still above the values prescribed by the standard. Figure 9: \(THD_{V}\) values at 4:00 a.m. at all buses of the test network. Due to the test network's physical limitations and load, the optimization method could not implement sufficiently powerful filters. Although the prescribed values are low--for the 15 th and 21 st, \(U_{h}\leq 0.5\%\)\(U_{\mathrm{nr}}\), and for the 19 th harmonic, \(U_{h}\leq 1.5\%\)\(U_{\mathrm{nr}}\)--the optimization method failed to eliminate the harmonics that exceeded the standard prescribed limits completely. Achieving these voltage harmonic values requires a lot of energy, which the APFs would need to supply to bring these harmonics to the desired standard prescribed limits. Figure 10: The test network state at 5:00 p.m. on the characteristic terminals before (**a**) and after (**b**) the optimization process. values. To verify the performance of the optimization process aimed at minimizing \(THD_{\text{V}}\) across all buses in the test network, it is necessary to observe the \(THD_{\text{V}}\) state at all buses, as illustrated in Figure 11a. Figure 11b presents the \(THD_{\text{V}}\) values at all buses for the phase with the worst state, which is in this state phase B. The obtained optimization process results confirmed that the \(THD_{\text{V}}\) value in all buses of the test network has decreased. The reduction in \(THD_{\text{V}}\) across all buses varies from 13.75% (bus 74) to 17.92% (bus 41). The highest relative reduction, as expected, is in bus 41, as an APF was connected to that bus. Observing the \(THD_{\text{V}}\) value and examining the load per phase is also important. It is noted that phase B, in this state of the test network, exhibits the highest relative values of harmonic distortion close to the value of 8% \(U_{\text{n}}\), which is the upper limit value defined by the EN 50160 standard. For the network state with \(THD_{\text{V}}\) values between 5% \(U_{\text{n}}\) and 7% \(U_{\text{n}}\), problems in the network appear more frequently. The reduction in \(THD_{\text{V}}\) in phase B through optimization processes was also successfully performed in all buses of phase B with the relative decrease in this phase ranging from 10.93% to 14.29%. The maximum \(THD_{\text{V}}\) value before the optimization in phase B was 7.89% \(U_{\text{n}}\) at bus 55. Following the optimization process, the \(THD_{\text{V}}\) value at this bus decreased to 6.80%, resulting in a relative reduction of 11.56%. The \(THD_{\text{V}}\) reduction somewhat satisfies the condition of the test network. Still, due to the aforementioned physical limitations related to the load, the target desired value of \(THD_{\text{V}}\) < 5% \(U_{\text{n}}\) could not be achieved. After optimization, the total relative reduction in harmonic losses in the observed time interval is 9.78%. In the other time intervals for this test network's state, harmonic losses decreased from 1.75% (achieved at 9 p.m.) to 15.38% (achieved at 7:00 a.m.). * **Fourth state of test network (9:00 a.m., 12:00 a.m., 2:00 p.m., and 8:00 p.m.)** The fourth state of the test network is also considered a normal network state, and it appears during the four time intervals. The time intervals of the fourth state refer to the test  
Figure 11: \(THD_{\text{V}}\) values at 5:00 p.m. before and after the optimization process: (**a**) for all buses of the test network; (**b**) \(THD_{\text{V}}\) values in phase B on all buses of the test network.