Python: Shockley-Diodenstrom plotten mit UliEngineering

Du kannst den Shockley-Diodenstrom sowohl in linearer als auch in logarithmischer Form mit der UliEngineering-Python-Bibliothek plotten.

plot_shockley_diode_current.py
from UliEngineering.Electronics.Diode import shockley_diode_current
import matplotlib.pyplot as plt
import numpy as np

plt.style.use('ggplot')

voltages = np.linspace(0, 0.8, 400)
current = shockley_diode_current(voltages, "1pA")

# Linearer Plot
plt.figure(figsize=(6, 4))
plt.plot(voltages, current)
plt.title('Shockley-Diodenstrom (linear)')
plt.xlabel('Spannung (V)')
plt.ylabel('Strom (A)')
plt.grid(True, which='both', linestyle='--', linewidth=0.5)
plt.tight_layout()
plt.savefig('shockley_diode_current_linear.svg')
plt.close()

# Logarithmischer Plot
plt.figure(figsize=(6, 4))
plt.plot(voltages, np.maximum(current, 1e-20))
plt.title('Shockley-Diodenstrom (log)')
plt.xlabel('Spannung (V)')
plt.ylabel('Strom (A)')
plt.yscale('log')
plt.grid(True, which='both', linestyle='--', linewidth=0.5)
plt.tight_layout()
plt.savefig('shockley_diode_current_log.svg')

Shockley-Diodenstrom linear.svg

Shockley-Diodenstrom log.svg


Check out similar posts by category: Electronics, Python