{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### 由实验数据表1-4,做出IB=f(UBE)|UCE=0和IB=f(UBE)|UCE=2V特性曲线,并分析差别的原因。" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "\n", "# 数据\n", "data = {\n", " 'IB(μA)': [0, 2, 4, 6, 10, 20, 40, 60, 80],\n", " 'UBE(V)|UCE=0': [0.0016, 0.5206, 0.5312, 0.5397, 0.5512, 0.5697, 0.5882, 0.6001, 0.6080],\n", " 'UBE(V)|UCE=2V': [0.0013, 0.6000, 0.6173, 0.6252, 0.6394, 0.6600, 0.6781, 0.6865, 0.6866]\n", "}\n", "\n", "# 转换为 DataFrame\n", "df = pd.DataFrame(data)\n", "\n", "# 开启 LaTeX 模式\n", "plt.rc('text', usetex=True)\n", "\n", "# 设置字体属性\n", "plt.rcParams['font.weight'] = 'bold'\n", "\n", "# 绘制 IB=f(UBE)|UCE=0 的特性曲线\n", "plt.plot(df['UBE(V)|UCE=0'], df['IB(μA)'], label=r'$I_B=f(U_{BE})|U_{CE}=0$')\n", "\n", "# 绘制 IB=f(UBE)|UCE=2V 的特性曲线\n", "plt.plot(df['UBE(V)|UCE=2V'], df['IB(μA)'], label=r'$I_B=f(U_{BE})|U_{CE}=2V$')\n", "\n", "# 设置图例\n", "plt.legend()\n", "\n", "# 设置标题和轴标签\n", "plt.title(r'$I_B=f(U_{BE})|U_{CE}=0 \\ and \\ I_B=f(U_{BE})|U_{CE}=2V$')\n", "plt.xlabel(r'$U_{BE}(V)$')\n", "plt.ylabel(r'$I_B(\\mu A)$')\n", "\n", "# 显示图形\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2、由实验数据表1-5,在同一个坐标系下,分别做出三条IC=f(UCE)|IB=常数的特性曲线,并分析曲线的原因。" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "\n", "# 数据\n", "data = {\n", " \"UCE(V)\": [0, 1, 2, 3, 5, 10],\n", " \"IC(mA)|IB=10μA\": [0.0152, 2.0358, 2.1860, 2.2134, 2.2687, 2.4095],\n", " \"IC(mA)|IB=20μA\": [0.0318, 3.9856, 4.2795, 4.3705, 4.4890, 4.8347],\n", " \"IC(mA)|IB=30μA\": [0.0520, 6.2758, 6.5350, 6.6780, 6.8732, 7.6580],\n", "}\n", "\n", "# 转换为 DataFrame\n", "df = pd.DataFrame(data)\n", "\n", "# 开启 LaTeX 模式\n", "plt.rc(\"text\", usetex=True)\n", "\n", "# 设置字体属性\n", "plt.rcParams[\"font.weight\"] = \"bold\"\n", "\n", "# 绘制 IC=f(UCE)|IB=10μA 的特性曲线\n", "plt.plot(df[\"UCE(V)\"], df[\"IC(mA)|IB=10μA\"], label=r\"$I_C=f(U_{CE})|I_B=10\\mu A$\")\n", "\n", "# 绘制 IC=f(UCE)|IB=20μA 的特性曲线\n", "plt.plot(df[\"UCE(V)\"], df[\"IC(mA)|IB=20μA\"], label=r\"$I_C=f(U_{CE})|I_B=20\\mu A$\")\n", "\n", "# 绘制 IC=f(UCE)|IB=30μA 的特性曲线\n", "plt.plot(df[\"UCE(V)\"], df[\"IC(mA)|IB=30μA\"], label=r\"$I_C=f(U_{CE})|I_B=30\\mu A$\")\n", "\n", "# 设置图例\n", "plt.legend()\n", "\n", "# 设置标题和轴标签\n", "plt.title(r\"$I_C=f(U_{CE})|I_B=10\\mu A, 20\\mu A, 30\\mu A$\")\n", "plt.xlabel(r\"$U_{CE}(V)$\")\n", "plt.ylabel(r\"$I_C(mA)$\")\n", "\n", "# 显示图形\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1.根据表1-5的数据,取UCE=5V时的实验数据,求晶体管的β值。" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# 数据\n", "IB_values = [10, 20, 30] # μA\n", "IC_values = [2.2687, 4.4890, 6.8732] # mA\n", "\n", "# 转换 IB_values 为 mA\n", "IB_values = [value / 1000 for value in IB_values]\n", "\n", "# 计算 β值\n", "beta_values = [IC / IB for IC, IB in zip(IC_values, IB_values)]\n", "\n", "# 输出 β值\n", "for i, beta in enumerate(beta_values, start=1):\n", " print(f\"β值 (IB={IB_values[i-1]*1000}μA) = {beta}\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.4" } }, "nbformat": 4, "nbformat_minor": 2 }