terrencetec / kontrol

KAGRA control python package
MIT License
11 stars 0 forks source link

`kontrol.regulator.post_filter.post_low_pass()` doesn't optimize UGF well for high Q systems. #31

Closed terrencetec closed 1 year ago

terrencetec commented 2 years ago

Try not to use the UGFs from control.stability_margins() directly. It's not very robust for phase response that changes drastically over a small frequency range, i.e. the peaks of the high Q systems. Instead, try to scan the phase around the UGFs (define a range) and use that instead.

terrencetec commented 2 years ago

See 99d6ee5. Added oscillatory option.

Instead of using the plant itself to calculate the phase margin, we decompose the plant and use the first mode instead. This has a phase response as the lower bound of the plant. So we find UGFs from the original plant but phase margins from the first mode plant.

From the figure below, see how the single-mode plant "filters" out the phase responses of the higher frequency modes. Using the single-mode plant will avoid having UGFs that fall in the steep phase drop regions.

image

terrencetec commented 2 years ago

The issue is not closed just in case there's bug in the new function. The function is very complex and very long and we might need to break it down in the future.