We present the study and results on automatic tuning and optimizing the closed-loop control gains of the
Proportional Integral (PI) controller for the high-order adaptive optics (HOAO) system. The Ziegler-Nichols
frequency response (ZNfr) method is examined using the Nyquist stability criterion to implement the automatic
tuning of PI controller by determining the ultimate gain, Ku, and ultimate period, Tu, of a process model, which
consists of components from adaptive optics (AO) system. The maximum magnitude criterion, 0.5 dB 2.3,
is identified and considered as the optimization method, which also established the stability of the PI controller.
MATLAB scripts are developed to execute iterative calculation of control algorithm, which automates real-time
simulation of the Simulink high-order adaptive optics (Sim-HOAO) models. Simulink block diagrams are used
to represent transfer functions, which described the frequency-domain behavior of the AO system.