{
"cells": [
{
"cell_type": "markdown",
"id": "51ea5530-ffc5-458d-b3dc-58f126597e76",
"metadata": {},
"source": [
"Jochen Kieninger
\n",
"**Electrochemical Methods for the Micro- and Nanoscale**
\n",
"www.electrochemical-methods.org\n",
"\n",
"## Task 7.3 (Electrochemical impedance spectroscopy - simulation)\n",
"\n",
"Simulating different basic equivalent circuits and changing the parameter helps to get a sound understanding of EIS models. Here, we use the library impedance.py (https://doi.org/10.21105/joss.02349), primarily designed to analysis experimental data."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "4b447e3f-71dd-4cf7-ae78-ef5ab6313e4e",
"metadata": {},
"outputs": [],
"source": [
"from impedance.models.circuits import CustomCircuit\n",
"import numpy as np\n",
"import warnings\n",
"warnings.filterwarnings('ignore')"
]
},
{
"cell_type": "markdown",
"id": "fae68c91-72d9-42c7-9500-ce150f16f77e",
"metadata": {},
"source": [
"- Frequency range: 10 mHz to 10 kHz"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "21f96a85-ce37-414f-b129-3288b37f1f63",
"metadata": {},
"outputs": [],
"source": [
"frequencies = np.logspace(-2, 4, 100)"
]
},
{
"cell_type": "markdown",
"id": "ec03f87b-e01a-4172-a0c4-9c9100d5cb02",
"metadata": {},
"source": [
"- Simple RC parallel circuit representing the charge transfer resistance (100 Ω) and double layer capacity (100 µF)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "a90a3677-be10-4541-b5d5-40c61035351a",
"metadata": {},
"outputs": [],
"source": [
"circuit = CustomCircuit(initial_guess=[100, 100e-6], circuit='p(R1,C1)')\n",
"Z_sim = circuit.predict(frequencies)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "18822ad2-8dae-4713-b5fa-0f5ad700cdc2",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"