Lecture2 Circuit Simulation
Lecture2 Circuit Simulation
Prof. Dr. Herbert De Gersem, Dr. Mané Harutyunyan, Prof. Dr. Sebastian Schöps
Computational Electromagnetics Group
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 1
Overview
1 Circuit Simulation
Kirchhoff’s Laws
Lumped Elements
Electric Circuits are Graphs
Modified Nodal Analysis
Remarks on the Implementation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 2
Overview
1 Circuit Simulation
Kirchhoff’s Laws
Lumped Elements
Electric Circuits are Graphs
Modified Nodal Analysis
Remarks on the Implementation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 3
Overview
1 Circuit Simulation
Kirchhoff’s Laws
Lumped Elements
Electric Circuits are Graphs
Modified Nodal Analysis
Remarks on the Implementation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 4
Kirchhoff’s Current Law (KCL)
𝐴1 𝐴2
𝑖1
𝑖2
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 5
Kirchhoff’s Current Law (KCL)
𝜕𝑉 = 𝐴1 ∪̇ … ∪̇ 𝐴𝑛
𝐴1 𝐴2
𝑖1
𝑖2
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 5
Kirchhoff’s Current Law (KCL)
𝜕𝑉 = 𝐴1 ∪̇ … ∪̇ 𝐴𝑛
𝐴1 𝐴2
𝑖1
currents are integrals 𝑖𝑘 = ∫ 𝐽 ⃗ ⋅ d𝐴 ⃗ 𝑖2
𝐴𝑘
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 5
Kirchhoff’s Current Law (KCL)
𝜕𝑉 = 𝐴1 ∪̇ … ∪̇ 𝐴𝑛
𝐴1 𝐴2
𝑖1
currents are integrals 𝑖𝑘 = ∫ 𝐽 ⃗ ⋅ d𝐴 ⃗ 𝑖2
𝐴𝑘
𝑛 𝑛
Sum of all currents: ∑ ±𝑖𝑘 = ∑ ± ∫ 𝐽 ⃗ ⋅ d𝐴 ⃗ = ∫ 𝐽 ⃗ ⋅ d𝐴 ⃗ = 0
𝑘=1 𝑘=1 𝐴𝑘 𝜕𝑉
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 5
Kirchhoff’s Voltage Law (KVL)
∫ ∇ × 𝐸⃗ ⋅ d𝐴 ⃗ = ∫ 𝐸⃗ ⋅ d𝑠 ⃗ = 0, 𝑠3
𝐴 𝜕𝐴
𝑠4 𝑢3
with surface 𝐴 framed by conductors 𝑢4
𝑢2
𝐴 𝑠2
𝑢5 𝑢1
𝑠5
𝑠1
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 6
Kirchhoff’s Voltage Law (KVL)
∫ ∇ × 𝐸⃗ ⋅ d𝐴 ⃗ = ∫ 𝐸⃗ ⋅ d𝑠 ⃗ = 0, 𝑠3
𝐴 𝜕𝐴
𝑠4 𝑢3
with surface 𝐴 framed by conductors 𝑢4
𝑢2
Boundary is a union of curves 𝑠𝑘 𝐴 𝑠2
𝑢5 𝑢1
𝜕𝐴 = 𝑠1 ∪̇ … ∪̇ 𝑠𝑏 𝑠5
𝑠1
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 6
Kirchhoff’s Voltage Law (KVL)
∫ ∇ × 𝐸⃗ ⋅ d𝐴 ⃗ = ∫ 𝐸⃗ ⋅ d𝑠 ⃗ = 0, 𝑠3
𝐴 𝜕𝐴
𝑠4 𝑢3
with surface 𝐴 framed by conductors 𝑢4
𝑢2
Boundary is a union of curves 𝑠𝑘 𝐴 𝑠2
𝑢5 𝑢1
𝜕𝐴 = 𝑠1 ∪̇ … ∪̇ 𝑠𝑏 𝑠5
𝑠1
Voltage is the integral
𝑢 𝑘 = ∫ 𝐸 ⃗ ⋅ d𝑠 ⃗
𝑠𝑘
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 6
Kirchhoff’s Voltage Law (KVL)
∫ ∇ × 𝐸⃗ ⋅ d𝐴 ⃗ = ∫ 𝐸⃗ ⋅ d𝑠 ⃗ = 0, 𝑠3
𝐴 𝜕𝐴
𝑠4 𝑢3
with surface 𝐴 framed by conductors 𝑢4
𝑢2
Boundary is a union of curves 𝑠𝑘 𝐴 𝑠2
𝑢5 𝑢1
𝜕𝐴 = 𝑠1 ∪̇ … ∪̇ 𝑠𝑏 𝑠5
𝑠1
Voltage is the integral
𝑢 𝑘 = ∫ 𝐸 ⃗ ⋅ d𝑠 ⃗
𝑠𝑘
𝑛 𝑛
Sum of all voltages: ∑ ±𝑢𝑘 = ∑ ± ∫ 𝐸⃗ ⋅ d𝑠 ⃗ = ∫ 𝐸⃗ ⋅ d𝑠 ⃗ = 0
𝑘=1 𝑘=1 𝑠𝑘 𝜕𝐴
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 6
Overview
1 Circuit Simulation
Kirchhoff’s Laws
Lumped Elements
Electric Circuits are Graphs
Modified Nodal Analysis
Remarks on the Implementation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 7
Lumped element models
𝐶
𝑅 𝐿
𝑢
𝑖
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 8
Resistor
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 9
Resistor
1 Δℓ
𝑅=
𝜎 Δ𝐴
with specific conductivity 𝜎, length Δℓ and cross section Δ𝐴.
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 9
Resistor
1 Δℓ
𝑅=
𝜎 Δ𝐴
with specific conductivity 𝜎, length Δℓ and cross section Δ𝐴.
The power loss and energy are
𝑡
𝑃Ohm = 𝑢 𝑖 = 𝑅 𝑖2 𝑊Ohm = ∫ 𝑅 𝑖2 (𝑠) d𝑠.
0
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 9
Resistor
1 Δℓ
𝑅=
𝜎 Δ𝐴
with specific conductivity 𝜎, length Δℓ and cross section Δ𝐴.
The power loss and energy are
𝑡
𝑃Ohm = 𝑢 𝑖 = 𝑅 𝑖2 𝑊Ohm = ∫ 𝑅 𝑖2 (𝑠) d𝑠.
0
d
𝑢(𝑡) =
Φ (𝑖(𝑡), 𝑡) .
d𝑡 L
In the case of a linear time-invariant inductor:
d𝑖
ΦL (𝑖(𝑡), 𝑡) = 𝐿𝑖(𝑡) and 𝑢(𝑡) = 𝐿 (𝑡)
d𝑡
2
Simple coil: inductance 𝐿 = 𝜇0 𝜇𝑟 𝑁 ℓ 𝐴 with vacuum permeability 𝜇0 ,
relative permeability 𝜇𝑟 , number of turns 𝑁, length ℓ and area 𝐴.
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 10
Capacitor
𝑞𝐶 (𝑢(𝑡), 𝑡) = ∫ 𝜚(𝑟,⃗ 𝑡) d𝑉 ,
𝑉 𝐶
where the charge depends on the applied voltage 𝑢(𝑡)
and for the current holds
d
𝑖(𝑡) =
𝑞 (𝑢(𝑡), 𝑡) .
d𝑡 𝐶
For linear time-invariant capacitors the relation is as follows
d𝑢
𝑞𝐶 (𝑢(𝑡), 𝑡) = 𝐶𝑢(𝑡) and 𝑖(𝑡) = 𝐶 (𝑡).
d𝑡
Simple plate capacitor: capacitance 𝐶 = 𝜖0 𝜖r 𝐴 𝑑 with vacuum permittivity
𝜖0 , relative permittivity 𝜖r , distance 𝑑 and area 𝐴.
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 11
Sources and Other Elements
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 12
Sources and Other Elements
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 12
Overview
1 Circuit Simulation
Kirchhoff’s Laws
Lumped Elements
Electric Circuits are Graphs
Modified Nodal Analysis
Remarks on the Implementation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 13
Graph Definition
1
1 𝑑 5
𝑓 𝑐
𝑒 ℎ 𝑎
𝑖
𝑎 3 4 𝑐 𝑒
𝑓 2 3
𝑗 𝑔
𝑏
2 𝑏 6 𝑑
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 14
Loop
1 𝑑 5
Example:
𝑒 𝑖 ℎ
𝑎 3 4 𝑐
𝑓
𝑗 𝑔
2 𝑏 6
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 15
Loop
1 𝑑 5
Example:
𝑒 𝑖 ℎ
𝑎 3 4 𝑐 {𝑎, 𝑏, 𝑐, 𝑑} is a loop, but
𝑓
𝑗 𝑔
2 𝑏 6
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 15
Loop
1 𝑑 5
Example:
𝑒 𝑖 ℎ
𝑎 3 4 𝑐 {𝑎, 𝑏, 𝑐, 𝑑} is a loop, but
𝑓
𝑗 𝑔
{𝑎, 𝑒, 𝑖, 𝑗, 𝑓} is not a loop
2 𝑏 6
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 15
Incidence Matrix
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 16
Incidence Matrix
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 17
Incidence Matrix: Currents (i)
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 17
Incidence Matrix: Currents (i)
because each row a𝑘∶ = [𝑎𝑘1 , 𝑎𝑘2 , ..., 𝑎𝑘𝑏 ] of the incidence matrix Aa sums
up the right currents
𝑏
a𝑘∶ i = ∑ 𝑎𝑘𝑙 𝑖𝑙
𝑙=1
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 17
Incidence Matrix: Currents (i)
because each row a𝑘∶ = [𝑎𝑘1 , 𝑎𝑘2 , ..., 𝑎𝑘𝑏 ] of the incidence matrix Aa sums
up the right currents
𝑏
a𝑘∶ i = ∑ 𝑎𝑘𝑙 𝑖𝑙
𝑙=1
and the sum of all current entering/leaving a node must be zero due
Kirchhoff’s current law, i.e.
a𝑘∶ i = 0 ∀𝑘.
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 17
Incidence Matrix: Currents (ii)
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 18
Incidence Matrix: Currents (ii)
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 18
Incidence Matrix: Currents (ii)
This (𝑛-th) node is called mass or ground and is implicitly set to 0V.
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 18
Incidence Matrix: Currents (ii)
This (𝑛-th) node is called mass or ground and is implicitly set to 0V.
Kirchhoff’s Current Law still holds for the other nodes, i.e.
Ai = 0.
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 18
Incidence Matrix: Currents (iii)
Example: Aa i = 0
𝑖𝑎
1 0 1 0 0 −1 ⎡ 𝑖𝑏 ⎤ 0
⎡−1 ⎢ ⎥
1 0 0 1 0⎤ ⎢ 𝑖𝑐 ⎥ ⎡0⎤ 1
⎢ ⎥ =⎢ ⎥
⎢ 0 0 −1 1 −1 0⎥ ⎢𝑖𝑑 ⎥ ⎢0⎥
⎣ 0 −1 0 −1 0 1⎦ ⎢𝑖𝑒 ⎥ ⎣0⎦ 𝑓
𝑎
𝑐
⎣𝑖𝑓 ⎦ 𝑒
2 3
𝑏
𝑑
4
Node 4: ground
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 19
Incidence Matrix: Currents (iii)
Example: Aa i = 0
𝑖𝑎
1 0 1 0 0 −1 ⎡ 𝑖𝑏 ⎤ 0
⎡−1 ⎢ ⎥
1 0 0 1 0⎤ ⎢ 𝑖𝑐 ⎥ ⎡0⎤ 1
⎢ ⎥ =⎢ ⎥
⎢ 0 0 −1 1 −1 0⎥ ⎢𝑖𝑑 ⎥ ⎢0⎥
⎣ 0 −1 0 −1 0 1⎦ ⎢𝑖𝑒 ⎥ ⎣0⎦ 𝑓
𝑎
𝑐
⎣𝑖𝑓 ⎦ 𝑒
2 3
and Ai = 0 𝑖𝑎 𝑏
𝑑
⎡𝑖 ⎤
1 0 1 0 0 −1 ⎢ 𝑏 ⎥ 0 4
⎡−1 𝑖𝑐 ⎥ ⎡ ⎤
⎢ 1 0 0 1 0⎤ ⎢
⎥ 𝑖 ⎥ ⎢0⎥
= Node 4: ground
⎣ 0 0 −1 1 −1 0⎦ ⎢ 𝑑
⎢𝑖𝑒 ⎥ ⎣0⎦
⎣𝑖𝑓 ⎦
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 19
Circuit Description: Voltages (i)
Let u denote the vector of branch voltages and 𝜑𝑖 the voltage between
the node 𝑖 and mass (called potentials)
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 20
Circuit Description: Voltages (i)
Let u denote the vector of branch voltages and 𝜑𝑖 the voltage between
the node 𝑖 and mass (called potentials)
Vector of potentials: 𝜑⊤ = [𝜑1 , 𝜑2 , ..., 𝜑𝑛−1 ]
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 20
Circuit Description: Voltages (i)
Let u denote the vector of branch voltages and 𝜑𝑖 the voltage between
the node 𝑖 and mass (called potentials)
Vector of potentials: 𝜑⊤ = [𝜑1 , 𝜑2 , ..., 𝜑𝑛−1 ]
If branch 𝑘 leaves node 𝑖 and enters node 𝑗 , then
𝑢𝑘 = 𝜑 𝑖 − 𝜑 𝑗 ,
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 20
Circuit Description: Voltages (i)
Let u denote the vector of branch voltages and 𝜑𝑖 the voltage between
the node 𝑖 and mass (called potentials)
Vector of potentials: 𝜑⊤ = [𝜑1 , 𝜑2 , ..., 𝜑𝑛−1 ]
If branch 𝑘 leaves node 𝑖 and enters node 𝑗 , then
𝑢𝑘 = 𝜑 𝑖 − 𝜑 𝑗 ,
𝑢𝑘 = −𝜑𝑗 or 𝑢𝑘 = 𝜑 𝑖 .
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 20
Circuit Description: Voltages (i)
Let u denote the vector of branch voltages and 𝜑𝑖 the voltage between
the node 𝑖 and mass (called potentials)
Vector of potentials: 𝜑⊤ = [𝜑1 , 𝜑2 , ..., 𝜑𝑛−1 ]
If branch 𝑘 leaves node 𝑖 and enters node 𝑗 , then
𝑢𝑘 = 𝜑 𝑖 − 𝜑 𝑗 ,
𝑢𝑘 = −𝜑𝑗 or 𝑢𝑘 = 𝜑 𝑖 .
In matrix-vector notation
u = A⊤ 𝜑.
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 20
Circuit Description: Voltages (ii)
Example: u = A⊤
a𝜑
𝑢𝑎 1 −1 0 0
⎡𝑢 ⎤ ⎡ 0 1 0 −1 ⎤ 𝜑1
⎢ 𝑏⎥ ⎢ ⎥
𝑢
⎢ 𝑐⎥ = ⎢ 1 0 −1 0 ⎥ ⎡ 𝜑2 ⎤ 1
⎢ ⎥
⎢ 𝑢𝑑 ⎥ ⎢ 0 0 1 −1⎥ ⎢ 𝜑3 ⎥
⎢ 𝑢𝑒 ⎥ ⎢ 0 𝑓 𝑐
1 −1 0 ⎥ ⎣ 0⎦ 𝑎
⎣𝑢𝑓 ⎦ ⎣−1 0 0 1⎦ 𝑒
2 3
𝑏
𝑑
4
Node 4: ground
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 21
Circuit Description: Voltages (ii)
Example: u = A⊤
a𝜑
𝑢𝑎 1 −1 0 0
⎡𝑢 ⎤ ⎡ 0 1 0 −1 ⎤ 𝜑1
⎢ 𝑏⎥ ⎢ ⎥
𝑢
⎢ 𝑐⎥ = ⎢ 1 0 −1 0 ⎥ ⎡ 𝜑2 ⎤ 1
⎢ ⎥
⎢ 𝑢𝑑 ⎥ ⎢ 0 0 1 −1⎥ ⎢ 𝜑3 ⎥
⎢ 𝑢𝑒 ⎥ ⎢ 0 𝑓 𝑐
1 −1 0 ⎥ ⎣ 0⎦ 𝑎
⎣𝑢𝑓 ⎦ ⎣−1 0 0 1⎦ 𝑒
2 3
and u = A⊤ 𝜑
𝑏
𝑢𝑎 1 −1 0 𝑑
⎡𝑢 ⎤ ⎡ 0 1 0⎤
⎢ 𝑏⎥ ⎢ ⎥ 𝜑 4
⎢ 𝑢𝑐 ⎥ = ⎢ 1 0 −1⎥ ⎡ 1 ⎤ Node 4: ground
𝜑
⎢𝑢𝑑 ⎥ ⎢ 0 0 1⎥ ⎢ 2 ⎥
𝜑
⎢ 𝑢𝑒 ⎥ ⎢ 0 1 −1⎥ ⎣ 3 ⎦
⎣𝑢𝑓 ⎦ ⎣−1 0 0⎦
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 21
Overview
1 Circuit Simulation
Kirchhoff’s Laws
Lumped Elements
Electric Circuits are Graphs
Modified Nodal Analysis
Remarks on the Implementation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 22
Sparse Tableau Analysis (i)
d d
f( u(𝑡), i(𝑡), u(𝑡), i(𝑡)) = 0.
d𝑡 d𝑡
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 23
Sparse Tableau Analysis (i)
d d
f( u(𝑡), i(𝑡), u(𝑡), i(𝑡)) = 0.
d𝑡 d𝑡
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 23
Sparse Tableau Analysis (ii)
i⊤ = [i⊤
R i⊤
C i⊤
L i⊤
V i⊤
I ] and u⊤ = [u⊤
R u⊤
C u⊤
L u⊤
V u⊤
I ]
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 24
Sparse Tableau Analysis (ii)
i⊤ = [i⊤
R i⊤
C i⊤
L i⊤
V i⊤
I ] and u⊤ = [u⊤
R u⊤
C u⊤
L u⊤
V u⊤
I ]
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 24
Sparse Tableau Analysis (ii)
i⊤ = [i⊤
R i⊤
C i⊤
L i⊤
V i⊤
I ] and u⊤ = [u⊤
R u⊤
C u⊤
L u⊤
V u⊤
I ]
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 24
Sparse Tableau Analysis (ii)
i⊤ = [i⊤
R i⊤
C i⊤
L i⊤
V i⊤
I ] and u⊤ = [u⊤
R u⊤
C u⊤
L u⊤
V u⊤
I ]
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 25
Sparse Tableau Analysis (iii)
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 25
Modified Nodal Analysis: Linear elements
d
AC CA⊤C 𝝋(𝑡) + AR GA⊤R 𝝋(𝑡) + AL iL (𝑡) + AV iV (𝑡) = −AI is (𝑡)
d𝑡
d
L iL (𝑡) − A⊤L 𝝋(𝑡) = 0
d𝑡
A⊤V 𝝋(𝑡) = us (𝑡) .
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 26
Modified Nodal Analysis: Matrix System
Matrix/vector-notation
AC CA⊤ 0 0 𝝋(𝑡) AR GA⊤R AL AV 𝝋(𝑡) −AI is (𝑡)
⎡ 0 C L 0⎤ d ⎡ i (𝑡) ⎤ + ⎡ −A⊤ 0⎤ ⎡ ⎤ ⎡ ⎤
⎢ ⎥ d𝑡 ⎢ L ⎥ ⎢ L 0 ⎥ ⎢ iL (𝑡) ⎥ = ⎢ 0 ⎥
⎣ ⏟0⏟⏟⏟
⏟⏟ 0⏟⏟⏟
0⎦ ⎣iV (𝑡)⎦ ⏟⏟⏟⏟⏟⏟⏟⏟⏟
⏟ ⎣ −AV
⊤ 0 0 ⎦ ⎣iV (𝑡)⎦ ⏟ ⎣⏟−u
⏟ s (𝑡)
⏟⏟ ⎦
=∶M =∶x(𝑡) =∶K =∶r(𝑡)
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 27
Modified Nodal Analysis: Matrix System
Matrix/vector-notation
AC CA⊤ 0 0 𝝋(𝑡) AR GA⊤R AL AV 𝝋(𝑡) −AI is (𝑡)
⎡ 0 C L 0⎤ d ⎡ i (𝑡) ⎤ + ⎡ −A⊤ 0⎤ ⎡ ⎤ ⎡ ⎤
⎢ ⎥ d𝑡 ⎢ L ⎥ ⎢ L 0 ⎥ ⎢ iL (𝑡) ⎥ = ⎢ 0 ⎥
⎣ ⏟0⏟⏟⏟
⏟⏟ 0⏟⏟⏟
0⎦ ⎣iV (𝑡)⎦ ⏟⏟⏟⏟⏟⏟⏟⏟⏟
⏟ ⎣ −AV
⊤ 0 0 ⎦ ⎣iV (𝑡)⎦ ⏟ ⎣⏟−u
⏟ s (𝑡)
⏟⏟ ⎦
=∶M =∶x(𝑡) =∶K =∶r(𝑡)
d
M x(𝑡) + Kx(𝑡) = r(𝑡)
d𝑡
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 27
Modified Nodal Analysis: Matrix System
Matrix/vector-notation
AC CA⊤ 0 0 𝝋(𝑡) AR GA⊤R AL AV 𝝋(𝑡) −AI is (𝑡)
⎡ 0 C L 0⎤ d ⎡ i (𝑡) ⎤ + ⎡ −A⊤ 0⎤ ⎡ ⎤ ⎡ ⎤
⎢ ⎥ d𝑡 ⎢ L ⎥ ⎢ L 0 ⎥ ⎢ iL (𝑡) ⎥ = ⎢ 0 ⎥
⎣ ⏟0⏟⏟⏟
⏟⏟ 0⏟⏟⏟
0⎦ ⎣iV (𝑡)⎦ ⏟⏟⏟⏟⏟⏟⏟⏟⏟
⏟ ⎣ −AV
⊤ 0 0 ⎦ ⎣iV (𝑡)⎦ ⏟ ⎣⏟−u
⏟ s (𝑡)
⏟⏟ ⎦
=∶M =∶x(𝑡) =∶K =∶r(𝑡)
d
M x(𝑡) + Kx(𝑡) = r(𝑡)
d𝑡
The unknown quantity is the time-dependent vector-valued function
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 27
Modified Nodal Analysis: Matrix System
Matrix/vector-notation
AC CA⊤ 0 0 𝝋(𝑡) AR GA⊤R AL AV 𝝋(𝑡) −AI is (𝑡)
⎡ 0 C L 0⎤ d ⎡ i (𝑡) ⎤ + ⎡ −A⊤ 0⎤ ⎡ ⎤ ⎡ ⎤
⎢ ⎥ d𝑡 ⎢ L ⎥ ⎢ L 0 ⎥ ⎢ iL (𝑡) ⎥ = ⎢ 0 ⎥
⎣ ⏟0⏟⏟⏟
⏟⏟ 0⏟⏟⏟
0⎦ ⎣iV (𝑡)⎦ ⏟⏟⏟⏟⏟⏟⏟⏟⏟
⏟ ⎣ −AV
⊤ 0 0 ⎦ ⎣iV (𝑡)⎦ ⏟ ⎣⏟−u
⏟ s (𝑡)
⏟⏟ ⎦
=∶M =∶x(𝑡) =∶K =∶r(𝑡)
d
M x(𝑡) + Kx(𝑡) = r(𝑡)
d𝑡
The unknown quantity is the time-dependent vector-valued function
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 27
Tunnel Diode Oscillator (i)
𝜑1 𝐺 𝜑2 𝐿 𝜑3 𝜑2
0.4 𝜑3
Potential 𝜑 in V
𝑢s 𝐶 𝑔(𝑢)
0.2
𝜑0 = 0 0
0 0.2 0.4 0.6 0.8 1
Zeit 𝑡 in s
⋅10−2
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 28
Tunnel Diode Oscillator (ii)
Incidence matrices
1 0 0 0 1
AR = ⎡
⎢−1 0⎤
⎥, AC = ⎡ ⎤
⎢0⎥ , AL = ⎡ ⎤
⎢ 1 ⎥, AV = ⎡
⎢0⎥
⎤ AI = ⎡
⎢⎥
⎤
⎣0 1⎦ ⎣1⎦ ⎣−1⎦ ⎣0⎦ ⎣⎦
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 29
Tunnel Diode Oscillator (ii)
Incidence matrices
1 0 0 0 1
AR = ⎡
⎢−1 0⎤
⎥, AC = ⎡ ⎤
⎢0⎥ , AL = ⎡ ⎤
⎢ 1 ⎥, AV = ⎡
⎢0⎥
⎤ AI = ⎡
⎢⎥
⎤
⎣0 1⎦ ⎣1⎦ ⎣−1⎦ ⎣0⎦ ⎣⎦
Unknowns 𝜑⊤ = [𝜑1 , 𝜑2 , 𝜑3 ] and two currents iI = (𝑖L ) and iV = (𝑖V )
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 29
Tunnel Diode Oscillator (ii)
Incidence matrices
1 0 0 0 1
AR = ⎡
⎢−1 0⎤
⎥, AC = ⎡ ⎤
⎢0⎥ , AL = ⎡ ⎤
⎢ 1 ⎥, AV = ⎡
⎢0⎥
⎤ AI = ⎡
⎢⎥
⎤
⎣0 1⎦ ⎣1⎦ ⎣−1⎦ ⎣0⎦ ⎣⎦
Unknowns 𝜑⊤ = [𝜑1 , 𝜑2 , 𝜑3 ] and two currents iI = (𝑖L ) and iV = (𝑖V )
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 29
Tunnel Diode Oscillator (ii)
Incidence matrices
1 0 0 0 1
AR = ⎡
⎢−1 0⎤
⎥, AC = ⎡ ⎤
⎢0⎥ , AL = ⎡ ⎤
⎢ 1 ⎥, AV = ⎡
⎢0⎥
⎤ AI = ⎡
⎢⎥
⎤
⎣0 1⎦ ⎣1⎦ ⎣−1⎦ ⎣0⎦ ⎣⎦
Unknowns 𝜑⊤ = [𝜑1 , 𝜑2 , 𝜑3 ] and two currents iI = (𝑖L ) and iV = (𝑖V )
𝐺 −𝐺
The matrix contribution of each element is called stamp, e.g., [ ].
−𝐺 𝐺
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 29
Tunnel Diode Oscillator (iii): Netlist
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 30
Overview
1 Circuit Simulation
Kirchhoff’s Laws
Lumped Elements
Electric Circuits are Graphs
Modified Nodal Analysis
Remarks on the Implementation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 31
Summary Circuit Simulation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Pseudocode Circuit Simulation
1 read netlist
2 set x0
3 for i = 1 to #Timesteps
4 x1𝑖 :=x𝑖−1
5 for j = 1 to #Newton
6 for k = 1 to #Elements
7 get k-th stamp [a𝑗𝑘 ,b𝑗𝑘 ] from x𝑗𝑖
8 [A𝑗 ,b𝑗 ]:=[A𝑗 ,b𝑗 ]+[a𝑗𝑘 ,b𝑗𝑘 ]
9 end
10 solve A𝑗 x𝑗+1
𝑖 =b𝑗
11 end
12 store x𝑖 :=x𝑗+1𝑖
13 end
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 33