multipeec (3.5.2) unstable - luleå university of...

71
MultiPEEC (3.5.2) Unstable User’s Guide 2012

Upload: lamtuong

Post on 15-Mar-2018

223 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

MultiPEEC (3.5.2)

Unstable

User’s Guide

2012

Page 2: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

ii

Page 3: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

iii

Content

Chapter 1 - Introduction 3

Chapter 2 - Installing and running the program 52.1 Installing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Chapter 3 - Model creation 73.1 Input file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Geometry definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Chapter 4 - PEEC model options 134.1 .ind, Inductances and magnetic field coupling . . . . . . . . . . . . . . . 134.2 .cap, Capacitances and electric field coupling . . . . . . . . . . . . . . . . 134.3 .res, Resistances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.4 .delay, Quasi-static and full-wave modeling . . . . . . . . . . . . . . . . . 13

Chapter 5 - Simulation options 155.1 .AC analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.2 .TRAN analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.3 .mna, Circuit equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.4 .equiv, Making two nodes equivalent . . . . . . . . . . . . . . . . . . . . 165.5 .maxp, Specifying maximum number of processors to be used . . . . . . . 165.6 .thr, Defining sparsification threshold . . . . . . . . . . . . . . . . . . . . 165.7 .nodes, Export information about nodes and aliases . . . . . . . . . . . . 175.8 .node, Add an extra node in space . . . . . . . . . . . . . . . . . . . . . . 175.9 .ooc, Out-of-core simulation . . . . . . . . . . . . . . . . . . . . . . . . . 175.10 .alias, Specifying aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . 185.11 .plot, Plotting voltage and current distributions . . . . . . . . . . . . . . 185.12 .plotr, Plot in a range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.13 .mat, Printing PEEC model matrices . . . . . . . . . . . . . . . . . . . . 205.14 .optm, Optimization options . . . . . . . . . . . . . . . . . . . . . . . . . 205.15 Field, plotting radiated E- and H-fields . . . . . . . . . . . . . . . . . . . 21

Chapter 6 - External components 276.1 Ground node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.2 Current sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.3 Voltage sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.4 Piecewise Linear source . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.5 Incident field, Ei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.6 Resistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.7 Resistors, time varying . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Page 4: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

6.8 Inductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.9 Capacitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.10 Transmission lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.11 Probes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Chapter 7 - Examples 357.1 Transmission line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.2 λ/2 - Dipole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387.3 Parallel plate capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Chapter 8 - Troubleshooting 458.1 Error messages from kernel . . . . . . . . . . . . . . . . . . . . . . . . . . 458.2 Design errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

A NA- and MNA- formulations 49

B Dielectric materials in the time domain 592.1 Modified nodal analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592.2 Nodal analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

C Post-processing in ParaView 61

Page 5: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Contact information

Jonas EkmanLulea University of Technology, EISLAB Phone: +46-920-492828971 87 Lulea Email: [email protected]

Jerker DelsingLulea University of Technology, EISLAB Phone: +46-920-491898971 87 Lulea Email: [email protected]

Danesh DarouiLulea University of Technology, EISLAB Phone: +46-920-492451971 87 Lulea Email: [email protected]

v

Page 6: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

vi

Page 7: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

List of Figures

3.1 Cube with divisions divxyz = 1, 0, 0 resulting in a 1D PEEC modelwith 1 volume cell and 2 surface cells. Rings indicate nodes. a) X-directedvolume cell partition. b) Surface cell partition. . . . . . . . . . . . . . . . 8

3.2 Cube with divisions divxyz = 1, 1, 0 resulting in a 2D PEEC modelwith 2 volume cell and 4 surface cells. Rings indicate nodes. a) X-directedvolume cell partition. b) Y-directed volume cell partition. c) Surface cellpartition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.3 Cube with divisions divxyz = 2, 2, 1 resulting in a 3D PEEC model with35 volume cell and 42 surface cells. Rings indicate nodes. a) X-directedvolume cell partition. b) Y-directed volume cell partition. c) Z-directedvolume cell partition. d) Surface cell partition. . . . . . . . . . . . . . . . 10

3.4 Unit cube showing vertex ordering. . . . . . . . . . . . . . . . . . . . . . 11

5.1 Plot of transmission line simulation in MATLAB. . . . . . . . . . . . . . 195.2 The spherical coordinate system. . . . . . . . . . . . . . . . . . . . . . . 225.3 Distribution of field points when specifying (a) Field testField5 e h

sphere 10 0 0 300 36 0 360 18 0 180 and (b) the first five Field-examples above (testField1 to testField5). . . . . . . . . . . . . . . . . . 23

5.4 Distribution of field points when specifying: Field testplane e h plane

-300 -300 0 300 -300 0 300 300 0 10 600 10 600. . . . . . . . . . . 25

6.1 Pulse function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286.2 Gaussian pulse function. . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.3 Smooth step function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.4 Transmission line as two-port network . . . . . . . . . . . . . . . . . . . 33

7.1 Transmission line consisting of two conductors. . . . . . . . . . . . . . . . 357.2 Transmission line results with comparison to SPICE. . . . . . . . . . . . 377.3 Dipole. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387.4 Dipole results with comparison to analytical result. . . . . . . . . . . . . 407.5 Parallel plat capacitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417.6 Capacitor result in (a) the time domain and (b) for the frequency domain. 43

8.1 Correct design with Node-to-Node rule satisfied. . . . . . . . . . . . . . . 468.2 Wrong design where Node-to-Node rule is not followed. . . . . . . . . . . 468.3 Correct design where all parts are discretized in same level. . . . . . . . . 47

vii

Page 8: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

List of Figures 1

8.4 Wrong design where some parts have different discretization level. . . . . 47

1.1 Three conductor geometry with numbered nodes indicated by white circles. 501.2 Three conductor geometry with volume cell partitions α, β, and γ. . . . . 501.3 Three conductor geometry with surface cell partitions 1 to 6. . . . . . . . 511.4 A PEEC one-cell used in the development of the Admittance method cir-

cuit equations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

3.1 ParaView main window. . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Page 9: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

2

Page 10: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Chapter 1

Introduction

3

Page 11: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

4 Introduction

Page 12: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Chapter 2

Installing and running the program

2.1 Installing

Since the code is delivered as an executable, at this point in time, no installation in-structions are necessary. However, when the source code is delivered, all installationinstructions are located in the peec/INSTALL-file.

2.2 Running

There are several switches that can be used to solve a problem, get extra information orexport debug data.

2.2.1 -o

This switch will define the name of the output file. If the solver is run without using thisswitch, the default output file name peec.m will be assumed.

./peec input file name -o output file name

2.2.2 -m

Using this switch, solver will calculate elementary matrices including Inductance andCoefficient of Potential matrices and will store them on disk without solving the problem.This is useful to speed up the solving process when just simulation options such as sources,time or frequency steps, etc. are changed. In order to take advantage of stored data onthe disk, the -s switch should be used to load stored matrices, without re-calculation. Ifno path is specified, the matrices will be saved on the current path.

./peec input file name -m [path]

5

Page 13: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

6 Installing and running the program

2.2.3 -s

Using this switch, solver will load matrices which are stored on disk instead of calculating.The solver will search for previously stored matrices in the specified path. If no path isspecified, then the current path will be searched. If not output filr is specified, the namepeec.m will be used for output file as default file name. There is a built-in validationmechanism which will validate stored files and if loading process is unsuccessful, thematrices will be re-calculated automatically in normal way.

./peec input file name -s [path] output file name

2.2.4 -c

This switch will enable caching feature in MultiPEEC. In this case, the solver will lookthrough the path for pre-calculated matrices. If the search was successfull, the matriceswill not re-calculated and will simply read from the disc, otherwise they will be calculatedas usual. The solver is smart enough to find out if there has been any change in the modelwhich will cause the need to update matrices, even if they are already found on the disc.Any re-calculated matrices, will also be cached on the disc.

./peec input file name -c [path] output file name

2.2.5 -f

The solver recalculates only field values according to the field probes in the input file,when this option is used. For the first time, an intermediate file should be specifiedwhere the information of the solution is stored on the disk. Further simulations can becarried out by entering the name of this intermediate file. If such a file exists, the datawill be read and field data will be produced, according to the field probes in the inputfile, otherwise, the whole solution will be calculated again. The user should make surethat nothing than field generating configuration is not altered in the input file. Anyother changes in the input file will make the cached solution invalid and hence the newlygenerated information about the fields will be incorrect.

./peec input file name -c field data file name [output field directory name]

2.2.6 -v

Using this switch the solver will analyze the input file and export a VTK file which canbe opened in ParaView program. This file is useful to debug the model and check it ina 3D environment by using ParaView’s features. The exported model will contain thesolid geometry with meshing lines and node points.

./peec input file name -v output VTK file name

2.2.7 -ver

Extra information will be shown, including release date, version number , etc.

Page 14: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Chapter 3

Model creation

3.1 Input file

The input file contains the code written in MultiPEEC scripting language. MultiPEECscripting language is a case-sensitive, structured and strong type language which meansthat all variables should be defined before they are used and the structure of the wholeprogram e.g. order of instructions is important. A MultiPEEC’s input file is divided intofour sections:

1. Geometry definition, Sec. 3.2

2. External component definition, Sec. 6.2.

3. Simulation options, Sec. 5.1.

4. PEEC model options, Sec. 4.1.

Each line represents a command and is terminated by an end-of-line character ‘\n’ or theline-comment-character ‘#’.

3.2 Geometry definition

The line of the input file contains a count over the number of hexahedral objects describedin the input file according to:

number_of_bars <nr_bars>

3.2.1 Manual meshing

The second part of the geometry definition in the input file can contain the meshing ofthe following objects according to:

ndiva <ndiv> [<res> <ra>] ndivb <ndiv> [<res> <rb>] ndivc <ndiv> [<res> <rc>]

7

Page 15: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

8 Model creation

the ndiv:s given in the input file details how many sub-divisions of the objects should beutilized. Figures 3.1 - 3.3 shows a few examples of the discretization generated by theactual discretization code. A cube stands as a model although any hexahedral objectwould work just as fine.28 Implementation

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

a)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1−0.5

0

0.5

1

1.5

XY

Z

PSfrag replacements

b)

Figure 3.3: Cube with divisions divx,y,z = 1, 0, 0 resulting in a 1D PEEC model with 1 volume cell and 2surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Surface cell partition.

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

a)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

b)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1−0.5

0

0.5

1

1.5

XY

Z

PSfrag replacements

c)

Figure 3.4: Cube with divisions divx,y,z = 1, 1, 0 resulting in a 2D PEEC model with 2 volume cell and 4surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Y-directed volume cell partition. c)Surface cell partition.

(a) (b)

Figure 3.1: Cube with divisions divxyz = 1, 0, 0 resulting in a 1D PEEC model with 1 volumecell and 2 surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Surfacecell partition.

The pair [<res> <r>] which comes after each ndiv is an optional pair where <res>

is a reserved value so far and need to be set as 1 and <r> is ratio of discretization of ndivwhich is used when non-uniform meshing is applied to the model.

3.2.2 Automatic meshing

The code supports automatic meshing in the sense that the number of subdivisions arecalculated depending on the frequency content in the excitation waveforms. However,the automatic meshing routine does not match nodes for touching objects.

3.2.3 Conductor & dielectric objects/hexahedrals

The third part of the geometry definition contains the material and geometrical infor-mation for a mixed dielectric and conductor geometry. This information is given in tworows for each hexahedral according to

.cs sigma value

.bz p1xyx p2xyz p3xyz p4xyz p5xyz p6xyz p7xyz p8xyz

for conductors, and according to

Page 16: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

3.2. Geometry definition 9

28 Implementation

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

a)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1−0.5

0

0.5

1

1.5

XY

Z

PSfrag replacements

b)

Figure 3.3: Cube with divisions divx,y,z = 1, 0, 0 resulting in a 1D PEEC model with 1 volume cell and 2surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Surface cell partition.

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

a)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

b)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1−0.5

0

0.5

1

1.5

XY

Z

PSfrag replacements

c)

Figure 3.4: Cube with divisions divx,y,z = 1, 1, 0 resulting in a 2D PEEC model with 2 volume cell and 4surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Y-directed volume cell partition. c)Surface cell partition.

(a) (b)

28 Implementation

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

a)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1−0.5

0

0.5

1

1.5

XY

Z

PSfrag replacements

b)

Figure 3.3: Cube with divisions divx,y,z = 1, 0, 0 resulting in a 1D PEEC model with 1 volume cell and 2surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Surface cell partition.

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

a)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

b)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1−0.5

0

0.5

1

1.5

XY

Z

PSfrag replacements

c)

Figure 3.4: Cube with divisions divx,y,z = 1, 1, 0 resulting in a 2D PEEC model with 2 volume cell and 4surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Y-directed volume cell partition. c)Surface cell partition.

(c)

Figure 3.2: Cube with divisions divxyz = 1, 1, 0 resulting in a 2D PEEC model with 2 volumecell and 4 surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Y-directedvolume cell partition. c) Surface cell partition.

.cs epsilon_er value

.bz p1xyx p2xyz p3xyz p4xyz p5xyz p6xyz p7xyz p8xyz

for dielectrics. Above, the pnxyz are the eight vertices of a hexahedral. The coordinatesmust be given according to the numbering in Fig. 3.4.

An example for a 5 cm long (x), 2 cm wide (y), and 1 cm thick copper conductorstarting at (0,0,0) would be given as:

.cs sigma 574e6

.bz 0 0 0 5 0 0 0 2 0 5 2 0 0 0 1 5 0 1 0 2 1 5 2 1

Another example for a 1 cm long (x), 3 cm wide (y), and 2 cm thick dielectric block(εr=4.3) would be given as

.cs epsilon_er 4.3

.bz 0 0 0 1 0 0 0 3 0 1 3 0 0 0 2 1 0 2 0 3 2 1 3 2

This conclude the geometry definition in the input file and the next section detailsPEEC model options, Ch. 4.1, followed by Simulation options, Ch. 5.1.

Page 17: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

10 Model creation

3.4. Discretization 29

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

a)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

b)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1

0

0.2

0.4

0.6

0.8

1

X

Y

Z

PSfrag replacements

c)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

d)

Figure 3.5: Cube with divisions divx,y,z = 2, 2, 1 resulting in a 3D PEEC model with 35 volume cell and 42surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Y-directed volume cell partition. c)Z-directed volume cell partition. d) Surface cell partition.

(a) (b)

3.4. Discretization 29

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

a)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

b)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

1

0

0.2

0.4

0.6

0.8

1

X

Y

Z

PSfrag replacements

c)

00.2

0.40.6

0.81

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

XY

Z

PSfrag replacements

d)

Figure 3.5: Cube with divisions divx,y,z = 2, 2, 1 resulting in a 3D PEEC model with 35 volume cell and 42surface cells. Rings indicate nodes. a) X-directed volume cell partition. b) Y-directed volume cell partition. c)Z-directed volume cell partition. d) Surface cell partition.

(c) (d)

Figure 3.3: Cube with divisions divxyz = 2, 2, 1 resulting in a 3D PEEC model with 35volume cell and 42 surface cells. Rings indicate nodes. a) X-directed volume cell partition. b)Y-directed volume cell partition. c) Z-directed volume cell partition. d) Surface cell partition.

Page 18: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

3.2. Geometry definition 11

26 Implementation

Based on these criteria four packages where selected for evaluation: PETSc [14], GMM++ [15], SuperLU[16] and Intel MKL [17]. Based on the criteria in Table 3.2 the package chosen was PETSc.

A few auxiliary helper routines was written for PETSc in files petsc wrapper.h,cpp.

3.3 Input file parsing

The parser, implemented in the files parser.h,cpp, reads a file in the form described in AppendixA. The geometrical data, conductors or “bars”, are put into objects of type Bar. In addition to puregeometrical input, external components, simulation options and PEEC model complexity options can bedefined. All external components are implemented in the file component.h and inherit from the abstractbase class Component. At least two components are needed for any kind of meaningful simulation, anexcitation source (CurrentSource/VoltageSource) and at least one Probe. The class SimulationProfile,located in file simprofile.h, contains the simulation domain (time or frequency), frequency or timespan, number of sample points, options to select solver type, and excluding partial elements from thedefault (Lp,P,R)PEEC model.

3.4 Discretization

“Bars”, parsed from the input file are discretized into VolumeCell:s and SurfaceCell:s, located in cells.h.The discretization routines are still located in parser.h,cpp.

The “Bar” is a geometric object with eight vertices and six faces known as a hexahedron. In theorthogonal case this corresponds to a rectangular conductor. These objects need to be subdividedinto volume and surface cells in order to calculate partial elements (coefficients of potential/partialinductance). The subdivision scheme could potentially be automated but currently the user has toselect divisions for each object and for each axis (X, Y and Z).

The algorithm employed works by transforming local coordinates, or weights in the range [−1..1],together with eight base vectors for each object, to global coordinates, similar to [18]. The base vectorsare calculated as

p1

p2

p3 p

4

5p

p6

7p p

8

z

x

y

Figure 3.2: Unit cube showing vertex orderingFigure 3.4: Unit cube showing vertex ordering.

Page 19: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

12 Model creation

Page 20: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Chapter 4

PEEC model options

4.1 .ind, Inductances and magnetic field coupling

To include or exclude magnetic field coupling in the calculations the following option isused;

.ind yes|no

4.2 .cap, Capacitances and electric field coupling

To include or exclude electric field coupling in the calculations the following option isused;

.cap yes|no

4.3 .res, Resistances

To include or exclude volume cell resistances in the calculations the following option isused;

.res yes|no

4.4 .delay, Quasi-static and full-wave modeling

To account for the actual phase shift or time delay in the electromagnetic couplings theoption .delay yes cc is used. This result in a (Lp,P ,R,τ)PEEC model, often entitleda full-wave PEEC model, and require:

• all the partial inductance couplings (Lp-matrix = magnetic field couplings) andcoefficient of potential couplings (p-matrix = electric field couplings) to be updatedfor each frequency for .AC-simulation,

13

Page 21: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

14 PEEC model options

• a history file for past node voltages and volume cell currents up to some specificpoint in time to account for time delayed electromagnetic field couplings for .TRAN-simulation.

The full-wave models are in general more demanding from simulation point of viewdue to the increasing time complexity (for .AC-simulation) and the problem with latetime instability (for .TRAN-simulation), see further [1, 2, 3, 4, 5].

To perform a quasi-static simulation the option .delay no cf is used.

Page 22: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Chapter 5

Simulation options

5.1 .AC analysis

Performs a frequency domain analysis for a defined set of frequencies specified accordingto;

.AC LIN|LOG <sample_points> <freq_start> <freq_stop>

where you can define a linear sample space by using LIN keyword or a logarithmicallysample space by using LOG keyword.

5.2 .TRAN analysis

Performs a transient (time domain) analysis between time start and time stop bydefining;

.TRAN <sample_points> <time_start> <time_stop>

where <sample points> define the time step.

5.3 .mna, Circuit equations

By using the .mna-option, the user can decide which formulation of circuit equation isused by the kernel. The following options are available;

• .mna no

Uses the Nodal Analysis (NA) method to formulate the circuit equations. This isa compact formulation in which only node voltages are calculated and volumecell-currents can be calculated in a post-processing step. The frequency domain formu-lation is:

V =[(AT (R + jωL− jω−1Ce)

−1)A + jω(RvT P−1 Rv) + YL

]−1IS. (5.1)

15

Page 23: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

16 Simulation options

The NA method can not be used for the formulation of full-wave, time-domaincircuit equations (= not in conjunction with the .delay yes option).

• .mna yes

Uses the Modified Nodal Analysis (MNA) method [7, 8] to formulate the circuitequations. This more general formulation of circuit equations solves for both nodalvoltages and volume cell currents at the same time. The frequency domain formu-lation is: −A −(R + jωL)

jωP−1 + YL −AT

V

IL

=

VS

IS

(5.2)

The NA- and MNA- formulations are further discussed in App. A

5.4 .equiv, Making two nodes equivalent

This command is used to make two different nodes equivalent. If this command is used,equivalent nodes will exactly act as a single node where can be connected to other nodes orlumped elements or even being probed. Each node can be represented by its coordinatesor its corresponding alias name which should be defined before in the .inp-file. Thesyntax is the following:

.equiv <alis_name>|<x y z> <alis_name>|<x y z>

5.5 .maxp, Specifying maximum number of proces-

sors to be used

Using this command one can define maximum number of processors that will be allocatedby the solver to solve a problem. If this option is not used or the defined number is greaterthan all processors on a system, the solver will automatically use all available processingunits on the machine. The syntax is the following:

.maxp n

5.6 .thr, Defining sparsification threshold

For quasi-static MNA solver in frequency domain, when only resistance and inductivecouplings are used (capacitive couplings are ignored), it is possible to define a thresholdvalue. This threshold will control the sparsification of the reluctance matrix K, whereK = L−1P and Lp is the inductance matrix as each element that has a coupling factor δij,which is smaller than the defined threshold will be eliminated. The coupling factor ofeach element is calculated as shown in (5.3).

Page 24: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

5.7. .nodes, Export information about nodes and aliases 17

δij =

√Kij

2

|Kii|.|Kjj|(5.3)

The threshold value is between 0 and 1 where 0 means no sparsification and 1 meansfull sparsification. It should be noted that when no sparsification is applied, the exactsolution will be retrieved while with full sparsification only diagonal terms of the reluc-tance matrix will be saved which leads to the maximum level of approximation. Thesyntax of this command is:

.thr n

where n is a real number between 0 and 1.

5.7 .nodes, Export information about nodes and aliases

This command will export node number, corresponding geometrical coordinate in 3Dspace and alias assigned to that node, if defined any, in a text file. The command use isas below:

.nodes all|aliases <file name>

where all will export all nodes and aliases will export only nodes which are identifiedby a previously defined alias. The index if the nodes is zero-based.

5.8 .node, Add an extra node in space

This command creates a node at given coordinate. Newly created node, can later usedas a point to connect lumped elements to each other or directly connected to other barsusing transmission line or lumped elements. Using the following syntax a single isolatednode will be created in space at defined coordinate:

.node <point_name> <x y z>

5.9 .ooc, Out-of-core simulation

This command will specify whether in-core or out-of-core solution will be performedwhen reluctance solver is invoked:

.ooc yes|no

It should be noted that in-core solution will need more memory but it will be faster.Out-of-core solution will instead write the factorized matrices on the disk to save memoryand therefore will be slower while the memory usage will be reduced.Warning: using out-of-core simulations can make the solution extremely slow due to verylarge blocks of data which should be written/read to/from the disk.

Page 25: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

18 Simulation options

5.10 .alias, Specifying aliases

To simplify the handling of coordinates in the .inp-file, the .alias-command is helpful.This command allows to name specific coordinates that are used at multiple locations inthe .inp-file. The syntax is the following:

.alias <point_name> <x y z>

For an example on how to use aliases, consider the dipole example in Sec. 7.2.

5.11 .plot, Plotting voltage and current distributions

By using this command the results of simulation can be plotted in different ways whichare described below, using the following syntax:

.plot mat|fields|V|I|ID

where V will enable voltage distribution plotting, I volume cell current distribution plot-ting, ID volume cell current density distribution plotting, fields for plotting fields andby using mat command all PEEC model node voltages and volume cell currents are savedin an PEEC output file name plot file. Please note that MATLAB 1 is needed toopen this file.

Place this comment just before or just after the .mat-command. Or, if .mat is notpresent, just before the .END-command.

The PEEC output file name plot is plotted in MATLAB by writing:

>> PEEC output file name_plot(index, useColMaxMin, azimuth, elevation, withEdge)

where:

index - is the index of the sample for which you want to plot the results,

useColMinMax - is a boolean switch to specify if the colors in the color-scale represent only thevoltages calculated for the plotted sample or represent the whole values assumedby voltages,

azimuth - is the azimuth value for the point of view,

elevation - is the elevation value for the point of view,

withEdge - is a boolean switch to plot the cells with or without the black bounding edge.

It is possible to use:

>> help PEEC output file name_plot

1MATLAB is a registered trademark of the MathWorks Inc.

Page 26: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

5.12. .plotr, Plot in a range 19

to obtain the same type of information as above.As an example, by inserting the following line:.plot mat V IBefore .END in the .inp-file for the transmission line in Section 7.1, the following

figure is produced by writing:

PEEC output file name_plot(50, 1, 1, 1, 1);

0

1

2

3

4

5

−3−2

−10

12

3

X

Voltages and currents at time 2.4525e−010 s (index=50)

Y

Z

−0.0824293

−0.0494576

−0.0164859

0.0164859

0.0494576

0.0824293

Figure 5.1: Plot of transmission line simulation in MATLAB.

The figure shows all the node voltages and volume cell currents for the transmissionline. But since the width of the transmission line is only 0.002 cm, the correspondingvolume cells are too small to be seen and only the current vectors are visible.

5.12 .plotr, Plot in a range

By using this command, only selected points in the range of solution will be plotted.If the user puts a sampling point which does not exactly match a point in the solutionrange, the postprocessor will choose the closest sampling point to the specified point.Please aware that when .plotr is used, .plot command should be defined earlier so thepostprocessor knows what kind of data should be plotted.

.plotr <number of samples> <list of sampling points>

Page 27: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

20 Simulation options

5.13 .mat, Printing PEEC model matrices

With this command, PEEC model matrices can be written to a file by using:

.mat <file name> <Lp|P|R|Cm|Rv|Pnorm|SYS>

where:

Lp - Partial inductance matrix,

P - Coefficient of potential matrix,

R - Volume cell resistances (vector),

Cm - Connectivity matrix which contains information about nodes and their connectiontogether,

Rv - Node reduction matrix which contains information about nodes and their connec-tion together after reduction process is done. Reduction process will reduce numberof nodes as much as possible by removing overlapping nodes,

Pnorm - Normalized coefficients of potential matrix,

SYS - System coefficient matrix which is the matrix of lumped elements when NodalAnalysis is used or main M matrix with four independent quadrants when ModifiedNodal Analysis is used.

and file name is the file to which the specified matrices are written.This works both in the time- and frequency- domain and for quasi-static and full-wave

modeling. For full-wave modeling, the specified matrices are written for each frequencysample.

Note! The .mat-command has to be just before the .END statement in the .inp-file.

5.14 .optm, Optimization options

Using this switch, the solution can be optimized based on memory usage, speed or byleaving it to the solver to decide. The option can be activated using:

.optm mem | spd | auto

where:

mem - Memory optimization,

spd - Speed optimization,

auto - Automatic optimization. The solver will decide whether memory or speed opti-mization should be used.

Page 28: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

5.15. Field, plotting radiated E- and H-fields 21

5.15 Field, plotting radiated E- and H-fields

With this command, E- and H-fields from PEEC model can be plotted using for exampleParaView. Information on the radiated fields are saved in a directory with the namefield in the vtk-subdirectory specified by the -o outfilename statement. For specifyingthe points for which fields will be saved, the spherical coordinate system is used, see Fig.5.2.

For plotting fields in a sphere around an object specify:

Field <name> e|h|e_h sphere c.x c.y c.z r phDiv phMin phMax thDiv thMin thMax

where:

name - Is the unique name for the field,

e - Means to plot electric fields,

h - Means to plot magnetic fields,

e h - Means to plot electric and magnetic fields,

c.x - Is the x coordinate for the center of the sphere,

c.y - Is the y coordinate for the center of the sphere,

c.z - Is the z coordinate for the center of the sphere,

r - Is the radius of the sphere,

phDiv - number of divisions for φ,

phMin - minimum number for φ,

phMax - maximum number for φ,

thDiv - number of divisions for θ,

thMin - minimum number for θ,

thMax - maximum number for θ.

For example:

• Field testField1 e h sphere 10 0 0 300 37 0 360 1 90 90

Gives a plot for the electric and magnetic field in points on a circle in the x-y-planewith center in (10,0,0) and radius 300.

• Field testField2 e h sphere 10 0 0 300 1 0 0 45 0 180

Gives a plot for the electric and magnetic field in points on a circle in the halfx-z-plane with center in (10,0,0) and radius 300.

Page 29: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

22 Simulation options

• Field testField3 e h sphere 10 0 0 300 1 180 180 45 0 180

Gives a plot for the electric and magnetic field in points on a circle in the secondhalf x-z-plane with center in (10,0,0) and radius 300.

• Field testField4 e h sphere 10 0 0 300 1 90 90 45 0 180

Gives a plot for the electric and magnetic field in points on a circle in the halfy-z-plane with center in (10,0,0) and radius 300.

• Field testField5 e h sphere 10 0 0 300 1 270 270 45 0 180

Gives a plot for the electric and magnetic field in points on a circle in the secondhalf y-z-plane with center in (10,0,0) and radius 300.

• Field testField6 e h sphere 10 0 0 300 36 0 360 18 0 180

Gives a plot for the electric and magnetic field in points on a sphere with center in(10,0,0) cm and radius 300 cm for 36 points in the φ-direction and for 18 points inthe θ-direction. The resulting distribution of field points is shown in Fig. 5.3.

Figure 5.2: The spherical coordinate system.

Page 30: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

5.15. Field, plotting radiated E- and H-fields 23

(a) (b)

Figure 5.3: Distribution of field points when specifying (a) Field testField5 e h sphere

10 0 0 300 36 0 360 18 0 180 and (b) the first five Field-examples above (testField1 totestField5).

Page 31: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

24 Simulation options

The second field option is to plot fields in a square plane around an object. In theplane syntax we have to specify three point (p0, p1, p2) to locate the plane. Then wedefine the x- and y-axes in this way:

• the direction p1-p0 is the x axis;

• the component of p2-p0 orthogonal to the x axes is the y axes;

• p0 is the origin of the axis.

After doing this, we can define a rectangle that has the side along the x axes ”xL” cmlong and the side along the y axes ”yL” cm long. xD and yD are the number of divisionsto use along the sides to draw a rectangular grid. This parameters is specified as:

Field <name> e|h|e_h plane p0x p0y p0z p1x p1y p1z p2x p2y p2z xD xL yD yL

where:

name - Is the unique name for the field,

e - Means to plot electric fields,

h - Means to plot magnetic fields,

e h - Means to plot electric and magnetic fields,

p0x - Is the x coordinate for point 0,

p0y - Is the y coordinate for point 0,

p0z - Is the z coordinate for point 0,

p1x - Is the x coordinate for point 1,

p1y - Is the y coordinate for point 1,

p1z - Is the z coordinate for point 1,

p2x - Is the x coordinate for point 2,

p2y - Is the y coordinate for point 2,

p2z - Is the z coordinate for point 2,

xD - Number of divisions along the x-axis,

xL - Plane length along the x-axis,

yD - Number of divisions along the y-axis,

yL - Plane length along the y-axis.

Page 32: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

5.15. Field, plotting radiated E- and H-fields 25

For example:

• Field testplane e h plane -300 -300 0 300 -300 0 300 300 0 10 600 10 600

Gives a plot for the electric and magnetic field in the plane in Fig. 5.4.

Figure 5.4: Distribution of field points when specifying: Field testplane e h plane -300

-300 0 300 -300 0 300 300 0 10 600 10 600.

The third field option is to plot fields in a single point around an object. This isdone by specifying:

Field <name> e|h|e_h point p.x p.y p.z

Several Field commands can be used in the same inp-file.

Page 33: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

26 Simulation options

Page 34: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Chapter 6

External components

6.1 Ground node

The user can use an ideal circuit ground node in the .inp-files similar to the use of thenode 0 (zero) in SPICE-like solvers. The ideal ground node is entitle gnd, and not 0,to avoid mix up with PEEC model coordinates. The ideal circuit ground node can beused with the following external components: current and voltage sources, resistors (bothstatic and time varying), inductors, capacitors, and transmission lines as detailed furtherin this section.

6.2 Current sources

In the .inp-file you can specify a current source with the following syntax:

I <name> <x1 y1 z1>|gnd <x2 y2 z2>|gnd AC <amp> <phase> <time_function>

where <amp> is the AC current amplitude, <phase> is the AC phase, when frequencydomain analysis is chosen. For frequency domain simulations, no <time function>

needs to be defined. For time domain simulations, only <time function> needs to bedefined, but for some compatibility issues, the whole expression above should exist, while<amp> and <phase> can be left as zero. <time function> can be one of the following:

• PULSE(v1, v2, td, tr, tf, pw, per)

which is a pulse function with the following parameters:

v1 - initial current amplitude,

v2 - maximal current amplitude,

td - initial time delay,

tr - pulse rise time,

tf - pulse fall time,

27

Page 35: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

28 Components

pw - pulse width,

per - period.

which is illustrated in Fig. 6.1.

50 Input file specification

td tr pw tf

v2

v1

period

a)

A

sigma

td

b)

td tr

v2

v1

c)

Figure 1.1: Time function diagrams: a) PULSE – Periodic Pulse function. b) GPULSE – Gaussian Pulsefunction. c) SSTEP – Smooth Step function.

Figure 6.1: Pulse function.

• GPULSE(A, sigma, td)

f(t) = Ae−(t−tdσ

)2

which is a Gaussian pulse function with the following parameters:

A - maximal current amplitude,

sigma - rise time,

td - initial time delay.

which is illustrated in Fig. 6.2.

• SSTEP(v1, v2, td, tr)

which is a smooth step function with the following parameters:

v1 - initial current amplitude,

v2 - maximal current amplitude,

td - initial time delay,

tr - rise time.

which is illustrated in Fig. 6.3.

Page 36: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

6.2. Current sources 29

50 Input file specification

td tr pw tf

v2

v1

period

a)

A

sigma

td

b)

td tr

v2

v1

c)

Figure 1.1: Time function diagrams: a) PULSE – Periodic Pulse function. b) GPULSE – Gaussian Pulsefunction. c) SSTEP – Smooth Step function.

Figure 6.2: Gaussian pulse function.

50 Input file specification

td tr pw tf

v2

v1

period

a)

A

sigma

td

b)

td tr

v2

v1

c)

Figure 1.1: Time function diagrams: a) PULSE – Periodic Pulse function. b) GPULSE – Gaussian Pulsefunction. c) SSTEP – Smooth Step function.

Figure 6.3: Smooth step function.

• COS(offset, td, A, f, phase)

which is a Cosine function with the following parameters:

offset - DC offset,

td - initial time delay,

A - maximal current amplitude,

f - frequency,

phase - phase of the wave.

• SIN(offset, td, A, f, phase)

which is a Sine function with the following parameters:

offset - DC offset,

td - initial time delay,

Page 37: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

30 Components

A - maximal current amplitude,

f - frequency,

phase - phase of the wave.

• STRIKE(C, a, b)

f(t) = C(e−at − e−bt)which is a Strike function with the following parameters:

C - maximal current amplitude,

a - time coefficient,

b - time coefficient.

6.3 Voltage sources

To excite the structure using voltage sources, the same syntax as for current sources areused except for the first letter that has to be a V instead of a I.

Voltage sources can only be used with the MNA method. If voltage sources arespecified with the NA method, the solver will revert to MNA and print a warning on thescreen.

6.4 Piecewise Linear source

Defines a piecewise linear (PWL) transfer function which reads data either directly fromthe input file or an external file. The PWL function can be defined as a voltage or currentsource and the syntax is:

I | V <name> <x1 y1 z1>|gnd <x2 y2 z2>|gnd AC <amp> <phase> <data | filename>

where the data part consists of a list of pairs in the form of (t, v) where t is the sampletime and v indicates the value of the source at that time. As an example, the voltagesource with the pulse function below:

V Vin P0_in P0_out AC 1.0 0.0 PULSE(0 1 3e-6 1e-6 2e-6 3e-6 100e-6)

can be translated directly into equivalent PWL format:

V Vin P0_in P0_out AC 1.0 0.0 PWL(3e-6 0 4e-6 1 7e-6 1 9e-6 0)

or referred to an external file data.pwl

V Vin P0_in P0_out AC 1.0 0.0 PWL(data.pwl)

where the contents of the data file will be:

PWL(3e-6 0 4e-6 1 7e-6 1 9e-6 0)

The external data file is specially useful when number of sample points is large. Itshould be noted that the data file and the input file should exactly be in the samedirectory.

Page 38: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

6.5. Incident field, Ei 31

6.5 Incident field, Ei

The structure(s) can be excited by an externally applied electric field, Ei. This optioncan be used with any other current and/or voltage source for exciting the structures. Inthe .inp-file you specify the incident field with the following syntax:

Ei <name> <prop_vec> E0_vec <f0> <P0> <module_function>

where <prop vec> is the the propagation vector described with one of the following:

• p tD φ θ

• p tR φ θ

• xyz Kx Ky Kz

where p tD is used for specifying φ and θ in deg., and p tR is using radians. The <E0 vec>

is the E0 vector described with one of the following:

• p t φ θ

• xyz Ex Ey Ez

and <f0> is the frequency of the excitation, <P0> is a point laying in the plane fromwhich the wave starts, and <module function> is a function that specify the module ofthe wave.

Example 1: Ei field xyz 1 0 0 xyz 0 1 0 f0 -1 0 0 PULSE(...) will createfield starting form the point (-1,0,0), traveling in the (1,0,0) direction (x-axis) with thefield oscillating along the y-axis at the frequency f0.

Example 2: Ei field xyz 0 0 1 xyz 1 1 0 f0 0 0 -1 PULSE(...) Here thefield oscillates at 45 on the xy-plane and the wave moves along the z-axis.

6.6 Resistors

In the .inp-file you can specify a resistor with the following syntax:

R <name> <x1 y1 z1>|gnd <x2 y2 z2>|gnd <value>

where resistor-<value> is given in Ω (Ohm).

6.7 Resistors, time varying

In the .inp-file you can specify a time varying resistor with the following syntax:

R_tvar <name> <x1 y1 z1>|gnd <x2 y2 z2>|gnd <value_time_function>

where resistor-<value-time-function> is either the PULSE or SSTEP command from Sec.6.2.

If a resistor value above 1 GΩ is given, the program will interpret this as an opencircuit.

Page 39: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

32 Components

6.8 Inductors

In the .inp-file you can specify an inductor with the following syntax:

L <name> <x1 y1 z1>|gnd <x2 y2 z2>|gnd <value>

where inductor-<value> is given in Henry.

6.9 Capacitors

In the .inp-file you can specify a capacitor with the following syntax:

C <name> <x1 y1 z1>|gnd <x2 y2 z2>|gnd <value>

where capacitor-<value> is given in Farad.

6.10 Transmission lines

In the .inp-file you can specify a transmission line component in the same section whereyou find the resistors, generators, etc. The basic syntax is the following:

T <name> <x1 y1 z1>|gnd <x2 y2 z2>|gnd <x3 y3 z3>|gnd <x4 y4 z4>|gnd

Then, on the same line, you have to specify the parameters of the line. This is donedepending on analysis in the time or frequency domain.

6.10.1 Frequency domain

Transmission line parameters are specified for frequency domain analysis using the fol-lowing syntax:

L <value> C <value> R <value> G <value> len <line_length>

For the frequency domain, a two-port network model is used, seen in Fig. 6.4, whichis described by the following formula:[

V1I1

]=

[A BC D

]·[V2I2

](6.1)

By defining

Zc =

√R′ + jωL′

G+ jωC ′(6.2)

andγ =

√(R′ + jωL′) (G+ jωC ′). (6.3)

The network parameters areA = cosh (γ · length) (6.4)

Page 40: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

6.10. Transmission lines 33

Figure 6.4: Transmission line as two-port network

B = Zc sinh (γ · length) (6.5)

C =1

Zc sinh (γ · length)(6.6)

D = A (6.7)

Then, the relation between port voltages and port current are[I1I2

]=

[Y11 Y12Y21 Y22

]·[V1V2

](6.8)

where

Y11 = Y22 =A

B

Y12 = Y12 = − 1

B.

These admittances are then incorporated in the admittance matrix in both the nodalanalysis and modified nodal analysis systems.

6.10.2 Time domain

Transmission line parameters are specified for time domain analysis using the followingsyntax:

Z0 <value of Z0> td <time delay of the line>

The order in which you specify the parameters is not important, so you can writethem in any order. The units used are the standard ones (Ohm, Farad, Henry, sec,meters, etc...)

The transmission line equations in the time domain areV1(t)− Z0I1(t)=V2(t− td) + Z0I2(t− td)V2(t)− Z0I2(t)=V1(t− td) + Z0I1(t− td) (6.9)

Page 41: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

34 Components

which can be written as 1Z0V1(t)=I1(t) + 1

Z0V2(t− td) + I2(t− td)

1Z0V2(t)=I2(t) + 1

Z0V1(t− td) + I1(t− td) (6.10)

To consider the ’admittances’ that are connected to the existing nodes, the finalequations implemented are

Y0V1(t)=I1(t) + (Y0 − Y34)V2(t− td) + I2(t− td)Y0V2(t)=I2(t) + (Y0 − Y12)V1(t− td) + I1(t− td) (6.11)

where Y34 and Y12 are the ’admittances’ between nodes n3 and n4, and n1 and n2, se Fig.6.4).

6.11 Probes

To save node voltages, the probe-command is used according to:

Probe <name> <x y z>

This will save and print the node voltage at the specified point in the output file.

Page 42: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Chapter 7

Examples

7.1 Transmission line

This example is a long transmission line, i.e. two parallel conductors, terminated with50 Ω at the far-end and differentially excited at the near-end. The structure is seen inFig. 7.1 (not in scale).

Figure 7.1: Transmission line consisting of two conductors.

35

Page 43: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

36 Examples

The line length is 50 mm, width is 0.2 mm, thickness is 1 µm, and separation is20 µm. To enable comparison, a SPICE-simulation with the following transmission lineparameters have been used: LEN=0.05, R=1776, L=5.978e-7, G=0, and C=1.861e-11.

The input file for the transmission line is

number_of_bars 2

ndiva 20 ndivb 2 ndivc 0

ndiva 20 ndivb 2 ndivc 0

.cs sigma 574e6 .bz 0 0 0 5 0 0 0 0.002 0 5 0.002 0 0 0 1E-4 5 01E-4 0 0.002 1E-4 5 0.002 1E-4

.cs sigma 574e6 .bz 0 0 0.002 5 0 0.002 0 0.002 0.002 5 0.002 0.0020 0 0.0021 5 0 0.0021 0 0.002 0.0021 5 0.002 0.0021

#

I In 0 0.001 0.00205 0 0.001 0.5e-4 AC 1.0 0.0 PULSE(0 0.001 00.1e-9 0.1e-9 1.9e-9 100e-9)

#

R out 5 0.001 0.00205 5 0.001 0.5e-4 50

#

Probe Vin_p 0 0.001 0.00205

Probe Vin_n 0 0.001 0

Probe Vout_p 5 0.001 0.00205

Probe Vout_n 5 0.001 0

#

.TRAN 1000 0 5e-9

#

.cap yes

.ind yes

.res yes

#

.mna no

.lwa no

.delay yes cc

#

.END

The excitation is a 0.1 ns current pulse, pulse width 1.9 ns, and 1 mA amplitude. Further,1 000 time steps gives a ∆t of 5 ps in the numerical (time) integration.

The comparison to SPICE results are seen in Fig. 7.2.This full-wave, time domain simulation take 12 s. on a regular server for 204 + 126

unknowns (Lp - 204×204, P - 126×126) and 1 000 time steps.

Page 44: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

7.1. Transmission line 37

0 0.5 1 1.5 2 2.5 3 3.5

−0.1

0

0.1

0.2

Time [/ns]

[/V]

Near−end voltage

PEEC, numericalSPICE, analytical

0 0.5 1 1.5 2 2.5 3 3.5−0.02

0

0.02

0.04

0.06

0.08

Time [/ns]

[/V]

Far−end voltage

PEEC, numericalSPICE, analytical

Figure 7.2: Transmission line results with comparison to SPICE.

Page 45: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

38 Examples

7.2 λ/2 - Dipole

A λ/2 - dipole has its first resonance frequency when l ≈ λ/2. The model consists of twothin wires where the center gap is excited by a source. The structure is seen in Fig. 7.3(not in scale).

Figure 7.3: Dipole.

For this example, the conductor lengths are 99.9 mm each, width is 1 µm, thicknessis 1 µm, and center gap is 0.2 mm. Comparison can be made with analytical resultsfor the resonance frequency and for the input impedance (at resonance). For the near20 cm dipole, the resonance frequency is near, or above, 750 MHz and as for all thehalf-wavelength dipoles, the input impedance at resonance is 73.1 Ω.

Page 46: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

7.2. λ/2 - Dipole 39

The input file for the dipole is

number_of_bars 2

ndiva 10 ndivb 0 ndivc 0

ndiva 10 ndivb 0 ndivc 0

.cs sigma 574e6 .bz 0 0 0 9.99 0 0 0 0.0001 0 9.99 0.0001 0 0 00.0001 9.99 0 0.0001 0 0.0001 0.0001 9.99 0.0001 0.0001

.cs sigma 574e6 .bz 10.01 0 0 20 0 0 10.01 0.0001 0 20 0.0001 010.01 0 0.0001 20 0 0.0001 10.01 0.0001 0.0001 20 0.0001 0.0001

#

.alias P_in 9.99 0.00005 0.00005

.alias P_out 10.01 0.00005 0.00005

#

I In1 P_in P_out AC 1.0 0.0 PULSE(0 1 1e-6 1e-6 1e-6 1e-6 10e-6)

#

Probe V_in P_in

Probe V_out P_out

#

.AC LIN 500 1e6 1e9

#

#PEEC model

.res no

.cap yes

.ind yes

#

#Solver setup

.LWA no

.mna no

.delay yes cc

.END

The excitation is a unitary current AC source. Further, 500 frequencies between 1 MHzand 1 GHz is calculated.

The comparison to analytical result is seen in Fig. 7.4.This full-wave, frequency domain simulation take > 1 s. on a regular server for 20 +

22 unknowns (Lp - 20×20, P - 22×22) and 500 frequencies.

Page 47: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

40 Examples

700 710 720 730 740 750 760 770 780 790 8000

10

20

30

40

50

60

70

80

90

100

Freq. [MHz]

Inpu

t im

peda

nce

[Ω]

PEEC resultAnalytic result

Figure 7.4: Dipole results with comparison to analytical result.

The results can be improved by:

1. increasing the number of cells,

2. reducing the cross-section of the wires.

3. performing a non-uniform mesh of the wires (with reduced cells at the edges).

Page 48: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

7.3. Parallel plate capacitor 41

7.3 Parallel plate capacitor

As a first mixed conductor-dielectric examples, a parallel plate capacitor is considered.The conducting plates are 10 × 10 cm, negligible thickness, and the dielectric is 1 mmthick with εr = 4. The structure is seen in Fig. 7.5 (not in scale).

Figure 7.5: Parallel plat capacitor.

For this example, no comparison are made with analytical or other modeling results.Since the conducting plates are considered (very) thin, they are not meshed/discretized

in the thickness (ndivc 0). However, the dielectric block has one cell in the thickness di-rection (ndivc 1).

The capacitor is differentially excited in one corner ((0,0,0.1001) to (0,0,0)) with asource (V in the input file). The same corner and the corner diagonal to this is terminated(Rin and Rout) with 50 Ω resistors.

Page 49: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

42 Examples

The input file for the capacitor is

numero_barre 3

ndiva 5 ndivb 5 ndivc 0

ndiva 5 ndivb 5 ndivc 0

ndiva 5 ndivb 5 ndivc 1

.cs sigma 580000000 .bz 0 0 0.10005 10 0 0.10005 0 10 0.1000510 10 0.10005 0 0 0.1001 10 0 0.1001 0 10 0.1001 10 10 0.1001

.cs sigma 580000000 .bz 0 0 0 10 0 0 0 10 0 1010 0 0 0 0.00005 10 0 0.00005 0 10 0.00005 10 10 0.00005

.cs epsilon_r 4 .bz 0 0 0.00005 10 0 0.00005 0 10 0.00005 1010 0.00005 0 0 0.10005 10 0 0.10005 0 10 0.10005 10 10 0.10005

#

#In- and output- resistances

R Rin 0 0 0.1001 0 0 0 50

R Rout 10 10 0.1001 10 10 0 50

#

# Excitation

V V_In 0 0 0.1001 0 0 0 AC 1 0 SSTEP(0 1 10e-9 10e-9)

#

#Probes

Probe Vin_p 0 0 0.1001

Probe Vin_n 0 0 0

Probe Vout_p 10 10 0.1001

Probe Vout_n 10 10 0

#

#Analysis

.TRAN 1000 0 100e-9

#.AC LIN 250 10e6 1e9

#

#PEEC model

.res yes

.cap yes

.ind yes

#

#Solver info

.lwa no

.mna yes

.delay no cf

#

.END

Page 50: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

7.3. Parallel plate capacitor 43

The first simulation is performed in the time domain using a voltage source and aSSTEP-input (pulse like function) with rise time of 10 ns and gives the result in Fig.7.6 (a) for the current through the two resistors. The quasi-static, time domain analysistake 6 s. for 1 000 time steps.

The second simulation is performed in the frequency domain by commenting out(using #) the .TRAN-row and un-commenting the -AC-row. The excitation is changedto a current source by changing the excitation from V V In to I I In (the name-changeis not required). The result is seen in Fig. 7.6 (b) for the voltage over the two resistors.

0 10 20 30 40 50 60 70 80 90 1000

0.005

0.01

0.015

0.02

0.025

Time [ns]

Cur

rent

s [I]

IRinIRout

(a)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

5

10

15

20

25

Freq. [GHz]

Vol

tage

s [V

]

VRinVRout

(b)

Figure 7.6: Capacitor result in (a) the time domain and (b) for the frequency domain.

For this example, the results can be improved by:

1. increasing the number of cells,

2. by using the option .delay yes cc.

Page 51: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

44 Examples

Page 52: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Chapter 8

Troubleshooting

8.1 Error messages from kernel

8.1.1 Voltage Source only available with MNA-method

This error occurs since you are trying to use voltage sources, with .mna no. Fix by:

• Change excitation(s) to current source(s).

• Use .mna yes

8.2 Design errors

8.2.1 Node-to-Node Rule

The Node-to-Node Rule means that a model should be designed so that all nodes toucheach other, unless it is a boundary node, to ensure current to flow from parts of thedesign. Figure 8.1 shows a design where Node-to-Node rule is satisfied, whereas figure8.2 shows a model where this rule is not satisfied. In figure 8.2, it is obvious that somenodes are not touching other nodes, while they are not boundary nodes neither.

The way to apply this rule on a wrong model is to divide the model into smaller partsand hence create new nodes to match other connected parts. Please note that if yourmodel does not follow this rule, you may get completely wrong and unreliable results.

45

Page 53: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

46 Troubleshooting

Figure 8.1: Correct design with Node-to-Node rule satisfied.

Figure 8.2: Wrong design where Node-to-Node rule is not followed.

Page 54: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

8.2. Design errors 47

8.2.2 Same level of discretization

Another common error is that when two connected parts in a model do not have samediscretization level which can lead to untouched nodes and therefore unsatisfied Node-to-Node rule. Figure 8.3 shows a correct model, while figure 8.4 shows a wrong modelwhere two connected parts have different discretization level. The effect of this errors isas same as when Node-to-Node rule is not applied.

In order to fix this problem, the user should take case of discretization level in anydirection and make sure that all these levels match all connected parts to an object.

Figure 8.3: Correct design where all parts are discretized in same level.

Figure 8.4: Wrong design where some parts have different discretization level.

Page 55: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

48 Troubleshooting

Page 56: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Appendix A

NA- and MNA- formulations

This section describes the collection of the partial elements into a solvable equationsystem used for the extraction of the currents in the volume cells, the charge densities atthe surface cells, and the node potentials. Focus is on the frequency domain solution ofPEEC models, however, the time domain solution is briefly discussed.

For the solution of PEECs in the time and frequency domain an Admittance Methodand a Modified Nodal Analysis (MNA) method is presented. The Admittance Methodproduces a minimal but dense system matrix to obtain the voltages in the structure.The MNA solves for both voltages and currents in a structure and therefore produces alarger, and sparse, system matrix. The MNA method is widely used in modern circuitanalysis software due to its full-spectrum properties and flexibility to include additionalcircuit elements. The choice between the two methods depend on the specific problemat hand and the computational resources available.

The time- and frequency- domain solution of PEECs resorts on a general rule tostore partial elements and circuit specific parameters. The approach is detailed in thenext section and utilized in the following time- and frequency domain circuit equationformulation.

Matrix Storage of Partial Elements

The calculated values of all the partial elements, as detailed in the previous section, arestored in matrices to facilitate the formulation of circuit equations and the followingsolution. The approach is explained using a simple geometry, Fig. 1.1, representing athree conductor geometry.

The partial elements are stored according to the following scheme:

• The Partial Inductance Matrix, LThe partial inductances are calculated using analytical formulae or numerical inte-gration and the discretization resulting from the node-placement in Fig. 1.1. Forsimplicity the volume cells are separated using Greek letters according to Fig. 1.2.

49

Page 57: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

50 Troubleshooting

1 2 3

4

5 6

Figure 1.1: Three conductor geometry with numbered nodes indicated by white circles.

Figure 1.2: Three conductor geometry with volume cell partitions α, β, and γ.

The corresponding partial inductance matrix is then

L =

Lαα 0 Lαγ0 Lββ 0Lγα 0 Lγγ

(1.1)

where the notation Lxx is used for the partial self inductance for volume cell xand Lxy for the partial mutual inductance between volume cell x and y. Sinceinductive partition β is perpendicular to the other two inductive partitions, α andγ, the partial mutual inductance is zero. Since the partial inductance matrix issymmetric, Lγα = Lαγ, for N inductive partitions, N partial self and N2−N

2partial

mutual inductances have to be calculated. The symmetry can also be used toreduce the storage requirements for the partial inductance matrix and the partialcoefficients of potential matrix as described below.

• The Partial Coefficient of Potential Matrix, PThe partial coefficients of potential are calculated using analytical formulae ornumerical integration and the discretization resulting from the node-placement inFig. 1.1. For simplicity the surface cells are separated using the same numbers asthe nodes according to Fig. 1.3.

Page 58: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

51

1 2 3

4

5 6

Figure 1.3: Three conductor geometry with surface cell partitions 1 to 6.

The corresponding partial coefficient of potential matrix is then

P =

p11 p12 p13 p14 p15 p16p21 p22 p23 p24 p25 p26p31 p32 p33 p34 p35 p36p41 p42 p43 p44 p45 p46p51 p52 p53 p54 p55 p56p61 p62 p63 p64 p65 p66

(1.2)

where the notation pxx is used for the partial self coefficient of potential for surfacecell x and pxy for the partial mutual coefficient of potential between surface cellsx and y. The P-matrix is full in this case since all surfaces are coupled to eachother. However, for 3D PEEC models, charge free surfaces can exist and cause zeroelements in the P-matrix [9]. As for the partial inductance matrix symmetry canbe used to fill the P-matrix in an efficient manner.

• The Resistance Matrix, RThe volume cell resistances are calculated from the volume cell discretization shownin Fig. 1.2. Since no resistive coupling exists between the volume cells the resultingR-matrix is a diagonal matrix. For the example in Fig. 1.1 the resistance matrixis

R =

Rαα 0 00 Rββ 00 0 Rγγ

(1.3)

where the notation Rxx is used for the resistance for volume cell x.

• The Excess Capacitance of Dielectric Cell Matrix, Ce

For dielectric cells the excess capacitance is calculated using analytical formulae ornumerical integration and the volume cell discretization of the dielectric structure.As for the resistance matrix no cross couplings exist among the excess capacitanceswhich results in a diagonal Ce-matrix. The three conductor geometry in Fig. 1.1contains no dielectric areas which results in an empty Ce-matrix. The dielectricinclusion in the PEEC model is further discussed in [10, 9].

Page 59: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

52 Troubleshooting

• Connectivity Matrix, ATo be able to formulate and solve the PEEC equations in both the time and fre-quency domain a Connectivity Matrix is needed that describes the connection of thepartial inductances to the PEEC nodes. The entries in the A-matrix are createdusing the following rules :

1. Each row corresponds to one volume cell/partial inductance.

2. Each column corresponds to one PEEC node.

3. The entry -1 at row m and column n in A indicates that the current directionin volume cell m is from node n.

4. The entry 1 at row m and column n in A indicates that the current directionin volume cell m is into node n.

This results in the A-matrix for the example in Fig. 1.1 according to

A =

−1 1 0 0 0 00 0 −1 1 0 00 0 0 0 −1 1

(1.4)

• Node Reduction Matrix, Rv

A second PEEC model information-matrix needed for the formulation of the circuitequations is the Node Reduction Matrix, Rv. This matrix reduces multiple PEECnodes at one geometrical point in a PEEC model to only one single PEEC nodeand performs the summation of the coefficients of potential contributions from eachsurface to one combined node coefficient of potential. Multiple PEEC nodes and/orsurfaces at one geometrical point appear for 3D PEEC models and when 1D and2D PEEC discretizations are put together. This problem is detailed in the includedpaper F, 3D PEEC Capacitance Calculations. The entries in the Rv matrix arecreated using the following rules :

1. Each row corresponds to one geometrical point before reduction.

2. Each column corresponds to one geometrical point after reduction.

3. The entry 1 at row m and column n in the Rv matrix indicates that thegeometrical points m and n will be joint after the reduction.

The example in Fig. 1.3 has no multiple PEEC nodes. Consider, as an example, tojoin node two with node three and node four with node five in the three conductorstructure would result in a PEEC model for a bent conductor geometry with a Rv

matrix written as

Rv =

1 0 0 00 1 0 00 1 0 00 0 1 00 0 1 00 0 0 1

(1.5)

Page 60: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

53

Frequency Domain Circuit Equations for the Solution of PEEC Models

The full-wave solution of PEEC models require the correct representation of the retardedelectric- and magnetic- field couplings. The individual retardation terms are included inthe off-diagonal entries in the partial inductance- and partial coefficient of potential-matrices resulting in complex matrix entries.

Admittance Method Circuit Equations The circuit equations in the Admittancemethod are built by using the PEEC cell in Fig. 1.4 and formulated as matrix equationsusing the previously defined matrices. In Fig. 1.4 the magnetic and electric couplingterms, V L

m and V Ci respectively, have been replaced by its frequency domain correspon-

dence and the summations are over N capacitive and M inductive cells. Further, VCxdenotes voltage over pseudo-capacitance Cx = 1

Pxxand Yij is a possible lumped circuit

component connected between node i and j.

Lpmm Rm

i j

VaC

Pii

1Pjj

1

Yij

ILm

Paa

Pia

a=1a=i

N

ViC

VjC

VaC Paa

Pja

a=1a=j

N

Lpmbb=1b=m

M

j ILb

ICjICi

ILn

IYij

Figure 1.4: A PEEC one-cell used in the development of the Admittance method circuit equa-tions.

The circuit equations are collected in three steps :

1. Kirchoff’s voltage law is applied to the inductive branch in Fig. 1.4 resulting in

Vi − jω Lpmm ILm −M∑

b=1,b 6=m

jω Lpmb ILb −Rm ILm − Vj = 0 (1.6)

This equation can be written in matrix form as

−AV − (R + jωL) IL = VS (1.7)

where VS is a voltage source excitation.

Page 61: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

54 Troubleshooting

2. Kirchoff’s current law (KCL) is applied to each node. For example, KCL for nodej can be written as

ILm = ILn + IYij + ICj (1.8)

and further expanded as

ILm = ILn + (Vj − Vi)Yij + jωCjjVCj (1.9)

This equation can be written in matrix form as

YLV + jωFVc − AT IL = IS (1.10)

in which IS is a current source excitation vector, YL is an admittance matrixdescribing the lumped components, and F is a N ×N diagonal matrix containingthe admittances of the pseudo-capacitances, ie. entries according to

Fnn = Cnn (1.11)

3. The potentials at the nodes are expressed using its constituents parts as, for in-stance, for node j as

Vj = VCj +N∑

a=1,a6=j

PjaPaa

VCa (1.12)

This equation can be written in matrix form as

−V + SVc = 0 (1.13)

in which S is a N ×N matrix containing the retarded electric field couplings with(complex) elements of the type

Sij =pijpjj

(1.14)

The matrix equations described in (1.7), (1.10) and (1.13) can be reformulated to solvefor the node potentials V and charges q, or inductor currents IL according to −A −(R + jωL)

jωP−1 + YL −AT

V

IL

=

VS

IS

(1.15)

V = P q (1.16)

Using the previously defined matrices it is possible to construct the admittance matrixfor the PEEC model as

Y = (AT (R + jωL− jω−1Ce)−1)A + jω(Rv

T P−1 Rv) + YL (1.17)

from which the node potentials V are found by solving

V = Y−1IS (1.18)

Page 62: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

55

Eq (1.17) and (1.18) is referred to as the Admittance method in this thesis. In (1.17) theCe matrix, used to model dielectric cells, and the Rv matrix, used to remove multiplenodes and surfaces, have been included. The volume cell currents can then be calculatedusing post-processing as

IL = (R + jωL)−1(−AV−VS) (1.19)

(1.17) can be used for all types of PEEC models simply by excluding the unwantedpartial elements. For instance, the admittance method for (Lp, P )PEEC models is writtenand solved as

V = (AT (jωL)−1 A + jω(RvT P−1 Rv))−1 IS (1.20)

Modified Nodal Analysis (MNA) Method Using a MNA method all the nodepotentials and inductive branch currents are calculated at the same time. The systemmatrix that is created is larger than for the Admittance Method but is also more sparseand the use of sparse matrix solvers are possible. The MNA method described here isderived from the Admittance matrix formulation in (1.15) by using the following matrixproperties

jωP−1 = jωFS−1 (1.21)

jωFS−1 = jωS−1TF (1.22)

resulting in a system of equations according to −A −(R + jωL)

jωF + STYL −STAT

V

IL

=

VS

ST IS

(1.23)

In this formulation, the node potentials V and volume cell currents IL are given withoutthe computationally heavy inversion of the coefficient of potential matrix P in contrastto the Admittance method described in the previous section. This formulation is referredto as the MNA method in this thesis.

Time Domain Circuit Equations for the Solution of PEEC Models

The time domain equations for the solution of PEEC model problems can be derivedin the same way as for the frequency domain. The difference is the inclusion of thetime retardation that is expressed as a complex part in the partial mutual couplings forfrequency domain models, (1.24), while for time domain PEEC models the retardationis written as a finite time delay, (1.25) (the two equations displays the induced voltagein cell α due to the magnetic field coupling with cell β).

Vαβ = jωLpαβ Iβ e−jωταβ (1.24)

vαβ = Lpαβdiβ(t− ταβ)

dt(1.25)

The two following sections details the time domain solution of quasi-static PEEC modelsusing the previously defined Admittance matrix- and MNA- formulation.

Page 63: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

56 Troubleshooting

Admittance Method Circuit Equations For quasi-static time domain PEEC mod-els the time domain circuit equations using the Admittance method can be written as −A −(R + L d

dt)

P−1 ddt

+ YL −AT

V

IL

=

VS

IS

(1.26)

similar to [11]. Discretizing matrix (1.26) in time by using the Backward Euler (BE)scheme yields −A −(R + L 1

dt)

P−1 1dt

+ YL −AT

Vn

InL

=

VS − L 1dt

In−1L

IS + P−1 1dt

Vn−1

(1.27)

Which can be formulated to a single equation to calculate the current PEEC node volt-ages, Vn, as

Vn =

[P−1

1

dt+ Y + AT

(R + L

1

dt

)−1A

]−1(1.28)[

IS + P−11

dtVn−1 −AT (R + L

1

dt)−1(VS − L

1

dtIn−1)

]And the volume cell currents can be calculated using post-processing as

In = −[R + L

1

dt

]−1 [VS − L

1

dtIn−1 −AVn

](1.29)

Modified Nodal Analysis (MNA) Method For quasi-static time domain PEECmodels, the TD-MNA system can be written as −A −(R + L d

dt)

F ddt

+ STYL −STAT

V

IL

=

VS

ST IS

(1.30)

Discretizing matrix (1.30) in time by using the Backward Euler (BE) scheme yields −A −(R + L 1dt

)

F 1dt

+ STYL −ST AT

Vn

InL

=

VS − L 1dt

In−1L

ST IS + F 1dt

Vn−1

(1.31)

where for a fixed time step, dt, the leftmost block only has to be calculated once.It is noted that for quasi-static time domain PEEC models only the previous voltages,

Vn−1, and currents, In−1L have to be stored to calculate the current ones. For full-waveTD PEEC models, accounting for the individual retardation between the surface andvolume cells, even more instances of voltages and currents needs to be stored, resulting

Page 64: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

57

in storage and computationally heavy calculations. The system of ordinary differentialequations (ODEs) describing the quasi-static PEEC model is transformed into a systemof neutral delay differential equations (NDDEs) [12, 13] for the full-wave case. The full-wave formulation require the separation of the self (instantaneous) and mutual (retarded)couplings in the previous matrix formulations resulting in

L = LS + LM (1.32)

S = SS + SM (1.33)

for the MNA method where the subscript S and M indicate self and mutual termsrespectively. The resulting system of NDDEs is in the following form

C0 y′(t) + G0 y(t) + C1 y′(t− τ) + G1 y(t− τ) = B u(t, t− τ), t > t0y(t) = g(t), t ≤ t0

(1.34)

where the matrices C0, G0, C1, G1, and B are real-valued and unrelated to previousmatrix notations and the retarded couplings must be interpreted in an operator sense.The separation of self- and mutual- terms results in an extended right hand side in thecorresponding equation system, since the mutual couplings are considered to be known(since they are related to past current and voltage values), and require constant re-evaluation for each time step.

Page 65: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

58 Troubleshooting

Page 66: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Appendix B

Dielectric materials in the timedomain

2.1 Modified nodal analysis

The time domain, MNA circuit equations are discretized using Backward Euler, resultingin [

Cself1dt−PnormYL PsA

T

A R + LS1dt

+ dtCe

] [Vn

In

]= (2.1)[

−PnormIs + Cself1dt

Vn−1 −PmAT In−τLsIn−1 − LmIn−τ − In−1−τ + invCp ·Qn−1

]where node voltages and branch currents are solved simultaneously.

The charges are calculate as:

Qn−1 = dtselectCpIn (2.2)

Note the followingL = Ls + Lm,Pnorm = Ps + Pm.

2.2 Nodal analysis

The time domain, NA circuit equations are discretized using Backward Euler, resultingin:

Y = AT (R + Lp1

dt+ dtCe)A + Cs

1

dt+ YL (2.3)

This admittance matrix can then be used to solve for node voltages according to

YVn = Is + CS1

dtVn−1 −AT (R + L

1

dt+ dtCe)−1(−(L

1

dt+ dtCe)In−1 + invCp ·Qn−1)

(2.4)

59

Page 67: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

60 Troubleshooting

and post-processing for branch currents

In = −(R + L1

dt+ dtCe)−1(AVn − L

1

dtIn−1 + invCp ·Qn−1) (2.5)

and for charges on dielectrics

Qn = dtselectCp · In (2.6)

Page 68: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

Appendix C

Post-processing in ParaView

This section describes how to use the code with the visualization toolkit ParaView fromKitware Inc [14].

To be able to use ParaView 1 for post-processing (showing current- and voltage-distribution, and EM fields), the following has to be specified in the input file:.plot V | I | fields vtk

where:

• V is used to plot the potential distribution in the structure (surface cells).

• I is used to plot the current distribution in the structure (volume cells). For thisoption, the MNA method has to be used.

• fields is used to plot the potential distribution in specified points. This option isused together with the Field-command, Sec. 5.15.

Example: If the following option is specified .plot V I vtk, two sub-directories willbe created in the output-directory (given by to -o filename). The two directories are”voltages” and ”currents”. They contain one .vtk-file for each timestep or for eachfrequency step. To view the voltage distribution, open ParaView and choose File -Open Data, click to the voltage-directory and open the first vtk.file. For time domainsimulations, you directly get the voltage distribution in the structure. Show a colormapby clicking the Display-tab and then Scalar bar. Edit the viewing of the Scalar bar byclicking the Edit Color Map-button. Play an animation (the voltage distribution in thestructure at all the time instances) by clicking . in the center/lower-part of the ParaViewwindow.

The first you have to specify is what to view ()

1ParaView is a open source software by Kitware Inc.

61

Page 69: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

62 Troubleshooting

Figure 3.1: ParaView main window.

Page 70: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

References

[1] A. E. Ruehli, U. Miekkala, and H. Heeb. Stability of discretized partial elementequivalent EFIE circuit models. IEEE Trans. Antennas Propagat., 43(6):553–559,June 1995. 4.4

[2] J. E. Garrett, A. E. Ruehli, and C. R. Paul. Accuracy and stability of the partialelement equivalent circuit model. In Proc. of the Zurich Symposium on EMC, pages179–184, Zurich, Switzerland, 1997. 4.4

[3] A. Cangellaris, W. Pinello, and A. E. Ruehli. Stabilization of time domain solu-tions of EFIE based on partial element equivalent circuit models. In Proc. of theIEEE Antennas and Propagation Society Int. Symposium, pages 966–969, Montreal,Canada, 1997. 4.4

[4] J. Garrett, A. E. Ruehli, and C. R. Paul. Accuracy and stability improvements of in-tegral equation models using the partial element equivalent circuit PEEC approach.IEEE Trans. Antennas Propagat., 46(12):1824–1831, December 1998. 4.4

[5] J. Ekman J., G. Antonini, A. Orlandi, and A. E. Ruehli. Impact of partial elementaccuracy on PEEC model stability. 48(1):19–32, 2006. 4.4

[6] G. Antonini, J. Ekman, and A. Orlandi. 3D PEEC capacitance calculations. InProc. of the IEEE International Symposium on EMC, pages 630–635, Boston, MA,USA, 2003.

[7] C. Ho, A. Ruehli, and P. Brennan. The modified nodal approach to network analysis.IEEE Trans. Circuits Syst., pages 504–509, June 1975. 5.3

[8] L. M. Wedepohl and L. Jackson. Modified nodal analysis: an essential addition toelectrical circuit theory and analysis. Engineering Science and Eduction Journal,pages 84–92, June 2002. 5.3

[9] A. E. Ruehli and H. Heeb. Circuit models for three-dimensional geometries includingdielectrics. IEEE Trans. Microwave Theory Tech., 40(7):1507–1516, July 1992. A,A

[10] J. E. Garrett. Advancements of the Partial Element Equivalent Circuit Formulation.PhD thesis, The University of Kentucky, 1997. A

63

Page 71: MultiPEEC (3.5.2) Unstable - Luleå University of Technologystaff.jekman/PEEC/Program/MultiPEEC_UG.pdf · Jerker Delsing Lule a University of Technology, ... program e.g. order of

64 Troubleshooting

[11] G. Antonini. Full wave analysis of power electronic systems through a PEEC statevariable method. In Proc. of the IEEE Int. Symposium on Industrial Electronics,pages 1386–1391, L’Aquila, Italy, 2002. A

[12] C. T. H. Baker, C. A. H. Paul, and D. R. Wille. Issues on the numerical solution ofevolutionary delay differential equations. Technical report, University of Manchester,1994. Numerical Analysis Report No. 28. A

[13] A. Bellen, N. Guglielmi, and A. Ruehli. Methods for linear systems of circuit de-lay differential equations of neutral type. IEEE Trans. Circuits Syst., 46:212–216,January 1999. A

[14] ParaView, http://www.watson.ibm.com, 2007. C