# 稳定性与频率补偿

\begin{align*} \newcommand{\dif}{\mathop{}\!\mathrm{d}} \newcommand{\belowarrow}[1]{\mathop{#1}\limits_{\uparrow}} \newcommand{\bd}{\boldsymbol} \newcommand{\tx}{\text} \newcommand{\p}{\partial\,} \end{align*}

# General Considerations

$[X(s)-\beta Y(s)]H(s)=Y(s)\\ \Rightarrow \frac{Y}{X}(s)=\frac{H(s)}{1+\beta H(s)}$

\begin{aligned} \vert \beta H(j\omega_1) \vert &= 1\\ \angle \beta H(j\omega_1)&=-180^\circ\\ \end{aligned}

1. The slope of the magnitude plot changes by+20 dB/dec at every zero frequency and by−20 dB/dec at every pole frequency
2. For a pole (zero) frequency ofωm, the phase begins to fall (rise) at approximately $0.1ω_m$, experiences a change of $−45^◦ (+45^◦)$ at $ω_m$, and approaches a change of $−90^◦ (+90^◦)$ at approximately $10ω_m$

Consider the stability of a feedback system incorporating a one-pole forward amplifier. Assuming $H(s)=A_0/(1+s/\omega_0)$

$$H(s)=\frac{A_0}{1+\dfrac{s}{\omega_0}}\\ \Rightarrow \frac{Y}{X}(s) = \frac{\dfrac{A_0}{1+\beta A_0}}{1+\dfrac{s}{\omega_0(1+\beta A_0)}}$$
we plot $|\beta H|$ and $\angle \beta H$ in Fig. 10.5, observing that a single pole cannot contribute a phase shift greater than $90^\circ$ and the system is unconditionally stable for all nonnegative values of $β$
![Figure 10.5 Bode plots of loop transmission for a one-pole system](assets/images/Figure%2010.5%20Bode%20plots%20of%20loop%20transmission%20for%20a%20one-pole%20system.jpg)

# Phase Margin

\begin{aligned} \vert \frac{Y}{X}(\omega_2) \vert &= \frac{H}{1+\beta H}\\ &=\frac{1}{\beta} \frac{\beta H}{1+\beta H}\\ &=\frac{1}{\beta} \frac{\exp(-j135^\circ)}{1+\exp(-j135^\circ)}\\ &=\frac{1.306}{\beta} \end{aligned}

![GBW的直观含义](assets/images/GBW的直观含义.jpg)

• 计算 GBW：
• 先计算 $\omega_2$ 处的增益：$A(\omega_2) = 20\lg(A_0)-20(\lg\omega_2-\lg\omega_1)$
• 再求解 GBW 的方程：$40\lg(\text{GBW}/\omega_2)=A(\omega_2)$
• 或者像我一样，直接一条公式搞定：$\text{GBW} = \sqrt{A_0\omega_1 \omega_2}$
• 代入如下公式：

\begin{aligned} \text{PM} &= 180^\circ - \arctan(\tx{GBW}/\omega_1)-\arctan(\tx{GBW}/\omega_2)\\ &=90^\circ - \arctan(\tx{GBW}/\omega_2) \quad {\rm if\; \tx{GBW} \gg \omega_1} \end{aligned}

$$\arctan A + \arctan B = \arctan \frac{A+B}{1-AB}\\ \angle A = \arctan \frac{\tx{img}(A)}{\text{real}(A)}$$

$$\frac{k}{(1-AB)+j(A+B)}\\ A=\frac{\text{GBW}}{\omega_1},\; B= \frac{\text{GBW}}{\omega_2}$$ 假设二阶系统的开环增益为 $A_O = \dfrac{A_{v0}}{(1+j\omega/\omega_1)(1+j\omega/\omega_2)}$，那么：
\begin{aligned} \beta A_O &= \frac{\beta A_O}{(1+j\omega/\omega_1)(1+j\omega/\omega_2)}\\ &=\frac{\beta A_O}{(1-\dfrac{\omega^2}{\omega_1\omega_2})+j(\dfrac{\omega}{\omega_1}+\dfrac{\omega}{\omega_2})} \end{aligned}

# Compensation of Two-Stage Op Amps

## Miller Compensation

$A_v = A_{v0} \frac{1-\dfrac{C_c}{g_{m2}}s}{1+(R_{n1}C_{n1}+A_{v2}R_{n1}C_c+R_LC_L)s+R_{n1}R_L CC s^2}\\ \tx{where}\\ A_{v0} = -A_{v1}A_{v2}=-g_{m1}g_{m2}R_{n1}R_L\\ CC = C_{n1}C_c+C_{n1}C_L+C_cC_L$

$A = A_0 \frac{1-cs}{1+as+bs^2}$

$s_z = \frac{1}{c}\\ 主极点\; s_{p1} = -\frac{1}{a}\\ 非主极点\; s_{p1} = -\frac{a}{b}$

• 当 $C_c$ 较小时，$a$ 可看作与 $C_c$ 无关
• 当 $C_c$ 较大时，$a=A_{v2}R_{n1}C_c$
• 此时的主极点为 $f_d = \dfrac{1}{2\pi A_{v2}R_{n1}C_c}$，显然 $C_c$ 越大，$f_d$ 越小
• 非主极点为 $f_{nd}=\dfrac{A_{v2}R_{n1}C_c}{2\pi R_{n1}R_L CC}$
• 如果 $C_c$ 不够大，那么 $CC\approx C_{n1}C_L$，显然 $C_c$ 越大，$f_{nd}$ 越大
• 如果 $C_c$ 很大，那么 $CC\approx C_c(C_{n1}+C_L)$，此时 $f_{nd}$ 与 $C_c$ 无关。

### Choice of Cc

$C_c$ 不能太小，也不能太大。前面说了，$f_{nd}$ 一般是 $3 \tx{GBW}$（对应 70° 的相位裕度），所以我们可以利用这个求出 $C_c$

\begin{aligned} f_{nd}&=\frac{A_{v2}R_{n1}C_c}{2\pi R_{n1}R_L CC}\\ &=\frac{g_{m2}C_c}{2\pi (C_{n1}C_c+C_{n1}C_L+C_cC_L)}\\ &\approx \frac{g_{m2}}{2\pi C_L} \frac{1}{1+\dfrac{C_{n1}}{C_c}} \end{aligned}

$\frac{g_{m2}}{g_{m1}} = 3 \frac{C_L}{C_c} \left(1+\dfrac{C_{n1}}{C_c}\right)$

$\frac{g_{m2}}{g_{m1}} = 4 \frac{C_L}{C_c}\\ \Rightarrow g_{m2} C_c = 4 g_{m1} C_L$

1. 根据 $f_{nd}=3 \tx{GBW}=\dfrac{g_{m2}}{2\pi C_L\cdot 1.3}$，求出 $g_{m2}$
2. 根据 $\dfrac{g_{m2}}{g_{m1}} = 4 \dfrac{C_L}{C_c}$，求出 $C_c$
3. 根据 $\tx{GBW}=\dfrac{g_{m1}}{2 \pi C_c}$，求出 $g_{m1}$