BCS 0.3
Basic symbolic Circuit Simulator for HP48GX
Introduction
BCS is a very simple yet powerful symbolic circuit simulator which allows direct current DC, altern current AC, frequency domain FD and transitory TR analysis of circuits containing linear independent elements. It uses modified nodal analysis method, and requires Erable and Alg48 installed in calculator. It was made by a fourth year ElectroMechanical Engineering (EME) student from UTP in Panamá.
Installation
You have to install three libraries in your HP48GX:
BCS (included in this zip)
Alg48
Erable
You can get all these files for free in Eric's www.hpcalc.org site.
Instructions
BSC takes from stack a circuit description and gives as answer a vector with voltage in all nodes and current through all defined branches.
To solve for voltages and currents in a circuit, the first step is to number nodes and branches. Number all nodes starting from 0. Then number all voltage sources with branches starting from the last node number. Then number all amperimeters starting from last voltage source branch number.
The notation used is as follows:
Independent voltage sources | { E +node -node value branch } |
Independent current sources | { J node1 node2 value } |
Resistor | { R node1 node2 value } |
Inductor | { L node1 node2 value initial_current } |
Capacitor | { C +node -node value initial_voltage } |
Amperimeter | {A node1 node2 branch} |
Notice: inductors and capacitors are ignored in DC analysis.
About currents. Current inside the voltage source is defined from positive node to negative node. Current in a current source leaves the source from last node. Current in amperimeter is measured from first node to last node.
Describe all elements of circuit in stack. Then go to the BCS library with right-shift 2 and press NXT until you see BCS, press it an then press the analysis you want to perform. DCCS for DC analysis, ACCS for AC analysis, FDCS for frequency domain analysis and TRCS for transitory analysis. The program will start the analysis. You'll have to wait some time, from 10 secs to a couple of minutes. Then you'll receive a vector, in which the program presents in numerical order the voltajes in all nodes and the currents in all voltaje sources and amperimeters, defined from first node to last node. To extract answers from vector, press EVAL. Answer vector is stored in variable u.
Examples
As my electronics teacher says: "one example is worth a thousand words"...
Example 3. TRCS: RL circuit analysis with given initial values.
Question: Given the following circuit, find a symbolic expression for current through inductor.
Solution: We can solve this problem using an amperimeber, but since the inductor is in serie with the voltage source, the current through the inductor will be the negative of the current through the source's branch. We decided not to use an amperimeter, to save some time. The more branched elements you have, the more time the program takes to get the answer.
Describe the circuit in calculator's stack, as shown below:
3: {E 1 0 3 3}
2: {L 1 2 2 5}
1: {R 2 0 4}
Now enter BCS library menu, and press TRCS. Wait some seconds and the program will place a symbolic vector in stack. The current through the inductor is the negative of the current through the voltage source branch (third value in the answer vector). :o) Isn't that easy?
Example 4. TRCS: RC circuit analysis with given initial values.
Question. Given the following circuit, find a symbolic expression for voltage in capacitor if vs=9*cos(t) and vc(0)=2 volts.
Solution:
Describe the circuit in calculator's stack, as shown below:
4: {E 1 0 '9*COS(T)' 3}
3: {R 1 2 3}
2: {R 2 0 6}
1: {C 2 0 0.1 2}
Now enter BCS library menu, and press TRCS. Wait some seconds. The voltage in capacitor is the voltage of node 2 (second value in the answer vector).
Bye!
I hope this program helps you as much as it has helped my classmates. They use it in several courses, from electronics to electrical machines. If you want to see more examples on symbolic circuit simulation (and if you understand some spanish ;c) go to http://scs.ticalc.org and look for it in the papers section. If you wish to try out a more powerful symbolic circuit simulator, try out SCS for TI89, which is much faster and powerful that BCS. Get it for free at http://scs.ticalc.org Soon I'll make a symbolic circuit simulator called XCS, which will be as powerful as SCS, but which will run in HP49G. Please, join PAX Movement to stop wars. http://pax.w3.to Also, let me know if you like the program... enjoy!
- Roberto Perez-Franco
bcs@scs.ticalc.org