Series RC Circuit

rc_circuit

Contents

Electric Current in a Series RC Circuit

Solve for the electric current in a series RC circuit. The circuit contains a voltage source V, resistor R and a capacitor C.

At t=0 the switch is closed and from Kirchoff's voltage law (KVL)

Take the derivative of both sides and rearrange

where is the time constant

clear;close all;clc;

Equations

% define the symbols
syms V R C i(t)

% define the differential equation
current=(diff(i,t)+i/R/C)
 
current(t) =
 
diff(i(t), t) + i(t)/(C*R)
 

Solve

% solve the differential equation to obtain i(t)
It=dsolve(current,i(0)==V/R)
 
It =
 
(V*exp(-t/(C*R)))/R
 

Plot

% substitute the component values
V=10;               % volts
R=1e3;              % ohms
C=1e-6;             % farads
t=0:R*C/10:5*R*C;   % seconds
Iout=subs(It,{'V','R','C','t'},{V,R,C,t});
Iout=double(Iout);

% plot and label
figure;plot(t,Iout);
ylabel('Current i');xlabel('Time t');title('Series RC Circuit');
grid on;


Last Update
6/26/2021 6:06:50 PM