Post Reply 
Long Shot #2 - BLAP Examples
08-08-2014, 09:36 AM (This post was last modified: 08-10-2014 06:56 AM by Ángel Martin.)
Post: #1
Long Shot #2 - BLAP Examples
Here's another post unlikely to be very successful, but we'll try anyway.

There's a very interesting Ladder Analysis program that uses the "backwards" technique to reduce the circuit and calculate the results.

"Eimac AS-49-34 Ladder analysis program for the HP-41C"

It's posted at TOS and also at the following site:
http://pa3csg.hoeplakee.nl/joomla25/inde...-eme-notes

here is the program:
http://pa3csg.hoeplakee.nl/joomla25/imag...-49-34.pdf

The documentation only describes the main aspects and lists the program but it's lacking any example of utilization. Because the program is very modular and routine-based, not having an example makes it almost impossible to use.

Has anyone come across this before, and succeed in getting it to work?
Any hints would be great.

Cheers,
ÁM
Find all posts by this user
Quote this message in a reply
08-10-2014, 07:32 AM
Post: #2
RE: Long Shot #2 - BLAP Examples
For this example I used the following program:
Code:
 01 LBL "EX"
 02 0
 03 XEQ "RL"
 04 1
 05 XEQ "RS"
 06 2
 07 XEQ "RS"
 08 3
 09 XEQ "RP"
 10 2
 11 XEQ "RS"
 12 7
 13 XEQ "RP"
 14 2
 15 XEQ "RS"
 16 1
 17 XEQ "RS"
 18 4
 19 XEQ "RP"
 20 2
 21 XEQ "RS"
 22 5
 23 XEQ "RP"
 24 2
 25 XEQ "RS"
 26 XEQ "VP"
 27 END

At the end it will display:
V0=56.00<0.00

Since the system is linear you can scale the voltage down to 7 V, the current I will also scale down by a factor of 8, so the actual I is 125 mA, not the 1 A you originally assumed.

Cheers
Thomas

PS: There might be typos in the listing of BLAP.

Code:
Archive:  blap.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     1024  08-10-2014 09:26   BLAP.RAW
     4337  08-10-2014 09:26   BLAP.TXT
       92  08-10-2014 09:26   EX.RAW
      289  08-10-2014 09:26   EX.TXT
---------                     -------
     5742                     4 files


Attached File(s)
.zip  blap.zip (Size: 2.89 KB / Downloads: 15)
Find all posts by this user
Quote this message in a reply
08-11-2014, 08:48 AM (This post was last modified: 08-11-2014 08:59 AM by Ángel Martin.)
Post: #3
RE: Long Shot #2 - BLAP Examples
Thanks much Thomas, I see not only you're a math old hand but feel comfortable with EE subjects as well!

Thanks for putting the program in RAW file - I realized I had two erroneous steps in my own rendition, I entered RCL/STO 03 instead of R08.

Your example helps a lot, I'll try with more involved ones, like those shown here:

http://www.hpmuseum.org/forum/thread-1665.html

The Grapevine's example is also a good test case to use, we'll see how it goes.

Best,
ÁM
Find all posts by this user
Quote this message in a reply
08-14-2014, 06:37 PM (This post was last modified: 08-14-2014 11:36 PM by Thomas Klemm.)
Post: #4
RE: Long Shot #2 - BLAP Examples
We can introduce 5 currents \(I_1, ..., I_5\) in each of the "loops" of the ladder:
[Image: BMy83.png]

Using Kirchhoff's voltage law we can write 5 equations:
\[
\begin{align}
2I_1+5(I_1-I_2) &= 7\\
2I_2+4(I_2-I_3)+5(I_2-I_1) &= 0 \\
2I_3+7(I_3-I_4)+1I_3+4(I_3-I_2) &= 0\\
2I_4+3(I_4-I_5)+7(I_4-I_3) &= 0\\
2I_5+1I_5+3(I_5-I_4) &= 0
\end{align}
\]

This results in this system of linear equations:
\[
\begin{bmatrix}
7 & -5 & 0 & 0 & 0 \\
-5 & 11 & -4 & 0 & 0 \\
0 & -4 & 14 & -7 & 0 \\
0 & 0 & -7 & 12 & -3 \\
0 & 0 & 0 & -3 & 6
\end{bmatrix} \cdot \begin{bmatrix}
I_1\\
I_2\\
I_3\\
I_4\\
I_5
\end{bmatrix}=\begin{bmatrix}
7\\
0\\
0\\
0\\
0
\end{bmatrix}
\]

You could use the HP-48 to solve that:

[7 0 0 0 0]
ENTER
[[7 -5 0 0 0]
-5 11 -4 0 0
0 -4 14 -7 0
0 0 -7 12 -3
0 0 0 -3 6]
/


This will give you:

[ 1.625 .875 .375 .25 .125 ]
Find all posts by this user
Quote this message in a reply
08-14-2014, 09:00 PM (This post was last modified: 08-14-2014 09:13 PM by Thomas Klemm.)
Post: #5
RE: Long Shot #2 - BLAP Examples
There's an example in the Electric Circuits program by Guillermo Castarés:
[Image: circ2.jpg]

This is the program that I have written for it:
Code:
01 LBL "CI"
02 0
03 XEQ "RL"
04 16
05 XEQ "RS"
06 0
07 -20
08 XEQ "ZP"
09 1 E7
10 5 E9
11 XEQ "PLCS"
12 30
13 XEQ "RP"
14 XEQ "Z"
15 END

Make sure to have the frequency f = 50Hz stored as GHz in register 08:
5 E-8
STO 08

The result is:
Z0=9.59<-29.20

If we want to calculate V1 we have to multiply this by I = 10:
10
*
P-R

This matches the result provided: V1 = 83,7467 - 46,7976i

Kind regards
Thomas
Find all posts by this user
Quote this message in a reply
08-14-2014, 11:56 PM (This post was last modified: 08-14-2014 11:59 PM by jebem.)
Post: #6
RE: Long Shot #2 - BLAP Examples
(08-14-2014 06:37 PM)Thomas Klemm Wrote:  We can introduce 5 currents \(I_1, ..., I_5\) in each of the "loops" of the ladder:
[Image: BMy83.png]

Using Kirchhoff's voltage law we can write 5 equations:
\[
\begin{align}
2I_1+5(I_1-I_2) &= 7\\
2I_2+4(I_2-I_3)+5(I_2-I_1) &= 0 \\
2I_3+7(I_3-I_4)+1I_3+4(I_3-I_2) &= 0\\
2I_4+3(I_4-I_5)+7(I_4-I_3) &= 0\\
2I_5+1I_5+3(I_5-I_4) &= 0
\end{align}
\]

This results in this system of linear equations:
\[
\begin{bmatrix}
7 & -5 & 0 & 0 & 0 \\
-5 & 11 & -4 & 0 & 0 \\
0 & -4 & 14 & -7 & 0 \\
0 & 0 & -7 & 12 & -3 \\
0 & 0 & 0 & -3 & 6
\end{bmatrix} \cdot \begin{bmatrix}
I_1\\
I_2\\
I_3\\
I_4\\
I_5
\end{bmatrix}=\begin{bmatrix}
7\\
0\\
0\\
0\\
0
\end{bmatrix}
\]

You could use the HP-48 to solve that:

[7 0 0 0 0]
ENTER
[[7 -5 0 0 0]
-5 11 -4 0 0
0 -4 14 -7 0
0 0 -7 12 -3
0 0 0 -3 6]
/


This will give you:

[ 1.625 .875 .375 .25 .125 ]

Thank You for sharing your knowledge, Thomas!
Excellent practical example of mathematics application in the field.

This exercise reminds me of one of my EE teachers from the 70's.
He tried hard to educate us on the Kirchhoff laws.
He used to smoke a pipe all the time, even during the class (!).
Those were the times when an educated adult was allowed to smoke everywhere and anytime.

I have added the current legend to the diagram:

[Image: malhas1.jpg]

Jose Mesquita
RadioMuseum.org member

Find all posts by this user
Quote this message in a reply
08-15-2014, 02:46 PM (This post was last modified: 08-15-2014 02:46 PM by Ángel Martin.)
Post: #7
RE: Long Shot #2 - BLAP Examples
This is going the right way, thanks Thomas!

I've added BLAP to my Electrical Engineering module (ETSII-5), which also has the Grapevine program and Guillermo's included - well I should say enhanced versions of both, as I added a few touches to improve the data entry and output processes.

I'll add the examples for BLAP as well, this will round up the module pretty nicely. Will post it once it's all done, just give me a coupe of days.

Anyone wants to go for a BLAP example for the Grapevine's circuit? ;-)


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
08-15-2014, 05:37 PM
Post: #8
RE: Long Shot #2 - BLAP Examples
(08-14-2014 11:56 PM)jebem Wrote:  This exercise reminds me of one of my EE teachers from the 70's.
He tried hard to educate us on the Kirchhoff laws.
He used to smoke a pipe all the time, even during the class (!).
Those were the times when an educated adult was allowed to smoke everywhere and anytime.

We had a French teacher who also always smoked a pipe. When we pointed him to the "no smoking" sign, he said succinctly: "Oh, c'est seulement pour les analphabètes."

Quote:I have added the current legend to the diagram:

Thanks for this. That surely helps!

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
08-15-2014, 08:22 PM (This post was last modified: 08-15-2014 08:23 PM by Ángel Martin.)
Post: #9
RE: Long Shot #2 - BLAP Examples
(08-15-2014 05:37 PM)Thomas Klemm Wrote:  We had a French teacher who also always smoked a pipe. When we pointed him to the "no smoking" sign, he said succinctly: "Oh, c'est seulement pour les analphabètes."

Well it sure didn't read "Défense de Fumer" so I guess a French teacher wasn't concerned about the sign , haha
Find all posts by this user
Quote this message in a reply
08-15-2014, 08:53 PM
Post: #10
RE: Long Shot #2 - BLAP Examples
(08-15-2014 08:22 PM)Ángel Martin Wrote:  Well it sure didn't read "Défense de Fumer" so I guess a French teacher wasn't concerned about the sign , haha

I was just a pictogram similar to this:

[Image: niX89xz7T.png]
Find all posts by this user
Quote this message in a reply
08-15-2014, 09:51 PM
Post: #11
RE: Long Shot #2 - BLAP Examples
(08-15-2014 08:53 PM)Thomas Klemm Wrote:  
(08-15-2014 08:22 PM)Ángel Martin Wrote:  Well it sure didn't read "Défense de Fumer" so I guess a French teacher wasn't concerned about the sign , haha

I was just a pictogram similar to this:

[Image: niX89xz7T.png]

Ceci n'est pas une pipe...

Big Grin

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
08-16-2014, 06:06 PM (This post was last modified: 11-26-2016 01:32 PM by Ángel Martin.)
Post: #12
RE: Long Shot #2 - BLAP Examples
See the attached MOD file (zipped to make it acceptable) with

1. the complete BLAP,
2. Grapevine's ADV-Z and ADV-R, and
3. Guillermo's "EEA" and my "EEE" for data entry

plus a lot of other programs, like the Power-Flow Equations, etc.
Note that some programs use functions from the AMC_OS/X module

Thomas' examples are included as "CT1" and "CT2", which also store the frequency as appropriate.

Cheers,
'AM
Find all posts by this user
Quote this message in a reply
08-17-2014, 07:10 AM (This post was last modified: 08-17-2014 07:23 AM by Ángel Martin.)
Post: #13
RE: Long Shot #2 - BLAP Examples
Here's the QRG: (sorry but I can't get the columns properly formatted - a pdf will be available at TOS shortly).

PHP Code:
#    Program    Description    Dependency    Author    Source    Printer?
0    -ETSII 5A    section header                
1    
"Y-D"    Delta <-> Wye Conversion        Ángel Martin    Author's Collection    Yes
2    "D-Y"    Delta <-> Wye Conversion        Ángel Martin    Author'
s Collection    Yes
3    
"POL?"    Polar Prompt        Ángel Martin    Author's Collection    
4    "ZWYE"    to WYE    41Z    Ángel Martin    41Z Module    
5    "ZDLT"    to DELTA    41Z    Ángel Martin    41Z Module    
6    "DYD"    Subroutine    41Z    Ángel Martin    41Z Module    
7    "LOGEX"    Logic Network     AMC_OS/X    Sture Sjöström    UPLE# 10574    
8    "TRUTH"    Truth Table        ???        
9    "AND"    AND gate        ???        
10    "AOI"    And-Or-Invert Gate        ???        
11    "bIN"            ???        
12    "BIN"            ???        
13    "NAND"    Not-AND gate        ???        
14    "NOR"    Not-OR gate        ???        
15    "NOT"    NOT gate        ???        
16    "OR"    OR gate        ???        
17    "OREX"    OR Exclusive gate        ???        
18    SPR"    Sum of Parallel Resistors        Ángel Martin    Author'
s Collection    
19    SSC
"    Sum of Serial Capacitors        Ángel Martin    Author's Collection    
20    -CHOPPER    section header                
21    "
SPACREG"    Single-Phase AC Regulator    AMC_OS/X    Ángel Martin    Author's Collection    no
22    "
NR"            Ángel Martin    Author's Collection    
23    "
UZeF"            Ángel Martin    Author's Collection    
24    "
R"    Resistence value        Ángel Martin    Author's Collection    
25    "
L"    Inductance value        Ángel Martin    Author's Collection    
26    "
S<)e"            Ángel Martin    Author's Collection    
27    "
P<)e"            Ángel Martin    Author's Collection    
28    "
ND"    New Data        Ángel Martin    Author's Collection    
29    "
OUT<)e"            Ángel Martin    Author's Collection    
30    "
OUTUEF"            Ángel Martin    Author's Collection    
31    "
SLV"    Solve routine        PPC Members    PPC ROM    
32    -POWER SYS    section header                
33    "
ABCD"    2-port Elements    AMC_OS/X    Ángel Martin    Author's Collection    
34    "
CAMELA"    Mechanical Forces in Power Lines        Ángel Martin    UPLE#    
35    "
#"    Function to Solve        Ángel Martin    UPLE#    
36    SINH    Seno Hiperbólico        Ángel Martin    SandMath ROM    
37    COSH    Coseno Hiperbólico        Ángel Martin    SandMath ROM    
38    
"H>T"    Quadrupole Conversion        GGil    UPLE#  25242    
39    "T>H"    Quadrupole Conversion        GGil    UPLE#  25242    
40    "T>Y"    Quadrupole Conversion        GGil    UPLE#  25242    
41    "Y>T"    Quadrupole Conversion        GGil    UPLE#  25242    
42    "Y<>H"    Quadrupole Conversion        GGil    UPLE#  25242    
43    "Y<>Z"    Quadrupole Conversion        GGil    UPLE#  25242    
44    "Z<>H"    Quadrupole Conversion        GGil    UPLE#  25242    
45    "Z<>T"    Quadrupole Conversion        GGil    UPLE#  25242    
46    "F1"    Routine for Camela no slope        Ángel Martin    This project    
47    
"F2"    Routine for Camela no slope        Ángel Martin    This project    
48    
"SYS2N"    Non-Linear systems 2-Equations        FJ Pamies Durá    UPLE# 35006    
49    "SV2"    Subroutine mode        Ángel Martin    This project    
50    
"YZ-A"    Impedance output for ADV-R/Z        Ángel Martin    This Project    
51    
"CT1"    Blap Example 1        Thomas Klemm    http://www.hpmuseum.org/forum/    
52    "CT2"    Blap Example  2        Thomas Klemm    http://www.hpmuseum.org/forum/    
0    -ETSII 5B    section header                
1    
"ADV-Z"    Advantage Z    ADV    Coffin Wadman    Grapevine    
2    
"ADV-R"    Advantage R -    ADV    Coffin Wadman    Grapevine    
3    
"EEE"    Electric Circuit Data Entry    AMC_OS/X    Ángel Martin    This Project    no
4    
"EEA"    Electric Circuit Analysis    ADV    Guillermo Castarés    HP Museum    no
5    
"IELS"    Intensity Source Routine        Guillermo Castarés    HP Museum    
6    
"VELS"    Voltage Source Routine        Guillermo Castarés    HP Museum    
7    
"FRQ"    Frequency Routine        Guillermo Castarés    HP Museum    
8    
"PFE-GS"    Power Flow Equations (Gauss-Seidel)        Ángel Martin    Author's Collection    
9    "PFE-RV"    Review of Results    AMC_OS/X    Ángel Martin    Author'
s Collection    
10    
"+"    Complex Sum        Martin Frey    This project    
11    
"-"    Complex Subtraction        Martin Frey    This project    
12    
"*"    Complex Multiply        Martin Frey    This project    
13    
"/"    Complex Division        Martin Frey    This project    
14    
"1"    Complex Inverse        Martin Frey    This project    
15    AIP    Alpha Integer Part        HP Co
.    Advantage Pac    
16    E3
/    División por 1000        Ángel Martin    SandMath ROM    
17    E3
/E+    División por 1000suma 1        Ángel Martin    SandMath ROM    
18    
-LADDER ANL    section header                
19    
"BG"    Reversed Gain Block        Gary DFrey        
20    
"BLAP"    Backwards Ladder Analysis        Gary DFrey    Varian Eimac    
21    
"CP"    Capacitor parallel        Gary DFrey        
22    
"CS"    Capacitor Series        Gary DFrey        
23    
"GB"    Transistor Gain Block        Gary DFrey        
24    
"IS"    Compute Series Current        Gary DFrey        
25    
"LP"    Inductance Parallel        Gary DFrey        
26    
"LS"    Inductance Series        Gary DFrey
27    
"OSTP"    Open Stub in Parallel        Gary DFrey
28    
"OSTS"    Open Stub in Series        Gary DFrey
29    
"PLCP"    Paralllel LC in parallel        Gary DFrey
30    
"PLCS"    Parallel LC in Series        Gary DFrey
31    
"PRCS"    Parallel RC in Series        Gary DFrey
32    
"PRCP"    Parallel RC in parallel        Gary DFrey
33    
"PRXP"    Parallel RLC in parallel        Gary DFrey
34    
"PRXS"    Parallel RLC in Series        Gary DFrey
35    
"RG"    Compute Gain for RG Gen.        Gary DFrey
36    
"RL"    Initialize Load Resistance        Gary DFrey
37    
"RP"    Resistance in parallel        Gary DFrey
38    
"RS"    Resistance in Series        Gary DFrey
39    
"S"    Compute SF and SI for RL/RG        Gary DFrey
40    
"SLCP"    Series LC in parallel        Gary DFrey
41    
"SLCS"    Series LC in Series        Gary DFrey
42    
"SRCP"    Series RC in parallel        Gary DFrey
43    
"SRCS"    Series RC in series        Gary DFrey
44    
"SRXP"    Series RLC in parallel        Gary DFrey
45    
"SRXS"    Series RLC in Series        Gary DFrey
46    
"SSTP"    Shorted Stub in Parallel        Gary DFrey
47    
"SSTS"    Shorted Stub in Series        Gary DFrey
48    
"TF"    ideal Transformer        Gary DFrey
49    
"TL"    Transmission Line        Gary DFrey
50    
"VP"    Compute Voltage to Ground        Gary DFrey
51    
"Z"    Compute Impedance        Gary DFrey
52    
"ZP"    R+JX in parallel        Gary DFrey
53    
"ZS"    R+JX in series        Gary DFrey 
Find all posts by this user
Quote this message in a reply
08-18-2014, 03:07 AM (This post was last modified: 08-18-2014 03:08 AM by Gerson W. Barbosa.)
Post: #14
RE: Long Shot #2 - BLAP Examples
Alternatively, if we want neither programming nor linear system solving, we can use the WP 34S and do

1 ENTER 2 + STO 01
3 g || 2 + STO 02
7 g || 3 + STO 03
4 g || 2 + STO 04
5 g || 2 + 7 x<>y /
5 RCL 04 5 + / *
4 RCL 03 4 + / *
7 RCL 02 7 + / *
3 RCL 01 3 + / * --> 0.125


Gerson.
Find all posts by this user
Quote this message in a reply
08-19-2014, 02:05 AM
Post: #15
RE: Long Shot #2 - BLAP Examples
Or then you write a small program:
Code:
LBL'BLA'
LBL A
X<>Y
R↓
RCL* T
+
R↑
RTN
LBL B
RCL Z
X<>Y
/
+
END

You start with X = 1A and Y = 0V:
1 A
2 A
3 B
2 A
7 B
2 A
1 A
4 B
2 A
5 B
2 A


You end up with: X = 13A and Y = 56V.
Since you know both current and voltage you don't have to backtrack the rightmost current but can calculate it immediately: 7/56 = 0.125

Cheers
Thomas

PS: The same program works with complex numbers when using the HP-42S. With the WP-34S you'd have to use the CPX variants of the operations. That's the big advantage of a complex mode or type: you don't have to bother whether to use real or complex numbers. Instead you can even mix them.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)