public:calculator:progs:dm32_progs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:calculator:progs:dm32_progs [24/07/23 17:07 BST] – [Return Loss & SWR from Complex Impedance] john | public:calculator:progs:dm32_progs [06/03/25 06:49 GMT] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 18: | Line 18: | ||
To store a complex number in a register actually requires two to be used - one for Real part and one for Imaginary part. This is similar to the HP15C/ | To store a complex number in a register actually requires two to be used - one for Real part and one for Imaginary part. This is similar to the HP15C/ | ||
- | Then various " | + | Once the real and imaginary values are on the stack various " |
- | Z< | + | Z< |
+ | |||
+ | and | ||
+ | |||
+ | Z< | ||
+ | |||
+ | gives | ||
+ | |||
+ | Z< | ||
< | < | ||
20 ENTER 10 ENTER | 20 ENTER 10 ENTER | ||
25 CHS ENTER 30 | 25 CHS ENTER 30 | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | The stack will show | ||
+ | < | ||
+ | 20.0000 | ||
+ | 10.0000 | ||
+ | -25.0000 | ||
+ | 30.0000 | ||
+ | </ | ||
+ | |||
+ | Then carry out the addition | ||
+ | |||
+ | < | ||
+ | |||
SHIFT CMPLX + | SHIFT CMPLX + | ||
</ | </ | ||
Line 40: | Line 64: | ||
X has the real part of Z< | X has the real part of Z< | ||
- | Z< | + | Z< |
- | ===== Section Two ===== | + | ===== The program |
+ | |||
+ | < | ||
+ | |||
+ | LBL Z | ||
+ | INPUT R | ||
+ | INPUT X | ||
+ | X<> | ||
+ | 0 | ||
+ | ENTER | ||
+ | 50 ; enter Zo as 50 + j 0 | ||
+ | CMPLX + ; complex addition Z + Zo | ||
+ | STO A ; store intermediate value Re (Z + Zo) | ||
+ | R↓ | ||
+ | STO B ; store intermediate value Im (Z + Zo) | ||
+ | R↓ ; X and Y stack now holds input Z real & imag again | ||
+ | 0 | ||
+ | ENTER | ||
+ | 50 ; enter Zo as 50 + j 0 (again) | ||
+ | CMPLX - ; complex subtraction Z - Zo | ||
+ | RCL B ; Im (Z + Zo) | ||
+ | RCL A ; Re (Z + Zo) | ||
+ | CMPLX ÷ ; complex divide (STACK z,t holds (Z - Zo) stack x,y holds (Z + Zo) (from reg. A & B) to calculate complex reflection coeff. ρ | ||
+ | STO E ; save Re ρ | ||
+ | R↓ | ||
+ | STO F ; save Im ρ | ||
+ | RCL E | ||
+ | y,x -> θ, r ; convert complex rectangular ρ to mag/angle - X holds the magnitude |ρ| ( Y holds the angle, but we don't care) | ||
+ | STO P ; save |ρ| | ||
+ | 1 | ||
+ | RCL+ P | ||
+ | 1 | ||
+ | RCL- P | ||
+ | ÷ | ||
+ | STO S ; store VSWR ( 1 + |ρ| ) / ( 1 - |ρ| ) | ||
+ | RCL P | ||
+ | LOG | ||
+ | 20 | ||
+ | X | ||
+ | STO Y ; store Return Loss = 20 LOG |ρ| | ||
+ | RCL X | ||
+ | RCL R | ||
+ | y,x -> θ, r | ||
+ | STO Z ; store magnitude of impedance |z| | ||
+ | RCL P ; |ρ| | ||
+ | RCL S ; VSWR | ||
+ | RCL Y ; Return Loss | ||
+ | RTN | ||
+ | |||
+ | </ | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | * Z = 65.2 + j 17.7 | ||
+ | * R = 65.2 | ||
+ | * X = 17.7 | ||
+ | |||
+ | * Results on stack: | ||
+ | |||
+ | < | ||
+ | 67.5598 | ||
+ | 0.2002 | ||
+ | 1.5006 | ||
+ | -13.9718 | ||
+ | </ | ||
+ | |||
+ | * |Z| = 67.6 ohms | ||
+ | * |ρ| = 0.2 | ||
+ | * SWR = 1.5:1 | ||
+ | * Return Loss = 13.9dB | ||
public/calculator/progs/dm32_progs.1690214840.txt.gz · Last modified: 06/03/25 06:49 GMT (external edit)