Post Reply 
Smith Chart Conversions
12-22-2017, 10:42 PM
Post: #1
Smith Chart Conversions
The program SMITHCHART calculates one of two sets of conversions:

Return Loss (RL) to Standing Wave Ratio (SWR, in decibels): RL to ρ (reflection coefficient) to σ (voltage standing ratio) to SWR

Standing Wave Ratio to Return Loss: SWR to σ to ρ to RL

HP Prime Program SMITHCHART

Code:
EXPORT SMITHCHART()
BEGIN
// 2017-12-17 EWS
// Smith Chart Conversions
// HP 32S Engineering Applications
LOCAL k,x,RL,p,s,SWR;
INPUT({
{k,{"RL to SWR","SWR to RL"}},
x},"Smith Chart",
{"Starting at: ","Value: "});

IF k==1 THEN
// RL to SWR
RL:=x;
p:=ALOG(−RL/20);
s:=(1+p)/(1-p);
SWR:=20*LOG(s);
ELSE
// SWR to RL
SWR:=x;
s:=ALOG(SWR/20);
p:=(s-1)/(s+1);
RL:=20*LOG(1/p);
END;
// Results
PRINT();
PRINT("Results");
PRINT("Return Loss: "+RL);
PRINT(" ");
PRINT("Reflection Coefficient");
PRINT("ρ: "+p);
PRINT(" ");
PRINT("Voltage Standing Wave Ratio");
PRINT("σ: "+s);
PRINT(" ");
PRINT("SWR (dB): "+SWR);
END;

Examples

SWR to RL: Given 11.95 dB SWR

Results:
Return Loss: 4.48590571028
ρ: 0.59662948831
σ: 3.95822064836
SWR: 11.95

RL to SWR: Given RL at 6.35 dB

Results:
Return Loss: 6.35
ρ: 0.481393254
σ: 2.85648666437
SWR: 9.11664401758


Source:
Hewlett-Pacakrd. Step by Step For Your HP Calculator: Engineering Applications. Ed. 1. Corvallis, OR January 1988
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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