HP Prime and TI-84
Plus CE: Smith Chart Conversion (Post # 800)
Happy Post 800! Thank
you readers and fans! I wouldn’t be here
without you!
Eddie
Introduction
The program SMITHCHART for the HP Prime and SMITH for the
TI-84 Plus CE 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
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;
TI-84 Plus CE Program SMITH
"EWS
2017-12-17"
"HP 32S
ENGINEERING"
Menu("SMITH
CHART","RL TO SWR",1,"SWR TO RL",2)
Lbl 1
Input "RL:
",R
10^(R/20)→P
(1+P)/(1-P)→I
20log(I)→S
Goto 3
Lbl 2
Input "SWR:
",S
10^(S/20)→I
(I-1)/(I+1)→P
20log(1/P)→R
Goto 3
Lbl 3
Disp "RETURN
LOSS",R,"REFLECT COEFF.",P,"VOLT. STANDING
WAVE",I,"SWR (DB)",S
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
Eddie
This blog is property of Edward Shore, 2017