Python Encyclopedia for Academics
  • Course Outline
  • Artificial Intelligence
    • Data Science Foundation
      • Python Programming
        • Introduction and Basics
          • Variables
          • Print Function
          • Input From User
          • Data Types
          • Type Conversion
        • Operators
          • Arithmetic Operators
          • Relational Operators
          • Bitwise Operators
          • Logical Operators
          • Assignment Operators
          • Compound Operators
          • Membership Operators
          • Identity Operators
      • Numpy
        • Vectors, Matrix
        • Operations on Matrix
        • Mean, Variance, and Standard Deviation
        • Reshaping Arrays
        • Transpose and Determinant of Matrix
      • Pandas
        • Series and DataFrames
        • Slicing, Rows, and Columns
        • Operations on DataFrames
        • Different wayes to creat DataFrame
        • Read, Write Operations with CSV files
      • Matplotlib
        • Graph Basics
        • Format Strings in Plots
        • Label Parameters, Legend
        • Bar Chart, Pie Chart, Histogram, and Scatter Plot
  • Machine Learning Algorithms
    • Regression Analysis In ML
      • Regression Analysis in Machine Learning
      • Proof of Linear Regression Formulas
      • Simple Linear Regression Implementation
      • Multiple Linear Regression
      • Advertising Dataset Example
      • Bike Sharing Dataset
      • Wine Quality Dataset
      • Auto MPG Dataset
    • Classification Algorithms in ML
      • Proof of Logistic Regression
      • Simplified Mathematical Proof of SVM
      • Iris Dataset
  • Machine Learning Laboratory
    • Lab 1: Titanic Dataset
      • Predicting Survival on the Titanic with Machine Learning
    • Lab 2: Dow Jones Index Dataset
      • Dow Jones Index Predictions Using Machine Learning
    • Lab 3: Diabetes Dataset
      • Numpy
      • Pandas
      • Matplotlib
      • Simple Linear Regression
      • Simple Non-linear Regression
      • Performance Matrix
      • Preprocessing
      • Naive Bayes Classification
      • K-Nearest Neighbors (KNN) Classification
      • Decision Tree & Random Forest
      • SVM Classifier
      • Logistic Regression
      • Artificial Neural Network
      • K means Clustering
    • Lab 4: MAGIC Gamma Telescope Dataset
      • Classification in ML-MAGIC Gamma Telescope Dataset
    • Lab 5: Seoul Bike Sharing Demand Dataset
      • Regression in ML-Seoul Bike Sharing Demand Dataset
    • Lab 6: Medical Cost Personal Datasets
      • Predict Insurance Costs with Linear Regression in Python
    • Lab 6: Predict The S&P 500 Index With Machine Learning And Python
      • Predict The S&P 500 Index With Machine Learning And Python
  • Artificial Neural Networks
    • Biological Inspiration vs. Artificial Neurons
    • Review linear algebra and calculus essentials for ANNs
    • Activation Function
  • Mathematics
    • Pre-Calculus
      • Factorials
      • Roots of Polynomials
      • Complex Numbers
      • Polar Coordinates
      • Graph of a Function
    • Calculus 1
      • Limit of a Function
      • Derivative of Function
      • Critical Points
      • Indefinite Integrals
  • Calculus 2
    • 3D Coordinates and Vectors
    • Vectors and Vector Operations
    • Lines and Planes in Space (3D)
    • Partial Derivatives
    • Optimization Problems (Maxima/Minima) in Multivariable Functions
    • Gradient Vectors
  • Engineering Mathematics
    • Laplace Transform
  • Electrical & electronics Eng
    • Resistor
      • Series Resistors
      • Parallel Resistors
    • Nodal Analysis
      • Example 1
      • Example 2
    • Transient State
      • RC Circuit Equations in the s-Domain
      • RL Circuit Equations in the s-Domain
      • LC Circuit Equations in the s-Domain
      • Series RLC Circuit with DC Source
  • Computer Networking
    • Fundamental
      • IPv4 Addressing
      • Network Diagnostics
  • Cybersecurity
    • Classical Ciphers
      • Caesar Cipher
      • Affine Cipher
      • Atbash Cipher
      • VigenΓ¨re Cipher
      • Gronsfeld Cipher
      • Alberti Cipher
      • Hill Cipher
Powered by GitBook
On this page
  • 1. What Is an RL Circuit?
  • 2. Time-Domain Equations of an RL Series Circuit
  • 3. Transform to s-Domain (Laplace Transform)
  • 4. Example Problem (Step Input)
  • 5. Python Code Example
  • Kewords
  1. Electrical & electronics Eng
  2. Transient State

RL Circuit Equations in the s-Domain

Nerd Cafe

1. What Is an RL Circuit?

An RL circuit consists of a resistor (R) and an inductor (L) connected either in series or in parallel. These components resist and store energy in different ways.

2. Time-Domain Equations of an RL Series Circuit

Kirchhoff’s Voltage Law (KVL):

For a series RL circuit with input voltage v(t), resistor R, and inductor L:

v(t)=vR(t)+vL(t)v(t)=v_{R}(t)+v_{L}(t)v(t)=vR​(t)+vL​(t)

Using Ohm’s law:

v(t)=Ri(t)+Ldi(t)dtv(t)=Ri(t)+L\frac{d i(t)}{dt}v(t)=Ri(t)+Ldtdi(t)​

3. Transform to s-Domain (Laplace Transform)

Laplace Transform Rules:

L{v(t)}=L{Ri(t)+Ldi(t)dt}L\left\{ v(t) \right\}=L\left\{ Ri(t)+L\frac{d i(t)}{dt} \right\}L{v(t)}=L{Ri(t)+Ldtdi(t)​}

So,

Vs=RI(s)+L(sI(s)βˆ’i(0βˆ’))=I(s)(Ls+1)βˆ’Li(0βˆ’)V_{s}=RI(s)+L\left( sI(s)-i(0^{-}) \right)=I(s)\left( Ls+1 \right)-Li(0^{-})Vs​=RI(s)+L(sI(s)βˆ’i(0βˆ’))=I(s)(Ls+1)βˆ’Li(0βˆ’)

If the initial current 𝑖 (0βˆ’) =0, this simplifies to:

V(s)=(R+sL)I(s)V(s)=(R+sL)I(s)V(s)=(R+sL)I(s)

Or:

I(s)=V(s)R+sLI(s)=\frac{V(s)}{R+sL}I(s)=R+sLV(s)​

4. Example Problem (Step Input)

Let:

  • R=10 Ω

  • L=1 HL

  • v(t)=5β‹…u(t) (step function)

  • i(0)=0

Laplace of 𝑣(𝑑) = 5𝑒( 𝑑 ):

V(s)=5sV(s)=\frac{5}{s}V(s)=s5​

Solve for 𝐼(𝑠):

I(s)=5s10+s.1=5s(10+s)I(s)=\frac{\frac{5}{s}}{10+s.1}=\frac{5}{s\left( 10+s \right)}I(s)=10+s.1s5​​=s(10+s)5​

Partial Fraction Decomposition:

5s(10+s)=As+Bs+10\frac{5}{s\left( 10+s \right)}=\frac{A}{s}+\frac{B}{s+10}s(10+s)5​=sA​+s+10B​

Multiply both sides:

5=A(s+10)+Bs=(A+B)s+10A5=A(s+10)+Bs=(A+B)s+10A5=A(s+10)+Bs=(A+B)s+10A

Solve:

ifβ€…β€Šβ€…β€Šs=0β‡’A=0.5ifβ€…β€Šβ€…β€Šs=βˆ’10β‡’B=βˆ’0.5if\;\;s=0\Rightarrow A=0.5\\ if\;\;s=-10\Rightarrow B=-0.5ifs=0β‡’A=0.5ifs=βˆ’10β‡’B=βˆ’0.5

So:

i(t)=12βˆ’12eβˆ’10ti(t)=\frac{1}{2}-\frac{1}{2}e^{-10t}i(t)=21β€‹βˆ’21​eβˆ’10t

5. Python Code Example

We’ll use sympy for symbolic math and matplotlib for plotting.

import sympy as sp
import matplotlib.pyplot as plt
import numpy as np

# Define symbols
t, s = sp.symbols('t s')
R = 10
L = 1
V_s = 5 / s  # Laplace of 5 * u(t)

# I(s) = V(s) / (R + sL)
I_s = V_s / (R + s * L)
I_s = sp.simplify(I_s)

# Inverse Laplace to get i(t)
i_t = sp.inverse_laplace_transform(I_s, s, t)
print("Current i(t):")
sp.pprint(i_t)

# Convert to numerical function
i_t_func = sp.lambdify(t, i_t, 'numpy')

# Plotting
time_vals = np.linspace(0, 1, 1000)
current_vals = i_t_func(time_vals)

plt.figure(figsize=(8, 4))
plt.plot(time_vals, current_vals, label='i(t)', color='blue')
plt.title("Current Response in RL Circuit (Step Input)")
plt.xlabel("Time (s)")
plt.ylabel("Current (A)")
plt.grid(True)
plt.legend()
plt.show()

Output

Kewords

RL circuit,s-domain,laplace transform,resistor,inductor,time-domain,current response,step input,transfer function,kirchhoff’s voltage law,KVL,initial condition,partial fraction,inverse laplace,symbolic math,python simulation,frequency domain,differential equations,transient response,electrical engineering, nerd cafe

PreviousRC Circuit Equations in the s-DomainNextLC Circuit Equations in the s-Domain

Last updated 1 month ago