sda.rlc.rlc_circuit#

Attributes#

R

Classes#

RLC

Module Contents#

class sda.rlc.rlc_circuit.RLC(R, L, C)#
R#
L#
C#
omega_0#
lambda_#
alpha#
times: numpy.ndarray | None = None#
tau: float | None = None#
current: numpy.ndarray | None = None#
input_signal: numpy.ndarray | None = None#
static pulsed_signal(t, tau, V)#

Pulsed signal, serving as an input signal to the RLC circuit.

The pulse is defined here as step function that goes from 0 to V at t = 0, and stays at V for 0 < t <= tau. The pulse is 0 for t > tau.

Parameters:
  • t (np.ndarray) – Time in seconds.

  • tau (float) – Pulse duration in seconds.

  • V (float) – Pulse amplitude in volts.

Returns:

The pulse value at time t.

Return type:

np.ndarray

compute_current(t, tau, V)#

Compute the current across the RLC circuit in response to a pulsed signal.

Parameters:
  • t (np.ndarray) – Time in seconds.

  • tau (float) – Pulse duration in seconds.

  • V (float) – Pulse amplitude in Volts.

Returns:

The current across the RLC circuit at time t.

Return type:

np.ndarray

voltage_inductor()#

Voltage across the inductor.

Returns:

The voltage across the inductor.

Return type:

np.ndarray

voltage_resistor()#

Voltage across the resistor.

Returns:

The voltage across the resistor.

Return type:

np.ndarray

voltage_capacitor()#

Voltage across the capacitor.

It uses Kirchhoff’s voltage law (KVL) to calculate the voltage across the capacitor.

Returns:

The voltage across the capacitor.

Return type:

np.ndarray

compute_energy()#

Energy stored in the RLC circuit.

Returns:

The magnetic energy, electric energy, joule loss and total energy. For each of these, the energy is calculated at each time step.

Return type:

tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]

compute_power()#

Power in the RLC circuit.

Returns:

The magnetic power, electric power, joule power and total power. For each of these, the power is calculated at each time step.

Return type:

tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]

sda.rlc.rlc_circuit.R = 10#