Lugovtsov/3.3.4-semiconductor-hall-effect/processing.ipynb

403 lines
196 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 23,
"id": "f1de9529-db33-4104-8a94-407330ffcb99",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
"outputs": [],
"source": [
2023-02-18 23:18:07 +03:00
"# %load ../processing_tools.py\n",
"import numpy as np\n",
2023-02-18 23:18:07 +03:00
"from scipy.optimize import curve_fit\n",
"import pandas as pd\n",
2023-02-18 23:18:07 +03:00
"\n",
2022-10-17 00:13:23 +03:00
"import matplotlib.pyplot as plt\n",
2023-02-18 22:58:11 +03:00
"import matplotlib\n",
2023-02-18 23:18:07 +03:00
"import scienceplots\n",
"\n",
"plt.style.use(['science', 'russian-font'])\n",
"\n",
2023-02-18 22:58:11 +03:00
"matplotlib.rcParams.update({\n",
" 'figure.figsize': [6, 4],\n",
" 'savefig.facecolor': 'white',\n",
" 'figure.dpi': 150.0,\n",
" 'font.size': 12.0,\n",
2023-02-18 23:18:07 +03:00
"})\n"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 24,
"id": "657cc2c7-920b-46e0-a7a8-ef65146ddf4e",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
"outputs": [],
2022-10-17 00:13:23 +03:00
"source": [
"I_names = np.array([13, 24, 35, 46, 57, 68, 79, 90, 101])\n",
"I_values = I_names * 1.5 / 155# ток в мА"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 25,
2022-10-17 00:13:23 +03:00
"id": "61022dfd-06b7-43cb-ac1f-2128f46ff7ee",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [],
"source": [
"colors = ['tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:gray', 'tab:olive', 'tab:cyan']"
]
},
{
"cell_type": "markdown",
"id": "cab0ae39-aeb0-425a-a38a-8491552135fe",
"metadata": {
"tags": []
},
"source": [
"### График зависимости индукции от силы тока в обмотках магнита $B = f(I_\\text{М})$"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 26,
2022-10-17 00:13:23 +03:00
"id": "4c853de8-c61e-4ce0-b796-ffaa6e697b12",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"df = pd.read_csv(rf'data/induction_on_amperage.csv')\n",
"\n",
"B = np.array(df['Ind[mT]'])\n",
"I_m = np.array(df['I[mA]'])"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 27,
2022-10-17 00:13:23 +03:00
"id": "576974ec-5d4d-42c1-9280-7a7f9b74a6be",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
2023-02-18 22:58:11 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAx4AAAIYCAYAAADjFDqXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAABcSAAAXEgFnn9JSAABKH0lEQVR4nO3dX2wb+X33+w9Fk8cIn8c7kmvl3FVLIzjWVbOUg8I+lntQk+lF7lpqZdTn6XPRWmwbwMA5aMR1A2O94MUunZznAQwUXWm3FyeAC8tUcpcCWdLBE8uwUdhig+cAkS+qsXvVJzIizboPC1cMNefCHUo0/w0pjoZ/3i9AQMT5avzTL/ZyPvzNb74B27ZtAQAAAICHxvweAAAAAIDhR/AAAAAA4DmCBwAAAADPETwAAAAAeI7gAQAAAMBzx/wewCja29vT69evdezYMQUCAb+HAwAAAByabdv69a9/rePHj2tsrH59g+Dhg9evXysSifg9DAAAAKDnSqWSvvKVr9S9TvDwwbFjb6a9VCopFAq5/rlyuaxIJNLxzx3F+fp5bJyP8w3L2DjfcJ+vn8fG+Yb7fP08Ns43WOdzjjnXum8jePjAub0qFAp19Re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fmFhwY7H43X/ZuLxuJ1MJtueb2lpyY7H4z0ZGwAAOBrtrnEH4lardgqFQrXT9NuSyaQsy6rZsOt1PeCHYrGoVCrlut5Z6ehFd3CncaEjlUpV99J0I5vNdvS7AACA/jcUwcN56k6zjaiGYWhlZeXI6oGjUCgUND4+Xt234nZj+UFLS0vKZrNdj8GyLKVSKS0vL2tmZqYawGOxmOL
2022-10-17 00:13:23 +03:00
"text/plain": [
2023-02-18 22:58:11 +03:00
"<Figure size 900x600 with 1 Axes>"
2022-10-17 00:13:23 +03:00
]
},
2023-02-18 22:58:11 +03:00
"metadata": {},
2022-10-17 00:13:23 +03:00
"output_type": "display_data"
}
],
"source": [
2023-02-18 22:58:11 +03:00
"plt.errorbar(I_m, B, xerr=5+0.003*I_m, yerr=0.5+0.003*B, lw=1, ls='', marker='.', markersize=8, label=r\"$B = f(I_\\text{М})$\", ds='default')\n",
2022-10-17 00:13:23 +03:00
" \n",
2023-02-18 22:58:11 +03:00
"plt.xlabel(r\"$I_\\text{М}$, мА\")\n",
2022-10-17 00:13:23 +03:00
"plt.ylabel(r\"$B$, мТл\")\n",
"\n",
"plt.legend()\n",
2023-02-18 22:58:11 +03:00
"plt.savefig(rf\"images/BonI.png\")\n",
2022-10-17 00:13:23 +03:00
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "c9e18b07-8656-49b4-bf8e-1c2371bee3e5",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"source": [
"### Семейство характеристик $\\varepsilon_\\text{х} = f(B)$"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 28,
2022-10-17 00:13:23 +03:00
"id": "fadcfd44-216a-4449-9e75-398c8d3c740c",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [],
"source": [
"def B_approx(x):\n",
" for i, xi in enumerate(I_m):\n",
" if xi >= x:\n",
" x1 = I_m[i - 1]\n",
" x2 = I_m[i]\n",
" y1 = B[i - 1]\n",
" y2 = B[i]\n",
" return y1 + (y2-y1)/(x2-x1)*(x-x1)"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 29,
2022-10-17 00:13:23 +03:00
"id": "e6741806-03fb-487f-8366-bbb6c825c49b",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [],
"source": [
"def line(x, arg1, arg2):\n",
" return x * arg1 + arg2"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 30,
2022-10-17 00:13:23 +03:00
"id": "08c7f31f-1c40-4904-b619-91c227f7a6b3",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [
{
"data": {
2023-02-18 22:58:11 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxIAAAIYCAYAAAD5KNoZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAABcSAAAXEgFnn9JSAAEAAElEQVR4nOz9eXyU13nw/39mtO8jiV2sI0AIb3iEDLbxgplhEW7iNJLd9us0rVOYLE369NsnUqjj2A5N8ah5nnyfbI0Up22e5pcWpCR2awvDDGBsbIyRBrwBAjQg9k3SaJdmu39/DDOWrNE+0iy63q8Xrxe65557rjmj5Vz3Odc5KkVRFIQQQgghhBBiFNShDkAIIYQQQggReSSREEIIIYQQQoyaJBJCCCGEEEKIUZNEQgghhBBCCDFqkkgIIYQQQgghRi021AFEA4/HQ09PD7GxsahUqlCHI4QQQgghxLgpioLL5SIxMRG1euD4gyQSQdDT00NKSkqowxBCCCGEECLoOjs7SU5OHnBcEokgiI31NqPdbkej0dDZ2UlcXNykvb7T6SQlJWVKvK68V3ndSH/Nqfa68l7ldSP9Nafa68p7ldcN9BxfX/ezJJEIAt90Jt+HEh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AEhNzyF+2g6ysB0Mc2cSQEYkolBwfO+y/Z9YsIm9WWr/n5c9O55k1i0b0/HAzXH1ESUnJiI4NpbS0lJaWljH/G2nnLVzu+vv0XdksNzd32FWbSktLUbxLSwf8p9VqaWhoGPTxkSQRwWyjcGpvjUZDcXFxwKlNu3btGvGIm9VqHZDw6fV6NBoNVqt1wkezhBBiKmpqPsS
2022-10-17 00:13:23 +03:00
"text/plain": [
2023-02-18 22:58:11 +03:00
"<Figure size 900x600 with 1 Axes>"
2022-10-17 00:13:23 +03:00
]
},
2023-02-18 22:58:11 +03:00
"metadata": {},
2022-10-17 00:13:23 +03:00
"output_type": "display_data"
}
],
"source": [
"dE_dB = []\n",
"\n",
"for i, I_name in enumerate(I_names):\n",
" df = pd.read_csv(rf\"data/VoA_{I_name}.csv\")\n",
" \n",
" U_ = df[\"U_34[mV]\"]\n",
" U0 = U_[0]\n",
" U = 1000*(U0 - U_)\n",
" \n",
" I_ = df[\"I_m[mA]\"]\n",
" B_ = np.array([B_approx(x) for x in I_], dtype=np.float64)\n",
" \n",
" popt, pcov = curve_fit(line, B_, U)\n",
" \n",
" # print(f\"k = {popt[0]:.4f} \\t \")\n",
" dE_dB.append(popt[0]/1000)\n",
" \n",
2023-02-18 22:58:11 +03:00
" plt.errorbar(B_, U, xerr=1+0.003*B_, yerr=1+0.003*U, ls='', marker='.', markersize=4, label=r\"$I_{||} = \"+rf\"{I_values[i]:.2f}\\pm{1.5/155:.2f}$ мА\", ds='default', color=colors[i])\n",
2022-10-17 00:13:23 +03:00
" plt.plot(B_, line(B_, popt[0], popt[1]), color=colors[i], lw=1)\n",
"\n",
"dE_dB = np.array(dE_dB) * 1000\n",
" \n",
"plt.xlabel(r\"$B$, мТл\")\n",
"plt.ylabel(r\"$\\varepsilon_x$, мкВ\")\n",
"\n",
2023-02-18 22:58:11 +03:00
"plt.legend(frameon=True)\n",
"plt.savefig(rf\"images/UonB.png\")\n",
2022-10-17 00:13:23 +03:00
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "ed4c8024-e86f-4672-bd64-1d5d8e596592",
"metadata": {},
"source": [
"### Зависимость $k = f(I)$"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 31,
2022-10-17 00:13:23 +03:00
"id": "0d76d070-47ce-4f4f-9342-566a1107abab",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [
{
"data": {
2023-02-18 22:58:11 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAygAAAIYCAYAAACG+cjoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAABcSAAAXEgFnn9JSAACFz0lEQVR4nOzdfXyT9b0//leaJtwEaNqiiLf0qiKC3KVlzol6JgnezhtI7M7Od9/9prbR3Zyd6WjoHAJmCglz7uwcNxPcztn5bucMEvBmOpWkOnXOG5qA5UZQehW8QQTbXgUCpWmS3x+cZC1N0qRJeiXp6/l49PEgV67rc70LF+3nnffnRhGJRCIgIiIiIiLKAyVyB0BERERERBTFBIWIiIiIiPIGExQiIiIiIsobTFCIiIiIiChvMEEhIiIiIqK8USp3AJRYOBxGT08PSktLoVAo5A6HiIiIiChjkUgEfX19GDt2LEpKBtdLmKDksZ6eHmg0GrnDICIiIiLKukAggPHjxw86XlAJiiiKsNls0Gq1sddNTU3Q6XRpt+X1euFwOCBJEkRRhCAIsNlsCdtK997ZiLW09PQ/TyAQgEqlSv2bSyAYDEKj0WStvWKLB8i/mBjP0PItJsYztHyLKd/iAfIvJsYztHyLifEMLd9iyrd4gNzFFG032tc9U8EkKH6/HyaTCR6PB4IgAAAkSUJNTQ1sNhuMRmPKbdntdgCAy+WKHTObzaipqUFjYyNsNltG985WrNFhXSqVKqsPRbbby1S+xQPkX0yMZ2j5FhPjGVq+xZRv8QD5FxPjGVq+xcR4hpZvMeVbPEDuY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Figure size 900x600 with 1 Axes>"
2022-10-17 00:13:23 +03:00
]
},
2023-02-18 22:58:11 +03:00
"metadata": {},
2022-10-17 00:13:23 +03:00
"output_type": "display_data"
}
],
"source": [
"popt, pcov = curve_fit(line, I_values, dE_dB)\n",
"\n",
"k = popt[0]\n",
"\n",
"plt.errorbar(I_values, dE_dB, xerr=0.01, yerr=3.15e-03, color=colors[0], lw=1, ls='', marker='.', markersize=4, label=r\"$\\dfrac{d\\varepsilon_x}{dB} = f(I_{||})$\", ds='default')\n",
"plt.plot(I_values, line(I_values, popt[0], popt[1]), color=colors[0], lw=1)\n",
"\n",
2023-02-18 22:58:11 +03:00
"plt.xlabel(r\"$I_\\text{М}$, мА\")\n",
2022-10-17 00:13:23 +03:00
"plt.ylabel(r\"$d\\varepsilon_x/dB$, мВ/Тл\")\n",
"\n",
"plt.legend()\n",
2023-02-18 22:58:11 +03:00
"plt.savefig(rf\"images/KonI.png\")\n",
2022-10-17 00:13:23 +03:00
"plt.show()"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 32,
2022-10-17 00:13:23 +03:00
"id": "2d140d8b-b9fb-48b7-88fd-ccd862fc794f",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [],
"source": [
"h = 2.2e-3"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 33,
2022-10-17 00:13:23 +03:00
"id": "deb90002-f303-4b6b-ad90-e3c83d3ab41b",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [
{
"data": {
"text/plain": [
"0.0004318927697950297"
]
},
2023-02-18 23:18:07 +03:00
"execution_count": 33,
2022-10-17 00:13:23 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"R_h = k*h\n",
"R_h"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 34,
2022-10-17 00:13:23 +03:00
"id": "8731ed11-0b5c-4304-9ab3-eb563dbe33e3",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [],
"source": [
"q = 1.6e-19"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 35,
2022-10-17 00:13:23 +03:00
"id": "048587bd-6a59-449c-a65c-86f810f3ce4c",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [
{
"data": {
"text/plain": [
"1.44711846020626e+22"
]
},
2023-02-18 23:18:07 +03:00
"execution_count": 35,
2022-10-17 00:13:23 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"n = 1 / (R_h * q)\n",
"n"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 36,
2022-10-17 00:13:23 +03:00
"id": "8f61c6e8-356b-4a4c-b797-dd5e8d0331eb",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-18 11:37:28 +03:00
"outputs": [],
"source": [
"a = 2.2e-3\n",
"L35 = 3e-3\n",
"l = 2.5e-3"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 37,
2022-10-18 11:37:28 +03:00
"id": "1f153f00-d44c-41e5-8bab-ad09bd8e5896",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [
{
"data": {
"text/plain": [
2022-10-18 11:37:28 +03:00
"274.0977615349475"
2022-10-17 00:13:23 +03:00
]
},
2023-02-18 23:18:07 +03:00
"execution_count": 37,
2022-10-17 00:13:23 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2022-10-18 11:37:28 +03:00
"sigma = 1 * L35/(1.99 * a * l)\n",
2022-10-17 00:13:23 +03:00
"sigma"
]
},
{
"cell_type": "code",
2023-02-18 23:18:07 +03:00
"execution_count": 38,
2022-10-17 00:13:23 +03:00
"id": "cf5b7366-16f9-434f-969f-74b61fed23ca",
2023-02-18 22:58:11 +03:00
"metadata": {
"tags": []
},
2022-10-17 00:13:23 +03:00
"outputs": [
{
"data": {
"text/plain": [
2022-10-18 11:37:28 +03:00
"1183.8084142394603"
2022-10-17 00:13:23 +03:00
]
},
2023-02-18 23:18:07 +03:00
"execution_count": 38,
2022-10-17 00:13:23 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"b = sigma * R_h\n",
"b*10000"
]
}
],
"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",
2023-10-07 19:37:34 +03:00
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}