Sunday, February 22, 2015

HP Prime and TI-84+: RLC Parallel Circuit and Impedance

RLC Parallel Circuits and Impedance

 
Parallel RLC Circuit



The program RLCPAREL calculates:

* The total impedance of the circuit, and its magnitude in ohms
* Phase angle in a circuit in degrees.
* Current of the series in amps.

Input:
Battery/Source:  enter voltage and frequency
Add as many resistors (R) (in Ohms Ω), capacitors (C) (in farad), and inductors (L) (in henrys) as needed.

Notes:
HP Prime program only:  On the input screen, enter the real (a) and imaginary (if needed) (bi) parts separately.  Complex numbers can be directly entered on the TI-84+ program.

Example:
Parallel circuit powered by a 14 V, 5000 Hz battery.  The circuit has:
a resistor of 100 Ω, a capacitor of 3.2*10^-6 farads, and an inductor of 0.082 henrys.

Results:
Total Resistance:
0.987305540105 – 9.88715235955*i
Magnitude:
9.93632497508
Phase Angle:
84.2974952432
Current:
1.40897163037

HP Prime:  RLCPAREL

// Impedance of a Parallel
// EWS 2015-02-22
// Turn allow complex from real input on
// Declare subroutines
chsubr();
casubr();

// Main Routine
EXPORT RLCPAREL()
BEGIN
// initial steps
Z0:=0;
// radian mode
HAngle:=0;
// counter
I:=0;
// battery information
INPUT({V,F},"Battery Information",
{"V = ","F = "},
{"Volts","Frequency (Hz)"});
chsubr();
END;


// Choose Subroutine
chsubr()
BEGIN
LOCAL ch;
CHOOSE(ch,"# of Components: "+STRING(I),
{"Add Resistor (R)",
"Add Capacitor (C)",
"Add Inductor (L)",
"Calculate"});
// Execute calculation subroutine
casubr(ch);
END;

// Calculation Subroutine
casubr(x)
BEGIN
LOCAL a,b;
IF x==1 THEN
INPUT({a,b},"Add Resistor (Ω)",
{"a =","bi ="});
Z0:=Z0+1/(a+b*i);
I:=I+1;
chsubr();
END;

IF x==2 THEN
INPUT({a,b},"Capacitor (farad)",
{"a =","bi="});
Z0:=Z0-1/(i/(2*π*F*(a+b*i)));
I:=I+1;
chsubr();
END;

IF x==3 THEN
INPUT({a,b},"Inductor (henry)",
{"a =","bi="});
Z0:=Z0+1/(i*2*π*F*(a+b*i));
I:=I+1;
chsubr();
END;

// Termination
IF x==4 THEN
Z0:=1/Z0;
PRINT();
PRINT("Total Resistance = "+Z0);
PRINT("Magnitude (Ω) = "+ABS(Z0));
PRINT("Phase Angle (°) ="+
STRING(−ARG(Z0)*180/π));
PRINT("Current (amps) = "+
STRING(V/ABS(Z0)));
RETURN Z0;
END;
END;

TI-84+: RLCPAREL

a+bi   // Complex mode
Radian  // Radians mode
0→Z
Disp “BATTERY”
Disp “V = VOLT”
Disp “F = FREQ (HZ)”
Prompt V,F
Lbl 0
Menu(“CIRCUIT”,”+ RESISTOR”,1,”+ CAPACITOR”,2,
“+ INDUCTOR”,3,”CALCULATE”,4)
Lbl 1
Input “R (OHMS):”,R
Z+1/R→Z
Goto 0
Lbl 2
Input “C (FARAD):”,C
Z-(2πFC)/i→Z
Goto 0
Lbl 3
Input “L (HENRY):”,L
Z+1/(i2πFL)→Z
Goto 0
Lbl 4
1/Z→Z
Disp “IMPEDANCE=”
Pause Z
Disp “MAGNITUDE=”
Pause abs(Z)
Disp “PHASE ANGLE (°)=”
Pause -angle(Z)*180/π
Disp “CURRENT (AMPS)=”
Pause V/abs(Z)

Sources:
ElectronicsTutorials.  Parallel RLC Circuit Analysis  URL: 
Retrieved February 22, 2015


Van Valkenburg, Mac E. (Editor) and Wendy M. Middelton (Editor)
"Reference Data for Engineers: Radio, Electronics, Computer, and
Communications"  9th Edition.  Newnes, Butterworth-Heinemann:  Wolburn,
MA  2002.  Print.

This blog is property of Edward Shore.  2015.


TI 84 Plus CE: Consolidated Debts

TI 84 Plus CE: Consolidated Debts   Disclaimer: This blog is for informational and academic purposes only. Financial decisions are your ...