Comment tracer le courant de diode Shockley en Python avec UliEngineering
Vous pouvez facilement tracer le courant de diode Shockley en forme linéaire et logarithmique en utilisant la bibliothèque Python UliEngineering.
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")
# Tracé linéaire
plt.figure(figsize=(6, 4))
plt.plot(voltages, current)
plt.title('Shockley diode current (linear)')
plt.xlabel('Voltage (V)')
plt.ylabel('Current (A)')
plt.grid(True, which='both', linestyle='--', linewidth=0.5)
plt.tight_layout()
plt.savefig('shockley_diode_current_linear.svg')
plt.close()
# Tracé logarithmique
plt.figure(figsize=(6, 4))
plt.plot(voltages, np.maximum(current, 1e-20))
plt.title('Shockley diode current (log)')
plt.xlabel('Voltage (V)')
plt.ylabel('Current (A)')
plt.yscale('log')
plt.grid(True, which='both', linestyle='--', linewidth=0.5)
plt.tight_layout()
plt.savefig('shockley_diode_current_log.svg')Check out similar posts by category:
Electronics, Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow