Is it possible to plot gain margin and phase margin on the bode diagram?

I didn’t find anything about this in the documentation.

Try the function marginplot or just margin in case you want to obtain the margins as variables. The marginplot function is currently struggling slightly with MIMO systems and some systems with multiple margins, but it should work fine for simple systems.

1 Like

Perfect. Thank you!

Another function you might find interesting is diskmargin, this version of the gain and phase margins makes more sense for MIMO systems.

Thanks! But the link is not working …

Try Plotting · ControlSystems.jl

all doc links that included latest have recently changed to stable for some reason.