Professional Documents
Culture Documents
Circuit Analysis Using Octave, Maxima, and PSPICE
Circuit Analysis Using Octave, Maxima, and PSPICE
EE210/EE316
Dr. A. M. Jaradat
Introduction
Circuit analysis can be thought of as a two step process; the first step is the conceptual one and the second step
is a mechanical one. The conceptual step consists of converting a circuit description into a set of mathematical
equations which relates the currents and voltages in different parts of the circuit. The mechanical step consists
of solving the derived set of equations. This is illustrated using a sketch in Figure 1.
Generally students give too much importance to the mechanical step, i.e., in solving the mathematical
equations, and consequently they lack confidence in the concepts of circuit theory. In phasor analysis, students
learn phasor analysis just when they are learning about complex numbers, so very soon they forget the theory
behind phasor analysis and all their energy goes into mastering the complex number calculations.
Wrong Way
Start
Circuit
Analysis
Conceptual
Step
Mechanical
step
Solution
fig1-OMP.m4
As a remedy to this situation you are encouraged to use computers as much as possible to carry out the (second)
mechanical step of the circuit analysis. Concentrate all your energies on the conceptual step and very soon
circuit analysis will be that reasonably easy.
The conceptual step consists in using KCL (node equations) or KVL (loop equations) to mathematically
describe a circuit plus some initial conditions for the transient analysis part.
It is the intention in this article to firstly show you how circuit analysis can be always broken into the
above two steps and secondly to get you to use computers to ease your burden in carrying out the mechanical
step. In the following we discuss three general purpose packages you are encouraged to use to help you with
the mechanical manipulations in the circuit analysis. After a brief introduction to the three general purpose
packages we will see how we analyze four circuits with the assistance of these three packages.
Matlab/Octave
Matlab/Octave is a calculator on a computer. To start the Matlab program you double-click on the
icon Matlab or Octave. Once the Matlab or Octave program is running it prompts for an input; the most
common prompt is >. When you want to calculate 2*2 on a calculator you press the following key sequence:
2 * 2 = and the answer is displayed on the screen. A Matlab or Octave session to do the same looks
like:
> 2*2 E N T E R
ans=4
Most calculators have a one line display but Matlab/Octave has almost an endless display and ability
to recall previous calculations. Moreover the output of calculations can be stored in variables and used
later. For example the above session can be:
> c=2*2 E N T E R
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
1/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
c=4
A big difference between a calculator and Matlab or Octave is that most calculators can only store
real numbers while with Matlab or Octave variables can be more general like complex numbers and
matrices. This means that after giving a numerical value to a matrix variable you can be used just like any
other variable. For example try:
> a=[1,0;0,1] Enter
> b=[2,0;0,2] Enter
> c=a*b E N T E R
Matlab and Octave also have hundreds of predefined functions which make it possible to write short
scripts to perform complex calculations.
In fact Matlab has a powerful programming language (C-like) that includes for loop, if statement, open and
close files, dynamic arrays, and graphics along with specialized toolboxes such as Signal Processing,
Neural Networks, Control, and Image Processing toolboxes.
Matlab as well as Octave are available on the department computers. Start using Matlab or
Octave as early as possible as a general computation tool will pay rich dividends later. We will discuss more
about Matlab and Octave along with the four examples later.
Octave can be downloaded freely from:
http://surfnet.dl.sourceforge.net/sourceforge/octave/octave-2.1.73-1-inst.exe
Matlab is not free.
Maxima
Maxima will do most of the things Matlab does and it will do more; Maxima will perform symbolic
computations for you. Once you learn to use Maxima you can replace the traditional pencil and paper note
taking. Many times while taking notes or solving a problem you would want to keep some variables in
symbolic form and not assign any numerical value to them. With programs like Matlab which only do
numerical computation it is not possible to keep anything in a symbolic form and hence a computer cant be
turned into a note book (note that Matlab added a symbolic toolbox which is a derivative from Maple but with
some alterations made on the Maple style of writing but originally Matlab is NOT a symbolic manipulator as
(Maxima, Maple, Mathematica, Derive, etc) . With Maxima you can turn your computer into a computing
machine and a traditional note book. The latest version of Maxima (version 5.10.0b Oct 2006) is freely
available from
http://mesh.dl.sourceforge.net/sourceforge/maxima/maxima-5.10.0b.exe
We will see more of Maxima while solving the circuits later.
PSpice
PSpice is a port of the legendary SPICE (simulation program with integrated circuit emphasis) package to
micro computers. This program performs all the circuit analysis you will need to perform and much more.
The text-book has a good introduction to PSpice. An evaluation copy can be found at:
http://www.engr.uky.edu/~cathey/pspice/Ps8_0.zip
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
2/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
2 Sample Problems
We will solve problems on DC analysis, AC analysis, Transient analysis, and Frequency Response. Each
problem will be addressed using PSPICE, Matlab/Octave, and Maxima.
(2-a) DC Analysis
In this problem we need to find the voltages at nodes 1 and 2 in the circuit shown in Figure 2. Node numbers
are shown next to the nodes.
R1
vin = 10V
R2
R3
1A
R4
example1.m4
-(V1-10)/R1-V1/R2-(V1-V2)/R3=0
-(V2-V1)/R3-V2/R4+1=0
The most important part of the solution is to write node voltage equations (1) and (2); rest is
mechanical. To get the values of V1, and V2 we have to solve equations (1) and (2).
(i) Matlab/Octave
M a t l a b ( O c t a v e ) understands the language of matrices. Equations (1) and (2) have to be rewritten in
a matrix form before we can use M a t l a b to solve them. A matrix equivalent of equations (1) and (2) is:
Av=b
With A being the matrix of coefficients, v the unknown vector, and b the right-hand side
A=[1/R1+1/R2+1/R3, -1/R3; -1/R3, 1/R3+1/R4];
b=[10/R1; 1];
v=inv(A)*b;
The above relationship is solved using Matlab as shown below. Double click on the Octave (or Matlab)
icon and wait for the interactive session to start. Type each line as shown below, terminating them
with E N T E R
%Example1.m
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
3/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
4/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
The first line in the script is a comment line; comments should be between /* */. Second and third lines
tell Maxima the equations describing the circuit. The next line is a command to solve both these equations
for the variables v1 and v2. The next statement verifies that Maxima has indeed generated a correct
solution; it substitutes the solution sol in the equations to make sure that there has been no error in the
computation. The line following it tells Maxima to assign values to the variables v1 and v2 as computed
by the solve command. The last part of the script assigns numerical values to these parameters.
Every Maxima command should end with a semi-colon, ; and if you want Maxima not to display
the result on the terminal, terminate the command by a colon $.
Maxima also has an option to read in script files. Use your favorite editor or pfe and create a file
example1.mac. Type in all of the Maxima script shown above. Start a new Maxima session from
within the directory where the file example1.mac lives. From the file menu, batch file and pick your file
example1.mac which will enable Maxima to run it immediately.
It is a good practice to start your session (or batch file) with the command:
restart;
If at any time you feel that Maxima is not behaving as it should, then close it and restart it and try again.
(iii) PSpice
Start the editor textedit, type in the script shown below and save the file as example1.cir. After creating and
saving the file, double-click on the PSpice application. Then go to the open under file menu; select the
file example1.cir and PSp ice will perform the simulation. If there are any errors then an error
description can be found in the file example1.out; correct them in the original file example1.cir
and then try again, i.e. go to PSpice, open the file, etc.
PSpice comes with another program Probe which is used to display and plot the results from PSpice.
Double-click on Prob e icon and again go to open in the file menu and open the file example1.dat and
follow the steps (from the menu Trace, Add, V(1)).
Example1.cir
v1 3 0 DC 10V
R1 3 1 2
R2 1 0 2
R3 1 2 3
R4 2 0 4
I1 0 2 1A
* next are the commands (start with dot)
.DC v1 0 20 .2
.PRINT DC I(R1) V(1) V(2) I(R4)
.PROBE
.END
The first line of every PSpice script has to be a title line and it will be considered as a comment or title line.
Every circuit should have a node 0, the reference node. Rest of the nodes can have any arbitrary number
but the reference node has to be numbered 0. The second line declares that the circuit has a voltage source
between the nodes 3 and 0 of 10V DC. The following four lines tell resistor values. Voltage sources have to
have v as the first letter, resistors have to have R as the first letter etc. PSpice is case insensitive, i.e.
vsrc10 is the same as VSRC10.
Line #8 starts with an asterisk * (the comment indicator in PSpice scripts). Comment lines are ignored by
SPICE.
All commands are preceded by a dot, ..
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
5/37
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
EE210/EE316
Dr. A. M. Jaradat
The command .DC v1 0 20 0.2 tells PSpice to calculate various voltages and currents in the
circuit when v1 varies between 0 and 20V in the steps on 0.2V; .DC means perform a DC analysis;
more about this later.
The .PRINT command prints the values of all the parameters listed on the same .PRINT line in a
file having extension .out; I(R1) means current through the resistor R1 and V(2) means the voltage at
node 2, etc.
The command .PROBE tells PSpice to create a .dat file suitable to be read by P r o b e f o r p l o t t i n g .
All P S p i c e scripts must terminate with a .END line.
A .cir file is automatically created from .sch to be fed into PSpice.
Alternatively a .cir file can be created using an editor (TextEdit) as discussed above and then read into
PSpice.
On completing the simulation, from PSPICEAD-File- Run Probe program, and on Probe TraceAdd-V(2). The Design Centre also has good help features.
Also from PSPICEAD-File-Examine Output to view the printed output (.out file produced as a result
of the simulation).
(2-b) AC Analysis
The example in the last section was meant to get you familiar with three very useful packages. In this example
we will do something meaningful from the circuit analysis point of view and consolidate what we have
already learnt about the three packages. The problem here is to find the steady-state output
voltage for the circuit shown in Figure 3 for a 1000 Hz sinusoidal input.
+ sin(21000t)
rc
c
+
cv1
gm v1
ro
Rl
+
vout
fig3-OMP.m4
(KCL @ node 1)
(3)
-v2/r0-v2/(rc+Rl)-gm*v1-j*w*cmu*(v2-v1)=0
(KCL @ node 2)
(4)
In the following Matlab and Maxima scripts the above two equations are solved for the output voltage,
vout.
-(v1-vin)/rb-v1/rpi-j*w*cpi*v1-j*w*cpi*(v1-v2)=0
(i) Matlab
First rewrite the equations (3) and (4) in a matrix form and see that the following M a t l a b script correctly
encodes the matrix. Either create a file example2.m with the following script or execute this script
interactively and note down the output voltage. What is the physical significance of the complex number you
get as the output voltage?
%Example2.m
rb=10;
cpi=0.01*10(-6); r p i = 2 6 0 0 ; cmu=1*10(-12);
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
6/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
0.00064i
0.12931i
Vout = -189.56578 +
0.12678i
(ii) Maxima
The Maxima script given below should by now begin to mean something to you. Either save the following
script in a file example2.mac or interactively execute the commands and note the output voltage. The last
command float in the following script is requesting from Maxima to evaluate the variable in floating
point arithmetic.
/*Example2.mac */
restart;
eqn1: -(v1-vin)/rb - v1/rpi - %i*w*cpi*v1-(v1-v2)*%i*w*cmu=0;
eqn2: -v2/r0-v2/(rc+Rl) - gm*v1 - (v2-v1)*%i*w*cmu=0;
rb:10; cpi:0.01*10^(-6); rpi:2600; cmu:1*10^(-12); gm:40*10^(-3);
r0:100*10^(3); rc:100; w:2*%pi*1000;
vin:1;
Rl:5000;
sol:solve([eqn1,eqn2],[v1,v2]);
float(sol);
Vout: v2*Rl/(rc+Rl);
float(Vout);
(iii) PSpice
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
7/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
cpi 1 0 0.01uF
rpi 1 0 2600
cmu 1 2 1pF
r0 2 0 100K
rc 2 4 100
Rl 4 0 5000
G1 2 0 1 0 40m
.AC LIN 10 100 2000 ; 100= # of points between 100Hz and 2000Hz
.PROBE
.END
Most of the commands in the above script should be clear. The declaration
G1 2 0 1 0 40m tells PSpice that this is a voltage dependent current source between the nodes 20,
controlled by the voltage across the nodes 10, with a gain of 40milli=40e-3).
The command
.AC LIN 10 100 2000 tells PSpice to perform phasor analysis for input sinusoids with frequencies
between 100 and 2000 Hz, varying linearly in 10 Hz intervals. Finally use Probe to see the frequency
response.
By default, Probe produces plots on a black background. To change the background color of plots produced
by probe from black to white and the plotting to be in black, blue, red, you need to open the file
C:\MSimEv_8\Bin\package.ini using notepad.exe (or any other text editor) and add the following lines in
the indicated locations:
[Probe Display Colors]
background=brightwhite
foreground=blue
trace_1=black
trace_2=blue
trace_3=red
trace_4=green
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
8/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
trace_5=brown
trace_6=magenta
trace_7=darkgray
and save the file.
10V
0.5
RLC.transient.m4
The above .tran command will cause PSpice to carry out circuit analysis from t=0 to 20 milliseconds, using
the initial conditions (UIC) on inductors and capacitors which are given elsewhere. The first 20m is the print
step, and the second 20m is the final time for simulation and 0.01m is the step ceiling, i.e. simulation time
steps should not exceed 0.01milli seconds. The 0 means the no print time, i.e. PSpice ignores results from
time 0 to no print time and in our example all results will be collected and nothing omitted since no print time
is zero.
L23 description has ic=0 which means that the initial condition which is the current
in the inductor L23 is 0.
C30 description line has ic=0 which means that the initial condition which is the
voltage across the capacitor C30 is zero.
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
9/37
EE210/EE316
2006-11-26
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
Dr. A. M. Jaradat
10/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
(ii) Maxima:
The following is a Maxima batch file that solves for the voltage across the capacitor vc(t).
/* rlc_transient.mac */
restart;
kill(all);
globalsolve:true;
Vs:10; R:1000; L:1; C:0.5e-6;
de1: -Vs+R*C*diff(vc(t),t,1)+L*C*diff(vc(t),t,2)+vc(t)=0; /* 2nd order ODE */
atvalue(vc(t),t=0,0);
/* first initial condition */
atvalue(diff(vc(t),t),t=0,0);
/* second initial condition */
sol:desolve(de1,vc(t));
plot2d(rhs(sol),[t,0,20e-3]);
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
11/37
EE210/EE316
14
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
%e^-(500*t)*(-10*sin(500*sqrt(7)*t)/sqrt(7)-10*cos(500*sqrt(7)*t))+10
12
10
0
0
0.005
0.01
0.015
0.02
/* R:2000 */
Vs:10; R:2000; L:1; C:0.5e-6;
de1: -Vs+R*C*diff(vc(t),t,1)+L*C*diff(vc(t),t,2)+vc(t)=0;
atvalue(vc(t),t=0,0);
atvalue(diff(vc(t),t),t=0,0);
sol:desolve(de1,vc(t));
plot2d(rhs(sol),[t,0,20e-3]);
12
%e^-(1000*t)*(-10*sin(1000*t)-10*cos(1000*t))+10
10
0
0
2006-11-26
0.005
0.01
0.015
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
0.02
12/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
/* R:4000 */
Vs:10; R:4000; L:1; C:0.5e-6;
de1: -Vs+R*C*diff(vc(t),t,1)+L*C*diff(vc(t),t,2)+vc(t)=0;
atvalue(vc(t),t=0,0);
atvalue(diff(vc(t),t),t=0,0);
sol:desolve(de1,vc(t));
plot2d(rhs(sol),[t,0,20e-3]);
10
%e^-(2000*t)*(-20*sinh(1000*sqrt(2)*t)/sqrt(2)-10*cosh(1000*sqrt(2)*t))+10
9
8
7
6
5
4
3
2
1
0
0
0.005
0.01
0.015
0.02
/* R:8000 */
Vs:10; R:8000; L:1; C:0.5e-6;
de1: -Vs+R*C*diff(vc(t),t,1)+L*C*diff(vc(t),t,2)+vc(t)=0;
atvalue(vc(t),t=0,0);
atvalue(diff(vc(t),t),t=0,0);
sol:desolve(de1,vc(t));
plot2d(rhs(sol),[t,0,20e-3]);
10
%e^-(4000*t)*(-40*sinh(1000*sqrt(14)*t)/sqrt(14)-10*cosh(1000*sqrt(14)*t))+10
9
8
7
6
5
4
3
2
1
0
0
2006-11-26
0.005
0.01
0.015
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
0.02
13/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
The FOR statement available in Maxima for programming will repeat a compound statement as
long as some logical condition is valid. Here we have
for R in [1000,2000,4000,8000] do compound statement (simple statements are comma separated
and all are enclosed in parenthesis):
/* rlc_transient_for.mac */
restart;
kill(all);
globalsolve:true;
for R in [1000,2000,4000,8000] do
(
/* begin of a compound statement. Inside it, statements separated by commas */
Vs:10, L:1, C:0.5e-6,
de1: -Vs+R*C*diff(vc(t),t,1)+L*C*diff(vc(t),t,2)+vc(t)=0,
atvalue(vc(t),t=0,0),
atvalue(diff(vc(t),t),t=0,0),
sol:desolve(de1,vc(t)),
/* solve for vc(t) */
plot2d(rhs(sol),[t,0,20e-3]) /* last simple statement in a compound statement NO Comma*/
); /* end of compound statement */
the same program written using ode2 rather than desolve:
/* rlc.ode2.transient_for.mac */
restart;
kill(all);
/* globalsolve:true; */
Vs:10; L:1; C:0.5e-6;
for R in [1000,2000,4000,8000] do
(
de1: -Vs+R*C*'diff(vc,t,1)+L*C*'diff(vc,t,2)+vc=0,
sol:ode2(de1,vc,t),
sol1:ic2(sol,t=0,vc=0,'diff(vc,t)=0), /* t=0, vc(0)=0, vc'(0)=0 */
sol2:ratsimp(sol1),
plot2d(rhs(sol2),[t,0,20e-3])
); /* compound statement */
desolve can be used to solve a system of first-order ordinary differential equations. Below is
the solution of two first-order ODE using desolve which is a direct translation of the hand
solution(natural way of writing the ODEs with little arrangements):
/* rlc.2eqns.transient_for.mac */
kill(all);
restart;
Vs:10; L:1; C:0.5e-6;
for R in [1000,2000,4000,8000] do
(
de1: L*diff(i(t),t)=Vs-R*i(t)-vc(t),
/* first ode via KVL */
de2: C*diff(vc(t),t)=i(t),
/* second ode, capacitor current = i(t) */
atvalue(vc(t),t=0,0),
atvalue(i(t),t=0,0),
sol:desolve([de1,de2],[vc(t),i(t)]),
plot2d(rhs(sol[1]),[t,0,20e-3]),
/* sol[1] is vc(t) */
plot2d(rhs(sol[2]),[t,0,20e-3])
/* sol[2] is i(t) */
);
/* end of compound statement */
(iii) Matlab/Octave
We need to write the set of first-order differential equations that govern the functionality of the
circuit. For the RLC circuit, we have two unknown quantities, namely, the voltage across the
capacitor vc(t) and the current through the inductor i(t), call them x(1)=vc(t) and x(2)=i(t) with
x is a 2 by 1 column vector.
Define a new 2 by 1 column vector xprime with xprime(1)=dx(1)/dt and xprime(2)=dx(2)/dt.
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
14/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
line 1
line 2
12
10
8
6
4
2
0
-2
0
0.005
0.01
0.015
0.02
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
15/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
2F
+
+
Vs
4H
50F
Vout
Butterworth.4.m4
(i) PSPICE
The following is the .CIR file that computes the frequency response
4-th order Butterworth BPF
Vs
1
0
ac
1
L12
1
2
100uH
C23
2
3
2uF
C30
3
0
50uF
L30
3
0
4uH
R30
3
0
1
.ac
dec
200
6k
25k; dec=decades, 200 points pr decade, vary frequency 6K to 25K Hz
.probe
.end
And the response is as shown below
(ii) Maxima
Vout=Vs/(jwL1+1/(jwC1)+ZP)*ZP with ZP=L2||C2||R
The Butterworth.mac file to simulate the filter is shown below:
/* Butterworth.4.mac */
restart;
/* define a function to compute Z or two impedances in parallel ZPZ=Z1||Z2 */
ZPZ(Z1,Z2):=Z1*Z2/(Z1+Z2); L1: 100e-6; C1: 2e-6; L2: 4e-6; C2: 50e-6; R: 1;
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
16/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
freq:[]; H:[];
for f:300 step 100 thru 30000 do
(
w:2*%pi*f,
Vs:1, /* phasor = 1 angle 0 */
Zp1:ZPZ(%i*w*L2,1/(%i*w*C2)),
ZP:ZPZ(Zp1,R),
Zall: %i*w*L1+1/(%i*w*C1)+ZP,
Vout: Vs*ZP/Zall,
freq:append(freq,[f]),
H:append(H,[abs(Vout)])
)$
plot2d([discrete,float(freq),float(H)]);
Dr. A. M. Jaradat
/* parallel L and C */
/* parallel R, L and C */
/* overall Z as seen by Vs */
/* voltage on parallel branch=Vout */
/* add f to list freq */
/* add magnitude of Vout to list H */
/* compound statement. $==> no echo */
/* plot list H versus list freq */
discrete1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
5000
10000
15000
20000
25000
30000
(iii) Matlab/Octave
Write a function ZPZ.m and the main file Butterworth.m
% zed=Z1 parallel with Z2
function zed=ZPZ(Z1,Z2)
zed=Z1*Z2/(Z1+Z2);
return
and type the following in a file called butterworth.m
% 4rth order Butterworth.m Band Pass Filter (BPF)
L1= 100e-6; C1= 2e-6; L2= 4e-6; C2= 50e-6; R= 1;
freq=[]; H=[];
for f=300:100:30000
w=2*pi*f;
Vs=1; % phasor = 1 angle 0
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
17/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
Zp1=ZPZ(j*w*L2,1/(j*w*C2));
ZP=ZPZ(Zp1,R);
Zall= j*w*L1+1/(j*w*C1)+ZP;
Vout= Vs*ZP/Zall;
freq=[freq,f];
H=[H,abs(Vout)];
end %for statement
plot(freq,H);
xlabel('Frequency in Hz');
ylabel('Relative amplitude');
title('Frequency Response of Butterworth 4rth order BP filter');
and the output will be (from Matlab)
Frequency Response of Butterworth 4rth order BP filter
1
0.9
0.8
Relative amplitude
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
2006-11-26
0.5
1.5
Frequency in Hz
2.5
3
4
x 10
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
18/37
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
EE210/EE316
Dr. A. M. Jaradat
4 Miscellaneous Examples
4.1 HKD6eCh5P60: Find Rin:
Is
12
6
Vs = 1 +
Rin
12
18
hkd6ech5p60.m4
We begin by converting the -connected network consisting of the 4-, 6-, and 3- resistors to an equivalent
Y-connected network:
RA
RB
RC
D = 6 + 4 + 3 = 13
R R
6 4
R1 = A B =
= 1.846
D
13
R R
43
R2 = B C =
= 923.1m
D
13
R R
3 6
R3 = C A =
= 1.385
D
13
Then network becomes:
1.846
0.9231
1.385
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
19/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
Matlab
Insert a 1 volt voltage source (Vs=1) at the input side between nodes 1 and 0, and write KVL by
inspection,
% H K D 6e C h 5 P 6 0 . m
%writin g the RI=V equations b y inspection
Vs=1;
V=[Vs; 0; 0; 0];
R=[12, -12, 0, 0;
-12, (12+12+6+18), -6, -18;
0, -6, (6+4+3), -3;
0, -18, -3, (18+3+6)];
I=R\V;
Rin=Vs/I(1)
And the answer: Rin = 7.3469
Maxima
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
20/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
4.2 Maximum Power Transfer: consider a one loop circuit having Vs, Rs, and Rl in series. We
want to derive the condition on the value of Rl that absorbs maximum power from Rs.
Write kvl:
-Vs+i*Rs+i*Rl=0;
i=Vs/(Rs+Rl);
and the dissipated power in Rl=
P=i^2*Rl;
Differentiate P w.r.to Rl and equate the derivative to zero, we get
Rl=Rs
In Maxima,
/* max_power_transfer.mac --- Vs, Rs, Rl circuit */
restart;
kcl: -Vs+i*(Rs+Rl)=0;
sol1:solve(kcl,i);
/* answer i=Vs/(Rs+Rl) */
p:ev(i^2*Rl,i=rhs(sol1[1])); /* answer p=(Vs^2*Rl)/(Rs+Rl)^2 */
solr:solve([diff(p,Rl)=0],[Rl]);/* answer Rl=Rs */
Vs:1; Rs:1;
plot2d(p,[Rl,0,5]);
Example: Consider the circuit below, find RL that dissipates maximum power.
Definitely the solution is to find Thevenins equivalent circuit as seen by the load Rl, then set
Rl to Thevenins resistance.
Open circuit condition (Rl= open circuit=infinite resistor),
Kcl at node 2: -(v2-20)/4-v2/6-10=0; and
-5v2-60=0; and v2=-12 volts.
Short circuit condition (Rl=short circuit=0),
Kcl at node 2: -(v2-20)/4-v2/6-10-Isc=0, and v2=0 (due to the short circuit), hence
Isc=-5A
Rth=Voc/Isc=(-12)/(-5)=2.4 Ohms
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
21/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
20V
10A
RL
max-power2.m4
Maxima
/* max_power2.mac */
restart;
kcl2: -(v2-20)/4-v2/6-10-v2/R;
sol1:solve(kcl2,v2);
p:ev(v2^2/R,v2=rhs(sol1[1]));
solr:solve([diff(p,R)=0],[R]);
float(rhs(solr[1]));
/* to plot p vs R */
plot2d(p,[R,0,10]);
/*
/*
/*
/*
v2=-60R/(5R+12) */
p=(3600R)/(5R+12)^2; */
R=12/5 */
R=2.4 */
3600*R/(5*R+12)^2
14
12
10
8
6
4
2
0
0
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
10
22/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
PSPICE
The circuit file containing the commands to find (graphically) maximum power and the corresponding RL:
Max_power2.cir
v10
1
0
20
i20
2
0
10
r12
1
2
4
r20
2
0
6
;vary RL load resistor 0.1 upto 100
RL
2
0
{R}; variable load resistor
.param R=2.4 ;used by .op, ignored by .dc
;.dc
param R list .1 .2 .4 .7 1 2 4 7 10 20 40 70 100
.dc
param R
2 3 0.01
.op
.print dc
v(2)
I(RL)
.probe
.end
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
23/37
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
EE210/EE316
Dr. A. M. Jaradat
Matlab
The m-file that does the plotting:
%max_power2.m
P=[]; R=[];
for r=0:0.01:5
p=3600*r/(5*r+12)^2;
P=[P p];
R=[R r];
end
plot(R,P); xlabel('Resistor'); ylabel('Power'); title('Max\_Power2.m');
Max_Power2.m
15
Power
10
2006-11-26
0.5
1.5
2.5
Resistor
3.5
4.5
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
24/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
rectifierhw.cir
* Half-Wave rectifier without C
v
1
0
sin(0 12 60)
da
1
2
D1
r
2
0
1k
*c
2
0
25uF
.model
d1
d
.tran 0.1ms
33.33ms
.probe
.end
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
25/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
rectifierfw.cir
* Full-Wave rectifier with C
v1
1
0
sin(0 12 60)
v2
0
3
sin(0 12 60)
d1
1
2
da
d2
3
2
da
r
2
0
1k
c
0
2
25uF
.model
da
d
.tran 0.1ms
25ms
.probe
.end
2006-11-26
Dr. A. M. Jaradat
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
26/37
EE210/EE316
2006-11-26
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
Dr. A. M. Jaradat
27/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
2ms
1v
28/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
29/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
30/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
31/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
32/37
EE210/EE316
2006-11-26
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
Dr. A. M. Jaradat
33/37
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
EE210/EE316
Dr. A. M. Jaradat
NODE VOLTAGE
NODE VOLTAGE
NODE VOLTAGE
NODE VOLTAGE
1)
2)
.2190
3)
1.6609
4)
5) 11.3460
6)
-.0020
7)
-.7057
8) -10.4430
9) -11.2220
( 10) -12.0000
.2500
( 11) 12.0000
( 12)
-.5575
-.7157
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
34/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
4.6 Linearity and Superposition: Here we want to show by examples that any node
voltage or branch current in any linear circuit can be represented as a linear
combination of the independent sources in the circuit.
(1) Verify superposition theorem for the following circuit:
Maxima:
/* Superosition1.mac */
kill(all); restart; globalsolve:true;
kvl1: -v1+R1*i1-v2+R3*(i1-i2)+R2*i1=0;
kvl2: R3*(i2-i1)+v2+R4*i2=0;
solve([kvl1,kvl2],[i1,i2]);
/* i1=(v2 R4 + v1 R4 + v1 R3)/(R3 (R4 + R2 + R1) + R2 R4 + R1 R4) */
/* i2=(v1 R3 - v2 R2 - v2 R1)/(R3 (R4 + R2 + R1) + R2 R4 + R1 R4) */
expand(float(ev(i1,[R1=10, R2=5, R3=7, R4=8])));
/* i1=0.02846975088968 v2+0.053380782918149 v1*/
expand(float(ev(i2,[R1=10, R2=5, R3=7, R4=8])));
/* i2=0.02491103202847 v1-0.053380782918149 v2*/
(2) Verify superposition theorem for the following circuit:
Superposition2: Lab manual example.
Maxima:
/* Superosition1.mac */
kill(all); restart; globalsolve:true;
kvl1: R3*i1+R2*(i1-i3)+R1*(i1-i2)=0;
kvl2: -vb1+R1*(i2-i1)+Rl*(i2-i3)=0;
kvl3: Rl*(i3-i2)+R2*(i3-i1)+R4*i3+vb2=0;
solve([kvl1,kvl2,kvl3],[i1,i2,i3]);
expand(float(ev(i1,[R1=3300,R2=270,R3=1000,R4=680,Rl=150])));
/* 7.739E-4vb1-3.008E-4 vb2 */
expand(float(ev(i2,[R1=3300, R2=270, R3=1000, R4=680, Rl=150])));
/* 0.001 vb1 - 3.324E-4 vb2 */
expand(float(ev(i3,[R1=3300, R2=270, R3=1000, R4=680, Rl=150])));
/* 3.324E-4 vb1 - 0.001 vb2 */
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
35/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
Maxima:
kill(all); restart; globalsolve:true;
kvl2: R1*(i2-i1)+R2*i2+3*ix+R3*(i2-i3)=0;
eq1: i1=-I; eq2: i4-i3=2*vy; eq3: i4=-ix; eq4: vy=R1*(i1-i2);
kvlsm: -v+R3*(i3-i2)-3*ix+R4*i4=0;
sol:solve([eq1,kvl2,eq2,eq3,eq4,kvlsm],[i1,i2,i3,i4,ix,vy]);
sol1:ev(sol,[R1=4,R2=5,R3=2,R4=8]);
sol2:float(ev([sol1],[I=3,v=12]));
the output in symbolic form interms of I and v:
i1 = - I,
i2 = (I(R1R3(2R4-1)+R1(-R4-3))+vR3+3v)/(R3(R4+R1(1-2R4)+R2)+R2(R4+3)+R1(R4+3))
i3=(I(R1R2(2R4+6)+R1R3(2R4-1))+vR3+vR2+7vR1)/(R3(R4+R1(1-2R4)+R2)+R2(R4+3)+R1(R4+3))
i4=(I(2R1R2+R1)R3+(2vR1-v)R3-vR2-vR1)/(R3(R4+R1(1-2R4)+R2)+R2(R4+3)+R1(R4+3))
ix=(I(2R1R2+R1)R3+(2vR1-v)R3-vR2-vR1)/(R3(R4+R1(1-2R4)+R2)+R2(R4+3)+R1(R4+3))
vy=(I(R3(R1R4+R1R2)+R1R2(R4+3))+vR1R3+3vR1)/(R3(R4+R1(1-2R4)+R2)+R2(R4+3)+R1(R4+3))
substitute for the resistors the values R1 = 4, R2 = 5, R3 = 2, R4 = 8 we get
i1=-I, i2=(76I+5v)/5, i3=(560I+35v)/5, i4=-(88I+5v)/5, ix=(88I+5v)/5, vy=-(324I+20v)/5
substitute for I=3A, v=12 volts we get
i1=- 3.0, i2=57.6, i3=420.0, i4=-64.8, ix=64.8, vy=-242.4
PSPICE solution: numerical values are presented here
superposition3.cir
I
1
0
dc
3
r12 1
2
4
v20 2
0
dc
12
r13 1
3
5
r24 2
4
2
h30 3
4
v0x 3
g04 0
4
1
2
2
r30 3
x
8
v0x 0
x
dc
0
.op
.end
******************************************************************************
NODE VOLTAGE
NODE VOLTAGE
NODE VOLTAGE
( 1) -230.4000
( 2) 12.0000
( 3) -518.4000
VOLTAGE SOURCE CURRENTS
NAME
CURRENT
v20
-4.230E+02
v0x
6.480E+01
NODE VOLTAGE
( 4) -712.8000
NODE VOLTAGE
( x) 0.0000
Note that the current into v20 =-423A=i1-i3, and the current into v0x=64.8=-i4 which are the same values
found by Maxima above. Other values can be checked.
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
36/37
EE210/EE316
C
maa aanndd PPSSppiiccee
Ciirrccuuiitt A
Annaallyyssiiss w
wiitthh O
Occttaavvee,, M
Maaxxiim
Dr. A. M. Jaradat
5 Conclusion
We analyzed four circuits; DC, AC, Transient, and Frequency Response. If you master the concepts in circuit
analysis, then using the packages PSpice, Matlab/Octave, and Maxima will speed up your progress since the
mechanical part will be almost totally removed. In fact, writing KVL or KCL, and the necessary conditions
(initial or boundary), then using Maxima you only need to worry about the Maxima syntax.
Using Matlab/Octave requires little re-arrangement of the equations in order to put them in a suitable form for
the Matlab/Octave.
The use of PSPICE in circuit analysis enables the student to analyze electric circuits and give him/her better
understanding of the circuit behavior under different loading conditions. Making changes and re-simulating
the circuit enables the student to study the effect of changing the components and/or modifying their values.
Examples on the second-order system transient were made and changes of the resistor (1K, 2K, 4K, and 8K)
R forced the circuit to change its response from underdamped to critically damped and to overdamped
were easily verified.
The intention behind distributing this note is to make you realize that once you master a simple thing like
writing node equations you have indeed mastered circuit theory; rest is all mechanical and can be taken care of
by programs like Matlab/Octave and Maxima.
References
[1] Hemanshu Roy Pota, Circuit Analysis with Matlab, Maple, and PSpice, 1998.
http://boronia.ee.adfa.edu.au/staff/hrp/teaching/docs/packagesIntro/
[2] Ney de Souza, P., Fateman, R., Moses, J. and Yapp, C., The maxima Book, 2003.
http://www.math.psu.edu/glasner/Max_doc/maximabook-19-Sept-2004.pdf
[3] Rashid, M. H., SPICE for Circuits and Electronics using PSPICE, Prentice-Hall, 1995.
[4] Part-Enander, E., Sjoberg, A., Melin, B. and Isaksson, P., The MATLAB Handbook, Addison-Wesley, 1998.
2006-11-26
JJJooorrrdddaaannn U
U
T
Unnniiivvveeerrrsssiiitttyyy ooofff SSSccciiieeennnccceee aaannnddd T
Teeeccchhhnnnooolllooogggyyy
37/37