# CH12. Operational-Amplifier Circuits :::info **Disclaimer** Cases involving BJTs are temporarily omitted, I might work on them someday if I have time. Also, if you spot any error, please contact me via my email: bigbeeismusic@gmail.com ::: ## 12.1 The Two-Stage CMOS Op Amp ### 12.1.1 The Circuit ![截圖 2025-01-19 下午4.09.46](https://hackmd.io/_uploads/rk1w7EqwJl.png) (First stage: differential pair ($Q_1-Q_2$); Second stage: common-source amplifier ($Q_6$)) :::success ++Recall++. The constraint $\frac{(W/L)_6}{(W/L)_4}=2\frac{(W/L)_7}{(W/L)_5}$ has to be satisfied to eliminate the systematic output DC offset. ::: ### 12.1.2 Input Common-Mode Range and Output Swing **Input common-mode range** (Both input terminals are connected to $V_{ICM}$) $\Rightarrow V_{ICM}\geq-V_{SS}+V_{tn}+V_{OV3}-|V_{tp}|$ ($Q_1$ and $Q_2$ have to be in saturation) $\Rightarrow V_{ICM}\leq V_{DD}-|V_{OV5}|-|V_{tp}|-|V_{OV1}|$ ($Q_5$ has to be saturation) $\Rightarrow -V_{SS}+V_{tn}+V_{OV3}-|V_{tp}|\leq V_{ICM}\leq V_{DD}-|V_{OV5}|-|V_{tp}|-|V_{OV1}|$ :::info ++Observation++. For a larger $V_{ICM}$ range, smaller $V_{OV}$ is preferred. ::: **Output swing** $-V_{SS}+V_{OV6}\leq v_O\leq V_{DD}-|V_{OV7}|$ ### 12.1.3 DC Voltage Gain ![截圖 2025-01-19 下午4.57.11](https://hackmd.io/_uploads/Hys_A45vkx.png) $R_{in}=\infty$, $G_{m1}=g_{m1}=g_{m2}=\frac{2(I/2)}{|V_{OV1}|}=\frac{I}{|V_{OV1}|}$ $R_1=r_{o2}||r_{o4}$ where $r_{o2}=\frac{|V_{A2}|}{I/2}$, $r_{o4}=\frac{V_{A4}}{I/2}$ $\Rightarrow A_1=-G_{m1}R_1=-\frac{2}{|V_{OV1}|}/\left[\frac{1}{|V_{A2}|}+\frac{1}{V_{A4}}\right]$ $G_{m2}=g_{m6}=\frac{2I_{D6}}{V_{OV6}}$, $R_2=r_{o6}||r_{o7}$ where $r_{o6}=\frac{V_{A6}}{I/2}$, $r_{o7}=\frac{|V_{A7}|}{I/2}$ $\Rightarrow A_2=-G_{m2}R_2=-\frac{2}{V_{OV6}}/\left[\frac{1}{V_{A6}}+\frac{1}{|V_{A7}|}\right]$ $\Rightarrow A_v=A_1A_2$, $R_o=R_2=r_{o6}||r_{o7}$ :::info ++Observation++. $A_v$ is of the order of $(g_mr_o)^2$, thus can be in the range of $100V/V\sim 5000V/V$. ::: ### 12.1.4 Common-Mode Rejection Ratio (CMRR) :::success ++Recall++. For current-mirror-loaded differential amplifier pair, $A_d=g_{m1,2}(r_{o2}\|r_{o4})$, $A_{cm}=-\frac{1}{2g_{m3}R_{SS}}$, and $\text{CMRR}=(2g_{m1,2}R_{SS})[g_{m3}(r_o\|r_{o3})]$ ![截圖 2025-01-06 下午5.26.40](https://hackmd.io/_uploads/r17oVrcD1e.png) ::: ($R_{SS}=r_{o5}$) $\Rightarrow \text{CMRR}=(2g_{m3}r_{o5})[g_{m1}(r_{o2}||r_{o4})]$ (high, order of $(g_mr_o)^2$) ### 12.1.5 Frequency Response ![截圖 2025-01-19 下午4.57.11](https://hackmd.io/_uploads/Hys_A45vkx.png) :::success ++Recall++. Capacitances in the differential pair ![截圖 2025-01-08 晚上11.46.09](https://hackmd.io/_uploads/HkRRpGh8yg.png) $C_m=C_{gd1}+C_{db1}+C_{db3}+C_{gs3}+C_{gs4}$ $C_L=C_{gd2}+C_{db2}+C_{gd4}+C_{db4}+C_x$ From chapter 9 we know that the effects of $C_m$ only occur at very high frequency, hence we don't discuss it here. Also, although some capacitances are not actually grounded, we still consider its effect. ::: $C_1=C_{gd2}+C_{db2}+C_{gd4}+C_{db4}+C_{gs6}$ $C_2=C_{db6}+C_{gd7}+C_{db7}+C_L$ (Note. $C_{gd6}\ll C_C$ and is hence not discussed here) $\Rightarrow G_{m1}V_{id}+\frac{V_{i2}}{R_1}+sC_1V_{i2}+sC_C(V_{i2}-V_o)=0$ $\Rightarrow G_{m2}V_{i2}+\frac{V_o}{R_2}+sC_2V_o+sC_C(V_o-V_{i2})=0$ $\Rightarrow \frac{V_o}{V_{id}}=\frac{G_{m1}(G_{m2}-sC_C)R_1R_2}{1+s[C_1R_1+C_2R_2+C_C(G_{m2}R_1R_2+R_1+R_2)]+s^2[C_1C_2+C_C(C_1+C_2)]R_1R_2}$ :::info ++Observation++. Transmission zero: $s_z=\frac{G_{m2}}{C_C}\Rightarrow\omega_Z=\frac{G_{m2}}{C_C}$ Consider the denominator: $D(s)\simeq1+\frac{s}{\omega_{P1}}+\frac{s^2}{\omega_{P1}\omega_{P2}}$, we have $\omega_{P1}=\frac{1}{C_1R_1+C_2R_2+C_C(G_{m2}R_1R_2+R_1+R_2)}=\frac{1}{R_1[C_1+C_C(1+G_{m2}R_2)]+R_2(C_2+C_C)}$ Observe the miller effect due to the feedback. While $R_1$ and $R_2$ are comparable, we have $\omega_{P1}\simeq\frac{1}{R_1[C_1+C_C(1+G_{m2}R_2)]}\simeq\frac{1}{R_1C_CG_{m2}R_2}$ $\omega_{P2}=\frac{G_{m2}C_C}{C_1C_2+C_C(C_1+C_2)}$ Since $C_1\ll C_2$ and $C_1\ll C_C$, $\omega_{P2}\simeq\frac{G_{m2}}{C_2}$ $\omega_t=(G_{m1}R_1G_{m2}R_2)\omega_{P1}=\frac{G_{m1}}{C_C}$ We see that if the amplifier is stable, $\omega_t<\omega_Z, \omega_{P2}$. Thus, $\frac{G_{m1}}{C_C}<\frac{G_{m2}}{C_2}$, $G_{m1}<G_{m2}$ ::: #### Simplified Equivalent Circuit (Assume that $|A_2|$ is large) ![截圖 2025-01-19 下午6.33.47](https://hackmd.io/_uploads/H1ELB8qw1l.png) #### Phase Margin ![截圖 2025-01-19 下午6.36.40](https://hackmd.io/_uploads/SJCpHI5wye.png) (For the case of $\beta=1$, this is also the Bode plot of $A\beta$) $\phi_{\text{total}}=90^{\circ}+\tan^{-1}\left(\frac{f_t}{f_{P2}}\right)+\tan^{-1}\left(\frac{f_t}{f_{Z}}\right)$ $\text{Phase margin}=180^{\circ}-\phi_{\text{total}}=90^{\circ}-\tan^{-1}\left(\frac{f_t}{f_{P2}}\right)-\tan^{-1}\left(\frac{f_t}{f_{Z}}\right)$ :::info ++Note++. We can move the transmission zero using a resistance $R$: ![截圖 2025-01-19 晚上7.33.46](https://hackmd.io/_uploads/BkXE7Pcvkx.png) Set $V_o=0\Rightarrow\frac{V_{i2}}{R+\frac{1}{sC_C}}=G_{m2}V_{i2}\Rightarrow s=\frac{1}{C_C\left(\frac{1}{G_{m2}}-R\right)}$ By setting $R=1/G_{m2}$, the zero can be placed at $\infty$. ::: ### 12.1.6 Slew Rate ![截圖 2025-01-19 晚上7.49.46](https://hackmd.io/_uploads/Sk4zDP9vyx.png) ("+" terminal change immediately, but "-" doesn't, $\Rightarrow v_{id}$ exceeds the range of operation) $\Rightarrow Q_1$ on, $Q_2$ off $\Rightarrow I$ from $Q_4$ goes through $C_C$ ![截圖 2025-01-19 晚上8.12.48](https://hackmd.io/_uploads/Sk7P6v9Dyx.png) $\Rightarrow v_O(t)=\frac{I}{C_C}t$, $SR=\frac{I}{C_C}$ #### Relationship Between SR and $f_t$ $f_t=\frac{G_{m1}}{2\pi C_C}\Rightarrow SR=2\pi f_t|V_{OV1}|=\omega_t|V_{OV1}|$ ### 12.1.7 Power-Supply Rejection Ratio (PSRR) $\text{PSRR}^+\equiv\frac{A_d}{A^+}$ where $A^+\equiv\frac{v_o}{v_{dd}}$ ($v_{dd}$: small change in $V_{DD}$) $\text{PSRR}^-\equiv\frac{A_d}{A^-}$ where $A^-\equiv\frac{v_o}{v_{ss}}$ ($v_{ss}$: small change in $V_{SS}$) :::info ++Note++. For the two-stage op amp we discussed, $\text{PSRR}^+$ is high, but as for $\text{PSRR}^-$: $v_o=v_{ss}\frac{r_{o7}}{r_{o6}+r_{o7}}\Rightarrow \text{PSRR}^-=g_{m1}(r_{o2}||r_{o4})g_{m6}r_{o6}$ ($\text{PSRR}^-$ can be maximized by selecting long $L$, and low $|V_{OV}|$) ::: ### 12.1.8 Design Trade-Offs - Larger $L$, lower $|V_{OV}|\Rightarrow$ larger gain, CMRR, PSRR. - However, slew rate $\searrow$ and larger transistor capacitance. - After choosing $L$, $|V_{OV}|$, we have to decide $I\Rightarrow$ trade-off between unity-gain frequency and power consumption ($(V_{DD}+V_{SS})(I+I_{D6,7})$). ## 12.2 The Folded-Cascode CMOS Op Amp :::warning ++Def++. (**Folded cascode**) ![截圖 2025-01-19 晚上8.44.37](https://hackmd.io/_uploads/rJIxVdcPkg.png) $R_o\simeq g_{m2}r_{o2}r_{o1}$ ::: ### 12.2.1 The Circuit **Simple circuit** ![截圖 2025-01-20 凌晨12.03.38](https://hackmd.io/_uploads/rk7Ozicvkx.png) (Bias current of $Q_3-Q_4$: $(I_B-I/2)$) **Complete circuit** ![截圖 2025-01-20 凌晨12.08.22](https://hackmd.io/_uploads/S1A9Xi9PJl.png) ### 12.2.2 Input Common-Mode Range and Output Swing **Input common-mode range** $V_{ICM\text{max}}=V_{DD}-|V_{OV9}|+V_{tn}$ ($Q_9-Q_{10}$ in saturation) $V_{ICM\text{min}}=-V_{SS}+V_{OV11}+V_{OV1}+V_{tn}$ ($Q_{11}$ in saturation) $\Rightarrow -V_{SS}+V_{OV11}+V_{OV1}+V_{tn}\leq V_{ICM}\leq V_{DD}-|V_{OV9}|+V_{tn}$ **Output swing** ($V_{BIAS1}=V_{DD}-|V_{OV10}|-V_{SG4}$) $v_{O\text{max}}=V_{DD}-|V_{OV10}|-|V_{OV4}|$ ($Q_{10}$, $Q_4$ in saturation) $v_{O\text{min}}=-V_{SS}+V_{OV7}+V_{OV5}+V_{tn}$ ($Q_6$ in saturation) $\Rightarrow -V_{SS}+V_{OV7}+V_{OV5}+V_{tn}\leq v_O\leq V_{DD}-|V_{OV10}|-|V_{OV4}|$ ### 12.2.3 Voltage Gain ![截圖 2025-01-20 凌晨1.57.41](https://hackmd.io/_uploads/Syb462cwkx.png) $G_m=g_{m1}=g_{m2}=\frac{I}{V_{OV1}}$ $R_o=R_{o4}||R_{o6}=g_{m4}r_{o4}(r_{o2}||r_{o10})||g_{m6}r_{o6}r_{o8}$ $\Rightarrow A_v=G_mR_o=g_{m1}\{[g_{m4}r_{o4}(r_{o2}||r_{o10})]||(g_{m6}r_{o6}r_{o8})\}$ :::info ++Note++. This type of amplifier is called an **operational transconductance amplifier (OTA)**. Also, although $R_o$ is large, consider the unity-gain follower formed by connecting the output terminal back to the negative input terminal: $R_{of}=\frac{R_o}{1+A_v}\simeq\frac{R_o}{A_v}\simeq\frac{1}{G_m}=\frac{1}{g_{m1}}$ is much smaller. ::: ### 12.2.4 Frequency Response $\frac{V_o}{V_{id}}=\frac{G_mR_o}{1+sC_LR_o}\Rightarrow f_P=\frac{1}{2\pi C_LR_o}$, $f_t=G_mR_of_P=\frac{G_m}{2\pi C_L}$ ### 12.2.5 Slew Rate $\Rightarrow Q_1$ on, $Q_2$ off $\Rightarrow I_B$ goes through $Q_4$ $\Rightarrow SR=\frac{I_B}{C_L}$ ### 12.2.6 Increasing the Input Common-Mode Range: Rail-to-Rail Input Operation :::success ++Recall++. $-V_{SS}+V_{OV11}+V_{OV1}+V_{tn}\leq V_{ICM}\leq V_{DD}-|V_{OV9}|+V_{tn}$ ::: ![截圖 2025-01-20 凌晨2.40.39](https://hackmd.io/_uploads/rJQrDpqPke.png) ($G_{mn}=g_{m1}=g_{m2}$, $G_{mp}=g_{m3}=g_{m4}$) $V_o=(G_{mn}+G_{mp})R_oV_{id}\Rightarrow A_v=(G_{mn}+G_{mp})R_o$ ### 12.2.7 Increasing the Output Voltage Range: The Wide-Swing Current Mirror :::success ++Recall++. Cascode current mirror ![截圖 2025-01-20 凌晨3.15.48](https://hackmd.io/_uploads/HJuq1A9vkx.png) $\Rightarrow V_o\geq V_t+2V_{OV}$ ::: ![截圖 2025-01-20 凌晨3.15.52](https://hackmd.io/_uploads/r1X4x09P1l.png) $\Rightarrow V_o\geq 2V_{OV}$ :::info ++Note++. $Q_4$ is in saturation as long as $V_t>V_{OV}$. ::: ## Summary - In the two-stage CMOS op amp, - The constraint $\frac{(W/L)_6}{(W/L)_4}=2\frac{(W/L)_7}{(W/L)_5}$ has to be satisfied to eliminate the systematic output DC offset. - $-V_{SS}+V_{tn}+V_{OV3}-|V_{tp}|\leq V_{ICM}\leq V_{DD}-|V_{OV5}|-|V_{tp}|-|V_{OV1}|$. - $-V_{SS}+V_{OV6}\leq v_O\leq V_{DD}-|V_{OV7}|$. - $G_{m1}=g_{m1}=g_{m2}=\frac{I}{|V_{OV1}|}$, $R_1=r_{o2}||r_{o4}$. - $G_{m2}=g_{m6}=\frac{2I_{D6}}{V_{OV6}}$, $R_2=r_{o6}||r_{o7}$. - $A_v=A_1A_2=G_{m1}R_1G_{m2}R_2$, $R_o=R_2=r_{o6}||r_{o7}$ - $\text{CMRR}=(2g_{m3}r_{o5})[g_{m1}(r_{o2}||r_{o4})]$ - $C_1=C_{gd2}+C_{db2}+C_{gd4}+C_{db4}+C_{gs6}$, $C_2=C_{db6}+C_{gd7}+C_{db7}+C_L$. - $\omega_Z=\frac{G_{m2}}{C_C}$, $\omega_{P1}\simeq\frac{1}{R_1C_CG_{m2}R_2}$, $\omega_{P2}\simeq\frac{G_{m2}}{C_2}$, $\omega_t=\frac{G_{m1}}{C_C}$. - For the amplifier to be stable, let $\frac{G_{m1}}{C_C}<\frac{G_{m2}}{C_2}$, $G_{m1}<G_{m2}$ - $\text{Phase margin}=90^{\circ}-\tan^{-1}\left(\frac{f_t}{f_{P2}}\right)-\tan^{-1}\left(\frac{f_t}{f_{Z}}\right)$ - By connecting a resistor in series with $C_C$ with resistance $R=1/G_{m2}$, the zero can be placed at $\infty$. - $SR=\frac{I}{C_C}=2\pi f_t|V_{OV1}|=\omega_t|V_{OV1}|$. - $\text{PSRR}^-\equiv\frac{A_d}{A^-}=g_{m1}(r_{o2}||r_{o4})g_{m6}r_{o6}$. - In the folded-cascode CMOS op amp, - $-V_{SS}+V_{OV11}+V_{OV1}+V_{tn}\leq V_{ICM}\leq V_{DD}-|V_{OV9}|+V_{tn}$. - $V_{SS}+V_{OV7}+V_{OV5}+V_{tn}\leq v_O\leq V_{DD}-|V_{OV10}|-|V_{OV4}|$. - $G_m=g_{m1}=g_{m2}=\frac{I}{V_{OV1}}$, $R_o=R_{o4}||R_{o6}=g_{m4}r_{o4}(r_{o2}||r_{o10})||g_{m6}r_{o6}r_{o8}$ - $A_v=G_mR_o=g_{m1}\{[g_{m4}r_{o4}(r_{o2}||r_{o10})]||(g_{m6}r_{o6}r_{o8})\}$ - $\frac{V_o}{V_{id}}=\frac{G_mR_o}{1+sC_LR_o}\Rightarrow f_P=\frac{1}{2\pi C_LR_o}$, $f_t=G_mR_of_P=\frac{G_m}{2\pi C_L}$ - $SR=\frac{I_B}{C_L}$ - Rail-to-rail input operation can extend the input common-mode range. - $G_{mn}=g_{m1}=g_{m2}$, $G_{mp}=g_{m3}=g_{m4}$. - $V_o=(G_{mn}+G_{mp})R_oV_{id}$, $A_v=(G_{mn}+G_{mp})R_o$. - Wide-swing current mirror can extend the minimum output voltage from $V_t+2V_{OV}$ to $2V_{OV}$. ## Practice - 12.1, 12.2, 12.3, 12.5, 12.6, 12.8, 12.11, 12.12 - 12.26, 12.28, 12.29