The s-domain is the domain after applying the Laplace Transform. It’s widely used in circuit analysis because it converts differential equations to algebraic equations, which are easier to handle.
The Laplace variable s is defined as:
s=σ+jω
2. RC Circuit Basics in Time Domain
Components:
R = Resistance (Ohms)
C = Capacitance (Farads)
Time-domain differential equation:
For a series RC circuit with input Vin and output across the capacitor Vout:
import sympy as sp
# Define symbols
s, R, C = sp.symbols('s R C', positive=True)
Vin = sp.Function('Vin')(s)
Vout = sp.Function('Vout')(s)
# Transfer function H(s)
H = 1 / (1 + R * C * s)
# Output in s-domain
Vout = H * Vin
Vout
import numpy as np
import matplotlib.pyplot as plt
# RC values
R = 1e3 # 1k Ohm
C = 1e-6 # 1uF
RC = R * C
# Time vector
t = np.linspace(0, 0.01, 1000) # 0 to 10ms
# Step response
v_out = 1 - np.exp(-t / RC)
# Plot
plt.plot(t * 1000, v_out, label="Vout(t)")
plt.xlabel('Time (ms)')
plt.ylabel('Voltage (V)')
plt.title('Step Response of RC Circuit')
plt.grid(True)
plt.legend()
plt.show()