Showing posts with label electrical engineering. Show all posts
Showing posts with label electrical engineering. Show all posts

Monday, August 12, 2019

TI-84 Plus CE: Rectangular Waveguide - Cutoff Frequency

TI-84 Plus CE:  Rectangular Waveguide - Cutoff Frequency 

Introduction



The program WAVEGDE computes the cutoff frequency of a rectangular guide.  The waveguide has energy propagating in the TE_m,n mode with dimensions a x b (in meters) with relative permittivity E.  The cutoff frequencies is calculated as:

V = speed of light / √E
where speed of light = 299,792,458 m/s

Cutoff frequency (in Hz):
f_c = V/2 * √( (m/a)^2 + (n/b)^2 )

The second part of the calculation will depend on the target frequency, either the attenuation or phase and group velocities will be calculated:

If f < f_c, attenuation (in nerpers) is calculated:

attenuation = (2 π f_c)/V * √( 1 - (f/f_c)^2 )

If f > f_c, the phase and group velocities are calculated:

phase velocity = V / √( 1 - (f_c/f)^2 )

group velocity = V * √(1 - (f_c/f)^2 )

TI-84 Plus CE Program WAVEGDE

"EWS 2019-07-14"
Disp "RECTANGULAR WAVEGUIDE"
Input "WIDE (M): ",A
Input "NARROW (M): ",B
Input "PERMITTIVITY: ",E
Disp "HALF-WAVE VARIATIONS", "T-M,N"
Input "M: ",M
Input "N: ",N
Input "FREQUENCY (HZ):",F
299792458/√(E)→V
V/2*√((M/A)²+(N/B)²)→C
Disp "CUTOFF FREQ: (HZ)",C
Pause 
If F
Then
(2πC)/V*√(1-(F/C)²)→U
Disp "ATTENUATION:",U,"NEPERS"
Else
V/√(1-(C/F)²)→P
V*√(1-(C/F)²)→G
Disp "PHASE VELOCITY: M/S",P
Disp "GROUP VELOCITY: M/S",G
End

Examples

Example 1:
A rectangular waveguide has the dimensions 2.7 cm x 1.09 cm with permittivity of 1.    (a = 2.7/100, b = 1.09/100, E = 1).  The waves propagate in the TE_2,1 mode  (m = 2, n = 1).  The target frequency is 10 GHZ (10E9 Hz).

Results:
Cutoff Frequency = 1.767490017E10 Hz
Attenuation = 305.4488993 nepers

Example 2: 
Same as Example 1, but set target frequency as 20 GHZ.

Results:
Cutoff Frequency = 1.767490017E10 Hz
Phase Velocity = 640,624,938.6 m/s
Group Velocity = 140,293,504.8 m/s

Source:

"Rectangular Waveguide Calculations"  HP-65 E.E. Pac 2  Hewlett Packard  Cupertino, CA  1977

Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Friday, December 22, 2017

HP Prime and TI-84 Plus CE: Smith Chart Conversion (Post # 800)

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

Thursday, August 10, 2017

Casio fx-3650p and HP 21S: Minimum Loss Matching

Casio fx-3650p and HP 21S: Minimum Loss Matching



This program takes the incoming impedances Z0 (from left) and Z1 (from right), and determines the resistance R1 and R2, with the corresponding minimum loss.  The program assumes that Z0 and Z1 are both positive and Z0 ≥ Z1. 

Formulas Used:

R1 = Z0 * √(1 – Z1/Z0)
R2 = Z1 / √(1 – Z1/Z0)
Minimum loss = 20 * log (√(Z1/Z0) + √(Z1/Z0 -1))

Casio fx-3650P

Input:  X = Z0, Y = Z1
Program (49 steps):

? → X : ? → Y : Y ÷ X → M :
X √ ( 1 – M → A
Y √ ( 1 – M → B
20 log ( √ M ^-1 + √ ( M ^-1 – 1 → C

HP 21S

Input:  Z0 gets stored in register 0, Z1 gets stored in register 1

Program (44 steps):

Step
Code
Key
Notes
01
61, 41, C
LBL C
Start the program
02
22, 1
RCL 1
Z1
03
45
÷

04
22, 0
RCL 0
Z0
05
74
=

06
21, 4
STO 4

07
33
(

08
1
1

09
65
-

10
22, 4
RCL 4

11
34
)

12
11

13
21, 5
STO 5

14
55
*

15
22, 0
RCL 0

16
74
=

17
21, 2
STO 2

18
26
R/S
Display R1
19
22, 1
RCL 1

20
45
÷

21
22, 5
RCL 5

22
74
=

23
21, 3
RCL 3

24
26
R/S
Display R2
25
33
(

26
22, 4
RCL 4

27
15
1/x

28
11

29
75
+

30
33
(

31
22, 4
RCL 4

32
15
1/x

33
65
-

34
1
1

35
34
)

36
11

37
34
)

38
51, 13
LOG

39
55
*

40
2
2

41
0
0

42
74
=

43
21, 5
STO 5
Display minimum loss (Z)
44
61, 26
RTN



Example:

Input:  Z0 = 50, Z1 = 45
Results: R1 = 15.8113883008, R2 = 142.302494708, Min Loss = 2.84419586692

Source:  Casio Scientific Formula 128 fx-1000F/fx-5000F owner’s manual, 1987

Eddie


This blog is property of Edward Shore, 2017

Python – Earth’s Radius and Gravity in US Units

Python – Earth’s Radius and Gravity in US Units Introduction The following script, gravus2.py, estimates the Earth’s gravity i...