0% found this document useful (0 votes)
13 views78 pages

Lecture2 Circuit Simulation

Uploaded by

Han Si Yuan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views78 pages

Lecture2 Circuit Simulation

Uploaded by

Han Si Yuan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

Electromagnetic Field Simulation

Lecture 2: 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)

Ampère’s law for statics


𝑖4
𝐴4
∫ ∇ ⋅ 𝐽 ⃗ d𝑉 = ∫ 𝐽 ⃗ ⋅ d𝐴 ⃗ = 0,
𝑉 𝜕𝑉 𝑖5 𝐴5
𝐴3
with volume 𝑉 surrounding each node 𝑖3

𝐴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)

Ampère’s law for statics


𝑖4
𝐴4
∫ ∇ ⋅ 𝐽 ⃗ d𝑉 = ∫ 𝐽 ⃗ ⋅ d𝐴 ⃗ = 0,
𝑉 𝜕𝑉 𝑖5 𝐴5
𝐴3
with volume 𝑉 surrounding each node 𝑖3
boundary is union of surfaces 𝐴𝑘

𝜕𝑉 = 𝐴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)

Ampère’s law for statics


𝑖4
𝐴4
∫ ∇ ⋅ 𝐽 ⃗ d𝑉 = ∫ 𝐽 ⃗ ⋅ d𝐴 ⃗ = 0,
𝑉 𝜕𝑉 𝑖5 𝐴5
𝐴3
with volume 𝑉 surrounding each node 𝑖3
boundary is union of surfaces 𝐴𝑘

𝜕𝑉 = 𝐴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)

Ampère’s law for statics


𝑖4
𝐴4
∫ ∇ ⋅ 𝐽 ⃗ d𝑉 = ∫ 𝐽 ⃗ ⋅ d𝐴 ⃗ = 0,
𝑉 𝜕𝑉 𝑖5 𝐴5
𝐴3
with volume 𝑉 surrounding each node 𝑖3
boundary is union of surfaces 𝐴𝑘

𝜕𝑉 = 𝐴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)

Faraday’s law in statics

∫ ∇ × 𝐸⃗ ⋅ 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)

Faraday’s law in statics

∫ ∇ × 𝐸⃗ ⋅ 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)

Faraday’s law in statics

∫ ∇ × 𝐸⃗ ⋅ 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)

Faraday’s law in statics

∫ ∇ × 𝐸⃗ ⋅ 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

𝐶
𝑅 𝐿

(a) Resistor (b) Inductor (c) Capacitor

𝑢
𝑖

(d) Voltage source (e) Current source

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 8
Resistor

An Ohmic resistor is constant and time invariant

𝑢(𝑡) = 𝑅 𝑖(𝑡) or 𝑖(𝑡) = 𝐺 𝑢(𝑡)

with resistance 𝑅 or conductance 𝐺 = 1/𝑅. 𝑅

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 9
Resistor

An Ohmic resistor is constant and time invariant

𝑢(𝑡) = 𝑅 𝑖(𝑡) or 𝑖(𝑡) = 𝐺 𝑢(𝑡)

with resistance 𝑅 or conductance 𝐺 = 1/𝑅. 𝑅


A simple resistance is given by

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

An Ohmic resistor is constant and time invariant

𝑢(𝑡) = 𝑅 𝑖(𝑡) or 𝑖(𝑡) = 𝐺 𝑢(𝑡)

with resistance 𝑅 or conductance 𝐺 = 1/𝑅. 𝑅


A simple resistance is given by

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

An Ohmic resistor is constant and time invariant

𝑢(𝑡) = 𝑅 𝑖(𝑡) or 𝑖(𝑡) = 𝐺 𝑢(𝑡)

with resistance 𝑅 or conductance 𝐺 = 1/𝑅. 𝑅


A simple resistance is given by

1 Δℓ
𝑅=
𝜎 Δ𝐴
with specific conductivity 𝜎, length Δℓ and cross section Δ𝐴.
The power loss and energy are
𝑡
𝑃Ohm = 𝑢 𝑖 = 𝑅 𝑖2 𝑊Ohm = ∫ 𝑅 𝑖2 (𝑠) d𝑠.
0

Open circuit (𝐺 = 0, 𝑅 = ∞) and short circuit (𝐺 = ∞, 𝑅 = 0)


June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 9
Inductor

A circuit element with two pins is called inductor if

ΦL (𝑖(𝑡), 𝑡) = ∫ 𝐵(⃗ 𝑟,⃗ 𝑡) ⋅ d𝐴 ⃗


𝐴

where the flux density 𝐵⃗ depends on the current 𝑖(𝑡). 𝐿


For the voltage holds

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

A circuit element with two pins is called capacitor if

𝑞𝐶 (𝑢(𝑡), 𝑡) = ∫ 𝜚(𝑟,⃗ 𝑡) 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

Independent voltage sources Independent current sources


Hello 𝑉 Hello
Hello 𝐼

𝑢(𝑡) = 𝑢s (𝑡) 𝑖(𝑡) = 𝑖s (𝑡)


𝑢s ≡ 0, short circuit 𝑖s ≡ 0, open circuit

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 12
Sources and Other Elements

Independent voltage sources Independent current sources


Hello 𝑉 Hello
Hello 𝐼

𝑢(𝑡) = 𝑢s (𝑡) 𝑖(𝑡) = 𝑖s (𝑡)


𝑢s ≡ 0, short circuit 𝑖s ≡ 0, open circuit
Other circuit elements
Controlled sources
𝑢(𝑡) = 𝑢(𝑢control , 𝑡) 𝑖(𝑡) = 𝑖(𝑖control , 𝑡) .
Diodes: e.g. simple Shockley model
𝑢(𝑡)
𝑖(𝑡) = 𝑖s (𝑒 𝑛𝑢T − 1)

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 𝑑

A graph 𝒢 = (𝒱, ℰ) consists of a set of nodes 𝒱 and branches ℰ.


The endings of branches are two nodes.
If the branches are oriented then 𝒢 is called a directed graph.
A graph is called connected if there is at least one path between each pair
of nodes of the graph.

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 14
Loop

A subgraph 𝐺𝑙 of a connected graph 𝐺 is called loop if


1. 𝐺𝑙 is connected.
2. Each node of 𝐺𝑙 belongs to exactly two branches of 𝐺𝑙

1 𝑑 5
Example:
𝑒 𝑖 ℎ
𝑎 3 4 𝑐
𝑓
𝑗 𝑔
2 𝑏 6

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 15
Loop

A subgraph 𝐺𝑙 of a connected graph 𝐺 is called loop if


1. 𝐺𝑙 is connected.
2. Each node of 𝐺𝑙 belongs to exactly two branches of 𝐺𝑙

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

A subgraph 𝐺𝑙 of a connected graph 𝐺 is called loop if


1. 𝐺𝑙 is connected.
2. Each node of 𝐺𝑙 belongs to exactly two branches of 𝐺𝑙

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

Let graph 𝒢 with 𝑛 nodes and 𝑏 branches be given. The 𝑛 × 𝑏 incidence


matrix is defined as Aa = (𝑎𝑖𝑗 ) with
⎧+1 if branch 𝑗 leaves node 𝑖
{
𝑎𝑖𝑗 = −1 if branch 𝑗 enters node 𝑖

{0 otherwise

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 16
Incidence Matrix

Let graph 𝒢 with 𝑛 nodes and 𝑏 branches be given. The 𝑛 × 𝑏 incidence


matrix is defined as Aa = (𝑎𝑖𝑗 ) with
⎧+1 if branch 𝑗 leaves node 𝑖
{
𝑎𝑖𝑗 = −1 if branch 𝑗 enters node 𝑖

{0 otherwise

1
Example:
𝑓 𝑐
𝑎
1 0 1 0 0 −1 1
⎡−1 1 0 0 1 0⎤ 2 𝑒
Aa = ⎢ ⎥ 2 3
⎢ 0 0 −1 1 −1 0⎥ 3
⎣ 0 −1 0 −1 0 1⎦ 4 𝑏
𝑑
𝑎 𝑏 𝑐 𝑑 𝑒 𝑓
4
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 16
Incidence Matrix: Currents (i)

Let a circuit be represented by Aa and the vector of all branch currents is


i⊤ = [𝑖1 , 𝑖2 , ..., 𝑖𝑏 ].

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 17
Incidence Matrix: Currents (i)

Let a circuit be represented by Aa and the vector of all branch currents is


i⊤ = [𝑖1 , 𝑖2 , ..., 𝑖𝑏 ].
Then, it holds
Aa i = 0

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 17
Incidence Matrix: Currents (i)

Let a circuit be represented by Aa and the vector of all branch currents is


i⊤ = [𝑖1 , 𝑖2 , ..., 𝑖𝑏 ].
Then, it holds
Aa i = 0

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)

Let a circuit be represented by Aa and the vector of all branch currents is


i⊤ = [𝑖1 , 𝑖2 , ..., 𝑖𝑏 ].
Then, it holds
Aa i = 0

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)

The rows in an incidence matrix of a connected graph are linearly


dependent, one row is superfluous, e.g.
1 0 1 0 0 −1
⎡−1 1 0 0 1 0⎤
Aa = ⎢ ⎥
⎢ 0 0 −1 1 −1 0⎥
⎣ 0 −1 0 −1 0 1⎦

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 18
Incidence Matrix: Currents (ii)

The rows in an incidence matrix of a connected graph are linearly


dependent, one row is superfluous, e.g.
1 0 1 0 0 −1
⎡−1 1 0 0 1 0⎤
Aa = ⎢ ⎥
⎢ 0 0 −1 1 −1 0⎥
⎣ 0 −1 0 −1 0 1⎦
The reduced incidence matrix A ∈ {−1, 0, 1}(𝑛−1)×𝑏 is obtained from Aa
by removing one row (e.g. 𝑛).

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 18
Incidence Matrix: Currents (ii)

The rows in an incidence matrix of a connected graph are linearly


dependent, one row is superfluous, e.g.
1 0 1 0 0 −1
⎡−1 1 0 0 1 0⎤
Aa = ⎢ ⎥
⎢ 0 0 −1 1 −1 0⎥
⎣ 0 −1 0 −1 0 1⎦
The reduced incidence matrix A ∈ {−1, 0, 1}(𝑛−1)×𝑏 is obtained from Aa
by removing one row (e.g. 𝑛).

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)

The rows in an incidence matrix of a connected graph are linearly


dependent, one row is superfluous, e.g.
1 0 1 0 0 −1
⎡−1 1 0 0 1 0⎤
Aa = ⎢ ⎥
⎢ 0 0 −1 1 −1 0⎥
⎣ 0 −1 0 −1 0 1⎦
The reduced incidence matrix A ∈ {−1, 0, 1}(𝑛−1)×𝑏 is obtained from Aa
by removing one row (e.g. 𝑛).

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

𝑢𝑘 = 𝜑 𝑖 − 𝜑 𝑗 ,

If node 𝑖 or 𝑗 is the mass node, then follows

𝑢𝑘 = −𝜑𝑗 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

𝑢𝑘 = 𝜑 𝑖 − 𝜑 𝑗 ,

If node 𝑖 or 𝑗 is the mass node, then follows

𝑢𝑘 = −𝜑𝑗 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)

Sparse Tableau Analysis (STA) is based for each point in time

Ai(𝑡) = 0 and u(𝑡) = A⊤ 𝜑(𝑡)

as well as branch voltage/current relations for each element

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)

Sparse Tableau Analysis (STA) is based for each point in time

Ai(𝑡) = 0 and u(𝑡) = A⊤ 𝜑(𝑡)

as well as branch voltage/current relations for each element

d d
f( u(𝑡), i(𝑡), u(𝑡), i(𝑡)) = 0.
d𝑡 d𝑡

This yields a differential/algebraic equation system with unknown


time-dependent variables i(𝑡), u(𝑡) and 𝜑(𝑡).
The resulting dimension of the system is 2𝑏 + 𝑛 − 1, where 𝑏 is the
number of branches and 𝑛 the number of nodes.

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 23
Sparse Tableau Analysis (ii)

assumption: sort the branches by type so that


A = [AR AC AL AV AI ]

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)

assumption: sort the branches by type so that


A = [AR AC AL AV AI ]

i⊤ = [i⊤
R i⊤
C i⊤
L i⊤
V i⊤
I ] and u⊤ = [u⊤
R u⊤
C u⊤
L u⊤
V u⊤
I ]

Resistors: conductance matrix G = diag(𝐺1 , … , 𝐺𝑏R ) and number 𝑏R


iR = G uR .

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 24
Sparse Tableau Analysis (ii)

assumption: sort the branches by type so that


A = [AR AC AL AV AI ]

i⊤ = [i⊤
R i⊤
C i⊤
L i⊤
V i⊤
I ] and u⊤ = [u⊤
R u⊤
C u⊤
L u⊤
V u⊤
I ]

Resistors: conductance matrix G = diag(𝐺1 , … , 𝐺𝑏R ) and number 𝑏R


iR = G uR .
Capacitors: capacitance matrix C = diag(𝐶1 , … , 𝐶𝑏C ) and number 𝑏C
d
iC = C u ,
d𝑡 C

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 24
Sparse Tableau Analysis (ii)

assumption: sort the branches by type so that


A = [AR AC AL AV AI ]

i⊤ = [i⊤
R i⊤
C i⊤
L i⊤
V i⊤
I ] and u⊤ = [u⊤
R u⊤
C u⊤
L u⊤
V u⊤
I ]

Resistors: conductance matrix G = diag(𝐺1 , … , 𝐺𝑏R ) and number 𝑏R


iR = G uR .
Capacitors: capacitance matrix C = diag(𝐶1 , … , 𝐶𝑏C ) and number 𝑏C
d
u , iC = C
d𝑡 C
Coils: inductance matrix L = diag(𝐿1 , … , 𝐿𝑏L ) and number 𝑏L
d
uL = L i .
d𝑡 L
June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 24
Sparse Tableau Analysis (iii)

Findu, i, s.t. AR iR (𝑡) + AC iC (𝑡) + AL iL (𝑡) + AV iV (𝑡) + AI iI (𝑡) = 0 ,


iR (𝑡) = GuR (𝑡) ,
iC (𝑡) = Cu′C (𝑡) ,
uL (𝑡) = Li′L (𝑡) ,
uV (𝑡) = us (𝑡) ,
iI (𝑡) = is (𝑡) ,
uR (𝑡) = A⊤R 𝜑(𝑡) ,
uC (𝑡) = A⊤C 𝜑(𝑡) ,
uL (𝑡) = A⊤L 𝜑(𝑡) ,
uV (𝑡) = A⊤V 𝜑(𝑡) ,
uI (𝑡) = A⊤I 𝜑(𝑡) .

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 25
Sparse Tableau Analysis (iii)

Findu, i, s.t. AR iR (𝑡) + AC iC (𝑡) + AL iL (𝑡) + AV iV (𝑡) + AI iI (𝑡) = 0 ,


iR (𝑡) = GuR (𝑡) ,
iC (𝑡) = Cu′C (𝑡) ,
uL (𝑡) = Li′L (𝑡) ,
uV (𝑡) = us (𝑡) ,
iI (𝑡) = is (𝑡) ,
uR (𝑡) = A⊤R 𝜑(𝑡) ,
uC (𝑡) = A⊤C 𝜑(𝑡) ,
uL (𝑡) = A⊤L 𝜑(𝑡) ,
uV (𝑡) = A⊤V 𝜑(𝑡) ,
uI (𝑡) = A⊤I 𝜑(𝑡) .

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 25
Modified Nodal Analysis: Linear elements

Plugging the equations into each other and eliminating variables:

Find 𝝋, iL , iV , such that 𝑡 ∈ ℐ

d
AC CA⊤C 𝝋(𝑡) + AR GA⊤R 𝝋(𝑡) + AL iL (𝑡) + AV iV (𝑡) = −AI is (𝑡)
d𝑡
d
L iL (𝑡) − A⊤L 𝝋(𝑡) = 0
d𝑡
A⊤V 𝝋(𝑡) = us (𝑡) .

with initial values, e.g. 𝝋0 , iL,0 , iV,0 .


where „0” denotes the zero matrix or vector. Unnecessary rows or
columns (e.g. if there are no resistors in the network) are ignored.

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(𝑡)

It can be written abstractly as a kind of differential equation

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(𝑡)

It can be written abstractly as a kind of differential equation

d
M x(𝑡) + Kx(𝑡) = r(𝑡)
d𝑡
The unknown quantity is the time-dependent vector-valued function

x(𝑡) = [𝝋⊤ (𝑡), i⊤L (𝑡), i⊤V (𝑡)]⊤ ∈ ℝ(𝑛−1)+𝑏L +𝑏V

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(𝑡)

It can be written abstractly as a kind of differential equation

d
M x(𝑡) + Kx(𝑡) = r(𝑡)
d𝑡
The unknown quantity is the time-dependent vector-valued function

x(𝑡) = [𝝋⊤ (𝑡), i⊤L (𝑡), i⊤V (𝑡)]⊤ ∈ ℝ(𝑛−1)+𝑏L +𝑏V

To determine the system state, initial value x(𝑡0 ) = x0 at time 𝑡0 is needed.

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

Parameters: inductance 𝐿 = 2 ⋅ 10−3 H, capacitance 𝐶 = 1 ⋅ 10−7 F,


conductance 𝐺 = 1S, const. voltage source 𝑢s = 0.25V and tunnel diode
(nonlinear resistor) 𝑔(𝑢) = 1.80048 − 8.766𝑢 + 10.8𝑢3 S.

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 )

Equations are given by


0 0 0 0 0 𝜑1 𝐺 −𝐺 0 0 1 𝜑1 0
⎡0 0 0 0 0⎤ ⎡𝜑 ⎤ ⎡−𝐺 𝐺 0 1 0⎤ ⎡𝜑2 ⎤ ⎡ 0 ⎤
⎢ ⎥ d ⎢ 2⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 𝐶 0 0⎥ ⎢𝜑3 ⎥ + ⎢ 0 0 𝑔(𝜑3 ) −1 0⎥ ⎢𝜑3 ⎥ = ⎢ 0 ⎥
⎢0 0 0 𝐿 0⎥ d𝑡 ⎢ 𝑖L ⎥ ⎢ 0 −1 1 0 0 ⎥ ⎢ 𝑖L ⎥ ⎢ 0 ⎥
⎣0 0 0 0 0⎦ ⎣ 𝑖V ⎦ ⎣ −1 0 0 0 0⎦ ⎣ 𝑖V ⎦ ⎣−𝑢s ⎦

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 )

Equations are given by


0 0 0 0 0 𝜑1 𝐺 −𝐺 0 0 1 𝜑1 0
⎡0 0 0 0 0⎤ ⎡𝜑 ⎤ ⎡−𝐺 𝐺 0 1 0⎤ ⎡𝜑2 ⎤ ⎡ 0 ⎤
⎢ ⎥ d ⎢ 2⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 𝐶 0 0⎥ ⎢𝜑3 ⎥ + ⎢ 0 0 𝑔(𝜑3 ) −1 0⎥ ⎢𝜑3 ⎥ = ⎢ 0 ⎥
⎢0 0 0 𝐿 0⎥ d𝑡 ⎢ 𝑖L ⎥ ⎢ 0 −1 1 0 0 ⎥ ⎢ 𝑖L ⎥ ⎢ 0 ⎥
⎣0 0 0 0 0⎦ ⎣ 𝑖V ⎦ ⎣ −1 0 0 0 0⎦ ⎣ 𝑖V ⎦ ⎣−𝑢s ⎦

𝐺 −𝐺
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

Netlist for SPICE (Simulation Program with Integrated Circuit Emphasis)


1 R N1 N2 1
2 C N3 0 0.1u
3 L N2 N3 2m
4 B N3 0 I=1.80048*v(N3)-8.766*v(N3)*v(N3)+10.8*v(N3)*v(N3)*v(N3)
5 .tran 0.01 uic
6 .backanno
7 .end

most lines define an element and its connectivity:

Type startnode (n+) endnode (n-) parameter

Command .tran defines time domain analysis (transient)


Command 0.01 defines the time interval [0, 0.01]s
Command uic enforces zero initial values

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

Kirchhoff’s laws are a special case of Maxwell’s equations

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation

Kirchhoff’s laws are a special case of Maxwell’s equations


circuits can be interpreted as directed graphs

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation

Kirchhoff’s laws are a special case of Maxwell’s equations


circuits can be interpreted as directed graphs
circuit topology is stored in netlists

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation

Kirchhoff’s laws are a special case of Maxwell’s equations


circuits can be interpreted as directed graphs
circuit topology is stored in netlists
from netlists one can easily construct the incidence matrix A

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation

Kirchhoff’s laws are a special case of Maxwell’s equations


circuits can be interpreted as directed graphs
circuit topology is stored in netlists
from netlists one can easily construct the incidence matrix A
matrix A allows to easily express Kirchhoff’s laws

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation

Kirchhoff’s laws are a special case of Maxwell’s equations


circuits can be interpreted as directed graphs
circuit topology is stored in netlists
from netlists one can easily construct the incidence matrix A
matrix A allows to easily express Kirchhoff’s laws
modified nodal analysis is a very efficient formulation

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation

Kirchhoff’s laws are a special case of Maxwell’s equations


circuits can be interpreted as directed graphs
circuit topology is stored in netlists
from netlists one can easily construct the incidence matrix A
matrix A allows to easily express Kirchhoff’s laws
modified nodal analysis is a very efficient formulation
the formulation consists of differential and algebraic equations

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation

Kirchhoff’s laws are a special case of Maxwell’s equations


circuits can be interpreted as directed graphs
circuit topology is stored in netlists
from netlists one can easily construct the incidence matrix A
matrix A allows to easily express Kirchhoff’s laws
modified nodal analysis is a very efficient formulation
the formulation consists of differential and algebraic equations
time integrators (e.g. implicit Euler) are necessary for solution

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 32
Summary Circuit Simulation

Kirchhoff’s laws are a special case of Maxwell’s equations


circuits can be interpreted as directed graphs
circuit topology is stored in netlists
from netlists one can easily construct the incidence matrix A
matrix A allows to easily express Kirchhoff’s laws
modified nodal analysis is a very efficient formulation
the formulation consists of differential and algebraic equations
time integrators (e.g. implicit Euler) are necessary for solution
in each step a (non-)linear system of equations has to be solved

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

Nonlinear problems require additional steps, e.g. Newton’s method.


1 𝐶 −𝐶 1 1
Matrix via stamp 𝑎𝑘 = [ ] = [ ] 𝐶 [1 −1] .
ℎ −𝐶 𝐶 ℎ −1

June 9, 2022 | TU Darmstadt | Fachbereich 18 | Computational Electromagnetics Group | De Gersem, Harutyunyan, Schöps | 33

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy