Showing posts with label magnitude. Show all posts
Showing posts with label magnitude. Show all posts

Saturday, October 26, 2019

Casio fx-CG 50: Impedance Calculations

Casio fx-CG 50:  Impedance Calculations



Introduction

The program FX61IMP contains a suite of impedance calculations.  Why the unusual name?

In the late 1980s, Casio had a fx-61F calculator.  The fx-61F is a specialized programming scientific calculator, which is the only calculator, to my knowledge, to feature an Impedance mode.  The impedance mode has specialized keys to calculate impedance of resistors, capacitors, and inductors (coils).  The calculator also featured 29 specialized electrical formulas, a 30 step programming capability, base conversions, 1 variable statistics, and complex numbers.

The main menu of FX61IMP:

1.  Impedance of a Coil (Inductor)
2.  Impedance of a Capacitor
3.  Impedance of two parallel resistors (Parallel)
4.  Impedance of a Series Resistor
5.  Analysis of total Impedance
6.  Store results in X and Y
7.  View Memory Registers
8.  Clear Variables
9.  Exit

Variables used:
Z = impedance of the current calculation
S = grand total impedance
X = user register
Y = user register

Note:  In electronics, the symbol j is used in complex numbers.  The fx-61F uses j.  However, the fx-CG50 uses i in complex numbers.  The program uses i and the user is notified of this when the program starts. 

1.  Impedance of a Coil (Inductor)
Provide the self-inductance (in H, Henrys) and frequency (in 1/s), the impedance is calculated as:
Z = 2 * π * f * L * i

The result is added to S.

2.  Impedance of a Capacitor
Provide the capacitance (in F, Farads) and frequency (in 1/s), the impedance is calculated as:
Z = 1/(2 * π * f * C * i)

The result is added to S.

3.  Impedance of two parallel resistors (Parallel)
This calculates the impedance of parallel resistors:
Z = 1/(1/a + 1/b) = (a * b) / (a + b)

The result is added to S.

4.  Impedance of a Series Resistor
The impedance of the resistor is:  R (in Ω, Ohms)

Z = R

The result is added to S.

5.  Analysis of total Impedance
Takes the total impedance (S) and returns its total, magnitude, and phase angle (in degrees).  You will have an opportunity to clear S (reset S to zero).

6.  Store results in X and Y
You can store Z or S in the variables X and Y.

7.  View Memory Registers
View the contents Z, S, X, and Y.

8.  Clear Variables
Resets Z, S, X, and Y to 0.

9.  Exit
Exits the program.

The program is listed in text form, which can be copied to the fx-CG 50.

Program Text Listing:
'ProgramMode:RUN
"2019-09-09 EWS"
Deg
a+bi
ClrText
Red Locate 1,3,"NOTICE"
Blue Locate 1,5,"J is represented"
Blue Locate 1,6,"by _Imaginary_. (_Sqrt__(-)_1)"
" "Disps0->S
0->Z
0->X
0->Y
Lbl 0
ClrText
Menu "IMPEDANCE","COIL",1,"CAPACITOR",2,"PARALLEL",3,"SERIES RESISTOR",4,"ANALYSIS",5,"STORE IN X OR Y",6,"VIEW MEMORY",7,"CLEAR VARS",8,"EXIT",E
Lbl 1
"FREQ: "?->F
"INDUCTANCE: "?->L
2piLFImaginary->ZDispsS+Z->S
Goto 0
Lbl 2
"FREQ: "?->F
"CAPACITY: "?->C
(2piFCImaginary)^<-1>->ZDispsS+Z->S
Goto 0
Lbl 3
"PARALLEL IMPEDANCE"
"A_#E6D7_B"
"A: "?->A
"B: "?->B
(AB)/(A+B)->ZDispsS+Z->S
Goto 0
Lbl 4
"RESISTANCE: "?->R
R->ZDispsS+Z->S
Goto 0
Lbl 5
"TOTAL IMPEDANCE:"
SDisps"MAGNITUDE: "
Abs SDisps"PHASE ANGLE: "
Arg SDispsMenu "CLEAR TOTAL?","YES",Y,"NO",0
Lbl Y
0->S
"CLEARED!"DispsGoto 0
Lbl 6
Menu "WHAT TO STORE?","Z_->_X",M,"Z_->_Y",N,"S_->_X",O,"S_->_Y",P
Lbl M
Z->X
"DONE!"DispsGoto 0
Lbl N
Z->Y
"DONE!"DispsGoto 0
Lbl O
S->X
"DONE!"DispsMenu "CLEAR TOTAL?","YES",Y,"NO",0
Lbl Y
0->S
"CLEARED!"DispsGoto 0
Lbl P
S->Y
"DONE!"DispsMenu "CLEAR TOTAL?","YES",Y,"NO",0
Lbl Y
0->S
"CLEARED!"DispsGoto 0
Lbl 7
ClrText
"Z: "
ZDisps"S: "
SDisps"X: "
XDisps"Y: "
YDispsGoto 0
Lbl 8
0->Z
0->S
0->X
0->Y
"DONE!"DispsGoto 0
Lbl E
ClrText
Red Locate 5,4,"FX61 IMPEDANCE"

Note:  Disps:  ◢, ⊿
Imaginary:  i  [SHIFT] [ 0 ]

Program Calculator Listing:
"2019-09-09 EWS"
Deg
a+bi
ClrText
Red Locate 1,3,"NOTICE"
Blue Locate 1,5,"J is represented"
Blue Locate 1,6,"by i. (√-1)"
" "⊿
0->S
0->Z
0->X
0->Y
Lbl 0
ClrText
Menu "IMPEDANCE","COIL",1,"CAPACITOR",2,"PARALLEL",3,"SERIES RESISTOR",4,"ANALYSIS",5,"STORE IN X OR Y",6,"VIEW MEMORY",7,"CLEAR VARS",8,"EXIT",E
Lbl 1
"FREQ: "?->F
"INDUCTANCE: "?->L
2πLFi->Z⊿
S+Z->S
Goto 0
Lbl 2
"FREQ: "?->F
"CAPACITY: "?->C
(2πFCi)⁻¹->Z⊿
S+Z->S
Goto 0
Lbl 3
"PARALLEL IMPEDANCE"
"A||B"
"A: "?->A
"B: "?->B
(AB)÷(A+B)->Z⊿
S+Z->S
Goto 0
Lbl 4
"RESISTANCE: "?->R
R->Z⊿
S+Z->S
Goto 0
Lbl 5
"TOTAL IMPEDANCE:"
S⊿
"MAGNITUDE: "
Abs S⊿
"PHASE ANGLE: "
Arg S⊿
Menu "CLEAR TOTAL?","YES",Y,"NO",0
Lbl Y
0->S
"CLEARED!"⊿
Goto 0
Lbl 6
Menu "WHAT TO STORE?","Z->X",M,"Z->Y",N,"S->X",O,"S->Y",P
Lbl M
Z->X
"DONE!"⊿
Goto 0
Lbl N
Z->Y
"DONE!"⊿
Goto 0
Lbl O
S->X
"DONE!"⊿
Menu "CLEAR TOTAL?","YES",Y,"NO",0
Lbl Y
0->S
"CLEARED!"⊿
Goto 0
Lbl P
S->Y
"DONE!"⊿
Menu "CLEAR TOTAL?","YES",Y,"NO",0
Lbl Y
0->S
"CLEARED!"⊿
Goto 0
Lbl 7
ClrText
"Z: "
Z⊿
"S: "
S⊿
"X: "
X⊿
"Y: "
Y⊿
Goto 0
Lbl 8
0->Z
0->S
0->X
0->Y
"DONE!"⊿
Goto 0
Lbl E
ClrText
Red Locate 5,4,"FX61 IMPEDANCE"

The || is found in (CHAR), (MATH).

Examples:

Example 1:
Two coils in a series with inductance of 0.1 H and 0.2 H, respectively.  The frequency is 50 Hz. 

Sequence:
Option 1:  Enter 50 for frequency, 0.1 for inductance.
Option 1:  Enter 50 for frequency, 0.2 for inductance.
Option 5:  For analysis.

Total Impedance:  94.24777961i
Magnitude:  94.24777961
Phase Angle:  90°
(Clear the total)

Example 2:
A capacitor of 30 μF, a resistor of 10 Ω, and coil of 0.3 H are in a series.  Find the total impedance of the circuit if the frequency is 65 Hz.

Sequence:
Option 2:  Enter 65 for frequency, 30E-6 for capacity
Option 4:  Enter 10 for resistance
Option 1:  Enter 65 for frequency, 0.3 for inductance
Option 5:  For analysis

Total Impedance:  10 + 40.90419396i
Magnitude: 42.10882429
Phase Angle:  76.26214952°
(Clear the total)

Example 3:
Three resistors in parallel with 100 Ω, 200 Ω, and 400 Ω, respectively.  Find the total impedance.

Sequence:
Option 3:  Enter 100 for A and 200 for B.
Option 6:  Store S in X.  Clear the total.
Option 3:  Enter X for A and 400 for B.
Option 5:  For analysis

Total Impedance: 57.14285714
Magnitude: 57.14285714
Phase Angle: 0°

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.

Sunday, March 11, 2018

Fun with the Texas Instruments TI-60


Fun with the Texas Instruments TI-60

Notes:

1.  I like to have the user input all the values into the registers before running the program.  This way, we can save program steps because the calculator doesn’t have to stop to ask for inputs.  Also, you don’t have to change all the values for different problems.  Finally, R/S can be used for only output.

2.  I keep register 0 (R0) out so that the user can have at least one register to store immediate results in further calculations.  I list the minimum partition for each program.


Great Circle Distance (in miles)

Formula:
D = acos (sin ϕ1 * sin ϕ2 + cos ϕ1 * cos ϕ2 * cos (λ1 – λ2)) * 3959 * π/180

Note: for kilometers, replace 3959 with 6371.

Where:
ϕ1, ϕ2:  Latitude of locations 1, 2; north is positive, south is negative
λ1, λ2:  Longitude of locations 1, 2:  east is positive, west is negative

Store before running:
R1:  ϕ1 as a decimal (convert from DMS if necessary)
R2:  λ1
R3: ϕ2
R4: λ2
Set the TI-60 in degrees mode.

Program (41 steps) – 2nd Part 5:
PG
OP
Key
PG
OP
Key
00
71
RCL
21
04
4
01
01
1
22
54
)
02
32
SIN
23
33
COS
03
65
*
24
95
=
04
71
RCL
25
12
INV
05
03
3
26
33
[COS]  (COS^-1)
06
32
SIN
27
65
*
07
85
+
28
03
3
08
71
RCL
29
09
9
09
01
1
30
05
5
10
33
COS
31
09
9
11
65
*
32
65
*
12
71
RCL
33
91
π
13
03
3
34
55
÷
14
33
COS
35
01
1
15
65
*
36
08
8
16
53
(
37
00
0
17
71
RCL
38
95
=
18
02
2
39
13
R/S
19
75
-
40
22
RST
20
71
RCL




Example:

Los Angeles:  ϕ = 34°13’ = 34.21666667°, λ = -(118°15’) = -(118.25°)
London:  ϕ = 51°30’26” = 51.50722222°, λ = -(0°7’39”) = -(0.1275°)

Result:  5431.617778 mi

Tip: For DMS-DD conversions: if you have a negative angle, enter the angle without the negative sign, do the conversion DMS-DD, then press [ +/- ].

Impedance of a Series Resonance Circuit

This program gives both the magnitude and phase angle. 

Impedance:   Z = R + j*(ω*L – 1/(ω*C))
Where:  ω = 2*π*F
Magnitude:  abs(Z)
Phase Angle:  arg(Z)

Variables:
R = resistance ( Ω )
C = capacitor ( farads )
L = inductor ( henrys )
F = Frequency (Hz)

Store before running:
R1:  R
R2:  C
R3:  L
R4:  F
Set the TI-60 in degrees mode.

Program (35 steps) – 2nd Part 5:
PG
OP
Key
PG
OP
Key
00
02
2
18
02
2
01
65
*
19
54
)
02
91
π
20
76
1/x
03
65
*
21
95
=
04
71
RCL
22
61
STO
05
04
4
23
05
5
06
95
=
24
71
RCL
07
61
STO
25
01
1
08
05
5
26
52
X<>Y
09
65
*
27
71
RCL
10
71
RCL
28
05
5
11
03
3
29
12
INV
12
75
-
30
38
[P-R]
(R-P)
13
53
(
31
13
R/S
14
71
RCL
32
52
X<>Y
15
05
5
33
13
R/S
16
65
*
34
22
RST
17
71
RCL




Example:

Input:
R1:  R = 11.56 Ω
R2:  C = 0.0002 F
R3:  L =  0.018 H
R4:  F = 72 Hz

Results:
Phase Angle (θ) = -14.12679136°
Magnitude = 11.92049981

Linear Interpolation

Given points (x0, y0) and (x1, y1) with x0 < x < x1, we can estimate y by linear interpolation by:

y = ((x1 – x)*y0 + (x – x0)*y1)/(x1 – x0)

How good of an approximation depends on how close x0 and x1 are, and whether the curve that is being approximated is close to linear.

Store before running:
R1:  x1
R2:  y1
R3:  x2
R4:  y2
R5:  x

Program (34 steps) – 2nd Part 5:
PG
OP
Key
PG
OP
Key
00
53
(
17
01
1
01
53
(
18
54
)
02
71
RCL
19
65
*
03
03
3
20
71
RCL
04
75
-
21
04
4
05
71
RCL
22
54
)
06
05
5
23
55
÷
07
54
)
24
53
(
08
65
*
25
71
RCL
09
71
RCL
26
03
3
10
02
2
27
75
-
11
85
+
28
71
RCL
12
53
(
29
01
1
13
71
RCL
30
54
)
14
05
5
31
95
=
15
75
-
32
13
R/S
16
71
RCL
33
22
RST


Example:

Input:
R1:  x1 = 2
R2:  y1 = 3
R3:  x2 = 4
R4:  y2 = 8
R5:  x = 3

Result:
y = 5.5

Purchase of a Car:  How much can I afford?

The program will calculate the sticker price (price before sales tax) of an automobile that you can afford.  You give the term you want, the interest rate you qualify for, the sales tax rate, and the maximum payment you can afford.  This assumes that you don’t put any money down.

Formulas:
A = P/I * (1 – (1 + I)^-N) / (1 + S)

A = sticker price of the car
P = monthly payment
I = monthly interest rate of the loan, in decimal.   I = rate/1200
N = number of months.  N = years*12
S = sales tax rate, in decimal.  S = sales tax rate/100

Input:
R1:  number of payments
R2:  monthly interest rate
R3:  payment
R4:  sales tax rate, in decimal

Program (30 steps), 2nd Part 4:
PG
OP
Key
PG
OP
Key
00
71
RCL
15
45
y^x
01
03
3
16
71
RCL
02
55
÷
17
01
1
03
71
RCL
18
94
+/-
04
02
2
19
54
)
05
65
*
20
55
÷
06
53
(
21
53
(
07
01
1
22
01
1
08
75
-
23
85
+
09
53
(
24
71
RCL
10
01
1
25
04
4
11
85
+
26
54
)
12
71
RCL
27
95
=
13
02
2
28
13
R/S
14
54
)
29
22
RST

Example:

Input:
R1:  number of payments = 60, (5 year term)
R2:  monthly interest rate = 0.05/12 = 0.004166667, (5% annual interest rate)
R3:  payment = 400
R4:  sales tax rate, in decimal = 0.095, (9.5%)


Result:  19357.34

In this example, the highest sticker price that can be afforded is $19,357.34 (before sales tax).

I enjoy programming with the TI-60, unlike most Texas Instruments calculators that have keystroke programming, the TI-60 shows the step and key code you have entered instead of advancing to the next step with code 00. 

Eddie

This blog is property of Edward Shore, 2018.

Earth's Radius by Latitude

Earth's Radius by Latitude Introduction: Calculating the Earth’s Radius In quick, general calculations, we assume that the...