top of page

Horse Herd Optimization Tuned the PI Controller to STATCOM for Voltage Regulation

Horse Herd Optimization Tuned the PI Controller to STATCOM for Voltage Regulation

Objective Function (Cost Function): 

The optimization process begins by defining a cost function. In this context, the cost function is aimed at minimizing the error of the AC voltage controller, DC voltage controller, and current controller. The errors (E1, E2, E3, E4) are measured.


  1. Initialization: The optimization algorithm (referred to as "H optimization") requires initialization. This involves providing details such as lower and upper bounds, velocity limits, and the maximum number of iterations.

  2. Random Initialization: Random positions and velocities are generated for each "horse" or parameter set in the optimization. These parameters include KP and Ka for the AC voltage controller, DC voltage controller, and current controller.

  3. Cost Calculation: The objective function (cost function) is calculated for each set of parameters. The results are stored as a cost function for further analysis.

  4. Global Best Calculation: The global best solution is determined based on the calculated costs for each set of parameters.

  5. Main Loop: The main optimization loop involves updating positions and velocities based on certain conditions. Different categories of horses (Alpha, Beta, Gamma, Delta) are considered, and velocities are updated accordingly.

  6. Iteration: The optimization process iterates through the main loop, continuously updating positions and velocities, and calculating costs until a specified number of iterations are reached (in this case, 10 iterations).

  7. Result Display: The optimal values for KP and Ka for AC voltage controller, DC voltage controller, and current controller are displayed in the command window.

  8. Integration with Power System Model: The optimized parameters (KP and Ka) are then used in a state-space model representing a power system. The model includes elements such as a programmable voltage source, transformers, filter inductors, and voltage source converters with control systems.

  9. Simulation: The power system model is simulated, and the results, including errors and optimized parameters, are displayed.

  10. Conclusion: The optimization process aims to achieve optimal control of the power system by fine-tuning controller parameters to minimize errors and enhance performance.

2 views0 comments
bottom of page