%% Nyquist Plot of Exclusion Disk
% As described in Stability Analysis Using Disk Margins, for a given σ, the largest uncertainty disk F for which the closed-loop system feedback(L*F,1) remains stable can be interpreted as an exclusion region that the Nyquist curve of L cannot enter. For any value of σ, the exclusion disk contains the critical point (–1,0) and is tangent to the Nyquist curve. The skew adjusts the size and position of the tangent disks. You can use diskmarginplot to visualize these exclusion disks and superimpose them on the Nyquist curve of L.
% Compute disk-based gain margins for a system using three different skew values, one corresponding to more gain increase than decrease (σ > 0), one corresponding to more gain decrease than increase (σ < 0), and one balanced (σ = 0).

L = tf(25,[1 10 10 10]);
DMdec = diskmargin(L,-2);
DGMdec = DMdec.GainMargin;
DM = diskmargin(L,0);
DGM = DM.GainMargin;
DMinc = diskmargin(L,2);
DGMinc= DMinc.GainMargin;

% To view the corresponding exclusion regions, plot the Nyquist plots of L and hold the figure. Then use diskmarginplot with the 'nyquist' flag to add the exclusion regions to the plot.

nyquist(L)
hold on
diskmarginplot([DGMdec;DGM;DGMinc],'nyquist')
hold off

% As σ increases from –2 to 2, the disks move to the right, and each disk provides lower estimates of the classical gain and phase margins.
%
% Copyright 2019 The MathWorks, Inc.