Do you have an example for a script based active harmonic filter?
PowerFactory has no Active Filter model within its library. In the FAQ “How do you model active harmonic filters for harmonic load flow calculation?” an example is given how to set up an active harmonic filter for a parallel device manually.
https://www.digsilent.de/index.php/en/faq-reader-powerfactory/how-do-you-model-active-harmonic-filters-for-harmonic-load-flow-calculation.html
However, it does not work for non parallel harmonic loads and needs a hand calculation.
In the attached example project there is a prepared Python script (“Active Filter Script.ComPython”) that iteratively changing the harmonic angle output of an active filter (Static Generator object) to control the harmonic current over a cubicle.
Both, cubicle and Active Filter needs to be in the same voltage level and are input objects for the Python script.
After execution of the script (e.g. with the button in the diagram) the results are stored in the result file and the pointer diagram (output order 5th harmonic), the current spectrum and the current waveform plot is shown.
First, run the Harmonic Load Flow for Study Case “01_Without Filter”. After that, run the script in “02_With Filter” and the plots will show the comparison.
By changing the maximal number of iteration, the user can observe the iterative control process. See also the attached document. For example, in case of a maximum number of 2 iteration, it can be seen, that the result for some harmonics are worse than without filter. The control algorithm needs the two iteration to identify if the angle needs to be increased or decreased. After that, the resulting spectrum decrease and adjust the step size angle with every iteration until a target THDi value is reached.