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
  • Circuit Description:
  • s-Domain Circuit Representation
  • 4. Solving for Current in the s-Domain
  • 5. Inverse Laplace: Time-Domain Current
  • 6. Python Simulation Using SymPy
  • Keywords
  1. Electrical & electronics Eng
  2. Transient State

Series RLC Circuit with DC Source

Nerd Cafe

PreviousLC Circuit Equations in the s-DomainNextFundamental

Last updated 1 month ago

Circuit Description:

We have a series RLC circuit connected to a DC voltage source V0​.

Initial conditions:

  • V0​: DC step voltage

  • R: Resistance (Ω)

  • L: Inductance (H)

  • C: Capacitance (F)

s-Domain Circuit Representation

Apply KVL in the t-domain:

v0=vR+vL+vC=Ri(t)+Ldi(t)dt+1C∫i(t)dtv_{0}=v_{R}+v_{L}+v_{C}=Ri(t)+L\frac{d i(t)}{dt}+\frac{1}{C}\int_{}^{}i(t)dt\\v0​=vR​+vL​+vC​=Ri(t)+Ldtdi(t)​+C1​∫​i(t)dt

Apply KVL in the s-domain:

V0s=RI(s)+LsI(s)+1sCI(s)\frac{V_{0}}{s}=RI(s)+LsI(s)+\frac{1}{sC}I(s)sV0​​=RI(s)+LsI(s)+sC1​I(s)

Factor out 𝐼(𝑠):

V0s=(R+Ls+1sC)I(s)\frac{V_{0}}{s}=\left( R+Ls+\frac{1}{sC} \right)I(s)sV0​​=(R+Ls+sC1​)I(s)

Solve for current 𝐼(𝑠):

I(s)=V0s(R+Ls+1sC)=V0Ls2+Rs+1CI(s)=\frac{V_{0}}{s(R+Ls+\frac{1}{sC})}=\frac{V_{0}}{Ls^{2}+Rs+\frac{1}{C}}I(s)=s(R+Ls+sC1​)V0​​=Ls2+Rs+C1​V0​​

4. Solving for Current in the s-Domain

Let’s define:

  • a=L

  • b=R

  • c=1/C

Then:

I(s)=V0as2+bs+cI(s)=\frac{V_{0}}{as^{2}+bs+c}I(s)=as2+bs+cV0​​

Case Example:

Let’s assume:

  • V0=10V

  • R=2 Ω

  • L=1 H

  • C=0.25 F

Then:

I(s)=10s2+2s+4I(s)=\frac{10}{s^{2}+2s+4}I(s)=s2+2s+410​

This is a standard second-order system.

5. Inverse Laplace: Time-Domain Current

Use the known inverse Laplace pairs:

L−1{ω(s+α)2+ω2}=e−α.tsin(ω.t)L^{-1}\left\{ \frac{\omega}{\left( s+\alpha \right)^{2}+\omega^{2}} \right\}=e^{-\alpha.t}sin\left( \omega.t \right)L−1{(s+α)2+ω2ω​}=e−α.tsin(ω.t)

We complete the square:

s2+2s+4=(s+1)2+3⇒ω=3    and    α=1s^{2}+2s+4=(s+1)^{2}+3\Rightarrow \omega=\sqrt{3}\;\;and\;\;\alpha=1s2+2s+4=(s+1)2+3⇒ω=3​andα=1

So:

I(s)=10(s+1)2+3⇒i(t)=10e−tsin(3t)3I(s)=\frac{10}{(s+1)^{2}+3}\Rightarrow i(t)=10e^{-t}\frac{sin\left( \sqrt{3}t \right)}{\sqrt{3}}I(s)=(s+1)2+310​⇒i(t)=10e−t3​sin(3​t)​

6. Python Simulation Using SymPy

Here’s the full Python code to simulate:

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

# Symbols
s, t = sp.symbols('s t')
V0 = 10
R = 2
L = 1
C = 0.25

# Define I(s)
Is = V0 / (L*s**2 + R*s + 1/C)

# Inverse Laplace Transform
it = sp.inverse_laplace_transform(Is, s, t)
it_simplified = sp.simplify(it)
print("i(t) =", it_simplified)

# Lambdify for plotting
i_func = sp.lambdify(t, it_simplified, modules=['numpy'])

# Plotting
time_vals = np.linspace(0, 10, 400)
current_vals = i_func(time_vals)

plt.figure(figsize=(10, 5))
plt.plot(time_vals, current_vals, label='i(t)', color='blue')
plt.title("Current Response i(t) in Series RLC Circuit with DC Source")
plt.xlabel("Time (s)")
plt.ylabel("Current (A)")
plt.grid(True)
plt.legend()
plt.show()

Output

Keywords

RLC circuit, series RLC, Laplace transform, s-domain analysis, DC source, transient response, differential equations, inverse Laplace, time domain, second-order system, underdamped circuit, damping factor, electrical engineering, current response, step input, Python simulation, SymPy, circuit analysis, signal processing, engineering math, nerd cafe