TLINES ver 2.1 by Davide Valenti
(davide.valenti@novanet.it
www.geocities.com/SiliconValley/Chip/2244/hp48.html)
Library No.: 977
Bytes: 4243.5
Checksum: # 53690d
Date ver 1.0 release: 24/5/98
Date ver 2.1 release: 12/5/99
Visible files: TLines - f2lambda - About


-Disclaimer:
This program is distributed freely and provided "as is".
For any bug reporting or suggestion please e-mail me.


-Purpose:
TLines performs a transmission line analysis.
The general scheme that TLines adopts consist of a load with its (complex)
impedance Zl=Rl+Xl, connected to a line with its (real)
characteristic impedance Z0.
Line can either be non-dissipative or dissipative. 
TLines calculates gamma modulus, phase and impedance 
at a specified distance from the load.
It also provides an interactive graphical output in the Smith chart format.


-Installation:
Download the file "tlines21" to your HP, place it on the stack, store it in a port 
(for example, to store it in port 0: press 0 STO).
Then powercycle (turn off-on) your HP48.

-Uninstallation:
977 Left Shift LIBRARY DETACH
:0:977 PURGE
If you get an error message ("Object In Use") make a warmstart (ON+C) and retry.

If you prefer you can use my library purging utility "PGLIB".
You can find it on my site (look at the top of the page)


-Usage:
Go in the LIBRARY menu, press TLINE and you'll see:
 
TLINE | F2lambda | ABOUT

Press TLINE. In this way you start a new TLines session.
you'll see a form with this title:

::::::TRASMISSION LINES::::::

Fill in the form with:

Rl: Resistive part of load impedance (in Ohm)
Xl: Reactive part of load impedance (in Ohm)
    [Set to 0 by default: purely resistive load]
Z0: Characteristic impedance of the transmission line (in Ohm)
    [Set to 50 Ohm by default]
alfa: Line attenuation factor (in Neper per meter)
      [Set to 0 by default: non-dissipative line]

Press OK (or ENTER)
You'll see another form. 
Fill in it with:

L: Distance from the load (in cm) where you want results to be calculated.
   [Set to 0 by default: calculates datas at the interface load-line]
lambda: Wavelenght (in cm)
        [Set to 1 by default: in this way you can enter distance from load 
        (above field) directly in wavelenghts - see example]

Press OK

You'll get on the diplay all the results in a 3 digit rounding:
On the first line of the screen you have the input parameters: Zl, Z0 and alfa
On the second line you have the distance (in wavelenght) from the load 
where results have been calculated
On the third line you have the VSWR, Volting Standing Wave Ratio
On the fourth and fifth line you have the modulus and phase(in degrees) 
of the gamma vector.
On the last two lines you have the real part(resistance) and the imaginary
part(reactance) of the impedance seen watching the line from the generator

You'll have this menu:

| SMITH | ->STK | LINE | CASCA | NEW | QUIT |



SMITH: To switch to Smith chart display with the initial and final gamma vectors.
       See next menu.
       
->STK: Places on the stack a copy of the results and displays it:
       4: Distance from load
       3: Gamma vector, in complex form
       2: VSWR Standing Wave Ratio
       1: Z Impedance, in complex form

LINE: To enter a new distance from load where results are to be calculated

CASCA: To start a session of TLines using the just calculated datas as parameters 
       See example

NEW: To start a new session of TLines

QUIT: To quit and purge all the variables used


Press SMITH.
You'll have this menu:

| VALUE | PICTU | LINE | CASCA | NEW | QUIT |


VALUE: To switch back to text display and see the numeric values.

PICTURE: Picture mode; press TRACE and right arrow to explore and see how impedance
         changes going from the load to the generator. Press (X,Y) to see distance
         from the load in wavelenght (D)




-Example:
Run TLINE and fill in the form with:
Rl=10
Xl=-20
(leave other fields as they are)
Press OK

Leave the next form as it is to calculate datas at the interface

Press OK

You'll see that you have a standing wave ratio of 5.828:1 (third line)
and (below) that you have a Gamma modulus (reflection coefficient) of 0.707 (70%),
with a phase of -135 degrees (fifth line)
The impendance is obviusly equal to the load, since you are at distance 0 from it (last two lines)

Press ->STK.
You'll see on the Stack:
4:Distance[lambda]: 0
3:VSWR: 5.82842712477
2:Gamma: (-.5,.-5)
1:Zin [ohm]: (10,-20)

Press SMITH:
You'll see a line starting from the chart center pointing to the bottom left.
Thats the gamma vector.Its lenght is 0.707 and its angle is -135

Now, press PICTURE.
Press TRACE.
Pressing the right arrow on the cursor keypad you can see how the
gamma vector rotates (and get shorter if line is dissipative - not in this case).
Press (X,Y) to see the coordinates.
Keep hitting right arrow until you see (on the bottom left) D=.06
At this distance from the load you reach the orizontal line in the Smith chart, which
rapresents a pure resistive impedance.

Press ON to Cancel the graphical screen.

Press LINE
Enter the value that you found (.06) in the distance field and press OK.

Press SMITH
Now you'll see an arc beeing traced from the gamma calculated at the interface 
and the new gamma vector, which is hidden by the orizontal line of the chart.

Press VALUE (VALUES)
You'll see that while the gamma modulus hasn't changed, 
the gamma phase has changed from -135 to -178.2 (near to 180) 
and that the imaginary part of the impedance (reactance) is near to 0 (-.762) 

Now press CASCA (CASCADE).
You'll see the initial setup form with the previusly calculated line impedance as load
impedance.
This of course gives the possibility to analize lines with different characteristic impedance
connected one to another in cascade.
Enter for example 75 in the line impedance field (Z0).

Press OK

Enter 0.25 in the distance field: in this way you are describing a 
lambda/4 offset (lambda/4 stub)

Press OK

Press SMITH
You'll see a 180 arc beeing traced from the initial gamma and the new gamma vector 
calculated at lambda/4 distance.
That's because a lambda/4 offset corresponds to a half cirle in the Smith chart.
You moved from a point near to the Short circuit (S) to a point near to the Open circuit (O)

Press VALUE (VALUES) and read the results.

Press QUIT.




NOTE on F2LAMBDA:
f2lambda is a simple solver utility (using HP Multi Equation Solver) converting frequency
in a certain dielectric into wavelenght (and viceversa).

Variables:
f: frequency in GHz
lambda0: wavelenght in the vacuum
lamda: wavelenght in the dielectric
epsilon r: relative dielectric costant

Relations:
f=c/lambda0
lamda=lambda0/ROOT(epsilon r)



12/5/99, Davide Valenti. 

