VII. Applications: sciences, economics and optimization
48. Electrical engineering
Electrical calculations are on the home screen in the section "Applications", field Electrical engineering: a series and a parallel RLC circuit with an alternating current, RC and RL filters, a resonant circuit, a voltage divider, a Wheatstone bridge and power factor correction. In the form you choose the connection and the quantity sought and fill in the values with units; the "?" icon explains where the formulas come from. Voltages and currents are RMS values, complex numbers are written with j as in electrical engineering.
For each circuit the app draws its diagram with the parts' values and, for an alternating current, the frequency response on a logarithmic axis – the impedance and the phase, for filters the gain in decibels (a Bode plot). The steps show the reactances, the impedance in the algebraic and polar form (50∠53.13° Ω), the phase shift, the currents, the parts' voltages and the power; they also explain why the parts' voltages add as phasors.
A series-parallel circuit can be entered as an expression, e.g. R1 + (L1 || (R2 + C1)) with the values R1=100 L1=10m C1=1u (prefixes m, u, n, k, M). The steps simplify the circuit group by group, then work out every part's voltage and current. Any circuit (with bridges and several sources too) is entered as a netlist as in SPICE – one part per line with its nodes, node 0 is the ground; the steps set up Kirchhoff's current law at the nodes, the system's matrix and solve it by Gaussian elimination. Without a frequency it's a direct current.
Examples
model(acseries; find=P[W]; U=100[V]; R=30[ohm]; L=254.6[mH]; C=79.58[uF]; f=50[Hz]; parts=rlc)![model(acseries; find=P[W]; U=100[V]; R=30[ohm]; L=254.6[mH]; C=79.58[uF]; f=50[Hz]; parts=rlc)](img/el-series.png)
![model(acseries; find=P[W]; U=100[V]; R=30[ohm]; L=254.6[mH]; C=79.58[uF]; f=50[Hz]; parts=rlc)](img/el-series-1.png)
![model(acseries; find=P[W]; U=100[V]; R=30[ohm]; L=254.6[mH]; C=79.58[uF]; f=50[Hz]; parts=rlc)](img/el-series-2.png)
model(acparallel; find=parts[mA]; U=10[V]; R=100[ohm]; L=159.2[mH]; C=31.83[uF]; f=50[Hz]; parts=rlc)![model(acparallel; find=parts[mA]; U=10[V]; R=100[ohm]; L=159.2[mH]; C=31.83[uF]; f=50[Hz]; parts=rlc)](img/el-parallel.png)
![model(acparallel; find=parts[mA]; U=10[V]; R=100[ohm]; L=159.2[mH]; C=31.83[uF]; f=50[Hz]; parts=rlc)](img/el-parallel-1.png)
![model(acparallel; find=parts[mA]; U=10[V]; R=100[ohm]; L=159.2[mH]; C=31.83[uF]; f=50[Hz]; parts=rlc)](img/el-parallel-2.png)
![model(acparallel; find=parts[mA]; U=10[V]; R=100[ohm]; L=159.2[mH]; C=31.83[uF]; f=50[Hz]; parts=rlc)](img/el-parallel-3.png)
![model(acparallel; find=parts[mA]; U=10[V]; R=100[ohm]; L=159.2[mH]; C=31.83[uF]; f=50[Hz]; parts=rlc)](img/el-parallel-4.png)
model(filter; find=gain[one]; R=1[kohm]; C=100[nF]; f=1[kHz]; U1=5[V]; kind=rcLow)![model(filter; find=gain[one]; R=1[kohm]; C=100[nF]; f=1[kHz]; U1=5[V]; kind=rcLow)](img/el-filter.png)
![model(filter; find=gain[one]; R=1[kohm]; C=100[nF]; f=1[kHz]; U1=5[V]; kind=rcLow)](img/el-filter-1.png)
![model(filter; find=gain[one]; R=1[kohm]; C=100[nF]; f=1[kHz]; U1=5[V]; kind=rcLow)](img/el-filter-2.png)
model(resonance; find=Q[one]; L=10[mH]; C=100[nF]; R=10[ohm]; kind=series)![model(resonance; find=Q[one]; L=10[mH]; C=100[nF]; R=10[ohm]; kind=series)](img/el-resonance.png)
![model(resonance; find=Q[one]; L=10[mH]; C=100[nF]; R=10[ohm]; kind=series)](img/el-resonance-1.png)
![model(resonance; find=Q[one]; L=10[mH]; C=100[nF]; R=10[ohm]; kind=series)](img/el-resonance-2.png)
model(divider; find=U2[V]; U=12[V]; R1=1[kohm]; R2=2[kohm]; RL=2[kohm]; load=load)![model(divider; find=U2[V]; U=12[V]; R1=1[kohm]; R2=2[kohm]; RL=2[kohm]; load=load)](img/el-divider.png)
![model(divider; find=U2[V]; U=12[V]; R1=1[kohm]; R2=2[kohm]; RL=2[kohm]; load=load)](img/el-divider-1.png)
![model(divider; find=U2[V]; U=12[V]; R1=1[kohm]; R2=2[kohm]; RL=2[kohm]; load=load)](img/el-divider-2.png)
model(bridge; find=R4[ohm]; R1=100[ohm]; R2=200[ohm]; R3=150[ohm])![model(bridge; find=R4[ohm]; R1=100[ohm]; R2=200[ohm]; R3=150[ohm])](img/el-bridge.png)
![model(bridge; find=R4[ohm]; R1=100[ohm]; R2=200[ohm]; R3=150[ohm])](img/el-bridge-1.png)
![model(bridge; find=R4[ohm]; R1=100[ohm]; R2=200[ohm]; R3=150[ohm])](img/el-bridge-2.png)
model(compensation; find=C[uF]; P=10[kW]; U=230[V]; f=50[Hz]; cos1=0.7[one]; cos2=0.95[one])![model(compensation; find=C[uF]; P=10[kW]; U=230[V]; f=50[Hz]; cos1=0.7[one]; cos2=0.95[one])](img/el-compensation.png)
![model(compensation; find=C[uF]; P=10[kW]; U=230[V]; f=50[Hz]; cos1=0.7[one]; cos2=0.95[one])](img/el-compensation-1.png)
![model(compensation; find=C[uF]; P=10[kW]; U=230[V]; f=50[Hz]; cos1=0.7[one]; cos2=0.95[one])](img/el-compensation-2.png)
circuit(R1 + (L1 || C1); R1=10; L1=10m; C1=100u; U=10V; f=50Hz)




netlist(V1 1 0 12; R1 1 2 100; R2 2 0 200; R3 1 3 150; R4 3 0 250; R5 2 3 50)


Known limitations
- The circuits are linear and in the steady state – the transients of RC, RL and RLC are the physics applications; diodes, transistors and operational amplifiers aren't there yet.
- The diagram is drawn for the forms and for a circuit as an expression; a netlist gets a table of parts and nodes. A circuit isn't recognized from a photo of its diagram.
- A netlist is solved either at a direct current or at one frequency – sources of different frequencies and superposition aren't there yet.