Lugovtsov/RT77-oper/plots.ipynb

482 lines
91 KiB
Plaintext
Raw Normal View History

2024-03-21 09:45:07 +03:00
{
"cells": [
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 1,
2024-03-21 09:45:07 +03:00
"id": "aa41c92f-b4cc-46aa-933e-1d2ff85f409e",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# %load /home/glebi/git/experiment-automation/processing_tools.py\n",
"import numpy as np\n",
"from scipy.optimize import curve_fit\n",
"import pandas as pd\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib\n",
"import scienceplots\n",
"\n",
"plt.style.use(['science', 'russian-font'])\n",
"\n",
"matplotlib.rcParams.update({\n",
" 'figure.figsize': [6, 4],\n",
" 'savefig.facecolor': 'white',\n",
" 'figure.dpi': 150.0,\n",
" 'font.size': 12.0,\n",
"})\n",
"\n",
"line = lambda x, k, b: k*x + b\n",
"deltaPercent = lambda a, b: (1 - min(a, b) / max(a, b)) * 100"
]
},
2024-03-24 10:59:00 +03:00
{
"cell_type": "markdown",
"id": "f4db8318-243e-450c-8dd4-474e5b9fb945",
"metadata": {},
"source": [
"## 1 Усиление ОУ"
]
},
{
"cell_type": "markdown",
"id": "518abf57-8909-49f7-a487-46211ec8f416",
"metadata": {},
"source": [
"![scheme1](scheme1.png)"
]
},
2024-03-21 09:45:07 +03:00
{
"cell_type": "markdown",
"id": "22d07d19-02ec-468b-aa0f-0738cb65931a",
"metadata": {},
"source": [
"## 2 АЧХ ОУ"
]
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 2,
2024-03-21 09:45:07 +03:00
"id": "48d80fc6-9c30-4ec2-ac70-ef9bfde85924",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Крутизна = \t-19.55 дБ/декаду\n",
"fp0 = \t\t 13.25 Гц\n",
"fT = \t\t 1.20e+06 Гц\n"
]
}
],
"source": [
"data = np.loadtxt(\"data2.txt\", skiprows=1, delimiter=\",\").T\n",
"f = data[0]\n",
"Uout = data[1]\n",
"Ua = data[2]\n",
"\n",
"A = 101 * Uout / Ua\n",
"Adb = 20 * np.log10(A)\n",
"\n",
"popt, _ = curve_fit(line, np.log10(f), Adb)\n",
"print(f\"Крутизна = \\t{popt[0]:.2f} дБ/декаду\")\n",
"\n",
"fp0 = 10 ** ((Adb[0] - 3 - popt[1]) / popt[0])\n",
"print(f\"fp0 = \\t\\t {fp0:.2f} Гц\")\n",
"\n",
"fT = 10 ** ((1 - popt[1]) / popt[0])\n",
"print(f\"fT = \\t\\t {fT:.2e} Гц\")"
]
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 3,
2024-03-21 09:45:07 +03:00
"id": "1348218c-f9c0-4fc6-97a9-19c8a0a18c44",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxIAAAIYCAYAAAD5KNoZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAABcSAAAXEgFnn9JSAAB3JklEQVR4nO3de3yT9d3/8XeSJlAjNhQFnUdSnGzOKQ2g2xAFWt3m5jZt4b5v3bzZpNWdd9/YiI6JyyamupP35mw9TDfdBq24k1NpQVHmlNKITh0eeoFnQWlToBSaJvn9wS+R0jZNQtKrSV/Px6OPmev6fq98AtfK9cn38LFEo9GoAAAAACAFVrMDAAAAAJB7SCQAAAAApIxEAgAAAEDKSCQAAAAApIxEAgAAAEDKCswOIB9EIhHt3btXBQUFslgsZocDAAAAHLJoNKre3l6NHTtWVmv/8QcSiQzYu3evnE6n2WEAAAAAGdfV1aXDDjus33ESiQwoKNj/x9jV1SW73S5JCoVCcjqdfY4NJJl2idok+z65wqzPk633PdTrpts/lX7Dda8eyucZicz8LNl470xcM51rpNonU/fraLpXpfz63WrWvZpqP363pief7tVMXHc47tVE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tzy5fo+/d3aJd3SGzwwIAAECSSCRgCovFoj/XzNVX50yRJN2x9hWdec2DWvOvd0yODAAAAMlgjUQGsEbi0Dz2wrv61l1Pa+t7XZKkL89264b/LJXL6TA5MgAAgNGLNRIY8c499Wj988ef1ZXnfVgWi/S7xw09/ep7ZocFAACABBi
"text/plain": [
"<Figure size 900x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(f, Adb, \"o\")\n",
"plt.plot(f, line(np.log10(f), *popt), \"--\", color=\"C0\")\n",
"plt.xscale(\"log\")\n",
"\n",
"plt.xlabel(\"Frequency, Hz\")\n",
"plt.ylabel(\"Gain factor, dB\")\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "570b3241-2223-4e98-956b-5b75b608fdd7",
"metadata": {},
"source": [
"## 3 Неинвертирующий усилитель"
]
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 4,
2024-03-21 09:45:07 +03:00
"id": "949340bc-88c9-48c0-8c91-3dce05307861",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Входное напряжение сдвига Uos \t1.49e-04 В\n"
]
}
],
"source": [
"R1 = 1e3 # Ohm\n",
"R2 = 1e5 # Ohm\n",
"\n",
"Uout_dc = 0.015 # V\n",
"Uos = Uout_dc / (1 + R2 / R1)\n",
"print(f\"Входное напряжение сдвига Uos \\t{Uos:.2e} В\")"
]
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 5,
2024-03-21 09:45:07 +03:00
"id": "247fe705-0dc7-4bf4-ac2a-154d3db03f1b",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxkAAAIYCAYAAAAByCHuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXM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CyW83qpx6t9ranawval+G6d9C8/LWuKh91m1eZvfIA55KhpqVRaexLJnAQn82fnrAa5nPsSmNG9SQ2+uGt80jIm8TvSNTubHO8ZTWrT4y/kTXT+7edP6Mnnd5Qd6/K3HKnvf+ZMHX1Z7ihrxgeWHaPbP/uu7HtruvRH2UTJZrW8kZQ4HTrr5CN0nX9x9tzvbHpKB/39/WYSlyanQ66DHDmjawAATLaJ+rl1M5IRDofV2dlZtI1hGFVbI1HNayUSuWsmqln9+wjXHF38rgVl1cm45CwKiaH2Wa0WHTSrtP9NORpsOuloV0ltZztses+So/Me++v2EX2155FSQ8w6c9ERmju7QY/c9H4Nv/q6hkdGFR8Z1fDIqIZH9n1/8pj4XhvdqyNcszX06ut6PbFv9Gf7rtezozGZNSzSvoTkX27rLzgtb+VpR6nni+dkv7/slj/KbrOoyTlLTXP3JSLNcx1qcs7SkU1zdMKbSh+JBAAgU+V7rHz927HqIsno6upSIBCYsF08Hi8pMSilXTWv5XQ6c1679tprdd111014/VJFLvHq6Rd3lVzxO3Kxt2r3BqaTj53VorU/fqzskcGPn+2WzWrVgsPnasHhcyc8Z+5su/7yHx+StK8uRyYhGXp1X1Jy6MG
"text/plain": [
"<Figure size 900x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = np.loadtxt(\"data3.txt\", skiprows=1, delimiter=\",\").T\n",
"f = data[0]\n",
"Uin = data[1]\n",
"Uout = data[2]\n",
"\n",
"A = Uout / Uin\n",
"Adb = 20 * np.log10(A)\n",
"\n",
"plt.plot(f, Adb, \"--o\")\n",
"plt.xscale(\"log\")\n",
"\n",
"plt.xlabel(\"Frequency, Hz\")\n",
"plt.ylabel(\"Gain factor, dB\")\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 6,
2024-03-21 09:45:07 +03:00
"id": "57a10d24-1c60-4f58-add1-009eafa97da2",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Граничная частота Fp \t\t\t1.46e+04 Гц\n",
"Расхождение между A(f_низк) и K0 \t1.64 %\n",
"Расхождение между beta*fT и Fp \t\t18.47 %\n"
]
}
],
"source": [
"Fp = None\n",
"for i in range(len(f) - 1):\n",
" if ((Adb[0] - 3) < Adb[i]) and ((Adb[0] - 3) >= Adb[i+1]):\n",
" k = (Adb[i] - Adb[i+1]) / (f[i] - f[i+1])\n",
" b = Adb[i] - k*f[i]\n",
" Fp = ((Adb[0] - 3) - b) / k\n",
" break\n",
"print(f\"Граничная частота Fp \\t\\t\\t{Fp:.2e} Гц\")\n",
" \n",
"beta = R1 / (R1 + R2)\n",
"K0 = 1 / beta\n",
"print(f\"Расхождение между A(f_низк) и K0 \\t{deltaPercent(A[0], K0):.2f} %\")\n",
"print(f\"Расхождение между beta*fT и Fp \\t\\t{deltaPercent(Fp, beta*fT):.2f} %\")"
]
},
2024-03-27 23:33:42 +03:00
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 7,
2024-03-27 23:33:42 +03:00
"id": "eac3816b-84d9-4418-8a1a-2bb85736e712",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# п. 5\n",
"f = 2e3 # Hz\n",
"Umax = 10.77 # V\n",
"# Дальше у сигнала появляется характерная \"полка\""
]
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 8,
2024-03-27 23:33:42 +03:00
"id": "b6f2bc90-bb7a-4cef-8ec0-683f5f702956",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Расхождение между Umax и Um_out \t13.19 %\n"
]
}
],
"source": [
"# п. 6\n",
"Fp = 2.22e6 # Hz (A = 1/sqrt(2))\n",
"Umax = .55 # V\n",
"Um_out = 3e6 / (2*3.1415 * 1e6) # V\n",
"print(f\"Расхождение между Umax и Um_out \\t{deltaPercent(Umax, Um_out):.2f} %\")"
]
},
2024-03-21 09:45:07 +03:00
{
2024-03-27 23:27:15 +03:00
"cell_type": "markdown",
"id": "34a95100-4916-4ef5-a4a3-8c0ec4b036af",
2024-03-21 09:45:07 +03:00
"metadata": {},
2024-03-27 23:27:15 +03:00
"source": [
"## 8 Интегратор"
]
},
{
"cell_type": "markdown",
"id": "77ce8336-45a8-49b9-a26d-f96fffdea6fb",
"metadata": {
"tags": []
},
"source": [
"### АЧХ интегратора"
]
},
{
"cell_type": "markdown",
"id": "a9fadd8f-3c43-4169-abea-1fa57db853a8",
"metadata": {},
"source": [
"![8-afc](8-afc.bmp)"
]
},
{
"cell_type": "markdown",
"id": "fbad0e8d-43c2-4e1e-ba29-1d6cea984697",
"metadata": {
"tags": []
},
"source": [
"### Интегрирование сигнала"
]
},
{
"cell_type": "markdown",
"id": "466ed0d0-fadd-4509-9c33-c64fd9559dc1",
"metadata": {},
"source": [
"![8-square-integral](8-square-integral.bmp)"
]
},
{
"cell_type": "markdown",
"id": "7618109f-45e6-4c52-ada6-835bdf820c00",
"metadata": {},
"source": [
"## 9 Дифференциатор"
]
},
{
"cell_type": "markdown",
"id": "2702a3f2-f7d0-471c-921e-cfca9281eb15",
"metadata": {},
"source": [
"### АЧХ дифференциатора"
]
},
{
"cell_type": "markdown",
"id": "bea67faa-850d-485f-aa50-ee421c910551",
"metadata": {},
"source": [
"![9-afc](9-afc.bmp)"
]
},
{
"cell_type": "markdown",
"id": "3fac9fa8-aef6-4ee0-a873-3a76cd5ef2a6",
"metadata": {},
"source": [
"### Дифференцирование сигнала"
]
},
{
"cell_type": "markdown",
"id": "26a3c6d1-f434-4918-98d7-9f85d9c84409",
"metadata": {},
"source": [
"![9-triangle-diff](9-triangle-diff.bmp)"
]
},
{
"cell_type": "markdown",
"id": "6c1d7a93-9215-4a93-8ad2-5112d4b1dfde",
"metadata": {},
"source": [
"## 14 Триггер Шмидта"
]
},
{
"cell_type": "markdown",
"id": "5ea617c8-27b8-40e1-b9ad-d559d78bcf75",
"metadata": {},
"source": [
"### Uref = 0, Umax = 1 В (амплитуда синуса)"
]
},
{
"cell_type": "markdown",
"id": "353f67bc-720b-4574-957b-52590d5962ae",
"metadata": {},
"source": [
"![14-shmidt-ref0-sine1](14-shmidt-ref0-sine1.bmp)"
]
},
{
"cell_type": "markdown",
"id": "0f621ca4-7278-469c-992c-4dbdb4a9beee",
"metadata": {},
"source": [
"### Uref = 4 В, Umax = 5 В (амплитуда синуса)"
]
},
{
"cell_type": "markdown",
"id": "008e6439-245a-4ba3-a5dc-dba1dfb206ae",
"metadata": {},
"source": [
"![14-shmidt-ref4-sine5](14-shmidt-ref4-sine5.bmp)"
]
},
{
"cell_type": "markdown",
"id": "00aebab3-a3bc-4098-9b00-7362c3212235",
"metadata": {},
"source": [
"## 15 Самовозбуждающийся мультивибратор"
]
},
2024-03-27 23:52:17 +03:00
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 9,
2024-03-27 23:52:17 +03:00
"id": "4f05ba6f-c0c4-431f-9d78-91af6ac2cd7a",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"R = 1.00e+04, C = 1.37e-07\n"
]
}
],
"source": [
"beta = 1/11\n",
"T0 = 0.5e-3 # s\n",
"RC = T0 / 2 / np.log((1 + beta) / (1 - beta))\n",
"R = 10e3 # Ohm\n",
"C = RC / R\n",
"print(f\"R = {R:.2e}, C = {C:.2e}\")"
]
},
2024-03-27 23:27:15 +03:00
{
"cell_type": "markdown",
"id": "01b684c1-c797-4ea5-8349-c7293ecaa045",
"metadata": {},
"source": [
"![15-multivibrator](15-multivibrator.bmp)"
]
2024-03-27 23:52:17 +03:00
},
{
"cell_type": "code",
2024-11-09 11:24:25 +03:00
"execution_count": 10,
2024-03-27 23:52:17 +03:00
"id": "8c83e108-72e4-4c20-a1b9-8723599d51e9",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Расхождение между T0 и Texp \t\t2.89 %\n",
"Расхождение beta*Umax между Th и Exp \t0.22 %\n"
]
}
],
"source": [
"T = (8.568 - 3.934) / 9 * 1e-3\n",
"print(f\"Расхождение между T0 и Texp \\t\\t{deltaPercent(T0, T):.2f} %\")\n",
"\n",
"Umax = 13.5 # V\n",
"bUmax_exp = 1.23 # V\n",
"print(f\"Расхождение beta*Umax между Th и Exp \\t{deltaPercent(bUmax_exp, Umax*beta):.2f} %\")"
]
2024-03-21 09:45:07 +03:00
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}