0% found this document useful (0 votes)
42 views8 pages

Deliverable 2

The document describes a course project to design an RLC electrical circuit and determine the value of resistor R using a bisection root method. It provides the equations that describe the behavior of current, voltage, and charge in an RLC circuit over time. Test cases are presented with sample inputs of component values and outputs of the calculated resistor value R and a graph of decreasing charge over the dissipation time. A function is also described to find the numerical roots of the circuit equations within a given time interval.

Uploaded by

twinlens
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views8 pages

Deliverable 2

The document describes a course project to design an RLC electrical circuit and determine the value of resistor R using a bisection root method. It provides the equations that describe the behavior of current, voltage, and charge in an RLC circuit over time. Test cases are presented with sample inputs of component values and outputs of the calculated resistor value R and a graph of decreasing charge over the dissipation time. A function is also described to find the numerical roots of the circuit equations within a given time interval.

Uploaded by

twinlens
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

GNG1106 – Fundamentals of Engineering Computation

Course Project

Electrical Engineering
The Design of an RLC Electrical Circuit

Team Members

Arash Kamali - 300124787


Matthew Yakubu - 300123797

Date: November 17, 2019


1 Problem Identification and Statement

Kirchhoff’s laws are often used to study the behaviour of electric circuits. The project
focuses on circuits that are transient in nature where changes in current and voltage take
place over time until they reach a steady state. A period of adjustment will follow the
closing of the switch when the new steady state is reached. The length of the period will be
close in relation to the storage properties of the capacitor and the inductor. By accumulating
the sum of the voltage drop in the resistor, inductor, and capacitor, we can use Kirchhoff’s
2nd law (which states that the algebraic sum of voltage drops around a closed circuit = 0) to
describe the time variation of the charge on the capacitor. A design tool will be required to
determine the value of a resistor R in an RLC circuit to dissipate the charge on the capacitor
to a percentage of its original charge within a dissipation time. A bisection root method will
be used to find the value of the resistor R and a range will also be determined for the value
of R in the project.
2 Gathering of Information and Input/Output Description

2.1 SubSection 1
To find the flow of current through the resistor, we analyze the voltage drop given by Equation
1:
VR = iR
Where:
• i is the current (amperes)
• R is the resistance (Ohm’s)
• VR is the voltage drop of the resistor (volts)

Similarly, to find the flow of current through the inductor, we analyze the voltage drop within the
inductor using Equation 2:
di
VL = L
dt
Where:
• L is the inductance, limited to a range from 1 nH (10-9 Henrys) to 10000 µH (10000 x 10-
6
Henrys).
• (di/dt) represents the rate of current increasing/decreasing over time (amperes/second).
• VL is the voltage drop of the inductor (volts) at a point in time.

Once the charge (q) is obtained from the user, the voltage drop of the capacitor can be calculated
using Equation 3:

q
VC =
C

Where:
• q is the charge of the flow of electricity (coulombs)
• C is the capacitance/stored potential difference (Farad)
• Vc is the voltage drop at the capacitor (volts)

Kirchhoff’s second law which states that the sum of voltages eqaul 0 in a circuit is related to the
relationship between current and charge which can be summarized in Equation 7:
éæ 1 ù
æ R ö ö÷ ú
2

q(t ) = q0e - Rt /(2 L )


cos ê ç -ç ÷ t
êç LC è 2 L ø ÷ ú
ëè ø û
Where:
• q0 is the initial charge of the circuit (coulombs), at t = 0, q = q0 = V0C, and V0 = the
voltage from the charging battery
• e-Rt/(2L) is used to illustrate the rate of dissipation of the function

this expression is the frequency of the cosine function which is used to plot the graph of
charge over time

2.2 SubSection 2
Using Equations 8 and 9 the dashed lines (rate of dissipation) can be drawn.

q(t ) = q0e - Rt /(2 L )

Where:
• q is the charge of the flow of electricity (coulombs)
• q0 is the initial charge of the circuit (coulombs)
• e-Rt/(2L) is used to illustrate the rate of dissipation of the function

Using Equation 10 the values of g(R) can be found which are the numerical roots of the function.
g ( R ) = e - Rtd /(2 L ) - pc

Where:
éæ 1 2 ö ù
æ R ö
• g(R) are the numerical roots of the function q(t ) = q0e cos êç
- Rt /(2 L )
- ç ÷ ÷tú
êç LC è 2 L ø ÷ ú
ëè ø û
• e-Rt/(2L) is used to illustrate the rate of dissipation of the function
• pc = e-Rt/(2L)

The difference between the first and second terms in the equation can be used to find the
numerical roots of the function.

To find the bisection root for the value of Resistor R, the following formula can be used:

2
1 æR ö
- ç max ÷ = 0
LC è 2L ø
4L
Rmax =
C
This method can then be used for any value of R that lies between 0 and Rmax. The output for this
includes input values from the user, the calculated value of R as well as the plot of charge as a
function of time from time 0 to time td.

Input:

• Value of L (inductor) = VL/current (i)

• Value of Capacitor = VC/current(i)

• Battery voltage (Vo) = qo/C at t=0

• Dissipation time (td) =

• Percentage of original charge = q/qo

Output:

æ -2 L ln( pc ) ö
• Value of R, ç R = ÷
è td ø

• Charge (q) as a function of time plotted on a graph from t = 0 to t = td

o Ex.

Figure 1: Decreasing Charge on Capacitor C


Deliverable 2:

Test Cases:
1) Input:

Value of L = 1nH (10 Henrys) -9

Value of Capacitor (V )= 100 (volts)


c

Battery Voltage (V ) = 12 (volts)


0

Dissipation time (t ) = 30 s
d

Percentage of original charge (q/q ) = 0.25 (25%)


0

Output:

Value of L: 1nH (10 Henrys)


-9

Value of Capacitor (V ): 100 V c

Battery Voltage (V ): 12 V
0

Dissipation time (t ): 30 s
d

Percentage of original charge (q/q ): 0.25 0

The value of R = 0.092419624 Ohms


*Charge (q) as a function of time plotted on a graph from t=0 to 30*

2) Input:

Value of L = 400nH (400 x 10 Henrys)-9

Value of Capacitor (V )= 450 (volts)


c

Battery Voltage (V ) = 237 (volts)


0

Dissipation time (t ) = 60 s
d

Percentage of original charge (q/q ) = 0.67 (67%)


0

Output:

Value of L: 400nH
Value of Capacitor (V ): 100 V c

Battery Voltage (V ): 12 V
0

Dissipation time (t ): 60 s
d

Percentage of original charge (q/q ): 0.67 0

The value of R = 5.33970088 Ohms


*Charge (q) as a function of time plotted on a graph from t=0 to 60s*

3) Input:

Value of L = 1000nH (1000 x 10 Henrys) -9

Value of Capacitor (V )= 8000 (volts)


c
Battery Voltage (V ) = 4 x 10^3 (volts)
0

Dissipation time (t ) = 120 s


d

Percentage of original charge (q/q ) = 0.88 (88%)


0

Output:

Value of L:1000nH
Value of Capacitor (V ): 8000 V
c

Battery Voltage (V ): 4000 V


0

Dissipation time (t ): 120 s


d

Percentage of original charge (q/q ): 0.88


0

The value of R = 2.130556192 Ohms


*Charge (q) as a function of time plotted on a graph from t=0 to 120s*

4) Input:

Value of L = 10 000 nH (10000 x 10 Henrys)


-9

Value of Capacitor (V )= 600 (volts)


c

Battery Voltage (V ) = 356 (volts)


0

Dissipation time (t ) = 200 s


d

Percentage of original charge (q/q ) = 0.40 (40%)


0

Output:

Value of L: 10 000nH
Value of Capacitor (V ): 600 V
c

Battery Voltage (V ): 356 V


0

Dissipation time (t ): 200 s


d

Percentage of original charge (q/q ): 0.40


0

The value of R = 91.62907319 Ohms


*Charge (q) as a function of time plotted on a graph from t=0 to 200s*

5) Input:

Value of L = 50 000nH (50 000 x 10 Henrys)


-9

Value of Capacitor (V )= 600 000 (volts)


c

Battery Voltage (V ) = 4 000 (volts)


0

Dissipation time (t ) = 180 s


d

Percentage of original charge (q/q ) = 0.99 (99%)


0

Output:

Value of L: 50 000nH
Value of Capacitor (V ): 600 000 V
c

Battery Voltage (V ): 4 000 V


0

Dissipation time (t ): 180 s


d
Percentage of original charge (q/q ): 0.99
0

The value of R = 5.583519919 Ohms


*Charge (q) as a function of time plotted on a graph from t=0 to 180s*

Function Design:

findAllRoots (double initial time, double td, int n, double coefficients [], double roots [])

Parameters:
initial time: gives the start of the interval for searching for roots
td: gives the end of the interval in which roots are obtained
int n: number of coefficients in the function referenced by the array coefficients
double coefficients []: an array in which the coefficients of the function are stored
double roots []: an array that contains the values of the roots in the interval defined by the initial
time and time td and stores the roots of the trigonometric functions for capacitor C

Return Value:
The number returned is the number of roots in the given interval of this function which signifies when the
initial charge of the capacitor reaches 0.

Logic/Algorithm:
To find all the roots on the interval defined between start and end a function can be used which first
defines a subinterval size as subinter = (td-initial time)/SI_RESOLUTION. This divides the interval
between start and end into SI_RESOLUTION intervals which is a constant. A determinant loop, using
cntr (cntr is varied from 0 to SI_RESOLUTION-1), is then used to evaluate each subinterval as
follows: The limits of the subinterval is defined with ak = start + cntr*subinter) and bk = start +
(cntr+1)*subinter The function findRoot is called to see if the subinterval contains a root and if it does,
the root is saved in the roots array at index rootIx and rootIx is incremented. The index rootIx (which is
incremented after saving the root in the roots array) contains the number of roots saved in the array after
exiting the loop. Its value can be returned by the function to give the number of roots found and saved.
Using this logic in the findRoot function the total number of roots in the function are found.

You might also like