Appendix A Energy Circuit Simulation and Interpretation
The provided Python code simulates the provides
energy circuit in three stages consisting of interconnected blocks: Circuit
Block 1, Circuit Block 2, and a Boost Converter (Circuit Block 3). Researchers
and practitioners can use this code for further experimentation, exploring
different scenarios and adjusting parameters to observe the circuit’s response
in varied conditions. The code serves as a practical tool for validating the
theoretical concepts presented in the paper.
Energy Circuit Simulation Code.
############# This code was developed and executed
on Google Colab
#Prepare/Import the necessary libraries
# You may need to begin by installing: #!pip
install PySpice
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
# Circuit Component 1 (Power Source)
V_source = 10 # Source voltage in volts
R_conductors = 10 # Resistance of connecting
conductors in ohms
# Power input to the diodes in Circuit Block 1
I_CB1 = V_source / R_conductors
# Circuit Block 1
n = 1.1 # Ideality factor
Vt = 0.0259 # Thermal voltage at room temperature
# Diode parameters
I_s = 1.5e-14 # Saturation current for diodes
# Diode voltages
V_D1 = V_D2 = 0.7 # Example forward voltage drop
for diodes
# Calculate total current through Block 1 (I_CB1)
I_CB1 = I_s * (np.exp(V_D1 / (n * Vt)) +
np.exp(V_D2 / (n * Vt)) - 2) # Equation (4)
The author declare no conflict of interest.
# Voltage across Block 1
V_CB1 = V_D1 + V_D2
# Circuit Block 2
R_0 = 1.5 # Reference resistance
R_short = 0.001 # Resistance change due to short circuit
V_CB2 = 0.8 * V_CB1 # Voltage drop after short circuit
a = V_source / R_0 # Current scaling factor
# Calculate short circuit effect current
I_short_circuit_effect = a * np.exp(R_short / R_0)
# Calculate power input to Block 2
P_out_CB2 = V_CB2 * I_short_circuit_effect
# Calculate effective resistance in Block 2
R_CB1_overall = R_conductors # Overall resistance in Block 1
R_short_effective = R_CB1_overall + R_short
# Design and set the Boost Converter Parameters
Vin = V_CB2 # Input voltage from the previous circuit (in volts)
Vout = V_source # Output voltage (in volts)
R = R_short_effective # Load resistance (in ohms)
L = 50e-6 # Inductor value (in henries)
C = 100e-6 # Output capacitor value (in farads)
fsw = 50e3 # Switching frequency (in hertz)
D = Vout / Vin # Duty cycle
# Use the short circuit current as the initial inductor current
IL_initial = I_short_circuit_effect
# Function to define the boost converter differential equations
def boost_converter(y, t): IL, VC = y # Inductor current and capacitor voltage # Boost Converter Equations dIL_dt = (Vin * D - Vout) / L dVC_dt = IL / C return [dIL_dt, dVC_dt]
# Initial conditions with short circuit current
initial_conditions = [IL_initial, Vout * D]
# Time points for simulation
t = np.linspace(0, 2e-3, 1000) # 2 milliseconds simulation time
# Solve the boost converter differential equations
solution = odeint(boost_converter, initial_conditions, t)
# Extract results
IL = solution[:, 0]
VC = solution[:, 1]
VR = IL * R # Voltage across the load resistor
# Print results
print(“Circuit Component 1:”)
print(“Current Input to Diodes (Circuit Block 1):”, I_CB1, “A”)
print(“\nCircuit Block 1:”)
print(“Total Current (I_CB1):”, I_CB1, “A”)
print(“Voltage Across Block 1 (V_CB1):”, V_CB1, “V”)
print(“\nCircuit Block 2:”)
print(“Voltage Drop After Short Circuit (V_CB2):”, V_CB2, “V”)
print(“Short Circuit Effect Current (I_short_circuit_effect):”, I_short_circuit_effect, “A”)
print(“Power Output from Block 2 (P_out_CB2):”, P_out_CB2, “W”)
print(“Effective Resistance in Block 2 (R_short_effective):”, R_short_effective, “ohms”)
# Print individual power values
print(“\nPower Input to Diodes (Circuit Block 1):”, V_CB1 * I_CB1, “W”)
print(“Power Input to Block 3 (P_out_CB2):”, P_out_CB2, “W”)
print(“Power Output Block 3 (W):”, VR[-1] * IL[-1]) # Print the last value to represent the total power output
# Print time, inductor current, capacitor voltage, and load voltage
print(“\nTime (s)\tInductor Current (A)\tCapacitor Voltage (V)\tLoad Voltage (V)”)
for i in range(len(t)): print(f”{t[i]:.6f}\t{IL[i]:.6f}\t\t\t{VC[i]:.6f}\t\t\t{VR[i]:.6f}”)
# Plot results
plt.figure(figsize=(10, 6))
plt.subplot(2, 1, 1)
plt.plot(t, IL, label=‘Inductor Current’)
plt.xlabel(‘Time (s)’)
plt.ylabel(‘Current (A)’)
plt.legend()
plt.subplot(2, 1, 2)
plt.plot(t, VC, label=‘Capacitor Voltage’)
plt.plot(t, VR, label=‘Load Voltage’)
plt.xlabel(‘Time (s)’)
plt.ylabel(‘Voltage (V)’)
plt.legend()
plt.tight_layout()
plt.show().
Appendix B. The Modified Ohm’s Law and Its Application in Breaking the Law of Energy Conservation (Reflecting Real-World Scenarios)
The modified Ohm’s Law used in the paper (adapted from [
53]) provides a unique framework for understanding the behavior of the proposed energy circuit, particularly in real-world scenarios. This modified formulation incorporates additional parameters such as
,
, and
, offering a more comprehensive representation of the circuit’s dynamics. This appendix serves as a guide on how to utilize and interpret this modified Ohm’s Law in practical settings.
The Modified Ohm’s Law Equation
In the provided energy circuit, the modified Ohm’s law apply after the electrical short circuit event in Circuit Block 2. This modified Ohm’s Law equation is expressed through the paper according to equation (6) as follows.
With the parameters,
is the short circuit effect current.
is the current scaling factor.
is the resistance change due to the short circuit.
is the reference resistance.
Parameters Explanation
: This parameter represents the base resistance in the circuit, providing a reference point for current scaling. It sets the initial conditions for the circuit and influences the short circuit effect.
: This parameter models the impact of a short circuit on Circuit Block 2 resistance. It quantifies the change in resistance during a short circuit event, influencing the short circuit effect current.
: The current scaling factor adjusts the magnitude of the short circuit effect current. It is directly proportional to the source voltage () and inversely proportional to . It scales the exponential term in the equation, determining the overall impact of the short circuit.
Application in Real-World Scenarios
The parameters
,
, and
play a crucial role in replicating real-world scenarios in the proposed energy circuit.
Table 1 showcases the application of these parameters under different supply voltage settings.
: Adjust based on the desired initial resistance conditions. Depending of other circuit parameters, adjusting “” has a direct impact on the overall magnitude of the current. Larger “” values result in smaller current values for a given resistance.
: Vary to simulate different short circuit scenarios. Larger values represent a more pronounced change in resistance during a short circuit.
: is directly linked to the source voltage ( as applied in the simulation, Appendix A). As increases, increases, influencing the magnitude of the short circuit effect current.