How do you calculate gain margin and phase margin?
The gain margin is the factor by which the gain must be multiplied at the phase crossover to have the value 1. The phase crossover occurs at 0.010 Hz and so the gain margin is 1.00/0.45=2.22. The phase margin is the number of degrees by which the phase angle is smaller than −180° at the gain crossover.
How do you solve for phase margin?
The phase margin can be obtained by equating the magnitude of the frequency response to unity and solving for angle, and then adding 180°.