I have found a definition of phase margin of amplifier system from Texas Instruments application report. This definition looks like this: $$\phi = tan^{-1} (A \beta)$$ where \$ A\$ is amplifiers open-loop gain (aka direct gain) and \$ \beta \$ is feedback return signal ratio - or \$ A \beta \$ known as loop gain. Now, \$ A\beta \$ would typically be a value ranging \$ 1000000 \$ to \$ 10000 \$ (in opamp amplifier systems, where open-loop gain is usually around \$ 120 dB \$).
Such values of \$ A\beta \$ inserted into upper definition of phase margin always equals (approximately) \$ \phi = 90° \$. So, using that equation for definition of phase margin must be definitely wrong, because it is not possible, for amplifier's phase margin to be \$ 90° \$ in all scenarios possible. Unless we would be discussing an example with \$ A\beta < 100 \$, which is very unlikely to happen.
Also, it would seem more logical if phase margin definition equation would be described as a function, dependent on poles of amplifier or \$s\$, damping factor or \$\zeta\$, frequency or \$\omega\$, etc.
I know how to find phase margin (and gain margin) from already drawn Bode plot, but I cannot solve it, using mathematical ways, not graphical.
Can anyone tell me, if this is the actual formula for calculation of phase margin? Or are there more data needed to solve such case? Would "fully defined" transfer function provide enough data for proper calculation of phase margin?