This technique is much more robust than gain & phase margins. https://arxiv.org/pdf/2003.04771.pdf https://www.youtube.com/watch?v=XazdN6eZF80&list=PLn8PRpmsu08qFLMfgTEzR8DxOPE7fBiin&index=2&ab_channel=MATLAB