Hello, my name is Rod Nibbe and to simplify my homework and increase
my thinking time on tests I made a few simple programs.
These programs are for Network Analysis II or Circuits II. I made my
programs primarily for Series and Parallel resonance problems.
In a series resonance circuit a resistor, a capacitor, and an induc-
tor are connected in series with a power supply. A resonance frequency
exists where the circuit appears purely resistive. The constants alpha,
omega (one, two, and naught), bandwith, and quality depend on the values
of the elements. If you know the values of these elements...the following
programs should speed up you homework considerably.
'RCLSE'
<< -> r c l
<< 'r*INV(2*l)'EVAL
'SQ(r*INV(2*l))'EVAL
'INV(l*c)'EVAL
>>
>>
Note: alpha is series circuits = R/2L
omega (resonant freq.) is series (and parallel) = (LC)^(-1/2)
This program inputs the value of R, C, and L (It is very wise
to put into the name of the program the variables the program needs.),
and outputs...
3:
2:
1:
-------MENUS---------
The reason for this output is for ease of input into the "slave"
programs that follow my parallel resonance program.
---------------------------------------------------------------------
Parallel Resonance... (A circuit with the same elements in parallel.)
'RCLPA'
<< -> r c l
<< 'INV(2*r*c)'EVAL
"SQ(INV(2*r*c))'EVAL
'INV(l*c)'EVAL
>>
>>
Output follows the same format as series output.
Note: the only change in the two programs is in the value of alpha.
alpha for a parallel circuit = 1/2RC.
----------------------------------------------------------------------
NOW FOR THE COOL STUFF!
For OVERDAMPED, UNDERDAMPED, and CRITICALLY DAMPED situations, the
output of the last two programs goes directly into the next one to
(almost) instantly give you the condition of the circuit w/o compar-
ison on your part. (Granted, looking at two numbers and finding out
which one is larger is not hard, but from that point you can go to some
nice functions that will determine your constants in the differential
equation.)
'AbW'
<< -> a b w
<< '-a-(b-w)^(.5)'EVAL
'-a+(b-w)^(.5)'EVAL
IF b w >
THEN "OVERDAMP"
ELSE
IF b w <
THEN "UNDERDAMP"
ELSE "CRITICAL"
END
END
>>
>>
This inputs the direct output of the first two programs and outputs...
3: S1
2: S2
1: "OVERDAMP"
------MENUS-----
Note: S1 and S2 are coeficients that go into your diff. eq.
BE CAREFUL...there are up to four numbers that you must inject
into the three standard differential equations...this program only
provides you with two.
---------------------------------------------------------------------
From the output of this program, I made a program that calculates the
other two unknowns for the overdamped case only. I did not save enough
time with this one to warrant writing programs for the other two cases.
You must drop the word "OVERDAMP" from your stack before running this.
'OVERD'
<< -> s1 s2 |Input s1 and s2
<< { STO V C R I } MENU HALT |Create custom menu
V s2 * V R / I + C INV * + |This formula calculates
s2 s1 - / |the unknown named A1.
V s1 * V R / I + C INV * + |This formula calculates
s2 s1 - / |the unknown named A2
>>
>>
Output...
First you are given a menu with the following choices
-V- -C- -R- -I- |Initial Voltage...Cap value...Resis value...
|Initial current
Put the number of the initial voltage on the stack then press -V- etc.
When you have inputted all values press the CONT key.
3:
2: A1
1: A2
-------MENUS------
(You should check to see if these values are correct. For a different
textbook you may want to switch the output of A1 and A2.)
-----------------------------------------------------------------------
BANDWIDTH
The last (and I think the best) program takes input from either of
the first two programs and outputs lower and upper half-power frequen-
cies and simply by hitting the "-" key gives you the bandwidth.
'BAND'
<< -> a b w
<< a b w + (square-root key) + a
NEG b w + (square-root key) +
>>
>>
Output...
3:
2: upper half-power frequency
1: lower half-power frequency
--------MENUS--------
While writing these programs I have learned a lot and my
programming skills have increased with each program. You will most
likely notice that the first programs used more steps than were
necessary to get the job done and I did most everything in algebraic
mode. I can't see a day when I will fill my HP-28S so my programs are
not sleek. You may want to modify them if you have memory problems.
My goal for my programs is to make the output readily inputtable
into another function. This allows me to "show my work" by giving
values the teachers will require when they correct my papers.
Hope you can use these simple programs, and if you must do it...
DO IT FAST!
Rod Nibbe