AO System Stability Analysis

This module can be used to check the stability of the ShaneAO woofer-tweeter reconstructor, as defined by calibration matrices and some ‘user specified’ control parameters. This assumes the Internal Mode Space Formulation and the Minimum Variance Reconstructor described in RTC_WindPCMeeting_PresentationV2a.pdf Please also refer to this document for a discusion of the stability analysis

The ‘user’ parameters are
g
the feedback gain
gamma
the integrator bleed (forgetting factor)
alpha
the time constant of the woofer filter (the rate at which woofer modes are removed from the tweeter)
beta
the time constant of the woofer
P
regularization matrix: a-priori covariance of the tweeter modes or inverse penalty of modes
Q
regularization matrix: covariance of the measurement noise or inverse penalty of slope-fitting error

Note

alpha, beta, and gamma should all be between 0 and 1 The feedback gain is recommended to be between 0 and 1 but up to 2 may still be stable

Example use:

from stability import *
pinit()
g_scan()
stability.alpha_beta_scan(clear=True, alpha_set=array([ 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7]))

Plot the eigenvalues of the stability matrix while scanning alpha and beta simultaneously. This can be shown as an animation if clear is set to True, or as a root-locus if clear is set to False

stability.analize()

Generate the stability matrix T given the present static settings of g, gamma, alpha, and beta

stability.g_scan(clear=True, g_set=array([ 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]))

Plot the eigenvalues of the stability matrix while scanning the feedback gain. This can be shown as an animation if clear is set to True, or as a root-locus if clear is set to False

stability.gamma_scan(clear=True, gamma_set=array([ 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]))

Plot the eigenvalues of the stability matrix while scanning the integrator gain. This can be shown as an animation if clear is set to True, or as a root-locus if clear is set to False

stability.pinit()

Initialize the plot. Draw a unit circle on the complex plane for reference. Clear any previous eigenvalue markers.

stability.pset(params=None)

Set the internal parameters. If no argument is given, the current parameter settings are printed out and returned as a 4-tuple

If the argument is a 4-tuple, then the internal parameters are set. The 4-tuple is (g, gamma, alpha, beta), where g: the feedback gain gamma: the integrator gain (forgetting factor) alpha: the time constant of the woofer filter (the rate at which woofer modes are removed from the tweeter) beta: the time constant of the woofer

stability.pshow(g_arg, clear=False)

Plot the eigenvalues of the stability matrix. The system is stable if they are all inside the unit circle